diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..fb32127705cb3084b75f869fef454f3c83b61853 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,42 @@ +# Virtual environments +venv/ +.venv/ +env/ +ENV/ + +# Node modules +algospaced-ui/node_modules/ +node_modules/ + +# Python cache & logs +__pycache__/ +*.pyc +*.pyo +*.pyd +.ruff_cache/ +*.db +sync.log +debug_cookies.txt +debug_db.txt + +# Git & environment +.git/ +.gitignore +.env +.env.local +.env.*.local +.streamlit/secrets.toml + +# Credentials & sensitive files +*firebase-credentials*.json +*serviceAccount*.json +*credentials*.json +gcp-credentials.json +scratch/ + +# Hidden directories & dotfiles (ignores root-level dot folders/configs) +.* + +# Documentation (only README is needed for package build) +*.md +!README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..23223990bc2362e5f78de73657465496844a2861 --- /dev/null +++ b/.gitignore @@ -0,0 +1,48 @@ +# Virtual environment +venv/ +.venv/ +env/ +ENV/ + +# Python caching +__pycache__/ +*.pyc +*.pyo +*.pyd + +# Local SQLite databases and logs +*.db +scratch/ +/scratch/db_*.sqlite +/scratch/sandbox.db +sandbox.db +sync.log +debug_cookies.txt +debug_db.txt +.ruff_cache/ + +# Node dependencies +node_modules/ +algospaced-ui/node_modules/ + +# Local configuration and secrets +.streamlit/secrets.toml +.env +.env.local +.env.*.local +*firebase-credentials*.json +*serviceAccount*.json +*credentials*.json +gcp-credentials.json + +# Design layouts and binaries +*.png +*.jpg +*.jpeg +*.gif +*.ico +*.zip +*.tar.gz +*.pdf + +buildlogs.txt diff --git a/.python-version b/.python-version new file mode 100644 index 0000000000000000000000000000000000000000..6324d401a069f4020efcf0ff07442724b52f47c2 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.14 diff --git a/.streamlit/secrets.toml.example b/.streamlit/secrets.toml.example new file mode 100644 index 0000000000000000000000000000000000000000..7a13dd67dc10c0976f2f44c3bf328ae8de109562 --- /dev/null +++ b/.streamlit/secrets.toml.example @@ -0,0 +1,17 @@ +# .streamlit/secrets.toml + +GEMINI_API_KEY = "your_gemini_api_key_here" +GDRIVE_FOLDER_ID = "your_gdrive_folder_id_here" + +# Contents of your google-credentials.json +[gcp_service_account] +type = "service_account" +project_id = "..." +private_key_id = "..." +private_key = "..." +client_email = "..." +client_id = "..." +auth_uri = "https://accounts.google.com/o/oauth2/auth" +token_uri = "https://oauth2.googleapis.com/token" +auth_provider_x509_cert_url = "https://www.googleapis.com/oauth2/v1/certs" +client_x509_cert_url = "..." diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c4d6255d3cd7673334ca8a36daf00dc6f19ed3c8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,50 @@ +# Stage 1: Build React Frontend +FROM node:24-slim AS frontend-builder +WORKDIR /app/algospaced-ui +RUN npm install -g npm@12.0.2 --loglevel=error +COPY algospaced-ui/package*.json ./ +RUN npm ci --loglevel=error --no-audit --no-fund +COPY algospaced-ui/ ./ +RUN npm run build + +# Stage 2: Python Backend +FROM python:3.14-slim +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ +WORKDIR /app + + + +# Set up non-root user for Hugging Face Spaces (UID 1000) +RUN useradd -m -u 1000 user && \ + chown -R user:user /app + +# Switch to non-root user early +USER user +ENV HOME=/home/user \ + PATH=/home/user/.local/bin:$PATH \ + PORT=7860 + +# Install python dependencies via uv sync +COPY --chown=user:user pyproject.toml uv.lock ./ +RUN uv sync --frozen --no-install-project + +# Add the virtual environment to PATH +ENV PATH="/app/.venv/bin:$PATH" + +# Copy application source and assets +COPY --chown=user:user *.py schema.sql README.md ./ +COPY --chown=user:user core/ ./core/ +COPY --chown=user:user data/ ./data/ +COPY --chown=user:user routers/ ./routers/ +COPY --chown=user:user src/ ./src/ + +# Sync the project itself +RUN uv sync --frozen + +# Ensure the fresh build from Stage 1 is used +COPY --from=frontend-builder --chown=user:user /app/algospaced-ui/dist /app/algospaced-ui/dist + +EXPOSE 7860 + +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] + diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..35275080e2a6f25dbc744790d49d1cf64c50accc --- /dev/null +++ b/README.md @@ -0,0 +1,94 @@ +--- +title: AlgoSpaced DSA +emoji: 💻 +colorFrom: blue +colorTo: indigo +sdk: docker +app_port: 7860 +pinned: false +--- + +# AlgoSpaced-DSA-Review 🚀 + +A retro-styled Spaced Repetition System (SRS) for mastering Data Structures & Algorithms, daily coding challenges, interactive SQL sandboxing, and hand-drawn adventure trail exploration. + +--- + +## 🌟 Features + +- **SRS Review Queue**: Leitner 5-box spaced repetition algorithm with AI critique and hints. +- **Expedition Trail Map**: Hand-drawn vintage cartography map visualizing progress along the LeetCode 150 path. +- **Interactive Sandboxes**: Python algorithm practice and SQLite sandbox with real-time validation. +- **File Explorer & Exporter**: Tag, manage, and export DSA solutions as `.py` archives. +- **Multi-User Isolation & Guest Mode**: Firebase Authentication (Google OAuth + Email) with isolated user progress and instant offline sandbox mode. + +--- + +## 🛠️ Tech Stack + +- **Frontend**: React 19, TypeScript, Vite, Tailwind CSS, Lucide Icons, Canvas Confetti. +- **Backend**: FastAPI, Uvicorn, Pydantic, Firebase Admin SDK. +- **Database & Auth**: Firebase Authentication & Google Cloud Firestore. +- **AI**: Google Gemini API (`google-genai`). + +--- + +## 🚀 Quick Start + +### Single-Command (Recommended) + +Spins up both the FastAPI backend and React frontend with a single command and synchronized logs: + +```bash +npm install # Installs root dev orchestration dependencies +npm run dev # Runs uvicorn + vite with synchronized, color-coded logs +``` + +### Or Run Services Separately + +
+Manual Multi-Terminal Setup + +#### 1. Backend + +```bash +# Using uv (recommended) +uv run uvicorn main:app --reload --port 8000 +``` + +#### 2. Frontend + +```bash +cd algospaced-ui +npm install +npm run dev +``` + +
+ +Open `http://localhost:5173` in your browser. + +--- + +## 🔑 Environment Variables + +Create a `.env` file in the project root: + +```env +# Backend Firebase Credentials +FIREBASE_CREDENTIALS_PATH=firebase-credentials.json + +# Frontend Firebase Config (served via /api/config) +FIREBASE_API_KEY=your_api_key +FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com +FIREBASE_PROJECT_ID=your-project-id +FIREBASE_STORAGE_BUCKET=your-project.appspot.com +FIREBASE_MESSAGING_SENDER_ID=your_sender_id +FIREBASE_APP_ID=your_app_id + +# AI & Reviews (Multi-Provider Fallback) +GEMINI_API_KEY=your_gemini_api_key +GROQ_API_KEY=your_groq_api_key # Optional: Free ultra-fast Llama 3.3 / Qwen fallback +OPENROUTER_API_KEY=your_openrouter_key # Optional: OpenRouter free models fallback +``` + diff --git a/ai_cache.py b/ai_cache.py new file mode 100644 index 0000000000000000000000000000000000000000..33a311dfcaa902418d472f2dd85112b7e60f55ef --- /dev/null +++ b/ai_cache.py @@ -0,0 +1,124 @@ +import logging +import re +import threading +from datetime import UTC, datetime +from typing import Any + +import cache +import db + +logger = logging.getLogger("ai_cache") +logger.setLevel(logging.INFO) + +_memory_cache: dict[str, Any] = {} +_cache_lock = threading.Lock() + + +def normalize_slug(slug_or_title: str) -> str: + """Sanitizes titles/slugs for safe Firestore doc IDs and cache keys.""" + if not slug_or_title: + return "unknown" + s = slug_or_title.strip().lower() + s = re.sub(r"https?://[^\s/]+/problems/", "", s) + s = re.sub(r"[^a-z0-9_\-]+", "_", s) + return s.strip("_")[:100] + + +def get_cached_item(cache_key: str) -> Any | None: + """Checks Memory -> Redis -> Firestore.""" + # 1. Memory + with _cache_lock: + if cache_key in _memory_cache: + return _memory_cache[cache_key] + + # 2. Redis (if available) + try: + val = cache.get_cache(f"ai_cache:{cache_key}") + if val: + with _cache_lock: + _memory_cache[cache_key] = val + return val + except Exception: + pass + + # 3. Firestore (if available) + try: + firestore_client = db.init_firebase() + if firestore_client: + doc_ref = firestore_client.collection("ai_cache").document(cache_key) + doc = doc_ref.get() + if doc.exists: + data = doc.to_dict() + cached_val = data.get("payload") if data and "payload" in data else data + if cached_val: + with _cache_lock: + _memory_cache[cache_key] = cached_val + return cached_val + except Exception as e: + logger.debug(f"Firestore cache fetch skipped/failed: {e}") + + return None + + +def set_cached_item(cache_key: str, value: Any, ttl_seconds: int = 86400 * 30): + """Saves to Memory -> Redis -> Firestore.""" + if not value or not cache_key: + return + + # 1. Memory + with _cache_lock: + _memory_cache[cache_key] = value + + # 2. Redis + try: + cache.set_cache(f"ai_cache:{cache_key}", value, ttl_seconds=ttl_seconds) + except Exception: + pass + + # 3. Firestore + try: + firestore_client = db.init_firebase() + if firestore_client: + doc_ref = firestore_client.collection("ai_cache").document(cache_key) + doc_ref.set({"payload": value, "cached_at": datetime.now(UTC).isoformat()}) + except Exception as e: + logger.debug(f"Firestore cache set skipped/failed: {e}") + + +# --- High-level cache helpers --- + + +def get_daily_python_challenge(date_str: str) -> dict[str, Any] | None: + return get_cached_item(f"daily_python_{date_str}") + + +def set_daily_python_challenge(date_str: str, challenge: dict[str, Any]): + set_cached_item(f"daily_python_{date_str}", challenge, ttl_seconds=86400 * 7) + + +def get_daily_sql_challenge(date_str: str) -> dict[str, Any] | None: + return get_cached_item(f"daily_sql_{date_str}") + + +def set_daily_sql_challenge(date_str: str, challenge: dict[str, Any]): + set_cached_item(f"daily_sql_{date_str}", challenge, ttl_seconds=86400 * 7) + + +def get_leetcode_problem(slug_or_url: str) -> dict[str, Any] | None: + slug = normalize_slug(slug_or_url) + return get_cached_item(f"leetcode_meta_{slug}") + + +def set_leetcode_problem(slug_or_url: str, data: dict[str, Any]): + slug = normalize_slug(slug_or_url) + set_cached_item(f"leetcode_meta_{slug}", data, ttl_seconds=86400 * 90) + + +def get_leetcode_intuition(slug_or_title: str) -> dict[str, Any] | None: + slug = normalize_slug(slug_or_title) + return get_cached_item(f"leetcode_intuition_{slug}") + + +def set_leetcode_intuition(slug_or_title: str, data: dict[str, Any]): + slug = normalize_slug(slug_or_title) + set_cached_item(f"leetcode_intuition_{slug}", data, ttl_seconds=86400 * 90) diff --git a/ai_provider.py b/ai_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..5ebd79bce2f3f8f6645094fe087092b9b07ce40e --- /dev/null +++ b/ai_provider.py @@ -0,0 +1,424 @@ +import json +import logging +import re +import urllib.error +import urllib.request +from typing import Any + +from gdrive_sync import get_secret + +logger = logging.getLogger("ai_provider") +logger.setLevel(logging.INFO) + +# Optional genai import +try: + from google import genai + from google.genai import types +except ImportError: + genai = None + types = None + + +def clean_json_response(raw_text: str) -> str: + """Strips markdown code blocks, comments, or leading/trailing text to extract clean JSON.""" + if not raw_text: + return "" + text = raw_text.strip() + + # Remove markdown code fences if present + match = re.search(r"```(?:json)?\s*([\s\S]*?)\s*```", text, re.IGNORECASE) + if match: + text = match.group(1).strip() + + # If text is still wrapped in another fence or has leading text + if not (text.startswith("{") or text.startswith("[")): + start_brace = text.find("{") + start_bracket = text.find("[") + if start_brace != -1 and (start_bracket == -1 or start_brace < start_bracket): + end_brace = text.rfind("}") + if end_brace != -1: + text = text[start_brace : end_brace + 1] + elif start_bracket != -1: + end_bracket = text.rfind("]") + if end_bracket != -1: + text = text[start_bracket : end_bracket + 1] + + return text.strip() + + +def call_gemini( + api_key: str, system_instruction: str, user_prompt: str, is_json: bool = False +) -> str: + """Calls Google Gemini API with fallback models.""" + models = [ + "gemini-3.5-flash-lite", + "gemini-2.5-flash", + "gemini-3.7-flash", + "gemini-2.5-flash-lite", + "gemini-3.5-flash", + "gemini-2.5-pro", + "gemini-2.0-flash", + "gemini-1.5-flash", + ] + + # If official SDK is available + if genai is not None: + client = genai.Client(api_key=api_key) + last_err = None + for model_name in models: + try: + config = ( + types.GenerateContentConfig( + system_instruction=system_instruction, + response_mime_type="application/json", + ) + if is_json + else types.GenerateContentConfig( + system_instruction=system_instruction, + ) + ) + response = client.models.generate_content( + model=model_name, contents=user_prompt, config=config + ) + if response and hasattr(response, "text") and response.text: + return response.text + except Exception as e: + last_err = e + logger.warning(f"Gemini model {model_name} failed: {e}") + continue + if last_err: + raise last_err + raise RuntimeError("Gemini failed to return text") + + # Fallback to direct REST call if SDK missing + last_err = None + for model_name in models: + try: + url = f"https://generativelanguage.googleapis.com/v1beta/models/{model_name}:generateContent?key={api_key}" + payload = { + "contents": [{"parts": [{"text": user_prompt}]}], + "systemInstruction": {"parts": [{"text": system_instruction}]}, + } + if is_json: + payload["generationConfig"] = {"responseMimeType": "application/json"} + + req = urllib.request.Request( + url, + data=json.dumps(payload).encode("utf-8"), + headers={"Content-Type": "application/json"}, + ) + with urllib.request.urlopen(req, timeout=30) as resp: + data = json.loads(resp.read().decode("utf-8")) + candidates = data.get("candidates", []) + if candidates: + parts = candidates[0].get("content", {}).get("parts", []) + if parts: + return parts[0].get("text", "") + except Exception as e: + last_err = e + continue + if last_err: + raise last_err + raise RuntimeError("Gemini REST API failed") + + +def stream_gemini(api_key: str, system_instruction: str, user_prompt: str, is_json: bool = False): + """Streams Google Gemini API responses chunk by chunk.""" + models = [ + "gemini-2.5-flash", + "gemini-3.5-flash-lite", + "gemini-3.7-flash", + "gemini-2.5-flash-lite", + "gemini-3.5-flash", + "gemini-2.0-flash", + "gemini-1.5-flash", + ] + if genai is not None: + client = genai.Client(api_key=api_key) + for model_name in models: + try: + config = ( + types.GenerateContentConfig( + system_instruction=system_instruction, + response_mime_type="application/json", + ) + if is_json + else types.GenerateContentConfig( + system_instruction=system_instruction, + ) + ) + response = client.models.generate_content_stream( + model=model_name, contents=user_prompt, config=config + ) + has_yielded = False + for chunk in response: + if chunk and hasattr(chunk, "text") and chunk.text: + has_yielded = True + yield chunk.text + if has_yielded: + return + except Exception as e: + logger.warning(f"Gemini streaming model {model_name} failed: {e}") + continue + + # Fallback to standard call if streaming fails or SDK missing + full_text = call_gemini(api_key, system_instruction, user_prompt, is_json=is_json) + if full_text: + yield full_text + + +def call_groq( + api_key: str, system_instruction: str, user_prompt: str, is_json: bool = False +) -> str: + """Calls Groq Cloud API with OpenAI-compatible payload.""" + models = [ + "qwen/qwen3.8-27b", + "openai/gpt-oss-20b", + "qwen/qwen3.6-27b", + "openai/gpt-oss-120b", + "groq/compound-mini", + "groq/compound", + ] + url = "https://api.groq.com/openai/v1/chat/completions" + last_err = None + + for model_name in models: + try: + payload: dict[str, Any] = { + "model": model_name, + "messages": [ + {"role": "system", "content": system_instruction}, + {"role": "user", "content": user_prompt}, + ], + "temperature": 0.2, + } + if is_json: + payload["response_format"] = {"type": "json_object"} + + req = urllib.request.Request( + url, + data=json.dumps(payload).encode("utf-8"), + headers={ + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AlgoSpaced/1.0", + }, + ) + with urllib.request.urlopen(req, timeout=30) as resp: + data = json.loads(resp.read().decode("utf-8")) + choices = data.get("choices", []) + if choices: + content = choices[0].get("message", {}).get("content", "") + if content: + return content + except Exception as e: + last_err = e + logger.warning(f"Groq model {model_name} failed: {e}") + continue + + if last_err: + raise last_err + raise RuntimeError("Groq failed to return content") + + +def call_openrouter( + api_key: str, system_instruction: str, user_prompt: str, is_json: bool = False +) -> str: + """Calls OpenRouter API with free and standard model fallbacks.""" + models = [ + "openrouter/free", + "deepseek/deepseek-chat", + "meta-llama/llama-3.3-70b-instruct", + "minimax/minimax-m2.7:free", + "google/gemma-4-31b-it:free", + "meta-llama/llama-3.1-8b-instruct:free", + ] + url = "https://openrouter.ai/api/v1/chat/completions" + last_err = None + + for model_name in models: + try: + payload: dict[str, Any] = { + "model": model_name, + "messages": [ + {"role": "system", "content": system_instruction}, + {"role": "user", "content": user_prompt}, + ], + "temperature": 0.2, + } + if is_json: + payload["response_format"] = {"type": "json_object"} + + req = urllib.request.Request( + url, + data=json.dumps(payload).encode("utf-8"), + headers={ + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}", + "HTTP-Referer": "https://algospaced.io", + "X-Title": "AlgoSpaced DSA", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AlgoSpaced/1.0", + }, + ) + with urllib.request.urlopen(req, timeout=30) as resp: + data = json.loads(resp.read().decode("utf-8")) + choices = data.get("choices", []) + if choices: + content = choices[0].get("message", {}).get("content", "") + if content: + return content + except Exception as e: + last_err = e + logger.warning(f"OpenRouter model {model_name} failed: {e}") + continue + + if last_err: + raise last_err + raise RuntimeError("OpenRouter failed to return content") + + +def detect_provider(provider: str | None, api_key: str | None) -> str: + """Infers provider from name or key pattern.""" + if provider: + p = provider.lower().strip() + if "groq" in p: + return "groq" + if "openrouter" in p or "open_router" in p: + return "openrouter" + if "gemini" in p or "google" in p: + return "gemini" + + if api_key: + k = api_key.strip() + if k.startswith("gsk_"): + return "groq" + if k.startswith("sk-or-"): + return "openrouter" + if k.startswith("AIza"): + return "gemini" + + return "gemini" + + +def generate_ai_content( + system_instruction: str, + user_prompt: str, + is_json: bool = False, + custom_provider: str | None = None, + custom_api_key: str | None = None, +) -> tuple[str, str]: + """ + Unified multi-provider AI dispatcher with automatic failover. + Returns tuple of (response_text, provider_used). + """ + # 1. Custom BYOK Request + if custom_api_key and custom_api_key.strip(): + key = custom_api_key.strip() + provider = detect_provider(custom_provider, key) + if provider == "groq": + text = call_groq(key, system_instruction, user_prompt, is_json=is_json) + return text, "groq (custom)" + elif provider == "openrouter": + text = call_openrouter(key, system_instruction, user_prompt, is_json=is_json) + return text, "openrouter (custom)" + else: + text = call_gemini(key, system_instruction, user_prompt, is_json=is_json) + return text, "gemini (custom)" + + # 2. Server Shared Default Tier (Multi-Provider Fallback Chain) + gemini_key = get_secret("GEMINI_API_KEY") + groq_key = get_secret("GROQ_API_KEY") + openrouter_key = get_secret("OPENROUTER_API_KEY") + + errors: list[str] = [] + + # Priority 1: Gemini + if gemini_key: + try: + text = call_gemini(gemini_key, system_instruction, user_prompt, is_json=is_json) + return text, "gemini (server)" + except Exception as e: + err_msg = f"Gemini server key failed: {e}" + logger.warning(err_msg) + errors.append(err_msg) + + # Priority 2: Groq (if available on server) + if groq_key: + try: + text = call_groq(groq_key, system_instruction, user_prompt, is_json=is_json) + return text, "groq (server fallback)" + except Exception as e: + err_msg = f"Groq server key failed: {e}" + logger.warning(err_msg) + errors.append(err_msg) + + # Priority 3: OpenRouter (if available on server) + if openrouter_key: + try: + text = call_openrouter(openrouter_key, system_instruction, user_prompt, is_json=is_json) + return text, "openrouter (server fallback)" + except Exception as e: + err_msg = f"OpenRouter server key failed: {e}" + logger.warning(err_msg) + errors.append(err_msg) + + if not (gemini_key or groq_key or openrouter_key): + raise RuntimeError( + "No AI API keys configured on server. Please configure your API key in Settings." + ) + + raise RuntimeError(f"All AI providers failed. Summary of errors: {'; '.join(errors)}") + + +def stream_ai_content( + system_instruction: str, + user_prompt: str, + is_json: bool = False, + custom_provider: str | None = None, + custom_api_key: str | None = None, +): + """ + Streams AI content chunks. Yields tuples of (chunk_text, provider_name). + """ + # 1. Custom BYOK Request + if custom_api_key and custom_api_key.strip(): + key = custom_api_key.strip() + provider = detect_provider(custom_provider, key) + if provider == "gemini": + for chunk in stream_gemini(key, system_instruction, user_prompt, is_json=is_json): + yield chunk, "gemini (custom)" + return + elif provider == "groq": + text = call_groq(key, system_instruction, user_prompt, is_json=is_json) + yield text, "groq (custom)" + return + elif provider == "openrouter": + text = call_openrouter(key, system_instruction, user_prompt, is_json=is_json) + yield text, "openrouter (custom)" + return + else: + for chunk in stream_gemini(key, system_instruction, user_prompt, is_json=is_json): + yield chunk, "gemini (custom)" + return + + # 2. Server Shared Default Tier + gemini_key = get_secret("GEMINI_API_KEY") + if gemini_key: + try: + for chunk in stream_gemini( + gemini_key, system_instruction, user_prompt, is_json=is_json + ): + yield chunk, "gemini (server)" + return + except Exception as e: + logger.warning(f"Gemini server stream failed: {e}") + + # Fallback to standard generation + text, provider = generate_ai_content( + system_instruction=system_instruction, + user_prompt=user_prompt, + is_json=is_json, + custom_provider=custom_provider, + custom_api_key=custom_api_key, + ) + yield text, provider diff --git a/algospaced-ui/.gitignore b/algospaced-ui/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..234f2f1beb6f684af9f47861d3a04652e31f23e4 --- /dev/null +++ b/algospaced-ui/.gitignore @@ -0,0 +1,22 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/algospaced-ui/.node-version b/algospaced-ui/.node-version new file mode 100644 index 0000000000000000000000000000000000000000..a45fd52cc5891570d6299fab38643103c3955474 --- /dev/null +++ b/algospaced-ui/.node-version @@ -0,0 +1 @@ +24 diff --git a/algospaced-ui/.prettierrc b/algospaced-ui/.prettierrc new file mode 100644 index 0000000000000000000000000000000000000000..cf373597e5cd23beab743104242052cdd4ec923b --- /dev/null +++ b/algospaced-ui/.prettierrc @@ -0,0 +1,7 @@ +{ + "semi": false, + "singleQuote": true, + "trailingComma": "es5", + "printWidth": 80, + "tabWidth": 2 +} diff --git a/algospaced-ui/README.md b/algospaced-ui/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7dbf7ebf3b2a3d84ad526bc47810d1d211331b8b --- /dev/null +++ b/algospaced-ui/README.md @@ -0,0 +1,73 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) + +## React Compiler + +The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: + +```js +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + + // Remove tseslint.configs.recommended and replace with this + tseslint.configs.recommendedTypeChecked, + // Alternatively, use this for stricter rules + tseslint.configs.strictTypeChecked, + // Optionally, add this for stylistic rules + tseslint.configs.stylisticTypeChecked, + + // Other configs... + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` + +You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: + +```js +// eslint.config.js +import reactX from 'eslint-plugin-react-x' +import reactDom from 'eslint-plugin-react-dom' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + // Other configs... + // Enable lint rules for React + reactX.configs['recommended-typescript'], + // Enable lint rules for React DOM + reactDom.configs.recommended, + ], + languageOptions: { + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + // other options... + }, + }, +]) +``` diff --git a/algospaced-ui/dist/assets/CreateProblemForm-tTF8KCdI.js b/algospaced-ui/dist/assets/CreateProblemForm-tTF8KCdI.js new file mode 100644 index 0000000000000000000000000000000000000000..1edf0a9412d69d29e466305608a1e2da3256e8f6 --- /dev/null +++ b/algospaced-ui/dist/assets/CreateProblemForm-tTF8KCdI.js @@ -0,0 +1,10 @@ +import{a as e,c as t,i as n,t as r}from"./jsx-runtime-UoOgdb2P.js";var i=t(e(),1),a=r(),o=[`Arrays & Hashing`,`Two Pointers`,`Sliding Window`,`Stack`,`Binary Search`,`Linked List`,`Trees`,`Tries`,`Heap / Priority Queue`,`Backtracking`,`Graphs`,`Advanced Graphs`,`1-D Dynamic Programming`,`2-D Dynamic Programming`,`Greedy`,`Intervals`,`Math & Geometry`,`Bit Manipulation`];function s({onClose:e,onSuccess:t}){let[r,s]=(0,i.useState)(`form`),[c,ee]=(0,i.useState)(``),[l,u]=(0,i.useState)(!1),[d,f]=(0,i.useState)(()=>{try{let e=localStorage.getItem(`algospaced_prefill_draft`);if(e)return JSON.parse(e).name||``}catch{}return``}),[p,m]=(0,i.useState)(``),[h,g]=(0,i.useState)(()=>{try{let e=localStorage.getItem(`algospaced_prefill_draft`);if(e)return JSON.parse(e).pattern||``}catch{}return`Arrays & Hashing`}),[_,v]=(0,i.useState)(`Medium`),[y,b]=(0,i.useState)(`O(N)`),[x,S]=(0,i.useState)(`O(N)`),[C,w]=(0,i.useState)(``),[T,E]=(0,i.useState)([{input:``,output:``,explanation:``}]),[D,O]=(0,i.useState)(``),[k,A]=(0,i.useState)(``),[j,M]=(0,i.useState)(()=>{try{let e=localStorage.getItem(`algospaced_prefill_draft`);if(e)return JSON.parse(e).code||``}catch{}return``}),[N,P]=(0,i.useState)(!0),[F,I]=(0,i.useState)(``),[L,R]=(0,i.useState)(``),[z,B]=(0,i.useState)(!1),[V,H]=(0,i.useState)(!1),[U,W]=(0,i.useState)(!1),[G,K]=(0,i.useState)(!1);i.useEffect(()=>{localStorage.removeItem(`algospaced_prefill_draft`)},[]);let q=async()=>{let{data:{session:e}}=await n.auth.getSession(),t=e?e.access_token:`sandbox`,r=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``,i=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`,a={"Content-Type":`application/json`,Authorization:`Bearer ${t}`};return i&&i!=="default"&&r&&r.trim()&&(a[`x-custom-api-key`]=r.trim(),a[`x-gemini-api-key`]=r.trim(),a[`x-ai-provider`]=i),a},J=async()=>{if(c.trim()){u(!0),I(``);try{let e=await q(),t=await fetch(`/api/explorer/problems/fetch-leetcode`,{method:`POST`,headers:e,body:JSON.stringify({query:c.trim()})});if(t.ok){let e=await t.json();e.problem_number!==void 0&&e.problem_number!==null&&m(e.problem_number),e.title&&f(e.title),e.difficulty&&v(e.difficulty),e.pattern&&g(e.pattern),e.optimal_time&&b(e.optimal_time),e.optimal_space&&S(e.optimal_space),e.description&&w(e.description),e.how_to_solve&&A(e.how_to_solve),e.starter_code&&!j.trim()&&M(e.starter_code),Array.isArray(e.examples)&&e.examples.length>0&&E(e.examples),Array.isArray(e.constraints)?O(e.constraints.join(` +`)):typeof e.constraints==`string`&&O(e.constraints)}else{let e=await t.json();I(e.detail||`Failed to fetch LeetCode problem data.`)}}catch{I(`Fetch request failed due to connection error.`)}finally{u(!1)}}},Y=async()=>{if(d.trim()||j.trim()){K(!0),I(``);try{let e=await q(),t=await fetch(`/api/explorer/problems/prefill`,{method:`POST`,headers:e,body:JSON.stringify({name:d,code:j})});if(t.ok){let e=await t.json();e.problem_number!==void 0&&e.problem_number!==null&&m(e.problem_number),e.title&&!d&&f(e.title),e.pattern&&g(e.pattern),e.difficulty&&v(e.difficulty),e.optimal_time&&b(e.optimal_time),e.optimal_space&&S(e.optimal_space),e.description&&w(e.description),e.reference_code&&!j.trim()&&M(e.reference_code)}else{let e=await t.json();I(e.detail||`Prefill failed.`)}}catch{I(`Prefill request failed due to connection error.`)}finally{K(!1)}}},X=async()=>{if(!d.trim()&&!j.trim()){I(`Please enter a problem name or code first.`);return}H(!0),I(``);try{let e=await q(),t=await fetch(`/api/explorer/problems/assist-field`,{method:`POST`,headers:e,body:JSON.stringify({field:`intuition`,title:d,code:j,description:C})});if(t.ok){let e=await t.json();e.how_to_solve&&A(e.how_to_solve)}else{let e=await t.json();I(e.detail||`Failed to generate intuition.`)}}catch{I(`Intuition generator failed due to connection error.`)}finally{H(!1)}},Z=async()=>{if(!j.trim()){I(`Please enter some Python code to format.`);return}W(!0),I(``);try{let e=await q(),t=await fetch(`/api/explorer/problems/assist-field`,{method:`POST`,headers:e,body:JSON.stringify({field:`comments`,title:d,code:j})});if(t.ok){let e=await t.json();e.formatted_code&&M(e.formatted_code)}else{let e=await t.json();I(e.detail||`Failed to format code.`)}}catch{I(`Code formatter failed due to connection error.`)}finally{W(!1)}},Q=async n=>{if(n.preventDefault(),!d.trim()){I(`Problem name cannot be empty`);return}B(!0),I(``),R(``);try{let n=await q(),r=D.split(` +`).map(e=>e.trim()).filter(Boolean),i=await fetch(`/api/explorer/problems/create`,{method:`POST`,headers:n,body:JSON.stringify({name:d.trim(),pattern:h.trim()||`General`,difficulty:_,reference_code:j,description:C,problem_number:p===``?null:Number(p),optimal_time:y,optimal_space:x,examples:T.filter(e=>e.input.trim()||e.output.trim()),constraints:r,how_to_solve:k,sync_to_gdoc:N})}),a=await i.json();i.ok&&a.success?(R(`Problem saved and synced successfully!`),setTimeout(()=>{t(),e()},1e3)):I(a.detail||`Failed to create problem.`)}catch{I(`Connection timed out.`)}finally{B(!1)}},te=()=>{E([...T,{input:``,output:``,explanation:``}])},ne=e=>{T.length<=1||E(T.filter((t,n)=>n!==e))},$=(e,t,n)=>{let r=[...T];r[e]={...r[e],[t]:n},E(r)};return(0,a.jsxs)(`form`,{onSubmit:Q,className:`flex flex-col h-full bg-[#fdf8e1] text-ink-black font-sans overflow-hidden`,children:[(0,a.jsxs)(`div`,{className:`bg-[#f0e6c8] p-2.5 border-b-2 border-ink-black flex flex-col gap-2 shrink-0`,children:[(0,a.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`font-arcade text-xs text-primary-purple`,children:`✦`}),(0,a.jsx)(`h2`,{className:`text-xs font-bold font-arcade tracking-tight uppercase`,children:`Problem & Note Studio`})]}),(0,a.jsxs)(`div`,{className:`flex border-2 border-ink-black bg-white rounded overflow-hidden shadow-[1px_1px_0px_#1E293B]`,children:[(0,a.jsx)(`button`,{type:`button`,onClick:()=>s(`form`),className:`px-3 py-1 text-[10px] font-bold uppercase transition-colors ${r===`form`?`bg-primary-purple text-white`:`hover:bg-slate-100`}`,children:`✏️ Editor`}),(0,a.jsx)(`button`,{type:`button`,onClick:()=>s(`preview`),className:`px-3 py-1 text-[10px] font-bold uppercase transition-colors ${r===`preview`?`bg-primary-purple text-white`:`hover:bg-slate-100`}`,children:`📄 Doc Preview`})]})]}),(0,a.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,a.jsx)(`input`,{type:`text`,value:c,onChange:e=>ee(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),J())},placeholder:`Paste LeetCode URL (e.g. https://leetcode.com/problems/two-sum/) or Title...`,className:`flex-1 bg-white border-2 border-ink-black px-2 py-1 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-medium`}),(0,a.jsxs)(`button`,{type:`button`,onClick:J,disabled:l||!c.trim(),className:`bg-[#ffe24c] hover:bg-yellow-300 disabled:opacity-50 text-ink-black font-arcade text-[9px] font-bold px-2.5 py-1.5 border-2 border-ink-black shadow-[1px_1px_0px_#1E293B] active:translate-y-0.5 cursor-pointer flex items-center gap-1 shrink-0`,children:[(0,a.jsx)(`span`,{children:`⚡`}),` `,l?`FETCHING...`:`FETCH LEETCODE`]})]})]}),F&&(0,a.jsxs)(`div`,{className:`mx-3 mt-2 p-2 border-2 border-red-500 bg-red-50 text-red-800 text-[11px] font-mono leading-relaxed shrink-0`,children:[`⚠️ `,F]}),L&&(0,a.jsxs)(`div`,{className:`mx-3 mt-2 p-2 border-2 border-green-500 bg-green-50 text-green-800 text-[11px] font-mono leading-relaxed shrink-0`,children:[`✅ `,L]}),(0,a.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar p-3 space-y-3`,children:r===`form`?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`div`,{className:`grid grid-cols-12 gap-2`,children:[(0,a.jsxs)(`div`,{className:`col-span-3 flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Problem #:`}),(0,a.jsx)(`input`,{type:`number`,value:p,onChange:e=>m(e.target.value===``?``:Number(e.target.value)),placeholder:`e.g. 1`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-bold`})]}),(0,a.jsxs)(`div`,{className:`col-span-6 flex flex-col gap-1`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Title:`}),(0,a.jsxs)(`button`,{type:`button`,onClick:Y,disabled:G||!d.trim()&&!j.trim(),className:`text-[8px] font-arcade font-bold px-1.5 py-0.5 border border-ink-black bg-[#ffe24c] hover:bg-yellow-300 disabled:opacity-50 flex items-center gap-1 cursor-pointer`,children:[(0,a.jsx)(`span`,{children:`✦`}),` `,G?`...`:`AUTO-FILL`]})]}),(0,a.jsx)(`input`,{type:`text`,required:!0,value:d,onChange:e=>f(e.target.value),placeholder:`e.g. Two Sum`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-bold`})]}),(0,a.jsxs)(`div`,{className:`col-span-3 flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Difficulty:`}),(0,a.jsxs)(`select`,{value:_,onChange:e=>v(e.target.value),className:`border-2 border-ink-black p-1.5 text-xs font-bold outline-none cursor-pointer ${_===`Easy`?`bg-emerald-100 text-emerald-900`:_===`Medium`?`bg-amber-100 text-amber-900`:`bg-rose-100 text-rose-900`}`,children:[(0,a.jsx)(`option`,{value:`Easy`,children:`Easy`}),(0,a.jsx)(`option`,{value:`Medium`,children:`Medium`}),(0,a.jsx)(`option`,{value:`Hard`,children:`Hard`})]})]})]}),(0,a.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Pattern / Topic:`}),(0,a.jsx)(`input`,{type:`text`,list:`pattern-suggestions`,value:h,onChange:e=>g(e.target.value),placeholder:`e.g. Arrays & Hashing`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-medium`}),(0,a.jsx)(`datalist`,{id:`pattern-suggestions`,children:o.map(e=>(0,a.jsx)(`option`,{value:e},e))})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Time Complexity:`}),(0,a.jsx)(`input`,{type:`text`,value:y,onChange:e=>b(e.target.value),placeholder:`e.g. O(N)`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-semibold`})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Space Complexity:`}),(0,a.jsx)(`input`,{type:`text`,value:x,onChange:e=>S(e.target.value),placeholder:`e.g. O(1)`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-semibold`})]})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Problem Description:`}),(0,a.jsx)(`textarea`,{value:C,onChange:e=>w(e.target.value),placeholder:`Given an array of integers nums and an integer target...`,className:`bg-white border-2 border-ink-black p-2 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-sans h-20 resize-y leading-relaxed`})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1.5 bg-[#f6edd2] p-2.5 border-2 border-ink-black rounded`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,a.jsxs)(`label`,{className:`text-[10px] font-bold text-slate-700 uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`🧪`}),` Examples (`,T.length,`)`]}),(0,a.jsx)(`button`,{type:`button`,onClick:te,className:`text-[9px] font-bold px-2 py-0.5 border border-ink-black bg-white hover:bg-slate-100 cursor-pointer shadow-[1px_1px_0px_#1E293B]`,children:`+ Add Example`})]}),T.map((e,t)=>(0,a.jsxs)(`div`,{className:`bg-white border border-ink-black p-2 space-y-1.5 rounded relative text-xs`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,a.jsxs)(`span`,{className:`font-bold text-[10px] text-slate-500`,children:[`Example `,t+1,`:`]}),T.length>1&&(0,a.jsx)(`button`,{type:`button`,onClick:()=>ne(t),className:`text-[10px] text-red-600 hover:text-red-800 font-bold`,children:`✕`})]}),(0,a.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,a.jsx)(`input`,{type:`text`,value:e.input,onChange:e=>$(t,`input`,e.target.value),placeholder:`Input: nums = [2,7,11,15], target = 9`,className:`bg-slate-50 border border-slate-300 p-1 text-[11px] font-mono outline-none`}),(0,a.jsx)(`input`,{type:`text`,value:e.output,onChange:e=>$(t,`output`,e.target.value),placeholder:`Output: [0,1]`,className:`bg-slate-50 border border-slate-300 p-1 text-[11px] font-mono outline-none`})]}),(0,a.jsx)(`input`,{type:`text`,value:e.explanation||``,onChange:e=>$(t,`explanation`,e.target.value),placeholder:`Explanation (Optional): Because nums[0] + nums[1] == 9, we return [0, 1].`,className:`bg-slate-50 border border-slate-300 p-1 text-[11px] outline-none w-full`})]},t))]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Constraints (1 per line):`}),(0,a.jsx)(`textarea`,{value:D,onChange:e=>O(e.target.value),placeholder:`2 <= nums.length <= 10^4 +-10^9 <= nums[i] <= 10^9 +Only one valid answer exists.`,className:`bg-white border-2 border-ink-black p-2 text-xs font-mono outline-none focus:ring-1 focus:ring-primary-purple h-16 resize-y leading-snug`})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,a.jsxs)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`💡`}),` "How to solve?" Intuition:`]}),(0,a.jsxs)(`button`,{type:`button`,onClick:X,disabled:V,className:`text-[9px] font-arcade font-bold px-2 py-0.5 border-2 border-ink-black bg-[#ffe24c] hover:bg-yellow-300 disabled:opacity-50 flex items-center gap-1 shadow-[1px_1px_0px_#1E293B] cursor-pointer`,children:[(0,a.jsx)(`span`,{children:`✦`}),` `,V?`GENERATING...`:`AI INTUITION`]})]}),(0,a.jsx)(`textarea`,{value:k,onChange:e=>A(e.target.value),placeholder:`Explain the mental model, dummy nodes, invariants, or two-pointer logic...`,className:`bg-white border-2 border-ink-black p-2 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-sans h-24 resize-y leading-relaxed`})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,a.jsxs)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`🐍`}),` Solution Code (Python):`]}),(0,a.jsxs)(`button`,{type:`button`,onClick:Z,disabled:U||!j.trim(),className:`text-[9px] font-arcade font-bold px-2 py-0.5 border-2 border-ink-black bg-[#a7f3d0] hover:bg-emerald-300 disabled:opacity-50 flex items-center gap-1 shadow-[1px_1px_0px_#1E293B] cursor-pointer text-emerald-950`,children:[(0,a.jsx)(`span`,{children:`✨`}),` `,U?`FORMATTING...`:`ADD EMOJI COMMENTS`]})]}),(0,a.jsx)(`textarea`,{value:j,onChange:e=>M(e.target.value),placeholder:`def twoSum(nums: list[int], target: int) -> list[int]: + # 1. 🗺️ Initialize lookup map + seen = {} + ... + return []`,className:`bg-slate-900 text-[#4ADE80] font-mono p-2.5 border-2 border-ink-black rounded outline-none h-44 text-xs leading-relaxed resize-y w-full`})]})]}):(0,a.jsxs)(`div`,{className:`bg-white border-2 border-ink-black p-6 rounded shadow-sm font-sans space-y-4 text-slate-800`,children:[(0,a.jsx)(`div`,{className:`border-b pb-2`,children:(0,a.jsx)(`span`,{className:`text-[10px] font-mono uppercase bg-purple-100 text-purple-800 px-2 py-0.5 rounded font-bold`,children:`Google Doc Preview (Exact formatting preview)`})}),(0,a.jsxs)(`h1`,{className:`text-xl font-bold text-slate-900`,children:[p?`${p}. `:``,d||`Problem Title`]}),(0,a.jsx)(`div`,{children:(0,a.jsx)(`span`,{className:`text-xs font-bold px-2.5 py-0.5 rounded ${_===`Easy`?`bg-emerald-100 text-[#137c36]`:_===`Medium`?`bg-amber-100 text-[#c06100]`:`bg-rose-100 text-[#c5221f]`}`,children:_})}),C&&(0,a.jsx)(`div`,{className:`text-xs text-slate-700 leading-relaxed whitespace-pre-wrap`,children:C}),T.some(e=>e.input.trim()||e.output.trim())&&(0,a.jsx)(`div`,{className:`space-y-3 pt-2`,children:T.map((e,t)=>(0,a.jsxs)(`div`,{className:`text-xs space-y-1`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-slate-800`,children:[`Example `,t+1,`:`]}),e.input&&(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`text-slate-600`,children:`Input: `}),(0,a.jsx)(`span`,{className:`bg-[#d9d9d9] font-mono px-1.5 py-0.5 rounded text-[11px]`,children:e.input})]}),e.output&&(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`text-slate-600`,children:`Output: `}),(0,a.jsx)(`span`,{className:`bg-[#d9d9d9] font-mono px-1.5 py-0.5 rounded text-[11px]`,children:e.output})]}),e.explanation&&(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`text-slate-600`,children:`Explanation: `}),(0,a.jsx)(`span`,{className:`bg-[#d9d9d9] font-mono px-1.5 py-0.5 rounded text-[11px]`,children:e.explanation})]})]},t))}),D&&(0,a.jsxs)(`div`,{className:`space-y-1.5 pt-2`,children:[(0,a.jsx)(`div`,{className:`font-bold text-xs text-slate-800`,children:`Constraints:`}),(0,a.jsx)(`ul`,{className:`list-disc pl-5 text-xs space-y-1`,children:D.split(` +`).filter(Boolean).map((e,t)=>(0,a.jsx)(`li`,{children:(0,a.jsx)(`span`,{className:`bg-[#d9d9d9] font-mono px-1.5 py-0.5 rounded text-[11px]`,children:e.replace(/^[•\-\*]\s*/,``)})},t))})]}),(0,a.jsxs)(`div`,{className:`pt-2`,children:[(0,a.jsx)(`div`,{className:`font-bold text-xs text-slate-800`,children:`Method:`}),(0,a.jsx)(`div`,{className:`text-xs text-slate-600`,children:`Pattern:`}),(0,a.jsx)(`h3`,{className:`text-base font-bold text-primary-purple mt-0.5`,children:h||`Standard`})]}),(0,a.jsxs)(`div`,{className:`space-y-1 text-xs`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`font-bold text-slate-800`,children:`Time Complexity: `}),(0,a.jsx)(`span`,{className:`font-mono text-slate-900`,children:y})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`font-bold text-slate-800`,children:`Space Complexity: `}),(0,a.jsx)(`span`,{className:`font-mono text-slate-900`,children:x})]})]}),k&&(0,a.jsxs)(`div`,{className:`space-y-1.5 pt-2`,children:[(0,a.jsx)(`h3`,{className:`text-sm font-bold text-slate-900`,children:`How to solve?`}),(0,a.jsx)(`div`,{className:`text-xs text-slate-700 leading-relaxed whitespace-pre-wrap`,children:k})]}),j&&(0,a.jsx)(`div`,{className:`pt-2`,children:(0,a.jsx)(`div`,{className:`bg-[#f8fafc] border border-slate-300 p-3 rounded font-mono text-[11.5px] leading-relaxed text-slate-900 overflow-x-auto whitespace-pre`,children:j})})]})}),(0,a.jsxs)(`div`,{className:`p-3 bg-[#f0e6c8] border-t-2 border-ink-black flex flex-wrap items-center justify-between gap-2 shrink-0`,children:[(0,a.jsxs)(`label`,{className:`flex items-center gap-2 text-xs font-bold text-slate-700 cursor-pointer select-none`,children:[(0,a.jsx)(`input`,{type:`checkbox`,checked:N,onChange:e=>P(e.target.checked),className:`w-4 h-4 accent-primary-purple cursor-pointer`}),(0,a.jsx)(`span`,{children:`Format & Sync to Google Doc`})]}),(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,a.jsx)(`button`,{type:`button`,onClick:e,className:`px-3 py-1.5 bg-white hover:bg-slate-50 border-2 border-ink-black text-xs font-bold cursor-pointer`,children:`CANCEL`}),(0,a.jsxs)(`button`,{type:`submit`,disabled:z,className:`px-4 py-1.5 bg-primary-purple hover:bg-purple-600 text-white font-arcade text-[10px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{children:`💾`}),` `,z?`SAVING...`:`SAVE SOLUTION`]})]})]})]})}export{s as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/FileExplorer-BA3lbKpy.js b/algospaced-ui/dist/assets/FileExplorer-BA3lbKpy.js new file mode 100644 index 0000000000000000000000000000000000000000..0628d56656e11aa6a07e9351677c6a11c2331ed2 --- /dev/null +++ b/algospaced-ui/dist/assets/FileExplorer-BA3lbKpy.js @@ -0,0 +1,3 @@ +import{a as e,c as t,i as n,t as r}from"./jsx-runtime-UoOgdb2P.js";var i=t(e(),1),a=r(),o=[{name:`Retro Arcade Grid.img`,url:`https://lh3.googleusercontent.com/aida-public/AB6AXuAMJHVhhK8_G7F8sbhn8F7w4AZWXb1O_-HLKvrZ_fJlbUVMcVuxxEOO_LlOh8qIwtAn2KvzvCwzmtNLLEZ5uYkCEsx8ZWXJR609qgSMRSX8LBBeskk4VzVXnyzsgIKCedeV2PvGxJlUNnledcWKCXqG9egQi8dgTcA7C2z82QyM73KZ4s7ZRzZHNupuQt1ocfcMl9E_x1PWFRridl751LIpyGZgednS5CmVw2rZvFc_tbp2QTxgVHJ_59myEBmy6aajbO06AhkKmCvI`,desc:`Default AlgoSpaced purple grid and pixel theme background.`},{name:`Classic Board Logo.img`,url:`https://lh3.googleusercontent.com/aida-public/AB6AXuD2tUGA2d7QiNyajDAWYK183zhNTgtAZpOXK3E9wRvHGs-t6ykWt9uPScYe_fziWzQI0pREcY_ThI341WvGMusyYmnAkagfuwx6wubIs1ES68DO8CCNAlcHcb2zOUU4MJeYuhWDy1uYRqyGYjIaDUqfgNWk2vm4WzwRqoorn2dxtZ6QdJhEKbXjG8fG9chkkvr68qJf0fLUL6bIqBXZg2FJ30S7zS3oZ4IZsug-wLyRYuJ4Gu_86snNUo1whNrBdZm5OMREfc9sLbwJ`,desc:`System info and arcade machine diagram wallpaper.`},{name:`Terminal Console Icon.img`,url:`https://lh3.googleusercontent.com/aida-public/AB6AXuA2AvcQ2oKWP8AJ8yR5nF82LLDEH1FKySUK-npnqEjvJ6Cs9xp8joCwH7x43oTCAC5xhO2rQdYzka3B6u72FNbdxMnsv3WJLye3bKochu8AnnRlS3szfYSaj724sYsiZo4n8G-oWqvl7C0rOGaDaU2nRH1xXmW2PBi6L2NryTsUaTCVZQKTKBBNNEOig5kh7B52e-iIuj2PTzaSjF9ebp6gMuCnBtJT8Sxo5Qsmvfm-t2U5r_qQpRiYj--Ut41T7NTh-tHgs4S4kBvz`,desc:`Dark retro CRT terminal screen layout.`},{name:`Synthwave Sunset Grid.img`,url:`https://images.unsplash.com/photo-1550745165-9bc0b252726f?q=80&w=1000&auto=format&fit=crop`,desc:`Glowing neon grids and vector mountains styling.`},{name:`Matrix Code Rain.img`,url:`https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?q=80&w=1000&auto=format&fit=crop`,desc:`Falling green digital characters rain.`}];function s({onSetWallpaper:e,activeWallpaperUrl:t,onOpenCreateProblem:r,onOpenQueue:s,onOpenJourney:c,refreshTrigger:l}){let[u,d]=(0,i.useState)([`C:`]),[f,p]=(0,i.useState)([]),[m,h]=(0,i.useState)(!0),[g,_]=(0,i.useState)(null),v=i.useMemo(()=>{let e=[...o],t=localStorage.getItem(`customWallpaperUrl`),n=localStorage.getItem(`customWallpaperName`)||`Custom Wallpaper.img`;return t&&(e.some(e=>e.url===t)||e.push({name:n,url:t,desc:`User uploaded custom background wallpaper.`})),e},[t]),[y,ee]=(0,i.useState)(``),[b,te]=(0,i.useState)(`All`),[x,S]=(0,i.useState)(`All`),[C,w]=(0,i.useState)(!1),[ne,T]=(0,i.useState)(!1),[E,D]=(0,i.useState)(!1),[O,k]=(0,i.useState)(``),[A,j]=(0,i.useState)(``),re=async e=>{let t=e.target.files;if(!t||t.length===0)return;let r=t[0];e.target.value=``,D(!0),k(``),j(``);try{let{data:{session:e}}=await n.auth.getSession(),t=e?e.access_token:`sandbox`,i=new FormData;i.append(`file`,r);let a=await fetch(`/api/explorer/import`,{method:`POST`,headers:{Authorization:`Bearer ${t}`},body:i}),o=await a.json();a.ok?(j(o.message||`Problems imported successfully!`),setTimeout(()=>{q()},500),setTimeout(()=>{T(!1),j(``)},2e3)):k(o.detail||`Import failed. Verify the file format.`)}catch{k(`Import failed due to a network error.`)}finally{D(!1)}},[M,N]=(0,i.useState)(null),[P,F]=(0,i.useState)(`description`),[I,L]=(0,i.useState)(!1),[R,z]=(0,i.useState)(``),[B,V]=(0,i.useState)(``),[H,U]=(0,i.useState)(!1),[W,G]=(0,i.useState)(!1),[ie,K]=(0,i.useState)(!1),q=async()=>{h(!0);try{let{data:{session:e}}=await n.auth.getSession();if(!e)return;let t=await fetch(`/api/explorer/problems`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();p(e)}}catch(e){console.error(`Failed to fetch explorer files:`,e)}finally{h(!1)}};(0,i.useEffect)(()=>{q()},[l]);let J=e=>{d([`C:`,e]),_(null)},ae=()=>{u.length>1&&(d([`C:`]),_(null))},oe=async()=>{try{let{data:{session:e}}=await n.auth.getSession();if(!e)return;let t=await fetch(`/api/explorer/export`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.blob(),n=window.URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=`algospaced_solutions.zip`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}}catch(e){console.error(`Failed to download solutions ZIP:`,e)}},se=async()=>{if(M){U(!0),G(!1);try{let{data:{session:e}}=await n.auth.getSession();if(!e)return;if((await fetch(`/api/explorer/problems/${M.id}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({name:M.name,pattern:M.pattern,difficulty:M.difficulty,reference_code:R,description:B})})).ok){G(!0),L(!1);let e=f.map(e=>e.id===M.id?{...e,reference_code:R,description:B}:e);p(e),N({...M,reference_code:R,description:B}),setTimeout(()=>G(!1),2e3)}}catch(e){console.error(`Failed to update solution code:`,e)}finally{U(!1)}}},ce=e=>{e.preventDefault(),w(!0)},le=()=>{w(!1)},ue=async e=>{e.preventDefault(),w(!1);let t=e.dataTransfer.files;if(t.length>0){let e=t[0];if(e.name.endsWith(`.py`))try{let t=await e.text(),n=e.name.replace(`.py`,``).replace(/_/g,` `).replace(/-/g,` `),i=`General`,a=`Medium`,o=t.match(/#\s*Pattern:\s*(.+)/i);o&&(i=o[1].trim());let s=t.match(/#\s*Difficulty:\s*(.+)/i);if(s){let e=s[1].trim();[`Easy`,`Medium`,`Hard`].includes(e)&&(a=e)}let c=t.split(` +`),l=[];for(let e of c){let t=e.trim();if(t.startsWith(`#`)){if(t.match(/#\s*(Pattern|Difficulty|Problem|Description):/i))continue;l.push(t.replace(/^#\s*/,``))}else if(t!==``)break}let u=l.join(` +`).trim();localStorage.setItem(`algospaced_prefill_draft`,JSON.stringify({name:n,pattern:i,difficulty:a,code:t,description:u})),r&&r()}catch(e){console.error(`Failed to parse uploaded script:`,e)}}},de=e=>{navigator.clipboard.writeText(e),K(!0),setTimeout(()=>K(!1),2e3)},Y=u.length>1?u[1]:`root`,X=f.length,fe=f.filter(e=>e.reference_code&&e.reference_code.trim()).length,Z=X>0?Math.round(fe/X*100):0,Q={1:0,2:0,3:0,4:0,5:0};f.forEach(e=>{if(e.box_level!==null&&e.box_level!==void 0){let t=e.box_level;t>=1&&t<=5&&Q[t]++}});let pe=Array.from(new Set(f.map(e=>e.pattern).filter(Boolean))),$=f.filter(e=>{let t=e.name.toLowerCase().includes(y.toLowerCase()),n=b===`All`||e.difficulty===b,r=x===`All`||e.pattern===x;return t&&n&&r});return(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm font-sans select-none`,children:[(0,a.jsxs)(`div`,{className:`bg-slate-200 border-b-[3px] border-ink-black p-2 flex items-center justify-between shrink-0`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-2 flex-1`,children:[(0,a.jsx)(`button`,{onClick:ae,disabled:u.length===1,className:`w-7 h-7 bg-white border-2 border-ink-black flex items-center justify-center hover:bg-slate-100 disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer active:translate-y-0.5`,title:`Up One Folder`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[16px] font-bold`,children:`arrow_upward`})}),(0,a.jsx)(`div`,{className:`bg-white border-2 border-ink-black px-3 py-1 font-mono text-[10px] flex-1 max-w-[280px] truncate`,children:u.join(`\\`)})]}),(0,a.jsxs)(`div`,{className:`flex gap-3 text-[10px] font-bold pr-2 font-mono items-center`,children:[Y===`Database_Codes`&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`button`,{onClick:()=>r&&r(),className:`text-blue-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`add_box`}),`NEW FILE`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`}),(0,a.jsxs)(`button`,{onClick:()=>T(!0),className:`text-indigo-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`upload`}),`IMPORT (.CSV / .DB)`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`}),(0,a.jsxs)(`button`,{onClick:oe,className:`text-purple-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`downloadzip`}),`BACKUP (.ZIP)`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`})]}),(0,a.jsx)(`span`,{className:`text-slate-500`,children:Y===`root`?`2 Folder(s)`:Y===`Database_Codes`?`${$.length} of ${f.length} item(s)`:`${v.length} image(s)`})]})]}),(0,a.jsxs)(`div`,{className:`flex-1 flex overflow-hidden`,children:[(0,a.jsxs)(`aside`,{className:`w-1/3 border-r-[3px] border-ink-black bg-[#fdf8e1] p-3 overflow-y-auto custom-scrollbar flex flex-col gap-4 shrink-0`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-500 block uppercase mb-1.5`,children:`Folders`}),(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsxs)(`button`,{onClick:()=>d([`C:`]),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${u.length===1?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[#855400] text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`desktop_windows`}),(0,a.jsx)(`span`,{children:`C: (Root)`})]}),(0,a.jsxs)(`div`,{className:`pl-4 space-y-1`,children:[(0,a.jsxs)(`button`,{onClick:()=>J(`Database_Codes`),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${Y===`Database_Codes`?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-yellow-600 text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`truncate`,children:`Database_Codes`})]}),(0,a.jsxs)(`button`,{onClick:()=>J(`Wallpapers`),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${Y===`Wallpapers`?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-yellow-600 text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`truncate`,children:`Wallpapers`})]})]})]})]}),(0,a.jsxs)(`div`,{className:`border-t-2 border-dashed border-slate-300 pt-3`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-500 block uppercase mb-2`,children:`System Statistics`}),(0,a.jsxs)(`div`,{className:`space-y-3 font-sans text-[11px] font-bold text-slate-700`,children:[(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between text-[10px]`,children:[(0,a.jsx)(`span`,{children:`CODE COMPLETION:`}),(0,a.jsxs)(`span`,{className:`font-mono text-emerald-600`,children:[Z,`%`]})]}),(0,a.jsx)(`div`,{className:`w-full h-4 bg-white border-2 border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{style:{width:`${Z}%`},className:`h-full bg-emerald-500 border-r-2 border-ink-black transition-all duration-500`})})]}),(0,a.jsxs)(`div`,{className:`space-y-1.5 mt-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] uppercase text-slate-500 block`,children:`Leitner Distribution:`}),[1,2,3,4,5].map(e=>{let t=Q[e],n=Math.max(...Object.values(Q),1),r=Math.max(8,Math.round(t/n*100));return(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,a.jsxs)(`span`,{className:`w-9 font-mono text-[10px] text-slate-400`,children:[`Box `,e,`:`]}),(0,a.jsx)(`div`,{className:`flex-1 h-3 bg-white border border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{style:{width:`${r}%`},className:`h-full bg-[#0ea5e9] border-r border-ink-black transition-all`})}),(0,a.jsx)(`span`,{className:`w-4 text-right font-mono text-[10px] text-slate-600`,children:t})]},e)})]})]})]})]}),(0,a.jsxs)(`main`,{onDragOver:ce,onDragLeave:le,onDrop:ue,className:`flex-1 bg-white p-4 overflow-y-auto custom-scrollbar flex flex-col relative transition-all ${C?`bg-blue-50 border-4 border-dashed border-blue-500 m-2`:``}`,children:[C&&(0,a.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-blue-800 bg-white/80 pointer-events-none select-none z-[10] gap-2 font-sans font-bold`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl animate-bounce`,children:`upload_file`}),(0,a.jsx)(`div`,{className:`text-sm`,children:`DROP SOLUTIONS PYTHON SCRIPT (.PY) HERE`}),(0,a.jsx)(`p`,{className:`text-[10px] text-slate-400`,children:`Will load and parse file metadata for import`})]}),m?(0,a.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center font-arcade text-[8px] animate-pulse`,children:`READING SYSTEM DISK...`}):(0,a.jsxs)(a.Fragment,{children:[Y===`Database_Codes`&&(0,a.jsxs)(`div`,{className:`mb-4 bg-slate-50 border-[2px] border-ink-black p-2 flex flex-col gap-2 shrink-0 select-none`,children:[(0,a.jsx)(`div`,{className:`flex gap-2`,children:(0,a.jsxs)(`div`,{className:`flex-1 bg-white border border-slate-300 rounded px-2 py-1 flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-slate-400 text-sm`,children:`search`}),(0,a.jsx)(`input`,{type:`text`,value:y,onChange:e=>ee(e.target.value),className:`w-full bg-transparent outline-none border-none p-0 text-[11px] focus:ring-0 font-sans`,placeholder:`Search codes by name...`})]})}),(0,a.jsxs)(`div`,{className:`flex gap-3 text-[10px] font-bold text-slate-600`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`Diff:`}),(0,a.jsxs)(`select`,{value:b,onChange:e=>te(e.target.value),className:`bg-white border border-slate-300 p-0.5 text-[9px] rounded font-sans cursor-pointer focus:ring-1 outline-none`,children:[(0,a.jsx)(`option`,{value:`All`,children:`All`}),(0,a.jsx)(`option`,{value:`Easy`,children:`Easy`}),(0,a.jsx)(`option`,{value:`Medium`,children:`Medium`}),(0,a.jsx)(`option`,{value:`Hard`,children:`Hard`})]})]}),(0,a.jsxs)(`div`,{className:`flex items-center gap-1 flex-1`,children:[(0,a.jsx)(`span`,{children:`Pattern:`}),(0,a.jsxs)(`select`,{value:x,onChange:e=>S(e.target.value),className:`bg-white border border-slate-300 p-0.5 text-[9px] rounded font-sans cursor-pointer max-w-[120px] focus:ring-1 outline-none truncate`,children:[(0,a.jsx)(`option`,{value:`All`,children:`All`}),pe.map(e=>(0,a.jsx)(`option`,{value:e,children:e},e))]})]})]})]}),Y===`root`&&(0,a.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4`,children:[(0,a.jsxs)(`div`,{onDoubleClick:()=>s&&s(),onClick:()=>_(`queue_app`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`queue_app`?`bg-green-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-grass-green border-2 border-ink-black flex items-center justify-center shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-ink-black`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`})}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Daily_Queue.exe`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Spaced Repetition Review`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>c&&c(),onClick:()=>_(`journey_app`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`journey_app`?`bg-blue-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-[#0ea5e9] border-2 border-ink-black flex items-center justify-center shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-white`,style:{fontVariationSettings:`'FILL' 1`},children:`route`})}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Journey_Path.exe`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`NeetCode 150 Road`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>J(`Database_Codes`),onClick:()=>_(`codes`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`codes`?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl text-yellow-500`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Database_Codes`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Synced solution files`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>J(`Wallpapers`),onClick:()=>_(`wallpapers`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`wallpapers`?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl text-yellow-500`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Wallpapers`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Desktop wallpaper images`})]})]}),Y===`Database_Codes`&&($.length===0?(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center text-slate-400 p-6 italic select-none`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl mb-1`,children:`drafts`}),`No matching files found. Drag and drop a .py script to upload/create!`]}):(0,a.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:$.map(e=>{let t=`${e.name.replace(/\s+/g,`_`)}.py`,n=g===e.id;return(0,a.jsxs)(`div`,{onClick:()=>_(e.id),onDoubleClick:()=>{N(e),z(e.reference_code||``),V(e.description||``),F(`description`),L(!1)},className:`flex flex-col items-center p-2 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none text-center ${n?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-emerald-600`,children:`article`}),(0,a.jsx)(`span`,{className:`font-bold text-[10px] truncate w-full mt-1.5 leading-tight`,children:t}),(0,a.jsx)(`span`,{className:`text-[8px] text-slate-400 font-bold uppercase mt-0.5`,children:e.difficulty})]},e.id)})})),Y===`Wallpapers`&&(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-3 select-none`,children:v.map(n=>{let r=g===n.name,i=t===n.url;return(0,a.jsxs)(`div`,{onClick:()=>_(n.name),className:`border-[3px] p-2 flex flex-col cursor-pointer bg-slate-50 relative hover:bg-slate-100 ${r?`border-ink-black bg-yellow-50 shadow-[2px_2px_0_0_#1E293B]`:`border-slate-300`}`,children:[(0,a.jsxs)(`div`,{className:`aspect-video w-full border border-slate-300 overflow-hidden bg-black shrink-0 relative`,children:[(0,a.jsx)(`img`,{src:n.url,alt:n.name,className:`w-full h-full object-cover select-none`}),i&&(0,a.jsx)(`div`,{className:`absolute top-1 right-1 bg-green-500 text-white rounded-full w-5 h-5 flex items-center justify-center border border-white`,title:`Active Wallpaper`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-extrabold`,children:`check`})})]}),(0,a.jsx)(`span`,{className:`font-bold text-[10px] mt-1.5 truncate`,children:n.name}),(0,a.jsx)(`p`,{className:`text-[8px] text-slate-400 font-sans leading-tight mt-0.5 line-clamp-2`,children:n.desc}),r&&(0,a.jsx)(`button`,{onClick:t=>{t.stopPropagation(),e(n.url),localStorage.setItem(`desktopWallpaperUrl`,n.url)},className:`mt-2 w-full py-1 bg-highlight-pink text-white border-2 border-ink-black font-window-title font-bold text-[9px] hover:bg-pink-400 shadow-[1px_1px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none transition-all text-center cursor-pointer`,children:`APPLY BACKGROUND`})]},n.name)})})]})]})]}),M&&(0,a.jsx)(`div`,{className:`absolute inset-0 bg-black/60 z-[999] flex items-center justify-center p-4`,children:(0,a.jsxs)(`div`,{className:`w-[90%] h-[90%] bg-paper-white border-[4px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden animate-scale-up text-ink-black`,children:[(0,a.jsxs)(`div`,{className:`bg-emerald-600 text-white p-2 border-b-[3px] border-ink-black flex justify-between items-center shrink-0 select-none`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`article`}),(0,a.jsxs)(`span`,{className:`font-window-title font-bold text-xs`,children:[M.name.replace(/\s+/g,`_`),`.py`]})]}),(0,a.jsx)(`button`,{onClick:()=>N(null),className:`bg-white text-ink-black border-[2px] border-ink-black w-5 h-5 flex items-center justify-center font-bold hover:bg-red-500 hover:text-white cursor-pointer`,children:`X`})]}),(0,a.jsxs)(`div`,{className:`bg-slate-200 border-b-2 border-ink-black flex shrink-0 select-none`,children:[(0,a.jsx)(`button`,{onClick:()=>F(`description`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`description`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`PROBLEM DESCRIPTION`}),(0,a.jsx)(`button`,{onClick:()=>F(`code`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`code`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`CODE VIEW & EDIT`}),(0,a.jsx)(`button`,{onClick:()=>F(`properties`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`properties`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`LEITNER PROPERTIES`})]}),P===`description`&&(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden bg-slate-900 relative`,children:[I?(0,a.jsx)(`textarea`,{value:B,onChange:e=>V(e.target.value),className:`flex-1 w-full bg-slate-950 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,placeholder:`Enter problem description / question body here...`,spellCheck:`false`}):(0,a.jsx)(`div`,{className:`flex-1 p-4 bg-slate-900 text-[#4ADE80] font-sans text-xs leading-relaxed overflow-y-auto custom-scrollbar select-text`,children:(0,a.jsx)(`div`,{className:`whitespace-pre-wrap font-semibold`,children:M.description||`No description provided for this problem.`})}),I&&(0,a.jsx)(`div`,{className:`absolute top-2 right-2 bg-yellow-400 text-ink-black border border-ink-black px-2 py-0.5 text-[9px] font-bold select-none animate-pulse`,children:`EDIT MODE ACTIVE`})]}),P===`code`&&(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden bg-slate-900 relative`,children:[I?(0,a.jsx)(`textarea`,{value:R,onChange:e=>z(e.target.value),className:`flex-1 w-full bg-slate-950 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,spellCheck:`false`}):(0,a.jsx)(`textarea`,{readOnly:!0,value:M.reference_code||`# Write your solution here.`,className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,spellCheck:`false`}),I&&(0,a.jsx)(`div`,{className:`absolute top-2 right-2 bg-yellow-400 text-ink-black border border-ink-black px-2 py-0.5 text-[9px] font-bold select-none animate-pulse`,children:`EDIT MODE ACTIVE`})]}),P===`properties`&&(0,a.jsxs)(`div`,{className:`flex-1 p-6 overflow-y-auto custom-scrollbar bg-slate-50 font-sans leading-relaxed select-text flex flex-col gap-4`,children:[(0,a.jsx)(`h3`,{className:`font-arcade text-[10px] border-b border-slate-300 pb-1 text-slate-500`,children:`Card Diagnostics`}),(0,a.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-[#0ea5e9] block`,children:`Scheduling Status`}),(0,a.jsxs)(`div`,{children:[`Leitner Combo Box: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-lg text-sky-600`,children:M.box_level||`N/A (Box 1)`})]}),(0,a.jsxs)(`div`,{children:[`Next Review Date: `,(0,a.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:M.next_review?new Date(M.next_review).toLocaleString():`N/A (Due)`})]}),(0,a.jsxs)(`div`,{children:[`Last Reviewed: `,(0,a.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:M.last_reviewed?new Date(M.last_reviewed).toLocaleDateString():`Never`})]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-emerald-600 block`,children:`Performance History`}),(0,a.jsxs)(`div`,{children:[`Total Attempts: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm`,children:M.total_attempts})]}),(0,a.jsxs)(`div`,{children:[`Times Correct: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm text-green-600`,children:M.times_correct})]}),(0,a.jsxs)(`div`,{children:[`Success Ratio: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm text-purple-700`,children:M.total_attempts>0?`${Math.round(M.times_correct/M.total_attempts*100)}%`:`0%`})]})]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-1.5 text-xs font-semibold`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-400 block`,children:`Properties`}),(0,a.jsxs)(`div`,{children:[`File ID: `,(0,a.jsx)(`span`,{className:`font-mono text-[10px] text-slate-500`,children:M.id})]}),(0,a.jsxs)(`div`,{children:[`Logical Pattern: `,(0,a.jsx)(`span`,{className:`text-blue-600`,children:M.pattern})]}),(0,a.jsxs)(`div`,{children:[`Difficulty Tag: `,(0,a.jsx)(`span`,{className:`uppercase`,children:M.difficulty})]})]})]}),(0,a.jsxs)(`div`,{className:`p-3 bg-slate-100 border-t-[3px] border-ink-black flex justify-between items-center shrink-0 select-none`,children:[(0,a.jsx)(`div`,{children:W&&(0,a.jsx)(`span`,{className:`text-green-600 font-bold text-xs animate-pulse`,children:`✓ Solution saved!`})}),(0,a.jsxs)(`div`,{className:`flex gap-2`,children:[(P===`code`||P===`description`)&&(I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`button`,{onClick:()=>{z(M.reference_code||``),V(M.description||``),L(!1)},className:`px-3 py-1.5 bg-white hover:bg-slate-50 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer`,children:`CANCEL`}),(0,a.jsx)(`button`,{disabled:H,onClick:se,className:`px-3 py-1.5 bg-[#4ADE80] hover:bg-emerald-400 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:H?`SAVING...`:`SAVE CHANGES`})]}):(0,a.jsxs)(`button`,{onClick:()=>L(!0),className:`px-3 py-1.5 bg-yellow-400 hover:bg-yellow-300 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`edit`}),`EDIT FILE`]})),(0,a.jsxs)(`button`,{onClick:()=>de(I?R:M.reference_code),className:`px-3 py-1.5 bg-[#ffcc00] hover:bg-yellow-300 text-ink-black border-2 border-ink-black font-bold text-xs shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none cursor-pointer flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`content_copy`}),ie?`COPIED!`:`COPY CODE`]}),(0,a.jsx)(`button`,{onClick:()=>N(null),className:`px-3 py-1.5 bg-white hover:bg-slate-50 text-ink-black border-2 border-ink-black font-bold text-xs shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`CLOSE`})]})]})]})}),ne&&(0,a.jsx)(`div`,{className:`absolute inset-0 bg-black/60 z-[999] flex items-center justify-center p-4 select-none`,children:(0,a.jsxs)(`div`,{className:`w-[80%] max-w-[400px] bg-paper-white border-[4px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden animate-scale-up text-ink-black font-sans`,children:[(0,a.jsxs)(`div`,{className:`bg-indigo-700 text-white p-2.5 border-b-[3px] border-ink-black flex justify-between items-center font-bold`,children:[(0,a.jsx)(`span`,{className:`font-window-title text-xs`,children:`IMPORT PROBLEMS`}),(0,a.jsx)(`button`,{onClick:()=>{T(!1),k(``),j(``)},className:`bg-white text-ink-black border-[2px] border-ink-black w-5 h-5 flex items-center justify-center font-bold hover:bg-red-500 hover:text-white cursor-pointer`,children:`X`})]}),(0,a.jsxs)(`div`,{className:`p-6 space-y-4`,children:[O&&(0,a.jsx)(`div`,{className:`p-2 border-2 border-red-500 bg-red-50 text-red-800 text-[10px] font-mono leading-relaxed`,children:O}),A&&(0,a.jsx)(`div`,{className:`p-2 border-2 border-green-500 bg-green-50 text-green-800 text-[10px] font-mono leading-relaxed`,children:A}),(0,a.jsxs)(`div`,{className:`flex flex-col items-center justify-center border-4 border-dashed border-ink-black p-6 relative ${E?`bg-indigo-50 cursor-wait`:`bg-slate-50 hover:bg-slate-100 cursor-pointer`}`,children:[E?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-indigo-700 mb-2 animate-bounce`,children:`cloud_upload`}),(0,a.jsx)(`span`,{className:`text-xs font-bold text-indigo-800 text-center`,children:`UPLOADING & PROCESSING...`}),(0,a.jsx)(`span`,{className:`text-[9px] text-indigo-600 mt-1 uppercase font-semibold text-center`,children:`Please wait, this might take a moment`})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-indigo-700 mb-2`,children:`upload_file`}),(0,a.jsx)(`span`,{className:`text-xs font-bold text-ink-black text-center`,children:`SELECT A CSV OR SQLite (.DB) FILE`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-1 uppercase font-semibold text-center`,children:`Imports problems & solution notes`})]}),(0,a.jsx)(`input`,{type:`file`,accept:`.csv,.db`,disabled:E,onChange:re,className:`absolute inset-0 opacity-0 cursor-pointer w-full h-full disabled:cursor-wait`})]}),(0,a.jsxs)(`div`,{className:`text-[9px] text-slate-400 font-medium leading-normal space-y-1 font-sans`,children:[(0,a.jsxs)(`p`,{children:[`• `,(0,a.jsx)(`b`,{children:`CSV File:`}),` Must have a `,(0,a.jsx)(`code`,{children:`name`}),` column. Optional: `,(0,a.jsx)(`code`,{children:`problem_number`}),`, `,(0,a.jsx)(`code`,{children:`pattern`}),`, `,(0,a.jsx)(`code`,{children:`difficulty`}),`, `,(0,a.jsx)(`code`,{children:`optimal_time`}),`, `,(0,a.jsx)(`code`,{children:`optimal_space`}),`, `,(0,a.jsx)(`code`,{children:`reference_code`}),`, `,(0,a.jsx)(`code`,{children:`description`}),`.`]}),(0,a.jsxs)(`p`,{children:[`• `,(0,a.jsx)(`b`,{children:`SQLite DB File:`}),` Must be a standard database backup containing a `,(0,a.jsx)(`code`,{children:`problems`}),` table matching AlgoSpaced design.`]})]})]})]})})]})}export{s as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/JourneyPath-BQEZfHUb.js b/algospaced-ui/dist/assets/JourneyPath-BQEZfHUb.js new file mode 100644 index 0000000000000000000000000000000000000000..e5b891b0877740b2bf7eb8ec9ca8e7e00265d3a1 --- /dev/null +++ b/algospaced-ui/dist/assets/JourneyPath-BQEZfHUb.js @@ -0,0 +1,65 @@ +import{a as e,c as t,i as n,t as r}from"./jsx-runtime-UoOgdb2P.js";import{i,n as a,r as o,t as s}from"./confetti.module-rliWwYSJ.js";import{n as c,t as l}from"./info-P8wDUvT9.js";import{t as u}from"./rotate-ccw-CucqdZpm.js";import{C as d,E as f,F as p,I as m,L as h,N as g,O as _,P as v,S as y,T as b,j as x,k as S,n as C,s as w,w as T,z as E}from"./index-DUIMMmBx.js";var D=E(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),O=E(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),k=E(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),A=E(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),j=E(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),M=E(`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`}]]),ee=E(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),te=E(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),N=E(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),P=E(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),F=E(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),I=E(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),ne=E(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),L=E(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),re=E(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),R=E(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),ie=E(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),z=t(e(),1),B=2600,V=1500,H=[{tMax:.15,name:`The Whispering Coast & Lowlands`,biome:`coast`},{tMax:.32,name:`The Elderwood Deep Forest`,biome:`forest`},{tMax:.48,name:`River Elden & The Twin Fords`,biome:`river`},{tMax:.68,name:`The Dragon Tooth Mountains & Passes`,biome:`mountain`},{tMax:.83,name:`The Misty Glade & Highland Woods`,biome:`forest`},{tMax:.93,name:`The Roaring Gorge & Cataracts`,biome:`river`},{tMax:1,name:`The Sunstone Peaks & Ancient Citadel`,biome:`ancient_ruins`}],U=[`Pencil marks still visible from the cartographer’s first survey.`,`A calm breeze sweeps through the grass, carrying the scent of pine.`,`Wooden planks creak underfoot as the river roars below.`,`Craggy pencil hatchings reveal steep, unforgiving granite slopes.`,`Ancient roots break through the worn gravel pathway.`,`The sound of rushing water echoes across the canyon walls.`,`A solitary stone marker inscribed with early explorer symbols.`,`Golden light filters softly through the sketched canopy.`,`Distant mountain ridges frame the expanding horizon.`,`A tranquil haven where wanderers rest before the mountain climb.`];function ae(e=[],t={}){let n=[],r=e.length>0?e.length:150,i=[{t:0,x:220,y:1320,elev:10},{t:.08,x:380,y:1140,elev:45},{t:.16,x:580,y:980,elev:120},{t:.24,x:820,y:1120,elev:90},{t:.32,x:940,y:860,elev:180},{t:.4,x:720,y:640,elev:320},{t:.48,x:1050,y:520,elev:580},{t:.56,x:1320,y:720,elev:890},{t:.64,x:1540,y:480,elev:1250},{t:.72,x:1780,y:680,elev:920},{t:.8,x:1980,y:920,elev:460},{t:.88,x:2220,y:760,elev:750},{t:.94,x:2180,y:480,elev:1180},{t:1,x:2420,y:240,elev:1620}];for(let a=0;a1?a/(r-1):0,s=0;for(;so<=e.tMax)||H[H.length-1],D=e.length>0?e[a]:a+1,O=t[D]||(D<0?`Custom Challenge ${a+1}`:`LeetCode #${D}`),k=U[a%U.length];n.push({id:D,sequenceIndex:a,x,y:S,name:O,biome:E.biome,regionName:E.name,elevation:Math.max(10,T),lore:k})}return n}var oe=[{id:`wm-bg1`,x:380,y:310,size:70,height:85,ridgeShift:-4,hasSnow:!1,layer:0,elevation:840,rangeName:`Western Crags`},{id:`wm-bg2`,x:490,y:280,size:85,height:105,ridgeShift:6,hasSnow:!0,layer:0,elevation:1120,name:`Peak of the North Wind`,rangeName:`Western Crags`},{id:`wm-bg3`,x:620,y:300,size:75,height:95,ridgeShift:-3,hasSnow:!1,layer:0,elevation:960,rangeName:`Western Crags`},{id:`wm-bg4`,x:730,y:320,size:65,height:80,ridgeShift:4,hasSnow:!1,layer:0,elevation:780,rangeName:`Western Crags`},{id:`m1`,x:430,y:375,size:80,height:105,ridgeShift:5,hasSnow:!0,elevation:1240,name:`Crag of the Mist`,rangeName:`Western Crags`},{id:`m2`,x:530,y:345,size:95,height:125,ridgeShift:-7,hasSnow:!0,elevation:1480,name:`Peak of Solitude`,rangeName:`Western Crags`},{id:`m3`,x:630,y:365,size:85,height:110,ridgeShift:3,hasSnow:!0,elevation:1310,name:`Shadowhorn`,rangeName:`Western Crags`},{id:`m4`,x:720,y:385,size:70,height:90,ridgeShift:-4,hasSnow:!1,elevation:990,rangeName:`Western Crags`},{id:`m5`,x:370,y:430,size:55,height:65,ridgeShift:4,hasSnow:!1,layer:2,elevation:620,rangeName:`Western Crags`},{id:`m6`,x:470,y:425,size:68,height:80,ridgeShift:-3,hasSnow:!1,layer:2,elevation:760,name:`Gullwing Bluff`,rangeName:`Western Crags`},{id:`m6b`,x:575,y:420,size:72,height:88,ridgeShift:3,hasSnow:!1,layer:2,elevation:850,rangeName:`Western Crags`},{id:`m6c`,x:670,y:435,size:58,height:70,ridgeShift:-2,hasSnow:!1,layer:2,elevation:680,rangeName:`Western Crags`},{id:`dt-bg1`,x:1130,y:260,size:90,height:120,ridgeShift:-6,hasSnow:!0,layer:0,elevation:1850,rangeName:`Dragon's Tooth Range`},{id:`dt-bg2`,x:1250,y:225,size:115,height:150,ridgeShift:8,hasSnow:!0,layer:0,elevation:2180,name:`Crown of the North`,rangeName:`Dragon's Tooth Range`},{id:`dt-bg3`,x:1380,y:210,size:130,height:175,ridgeShift:-10,hasSnow:!0,layer:0,elevation:2450,name:`Apex of Clouds`,rangeName:`Dragon's Tooth Range`},{id:`dt-bg4`,x:1510,y:240,size:110,height:145,ridgeShift:7,hasSnow:!0,layer:0,elevation:2020,rangeName:`Dragon's Tooth Range`},{id:`dt-bg5`,x:1640,y:280,size:90,height:115,ridgeShift:-5,hasSnow:!0,layer:0,elevation:1690,rangeName:`Dragon's Tooth Range`},{id:`m7`,x:1190,y:325,size:105,height:140,ridgeShift:-8,hasSnow:!0,elevation:1980,name:`The Dragon's Crest`,rangeName:`Dragon's Tooth Range`},{id:`m8`,x:1310,y:295,size:125,height:165,ridgeShift:10,hasSnow:!0,elevation:2360,name:`Frostcrag Pinnacle`,rangeName:`Dragon's Tooth Range`},{id:`m9`,x:1435,y:320,size:115,height:150,ridgeShift:-6,hasSnow:!0,elevation:2120,name:`Thunderhorn Peak`,rangeName:`Dragon's Tooth Range`},{id:`m10`,x:1560,y:355,size:98,height:125,ridgeShift:7,hasSnow:!0,elevation:1780,name:`Screaming Ridge`,rangeName:`Dragon's Tooth Range`},{id:`m10b`,x:1680,y:375,size:85,height:105,ridgeShift:-4,hasSnow:!1,elevation:1420,rangeName:`Dragon's Tooth Range`},{id:`m11`,x:1260,y:415,size:90,height:115,ridgeShift:-5,hasSnow:!0,elevation:1560,name:`Ironhorn Needle`,rangeName:`Dragon's Tooth Range`},{id:`m12`,x:1375,y:405,size:100,height:130,ridgeShift:6,hasSnow:!0,elevation:1720,name:`Shadowcrevasse Crag`,rangeName:`Dragon's Tooth Range`},{id:`m13`,x:1490,y:440,size:88,height:110,ridgeShift:-4,hasSnow:!0,elevation:1490,rangeName:`Dragon's Tooth Range`},{id:`m14`,x:1610,y:435,size:82,height:100,ridgeShift:5,hasSnow:!1,elevation:1320,rangeName:`Dragon's Tooth Range`},{id:`m15`,x:1160,y:590,size:80,height:100,ridgeShift:5,hasSnow:!1,elevation:1180,name:`Wanderer's Bluff`,rangeName:`Mid-Pass Gorge`},{id:`m16`,x:1390,y:610,size:90,height:115,ridgeShift:-6,hasSnow:!0,elevation:1390,name:`Eagle Eye Ridge`,rangeName:`Mid-Pass Gorge`},{id:`m17`,x:1510,y:585,size:95,height:120,ridgeShift:5,hasSnow:!0,elevation:1520,name:`Razorback Spine`,rangeName:`Mid-Pass Gorge`},{id:`m18`,x:1630,y:565,size:85,height:105,ridgeShift:-4,hasSnow:!1,elevation:1280,rangeName:`Mid-Pass Gorge`},{id:`m18b`,x:1740,y:580,size:75,height:90,ridgeShift:3,hasSnow:!1,elevation:1050,rangeName:`Mid-Pass Gorge`},{id:`es-bg1`,x:1980,y:310,size:88,height:115,ridgeShift:-5,hasSnow:!0,layer:0,elevation:1650,rangeName:`Sunstone Highlands`},{id:`es-bg2`,x:2110,y:245,size:105,height:140,ridgeShift:6,hasSnow:!0,layer:0,elevation:1980,name:`Sun Pillar`,rangeName:`Sunstone Highlands`},{id:`es-bg3`,x:2260,y:160,size:135,height:180,ridgeShift:-8,hasSnow:!0,layer:0,elevation:2580,name:`Crown of the Heavens`,rangeName:`Sunstone Highlands`},{id:`es-bg4`,x:2410,y:210,size:115,height:150,ridgeShift:7,hasSnow:!0,layer:0,elevation:2240,rangeName:`Sunstone Highlands`},{id:`m19`,x:2040,y:375,size:98,height:128,ridgeShift:6,hasSnow:!0,elevation:1720,name:`Sunstone Spire`,rangeName:`Sunstone Highlands`},{id:`m20`,x:2170,y:315,size:115,height:150,ridgeShift:-7,hasSnow:!0,elevation:2080,name:`Sanctuary Peak`,rangeName:`Sunstone Highlands`},{id:`m21`,x:2310,y:220,size:130,height:170,ridgeShift:8,hasSnow:!0,elevation:2390,name:`Pinnacle of the Ancients`,rangeName:`Sunstone Highlands`},{id:`m22`,x:2440,y:360,size:90,height:115,ridgeShift:-5,hasSnow:!0,elevation:1610,name:`Falcon Perch`,rangeName:`Sunstone Highlands`},{id:`m23`,x:2260,y:405,size:82,height:98,ridgeShift:4,hasSnow:!1,elevation:1250,name:`Altar Crag`,rangeName:`Sunstone Highlands`},{id:`m24`,x:2380,y:420,size:76,height:88,ridgeShift:-3,hasSnow:!1,elevation:1120,rangeName:`Sunstone Highlands`},{id:`m25`,x:2140,y:450,size:70,height:80,ridgeShift:3,hasSnow:!1,elevation:980,rangeName:`Sunstone Highlands`}],se=[{id:`river-elden`,name:`River Elden`,d:`M 1340,290 C 1310,380 1260,460 1210,540 C 1140,640 1020,700 960,820 C 900,940 930,1060 880,1180 C 840,1280 760,1360 690,1480`,width:14,hasBridges:[{x:945,y:855,angle:-35},{x:890,y:1160,angle:25}]},{id:`river-silver`,name:`Silver Meander`,d:`M 580,410 C 650,490 730,550 780,660 C 830,760 910,810 960,820`,width:8,hasBridges:[{x:740,y:620,angle:45}]},{id:`river-cataract`,name:`Highland Torrent`,d:`M 2150,320 C 2100,450 2050,600 2020,760 C 1990,920 1920,1050 1840,1180 C 1760,1310 1710,1420 1660,1500`,width:11,hasBridges:[{x:2010,y:810,angle:-20}]}],W=[{id:`f1`,name:`The Whispering Pines`,cx:580,cy:1040,rx:230,ry:160,treeCount:42,trees:G(580,1040,210,140,42,`pines`)},{id:`f2`,name:`Elderwood Deep`,cx:820,cy:1140,rx:250,ry:180,treeCount:52,trees:G(820,1140,230,160,52,`oaks`)},{id:`f3`,name:`Mistwood Valley`,cx:860,cy:620,rx:190,ry:140,treeCount:36,trees:G(860,620,170,120,36,`willows`)},{id:`f4`,name:`Highland Spruces`,cx:1760,cy:740,rx:210,ry:155,treeCount:38,trees:G(1760,740,190,135,38,`highland_spruce`)},{id:`f5`,name:`Verdant Basin`,cx:1960,cy:980,rx:200,ry:150,treeCount:38,trees:G(1960,980,180,130,38,`mixed`)},{id:`f6`,name:`Shadowglen Copse`,cx:390,cy:690,rx:140,ry:100,treeCount:22,trees:G(390,690,120,80,22,`pines`)},{id:`f7`,name:`Sunstone Grove`,cx:2360,cy:580,rx:150,ry:110,treeCount:24,trees:G(2360,580,130,90,24,`mixed`)}];function G(e,t,n,r,i,a){let o=[];for(let s=0;s{setTimeout(()=>{if(!this.ctx)return;let t=this.ctx.currentTime,n=this.ctx.createOscillator(),r=this.ctx.createGain();n.type=`sine`,n.frequency.setValueAtTime(e,t),r.gain.setValueAtTime(.001,t),r.gain.linearRampToValueAtTime(.15,t+.05),r.gain.exponentialRampToValueAtTime(1e-4,t+1.2),n.connect(r),r.connect(this.ctx.destination),n.start(t),n.stop(t+1.3)},t*120)}))}},Y=r();function X(e){let t=Math.sin(e*12.9898+78.233)*43758.5453;return t-Math.floor(t)}var Z=({mountain:e,theme:t})=>{let n=t.id!==`parchment`,r=t.pencilColor,i=t.pencilShade,{id:a,x:o,y:s,size:c,height:l,ridgeShift:u=0,hasSnow:d=l>95}=e,f=(0,z.useMemo)(()=>{let e=0;for(let t=0;t.65?l*.04:0;f.push({x:Math.round(o+u),y:Math.round(s+d)})}let p=[];for(let r=1;r<=6;r++){let a=r/6,o=t+(i-t)*a,s=n+l*a,u=(X(e+r*43)-.48)*(c*.14)*Math.sin(a*Math.PI),d=X(e+r*59)>.65?l*.04:0;p.push({x:Math.round(o+u),y:Math.round(s+d)})}let m=[{x:t,y:n}];for(let r=1;r<=7;r++){let i=r/7,a=t+(o+u*.25+(X(e+101)-.5)*(c*.15)-t)*i**1.2,s=n+l*i,d=Math.sin(i*Math.PI*2.2+X(e+113))*(c*.1);m.push({x:Math.round(a+d),y:Math.round(s)})}let h=[],g=m[Math.min(m.length-1,2)];if(g){let t=o+c*.55+(X(e+201)-.5)*15,n=s-l*.12,r=(g.x+t)/2+12,i=(g.y+n)/2-6;h.push({d:`M ${g.x},${g.y} Q ${r},${i} ${t},${n}`,side:`right`})}let _=m[Math.min(m.length-1,5)];if(_){let t=o+c*.85+(X(e+209)-.5)*15,n=s,r=(_.x+t)/2+10,i=(_.y+n)/2-4;h.push({d:`M ${_.x},${_.y} Q ${r},${i} ${t},${n}`,side:`right`})}let v=m[Math.min(m.length-1,3)];if(v){let t=o-c*.6+(X(e+301)-.5)*15,n=s-l*.15,r=(v.x+t)/2-10,i=(v.y+n)/2-5;h.push({d:`M ${v.x},${v.y} Q ${r},${i} ${t},${n}`,side:`left`})}let y=[],b=Math.max(14,Math.round(l/4.8));for(let r=1;r<=b;r++){let a=r/(b+1),o=m[Math.min(m.length-1,Math.max(0,Math.round(a*(m.length-1))))],s=n+l*a,c=p[Math.min(p.length-1,Math.max(0,Math.round(a*(p.length-1))))]||{x:t+(i-t)*a,y:s},u=o.x+(c.x-o.x)*.08,d=s+(X(e+r*71)-.5)*3,f=r%3==0?.92:r%2==0?.75:.6,h=u+(c.x-u)*f,g=d+((s-n)*.22+(c.y-s)*.35)+(X(e+r*83)-.5)*4;y.push({x1:Math.round(u),y1:Math.round(d),x2:Math.round(h),y2:Math.round(g),width:r<4?.9:1.25,opacity:r<3?.6:.85}),r>4&&r%2==0&&y.push({x1:Math.round(u+(h-u)*.3),y1:Math.round(d+(g-d)*.3),x2:Math.round(u+(h-u)*.75),y2:Math.round(d+(g-d)*.15),width:.75,opacity:.55})}let x=[],S=Math.max(4,Math.round(l/18));for(let i=1;i<=S;i++){let a=(i+.3)/(S+1),o=n+l*a,s=m[Math.min(m.length-1,Math.round(a*(m.length-1)))],c=f[Math.min(f.length-1,Math.round(a*(f.length-1)))]||{x:t-(t-r)*a,y:o},u=s.x-(s.x-c.x)*.25,d=o+2,p=s.x-(s.x-c.x)*(.6+X(e+i*97)*.3),h=o+8+X(e+i*103)*6,g=(u+p)/2-4,_=(d+h)/2+3;if(x.push({d:`M ${Math.round(u)},${Math.round(d)} Q ${Math.round(g)},${Math.round(_)} ${Math.round(p)},${Math.round(h)}`,width:.9}),i%2==1){let e=u-6,t=d+3;x.push({d:`M ${Math.round(e)},${Math.round(t)} L ${Math.round(e-8)},${Math.round(t+10)}`,width:.75})}}let C=``,w=``;if(d){let e=n+l*.32,a=t-(t-r)*.32,o=t+(i-t)*.32,s=m[Math.min(m.length-1,2)]||{x:t,y:e},c={x:t-(t-r)*.16,y:e-4},u={x:t-(t-r)*.26,y:e+6},d={x:t+(i-t)*.14,y:e+3},h={x:t+(i-t)*.24,y:e-2};C=`M ${t},${n} + L ${f[1].x},${f[1].y} + L ${a},${e} + Q ${u.x},${u.y} ${c.x},${c.y} + L ${s.x},${s.y} + Q ${d.x},${d.y} ${h.x},${h.y} + L ${o},${e} + L ${p[1].x},${p[1].y} + Z`,w=`M ${t},${n} + L ${s.x},${s.y} + Q ${d.x},${d.y} ${h.x},${h.y} + L ${o},${e} + L ${p[1].x},${p[1].y} + Z`}let T=[],E=[],D=Math.round(c/8);for(let t=0;tt===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`).join(` `),k=p.map(e=>`L ${e.x},${e.y}`).join(` `),A=m.map((e,t)=>t===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`).join(` `),j=`${O} ${k} Z`,M=p[p.length-1];return{peakX:t,peakY:n,leftX:r,rightX:i,fullPerimeterPath:j,shadedFacePath:`${A} L ${M.x},${M.y} ${p.slice().reverse().map(e=>`L ${e.x},${e.y}`).join(` `)} Z`,ridgePathStr:A,spurs:h,hachures:y,westStrata:x,snowCapPath:C,snowShadePath:w,screeStipples:T,screeLines:E}},[a,o,s,c,l,u,d]),p=n?`#231d17`:`#ded1b4`,m=n?`#1c1712`:`#cdbe9e`,h=n?`#ddd4c5`:`#fcfbf7`,g=n?`#a89c89`:`#e4d8c3`;return(0,Y.jsxs)(`g`,{id:`mountain-${a}`,className:`realistic-mountain-group transition-all duration-300 select-none`,children:[(0,Y.jsx)(`path`,{d:f.fullPerimeterPath,fill:p,stroke:r,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:f.shadedFacePath,fill:m,opacity:n?.7:.55}),d&&f.snowCapPath&&(0,Y.jsxs)(`g`,{id:`snowcap-${a}`,children:[(0,Y.jsx)(`path`,{d:f.snowCapPath,fill:h,stroke:r,strokeWidth:`1.1`,strokeLinejoin:`round`,opacity:n?.85:.95}),f.snowShadePath&&(0,Y.jsx)(`path`,{d:f.snowShadePath,fill:g,opacity:.65})]}),(0,Y.jsx)(`g`,{id:`strata-${a}`,stroke:r,strokeLinecap:`round`,opacity:n?.65:.75,children:f.westStrata.map((e,t)=>(0,Y.jsx)(`path`,{d:e.d,fill:`none`,strokeWidth:e.width},t))}),(0,Y.jsx)(`g`,{id:`hachures-${a}`,stroke:i,strokeLinecap:`round`,children:f.hachures.map((e,t)=>(0,Y.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:e.width,opacity:e.opacity},t))}),(0,Y.jsx)(`g`,{id:`spurs-${a}`,children:f.spurs.map((e,t)=>(0,Y.jsx)(`path`,{d:e.d,fill:`none`,stroke:e.side===`right`?r:i,strokeWidth:e.side===`right`?1.6:1.2,strokeLinecap:`round`,opacity:.85},t))}),(0,Y.jsx)(`path`,{d:f.ridgePathStr,fill:`none`,stroke:r,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Y.jsxs)(`g`,{id:`scree-${a}`,fill:r,stroke:i,opacity:n?.45:.6,children:[f.screeStipples.map((e,t)=>(0,Y.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r},t)),f.screeLines.map((e,t)=>(0,Y.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:`0.8`,strokeLinecap:`round`},t))]})]})},le=({tree:e,theme:t})=>{let{x:n,y:r,scale:i=1,type:a=`pine`}=e,o=t.id!==`parchment`,s=t.pencilColor,c=t.pencilShade,l=o?`#1e281c`:`#d8d4bf`,u=o?`#242a1e`:`#ded6bf`,d=o?`#2e251d`:`#cca98a`,f=o?`#1f2920`:`#d5dcc2`,p=o?`#293222`:`#e2dbcb`;return(0,Y.jsx)(`g`,{id:`tree-${n}-${r}`,className:`realistic-tree`,children:(()=>{switch(a){case`pine`:case`spruce`:{let e=a===`spruce`?14:17,t=a===`spruce`?32:28;return(0,Y.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,Y.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:e*.75,ry:`3`,fill:s,opacity:o?.25:.2}),(0,Y.jsx)(`path`,{d:`M -1.8,2 L -1,-6 L 1,-6 L 1.8,2 Z`,fill:d,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 0,-10 + Q ${e*.55},-7 ${e*.95},-3 + Q ${e*.6},0 0, -2 + Q ${-e*.6},0 ${-e*.95},-3 + Q ${-e*.55},-7 0,-10 Z`,fill:l,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 1,-6 Q ${e*.5},-4 ${e*.85},-3 Q ${e*.4},-1 0,-2 Z`,fill:s,opacity:o?.4:.3}),(0,Y.jsx)(`line`,{x1:`2`,y1:`-7`,x2:e*.75,y2:`-4`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:`1`,y1:`-4`,x2:e*.65,y2:`-2`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`path`,{d:`M 0,-18 + Q ${e*.45},-15 ${e*.8},-11 + Q ${e*.5},-8 0, -10 + Q ${-e*.5},-8 ${-e*.8},-11 + Q ${-e*.45},-15 0,-18 Z`,fill:l,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 1,-14 Q ${e*.45},-12 ${e*.7},-11 Q ${e*.35},-9 0,-10 Z`,fill:s,opacity:o?.4:.3}),(0,Y.jsx)(`line`,{x1:`1`,y1:`-15`,x2:e*.6,y2:`-12`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`path`,{d:`M 0,-25 + Q ${e*.35},-22 ${e*.55},-18 + Q ${e*.3},-16 0, -17 + Q ${-e*.3},-16 ${-e*.55},-18 + Q ${-e*.35},-22 0,-25 Z`,fill:l,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 0,-${t} L ${e*.35},-${t-9} Q 0,-${t-8} -${e*.35},-${t-9} Z`,fill:l,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 0,-${t} L ${e*.35},-${t-9} Q 0,-${t-8} 0,-${t-9} Z`,fill:s,opacity:o?.4:.35}),(0,Y.jsx)(`path`,{d:`M -5,1 L -3,3 M 3,2 L 5,0 M -1,3 L 0,1`,stroke:s,strokeWidth:`0.8`,strokeLinecap:`round`})]})}case`ancient_oak`:case`oak`:{let e=a===`ancient_oak`,t=e?22:18,l=e?24:20;return(0,Y.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,Y.jsx)(`ellipse`,{cx:`2`,cy:`2`,rx:t*.8,ry:`4`,fill:s,opacity:o?.3:.22}),(0,Y.jsx)(`path`,{d:`M -4,2 Q -3,-4 -2,-8 Q -6,-12 -8,-14 M 4,2 Q 3,-4 2,-8 Q 6,-12 9,-13 M -1,-8 L 0,-15`,fill:`none`,stroke:s,strokeWidth:`1.8`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M -3.5,2 L -1.5,-8 L 1.5,-8 L 3.5,2 Z`,fill:d,stroke:s,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:`-0.8`,y1:`0`,x2:`-0.8`,y2:`-6`,stroke:c,strokeWidth:`0.75`}),(0,Y.jsx)(`line`,{x1:`0.8`,y1:`1`,x2:`0.8`,y2:`-5`,stroke:c,strokeWidth:`0.75`}),(0,Y.jsx)(`ellipse`,{cx:`6`,cy:`-14`,rx:t*.45,ry:l*.4,fill:s,opacity:.25}),(0,Y.jsx)(`ellipse`,{cx:`2`,cy:`-8`,rx:t*.55,ry:l*.35,fill:s,opacity:.25}),(0,Y.jsx)(`path`,{d:`M -${t*.85},-10 + C -${t*1.05},-16 -${t*.8},-23 -${t*.45},-24 + C -${t*.25},-30 ${t*.35},-31 ${t*.65},-25 + C ${t*1.05},-24 ${t*1.15},-16 ${t*.9},-10 + C ${t*1.05},-4 ${t*.65},0 0,-1 + C -${t*.55},0 -${t*.95},-4 -${t*.85},-10 Z`,fill:u,stroke:s,strokeWidth:`1.35`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -${t*.5},-18 Q -${t*.2},-24 ${t*.2},-22 Q ${t*.45},-18 ${t*.3},-14`,fill:`none`,stroke:s,strokeWidth:`1`}),(0,Y.jsx)(`path`,{d:`M 1,-12 Q ${t*.5},-15 ${t*.8},-9 Q ${t*.45},-4 1,-6`,fill:s,opacity:o?.35:.28}),(0,Y.jsx)(`path`,{d:`M -${t*.65},-10 Q -${t*.3},-13 -${t*.1},-8`,fill:`none`,stroke:s,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:t*.15,y1:`-17`,x2:t*.55,y2:`-14`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:t*.25,y1:`-12`,x2:t*.7,y2:`-9`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:t*.1,y1:`-7`,x2:t*.55,y2:`-4`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`path`,{d:`M -6,1 L -3,2 M 3,2 L 6,1 M -2,3 L -1,1 M 2,3 L 1,1`,stroke:s,strokeWidth:`0.9`,strokeLinecap:`round`})]})}case`willow`:return(0,Y.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,Y.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:14.4,ry:`3.5`,fill:s,opacity:o?.28:.2}),(0,Y.jsx)(`path`,{d:`M -3,2 Q -1,-4 -2,-9 Q -5,-14 -7,-17 M 3,2 Q 2,-4 3,-9 Q 5,-14 8,-16`,fill:`none`,stroke:s,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M -2.5,2 L -1.5,-9 L 2,-9 L 2.5,2 Z`,fill:d,stroke:s,strokeWidth:`0.9`}),(0,Y.jsx)(`path`,{d:`M -${18*.85},-12 + C -${18*.95},-20 -9,-27 0,-26 + C 9,-27 ${18*.95},-20 ${18*.85},-12 + C ${18*.6},-7 0,-8 -${18*.85},-12 Z`,fill:f,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -13.5,-12 Q -${18*.85},-4 -12.6,0 M -9.9,-14 Q -${18*.65},-3 -8.1,1 M -6.3,-15 Q -8.1,-1 -4.5,2`,fill:`none`,stroke:s,strokeWidth:`1.1`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M -${18*.15},-16 Q -${18*.15},-2 0,1 M 1.8,-16 Q ${18*.15},-3 3.6,0`,fill:`none`,stroke:s,strokeWidth:`1.1`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M 6.3,-15 Q 9,-2 7.2,2 M ${18*.6},-14 Q 13.5,-2 ${18*.65},1 M ${18*.78},-12 Q 16.2,-3 14.4,0`,fill:`none`,stroke:s,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M 1,-23 Q ${18*.6},-20 13.5,-12 Q 7.2,-10 0,-14 Z`,fill:s,opacity:o?.35:.25}),(0,Y.jsx)(`path`,{d:`M -7,2 Q -5,-2 -4,0 M -5,2 Q -3,-3 -2,0 M 4,2 Q 6,-2 7,0 M 6,2 Q 8,-1 9,1`,stroke:s,strokeWidth:`0.8`,fill:`none`})]});default:return(0,Y.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,Y.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:12*.6,ry:`3`,fill:s,opacity:.25}),(0,Y.jsx)(`path`,{d:`M -1.2,2 L -0.6,-16 L 0.6,-16 L 1.2,2 Z`,fill:d,stroke:s,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:`-1`,y1:`-4`,x2:`0`,y2:`-4`,stroke:s,strokeWidth:`0.9`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`-8`,x2:`1`,y2:`-8`,stroke:s,strokeWidth:`0.9`}),(0,Y.jsx)(`line`,{x1:`-0.8`,y1:`-12`,x2:`0.2`,y2:`-12`,stroke:s,strokeWidth:`0.9`}),(0,Y.jsx)(`path`,{d:`M 0,-26 + C ${12*.7},-22 ${12*.8},-10.4 5.4,-5.2 + C 0,-3.9 -5.4,-5.2 -${12*.8},-10.4 + C -${12*.7},-22 0,-26 Z`,fill:p,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 0,-26 C ${12*.7},-22 ${12*.8},-10.4 5.4,-5.2 C 0,-3.9 0,-10.4 0,-26 Z`,fill:s,opacity:o?.35:.25}),(0,Y.jsx)(`line`,{x1:`1`,y1:`-16`,x2:12*.55,y2:`-13`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:`1`,y1:`-10`,x2:6,y2:`-7`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:`-3`,y1:`2`,x2:`-1`,y2:`0`,stroke:s,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:`2`,y1:`2`,x2:`4`,y2:`0`,stroke:s,strokeWidth:`0.8`})]})}})()})},ue=({river:e,theme:t,showLabels:n})=>{let r=t.id!==`parchment`,i=t.pencilColor,a=t.riverColor,o=(0,z.useMemo)(()=>e.id===`river-elden`?{riverPoly:`M 1340,290 + C 1318,375 1272,455 1222,535 + C 1152,635 1032,695 972,815 + C 910,935 942,1055 892,1175 + C 850,1275 770,1355 695,1480 + L 670,1480 + C 745,1355 825,1275 865,1175 + C 915,1055 885,935 945,815 + C 1005,695 1125,635 1195,535 + C 1245,455 1295,375 1335,290 + Z`,leftBank:`M 1335,290 C 1295,375 1245,455 1195,535 C 1125,635 1005,695 945,815 C 885,935 915,1055 865,1175 C 825,1275 745,1355 670,1480`,rightBank:`M 1345,290 C 1320,375 1275,455 1225,535 C 1155,635 1035,695 975,815 C 915,935 945,1055 895,1175 C 855,1275 775,1355 700,1480`,labelPos:{x:1040,y:980,rot:-55},islands:[{cx:960,cy:960,rx:14,ry:7,angle:-45,name:`Elden Ait`},{cx:770,cy:1330,rx:18,ry:8,angle:-50,name:`Otter Shoal`}],waterfall:{x:1215,y:540,width:32,height:24,angle:-38,name:`The Elden Cascades`},rapids:[{x:1140,y:660,angle:-40},{x:920,y:1020,angle:60}],sandbars:[{cx:995,cy:750,rx:12,ry:5,angle:30},{cx:900,cy:1110,rx:14,ry:6,angle:-25}],bridges:e.hasBridges||[{x:945,y:855,angle:-35,type:`stone_arch`,name:`Highbridge`},{x:890,y:1160,angle:25,type:`timber_trestle`,name:`Lower Toll Bridge`}]}:e.id===`river-silver`?{riverPoly:`M 580,410 + C 650,488 730,548 780,658 + C 830,758 910,808 960,818 + L 960,824 + C 908,814 828,764 778,664 + C 728,554 648,494 578,414 + Z`,leftBank:`M 578,412 C 648,492 728,552 778,662 C 828,762 908,812 958,822`,rightBank:`M 582,408 C 652,488 732,548 782,658 C 832,758 912,808 962,818`,labelPos:{x:740,y:710,rot:35},islands:[{cx:710,cy:535,rx:10,ry:5,angle:35,name:`Willow Islet`}],waterfall:{x:620,y:450,width:22,height:18,angle:45,name:`Silver Falls`},rapids:[{x:810,y:710,angle:50}],sandbars:[{cx:755,cy:610,rx:9,ry:4,angle:40}],bridges:e.hasBridges||[{x:740,y:620,angle:45,type:`stone_arch`,name:`Silver Arch`}]}:{riverPoly:`M 2150,320 + C 2100,450 2050,600 2020,760 + C 1990,920 1920,1050 1840,1180 + C 1760,1310 1710,1420 1660,1500 + L 1640,1500 + C 1690,1420 1740,1310 1820,1180 + C 1900,1050 1970,920 2000,760 + C 2030,600 2080,450 2130,320 + Z`,leftBank:`M 2130,320 C 2080,450 2030,600 2000,760 C 1970,920 1900,1050 1820,1180 C 1740,1310 1690,1420 1640,1500`,rightBank:`M 2150,320 C 2100,450 2050,600 2020,760 C 1990,920 1920,1050 1840,1180 C 1760,1310 1710,1420 1660,1500`,labelPos:{x:1920,y:1080,rot:-65},islands:[{cx:1890,cy:1100,rx:12,ry:6,angle:-60,name:`Crag Islet`}],waterfall:{x:2070,y:520,width:28,height:22,angle:-30,name:`The Great Cataract`},rapids:[{x:1980,y:880,angle:-65}],sandbars:[{cx:1950,cy:980,rx:11,ry:5,angle:-55}],bridges:e.hasBridges||[{x:2010,y:810,angle:-20,type:`stone_arch`,name:`Highland Span`}]},[e.id,e.hasBridges]),s=a,c=r?`#3d3425`:`#e6dcbf`,l=r?`#263422`:`#d2d8ba`;return(0,Y.jsxs)(`g`,{id:`realistic-${e.id}`,className:`realistic-river-group select-none`,children:[(0,Y.jsx)(`path`,{d:o.riverPoly,fill:s,opacity:.88}),(0,Y.jsx)(`path`,{d:o.leftBank,fill:`none`,stroke:i,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:o.rightBank,fill:`none`,stroke:i,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:o.leftBank,fill:`none`,stroke:r?`#e0d2bd`:`#ffffff`,strokeWidth:`0.8`,strokeDasharray:`14 18 8 22`,opacity:.65,transform:`translate(-2, -1)`}),(0,Y.jsx)(`path`,{d:o.rightBank,fill:`none`,stroke:r?`#e0d2bd`:`#ffffff`,strokeWidth:`0.8`,strokeDasharray:`16 20 10 24`,opacity:.65,transform:`translate(2, 1)`}),(0,Y.jsx)(`path`,{d:e.d,fill:`none`,stroke:r?`#5a4632`:`#7d6952`,strokeWidth:`1.2`,strokeDasharray:`24 32 14 36`,strokeLinecap:`round`,opacity:.7}),(0,Y.jsx)(`path`,{d:e.d,fill:`none`,stroke:r?`#e8dcbe`:`#ffffff`,strokeWidth:`0.8`,strokeDasharray:`10 40 18 35`,strokeLinecap:`round`,opacity:.6,transform:`translate(1.5, -1)`}),o.sandbars.map((e,t)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.cx}, ${e.cy}) rotate(${e.angle})`,children:[(0,Y.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:c,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`circle`,{cx:`-3`,cy:`-1`,r:`0.6`,fill:i}),(0,Y.jsx)(`circle`,{cx:`2`,cy:`1`,r:`0.7`,fill:i}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`0.5`,fill:i})]},t)),o.rapids.map((e,t)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,Y.jsx)(`path`,{d:`M -12,-6 Q -6,-8 0,-6 Q 6,-4 12,-6 M -10,0 Q -4,-2 2,0 Q 8,2 10,0 M -8,6 Q -2,4 4,6`,fill:`none`,stroke:r?`#f4eedd`:`#ffffff`,strokeWidth:`1.4`,strokeLinecap:`round`,opacity:.9}),(0,Y.jsx)(`circle`,{cx:`-5`,cy:`-2`,r:`1.8`,fill:r?`#2e251b`:`#6b5742`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`circle`,{cx:`6`,cy:`3`,r:`1.5`,fill:r?`#2e251b`:`#6b5742`,stroke:i,strokeWidth:`0.8`})]},t)),o.islands.map((e,a)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.cx}, ${e.cy}) rotate(${e.angle})`,children:[(0,Y.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:l,stroke:i,strokeWidth:`1.4`}),(0,Y.jsx)(`path`,{d:`M -${e.rx},0 Q -${e.rx+8},-2 -${e.rx+14},0 Q -${e.rx+8},2 -${e.rx},0`,fill:c,stroke:i,strokeWidth:`0.9`}),(0,Y.jsx)(`g`,{transform:`scale(${e.rx>15?.6:.45})`,children:(0,Y.jsx)(le,{tree:{x:0,y:-1,scale:.65,type:`willow`,seed:a*99+42},theme:t})}),n&&e.name&&e.rx>13&&(0,Y.jsx)(`text`,{x:`0`,y:e.ry+10,textAnchor:`middle`,fill:r?`#d4bfa1`:`#57422f`,className:`font-garamond italic text-[10px] font-semibold select-none`,children:e.name})]},a)),o.waterfall&&(0,Y.jsxs)(`g`,{id:`waterfall-${e.id}`,transform:`translate(${o.waterfall.x}, ${o.waterfall.y}) rotate(${o.waterfall.angle})`,children:[(0,Y.jsx)(`rect`,{x:-o.waterfall.width/2,y:`-4`,width:o.waterfall.width,height:`6`,rx:`2`,fill:r?`#2e251b`:`#6b5742`,stroke:i,strokeWidth:`1.4`}),(0,Y.jsxs)(`g`,{stroke:r?`#f4eedd`:`#ffffff`,strokeWidth:`1.2`,opacity:.95,children:[(0,Y.jsx)(`line`,{x1:-o.waterfall.width*.4,y1:`2`,x2:-o.waterfall.width*.4,y2:o.waterfall.height}),(0,Y.jsx)(`line`,{x1:-o.waterfall.width*.2,y1:`2`,x2:-o.waterfall.width*.2,y2:o.waterfall.height+2,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`2`,x2:`0`,y2:o.waterfall.height+3,strokeWidth:`1.6`}),(0,Y.jsx)(`line`,{x1:o.waterfall.width*.2,y1:`2`,x2:o.waterfall.width*.2,y2:o.waterfall.height+2,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:o.waterfall.width*.4,y1:`2`,x2:o.waterfall.width*.4,y2:o.waterfall.height})]}),(0,Y.jsx)(`ellipse`,{cx:`0`,cy:o.waterfall.height+4,rx:o.waterfall.width*.65,ry:`6`,fill:`none`,stroke:r?`#f4eedd`:`#ffffff`,strokeWidth:`1.2`,strokeDasharray:`4 3 6 2`,opacity:.9}),n&&o.waterfall.name&&(0,Y.jsxs)(`text`,{x:`0`,y:-10,textAnchor:`middle`,fill:r?`#e4caa0`:`#4a3420`,className:`font-cinzel text-[11px] font-bold tracking-wider select-none drop-shadow-sm`,children:[`❖ `,o.waterfall.name,` ❖`]})]}),o.bridges.map((t,a)=>(0,Y.jsxs)(`g`,{id:`bridge-${e.id}-${a}`,transform:`translate(${t.x}, ${t.y}) rotate(${t.angle})`,children:[(0,Y.jsx)(`rect`,{x:`-24`,y:`-10`,width:`8`,height:`20`,rx:`1`,fill:r?`#2e251b`:`#9c876b`,stroke:i,strokeWidth:`1.2`}),(0,Y.jsx)(`rect`,{x:`16`,y:`-10`,width:`8`,height:`20`,rx:`1`,fill:r?`#2e251b`:`#9c876b`,stroke:i,strokeWidth:`1.2`}),(0,Y.jsx)(`rect`,{x:`-20`,y:`-8`,width:`40`,height:`16`,rx:`2`,fill:r?`#3d3126`:`#d8c7a8`,stroke:i,strokeWidth:`1.8`}),(0,Y.jsx)(`line`,{x1:`-20`,y1:`-8`,x2:`20`,y2:`-8`,stroke:i,strokeWidth:`1.4`}),(0,Y.jsx)(`line`,{x1:`-20`,y1:`8`,x2:`20`,y2:`8`,stroke:i,strokeWidth:`1.4`}),(0,Y.jsx)(`line`,{x1:`-12`,y1:`-8`,x2:`-12`,y2:`8`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:`-6`,y1:`-8`,x2:`-6`,y2:`8`,stroke:i,strokeWidth:`1.1`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`-8`,x2:`0`,y2:`8`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:`6`,y1:`-8`,x2:`6`,y2:`8`,stroke:i,strokeWidth:`1.1`}),(0,Y.jsx)(`line`,{x1:`12`,y1:`-8`,x2:`12`,y2:`8`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`path`,{d:`M 0,-8 L -4,-13 L 4,-13 Z`,fill:r?`#2e251b`:`#9c876b`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`path`,{d:`M -6,-14 Q 0,-18 6,-14`,fill:`none`,stroke:r?`#f4eedd`:`#ffffff`,strokeWidth:`0.8`,opacity:.8}),n&&t.name&&(0,Y.jsx)(`text`,{x:`0`,y:`18`,textAnchor:`middle`,fill:r?`#d4bfa1`:`#4a3726`,className:`font-garamond italic text-[10px] font-semibold select-none`,children:t.name})]},a)),n&&(0,Y.jsxs)(`text`,{x:o.labelPos.x,y:o.labelPos.y,fill:r?`#e4caa0`:`#4a3420`,className:`font-cinzel italic text-[15px] font-bold tracking-widest select-none drop-shadow-sm`,opacity:.9,transform:`rotate(${o.labelPos.rot} ${o.labelPos.x} ${o.labelPos.y})`,children:[`~ `,e.name,` ~`]})]})},de=({forest:e,theme:t,showLabels:n})=>{let r=t.id!==`parchment`,i=t.pencilColor,a=t.pencilShade,{id:o,name:s,cx:c,cy:l,rx:u,ry:d,trees:f}=e,p=(0,z.useMemo)(()=>[...f].sort((e,t)=>e.y-t.y),[f]),m=(0,z.useMemo)(()=>{let e=[],t=[],n=[],r=c*13+l*19;for(let i=0;i<6;i++){let a=(i*1.8+r*.1)%(Math.PI*2),o=c+u*.7*Math.cos(a),s=l+d*.7*Math.sin(a);i%2==0?e.push({x:Math.round(o),y:Math.round(s),rx:5+i%3*2,ry:3+i%2*1.5,angle:i*35%60-30}):t.push({x:Math.round(o),y:Math.round(s),length:12+i%4*3,angle:i*45%90-45}),n.push({x:Math.round(c+Math.cos(a+.5)*(u*.5)),y:Math.round(l+Math.sin(a+.5)*(d*.5))})}return{boulders:e,fallenLogs:t,fernClusters:n}},[c,l,u,d]),h=(0,z.useMemo)(()=>{let e=[];for(let t=0;t<16;t++){let n=t/16*Math.PI*2,r=1+Math.sin(n*4+c*.05)*.08+Math.cos(n*3+l*.05)*.06,i=c+u*r*Math.cos(n),a=l+d*r*Math.sin(n);e.push({x:Math.round(i),y:Math.round(a)})}return e.map((e,t)=>t===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`).join(` `)+` Z`},[c,l,u,d]);return(0,Y.jsxs)(`g`,{id:`forest-zone-${o}`,className:`realistic-forest-group select-none`,children:[(0,Y.jsx)(`path`,{d:h,fill:r?`rgba(32, 42, 26, 0.35)`:`rgba(195, 208, 175, 0.22)`,stroke:a,strokeWidth:`0.85`,strokeDasharray:`5 7 2 7`,opacity:.8}),(0,Y.jsx)(`g`,{id:`boulders-${o}`,stroke:i,strokeWidth:`1`,children:m.boulders.map((e,t)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,Y.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:r?`#2b241c`:`#c4b69c`}),(0,Y.jsx)(`path`,{d:`M 0,-${e.ry} Q ${e.rx*.6},0 0,${e.ry} Q ${e.rx*.2},0 0,-${e.ry}`,fill:i,opacity:.3})]},t))}),(0,Y.jsx)(`g`,{id:`logs-${o}`,stroke:i,strokeWidth:`1.2`,children:m.fallenLogs.map((e,t)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,Y.jsx)(`line`,{x1:-e.length/2,y1:`0`,x2:e.length/2,y2:`0`,strokeLinecap:`round`,strokeWidth:`2.2`}),(0,Y.jsx)(`circle`,{cx:-e.length/2,cy:`0`,r:`1.2`,fill:i}),(0,Y.jsx)(`circle`,{cx:`2`,cy:`-1.5`,r:`0.8`,fill:r?`#d4bfa1`:`#f0e6d2`})]},t))}),(0,Y.jsx)(`g`,{id:`ferns-${o}`,stroke:a,strokeWidth:`0.8`,fill:`none`,children:m.fernClusters.map((e,t)=>(0,Y.jsx)(`g`,{transform:`translate(${e.x}, ${e.y})`,children:(0,Y.jsx)(`path`,{d:`M 0,0 Q -4,-5 -7,-4 M 0,0 Q -2,-7 -2,-10 M 0,0 Q 3,-6 6,-4`})},t))}),(0,Y.jsx)(`g`,{id:`trees-${o}`,children:p.map((e,n)=>(0,Y.jsx)(le,{tree:e,theme:t},n))}),n&&s&&(0,Y.jsxs)(`g`,{transform:`translate(${c}, ${l-d-12})`,children:[(0,Y.jsx)(`rect`,{x:`-90`,y:`-14`,width:`180`,height:`18`,rx:`3`,fill:r?`#1a1510`:`#f2e8d3`,stroke:a,strokeWidth:`0.75`,opacity:.85}),(0,Y.jsxs)(`text`,{x:`0`,y:`0`,textAnchor:`middle`,fill:r?`#d8c2a3`:`#453525`,className:`font-garamond italic font-bold text-[13px] tracking-widest select-none drop-shadow-sm`,children:[`❖ `,s,` ❖`]})]})]})},fe=({theme:e,showLabels:t,finalNode:n})=>{let r=e.id!==`parchment`,i=e.pencilColor,a=e.pencilShade,o=e.riverColor,s=(0,z.useMemo)(()=>[...oe].sort((e,t)=>{let n=e.layer??1,r=t.layer??1;return n===r?e.y-t.y:n-r}),[]);return(0,Y.jsxs)(`g`,{id:`terrain-layer`,className:`select-none pointer-events-none`,children:[(0,Y.jsxs)(`g`,{id:`rhumb-lines`,opacity:r?.08:.12,stroke:i,strokeWidth:`0.8`,strokeDasharray:`6 8`,children:[(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`2600`,y2:`1500`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`1500`,x2:`2600`,y2:`0`}),(0,Y.jsx)(`line`,{x1:`1300`,y1:`0`,x2:`1300`,y2:`1500`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`750`,x2:`2600`,y2:`750`}),(0,Y.jsx)(`circle`,{cx:`500`,cy:`400`,r:`300`,fill:`none`,strokeWidth:`0.5`}),(0,Y.jsx)(`circle`,{cx:`2100`,cy:`1100`,r:`350`,fill:`none`,strokeWidth:`0.5`}),(0,Y.jsx)(`circle`,{cx:`1300`,cy:`750`,r:`450`,fill:`none`,strokeWidth:`0.6`,strokeDasharray:`3 6`})]}),(0,Y.jsxs)(`g`,{id:`coastlines`,stroke:i,children:[(0,Y.jsx)(`path`,{d:`M 0,1180 Q 140,1220 200,1320 T 320,1500`,fill:`none`,strokeWidth:`2.5`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M 0,1200 Q 150,1240 215,1340 T 340,1500`,fill:`none`,strokeWidth:`1.2`,strokeDasharray:`12 8 4 8`,opacity:.65}),(0,Y.jsx)(`path`,{d:`M 0,1225 Q 160,1265 230,1365 T 365,1500`,fill:`none`,strokeWidth:`0.8`,strokeDasharray:`6 10`,opacity:.4}),(0,Y.jsxs)(`g`,{id:`islands`,strokeWidth:`1.5`,children:[(0,Y.jsx)(`path`,{d:`M 80,1390 Q 110,1370 140,1395 Q 120,1420 80,1390 Z`,fill:r?`#231d17`:`#e6d8be`}),(0,Y.jsx)(`path`,{d:`M 160,1440 Q 185,1425 210,1445 Q 190,1465 160,1440 Z`,fill:r?`#231d17`:`#e6d8be`}),(0,Y.jsx)(`line`,{x1:`105`,y1:`1385`,x2:`110`,y2:`1375`,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:`115`,y1:`1388`,x2:`122`,y2:`1378`,strokeWidth:`1`})]})]}),(0,Y.jsx)(`g`,{id:`rivers-layer`,children:se.map(n=>(0,Y.jsx)(ue,{river:n,theme:e,showLabels:t},n.id))}),(0,Y.jsx)(`g`,{id:`forests-layer`,children:W.map(n=>(0,Y.jsx)(de,{forest:n,theme:e,showLabels:t},n.id))}),(0,Y.jsxs)(`g`,{id:`mountains-layer`,children:[(0,Y.jsxs)(`g`,{id:`distant-mountain-ridgelines`,opacity:r?.35:.45,stroke:a,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 330,330 Q 380,290 440,310 T 540,280 T 650,300 T 760,330`,strokeWidth:`1.2`,strokeDasharray:`4 4`}),(0,Y.jsx)(`path`,{d:`M 1080,270 Q 1190,210 1310,195 T 1450,220 T 1580,245 T 1720,290`,strokeWidth:`1.4`,strokeDasharray:`5 4`}),(0,Y.jsx)(`path`,{d:`M 1940,320 Q 2060,240 2200,180 T 2350,150 T 2480,230`,strokeWidth:`1.4`,strokeDasharray:`5 4`})]}),(0,Y.jsxs)(`g`,{id:`alpine-tarns`,children:[(0,Y.jsxs)(`g`,{id:`tarn-dragons-eye`,children:[(0,Y.jsx)(`ellipse`,{cx:`1350`,cy:`365`,rx:`22`,ry:`12`,fill:o,stroke:i,strokeWidth:`1.4`,opacity:.9}),(0,Y.jsx)(`path`,{d:`M 1335,363 Q 1350,361 1365,363 M 1340,367 Q 1350,369 1360,367`,stroke:r?`#e0d2bd`:`#ffffff`,strokeWidth:`0.8`,fill:`none`,opacity:.7}),(0,Y.jsx)(`path`,{d:`M 1350,377 Q 1345,395 1335,410 T 1320,430`,fill:`none`,stroke:o,strokeWidth:`2`,strokeDasharray:`3 2`,opacity:.8}),t&&(0,Y.jsx)(`text`,{x:`1350`,y:`350`,textAnchor:`middle`,fill:r?`#c5b597`:`#57422f`,className:`font-garamond italic text-[11px] font-semibold select-none`,children:`Dragon's Eye Tarn`})]}),(0,Y.jsxs)(`g`,{id:`tarn-sunstone`,children:[(0,Y.jsx)(`ellipse`,{cx:`2210`,cy:`275`,rx:`18`,ry:`10`,fill:o,stroke:i,strokeWidth:`1.3`,opacity:.9}),(0,Y.jsx)(`path`,{d:`M 2198,274 Q 2210,272 2222,274`,stroke:r?`#e0d2bd`:`#ffffff`,strokeWidth:`0.75`,fill:`none`,opacity:.7})]}),(0,Y.jsx)(`g`,{id:`tarn-mistwood`,children:(0,Y.jsx)(`ellipse`,{cx:`585`,cy:`395`,rx:`16`,ry:`9`,fill:o,stroke:i,strokeWidth:`1.2`,opacity:.9})})]}),s.map(t=>(0,Y.jsx)(Z,{mountain:t,theme:e},t.id)),t&&(0,Y.jsxs)(`g`,{id:`mountain-range-banners`,className:`select-none pointer-events-none`,children:[(0,Y.jsx)(`text`,{x:`1380`,y:`180`,textAnchor:`middle`,fill:r?`#e4caa0`:`#4a3420`,className:`font-cinzel-dec font-bold text-[18px] tracking-widest drop-shadow-sm`,opacity:.9,children:`❖ THE DRAGON TOOTH MOUNTAINS ❖`}),(0,Y.jsx)(`text`,{x:`530`,y:`255`,textAnchor:`middle`,fill:r?`#d0b996`:`#523c28`,className:`font-cinzel font-bold text-[14px] tracking-widest`,opacity:.85,children:`~ THE WESTERN CRAGS ~`}),(0,Y.jsx)(`text`,{x:`2260`,y:`135`,textAnchor:`middle`,fill:r?`#e4caa0`:`#4a3420`,className:`font-cinzel-dec font-bold text-[16px] tracking-widest drop-shadow-sm`,opacity:.9,children:`❖ SUNSTONE CITADEL PEAKS ❖`})]})]}),(0,Y.jsxs)(`g`,{id:`sea-monsters`,opacity:r?.7:.85,children:[(0,Y.jsxs)(`g`,{transform:`translate(140, 1260) scale(0.85)`,stroke:i,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 10,20 Q 30,-15 50,20 Q 70,-20 90,20 Q 110,-10 125,20`,strokeWidth:`2.2`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M 10,20 Q -5,10 0,-5 Q 10,-15 18,-5 Q 12,5 10,20 Z`,strokeWidth:`2`,fill:r?`#231e18`:`#e0d3b6`}),(0,Y.jsx)(`circle`,{cx:`6`,cy:`-6`,r:`1.5`,fill:i}),(0,Y.jsx)(`path`,{d:`M -2,-4 L -10,-7 L -7,-3`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,Y.jsx)(`line`,{x1:`30`,y1:`-8`,x2:`33`,y2:`-18`,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:`70`,y1:`-12`,x2:`73`,y2:`-22`,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:`108`,y1:`-4`,x2:`111`,y2:`-14`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M -15,22 Q 30,28 70,22 Q 110,28 145,22`,strokeWidth:`1.2`,strokeDasharray:`4 6`}),t&&(0,Y.jsx)(`text`,{x:`70`,y:`44`,textAnchor:`middle`,fill:r?`#a89476`:`#6b543b`,className:`font-garamond italic text-[12px]`,children:`"Hic Sunt Dracones"`})]}),(0,Y.jsxs)(`g`,{transform:`translate(360, 1420) scale(0.65)`,stroke:i,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M -30,10 Q 0,16 35,10 Q 40,0 30,-5 L -35,-5 Q -40,0 -30,10 Z`,strokeWidth:`1.8`,fill:r?`#2a221b`:`#ded1b4`}),(0,Y.jsx)(`line`,{x1:`-15`,y1:`-5`,x2:`-15`,y2:`-45`,strokeWidth:`1.8`}),(0,Y.jsx)(`line`,{x1:`10`,y1:`-5`,x2:`10`,y2:`-52`,strokeWidth:`1.8`}),(0,Y.jsx)(`line`,{x1:`28`,y1:`-5`,x2:`28`,y2:`-36`,strokeWidth:`1.4`}),(0,Y.jsx)(`path`,{d:`M -28,-38 Q -15,-44 -2,-38 Q -15,-26 -28,-38 Z`,strokeWidth:`1.3`,fill:r?`#3d3429`:`#f0e6ce`}),(0,Y.jsx)(`path`,{d:`M -4,-44 Q 10,-50 24,-44 Q 10,-32 -4,-44 Z`,strokeWidth:`1.3`,fill:r?`#3d3429`:`#f0e6ce`}),(0,Y.jsx)(`path`,{d:`M -4,-28 Q 10,-34 24,-28 Q 10,-18 -4,-28 Z`,strokeWidth:`1.3`,fill:r?`#3d3429`:`#f0e6ce`}),(0,Y.jsx)(`line`,{x1:`-15`,y1:`-45`,x2:`-35`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,Y.jsx)(`line`,{x1:`10`,y1:`-52`,x2:`-20`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,Y.jsx)(`line`,{x1:`10`,y1:`-52`,x2:`35`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,Y.jsx)(`line`,{x1:`-48`,y1:`12`,x2:`-20`,y2:`12`,strokeWidth:`1`,strokeDasharray:`3 5`})]})]}),(0,Y.jsxs)(`g`,{transform:`translate(2360, 1180)`,id:`compass-rose`,children:[(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`75`,fill:r?`rgba(30,25,20,0.85)`:`rgba(245,236,215,0.85)`,stroke:i,strokeWidth:`2`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`66`,fill:`none`,stroke:i,strokeWidth:`1`,strokeDasharray:`2 4`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`48`,fill:`none`,stroke:i,strokeWidth:`1.2`}),(0,Y.jsx)(`polygon`,{points:`0,-72 6,-20 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`0,-72 -6,-20 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`polygon`,{points:`0,72 -6,20 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`0,72 6,20 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`polygon`,{points:`72,0 20,6 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`72,0 20,-6 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`polygon`,{points:`-72,0 -20,-6 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`-72,0 -20,6 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`polygon`,{points:`45,-45 14,-5 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`45,-45 5,-14 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`polygon`,{points:`-45,-45 -5,-14 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`-45,-45 -14,-5 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`polygon`,{points:`45,45 5,14 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`45,45 14,5 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`polygon`,{points:`-45,45 -14,5 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`-45,45 -5,14 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`7`,fill:r?`#d4af37`:`#99732d`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`text`,{x:`0`,y:`-80`,textAnchor:`middle`,fill:r?`#f4d27a`:`#852e18`,className:`font-cinzel-dec font-bold text-[18px]`,children:`N`}),(0,Y.jsx)(`text`,{x:`0`,y:`94`,textAnchor:`middle`,fill:r?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`S`}),(0,Y.jsx)(`text`,{x:`88`,y:`5`,textAnchor:`middle`,fill:r?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`E`}),(0,Y.jsx)(`text`,{x:`-88`,y:`5`,textAnchor:`middle`,fill:r?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`W`})]}),(0,Y.jsxs)(`g`,{transform:`translate(820, 120)`,id:`map-cartouche`,children:[(0,Y.jsx)(`rect`,{x:`-220`,y:`-45`,width:`440`,height:`85`,rx:`6`,fill:r?`#231e17`:`#f5ebd3`,stroke:i,strokeWidth:`2.5`}),(0,Y.jsx)(`rect`,{x:`-214`,y:`-39`,width:`428`,height:`73`,rx:`4`,fill:`none`,stroke:i,strokeWidth:`1`,strokeDasharray:`4 2`}),(0,Y.jsx)(`path`,{d:`M -210,-30 Q -195,-30 -195,-15 M 210,-30 Q 195,-30 195,-15`,stroke:i,strokeWidth:`1.2`,fill:`none`}),(0,Y.jsx)(`path`,{d:`M -210,25 Q -195,25 -195,10 M 210,25 Q 195,25 195,10`,stroke:i,strokeWidth:`1.2`,fill:`none`}),(0,Y.jsx)(`text`,{x:`0`,y:`-12`,textAnchor:`middle`,fill:r?`#f4d27a`:`#5a2211`,className:`font-cinzel-dec font-bold text-[22px] tracking-widest`,children:`THE EXPEDITION TRAIL`}),(0,Y.jsx)(`text`,{x:`0`,y:`15`,textAnchor:`middle`,fill:r?`#d2c2a5`:`#5c4530`,className:`font-garamond italic font-semibold text-[14px] tracking-wide`,children:`Path to the tower.`})]}),n&&(0,Y.jsxs)(`g`,{id:`huge-stone-tower`,transform:`translate(${n.x}, ${n.y})`,children:[(0,Y.jsx)(`path`,{d:`M -65,10 Q 0,25 65,10 L 55,-10 Q 0,5 -55,-10 Z`,fill:r?`#1e1a14`:`#d2c4a7`,stroke:i,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -50,-10 L -32,-190 L 32,-190 L 50,-10 Z`,fill:r?`#231e17`:`#e6d7bc`,stroke:i,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -47,-30 Q 0,-20 47,-30 M -43,-70 Q 0,-60 43,-70 M -39,-110 Q 0,-100 39,-110 M -35,-150 Q 0,-140 35,-150`,fill:`none`,stroke:a,strokeWidth:`1.5`,strokeDasharray:`12 6`,opacity:`0.8`}),(0,Y.jsxs)(`g`,{stroke:a,strokeWidth:`1.2`,opacity:`0.75`,strokeLinecap:`round`,children:[(0,Y.jsx)(`line`,{x1:`-48`,y1:`-20`,x2:`-25`,y2:`-30`}),(0,Y.jsx)(`line`,{x1:`-47`,y1:`-40`,x2:`-24`,y2:`-50`}),(0,Y.jsx)(`line`,{x1:`-45`,y1:`-60`,x2:`-22`,y2:`-70`}),(0,Y.jsx)(`line`,{x1:`-44`,y1:`-80`,x2:`-21`,y2:`-90`}),(0,Y.jsx)(`line`,{x1:`-42`,y1:`-100`,x2:`-19`,y2:`-110`}),(0,Y.jsx)(`line`,{x1:`-41`,y1:`-120`,x2:`-18`,y2:`-130`}),(0,Y.jsx)(`line`,{x1:`-39`,y1:`-140`,x2:`-16`,y2:`-150`}),(0,Y.jsx)(`line`,{x1:`-38`,y1:`-160`,x2:`-15`,y2:`-170`}),(0,Y.jsx)(`line`,{x1:`-36`,y1:`-180`,x2:`-13`,y2:`-190`})]}),(0,Y.jsx)(`path`,{d:`M -18,0 L -18,-35 C -18,-55 18,-55 18,-35 L 18,0 Z`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`2.5`}),(0,Y.jsx)(`rect`,{x:`-6`,y:`-80`,width:`12`,height:`25`,rx:`5`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`-22`,y:`-130`,width:`8`,height:`20`,rx:`3`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`14`,y:`-130`,width:`8`,height:`20`,rx:`3`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`-6`,y:`-170`,width:`12`,height:`25`,rx:`5`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M -36,-190 L -36,-210 L -21,-210 L -21,-190 L -6,-190 L -6,-210 L 9,-210 L 9,-190 L 24,-190 L 24,-210 L 39,-210 L 39,-190 Z`,fill:r?`#1e1a14`:`#d2c4a7`,stroke:i,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -45,-40 L -30,-30 L -25,-45 L -10,-40 M 35,-150 L 25,-140 L 30,-120`,fill:`none`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M 50,-10 Q 40,-30 45,-50 T 35,-80 T 42,-110 T 30,-130`,fill:`none`,stroke:r?`#3a4a2c`:`#5a6b42`,strokeWidth:`2.5`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M -50,-15 Q -40,-25 -45,-45 T -35,-75`,fill:`none`,stroke:r?`#3a4a2c`:`#5a6b42`,strokeWidth:`2`,strokeLinecap:`round`}),t&&(0,Y.jsx)(`text`,{x:`0`,y:`-235`,textAnchor:`middle`,fill:r?`#e0caa9`:`#3d2e1e`,className:`font-cinzel text-[16px] font-bold tracking-widest select-none drop-shadow-sm`,children:`THE ANCIENT CITADEL`})]})]})},pe=({theme:e,showGrid:t})=>{let n=e.id!==`parchment`,r=e.pencilColor,i=n?`#2e261f`:`#3d2f21`;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`defs`,{children:[(0,Y.jsxs)(`filter`,{id:`goldenGlow`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`4`,result:`blur1`}),(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`10`,result:`blur2`}),(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`22`,result:`blur3`}),(0,Y.jsx)(`feColorMatrix`,{in:`blur3`,type:`matrix`,values:`\r + 1 0 0 0 1\r + 0 0.8 0 0 0.7\r + 0 0 0.2 0 0\r + 0 0 0 1.8 0`,result:`coloredBlur`}),(0,Y.jsxs)(`feMerge`,{children:[(0,Y.jsx)(`feMergeNode`,{in:`coloredBlur`}),(0,Y.jsx)(`feMergeNode`,{in:`blur2`}),(0,Y.jsx)(`feMergeNode`,{in:`blur1`}),(0,Y.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,Y.jsxs)(`filter`,{id:`nodeGlow`,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`,children:[(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`6`,result:`blur`}),(0,Y.jsxs)(`feMerge`,{children:[(0,Y.jsx)(`feMergeNode`,{in:`blur`}),(0,Y.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,Y.jsxs)(`linearGradient`,{id:`goldPathGradient`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,Y.jsx)(`stop`,{offset:`0%`,stopColor:`#f59e0b`,stopOpacity:`0.95`}),(0,Y.jsx)(`stop`,{offset:`50%`,stopColor:`#fbbf24`,stopOpacity:`1`}),(0,Y.jsx)(`stop`,{offset:`100%`,stopColor:`#fef08a`,stopOpacity:`1`})]}),(0,Y.jsxs)(`radialGradient`,{id:`beaconGlow`,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,Y.jsx)(`stop`,{offset:`0%`,stopColor:`#fffbeb`,stopOpacity:`1`}),(0,Y.jsx)(`stop`,{offset:`40%`,stopColor:`#f59e0b`,stopOpacity:`0.8`}),(0,Y.jsx)(`stop`,{offset:`75%`,stopColor:`#d97706`,stopOpacity:`0.3`}),(0,Y.jsx)(`stop`,{offset:`100%`,stopColor:`#b45309`,stopOpacity:`0`})]})]}),t&&(0,Y.jsxs)(`g`,{id:`grid-lines`,stroke:r,strokeWidth:`0.6`,strokeDasharray:`3 7`,opacity:n?.15:.22,children:[Array.from({length:13}).map((e,t)=>{let n=(t+1)*200;return(0,Y.jsx)(`line`,{x1:n,y1:`0`,x2:n,y2:1500},`gx-${t}`)}),Array.from({length:7}).map((e,t)=>{let n=(t+1)*200;return(0,Y.jsx)(`line`,{x1:`0`,y1:n,x2:2600,y2:n},`gy-${t}`)})]}),(0,Y.jsxs)(`g`,{id:`map-border`,pointerEvents:`none`,children:[(0,Y.jsx)(`rect`,{x:`12`,y:`12`,width:B-24,height:V-24,fill:`none`,stroke:r,strokeWidth:`6`}),(0,Y.jsx)(`rect`,{x:`20`,y:`20`,width:B-40,height:`14`,fill:n?`#231e17`:`#eee2ca`,stroke:r,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`20`,y:V-34,width:B-40,height:`14`,fill:n?`#231e17`:`#eee2ca`,stroke:r,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`20`,y:`20`,width:`14`,height:V-40,fill:n?`#231e17`:`#eee2ca`,stroke:r,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:B-34,y:`20`,width:`14`,height:V-40,fill:n?`#231e17`:`#eee2ca`,stroke:r,strokeWidth:`1.5`}),Array.from({length:32}).map((e,t)=>{if(t%2==0)return null;let n=(B-40)/32;return(0,Y.jsxs)(z.Fragment,{children:[(0,Y.jsx)(`rect`,{x:20+t*n,y:`20`,width:n,height:`14`,fill:i}),(0,Y.jsx)(`rect`,{x:20+t*n,y:V-34,width:n,height:`14`,fill:i})]},`ruler-h-${t}`)}),(0,Y.jsx)(`rect`,{x:`38`,y:`38`,width:B-76,height:V-76,fill:`none`,stroke:r,strokeWidth:`2`}),(0,Y.jsxs)(`g`,{transform:`translate(38, 38)`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 0,0 L 45,0 C 25,25 25,25 0,45 Z`,fill:n?`#2f271f`:`#e6d7bc`}),(0,Y.jsx)(`circle`,{cx:`20`,cy:`20`,r:`4`,fill:r}),(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`40`,y2:`40`})]}),(0,Y.jsxs)(`g`,{transform:`translate(${B-38}, 38)`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 0,0 L -45,0 C -25,25 -25,25 0,45 Z`,fill:n?`#2f271f`:`#e6d7bc`}),(0,Y.jsx)(`circle`,{cx:`-20`,cy:`20`,r:`4`,fill:r}),(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`-40`,y2:`40`})]}),(0,Y.jsxs)(`g`,{transform:`translate(38, ${V-38})`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 0,0 L 45,0 C 25,-25 25,-25 0,-45 Z`,fill:n?`#2f271f`:`#e6d7bc`}),(0,Y.jsx)(`circle`,{cx:`20`,cy:`-20`,r:`4`,fill:r}),(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`40`,y2:`-40`})]}),(0,Y.jsxs)(`g`,{transform:`translate(${B-38}, ${V-38})`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 0,0 L -45,0 C -25,-25 -25,-25 0,-45 Z`,fill:n?`#2f271f`:`#e6d7bc`}),(0,Y.jsx)(`circle`,{cx:`-20`,cy:`-20`,r:`4`,fill:r}),(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`-40`,y2:`-40`})]}),(0,Y.jsxs)(`g`,{transform:`translate(480, 1445)`,stroke:r,children:[(0,Y.jsx)(`rect`,{x:`0`,y:`0`,width:`180`,height:`8`,fill:`none`,strokeWidth:`1.2`}),(0,Y.jsx)(`rect`,{x:`0`,y:`0`,width:`45`,height:`8`,fill:r}),(0,Y.jsx)(`rect`,{x:`90`,y:`0`,width:`45`,height:`8`,fill:r}),(0,Y.jsx)(`text`,{x:`0`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`0`}),(0,Y.jsx)(`text`,{x:`45`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`25`}),(0,Y.jsx)(`text`,{x:`90`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`50`}),(0,Y.jsx)(`text`,{x:`180`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`100 Leagues`})]})]})]})},me=({nodes:e,activeNodeIndex:t,completions:n,theme:r,showNodeNumbers:i,onNodeClick:a,hoveredNodeIndex:o,setHoveredNodeIndex:s})=>{let c=e.reduce((e,t,r)=>n.has(t.id)?Math.max(e,r):e,-1),l=Math.max(t,c),u=K(e),d=q(e,l),f=t>=0&&t0&&d&&(0,Y.jsxs)(`g`,{id:`lit-path`,children:[(0,Y.jsx)(`path`,{d,fill:`none`,stroke:`#f59e0b`,strokeWidth:`14`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.35,filter:`url(#goldenGlow)`}),(0,Y.jsx)(`path`,{d,fill:`none`,stroke:`url(#goldPathGradient)`,strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,filter:`url(#goldenGlow)`}),(0,Y.jsx)(`path`,{d,fill:`none`,stroke:`#fffbeb`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.95})]}),(0,Y.jsx)(`g`,{id:`nodes-collection`,children:e.map((c,u)=>{let d=n.has(c.id),f=u<=l||d,p=u===t,m=o===u,h=(u+1)%25==0||u===0||u===e.length-1;return(0,Y.jsxs)(`g`,{id:`node-${c.id}`,transform:`translate(${c.x}, ${c.y})`,className:`cursor-pointer transition-transform duration-200`,onClick:e=>{e.stopPropagation(),a(u)},onMouseEnter:()=>s(u),onMouseLeave:()=>s(null),children:[(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`18`,fill:`transparent`}),!f&&!d&&(0,Y.jsxs)(`g`,{children:[(0,Y.jsx)(`circle`,{cx:`1`,cy:`1.5`,r:h?6.5:4.5,fill:r.pencilShade,opacity:.4}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:h?6:4,fill:r.id===`parchment`?`#f0e5ce`:`#28221b`,stroke:r.pencilColor,strokeWidth:h?2:1.4}),h&&(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`2`,fill:r.pencilColor})]}),f&&!p&&(0,Y.jsxs)(`g`,{filter:`url(#nodeGlow)`,children:[(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:h?10:7,fill:d?`#10b981`:`#f59e0b`,opacity:.4}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:h?7:5,fill:d?`#34d399`:`#fbbf24`,stroke:`#fffbeb`,strokeWidth:`1.6`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:h?2.5:1.8,fill:`#ffffff`})]}),p&&(0,Y.jsxs)(`g`,{id:`active-node-beacon`,children:[(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`12`,fill:`none`,stroke:`#f59e0b`,strokeWidth:`2.5`,className:`beacon-wave`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`12`,fill:`none`,stroke:`#fbbf24`,strokeWidth:`2`,className:`beacon-wave-delayed`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`20`,fill:`url(#beaconGlow)`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`9.5`,fill:d?`#10b981`:`#f59e0b`,stroke:`#ffffff`,strokeWidth:`2.4`,filter:`url(#goldenGlow)`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`4.5`,fill:`#ffffff`}),(0,Y.jsxs)(`g`,{transform:`translate(0, -18)`,children:[(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`10`,stroke:`#f59e0b`,strokeWidth:`2.2`}),(0,Y.jsx)(`polygon`,{points:`0,-10 7,-4 0,2 -7,-4`,fill:d?`#10b981`:`#ef4444`,stroke:`#ffffff`,strokeWidth:`1.5`,filter:`url(#nodeGlow)`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`-4`,r:`2`,fill:`#ffffff`})]})]}),m&&!p&&(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`13`,fill:`none`,stroke:`#f59e0b`,strokeWidth:`2`,strokeDasharray:`3 3`}),(i||h||m)&&(0,Y.jsx)(`text`,{x:`0`,y:h?-13:-10,textAnchor:`middle`,fill:d?`#059669`:f?`#d97706`:r.pencilColor,className:`font-pencil font-bold select-none ${h?`text-[13px]`:`text-[10px]`}`,opacity:f?1:.75,children:c.id<0?`P${u+1}`:c.id})]},c.id)})}),f&&(0,Y.jsxs)(`g`,{transform:`translate(${f.x}, ${f.y-42})`,className:`pointer-events-none select-none transition-all duration-300`,children:[(0,Y.jsx)(`rect`,{x:`-80`,y:`-24`,width:`160`,height:`32`,rx:`6`,fill:r.id===`parchment`?`#2a221b`:`#14120f`,stroke:`#f59e0b`,strokeWidth:`1.8`,filter:`url(#nodeGlow)`}),(0,Y.jsx)(`polygon`,{points:`-6,8 6,8 0,14`,fill:r.id===`parchment`?`#2a221b`:`#14120f`,stroke:`#f59e0b`,strokeWidth:`1.8`}),(0,Y.jsxs)(`text`,{x:`0`,y:`-8`,textAnchor:`middle`,fill:`#fef08a`,className:`font-cinzel font-bold text-[12px] tracking-wider`,children:[`NODE `,f.sequenceIndex+1,` / `,e.length]}),(0,Y.jsx)(`text`,{x:`0`,y:`4`,textAnchor:`middle`,fill:`#ffffff`,className:`font-garamond italic font-semibold text-[11px]`,children:f.name.length>20?f.name.substring(0,18)+`…`:f.name})]})]})},he=({nodes:e,activeNodeIndex:t,completions:n,theme:r,showLabels:i,showGrid:a,showNodeNumbers:o,autoCenterOnActive:s,onNodeClick:c,hoveredNodeIndex:l,setHoveredNodeIndex:u,transform:d,setTransform:f})=>{let p=(0,z.useRef)(null),m=(0,z.useRef)(!1),h=(0,z.useRef)({x:0,y:0}),g=(0,z.useRef)(null),_=(0,z.useRef)(null),[v,y]=(0,z.useState)(!1),b=(0,z.useRef)(d);b.current=d;let x=(0,z.useCallback)(t=>{if(!p.current||t<0||t>=e.length)return;let n=e[t],{clientWidth:r,clientHeight:i}=p.current,a=b.current.scale,o=Math.max(a,.9);f({x:r/2-n.x*o,y:i/2-n.y*o,scale:o})},[e,f]);(0,z.useEffect)(()=>{s&&t>=0&&x(t)},[t,s,x]),(0,z.useEffect)(()=>{if(p.current&&(!s||t<0)){let{clientWidth:e,clientHeight:t}=p.current,n=e/B,r=t/V,i=Math.min(n,r)*.9;f({x:(e-B*i)/2,y:(t-V*i)/2,scale:Math.max(i,.08)})}},[f,s,t]);let S=e=>{if(e.preventDefault(),!p.current)return;y(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>y(!1),140);let t=p.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=e.deltaY<0?1.15:.85,a=Math.min(Math.max(d.scale*i,.08),3.5);f({x:n-(n-d.x)/d.scale*a,y:r-(r-d.y)/d.scale*a,scale:a})},C=e=>{e.button===0&&(m.current=!0,y(!0),h.current={x:e.clientX-d.x,y:e.clientY-d.y})},w=e=>{m.current&&f(t=>({...t,x:e.clientX-h.current.x,y:e.clientY-h.current.y}))},T=()=>{m.current=!1,y(!1)},E=e=>{if(y(!0),e.touches.length===1)m.current=!0,h.current={x:e.touches[0].clientX-d.x,y:e.touches[0].clientY-d.y};else if(e.touches.length===2){m.current=!1;let t=e.touches[0].clientX-e.touches[1].clientX,n=e.touches[0].clientY-e.touches[1].clientY;g.current=Math.hypot(t,n)}},D=e=>{if(e.touches.length===1&&m.current)f(t=>({...t,x:e.touches[0].clientX-h.current.x,y:e.touches[0].clientY-h.current.y}));else if(e.touches.length===2&&g.current&&p.current){let t=e.touches[0].clientX-e.touches[1].clientX,n=e.touches[0].clientY-e.touches[1].clientY,r=Math.hypot(t,n),i=r/g.current;g.current=r;let a=p.current.getBoundingClientRect(),o=(e.touches[0].clientX+e.touches[1].clientX)/2-a.left,s=(e.touches[0].clientY+e.touches[1].clientY)/2-a.top;f(e=>{let t=Math.min(Math.max(e.scale*i,.08),3.5);return{scale:t,x:o-(o-e.x)/e.scale*t,y:s-(s-e.y)/e.scale*t}})}},O=()=>{m.current=!1,g.current=null,y(!1)},k=r.id!==`parchment`;return(0,Y.jsxs)(`div`,{id:`pencil-map-container`,ref:p,className:`relative w-full h-full overflow-hidden canvas-interactive select-none ${k?`parchment-dark-bg`:`parchment-bg`}`,onWheel:S,onMouseDown:C,onMouseMove:w,onMouseUp:T,onMouseLeave:T,onTouchStart:E,onTouchMove:D,onTouchEnd:O,children:[(0,Y.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 ${k?`map-dark-vignette`:`map-vignette`}`}),(0,Y.jsxs)(`svg`,{id:`pencil-map-svg`,viewBox:`0 0 ${B} ${V}`,width:B,height:V,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${d.scale})`,transformOrigin:`0 0`,transition:v?`none`:`transform 0.4s cubic-bezier(0.16, 1, 0.3, 1)`},className:`absolute top-0 left-0`,children:[(0,Y.jsx)(pe,{theme:r,showGrid:a}),(0,Y.jsx)(fe,{theme:r,showLabels:i,finalNode:e[e.length-1]}),(0,Y.jsx)(me,{nodes:e,activeNodeIndex:t,completions:n,theme:r,showNodeNumbers:o,onNodeClick:c,hoveredNodeIndex:l,setHoveredNodeIndex:u})]})]})},ge=({theme:e,soundEnabled:t,autoCenterOnActive:n,showLabels:r,showGrid:i,showNodeNumbers:a,tracks:s,activeTrack:c,onTrackChange:l,onToggleSound:u,onToggleAutoCenter:d,onToggleLabels:f,onToggleGrid:p,onToggleNodeNumbers:m,onToggleTheme:h,onZoomIn:g,onZoomOut:_,onResetZoom:v,onCenterActiveNode:y})=>{let S=e.id!==`parchment`;return(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 px-1 text-xs select-none`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[s&&s.length>0&&l&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5 bg-black/30 backdrop-blur-md px-2.5 py-1.5 rounded-xl border border-black/20 shadow-md`,children:[(0,Y.jsx)(F,{className:`w-3.5 h-3.5 text-amber-500`}),(0,Y.jsx)(`span`,{className:`font-cinzel text-[10px] font-bold tracking-wider text-amber-600 dark:text-amber-400 uppercase hidden sm:inline`,children:`Track:`}),(0,Y.jsx)(`select`,{value:c,onChange:e=>l(e.target.value),className:`bg-transparent border-none text-xs font-cinzel font-bold text-amber-700 dark:text-amber-300 cursor-pointer focus:outline-none`,children:s.map(e=>(0,Y.jsx)(`option`,{value:e.id,className:`bg-stone-900 text-stone-200`,children:e.name},e.id))})]}),(0,Y.jsxs)(`button`,{id:`toggle-sound-btn`,onClick:u,title:t?`Mute Audio`:`Enable Audio`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md transition-all cursor-pointer ${t?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:[t?(0,Y.jsx)(b,{className:`w-3.5 h-3.5`}):(0,Y.jsx)(T,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Audio`})]}),(0,Y.jsxs)(`button`,{id:`toggle-autocenter-btn`,onClick:d,title:`Auto-Center on Active Node`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md transition-all cursor-pointer ${n?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:[(0,Y.jsx)(x,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Auto-Track`})]}),(0,Y.jsxs)(`button`,{id:`toggle-labels-btn`,onClick:f,title:`Toggle Geographical Labels`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md transition-all cursor-pointer ${r?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:[(0,Y.jsx)(o,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Labels`})]}),(0,Y.jsx)(`button`,{id:`toggle-grid-btn`,onClick:p,title:`Toggle Coordinate Grid`,className:`px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md font-garamond font-semibold transition-all cursor-pointer ${i?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:`Grid`}),(0,Y.jsx)(`button`,{id:`toggle-numbers-btn`,onClick:m,title:`Toggle All Node Numbers`,className:`px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md font-garamond font-semibold transition-all cursor-pointer ${a?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:`#s`}),(0,Y.jsxs)(`button`,{id:`toggle-theme-btn`,onClick:h,title:`Switch Map Lighting Style`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md transition-all cursor-pointer ${S?`bg-amber-500/20 border-amber-500/50 text-amber-300`:`bg-amber-900/10 border-amber-900/20 text-amber-900`}`,children:[S?(0,Y.jsx)(re,{className:`w-3.5 h-3.5`}):(0,Y.jsx)(P,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:S?`Day`:`Night`})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-1 bg-black/30 backdrop-blur-md p-1 rounded-xl border border-black/20 shadow-md`,children:[(0,Y.jsx)(`button`,{id:`zoom-in-btn`,onClick:g,title:`Zoom In`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-300 cursor-pointer`,children:(0,Y.jsx)(R,{className:`w-4 h-4`})}),(0,Y.jsx)(`button`,{id:`zoom-out-btn`,onClick:_,title:`Zoom Out`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-300 cursor-pointer`,children:(0,Y.jsx)(ie,{className:`w-4 h-4`})}),(0,Y.jsx)(`button`,{id:`center-active-btn`,onClick:y,title:`Focus Active Node`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-300 cursor-pointer`,children:(0,Y.jsx)(x,{className:`w-4 h-4 text-amber-400`})}),(0,Y.jsx)(`button`,{id:`reset-zoom-btn`,onClick:v,title:`Fit Entire Map`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-300 cursor-pointer`,children:(0,Y.jsx)(N,{className:`w-4 h-4`})})]})]})},_e=({node:e,activeNodeIndex:t,totalNodes:n,theme:r,onAdvance:a,onRetreat:o,details:s,modalLoading:u,isCompleted:d,toggleLoading:f,onToggleCompletion:m,onSelectProblemForReview:g})=>{let[v,b]=(0,z.useState)(!1),[x,T]=(0,z.useState)(!1);if(!e)return null;let E=r.id!==`parchment`,D=s.length>0,A=w(e.id);return(0,Y.jsxs)(`div`,{id:`node-detail-card`,className:`relative p-4 rounded-2xl border-2 shadow-2xl backdrop-blur-md transition-all duration-300 max-h-[calc(100vh-180px)] overflow-y-auto custom-scrollbar select-none ${E?`bg-[#1c1813]/95 border-[#594634] text-[#f2e6d5]`:`bg-[#fbf5e8]/98 border-[#cbb38e] text-[#2c1d11]`}`,children:[(0,Y.jsx)(`div`,{className:`absolute top-2 left-2 w-2.5 h-2.5 border-t-2 border-l-2 border-amber-600/70 pointer-events-none`}),(0,Y.jsx)(`div`,{className:`absolute top-2 right-2 w-2.5 h-2.5 border-t-2 border-r-2 border-amber-600/70 pointer-events-none`}),(0,Y.jsx)(`div`,{className:`absolute bottom-2 left-2 w-2.5 h-2.5 border-b-2 border-l-2 border-amber-600/70 pointer-events-none`}),(0,Y.jsx)(`div`,{className:`absolute bottom-2 right-2 w-2.5 h-2.5 border-b-2 border-r-2 border-amber-600/70 pointer-events-none`}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b pb-2 mb-3 ${E?`border-amber-900/40`:`border-amber-900/15`}`,children:[(0,Y.jsxs)(`span`,{className:`font-cinzel text-xs font-bold tracking-wider uppercase ${E?`text-amber-400`:`text-amber-800`}`,children:[`Node `,t+1,` / `,n]}),d&&(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel font-bold px-2 py-0.5 rounded border ${E?`bg-emerald-500/20 text-emerald-400 border-emerald-500/40`:`bg-emerald-600/15 text-emerald-800 border-emerald-600/30`}`,children:`✓ Solved`})]}),u?(0,Y.jsxs)(`div`,{className:`py-6 flex flex-col items-center justify-center gap-2`,children:[(0,Y.jsx)(S,{className:`w-5 h-5 text-amber-500 animate-spin`}),(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel font-bold opacity-75 uppercase`,children:`Loading Problem Details...`})]}):D?(0,Y.jsx)(`div`,{className:`space-y-3.5`,children:s.map(t=>(0,Y.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,Y.jsxs)(`div`,{className:`flex justify-between items-start gap-2`,children:[(0,Y.jsxs)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${E?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:[e.id>0?`${e.id}. `:``,t.name]}),(0,Y.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-2 py-0.5 rounded border shrink-0 ${t.difficulty===`Easy`?E?`bg-emerald-950/90 text-emerald-300 border-emerald-500/40`:`bg-emerald-100 text-emerald-900 border-emerald-400`:t.difficulty===`Medium`?E?`bg-amber-950/90 text-amber-300 border-amber-500/40`:`bg-amber-100 text-amber-900 border-amber-400`:E?`bg-rose-950/90 text-rose-300 border-rose-500/40`:`bg-rose-100 text-rose-900 border-rose-400`}`,children:t.difficulty?.toUpperCase()||`MEDIUM`})]}),(0,Y.jsxs)(`div`,{className:`text-xs font-garamond font-semibold ${E?`text-amber-300`:`text-amber-900`}`,children:[`Pattern: `,(0,Y.jsx)(`span`,{className:`italic font-bold`,children:t.pattern||`General`})]}),(0,Y.jsxs)(`div`,{className:`flex gap-4 text-xs font-semibold ${E?`text-stone-300`:`text-stone-800`}`,children:[(0,Y.jsxs)(`div`,{children:[`Time:`,` `,(0,Y.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${E?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:t.optimal_time||`O(N)`})]}),(0,Y.jsxs)(`div`,{children:[`Space:`,` `,(0,Y.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${E?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:t.optimal_space||`O(1)`})]})]}),(0,Y.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2 pt-1 border-t ${E?`border-amber-900/30`:`border-amber-900/10`}`,children:[t.google_doc_url&&(0,Y.jsxs)(`a`,{href:t.google_doc_url,target:`_blank`,rel:`noreferrer`,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl border text-xs font-cinzel font-semibold transition-all cursor-pointer text-center ${E?`border-amber-500/30 bg-amber-500/10 hover:bg-amber-500/20 text-amber-200`:`border-amber-900/20 bg-amber-900/5 hover:bg-amber-900/10 text-amber-900`}`,children:[(0,Y.jsx)(c,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`Google Doc`})]}),(0,Y.jsxs)(`button`,{onClick:()=>g(t.id),className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white text-xs font-cinzel font-bold shadow transition-all active:scale-95 cursor-pointer text-center`,children:[(0,Y.jsx)(L,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`Review Problem`})]})]})]},t.id))}):A?(0,Y.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,Y.jsxs)(`div`,{className:`flex justify-between items-start gap-2`,children:[(0,Y.jsxs)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${E?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:[`LC #`,A.problem_number,`. `,A.name]}),(0,Y.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-2 py-0.5 rounded border shrink-0 ${A.difficulty===`Easy`?E?`bg-emerald-950/90 text-emerald-300 border-emerald-500/40`:`bg-emerald-100 text-emerald-900 border-emerald-400`:A.difficulty===`Medium`?E?`bg-amber-950/90 text-amber-300 border-amber-500/40`:`bg-amber-100 text-amber-900 border-amber-400`:E?`bg-rose-950/90 text-rose-300 border-rose-500/40`:`bg-rose-100 text-rose-900 border-rose-400`}`,children:A.difficulty.toUpperCase()})]}),(0,Y.jsxs)(`div`,{className:`text-xs font-garamond font-semibold ${E?`text-amber-300`:`text-amber-900`}`,children:[`Pattern: `,(0,Y.jsx)(`span`,{className:`italic font-bold`,children:A.pattern})]}),(0,Y.jsxs)(`div`,{className:`flex gap-4 text-xs font-semibold ${E?`text-stone-300`:`text-stone-800`}`,children:[(0,Y.jsxs)(`div`,{children:[`Time:`,` `,(0,Y.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${E?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:A.time_complexity})]}),(0,Y.jsxs)(`div`,{children:[`Space:`,` `,(0,Y.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${E?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:A.space_complexity})]})]}),A.description&&(0,Y.jsx)(`div`,{className:`p-2.5 rounded-xl border text-xs leading-relaxed ${E?`bg-[#252019] border-[#5a4836] text-stone-200`:`bg-white/80 border-[#cbb38e] text-stone-800`}`,children:A.description}),(0,Y.jsxs)(`div`,{className:`space-y-2 pt-1 border-t border-amber-900/20`,children:[(0,Y.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Y.jsxs)(`button`,{onClick:async()=>{if(A&&!v){b(!0);try{await C(A),T(!0),d||m(e.id),setTimeout(()=>T(!1),3e3)}catch(e){console.error(`Failed to activate problem:`,e)}finally{b(!1)}}},disabled:v,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl border text-xs font-cinzel font-bold shadow-sm transition-all active:scale-95 cursor-pointer disabled:opacity-50 ${x?`bg-emerald-600 text-white border-emerald-400`:E?`bg-amber-500/15 border-amber-500/40 hover:bg-amber-500/25 text-amber-300`:`bg-amber-900/10 border-amber-900/30 hover:bg-amber-900/20 text-amber-900`}`,children:[v?(0,Y.jsx)(S,{className:`w-3.5 h-3.5 animate-spin`}):x?(0,Y.jsx)(h,{className:`w-3.5 h-3.5`}):(0,Y.jsx)(y,{className:`w-3.5 h-3.5 text-amber-500`}),(0,Y.jsx)(`span`,{children:x?`Added to Box 1!`:`Learned Today`})]}),(0,Y.jsxs)(`button`,{onClick:async()=>{if(A&&!v){b(!0);try{let t=await C(A);d||m(e.id),g(t.problem_id)}catch(e){console.error(`Failed to launch problem:`,e)}finally{b(!1)}}},disabled:v,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white text-xs font-cinzel font-bold shadow transition-all active:scale-95 cursor-pointer disabled:opacity-50`,children:[(0,Y.jsx)(L,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`Solve / Review`})]})]}),(0,Y.jsxs)(`a`,{href:A.leetcode_url,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-center gap-1.5 p-1.5 rounded-xl border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${E?`border-amber-500/20 hover:bg-amber-500/10 text-stone-300`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:[(0,Y.jsx)(c,{className:`w-3 h-3 text-emerald-500`}),(0,Y.jsx)(`span`,{children:`Open on LeetCode.com`})]})]})]}):(0,Y.jsxs)(`div`,{className:`space-y-3`,children:[(0,Y.jsx)(`div`,{children:(0,Y.jsx)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${E?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:e.name})}),(0,Y.jsxs)(`div`,{className:`p-3 rounded-xl border space-y-2 text-xs ${E?`bg-[#252019] border-[#5a4836] text-stone-200`:`bg-white/90 border-[#cbb38e] text-stone-800`}`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Y.jsx)(l,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h4`,{className:`font-bold text-xs m-0`,children:`No Local Note Synced`}),(0,Y.jsxs)(`p`,{className:`text-[10px] opacity-75 mt-0.5 leading-normal`,children:[`Sync Google Drive or create a note for problem #`,e.id,`.`]})]})]}),(0,Y.jsxs)(`div`,{className:`space-y-1.5 pt-1 border-t ${E?`border-amber-900/20`:`border-amber-900/10`}`,children:[(0,Y.jsx)(`a`,{href:`https://leetcode.com/problemset/?search=${e.id}`,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-between p-1.5 rounded-lg border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${E?`border-amber-500/20 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:(0,Y.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,Y.jsx)(c,{className:`w-3 h-3 text-emerald-500`}),`Search LeetCode #`,e.id]})}),(0,Y.jsx)(`a`,{href:`https://www.google.com/search?q=leetcode+${e.id}`,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-between p-1.5 rounded-lg border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${E?`border-amber-500/20 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:(0,Y.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,Y.jsx)(_,{className:`w-3 h-3 text-amber-500`}),`Search Google Solution`]})})]})]})]}),(0,Y.jsx)(`div`,{className:`pt-3 mt-3 border-t ${E?`border-amber-900/40`:`border-amber-900/15`}`,children:(0,Y.jsx)(`button`,{onClick:()=>m(e.id),disabled:f,className:`w-full py-2.5 rounded-xl font-cinzel text-xs font-bold tracking-wider uppercase flex items-center justify-center gap-2 cursor-pointer transition-all border shadow-sm active:scale-95 disabled:opacity-50 ${d?E?`bg-rose-500/15 border-rose-500/40 text-rose-400 hover:bg-rose-500/25`:`bg-rose-600/10 border-rose-600/30 text-rose-800 hover:bg-rose-600/20`:E?`bg-emerald-500/15 border-emerald-500/40 text-emerald-400 hover:bg-emerald-500/25`:`bg-emerald-600/10 border-emerald-600/30 text-emerald-800 hover:bg-emerald-600/20`}`,children:d?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(i,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{children:`Unmark As Completed`})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(k,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{children:`Mark As Completed`})]})})}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-2 pt-2.5 mt-2.5 border-t ${E?`border-amber-900/40`:`border-amber-900/15`}`,children:[(0,Y.jsxs)(`button`,{onClick:o,disabled:t<=0,className:`flex items-center gap-1 text-[11px] font-cinzel font-semibold px-2.5 py-1.5 rounded-lg border transition-all disabled:opacity-30 cursor-pointer ${E?`border-amber-500/30 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:[(0,Y.jsx)(O,{className:`w-3 h-3`}),(0,Y.jsx)(`span`,{children:`Prev`})]}),(0,Y.jsxs)(`span`,{className:`text-[10px] font-garamond italic font-semibold ${E?`text-stone-400`:`text-stone-600`}`,children:[`Waypoint `,t+1]}),(0,Y.jsxs)(`button`,{onClick:a,disabled:t>=n-1,className:`flex items-center gap-1 text-[11px] font-cinzel font-semibold px-2.5 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 text-white transition-all disabled:opacity-30 cursor-pointer shadow`,children:[(0,Y.jsx)(`span`,{children:`Next`}),(0,Y.jsx)(p,{className:`w-3 h-3`})]})]})]})},ve=({isOpen:e,onClose:t,nodes:n,theme:r,onReset:i})=>{if(!e)return null;let o=r.id!==`parchment`,s=n.length;return(0,Y.jsx)(`div`,{className:`fixed inset-0 z-[120] flex items-center justify-center p-4 bg-black/70 backdrop-blur-sm animate-fade-in select-none`,children:(0,Y.jsxs)(`div`,{id:`expedition-complete-modal`,className:`relative w-full max-w-lg p-6 rounded-2xl border-2 shadow-2xl transition-all ${o?`bg-[#1c1813] border-[#594634] text-[#f2e6d5]`:`bg-[#f7efe0] border-[#c8b28f] text-[#332415]`}`,children:[(0,Y.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-1.5 rounded-lg opacity-60 hover:opacity-100 hover:bg-black/10 cursor-pointer`,children:(0,Y.jsx)(d,{className:`w-5 h-5`})}),(0,Y.jsxs)(`div`,{className:`text-center mb-6`,children:[(0,Y.jsx)(`div`,{className:`inline-flex p-3 rounded-2xl bg-amber-500/20 border border-amber-500/40 text-amber-500 mb-3 shadow-lg shadow-amber-500/20`,children:(0,Y.jsx)(a,{className:`w-10 h-10 animate-bounce`})}),(0,Y.jsx)(`h2`,{className:`font-cinzel-dec font-bold text-2xl md:text-3xl text-amber-600 dark:text-amber-400`,children:`Expedition Completed!`}),(0,Y.jsxs)(`p`,{className:`font-garamond italic text-sm md:text-base opacity-80 mt-1`,children:[`All `,s,` Waypoints and the entire ancient trail are now fully illuminated.`]})]}),(0,Y.jsxs)(`div`,{className:`grid grid-cols-3 gap-3 mb-6`,children:[(0,Y.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,Y.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:s}),(0,Y.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Nodes Solved`})]}),(0,Y.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,Y.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:`7`}),(0,Y.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Biomes Crossed`})]}),(0,Y.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,Y.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:`1,620m`}),(0,Y.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Peak Citadel`})]})]}),(0,Y.jsxs)(`div`,{className:`space-y-2 mb-6 max-h-48 overflow-y-auto custom-scrollbar pr-1`,children:[n.length>0&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(g,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Waypoint 1:`}),(0,Y.jsx)(`span`,{children:n[0].name})]}),n.length>25&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(g,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Waypoint 25:`}),(0,Y.jsx)(`span`,{children:n[24].name})]}),n.length>50&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(g,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Waypoint 50:`}),(0,Y.jsx)(`span`,{children:n[49].name})]}),n.length>75&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(g,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Waypoint 75:`}),(0,Y.jsx)(`span`,{children:n[74].name})]}),n.length>0&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(g,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Final Milestone:`}),(0,Y.jsx)(`span`,{className:`text-amber-600 dark:text-amber-300 font-bold`,children:n[n.length-1].name})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsxs)(`button`,{onClick:()=>{i(),t()},className:`flex-1 flex items-center justify-center gap-1.5 py-2.5 px-4 rounded-xl border border-stone-400 dark:border-stone-700 font-cinzel font-semibold text-xs transition-all hover:bg-stone-500/10 cursor-pointer`,children:[(0,Y.jsx)(u,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{children:`Retrace From Start`})]}),(0,Y.jsxs)(`button`,{onClick:t,className:`flex-1 flex items-center justify-center gap-1.5 py-2.5 px-4 rounded-xl bg-amber-600 hover:bg-amber-500 text-white font-cinzel font-bold text-xs shadow-lg transition-all cursor-pointer`,children:[(0,Y.jsx)(f,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{children:`Admire Map`})]})]})]})})},ye=({nodes:e,activeNodeIndex:t,setActiveNodeIndex:n,completions:r,theme:i,onToggleCompletion:a,onSelectProblemForReview:o,onSwitchToMap:s,tracks:l,activeTrack:u,onTrackChange:f})=>{let p=i.id!==`parchment`,[h,y]=(0,z.useState)(``),[b,S]=(0,z.useState)(`all`),[C,T]=(0,z.useState)(`all`),[E,O]=(0,z.useState)(`trail`),[k,M]=(0,z.useState)(null),te=(0,z.useRef)(null),N=(0,z.useMemo)(()=>{let t=new Set;return e.forEach(e=>{e.regionName&&t.add(e.regionName)}),Array.from(t)},[e]),P=e.length,I=(0,z.useMemo)(()=>e.filter(e=>r.has(e.id)).length,[e,r]),re=P>0?Math.round(I/P*100):0,R=(0,z.useMemo)(()=>{let t=h.trim().toLowerCase(),n=t.replace(/^#/,``);return e.filter(e=>{let i=r.has(e.id);if(b===`solved`&&!i||b===`unsolved`&&i||C!==`all`&&e.regionName!==C)return!1;if(t){let r=String(e.id).includes(n),i=String(e.sequenceIndex+1)===n,a=e.name.toLowerCase().includes(t),o=e.regionName.toLowerCase().includes(t),s=e.biome.toLowerCase().includes(t);if(!r&&!i&&!a&&!o&&!s)return!1}return!0}).sort((e,t)=>{switch(E){case`number_asc`:return e.id-t.id;case`number_desc`:return t.id-e.id;case`name`:return e.name.localeCompare(t.name);default:return e.sequenceIndex-t.sequenceIndex}})},[e,r,b,C,h,E]),ie=()=>{let e=document.getElementById(`waypoint-item-${t}`);e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),J.playPencilScratch())};(0,z.useEffect)(()=>{if(t>=0&&!h&&b===`all`&&C===`all`){let e=setTimeout(()=>{let e=document.getElementById(`waypoint-item-${t}`);e&&e.scrollIntoView({behavior:`auto`,block:`center`})},80);return()=>clearTimeout(e)}},[t,h,b,C]);let B=e=>{switch(e){case`forest`:return p?`bg-emerald-950/80 text-emerald-300 border-emerald-500/40`:`bg-emerald-100 text-emerald-900 border-emerald-400`;case`river`:return p?`bg-cyan-950/80 text-cyan-300 border-cyan-500/40`:`bg-cyan-100 text-cyan-900 border-cyan-400`;case`mountain`:return p?`bg-stone-800 text-stone-300 border-stone-600`:`bg-stone-200 text-stone-800 border-stone-400`;case`coast`:return p?`bg-sky-950/80 text-sky-300 border-sky-500/40`:`bg-sky-100 text-sky-900 border-sky-400`;case`ancient_ruins`:return p?`bg-amber-950/80 text-amber-300 border-amber-500/40`:`bg-amber-100 text-amber-900 border-amber-400`;default:return p?`bg-stone-900 text-stone-300 border-stone-700`:`bg-stone-100 text-stone-700 border-stone-300`}};return(0,Y.jsxs)(`div`,{className:`relative w-full h-full flex flex-col overflow-hidden select-none transition-colors duration-300 ${p?`parchment-dark-bg text-[#f4ebd9]`:`parchment-bg text-[#2c2014]`}`,children:[(0,Y.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 ${p?`map-dark-vignette`:`map-vignette`}`}),(0,Y.jsx)(`div`,{className:`relative z-20 px-4 pt-16 pb-3 border-b backdrop-blur-md transition-colors ${p?`bg-[#1a1612]/90 border-[#4a392b]`:`bg-[#f7efe0]/90 border-[#c8b28f]`}`,children:(0,Y.jsxs)(`div`,{className:`max-w-6xl mx-auto space-y-3`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2.5 items-stretch sm:items-center justify-between`,children:[(0,Y.jsxs)(`div`,{className:`relative flex-1`,children:[(0,Y.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none`,children:(0,Y.jsx)(_,{className:`w-4 h-4 text-amber-600 dark:text-amber-400`})}),(0,Y.jsx)(`input`,{id:`journey-search-input`,type:`text`,value:h,onChange:e=>y(e.target.value),placeholder:`Search problem title or #number (e.g. 1, Two Sum, tree)...`,className:`w-full pl-9 pr-8 py-2 rounded-xl text-xs md:text-sm font-garamond font-semibold border-2 shadow-inner focus:outline-none transition-all ${p?`bg-[#231e18] border-[#5a4836] text-[#f4ebd9] placeholder-stone-500 focus:border-amber-500/70`:`bg-[#fcf7ee] border-[#cfbc9c] text-[#2c2014] placeholder-stone-500 focus:border-amber-700/60`}`}),h&&(0,Y.jsx)(`button`,{onClick:()=>y(``),title:`Clear search`,className:`absolute inset-y-0 right-0 pr-2.5 flex items-center text-stone-400 hover:text-amber-600 cursor-pointer`,children:(0,Y.jsx)(d,{className:`w-4 h-4`})})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[l&&l.length>0&&f&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-xl border text-xs font-cinzel font-bold shadow-sm ${p?`bg-[#231e18] border-[#5a4836] text-amber-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-amber-900`}`,children:[(0,Y.jsx)(F,{className:`w-3.5 h-3.5 text-amber-500 shrink-0`}),(0,Y.jsx)(`span`,{className:`text-[10px] uppercase opacity-75 hidden md:inline`,children:`Track:`}),(0,Y.jsx)(`select`,{value:u,onChange:e=>f(e.target.value),className:`bg-transparent border-none text-xs font-cinzel font-bold cursor-pointer focus:outline-none`,children:l.map(e=>(0,Y.jsx)(`option`,{value:e.id,className:`bg-stone-900 text-stone-200`,children:e.name},e.id))})]}),(0,Y.jsxs)(`button`,{onClick:ie,title:`Scroll to active waypoint along trail`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border text-xs font-cinzel font-bold transition-all shadow-sm active:scale-95 cursor-pointer ${p?`bg-amber-500/20 border-amber-500/40 text-amber-300 hover:bg-amber-500/30`:`bg-amber-600/15 border-amber-600/30 text-amber-900 hover:bg-amber-600/25`}`,children:[(0,Y.jsx)(x,{className:`w-3.5 h-3.5 text-amber-500 animate-spin-slow`}),(0,Y.jsx)(`span`,{className:`hidden sm:inline`,children:`Current Waypoint`}),(0,Y.jsxs)(`span`,{className:`font-mono text-[11px]`,children:[`#`,t+1]})]})]})]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2.5 pt-1 text-xs`,children:[(0,Y.jsx)(`div`,{className:`flex items-center gap-1`,children:[`all`,`solved`,`unsolved`].map(e=>{let t=b===e,n=e===`all`?P:e===`solved`?I:P-I;return(0,Y.jsxs)(`button`,{onClick:()=>S(e),className:`px-2.5 py-1 rounded-lg font-cinzel text-xs font-bold capitalize transition-all cursor-pointer border ${t?`bg-amber-600 border-amber-500 text-white shadow-sm`:p?`bg-[#231e18] border-[#4a392b] text-stone-400 hover:text-stone-200`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-600 hover:text-stone-900`}`,children:[e,` `,(0,Y.jsxs)(`span`,{className:`text-[10px] opacity-80`,children:[`(`,n,`)`]})]},e)})}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 rounded-lg border text-xs font-garamond font-semibold ${p?`bg-[#231e18] border-[#4a392b] text-stone-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-800`}`,children:[(0,Y.jsx)(ne,{className:`w-3 h-3 text-amber-500`}),(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel uppercase opacity-75`,children:`Region:`}),(0,Y.jsxs)(`select`,{value:C,onChange:e=>T(e.target.value),className:`bg-transparent border-none text-xs font-garamond font-bold cursor-pointer focus:outline-none max-w-[140px] truncate`,children:[(0,Y.jsxs)(`option`,{value:`all`,className:`bg-stone-900 text-stone-200`,children:[`All Regions (`,P,`)`]}),N.map(e=>(0,Y.jsx)(`option`,{value:e,className:`bg-stone-900 text-stone-200`,children:e},e))]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 rounded-lg border text-xs font-garamond font-semibold ${p?`bg-[#231e18] border-[#4a392b] text-stone-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-800`}`,children:[(0,Y.jsx)(D,{className:`w-3 h-3 text-amber-500`}),(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel uppercase opacity-75`,children:`Sort:`}),(0,Y.jsxs)(`select`,{value:E,onChange:e=>O(e.target.value),className:`bg-transparent border-none text-xs font-garamond font-bold cursor-pointer focus:outline-none`,children:[(0,Y.jsx)(`option`,{value:`trail`,className:`bg-stone-900 text-stone-200`,children:`Trail Sequence`}),(0,Y.jsx)(`option`,{value:`number_asc`,className:`bg-stone-900 text-stone-200`,children:`Problem # (Asc)`}),(0,Y.jsx)(`option`,{value:`number_desc`,className:`bg-stone-900 text-stone-200`,children:`Problem # (Desc)`}),(0,Y.jsx)(`option`,{value:`name`,className:`bg-stone-900 text-stone-200`,children:`Title (A-Z)`})]})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsxs)(`span`,{className:`font-garamond italic text-xs opacity-80`,children:[`Showing `,R.length,` of `,P]}),(0,Y.jsx)(`div`,{className:`w-20 sm:w-28 h-2 rounded-full bg-black/20 overflow-hidden border border-amber-900/20`,children:(0,Y.jsx)(`div`,{className:`h-full bg-gradient-to-r from-amber-500 to-emerald-500 transition-all duration-500`,style:{width:`${re}%`}})}),(0,Y.jsxs)(`span`,{className:`font-cinzel text-[10px] font-bold text-emerald-600 dark:text-emerald-400`,children:[re,`%`]})]})]})]})}),(0,Y.jsx)(`div`,{ref:te,className:`relative z-20 flex-1 overflow-y-auto px-4 py-4 custom-scrollbar`,children:(0,Y.jsx)(`div`,{className:`max-w-6xl mx-auto space-y-2.5 pb-8`,children:R.length===0?(0,Y.jsxs)(`div`,{className:`p-10 text-center rounded-2xl border-2 border-dashed my-8 transition-colors ${p?`border-amber-900/40 bg-[#1e1914]/60 text-stone-400`:`border-amber-900/20 bg-[#f9f2e3]/80 text-stone-600`}`,children:[(0,Y.jsx)(x,{className:`w-10 h-10 mx-auto mb-3 text-amber-500 opacity-60 animate-bounce`}),(0,Y.jsx)(`h3`,{className:`font-cinzel font-bold text-base text-amber-700 dark:text-amber-400 mb-1`,children:`No Milestones Found`}),(0,Y.jsxs)(`p`,{className:`font-garamond italic text-sm max-w-md mx-auto mb-4`,children:[`No trail waypoints matched "`,h||`the current filter settings`,`". Try adjusting your search keywords or filter criteria.`]}),(h||b!==`all`||C!==`all`)&&(0,Y.jsx)(`button`,{onClick:()=>{y(``),S(`all`),T(`all`)},className:`px-4 py-1.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white font-cinzel text-xs font-bold transition-all shadow cursor-pointer`,children:`Clear All Filters`})]}):R.map(e=>{let i=r.has(e.id),l=e.sequenceIndex===t,u=k===e.id,d=w(e.id),f=d?.difficulty,h=d?.pattern;return(0,Y.jsxs)(`div`,{id:`waypoint-item-${e.sequenceIndex}`,className:`group relative rounded-xl border-2 transition-all duration-200 shadow-md ${l?p?`bg-[#2c2217] border-amber-500/80 shadow-amber-500/20 shadow-lg ring-1 ring-amber-500/40`:`bg-[#fffaf0] border-amber-700 shadow-amber-700/20 shadow-lg ring-1 ring-amber-700/30`:p?`bg-[#1f1a14]/90 border-[#4a392b] hover:border-amber-600/50 hover:bg-[#251f18]`:`bg-[#fcf8ef]/95 border-[#c8b28f] hover:border-amber-700/60 hover:bg-[#fcf5e6]`}`,children:[l&&(0,Y.jsxs)(`div`,{className:`absolute -top-2.5 left-4 px-2 py-0.5 rounded-md bg-amber-600 text-white font-cinzel text-[9px] font-bold tracking-wider uppercase flex items-center gap-1 shadow`,children:[(0,Y.jsx)(j,{className:`w-2.5 h-2.5 text-amber-200`}),`Current Trailhead`]}),(0,Y.jsxs)(`div`,{className:`p-3 sm:p-3.5 flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start sm:items-center gap-3 min-w-0 flex-1`,children:[(0,Y.jsx)(`button`,{onClick:()=>{a(e.id)},title:i?`Mark as Unsolved`:`Mark as Solved`,className:`mt-0.5 sm:mt-0 p-1 rounded-lg hover:bg-black/10 dark:hover:bg-white/10 transition-colors cursor-pointer shrink-0`,children:i?(0,Y.jsx)(g,{className:`w-5 h-5 text-emerald-500 transition-transform active:scale-125`}):(0,Y.jsx)(A,{className:`w-5 h-5 text-stone-400 hover:text-amber-600 transition-colors`})}),(0,Y.jsxs)(`div`,{className:`px-2 py-1 rounded-lg border font-cinzel text-[11px] font-bold text-center shrink-0 min-w-[54px] ${l?`bg-amber-500/20 border-amber-500 text-amber-500`:p?`bg-black/30 border-[#4a392b] text-stone-400`:`bg-amber-900/5 border-[#c8b28f] text-stone-600`}`,children:[(0,Y.jsx)(`span`,{className:`text-[9px] block uppercase opacity-75 leading-none`,children:`Step`}),(0,Y.jsxs)(`span`,{children:[`#`,e.sequenceIndex+1]})]}),(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-mono text-[10px] font-bold ${p?`bg-[#2d251d] text-amber-400 border border-amber-900/50`:`bg-amber-900/10 text-amber-900 border border-amber-900/20`}`,children:e.id>0?`LC #${e.id}`:`Custom`}),f&&(0,Y.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-cinzel text-[9px] font-bold uppercase tracking-wider border ${f===`Easy`?`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/30`:f===`Medium`?`bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/30`:`bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/30`}`,children:f}),h&&(0,Y.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-cinzel text-[9px] font-medium border ${p?`bg-purple-950/30 text-purple-300 border-purple-800/40`:`bg-purple-50 text-purple-800 border-purple-200`}`,children:h}),(0,Y.jsx)(`h4`,{onClick:()=>{n(e.sequenceIndex),J.playNodeLightUp(e.sequenceIndex,P)},className:`font-garamond font-bold text-sm sm:text-base leading-tight truncate cursor-pointer hover:underline ${l?`text-amber-700 dark:text-amber-300 font-bold`:p?`text-stone-200 hover:text-amber-300`:`text-stone-900 hover:text-amber-800`}`,children:e.name}),i&&(0,Y.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-1.5 py-0.5 rounded bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 border border-emerald-500/30`,children:`✓ Solved`})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-1`,children:[(0,Y.jsx)(`span`,{className:`px-1.5 py-0.5 rounded text-[10px] font-cinzel font-semibold border ${B(e.biome)}`,children:e.regionName}),(0,Y.jsxs)(`span`,{className:`text-[11px] font-garamond italic text-stone-500`,children:[`Elevation: `,e.elevation,`m`]})]})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0 self-end sm:self-center pl-10 sm:pl-0`,children:[(0,Y.jsxs)(`button`,{onClick:()=>{n(e.sequenceIndex),J.playNodeLightUp(e.sequenceIndex,P),s(e.sequenceIndex)},title:`Locate and Center on Hand-Drawn Map`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg border text-xs font-cinzel font-bold transition-all shadow-sm active:scale-95 cursor-pointer ${p?`bg-amber-500/15 border-amber-500/40 text-amber-300 hover:bg-amber-500/25`:`bg-amber-700/10 border-amber-700/30 text-amber-900 hover:bg-amber-700/20`}`,children:[(0,Y.jsx)(ee,{className:`w-3.5 h-3.5 text-amber-500`}),(0,Y.jsx)(`span`,{className:`hidden md:inline`,children:`Locate`})]}),(0,Y.jsxs)(`button`,{onClick:()=>o(String(e.id)),title:`Launch Spaced Repetition Review for this problem`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 text-white text-xs font-cinzel font-bold shadow-sm transition-all active:scale-95 cursor-pointer`,children:[(0,Y.jsx)(L,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`hidden md:inline`,children:`Review`})]}),(0,Y.jsx)(`a`,{href:e.id>0?`https://leetcode.com/problemset/?search=${e.id}`:`https://www.google.com/search?q=${encodeURIComponent(e.name)}`,target:`_blank`,rel:`noreferrer`,title:`Open on LeetCode / External Source`,className:`p-1.5 rounded-lg border transition-all cursor-pointer ${p?`border-stone-700 text-stone-400 hover:text-stone-200 hover:bg-white/5`:`border-stone-300 text-stone-600 hover:text-stone-900 hover:bg-black/5`}`,children:(0,Y.jsx)(c,{className:`w-3.5 h-3.5`})}),(0,Y.jsx)(`button`,{onClick:()=>{M(u?null:e.id),u||n(e.sequenceIndex)},title:u?`Hide Field Notes`:`View Field Notes & Lore`,className:`p-1.5 rounded-lg border transition-all cursor-pointer ${u?`bg-amber-600/20 border-amber-500 text-amber-500`:p?`border-stone-700 text-stone-400 hover:text-stone-200`:`border-stone-300 text-stone-600 hover:text-stone-900`}`,children:u?(0,Y.jsx)(v,{className:`w-3.5 h-3.5`}):(0,Y.jsx)(m,{className:`w-3.5 h-3.5`})})]})]}),u&&(0,Y.jsx)(`div`,{className:`px-4 py-3 border-t text-xs font-garamond animate-fade-in ${p?`border-amber-900/40 bg-black/20 text-stone-300`:`border-amber-900/15 bg-amber-950/5 text-stone-700`}`,children:(0,Y.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Y.jsx)(`span`,{className:`font-cinzel font-bold text-amber-600 dark:text-amber-400 text-[10px] uppercase shrink-0 pt-0.5`,children:`Cartographer's Journal:`}),(0,Y.jsx)(`span`,{className:`italic`,children:e.lore})]}),d?.description&&(0,Y.jsxs)(`div`,{className:`p-2.5 rounded border border-amber-900/20 bg-amber-900/5 dark:bg-black/30 font-mono text-[11px] leading-relaxed whitespace-pre-line text-stone-600 dark:text-stone-300`,children:[(0,Y.jsx)(`div`,{className:`font-cinzel font-bold text-amber-600 dark:text-amber-400 text-[10px] uppercase mb-1 tracking-wider`,children:`Canonical Problem Description`}),d.description]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-4 text-[11px] pt-1 opacity-80 flex-wrap`,children:[(0,Y.jsxs)(`span`,{children:[`Trail Location: `,(0,Y.jsx)(`strong`,{className:`font-cinzel`,children:e.regionName})]}),(0,Y.jsxs)(`span`,{children:[`Terrain Biome: `,(0,Y.jsx)(`strong`,{className:`capitalize`,children:e.biome})]}),d?.time_complexity&&(0,Y.jsxs)(`span`,{children:[`Time: `,(0,Y.jsx)(`strong`,{className:`font-mono text-amber-600 dark:text-amber-400`,children:d.time_complexity})]}),d?.space_complexity&&(0,Y.jsxs)(`span`,{children:[`Space: `,(0,Y.jsx)(`strong`,{className:`font-mono text-purple-600 dark:text-purple-400`,children:d.space_complexity})]}),(0,Y.jsxs)(`span`,{children:[`Survey Elevation: `,(0,Y.jsxs)(`strong`,{children:[e.elevation,` meters`]})]})]})]})})]},e.id)})})})]})};function be({onSelectProblemForReview:e}){let[t,r]=(0,z.useState)(new Set),[i,a]=(0,z.useState)({}),[o,c]=(0,z.useState)([]),[l,u]=(0,z.useState)([]),[d,f]=(0,z.useState)(()=>localStorage.getItem(`algospaced_active_track`)||`leetcode-150`),[p,m]=(0,z.useState)(!0),[h,g]=(0,z.useState)(0),[_,v]=(0,z.useState)(null),[y,b]=(0,z.useState)([]),[C,w]=(0,z.useState)(!1),[T,E]=(0,z.useState)(!1),[D,O]=(0,z.useState)(`parchment`),[k,A]=(0,z.useState)(`map`),[j,ee]=(0,z.useState)(!0),[N,P]=(0,z.useState)(!0),[F,ne]=(0,z.useState)(!0),[L,re]=(0,z.useState)(!1),[R,ie]=(0,z.useState)(!1),[H,U]=(0,z.useState)(!1),[oe,se]=(0,z.useState)(!0),W=ce[D]||ce.parchment,[G,K]=(0,z.useState)({x:0,y:0,scale:.5}),q=(0,z.useMemo)(()=>ae(o,i),[o,i]),X=q.length,Z=h>=0&&h{J.setEnabled(j)},[j]);let le=async()=>{try{let{data:{session:e}}=await n.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},i=localStorage.getItem(`algospaced_active_track`)||`leetcode-150`,[o,s,l,d]=await Promise.all([fetch(`/api/journey-progress`,{headers:t}),fetch(`/api/journey-progress/titles`,{headers:t}),fetch(`/api/journey-progress/sequences`,{headers:t}),fetch(`/api/journey-progress/sequence/${i}`,{headers:t})]);if(o.ok&&s.ok&&l.ok&&d.ok){let e=await o.json(),t=await s.json(),n=await l.json(),i=await d.json(),f=new Set(e);r(f),a(t),u(n),c(i);let p=i.findIndex(e=>!f.has(e));g(p>=0?p:0)}}catch(e){console.error(`Error fetching journey data:`,e)}finally{m(!1)}};(0,z.useEffect)(()=>{le()},[]);let ue=(0,z.useCallback)(async e=>{b([]),w(!0);try{let{data:{session:t}}=await n.auth.getSession(),r=t?t.access_token:`sandbox`,i=await fetch(`/api/reviews/problems/${e}`,{headers:{Authorization:`Bearer ${r}`}});if(i.ok){let e=await i.json();b(e)}}catch(e){console.error(`Error fetching problem details:`,e)}finally{w(!1)}},[]);(0,z.useEffect)(()=>{Z&&ue(Z.id)},[Z?.id,ue]);let de=async e=>{m(!0),f(e),localStorage.setItem(`algospaced_active_track`,e);try{let{data:{session:r}}=await n.auth.getSession(),i={Authorization:`Bearer ${r?r.access_token:`sandbox`}`},a=await fetch(`/api/journey-progress/sequence/${e}`,{headers:i});if(a.ok){let e=await a.json();c(e);let n=e.findIndex(e=>!t.has(e));g(n>=0?n:0)}}catch(e){console.error(`Error switching track:`,e)}finally{m(!1)}},fe=(0,z.useCallback)(()=>{g(e=>{if(e{g(e=>e>0?(J.playPencilScratch(),e-1):0)},[]),me=(0,z.useCallback)(e=>{let t=Math.max(0,Math.min(X-1,e));g(t),J.playNodeLightUp(t,X),t===X-1&&J.playVictoryChime()},[X]),be=(0,z.useCallback)(()=>{g(0),J.playPencilScratch()},[]),xe=async e=>{E(!0);try{let{data:{session:i}}=await n.auth.getSession(),a=i?i.access_token:`sandbox`;if((await fetch(`/api/journey-progress/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify({problem_number:e})})).ok){let n=new Set(t);n.has(e)?(n.delete(e),J.playPencilScratch()):(n.add(e),J.playNodeLightUp(h,X),o.every(e=>n.has(e))&&(J.playVictoryChime(),s({particleCount:130,spread:85,origin:{y:.6},colors:[`#10b981`,`#34d399`,`#f59e0b`,`#ffffff`]}),U(!0))),r(n)}}catch(e){console.error(`Error toggling progress:`,e)}finally{E(!1)}};(0,z.useEffect)(()=>{let e=e=>{let t=e.target;[`INPUT`,`TEXTAREA`,`SELECT`].includes(t?.tagName)||t?.isContentEditable||k===`map`&&(e.code===`Space`||e.code===`ArrowRight`||e.code===`ArrowDown`?(e.preventDefault(),fe()):e.code===`ArrowLeft`||e.code===`ArrowUp`?(e.preventDefault(),pe()):e.code===`KeyR`&&(e.preventDefault(),be()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[fe,pe,be,k]);let Q=(0,z.useRef)(null),Se=(0,z.useCallback)(()=>{let e=Q.current?.clientWidth||window.innerWidth,t=Q.current?.clientHeight||window.innerHeight,n=e/2,r=t/2;K(e=>{let t=Math.min(e.scale*1.25,3.5);return{scale:t,x:n-(n-e.x)/e.scale*t,y:r-(r-e.y)/e.scale*t}})},[]),Ce=(0,z.useCallback)(()=>{let e=Q.current?.clientWidth||window.innerWidth,t=Q.current?.clientHeight||window.innerHeight,n=e/2,r=t/2;K(e=>{let t=Math.max(e.scale*.8,.08);return{scale:t,x:n-(n-e.x)/e.scale*t,y:r-(r-e.y)/e.scale*t}})},[]),we=(0,z.useCallback)(()=>{let e=Q.current?.clientWidth||window.innerWidth,t=Q.current?.clientHeight||window.innerHeight,n=e/B,r=t/V,i=Math.min(n,r)*.9;K({x:(e-B*i)/2,y:(t-V*i)/2,scale:i})},[]),Te=(0,z.useCallback)(()=>{if(!Z)return;let e=Q.current?.clientWidth||window.innerWidth,t=Q.current?.clientHeight||window.innerHeight,n=Math.max(G.scale,.95);K({x:e/2-Z.x*n,y:t/2-Z.y*n,scale:n})},[Z,G.scale]),Ee=(0,z.useCallback)(e=>{if(A(`map`),typeof e==`number`&&e>=0&&eA(`map`),title:`Hand-Drawn Cartography Map`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg font-cinzel text-xs font-bold transition-all cursor-pointer ${k===`map`?`bg-amber-600 text-white shadow-sm`:$?`text-stone-400 hover:text-stone-200`:`text-stone-600 hover:text-stone-900`}`,children:[(0,Y.jsx)(te,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`Map`})]}),(0,Y.jsxs)(`button`,{id:`view-mode-list-btn`,onClick:()=>A(`list`),title:`Problem & Waypoints List View`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg font-cinzel text-xs font-bold transition-all cursor-pointer ${k===`list`?`bg-amber-600 text-white shadow-sm`:$?`text-stone-400 hover:text-stone-200`:`text-stone-600 hover:text-stone-900`}`,children:[(0,Y.jsx)(M,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`List`})]})]}),k===`map`&&(0,Y.jsxs)(`button`,{id:`toggle-journal-btn`,onClick:()=>se(e=>!e),title:`Toggle Explorer Field Notes Journal`,className:`flex items-center gap-1.5 px-3 py-2 rounded-xl border-2 shadow-lg backdrop-blur-md font-cinzel text-xs font-bold transition-all cursor-pointer ${oe?`bg-amber-600 border-amber-400 text-white`:$?`bg-[#1a1612]/90 border-[#4a392b] text-[#e2d5c2]`:`bg-[#f7efe0]/95 border-[#c8b28f] text-[#332415]`}`,children:[(0,Y.jsx)(I,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{className:`hidden sm:inline`,children:`Journal`})]})]})]}),k===`map`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`main`,{ref:Q,className:`relative flex-1 w-full h-full`,children:[(0,Y.jsx)(he,{nodes:q,activeNodeIndex:h,completions:t,theme:W,showLabels:F,showGrid:L,showNodeNumbers:R,autoCenterOnActive:N,onNodeClick:me,hoveredNodeIndex:_,setHoveredNodeIndex:v,transform:G,setTransform:K}),oe&&(0,Y.jsx)(`aside`,{className:`absolute top-16 left-2.5 z-30 w-72 md:w-84 pointer-events-auto transition-all animate-fade-in`,children:(0,Y.jsx)(_e,{node:Z,activeNodeIndex:h,totalNodes:X,theme:W,onAdvance:fe,onRetreat:pe,details:y,modalLoading:C,isCompleted:Z?t.has(Z.id):!1,toggleLoading:T,onToggleCompletion:xe,onSelectProblemForReview:e})})]}),(0,Y.jsx)(`footer`,{className:`absolute bottom-2.5 left-2.5 right-2.5 z-30 pointer-events-auto max-w-5xl mx-auto w-[calc(100%-1.25rem)]`,children:(0,Y.jsx)(ge,{theme:W,soundEnabled:j,autoCenterOnActive:N,showLabels:F,showGrid:L,showNodeNumbers:R,tracks:l,activeTrack:d,onTrackChange:de,onToggleSound:()=>ee(e=>!e),onToggleAutoCenter:()=>P(e=>!e),onToggleLabels:()=>ne(e=>!e),onToggleGrid:()=>re(e=>!e),onToggleNodeNumbers:()=>ie(e=>!e),onToggleTheme:()=>O(e=>e===`parchment`?`dark_parchment`:`parchment`),onZoomIn:Se,onZoomOut:Ce,onResetZoom:we,onCenterActiveNode:Te})})]}):(0,Y.jsx)(`main`,{className:`relative flex-1 w-full h-full overflow-hidden`,children:(0,Y.jsx)(ye,{nodes:q,activeNodeIndex:h,setActiveNodeIndex:g,completions:t,theme:W,onToggleCompletion:xe,onSelectProblemForReview:e,onSwitchToMap:Ee,tracks:l,activeTrack:d,onTrackChange:de,onToggleTheme:()=>O(e=>e===`parchment`?`dark_parchment`:`parchment`)})}),(0,Y.jsx)(ve,{isOpen:H,onClose:()=>U(!1),nodes:q,theme:W,onReset:be})]})}export{be as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 b/algospaced-ui/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..0acaaff03d4bb7606de02a827aeee338e5a86910 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff b/algospaced-ui/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff new file mode 100644 index 0000000000000000000000000000000000000000..b804d7b33a3fa5b2587d2d1d55006aed678e3eb2 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf b/algospaced-ui/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c6f9a5e7c03f9e64e9c7b4773a8e37ade8eaf406 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9ff4a5e04421e5107f74c28e27354e0b2a4e7ef8 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff new file mode 100644 index 0000000000000000000000000000000000000000..9759710d1d3e16eb10012d56babb73f2479ba9f0 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..f390922eceffe1f6dfb81a3dc086a92d98171b02 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff new file mode 100644 index 0000000000000000000000000000000000000000..9bdd534fd2beb9b878f0219da9d63ffba56677e2 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..75344a1f98e37e2c631e178065854c3a81fb842f Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..f522294ff0f3f8c52dfdaef7ebfaa06ebfcfaabf Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf b/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4e98259c3b54076d684bf3459baeaeae8dbce97a Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff b/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff new file mode 100644 index 0000000000000000000000000000000000000000..e7730f66275c87c28f26530d89264cffecf90be0 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 b/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..395f28beac23c7b0f7f3a1e714bd8dac253dd3bc Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf b/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b8461b275fae76efd0d21fd0f1aaa696a5b10f9a Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 b/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..735f6948d63c8cc7f8233735bb9c8d843c83d804 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff b/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff new file mode 100644 index 0000000000000000000000000000000000000000..acab069f90b6fe6301a004e6f8beaf6a0db48bce Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 b/algospaced-ui/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..ab2ad21da6fbe6c171bb869240954d0ead8f68fd Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff b/algospaced-ui/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff new file mode 100644 index 0000000000000000000000000000000000000000..f38136ac1cc2dcdc9d9b10b8521487468b1f768c Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf b/algospaced-ui/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4060e627dc341c1854260cbc3f7386e222a4d297 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 b/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..5931794de4a2a485fa70099bf2659b145976d043 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf b/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dc007977ee709a236d9e82719cf7d4e5577a81b9 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff b/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff new file mode 100644 index 0000000000000000000000000000000000000000..67807b0bd4f867853271f5917fb3adf377f93f53 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf b/algospaced-ui/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0e9b0f354ad460202bba554359f5adcc8da666b7 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff b/algospaced-ui/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff new file mode 100644 index 0000000000000000000000000000000000000000..6f43b594b6c1d863a0e3f93b001f8dd503316464 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 b/algospaced-ui/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b50920e138807f385d0b0359f4f0f09891f18406 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 b/algospaced-ui/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..eb24a7ba282b03d830fa6c63ee897d92a5188736 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff b/algospaced-ui/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff new file mode 100644 index 0000000000000000000000000000000000000000..21f5812968c42392a3eaea9b0c6320870b6b8b38 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf b/algospaced-ui/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dd45e1ed2e18b32c516d9b481ebed3cb8bffa711 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf b/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf new file mode 100644 index 0000000000000000000000000000000000000000..728ce7a1e2cb689df32c3a6c26e1bd072dcf2acb Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 b/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..29657023adc09956249f6295746c8ce4469b50d3 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff b/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff new file mode 100644 index 0000000000000000000000000000000000000000..0ae390d74c9f665cf8b1e5ea5483395da7513444 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff b/algospaced-ui/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff new file mode 100644 index 0000000000000000000000000000000000000000..eb5159d4c1ca83fb92b3190223698427df0e010c Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf b/algospaced-ui/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf new file mode 100644 index 0000000000000000000000000000000000000000..70d559b4e937ca1b805eb39f544cbebe3c58ca6f Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 b/algospaced-ui/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..215c143fd7805a5c2b222bd7892a1a2b09610020 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf b/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf new file mode 100644 index 0000000000000000000000000000000000000000..2f65a8a3a6d3628d11ea9c26c9077cef672fe427 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 b/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..cfaa3bda59246b49e94298478d6de3b3208066c8 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff b/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff new file mode 100644 index 0000000000000000000000000000000000000000..8d47c02d9408d34b2a9d566c0fe0d42bf82fb735 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 b/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..349c06dc609f896392fd5bc8b364d3bc3efc9330 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff b/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff new file mode 100644 index 0000000000000000000000000000000000000000..7e02df963621a5e26d53d510f0b4992eebde1c60 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf b/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d5850df98ec19de2eee9ff922ef59586efe471d0 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf b/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf new file mode 100644 index 0000000000000000000000000000000000000000..537279f6bd2184ed32f1a5168850609147d58ee6 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff b/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff new file mode 100644 index 0000000000000000000000000000000000000000..31b84829b42edae20d0148eeec0d922dad2108c4 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 b/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..a90eea85f6f7bded69ff5d40114447a6d8b48cfe Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf b/algospaced-ui/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf new file mode 100644 index 0000000000000000000000000000000000000000..fd679bf374af72f2a183b97b40c9c7e9e51fbe5e Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 b/algospaced-ui/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b3048fc115681ee6c1bc86b0aa158cfbbf59daa3 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Script-Regular-D5yQViql.woff b/algospaced-ui/dist/assets/KaTeX_Script-Regular-D5yQViql.woff new file mode 100644 index 0000000000000000000000000000000000000000..0e7da821eee0dd05a0a6f0b16c2c1345dc573a84 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Script-Regular-D5yQViql.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size1-Regular-C195tn64.woff b/algospaced-ui/dist/assets/KaTeX_Size1-Regular-C195tn64.woff new file mode 100644 index 0000000000000000000000000000000000000000..7f292d91184f257054ef77cc1cd3443db757c9cc Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size1-Regular-C195tn64.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf b/algospaced-ui/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf new file mode 100644 index 0000000000000000000000000000000000000000..871fd7d19d8658f64d8696ed9cdfc82c821ed76d Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 b/algospaced-ui/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..c5a8462fbfe2c39a7c1857b9e296e62500a8a8a5 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf b/algospaced-ui/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7a212caf91c0007e826fee2d622bf48acbd30dde Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 b/algospaced-ui/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..e1bccfe2403a4ed770c1697ae7c15b9e1cd9bc4e Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff b/algospaced-ui/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff new file mode 100644 index 0000000000000000000000000000000000000000..d241d9be2d317f7b39b401d96c8b18836acea0fa Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff b/algospaced-ui/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff new file mode 100644 index 0000000000000000000000000000000000000000..e6e9b658dcf1cd031ac82b6b8f312444c55d4fc0 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf b/algospaced-ui/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf new file mode 100644 index 0000000000000000000000000000000000000000..00bff3495fa9d2f98c1c9ce436add6a1bcfe87fb Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff b/algospaced-ui/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff new file mode 100644 index 0000000000000000000000000000000000000000..e1ec5457664f438ce5a1cc6dd8409bf60ca7804b Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf b/algospaced-ui/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf new file mode 100644 index 0000000000000000000000000000000000000000..74f08921f00f71f413ca42c9d1c90202e672ef38 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf differ diff --git a/algospaced-ui/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 b/algospaced-ui/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..680c13085076a2f6c5a7e695935ec3f21cddb65f Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff b/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff new file mode 100644 index 0000000000000000000000000000000000000000..2432419f28936aff53ddfa2a732d027e6a6648fd Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff differ diff --git a/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 b/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..771f1af705f5cef5f578b3a1e7d8eff66f9b76b0 Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 differ diff --git a/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf b/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c83252c5714c71a3e0ec62195884167339a0129b Binary files /dev/null and b/algospaced-ui/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf differ diff --git a/algospaced-ui/dist/assets/MySQLPlayground-n_MnQGWR.js b/algospaced-ui/dist/assets/MySQLPlayground-n_MnQGWR.js new file mode 100644 index 0000000000000000000000000000000000000000..9f58cc8ac6b1b03f7b619b3368afebe45bb93965 --- /dev/null +++ b/algospaced-ui/dist/assets/MySQLPlayground-n_MnQGWR.js @@ -0,0 +1 @@ +import{a as e,c as t,i as n,t as r}from"./jsx-runtime-UoOgdb2P.js";var i=t(e(),1),a=r();function o(){let[e,t]=(0,i.useState)(null),[r,o]=(0,i.useState)(``),[s,c]=(0,i.useState)(!1),[l,u]=(0,i.useState)(!0),[d,f]=(0,i.useState)(``),[p,m]=(0,i.useState)(null),h=async()=>{u(!0),f(``);try{let{data:{session:e}}=await n.auth.getSession();if(!e){f(`Unauthenticated session`);return}let r=await fetch(`/api/challenges/mysql/status`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(r.ok){let e=await r.json();e.active?t(e):t(null)}else f(`Failed to fetch playground status.`)}catch{f(`Connection timed out.`)}finally{u(!1)}},g=async(e=!1)=>{u(!0),f(``),m(null);try{let{data:{session:r}}=await n.auth.getSession();if(!r){f(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/mysql/init${e?`?refresh=true`:``}`,{method:`POST`,headers:{Authorization:`Bearer ${r.access_token}`}});if(i.ok){let e=await i.json();t({active:!0,title:e.title,objective:e.objective,points:e.points,schema:e.schema,challenge_type:e.challenge_type,completed:!1,total_score:e.total_score})}else f(`Failed to initialize mock database playground.`)}catch{f(`Server connection error.`)}finally{u(!1)}};return(0,i.useEffect)(()=>{h()},[]),l?(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-arcade text-[10px]`,children:[(0,a.jsx)(`div`,{className:`animate-bounce mb-2`,children:`INITIALIZING SQL PLAYGROUND...`}),(0,a.jsx)(`div`,{className:`w-48 h-4 bg-white border-[3px] border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#0ea5e9] w-1/2 animate-pulse border-r-2 border-ink-black`})})]}):e?(0,a.jsx)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm`,children:(0,a.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 custom-scrollbar flex flex-col gap-4`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center bg-slate-100 border-[3px] border-ink-black p-3 shrink-0`,children:[(0,a.jsxs)(`div`,{className:`flex gap-2`,children:[(0,a.jsx)(`span`,{className:`bg-blue-100 text-blue-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px] uppercase`,children:e.challenge_type}),(0,a.jsxs)(`span`,{className:`bg-yellow-100 text-yellow-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:[`+`,e.points,` PTS`]}),e.completed?(0,a.jsx)(`span`,{className:`bg-emerald-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`SOLVED`}):(0,a.jsx)(`span`,{className:`bg-rose-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`UNSOLVED`})]}),(0,a.jsxs)(`div`,{className:`font-arcade text-[8px] text-sky-700 font-bold bg-white border-2 border-ink-black px-2 py-0.5 shadow-[1px_1px_0_0_#1E293B]`,children:[`SCORE: `,e.total_score]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-yellow-400 bg-yellow-50 p-3 rounded font-sans leading-relaxed text-xs`,children:[(0,a.jsx)(`h4`,{className:`font-arcade text-[9px] text-yellow-800 mb-1`,children:`MISSION OBJECTIVE`}),(0,a.jsx)(`p`,{className:`font-bold text-slate-800`,children:e.objective})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`schema`}),(0,a.jsx)(`span`,{children:`SCHEMA EXPLORER (MOCK INSTANCE)`})]}),(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-3 max-h-[140px] overflow-y-auto custom-scrollbar font-mono text-[10px]`,children:Object.entries(e.schema).map(([e,t])=>(0,a.jsxs)(`div`,{className:`border border-slate-300 p-2 bg-slate-50`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-blue-700 border-b border-slate-200 pb-0.5 mb-1 flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px]`,children:`table_chart`}),e]}),(0,a.jsx)(`ul`,{className:`space-y-0.5 text-slate-600 text-[9px]`,children:t.map((e,t)=>(0,a.jsxs)(`li`,{className:`flex justify-between`,children:[(0,a.jsx)(`span`,{children:e.name}),(0,a.jsx)(`span`,{className:`text-slate-400 italic text-[8px]`,children:e.type})]},t))})]},e))})]}),(0,a.jsxs)(`div`,{className:`flex flex-col min-h-[120px]`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] mb-1 tracking-wide uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm text-sky-600`,children:`terminal`}),(0,a.jsx)(`span`,{children:`Enter SQL Query:`})]}),(0,a.jsx)(`textarea`,{value:r,onChange:e=>o(e.target.value),className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-3 border-[3px] border-ink-black rounded outline-none focus:ring-2 focus:ring-sky-500 text-xs leading-relaxed resize-none`,placeholder:`SELECT * FROM customers WHERE score > 100;`,spellCheck:`false`})]}),(0,a.jsxs)(`div`,{className:`flex gap-3`,children:[(0,a.jsx)(`button`,{onClick:()=>g(!0),className:`flex-1 bg-white hover:bg-slate-100 text-ink-black border-[3px] border-ink-black font-bold font-window-title text-xs py-2 shadow-[3px_3px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`NEW PROBLEM`}),(0,a.jsx)(`button`,{disabled:s,onClick:async()=>{if(r.trim()){c(!0),f(``),m(null);try{let{data:{session:e}}=await n.auth.getSession();if(!e){f(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/mysql/query`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({query:r})});if(i.ok){let e=await i.json();e.success?(m({columns:e.columns,rows:e.rows,rowsAffected:e.rows_affected,isCorrect:e.is_correct}),e.is_correct&&t(t=>t?{...t,completed:!0,total_score:e.total_score}:null),e.schema&&t(t=>t?{...t,schema:e.schema}:null)):f(e.error)}else f(`Database server query failure.`)}catch{f(`Query connection lost.`)}finally{c(!1)}}},className:`flex-[2] bg-highlight-pink text-white font-window-title font-bold py-2 border-[3px] border-ink-black shadow-[3px_3px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none hover:bg-pink-400 transition-all disabled:opacity-50 cursor-pointer text-center text-xs`,children:s?`EXECUTING SQL...`:`EXECUTE SQL QUERY`})]}),d&&(0,a.jsxs)(`div`,{className:`border-[3px] border-red-500 bg-red-50 text-red-800 p-3 font-mono text-xs whitespace-pre-wrap`,children:[(0,a.jsx)(`div`,{className:`font-bold mb-1`,children:`SQL RUNTIME / SYNTAX ERROR:`}),d]}),p&&(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 flex flex-col`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 flex justify-between items-center`,children:[(0,a.jsx)(`span`,{children:`QUERY OUTPUT BUFFER`}),p.isCorrect&&(0,a.jsx)(`span`,{className:`text-green-600 font-bold animate-bounce text-[9px]`,children:`✓ MISSION ACHIEVED!`})]}),(0,a.jsxs)(`div`,{className:`text-[9px] text-slate-500 mb-2 font-mono`,children:[`Rows Affected: `,p.rowsAffected,` | Total Returned: `,p.rows.length]}),p.rows.length>0?(0,a.jsx)(`div`,{className:`overflow-x-auto border border-slate-300 max-h-[180px] custom-scrollbar`,children:(0,a.jsxs)(`table`,{className:`border-collapse w-full font-mono text-[9px] min-w-full`,children:[(0,a.jsx)(`thead`,{children:(0,a.jsx)(`tr`,{className:`bg-slate-100 border-b border-slate-300`,children:p.columns.map((e,t)=>(0,a.jsx)(`th`,{className:`border-r border-slate-300 p-1.5 text-left font-bold text-slate-700`,children:e},t))})}),(0,a.jsx)(`tbody`,{className:`divide-y divide-slate-200`,children:p.rows.map((e,t)=>(0,a.jsx)(`tr`,{className:`hover:bg-slate-50`,children:p.columns.map((t,n)=>(0,a.jsx)(`td`,{className:`border-r border-slate-200 p-1.5 text-slate-800 whitespace-nowrap`,children:e[t]===null?(0,a.jsx)(`span`,{className:`text-slate-300 italic`,children:`NULL`}):String(e[t])},n))},t))})]})}):(0,a.jsx)(`div`,{className:`p-3 border border-dashed border-slate-300 text-center text-slate-400 italic font-sans text-xs`,children:`Query executed successfully. Result set is empty (or modification completed).`})]})]})}):(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col justify-between items-center text-center text-ink-black text-xs md:text-sm font-sans select-none`,children:[(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col justify-center items-center gap-4`,children:[(0,a.jsx)(`div`,{className:`w-16 h-16 bg-white border-[3px] border-ink-black flex items-center justify-center shadow-[4px_4px_0_0_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-[#0ea5e9]`,style:{fontVariationSettings:`'FILL' 1`},children:`database`})}),(0,a.jsx)(`h3`,{className:`font-headline-md font-bold text-lg`,children:`Interactive MySQL Playground`}),(0,a.jsx)(`p`,{className:`max-w-md text-slate-600 leading-relaxed font-semibold`,children:`Test and run relational queries against isolated schemas dynamically built by the AI generator. Includes full support for:`}),(0,a.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2 font-mono text-[10px] text-slate-700 font-bold uppercase mt-1`,children:[(0,a.jsx)(`span`,{className:`bg-blue-100 border border-blue-400 px-2 py-0.5`,children:`SELECT / JOIN`}),(0,a.jsx)(`span`,{className:`bg-emerald-100 border border-emerald-400 px-2 py-0.5`,children:`UPDATE / DELETE`}),(0,a.jsx)(`span`,{className:`bg-purple-100 border border-purple-400 px-2 py-0.5`,children:`WINDOW FUNCTIONS`})]})]}),(0,a.jsx)(`div`,{className:`w-full border-t border-slate-200 pt-4 flex flex-col gap-2 shrink-0`,children:(0,a.jsx)(`button`,{onClick:()=>g(!1),className:`w-full py-2.5 bg-[#0ea5e9] hover:bg-sky-400 text-white font-window-title font-bold text-xs uppercase border-[3px] border-ink-black shadow-[4px_4px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer text-center`,children:`CREATE NEW DATABASE INSTANCE`})})]})}export{o as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/PrincessChamber-DVAuHg4W.js b/algospaced-ui/dist/assets/PrincessChamber-DVAuHg4W.js new file mode 100644 index 0000000000000000000000000000000000000000..e73122ea47d75c3303d6f8f5b590fcba1ecf42b2 --- /dev/null +++ b/algospaced-ui/dist/assets/PrincessChamber-DVAuHg4W.js @@ -0,0 +1 @@ +import{a as e,c as t,s as n,t as r}from"./jsx-runtime-UoOgdb2P.js";import{t as i}from"./rotate-ccw-CucqdZpm.js";import{A as a,C as o,E as s,N as c,R as l,S as u,T as d,_ as f,b as p,g as m,h,m as g,v as _,w as v,x as y,y as b,z as x}from"./index-DUIMMmBx.js";var S=x(`castle`,[[`path`,{d:`M10 5V3`,key:`1y54qe`}],[`path`,{d:`M14 5V3`,key:`m6isi`}],[`path`,{d:`M15 21v-3a3 3 0 0 0-6 0v3`,key:`lbp5hj`}],[`path`,{d:`M18 3v8`,key:`2ollhf`}],[`path`,{d:`M18 5H6`,key:`98imr9`}],[`path`,{d:`M22 11H2`,key:`1lmjae`}],[`path`,{d:`M22 9v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9`,key:`1rly83`}],[`path`,{d:`M6 3v8`,key:`csox7g`}]]),C=x(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),w=x(`rotate-ccw-clock`,[[`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`}]]),T=x(`scroll`,[[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),E=x(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),D=x(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),O=x(`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`}]]),k=t(e(),1),A={1:{particleType:`pollen`,particleCount:16,particleColors:[`#FDE047`,`#FEF08A`,`#86EFAC`],gradientBg:`from-[#FFFDF0] via-[#FFF9E6] to-[#FEF3C7]`,glowColor:`rgba(251, 191, 36, 0.3)`,badgeLabel:`🌾 Plains Breeze`},2:{particleType:`leaves`,particleCount:18,particleColors:[`#86EFAC`,`#4ADE80`,`#22C55E`,`#A7F3D0`],gradientBg:`from-[#F0FDF4] via-[#DCFCE7] to-[#FEF9C3]`,glowColor:`rgba(34, 197, 94, 0.3)`,badgeLabel:`🍃 Whispering Leaves`},3:{particleType:`spores`,particleCount:22,particleColors:[`#67E8F9`,`#38BDF8`,`#818CF8`,`#C084FC`],gradientBg:`from-[#F0F9FF] via-[#E0F2FE] to-[#EDE9FE]`,glowColor:`rgba(56, 189, 248, 0.35)`,badgeLabel:`✨ Crystal Spores`},4:{particleType:`snow`,particleCount:28,particleColors:[`#FFFFFF`,`#E0F2FE`,`#BAE6FD`],gradientBg:`from-[#F8FAFC] via-[#F1F5F9] to-[#E2E8F0]`,glowColor:`rgba(186, 230, 253, 0.4)`,badgeLabel:`❄️ Alpine Snowfall`},5:{particleType:`runes`,particleCount:20,particleColors:[`#E879F9`,`#C084FC`,`#A855F7`,`#F472B6`],gradientBg:`from-[#FAF5FF] via-[#F3E8FF] to-[#FCE7F3]`,glowColor:`rgba(192, 132, 252, 0.4)`,badgeLabel:`🔮 Arcane Runes`},6:{particleType:`stardust`,particleCount:35,particleColors:[`#FDE047`,`#F59E0B`,`#E11D48`,`#818CF8`],gradientBg:`from-[#FFFBEB] via-[#FEF3C7] to-[#FFE4E6]`,glowColor:`rgba(245, 158, 11, 0.5)`,badgeLabel:`👑 Spire Gates`}};function j(e){return e<=30?A[1]:e<=60?A[2]:e<=90?A[3]:e<=120?A[4]:e<150?A[5]:A[6]}var M=r();function N({emotion:e,floor:t,rhythm:n,activity:r,isLoading:i=!1}){let a=f[e]||f.smiling_warmly,o=(0,k.useMemo)(()=>j(t),[t]),c=(0,k.useMemo)(()=>{switch(n){case`dawn`:return`from-amber-400/40 via-yellow-300/30 to-rose-300/20`;case`dusk`:return`from-orange-400/40 via-purple-400/30 to-amber-300/20`;case`night`:return`from-indigo-600/40 via-blue-500/30 to-amber-500/20`;default:return`from-amber-400/30 via-yellow-300/40 to-indigo-400/30`}},[n]);return(0,M.jsxs)(`div`,{className:`relative flex flex-col items-center justify-center my-auto w-full max-w-xl`,children:[(0,M.jsx)(`div`,{className:`absolute -inset-10 overflow-hidden pointer-events-none z-0`,children:Array.from({length:Math.min(18,o.particleCount)}).map((e,t)=>{let n=o.particleColors[t%o.particleColors.length],r=`${t*19%100}%`,i=`${6+t%5*2}s`,a=`${t*.7%4}s`,s=o.particleType===`leaves`||o.particleType===`runes`?`w-2.5 h-2.5`:`w-1.5 h-1.5`;return(0,M.jsx)(`span`,{className:`absolute rounded-full opacity-65 animate-pulse ${s}`,style:{backgroundColor:n,left:r,top:`${t*23%90}%`,boxShadow:`0 0 8px ${n}`,animationDuration:i,animationDelay:a}},t)})}),(0,M.jsxs)(`div`,{className:`relative group z-10`,children:[(0,M.jsx)(`div`,{className:`absolute -inset-2 bg-gradient-to-r ${c} rounded-2xl blur-md opacity-80 group-hover:opacity-100 transition duration-500`}),(0,M.jsxs)(`div`,{className:`relative w-36 h-44 sm:w-44 sm:h-52 bg-gradient-to-b from-amber-100 to-amber-200 border-[3px] border-ink-black rounded-xl overflow-hidden shadow-[4px_4px_0px_0px_#1E293B] transition-transform duration-300`,children:[(0,M.jsx)(`img`,{src:a.imagePath,alt:a.label,className:`w-full h-full object-cover object-top transition-all duration-300 ${i?`scale-105 filter saturate-125`:`scale-100`}`,onError:e=>{e.target.src=`/sprites/princess/neutral.png`}}),(0,M.jsxs)(`div`,{className:`absolute bottom-0 inset-x-0 bg-ink-black/85 backdrop-blur-xs text-[10px] text-amber-300 py-1 px-2 font-bold uppercase tracking-wider text-center flex items-center justify-center gap-1.5`,children:[(0,M.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full ${i?`bg-amber-400 animate-ping`:`bg-emerald-400`}`}),(0,M.jsx)(`span`,{children:i?`Pondering...`:a.label})]})]}),(0,M.jsx)(`div`,{className:`absolute -top-2 -right-2 bg-[#FFE24C] border-[2px] border-ink-black rounded-full p-1 shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,M.jsx)(s,{className:`w-3.5 h-3.5 text-amber-800`})})]}),r&&(0,M.jsx)(`div`,{className:`mt-2 text-center max-w-sm px-2`,children:(0,M.jsxs)(`span`,{className:`text-[10px] font-semibold text-slate-700 bg-white/85 px-2.5 py-0.5 rounded-full border border-ink-black/20 shadow-xs inline-flex items-center gap-1`,children:[(0,M.jsx)(`span`,{children:`🏰`}),(0,M.jsx)(`span`,{className:`truncate`,children:r})]})})]})}function P({text:e,characterName:t,emotion:n,isLoading:r=!1,isStreaming:i=!1,toolCalls:a,onTypingStatusChange:o}){let[s,c]=(0,k.useState)(e),[l,u]=(0,k.useState)(!1),d=(0,k.useRef)(null),p=(0,k.useRef)(e),m=(0,k.useRef)(0),g=f[n]||f.smiling_warmly;return(0,k.useEffect)(()=>{if(i){d.current&&clearInterval(d.current),c(e),u(!0),o?.(!0),e.length-m.current>=4&&(m.current=e.length,h(e.length)),p.current=e;return}if(e!==p.current&&!r){let t=p.current.length>0&&e.startsWith(p.current);if(p.current=e,d.current&&clearInterval(d.current),t)c(e),u(!1),o?.(!1);else{c(``),u(!0),o?.(!0);let t=0;d.current=setInterval(()=>{t{d.current&&clearInterval(d.current)}},[e,r,i,o]),(0,M.jsxs)(`div`,{onClick:()=>{l&&(d.current&&clearInterval(d.current),c(e),u(!1),o?.(!1))},className:`w-full max-w-xl mt-3 sm:mt-4 relative bg-white border-[3px] border-ink-black rounded-xl p-3.5 sm:p-4 shadow-[4px_4px_0px_0px_#1E293B] transition-all cursor-pointer group select-text`,children:[(0,M.jsx)(`div`,{className:`absolute -top-3 left-1/2 -translate-x-1/2 w-0 h-0 border-x-8 border-x-transparent border-b-8 border-b-ink-black pointer-events-none`}),(0,M.jsx)(`div`,{className:`absolute -top-2 left-1/2 -translate-x-1/2 w-0 h-0 border-x-6 border-x-transparent border-b-6 border-b-white pointer-events-none`}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-amber-100 pb-1.5 mb-2 select-none`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,M.jsxs)(`span`,{className:`font-headline-md font-bold text-xs text-amber-900 flex items-center gap-1`,children:[`👑 `,t||`Princess Aurelia`]}),(0,M.jsx)(`span`,{className:`text-[9px] bg-amber-100 text-amber-800 font-bold px-1.5 py-0.2 rounded border border-amber-200`,children:g.label})]}),l&&(0,M.jsx)(`span`,{className:`text-[9px] text-trash-gray font-medium animate-pulse`,children:`Click bubble to skip`})]}),r?(0,M.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-xs font-medium text-trash-gray select-none`,children:[(0,M.jsx)(`span`,{className:`inline-block w-2 h-2 bg-amber-500 rounded-full animate-bounce`}),(0,M.jsx)(`span`,{className:`inline-block w-2 h-2 bg-amber-500 rounded-full animate-bounce [animation-delay:0.2s]`}),(0,M.jsx)(`span`,{className:`inline-block w-2 h-2 bg-amber-500 rounded-full animate-bounce [animation-delay:0.4s]`}),(0,M.jsxs)(`span`,{className:`ml-1 text-slate-600`,children:[t||`Princess Aurelia`,` is attuning the crystal relay...`]})]}):(0,M.jsxs)(`div`,{className:`text-xs sm:text-[13px] text-ink-black font-medium leading-relaxed whitespace-pre-wrap`,children:[(e=>e.split(/(\*[^*]+\*)/g).map((e,t)=>e.startsWith(`*`)&&e.endsWith(`*`)?(0,M.jsx)(`span`,{className:`text-amber-700 italic font-semibold mr-1 inline-block`,children:e},t):(0,M.jsx)(`span`,{children:e},t)))(s),l&&(0,M.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-amber-500 ml-1 animate-pulse align-middle`})]}),a&&a.length>0&&!r&&(0,M.jsx)(`div`,{className:`mt-2.5 pt-2 border-t border-amber-100/80 flex flex-wrap gap-1.5 select-none`,children:a.map((e,t)=>{let n=`✨ Enchantment: ${e.name}`;return e.name===`open_app_window`&&(n=`📜 Summoned: ${e.args?.window_id||`Grimoire`}`),e.name===`set_study_timer`&&(n=`⏳ Hourglass: ${e.args?.minutes||15}m rest`),e.name===`play_ambient_sound`&&(n=`🔥 Kindled: ${e.args?.soundscape||`Soundscape`}`),e.name===`write_spire_diary`&&(n=`📖 Chronicled in Spire Diary`),(0,M.jsx)(`span`,{className:`px-2 py-0.5 rounded-full bg-indigo-50 border border-indigo-200 text-[10px] font-bold text-indigo-800 flex items-center gap-1 shadow-xs`,children:(0,M.jsx)(`span`,{children:n})},t)})})]})}var F=[{label:`💪 Solved a Tough One`,prompt:`I just solved a really tough problem! Felt so good getting all test cases to pass.`},{label:`😩 Feeling Stuck`,prompt:`I feel really stuck and discouraged today. It feels like everyone else gets this except me.`},{label:`☕ Need a Breather`,prompt:`My brain is pretty fried from practicing today. Can we just take a short breather?`},{label:`🌙 Life Beyond the Tower`,prompt:`What’s the first thing you want to do once we break the seals and get you out of that tower?`}];function I({suggestions:e,isLoading:t=!1,onSendMessage:n,placeholder:r=`Speak with Princess Aurelia...`}){let[i,a]=(0,k.useState)(``),o=()=>{let e=i.trim();e&&!t&&(n(e),a(``))},c=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),o())},l=Array.isArray(e)&&e.length>0;return(0,M.jsxs)(`div`,{className:`w-full flex flex-col items-center gap-2 select-none z-10`,children:[(0,M.jsx)(`div`,{className:`w-full max-w-xl flex items-center justify-center gap-1.5 flex-wrap py-1.5 px-2`,children:l?e.map((e,r)=>(0,M.jsxs)(`button`,{type:`button`,onClick:()=>n(e),disabled:t,className:`px-2.5 py-1 bg-white hover:bg-amber-100 disabled:opacity-50 border-[1.5px] border-ink-black rounded-full text-[10px] sm:text-[11px] font-bold text-slate-800 cursor-pointer shadow-[1px_1px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all flex items-center gap-1`,children:[(0,M.jsx)(s,{className:`w-3 h-3 text-amber-600 shrink-0`}),(0,M.jsx)(`span`,{className:`truncate max-w-[200px]`,children:e})]},r)):F.map((e,r)=>(0,M.jsx)(`button`,{type:`button`,onClick:()=>n(e.prompt),disabled:t,className:`px-2.5 py-1 bg-white hover:bg-amber-100 disabled:opacity-50 border-[1.5px] border-ink-black rounded-full text-[10px] sm:text-[11px] font-bold text-slate-800 cursor-pointer shadow-[1px_1px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all`,children:e.label},r))}),(0,M.jsxs)(`div`,{className:`w-full bg-white border-t-[3px] border-ink-black p-3 sm:px-4 flex items-center gap-2 shrink-0`,children:[(0,M.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),onKeyDown:c,disabled:t,placeholder:r,className:`flex-1 bg-[#FFFDF0] border-[2px] border-ink-black rounded-lg px-3.5 py-2 text-xs sm:text-sm font-medium text-ink-black placeholder-slate-400 focus:outline-none focus:border-amber-500 shadow-inner disabled:opacity-50`}),(0,M.jsxs)(`button`,{type:`button`,onClick:o,disabled:t||!i.trim(),className:`px-4 sm:px-5 py-2 bg-[#FFE24C] hover:bg-yellow-300 disabled:opacity-50 border-[2px] border-ink-black rounded-lg font-bold text-xs sm:text-sm text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center gap-1.5 shrink-0`,children:[(0,M.jsx)(E,{className:`w-3.5 h-3.5`}),(0,M.jsx)(`span`,{children:`Send`})]})]})]})}function L({currentFloor:e,onClose:t}){let n=y(e),r=Math.min(100,Math.round(e/150*100));return(0,M.jsx)(`div`,{className:`absolute inset-0 z-50 bg-ink-black/40 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200 select-none`,onClick:t,children:(0,M.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black rounded-xl p-4 sm:p-5 max-w-md w-full shadow-[6px_6px_0px_0px_#1E293B] flex flex-col gap-3.5`,onClick:e=>e.stopPropagation(),children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(S,{className:`w-5 h-5 text-indigo-600`}),(0,M.jsx)(`h4`,{className:`font-headline-md font-bold text-sm text-ink-black m-0`,children:`Journey to the Big-O Spire`})]}),(0,M.jsx)(`button`,{type:`button`,onClick:t,className:`p-1 hover:bg-slate-200 rounded text-slate-700 cursor-pointer`,title:`Close`,children:(0,M.jsx)(o,{className:`w-4 h-4`})})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between text-xs font-bold font-headline-md`,children:[(0,M.jsx)(`span`,{children:`Path Progress:`}),(0,M.jsxs)(`span`,{className:`font-arcade bg-indigo-100 text-indigo-900 px-2 py-0.5 rounded border border-indigo-300`,children:[e,` / 150 Leagues`]})]}),(0,M.jsx)(`div`,{className:`w-full bg-slate-200 h-4 border-[2px] border-ink-black rounded-full overflow-hidden p-0.5`,children:(0,M.jsx)(`div`,{className:`bg-gradient-to-r from-amber-400 via-yellow-400 to-emerald-400 h-full rounded-full transition-all duration-500`,style:{width:`${r}%`}})}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] text-trash-gray font-medium`,children:[(0,M.jsxs)(`span`,{children:[`Progress: `,(0,M.jsxs)(`strong`,{children:[r,`%`]})]}),(0,M.jsxs)(`span`,{children:[`Distance to Tower: `,(0,M.jsxs)(`strong`,{children:[Math.max(0,150-e),` leagues`]})]})]})]}),(0,M.jsxs)(`div`,{className:`bg-white border-[2px] border-ink-black rounded-lg p-3 shadow-[2px_2px_0px_0px_#1E293B] flex flex-col gap-1`,children:[(0,M.jsx)(`div`,{className:`text-[10px] font-bold uppercase text-amber-700 tracking-wider`,children:`Current Realm:`}),(0,M.jsx)(`div`,{className:`font-bold text-xs text-ink-black`,children:n.title}),(0,M.jsx)(`p`,{className:`text-[11px] text-slate-600 m-0 leading-relaxed font-medium`,children:n.description}),(0,M.jsxs)(`div`,{className:`text-[10px] text-amber-900 bg-amber-50 p-1.5 rounded border border-amber-200 italic mt-1`,children:[`📜 `,n.bgLore]})]}),(0,M.jsx)(`div`,{className:`flex items-center justify-between gap-1 text-center`,children:[{floor:30,label:`Arrays`},{floor:60,label:`Pointers`},{floor:90,label:`Trees`},{floor:120,label:`Heaps`},{floor:150,label:`Spire`}].map(t=>{let n=e>=t.floor;return(0,M.jsxs)(`div`,{className:`flex-1 p-1.5 rounded border text-[10px] flex flex-col items-center ${n?`bg-emerald-100 border-emerald-600 text-emerald-900 font-bold`:`bg-slate-100 border-slate-300 text-slate-500`}`,children:[(0,M.jsx)(`span`,{children:n?`✓`:t.floor}),(0,M.jsx)(`span`,{className:`text-[9px] truncate w-full`,children:t.label})]},t.floor)})}),(0,M.jsx)(`div`,{className:`flex items-center justify-end border-t border-slate-200 pt-2 mt-1`,children:(0,M.jsx)(`button`,{type:`button`,onClick:t,className:`px-4 py-1.5 bg-white hover:bg-slate-100 border-[1.5px] border-ink-black rounded font-bold text-xs text-ink-black cursor-pointer shadow-xs active:translate-y-0.5`,children:`Done`})})]})})}function R({unlockedLetters:e,spireChronicles:t,currentFloor:n,heroCodex:r,episodicEvents:i,recentToolTelemetry:d,onRemoveCodexItem:f,onClose:m}){let[h,g]=(0,k.useState)(`letters`),[_,v]=(0,k.useState)(e[e.length-1]||null);return(0,M.jsx)(`div`,{className:`absolute inset-0 z-50 bg-ink-black/50 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200 select-none`,onClick:m,children:(0,M.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black rounded-xl max-w-lg w-full h-[85%] max-h-[560px] shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[(0,M.jsxs)(`div`,{className:`bg-white border-b-[2px] border-ink-black px-4 py-2.5 flex items-center justify-between shrink-0`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(T,{className:`w-5 h-5 text-amber-700`}),(0,M.jsx)(`h4`,{className:`font-headline-md font-bold text-sm text-ink-black m-0`,children:`The Royal Satchel`})]}),(0,M.jsx)(`button`,{type:`button`,onClick:m,className:`p-1 hover:bg-slate-200 rounded text-slate-700 cursor-pointer`,title:`Close`,children:(0,M.jsx)(o,{className:`w-4 h-4`})})]}),(0,M.jsxs)(`div`,{className:`flex border-b-2 border-ink-black bg-amber-100/70 shrink-0`,children:[(0,M.jsxs)(`button`,{type:`button`,onClick:()=>g(`letters`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer border-r border-ink-black/20 ${h===`letters`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,M.jsx)(T,{className:`w-3.5 h-3.5`}),(0,M.jsxs)(`span`,{children:[`Missives (`,e.length,`/5)`]})]}),(0,M.jsxs)(`button`,{type:`button`,onClick:()=>g(`diary`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer border-r border-ink-black/20 ${h===`diary`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,M.jsx)(l,{className:`w-3.5 h-3.5`}),(0,M.jsxs)(`span`,{children:[`Chronicles (`,t.length,`)`]})]}),(0,M.jsxs)(`button`,{type:`button`,onClick:()=>g(`codex`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer ${h===`codex`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,M.jsx)(s,{className:`w-3.5 h-3.5 text-amber-700`}),(0,M.jsx)(`span`,{children:`Codex`})]})]}),(0,M.jsxs)(`div`,{className:`flex-1 p-3 sm:p-4 overflow-y-auto custom-scrollbar flex flex-col gap-3 min-h-0`,children:[h===`letters`&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-3 flex-1`,children:[(0,M.jsx)(`div`,{className:`flex items-center gap-1.5 overflow-x-auto pb-1`,children:[30,60,90,120,150].map(e=>{let t=p[e],r=n>=e,i=_?.floor===e;return(0,M.jsxs)(`button`,{type:`button`,disabled:!r,onClick:()=>r&&v(t),className:`px-3 py-1 rounded-full text-[11px] font-bold border-[1.5px] border-ink-black flex items-center gap-1 shrink-0 transition-all cursor-pointer ${r?i?`bg-[#FFE24C] text-ink-black shadow-[1.5px_1.5px_0px_0px_#1E293B]`:`bg-white hover:bg-amber-100 text-slate-800`:`opacity-40 bg-slate-200 text-slate-500 cursor-not-allowed`}`,children:[r?(0,M.jsx)(`span`,{children:`📜`}):(0,M.jsx)(a,{className:`w-3 h-3`}),(0,M.jsxs)(`span`,{children:[`League `,e]})]},e)})}),_?(0,M.jsxs)(`div`,{className:`bg-[#FFF9E6] border-[2px] border-amber-900/40 rounded-lg p-4 shadow-sm flex-1 overflow-y-auto custom-scrollbar flex flex-col select-text`,children:[(0,M.jsxs)(`div`,{className:`border-b border-amber-800/20 pb-2 mb-3 flex items-center justify-between`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`text-[10px] font-bold text-amber-800 uppercase tracking-wider`,children:[_.chapterTitle,` • League `,_.floor]}),(0,M.jsx)(`h5`,{className:`font-headline-md font-bold text-sm text-amber-950 m-0`,children:_.title})]}),(0,M.jsx)(`span`,{className:`text-xl`,children:`🪶`})]}),(0,M.jsx)(`p`,{className:`text-xs sm:text-[13px] text-amber-950 font-serif leading-relaxed whitespace-pre-wrap flex-1 italic`,children:_.letterText})]}):(0,M.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center p-6 text-slate-500`,children:[(0,M.jsx)(a,{className:`w-8 h-8 mb-2 text-slate-400`}),(0,M.jsx)(`p`,{className:`text-xs font-medium`,children:`Conquer 30 LeetCode problems along the path to receive your first Royal Missive from Aurelia.`})]})]}),h===`diary`&&(0,M.jsx)(`div`,{className:`flex flex-col gap-2.5 flex-1`,children:t.length>0?t.map(e=>(0,M.jsxs)(`div`,{className:`p-3 bg-white border-[1.5px] border-ink-black rounded-lg shadow-xs flex flex-col gap-1 select-text`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between text-[10px] text-amber-800 font-bold border-b border-slate-100 pb-1`,children:[(0,M.jsxs)(`span`,{children:[`League `,e.floor,` along the Path`]}),(0,M.jsx)(`span`,{children:new Date(e.timestamp).toLocaleDateString()})]}),(0,M.jsxs)(`p`,{className:`text-xs text-ink-black font-medium leading-relaxed m-0 italic font-serif`,children:[`“`,e.text,`”`]})]},e.id)):(0,M.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center p-6 text-slate-500`,children:[(0,M.jsx)(l,{className:`w-8 h-8 mb-2 text-slate-400`}),(0,M.jsx)(`p`,{className:`text-xs font-medium`,children:`Aurelia records entries in her Spire Chronicles autonomously as you chat, rest, and cross chapter milestones.`})]})}),h===`codex`&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-3 flex-1 select-text`,children:[(0,M.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,M.jsx)(s,{className:`w-4 h-4 text-amber-600`}),(0,M.jsx)(`h5`,{className:`font-headline-md font-bold text-xs text-ink-black m-0`,children:`Hero Codex (MemGPT & Mem0 Core Memory)`})]}),(0,M.jsx)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:`Cognitive Sync`})]}),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-2 text-xs`,children:[(0,M.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2`,children:[(0,M.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Hero Alias`}),(0,M.jsx)(`span`,{className:`font-bold text-ink-black text-xs`,children:r?.heroName||`Champion`})]}),(0,M.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2`,children:[(0,M.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Target Goal`}),(0,M.jsx)(`span`,{className:`font-bold text-amber-900 text-xs`,children:r?.targetGoal||`None shared yet (mention to Aurelia!)`})]})]}),r?.preferredLanguage&&(0,M.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2 text-xs`,children:[(0,M.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Weapon of Choice (Language)`}),(0,M.jsx)(`span`,{className:`font-bold text-ink-black`,children:r.preferredLanguage})]})]}),(0,M.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-emerald-800`,children:[(0,M.jsx)(c,{className:`w-3.5 h-3.5`}),(0,M.jsxs)(`span`,{children:[`Mastered Patterns (`,r?.strengths?.length||0,`)`]})]}),r?.strengths&&r.strengths.length>0?(0,M.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:r.strengths.map(e=>(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[11px] font-bold bg-emerald-50 text-emerald-800 border border-emerald-300`,children:[e,f&&(0,M.jsx)(`button`,{type:`button`,onClick:()=>f(`strengths`,e),className:`hover:text-red-600 ml-0.5 cursor-pointer`,title:`Forget strength`,children:(0,M.jsx)(o,{className:`w-3 h-3`})})]},e))}):(0,M.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Aurelia will note topics you conquer during your practice.`})]}),(0,M.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-rose-800`,children:[(0,M.jsx)(D,{className:`w-3.5 h-3.5`}),(0,M.jsxs)(`span`,{children:[`Nemesis Patterns (`,r?.nemesisPatterns?.length||0,`)`]})]}),r?.nemesisPatterns&&r.nemesisPatterns.length>0?(0,M.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:r.nemesisPatterns.map(e=>(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[11px] font-bold bg-rose-50 text-rose-800 border border-rose-300`,children:[e,f&&(0,M.jsx)(`button`,{type:`button`,onClick:()=>f(`nemesisPatterns`,e),className:`hover:text-red-700 ml-0.5 cursor-pointer`,title:`Forget nemesis`,children:(0,M.jsx)(o,{className:`w-3 h-3`})})]},e))}):(0,M.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Aurelia tracks patterns that give you trouble to help you prepare targeted drills.`})]}),(0,M.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,M.jsx)(`div`,{className:`text-xs font-bold text-slate-800`,children:(0,M.jsxs)(`span`,{children:[`Personal Notes & Shared Lore (`,r?.personalNotes?.length||0,`)`]})}),r?.personalNotes&&r.personalNotes.length>0?(0,M.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:r.personalNotes.map(e=>(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-2 p-2 bg-slate-50 border border-slate-200 rounded text-[11px] text-slate-700`,children:[(0,M.jsxs)(`span`,{children:[`• `,e]}),f&&(0,M.jsx)(`button`,{type:`button`,onClick:()=>f(`personalNotes`,e),className:`text-slate-400 hover:text-red-600 shrink-0 cursor-pointer p-0.5`,title:`Forget note`,children:(0,M.jsx)(O,{className:`w-3 h-3`})})]},e))}):(0,M.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Share your background or routine with Aurelia and she will hold it in her memory.`})]}),i&&i.length>0&&(0,M.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1`,children:[(0,M.jsx)(`span`,{className:`text-xs font-bold text-slate-800`,children:`Episodic Memory Chain (EM-LLM)`}),(0,M.jsxs)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:[i.length,` events`]})]}),(0,M.jsx)(`div`,{className:`flex flex-col gap-2 max-h-40 overflow-y-auto custom-scrollbar`,children:i.slice(0,8).map(e=>(0,M.jsxs)(`div`,{className:`text-[11px] p-2 bg-[#FFFDF0] border border-amber-900/15 rounded flex flex-col gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,M.jsx)(`span`,{className:`font-bold text-ink-black uppercase text-[9px] px-1.5 py-0.5 bg-amber-200/60 rounded`,children:e.eventType.replace(`_`,` `)}),(0,M.jsx)(`span`,{className:`text-[10px] text-slate-400`,children:new Date(e.timestamp).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})})]}),(0,M.jsx)(`div`,{className:`font-bold text-slate-800 mt-0.5`,children:e.title}),(0,M.jsx)(`div`,{className:`text-slate-600 text-[10px]`,children:e.description})]},e.id))})]}),(0,M.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-indigo-900`,children:[(0,M.jsx)(u,{className:`w-3.5 h-3.5 text-amber-500`}),(0,M.jsx)(`span`,{children:`Autonomous Enchantment Telemetry`})]}),(0,M.jsxs)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:[d?.length||0,` executed`]})]}),d&&d.length>0?(0,M.jsx)(`div`,{className:`flex flex-col gap-1.5 max-h-36 overflow-y-auto custom-scrollbar`,children:d.slice(0,10).map((e,t)=>(0,M.jsxs)(`div`,{className:`text-[11px] p-2 bg-indigo-50/50 border border-indigo-100 rounded flex items-center justify-between gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,M.jsxs)(`span`,{className:`font-bold text-indigo-950 font-mono text-[10px] truncate`,children:[e.tool_name,`()`]}),e.args&&Object.keys(e.args).length>0&&(0,M.jsx)(`span`,{className:`text-[9px] text-slate-500 truncate`,children:JSON.stringify(e.args).slice(0,50)})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[e.execution_time_ms!==void 0&&(0,M.jsxs)(`span`,{className:`text-[9px] text-slate-400 flex items-center gap-0.5 font-mono`,children:[(0,M.jsx)(C,{className:`w-2.5 h-2.5`}),e.execution_time_ms,`ms`]}),(0,M.jsx)(`span`,{className:`px-1.5 py-0.2 text-[9px] font-bold rounded ${e.success?`bg-emerald-100 text-emerald-800`:`bg-rose-100 text-rose-800`}`,children:e.success?`SUCCESS`:`ERR`})]})]},t))}):(0,M.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`No autonomous enchantments executed yet in this session.`})]})]})]}),(0,M.jsx)(`div`,{className:`bg-white border-t border-slate-200 px-4 py-2 flex items-center justify-end shrink-0`,children:(0,M.jsx)(`button`,{type:`button`,onClick:m,className:`px-4 py-1.5 bg-white hover:bg-slate-100 border-[1.5px] border-ink-black rounded font-bold text-xs text-ink-black cursor-pointer shadow-xs active:translate-y-0.5`,children:`Close`})})]})})}var z=n({default:()=>B});function B(){let e=b(),[t,n]=(0,k.useState)(g()),[r,a]=(0,k.useState)(!1),[c,l]=(0,k.useState)(!1),[u,f]=(0,k.useState)(!1);(0,k.useEffect)(()=>{_.syncWithBackend(),_.triggerProactiveGreeting()},[]);let p=()=>{let e=!t;n(e),m(e)},h=()=>{window.confirm(`Clear conversation transcript with Princess Aurelia?`)&&_.clearTranscript()},y=(0,k.useMemo)(()=>[...e.transcript].reverse().find(e=>e.sender===`princess`)||e.transcript[0],[e.transcript]);return(0,M.jsxs)(`div`,{className:`relative w-full h-full bg-gradient-to-b from-[#FFFDF0] via-[#FFF9E6] to-[#FFF3CD] flex flex-col select-none font-sans text-ink-black overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`h-12 bg-white/95 backdrop-blur-sm border-b-[3px] border-ink-black px-3 sm:px-4 flex items-center justify-between gap-2 shrink-0 shadow-sm z-20`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,M.jsx)(s,{className:`w-4 h-4 text-amber-500 shrink-0`}),(0,M.jsx)(`h3`,{className:`font-headline-md font-bold text-xs sm:text-sm text-ink-black m-0 truncate`,children:e.companionSettings.name||`Princess Aurelia`})]}),(0,M.jsx)(`span`,{className:`hidden sm:inline-flex px-2 py-0.5 rounded-full bg-amber-100 border border-amber-300 text-[10px] font-bold text-amber-900 shadow-inner shrink-0`,children:e.bondTier}),(0,M.jsx)(`span`,{className:`hidden md:inline-flex px-2 py-0.5 rounded-full bg-indigo-50 border border-indigo-200 text-[10px] font-bold text-indigo-800 shrink-0`,children:e.currentRhythm.toUpperCase()})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 shrink-0`,children:[(0,M.jsxs)(`button`,{type:`button`,onClick:()=>a(!0),className:`px-2.5 py-1 bg-amber-100 hover:bg-amber-200 border-[2px] border-ink-black rounded font-bold text-[11px] text-ink-black cursor-pointer shadow-[1.5px_1.5px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all flex items-center gap-1.5`,title:`View Spire Journey Progress`,children:[(0,M.jsx)(S,{className:`w-3.5 h-3.5 text-indigo-700`}),(0,M.jsxs)(`span`,{className:`font-arcade text-[9px] text-indigo-950`,children:[e.currentFloor,`/150 LC`]})]}),(0,M.jsxs)(`button`,{type:`button`,onClick:()=>l(!0),className:`px-2.5 py-1 bg-white hover:bg-amber-50 border-[2px] border-ink-black rounded font-bold text-[11px] text-ink-black cursor-pointer shadow-[1.5px_1.5px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all flex items-center gap-1.5`,title:`Open Royal Satchel (Missives & Diary)`,children:[(0,M.jsx)(T,{className:`w-3.5 h-3.5 text-amber-700`}),(0,M.jsx)(`span`,{className:`hidden md:inline`,children:`Satchel`}),e.unlockedLetters.length>0&&(0,M.jsx)(`span`,{className:`w-4 h-4 rounded-full bg-amber-400 text-ink-black text-[9px] font-extrabold flex items-center justify-center border border-ink-black`,children:e.unlockedLetters.length})]}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>f(!0),className:`p-1.5 bg-white hover:bg-slate-100 border-[2px] border-ink-black rounded text-ink-black cursor-pointer shadow-[1.5px_1.5px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all`,title:`View Transcript History`,children:(0,M.jsx)(w,{className:`w-3.5 h-3.5 text-slate-700`})}),(0,M.jsx)(`button`,{type:`button`,onClick:p,className:`p-1.5 border-[2px] border-ink-black rounded text-ink-black cursor-pointer shadow-[1.5px_1.5px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all ${t?`bg-slate-200 opacity-80`:`bg-[#FFE24C] hover:bg-yellow-300`}`,title:t?`Unmute Audio`:`Mute Audio`,children:t?(0,M.jsx)(v,{className:`w-3.5 h-3.5`}):(0,M.jsx)(d,{className:`w-3.5 h-3.5`})})]})]}),(0,M.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-start gap-3 sm:gap-4 p-3 sm:p-5 overflow-y-auto custom-scrollbar min-h-0 relative`,children:[(0,M.jsx)(N,{emotion:e.activeEmotion,floor:e.currentFloor,rhythm:e.currentRhythm,activity:e.currentActivity,isLoading:e.isLoading}),(0,M.jsx)(P,{text:y?.text||`I believe in you, champion!`,characterName:e.companionSettings.name,emotion:e.activeEmotion,isLoading:e.isLoading,isStreaming:y?.isStreaming,toolCalls:y?.toolCalls,onTypingStatusChange:e=>_.setIsTyping(e)})]}),(0,M.jsx)(I,{suggestions:y?.choiceSuggestions,isLoading:e.isLoading,onSendMessage:e=>_.sendMessage(e),placeholder:`Speak with ${e.companionSettings.name||`Princess Aurelia`}...`}),r&&(0,M.jsx)(L,{currentFloor:e.currentFloor,totalSolved:e.totalSolved,onClose:()=>a(!1)}),c&&(0,M.jsx)(R,{unlockedLetters:e.unlockedLetters,spireChronicles:e.spireChronicles,currentFloor:e.currentFloor,heroCodex:e.heroCodex,episodicEvents:e.episodicEvents,recentToolTelemetry:e.recentToolTelemetry,onRemoveCodexItem:_.removeCodexItem,onClose:()=>l(!1)}),u&&(0,M.jsx)(`div`,{className:`absolute inset-0 z-50 bg-ink-black/40 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200`,onClick:()=>f(!1),children:(0,M.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black rounded-xl max-w-lg w-full h-[80%] max-h-[520px] shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[(0,M.jsxs)(`div`,{className:`bg-white border-b-[2px] border-ink-black px-4 py-2.5 flex items-center justify-between shrink-0`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(w,{className:`w-4 h-4 text-ink-black`}),(0,M.jsxs)(`h4`,{className:`font-headline-md font-bold text-xs sm:text-sm text-ink-black m-0`,children:[`Dialogue Transcript (`,e.transcript.length,` turns)`]})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,M.jsxs)(`button`,{type:`button`,onClick:h,className:`p-1 hover:bg-rose-100 text-rose-700 rounded text-[11px] font-bold flex items-center gap-1 cursor-pointer mr-1`,title:`Clear Chat History`,children:[(0,M.jsx)(i,{className:`w-3.5 h-3.5`}),(0,M.jsx)(`span`,{children:`Clear`})]}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>f(!1),className:`p-1 hover:bg-slate-200 rounded text-slate-700 cursor-pointer`,title:`Close`,children:(0,M.jsx)(o,{className:`w-4 h-4`})})]})]}),(0,M.jsx)(`div`,{className:`flex-1 p-3 sm:p-4 overflow-y-auto custom-scrollbar flex flex-col gap-2.5`,children:e.transcript.map((t,n)=>(0,M.jsxs)(`div`,{className:`p-2.5 rounded-lg border-[2px] border-ink-black shadow-[2px_2px_0px_0px_#1E293B] max-w-[90%] ${t.sender===`princess`?`bg-white text-ink-black self-start`:`bg-[#FFE24C] text-ink-black self-end`}`,children:[(0,M.jsx)(`div`,{className:`text-[10px] font-bold font-headline-md mb-1 text-slate-600`,children:t.sender===`princess`?e.companionSettings.name:`Hero`}),(0,M.jsx)(`p`,{className:`text-xs font-medium m-0 leading-relaxed whitespace-pre-wrap select-text`,children:t.text})]},t.id||n))})]})})]})}export{O as n,z as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/PythonChallenge-DW7sVm2l.js b/algospaced-ui/dist/assets/PythonChallenge-DW7sVm2l.js new file mode 100644 index 0000000000000000000000000000000000000000..b5b97252ccbffa67c6e760d19843bac545d42380 --- /dev/null +++ b/algospaced-ui/dist/assets/PythonChallenge-DW7sVm2l.js @@ -0,0 +1,259 @@ +import{a as e,c as t,i as n,t as r}from"./jsx-runtime-UoOgdb2P.js";import"./index-DUIMMmBx.js";var i=t(e(),1),a=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15e.replace(o,`-$1`).toLowerCase(),c={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},l=/[&><"']/g,u=e=>String(e).replace(l,e=>c[e]),d=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?d(e.body[0]):e:e.type===`font`?d(e.body):e,f=new Set([`mathord`,`textord`,`atom`]),p=e=>f.has(d(e).type),m=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},h={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format `},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color `,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro `,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness `,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size `,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand `,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function g(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function _(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:g(Array.isArray(e.type)?e.type[0]:e.type)}function v(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?_(r):a?a(i):i}var y=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(h)){var n=h[t];n&&v(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new a(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=m(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},b=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return ne[re[this.id]]}sub(){return ne[ie[this.id]]}fracNum(){return ne[ae[this.id]]}fracDen(){return ne[oe[this.id]]}cramp(){return ne[se[this.id]]}text(){return ne[ce[this.id]]}isTight(){return this.size>=2}},x=0,S=1,C=2,w=3,ee=4,T=5,te=6,E=7,ne=[new b(x,0,!1),new b(S,0,!0),new b(C,1,!1),new b(w,1,!0),new b(ee,2,!1),new b(T,2,!0),new b(te,3,!1),new b(E,3,!0)],re=[ee,T,ee,T,te,E,te,E],ie=[T,T,T,T,E,E,E,E],ae=[C,w,ee,T,te,E,te,E],oe=[w,w,T,T,E,E,E,E],se=[S,S,w,w,T,T,E,E],ce=[x,S,C,w,C,w,C,w],D={DISPLAY:ne[x],TEXT:ne[C],SCRIPT:ne[ee],SCRIPTSCRIPT:ne[te]},le=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function ue(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var de=[];le.forEach(e=>e.blocks.forEach(e=>de.push(...e)));function fe(e){for(var t=0;t=de[t]&&e<=de[t+1])return!0;return!1}var pe=e=>e+` `+e,me=80,he=function(e,t){return`M95,`+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+` -`+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},ge=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+` -`+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},_e=function(e,t){return`M983 `+(10+e+t)+` +l`+e/3.13+` -`+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},ve=function(e,t){return`M424,`+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+` +h400000v`+(40+e)+`h-400000z`},ye=function(e,t){return`M473,`+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},be=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},xe=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+` +H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},Se=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=he(t,me);break;case`sqrtSize1`:r=ge(t,me);break;case`sqrtSize2`:r=_e(t,me);break;case`sqrtSize3`:r=ve(t,me);break;case`sqrtSize4`:r=ye(t,me);break;case`sqrtTall`:r=xe(t,me,n)}return r},Ce=function(e,t){switch(e){case`⎜`:return pe(`M291 0 H417 V`+t+` H291z`);case`∣`:return pe(`M145 0 H188 V`+t+` H145z`);case`∥`:return pe(`M145 0 H188 V`+t+` H145z`)+pe(`M367 0 H410 V`+t+` H367z`);case`⎟`:return pe(`M457 0 H583 V`+t+` H457z`);case`⎢`:return pe(`M319 0 H403 V`+t+` H319z`);case`⎥`:return pe(`M263 0 H347 V`+t+` H263z`);case`⎪`:return pe(`M384 0 H504 V`+t+` H384z`);case`⏐`:return pe(`M312 0 H355 V`+t+` H312z`);case`‖`:return pe(`M257 0 H300 V`+t+` H257z`)+pe(`M478 0 H521 V`+t+` H478z`);default:return``}},we={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:pe(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:pe(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:pe(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:pe(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:pe(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:pe(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:pe(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:pe(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Te=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function Ee(e){return`toText`in e}var De=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t{if(Ee(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},Oe={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},ke={ex:!0,em:!0,mu:!0},Ae=function(e){return typeof e!=`string`&&(e=e.unit),e in Oe||e in ke||e===`ex`},O=function(e,t){var n;if(e.unit in Oe)n=Oe[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new a(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},k=function(e){return+e.toFixed(4)+`em`},je=function(e){return e.filter(e=>e).join(` `)},Me=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=s(n)+`:`+r+`;`)}return t},Ne=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},Pe=function(e){var t=document.createElement(e);t.className=je(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r/=\x00-\x1f]/,Ie=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+u(je(this.classes))+`"`);var n=Me(this.style);n&&(t+=` style="`+u(n)+`"`);for(var r of Object.keys(this.attributes)){if(Fe.test(r))throw new a(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+u(this.attributes[r])+`"`}t+=`>`;for(var i=0;i`,t},Le=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Ne.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Pe.call(this,`span`)}toMarkup(){return Ie.call(this,`span`)}},Re=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Ne.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Pe.call(this,`a`)}toMarkup(){return Ie.call(this,`a`)}},ze=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=``+u(this.alt)+``,e}},Be={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},Ve=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=ue(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Be[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=k(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=je(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`0&&(n+=`margin-right:`+k(this.italic)+`;`),n+=Me(this.style),n&&(e=!0,t+=` style="`+u(n)+`"`);var r=u(this.text);return e?(t+=`>`,t+=r,t+=``,t):r}},He=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n`;for(var n=0;n`,e}},Ue=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,we[this.pathName]),e}toMarkup(){return this.alternate?``:``}},We=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=``,e}};function Ge(e){if(e instanceof Ve)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Ke(e){if(e instanceof Le)return e;throw Error(`Expected span but got `+String(e)+`.`)}var qe=e=>e instanceof Le||e instanceof Re||e instanceof De,Je={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Ye={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Xe={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function Ze(e,t){Je[e]=t}function Qe(e,t,n){if(!Je[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Je[t][r];if(!i&&e[0]in Xe&&(r=Xe[e[0]].charCodeAt(0),i=Je[t][r]),!i&&n===`text`&&fe(r)&&(i=Je[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var $e={};function et(e){var t=e>=5?0:e>=3?1:2;if(!$e[t]){var n=$e[t]={cssEmPerMu:Ye.quad[t]/18};for(var r of Object.keys(Ye))n[r]=Ye[r][t]}return $e[t]}var A={math:{},text:{}};function j(e,t,n,r,i,a){A[e][i]={font:t,group:n,replace:r},a&&r&&(A[e][r]=A[e][i])}var M=`math`,N=`text`,P=`main`,F=`ams`,I=`accent-token`,L=`bin`,tt=`close`,nt=`inner`,R=`mathord`,z=`op-token`,rt=`open`,it=`punct`,B=`rel`,at=`spacing`,V=`textord`;j(M,P,B,`≡`,`\\equiv`,!0),j(M,P,B,`≺`,`\\prec`,!0),j(M,P,B,`≻`,`\\succ`,!0),j(M,P,B,`∼`,`\\sim`,!0),j(M,P,B,`⊥`,`\\perp`),j(M,P,B,`⪯`,`\\preceq`,!0),j(M,P,B,`⪰`,`\\succeq`,!0),j(M,P,B,`≃`,`\\simeq`,!0),j(M,P,B,`∣`,`\\mid`,!0),j(M,P,B,`≪`,`\\ll`,!0),j(M,P,B,`≫`,`\\gg`,!0),j(M,P,B,`≍`,`\\asymp`,!0),j(M,P,B,`∥`,`\\parallel`),j(M,P,B,`⋈`,`\\bowtie`,!0),j(M,P,B,`⌣`,`\\smile`,!0),j(M,P,B,`⊑`,`\\sqsubseteq`,!0),j(M,P,B,`⊒`,`\\sqsupseteq`,!0),j(M,P,B,`≐`,`\\doteq`,!0),j(M,P,B,`⌢`,`\\frown`,!0),j(M,P,B,`∋`,`\\ni`,!0),j(M,P,B,`∝`,`\\propto`,!0),j(M,P,B,`⊢`,`\\vdash`,!0),j(M,P,B,`⊣`,`\\dashv`,!0),j(M,P,B,`∋`,`\\owns`),j(M,P,it,`.`,`\\ldotp`),j(M,P,it,`⋅`,`\\cdotp`),j(M,P,it,`⋅`,`·`),j(N,P,V,`⋅`,`·`),j(M,P,V,`#`,`\\#`),j(N,P,V,`#`,`\\#`),j(M,P,V,`&`,`\\&`),j(N,P,V,`&`,`\\&`),j(M,P,V,`ℵ`,`\\aleph`,!0),j(M,P,V,`∀`,`\\forall`,!0),j(M,P,V,`ℏ`,`\\hbar`,!0),j(M,P,V,`∃`,`\\exists`,!0),j(M,P,V,`∇`,`\\nabla`,!0),j(M,P,V,`♭`,`\\flat`,!0),j(M,P,V,`ℓ`,`\\ell`,!0),j(M,P,V,`♮`,`\\natural`,!0),j(M,P,V,`♣`,`\\clubsuit`,!0),j(M,P,V,`℘`,`\\wp`,!0),j(M,P,V,`♯`,`\\sharp`,!0),j(M,P,V,`♢`,`\\diamondsuit`,!0),j(M,P,V,`ℜ`,`\\Re`,!0),j(M,P,V,`♡`,`\\heartsuit`,!0),j(M,P,V,`ℑ`,`\\Im`,!0),j(M,P,V,`♠`,`\\spadesuit`,!0),j(M,P,V,`§`,`\\S`,!0),j(N,P,V,`§`,`\\S`),j(M,P,V,`¶`,`\\P`,!0),j(N,P,V,`¶`,`\\P`),j(M,P,V,`†`,`\\dag`),j(N,P,V,`†`,`\\dag`),j(N,P,V,`†`,`\\textdagger`),j(M,P,V,`‡`,`\\ddag`),j(N,P,V,`‡`,`\\ddag`),j(N,P,V,`‡`,`\\textdaggerdbl`),j(M,P,tt,`⎱`,`\\rmoustache`,!0),j(M,P,rt,`⎰`,`\\lmoustache`,!0),j(M,P,tt,`⟯`,`\\rgroup`,!0),j(M,P,rt,`⟮`,`\\lgroup`,!0),j(M,P,L,`∓`,`\\mp`,!0),j(M,P,L,`⊖`,`\\ominus`,!0),j(M,P,L,`⊎`,`\\uplus`,!0),j(M,P,L,`⊓`,`\\sqcap`,!0),j(M,P,L,`∗`,`\\ast`),j(M,P,L,`⊔`,`\\sqcup`,!0),j(M,P,L,`◯`,`\\bigcirc`,!0),j(M,P,L,`∙`,`\\bullet`,!0),j(M,P,L,`‡`,`\\ddagger`),j(M,P,L,`≀`,`\\wr`,!0),j(M,P,L,`⨿`,`\\amalg`),j(M,P,L,`&`,`\\And`),j(M,P,B,`⟵`,`\\longleftarrow`,!0),j(M,P,B,`⇐`,`\\Leftarrow`,!0),j(M,P,B,`⟸`,`\\Longleftarrow`,!0),j(M,P,B,`⟶`,`\\longrightarrow`,!0),j(M,P,B,`⇒`,`\\Rightarrow`,!0),j(M,P,B,`⟹`,`\\Longrightarrow`,!0),j(M,P,B,`↔`,`\\leftrightarrow`,!0),j(M,P,B,`⟷`,`\\longleftrightarrow`,!0),j(M,P,B,`⇔`,`\\Leftrightarrow`,!0),j(M,P,B,`⟺`,`\\Longleftrightarrow`,!0),j(M,P,B,`↦`,`\\mapsto`,!0),j(M,P,B,`⟼`,`\\longmapsto`,!0),j(M,P,B,`↗`,`\\nearrow`,!0),j(M,P,B,`↩`,`\\hookleftarrow`,!0),j(M,P,B,`↪`,`\\hookrightarrow`,!0),j(M,P,B,`↘`,`\\searrow`,!0),j(M,P,B,`↼`,`\\leftharpoonup`,!0),j(M,P,B,`⇀`,`\\rightharpoonup`,!0),j(M,P,B,`↙`,`\\swarrow`,!0),j(M,P,B,`↽`,`\\leftharpoondown`,!0),j(M,P,B,`⇁`,`\\rightharpoondown`,!0),j(M,P,B,`↖`,`\\nwarrow`,!0),j(M,P,B,`⇌`,`\\rightleftharpoons`,!0),j(M,F,B,`≮`,`\\nless`,!0),j(M,F,B,``,`\\@nleqslant`),j(M,F,B,``,`\\@nleqq`),j(M,F,B,`⪇`,`\\lneq`,!0),j(M,F,B,`≨`,`\\lneqq`,!0),j(M,F,B,``,`\\@lvertneqq`),j(M,F,B,`⋦`,`\\lnsim`,!0),j(M,F,B,`⪉`,`\\lnapprox`,!0),j(M,F,B,`⊀`,`\\nprec`,!0),j(M,F,B,`⋠`,`\\npreceq`,!0),j(M,F,B,`⋨`,`\\precnsim`,!0),j(M,F,B,`⪹`,`\\precnapprox`,!0),j(M,F,B,`≁`,`\\nsim`,!0),j(M,F,B,``,`\\@nshortmid`),j(M,F,B,`∤`,`\\nmid`,!0),j(M,F,B,`⊬`,`\\nvdash`,!0),j(M,F,B,`⊭`,`\\nvDash`,!0),j(M,F,B,`⋪`,`\\ntriangleleft`),j(M,F,B,`⋬`,`\\ntrianglelefteq`,!0),j(M,F,B,`⊊`,`\\subsetneq`,!0),j(M,F,B,``,`\\@varsubsetneq`),j(M,F,B,`⫋`,`\\subsetneqq`,!0),j(M,F,B,``,`\\@varsubsetneqq`),j(M,F,B,`≯`,`\\ngtr`,!0),j(M,F,B,``,`\\@ngeqslant`),j(M,F,B,``,`\\@ngeqq`),j(M,F,B,`⪈`,`\\gneq`,!0),j(M,F,B,`≩`,`\\gneqq`,!0),j(M,F,B,``,`\\@gvertneqq`),j(M,F,B,`⋧`,`\\gnsim`,!0),j(M,F,B,`⪊`,`\\gnapprox`,!0),j(M,F,B,`⊁`,`\\nsucc`,!0),j(M,F,B,`⋡`,`\\nsucceq`,!0),j(M,F,B,`⋩`,`\\succnsim`,!0),j(M,F,B,`⪺`,`\\succnapprox`,!0),j(M,F,B,`≆`,`\\ncong`,!0),j(M,F,B,``,`\\@nshortparallel`),j(M,F,B,`∦`,`\\nparallel`,!0),j(M,F,B,`⊯`,`\\nVDash`,!0),j(M,F,B,`⋫`,`\\ntriangleright`),j(M,F,B,`⋭`,`\\ntrianglerighteq`,!0),j(M,F,B,``,`\\@nsupseteqq`),j(M,F,B,`⊋`,`\\supsetneq`,!0),j(M,F,B,``,`\\@varsupsetneq`),j(M,F,B,`⫌`,`\\supsetneqq`,!0),j(M,F,B,``,`\\@varsupsetneqq`),j(M,F,B,`⊮`,`\\nVdash`,!0),j(M,F,B,`⪵`,`\\precneqq`,!0),j(M,F,B,`⪶`,`\\succneqq`,!0),j(M,F,B,``,`\\@nsubseteqq`),j(M,F,L,`⊴`,`\\unlhd`),j(M,F,L,`⊵`,`\\unrhd`),j(M,F,B,`↚`,`\\nleftarrow`,!0),j(M,F,B,`↛`,`\\nrightarrow`,!0),j(M,F,B,`⇍`,`\\nLeftarrow`,!0),j(M,F,B,`⇏`,`\\nRightarrow`,!0),j(M,F,B,`↮`,`\\nleftrightarrow`,!0),j(M,F,B,`⇎`,`\\nLeftrightarrow`,!0),j(M,F,B,`△`,`\\vartriangle`),j(M,F,V,`ℏ`,`\\hslash`),j(M,F,V,`▽`,`\\triangledown`),j(M,F,V,`◊`,`\\lozenge`),j(M,F,V,`Ⓢ`,`\\circledS`),j(M,F,V,`®`,`\\circledR`),j(N,F,V,`®`,`\\circledR`),j(M,F,V,`∡`,`\\measuredangle`,!0),j(M,F,V,`∄`,`\\nexists`),j(M,F,V,`℧`,`\\mho`),j(M,F,V,`Ⅎ`,`\\Finv`,!0),j(M,F,V,`⅁`,`\\Game`,!0),j(M,F,V,`‵`,`\\backprime`),j(M,F,V,`▲`,`\\blacktriangle`),j(M,F,V,`▼`,`\\blacktriangledown`),j(M,F,V,`■`,`\\blacksquare`),j(M,F,V,`⧫`,`\\blacklozenge`),j(M,F,V,`★`,`\\bigstar`),j(M,F,V,`∢`,`\\sphericalangle`,!0),j(M,F,V,`∁`,`\\complement`,!0),j(M,F,V,`ð`,`\\eth`,!0),j(N,P,V,`ð`,`ð`),j(M,F,V,`╱`,`\\diagup`),j(M,F,V,`╲`,`\\diagdown`),j(M,F,V,`□`,`\\square`),j(M,F,V,`□`,`\\Box`),j(M,F,V,`◊`,`\\Diamond`),j(M,F,V,`¥`,`\\yen`,!0),j(N,F,V,`¥`,`\\yen`,!0),j(M,F,V,`✓`,`\\checkmark`,!0),j(N,F,V,`✓`,`\\checkmark`),j(M,F,V,`ℶ`,`\\beth`,!0),j(M,F,V,`ℸ`,`\\daleth`,!0),j(M,F,V,`ℷ`,`\\gimel`,!0),j(M,F,V,`ϝ`,`\\digamma`,!0),j(M,F,V,`ϰ`,`\\varkappa`),j(M,F,rt,`┌`,`\\@ulcorner`,!0),j(M,F,tt,`┐`,`\\@urcorner`,!0),j(M,F,rt,`└`,`\\@llcorner`,!0),j(M,F,tt,`┘`,`\\@lrcorner`,!0),j(M,F,B,`≦`,`\\leqq`,!0),j(M,F,B,`⩽`,`\\leqslant`,!0),j(M,F,B,`⪕`,`\\eqslantless`,!0),j(M,F,B,`≲`,`\\lesssim`,!0),j(M,F,B,`⪅`,`\\lessapprox`,!0),j(M,F,B,`≊`,`\\approxeq`,!0),j(M,F,L,`⋖`,`\\lessdot`),j(M,F,B,`⋘`,`\\lll`,!0),j(M,F,B,`≶`,`\\lessgtr`,!0),j(M,F,B,`⋚`,`\\lesseqgtr`,!0),j(M,F,B,`⪋`,`\\lesseqqgtr`,!0),j(M,F,B,`≑`,`\\doteqdot`),j(M,F,B,`≓`,`\\risingdotseq`,!0),j(M,F,B,`≒`,`\\fallingdotseq`,!0),j(M,F,B,`∽`,`\\backsim`,!0),j(M,F,B,`⋍`,`\\backsimeq`,!0),j(M,F,B,`⫅`,`\\subseteqq`,!0),j(M,F,B,`⋐`,`\\Subset`,!0),j(M,F,B,`⊏`,`\\sqsubset`,!0),j(M,F,B,`≼`,`\\preccurlyeq`,!0),j(M,F,B,`⋞`,`\\curlyeqprec`,!0),j(M,F,B,`≾`,`\\precsim`,!0),j(M,F,B,`⪷`,`\\precapprox`,!0),j(M,F,B,`⊲`,`\\vartriangleleft`),j(M,F,B,`⊴`,`\\trianglelefteq`),j(M,F,B,`⊨`,`\\vDash`,!0),j(M,F,B,`⊪`,`\\Vvdash`,!0),j(M,F,B,`⌣`,`\\smallsmile`),j(M,F,B,`⌢`,`\\smallfrown`),j(M,F,B,`≏`,`\\bumpeq`,!0),j(M,F,B,`≎`,`\\Bumpeq`,!0),j(M,F,B,`≧`,`\\geqq`,!0),j(M,F,B,`⩾`,`\\geqslant`,!0),j(M,F,B,`⪖`,`\\eqslantgtr`,!0),j(M,F,B,`≳`,`\\gtrsim`,!0),j(M,F,B,`⪆`,`\\gtrapprox`,!0),j(M,F,L,`⋗`,`\\gtrdot`),j(M,F,B,`⋙`,`\\ggg`,!0),j(M,F,B,`≷`,`\\gtrless`,!0),j(M,F,B,`⋛`,`\\gtreqless`,!0),j(M,F,B,`⪌`,`\\gtreqqless`,!0),j(M,F,B,`≖`,`\\eqcirc`,!0),j(M,F,B,`≗`,`\\circeq`,!0),j(M,F,B,`≜`,`\\triangleq`,!0),j(M,F,B,`∼`,`\\thicksim`),j(M,F,B,`≈`,`\\thickapprox`),j(M,F,B,`⫆`,`\\supseteqq`,!0),j(M,F,B,`⋑`,`\\Supset`,!0),j(M,F,B,`⊐`,`\\sqsupset`,!0),j(M,F,B,`≽`,`\\succcurlyeq`,!0),j(M,F,B,`⋟`,`\\curlyeqsucc`,!0),j(M,F,B,`≿`,`\\succsim`,!0),j(M,F,B,`⪸`,`\\succapprox`,!0),j(M,F,B,`⊳`,`\\vartriangleright`),j(M,F,B,`⊵`,`\\trianglerighteq`),j(M,F,B,`⊩`,`\\Vdash`,!0),j(M,F,B,`∣`,`\\shortmid`),j(M,F,B,`∥`,`\\shortparallel`),j(M,F,B,`≬`,`\\between`,!0),j(M,F,B,`⋔`,`\\pitchfork`,!0),j(M,F,B,`∝`,`\\varpropto`),j(M,F,B,`◀`,`\\blacktriangleleft`),j(M,F,B,`∴`,`\\therefore`,!0),j(M,F,B,`∍`,`\\backepsilon`),j(M,F,B,`▶`,`\\blacktriangleright`),j(M,F,B,`∵`,`\\because`,!0),j(M,F,B,`⋘`,`\\llless`),j(M,F,B,`⋙`,`\\gggtr`),j(M,F,L,`⊲`,`\\lhd`),j(M,F,L,`⊳`,`\\rhd`),j(M,F,B,`≂`,`\\eqsim`,!0),j(M,P,B,`⋈`,`\\Join`),j(M,F,B,`≑`,`\\Doteq`,!0),j(M,F,L,`∔`,`\\dotplus`,!0),j(M,F,L,`∖`,`\\smallsetminus`),j(M,F,L,`⋒`,`\\Cap`,!0),j(M,F,L,`⋓`,`\\Cup`,!0),j(M,F,L,`⩞`,`\\doublebarwedge`,!0),j(M,F,L,`⊟`,`\\boxminus`,!0),j(M,F,L,`⊞`,`\\boxplus`,!0),j(M,F,L,`⋇`,`\\divideontimes`,!0),j(M,F,L,`⋉`,`\\ltimes`,!0),j(M,F,L,`⋊`,`\\rtimes`,!0),j(M,F,L,`⋋`,`\\leftthreetimes`,!0),j(M,F,L,`⋌`,`\\rightthreetimes`,!0),j(M,F,L,`⋏`,`\\curlywedge`,!0),j(M,F,L,`⋎`,`\\curlyvee`,!0),j(M,F,L,`⊝`,`\\circleddash`,!0),j(M,F,L,`⊛`,`\\circledast`,!0),j(M,F,L,`⋅`,`\\centerdot`),j(M,F,L,`⊺`,`\\intercal`,!0),j(M,F,L,`⋒`,`\\doublecap`),j(M,F,L,`⋓`,`\\doublecup`),j(M,F,L,`⊠`,`\\boxtimes`,!0),j(M,F,B,`⇢`,`\\dashrightarrow`,!0),j(M,F,B,`⇠`,`\\dashleftarrow`,!0),j(M,F,B,`⇇`,`\\leftleftarrows`,!0),j(M,F,B,`⇆`,`\\leftrightarrows`,!0),j(M,F,B,`⇚`,`\\Lleftarrow`,!0),j(M,F,B,`↞`,`\\twoheadleftarrow`,!0),j(M,F,B,`↢`,`\\leftarrowtail`,!0),j(M,F,B,`↫`,`\\looparrowleft`,!0),j(M,F,B,`⇋`,`\\leftrightharpoons`,!0),j(M,F,B,`↶`,`\\curvearrowleft`,!0),j(M,F,B,`↺`,`\\circlearrowleft`,!0),j(M,F,B,`↰`,`\\Lsh`,!0),j(M,F,B,`⇈`,`\\upuparrows`,!0),j(M,F,B,`↿`,`\\upharpoonleft`,!0),j(M,F,B,`⇃`,`\\downharpoonleft`,!0),j(M,P,B,`⊶`,`\\origof`,!0),j(M,P,B,`⊷`,`\\imageof`,!0),j(M,F,B,`⊸`,`\\multimap`,!0),j(M,F,B,`↭`,`\\leftrightsquigarrow`,!0),j(M,F,B,`⇉`,`\\rightrightarrows`,!0),j(M,F,B,`⇄`,`\\rightleftarrows`,!0),j(M,F,B,`↠`,`\\twoheadrightarrow`,!0),j(M,F,B,`↣`,`\\rightarrowtail`,!0),j(M,F,B,`↬`,`\\looparrowright`,!0),j(M,F,B,`↷`,`\\curvearrowright`,!0),j(M,F,B,`↻`,`\\circlearrowright`,!0),j(M,F,B,`↱`,`\\Rsh`,!0),j(M,F,B,`⇊`,`\\downdownarrows`,!0),j(M,F,B,`↾`,`\\upharpoonright`,!0),j(M,F,B,`⇂`,`\\downharpoonright`,!0),j(M,F,B,`⇝`,`\\rightsquigarrow`,!0),j(M,F,B,`⇝`,`\\leadsto`),j(M,F,B,`⇛`,`\\Rrightarrow`,!0),j(M,F,B,`↾`,`\\restriction`),j(M,P,V,`‘`,"`"),j(M,P,V,`$`,`\\$`),j(N,P,V,`$`,`\\$`),j(N,P,V,`$`,`\\textdollar`),j(M,P,V,`%`,`\\%`),j(N,P,V,`%`,`\\%`),j(M,P,V,`_`,`\\_`),j(N,P,V,`_`,`\\_`),j(N,P,V,`_`,`\\textunderscore`),j(M,P,V,`∠`,`\\angle`,!0),j(M,P,V,`∞`,`\\infty`,!0),j(M,P,V,`′`,`\\prime`),j(M,P,V,`△`,`\\triangle`),j(M,P,V,`Γ`,`\\Gamma`,!0),j(M,P,V,`Δ`,`\\Delta`,!0),j(M,P,V,`Θ`,`\\Theta`,!0),j(M,P,V,`Λ`,`\\Lambda`,!0),j(M,P,V,`Ξ`,`\\Xi`,!0),j(M,P,V,`Π`,`\\Pi`,!0),j(M,P,V,`Σ`,`\\Sigma`,!0),j(M,P,V,`Υ`,`\\Upsilon`,!0),j(M,P,V,`Φ`,`\\Phi`,!0),j(M,P,V,`Ψ`,`\\Psi`,!0),j(M,P,V,`Ω`,`\\Omega`,!0),j(M,P,V,`A`,`Α`),j(M,P,V,`B`,`Β`),j(M,P,V,`E`,`Ε`),j(M,P,V,`Z`,`Ζ`),j(M,P,V,`H`,`Η`),j(M,P,V,`I`,`Ι`),j(M,P,V,`K`,`Κ`),j(M,P,V,`M`,`Μ`),j(M,P,V,`N`,`Ν`),j(M,P,V,`O`,`Ο`),j(M,P,V,`P`,`Ρ`),j(M,P,V,`T`,`Τ`),j(M,P,V,`X`,`Χ`),j(M,P,V,`¬`,`\\neg`,!0),j(M,P,V,`¬`,`\\lnot`),j(M,P,V,`⊤`,`\\top`),j(M,P,V,`⊥`,`\\bot`),j(M,P,V,`∅`,`\\emptyset`),j(M,F,V,`∅`,`\\varnothing`),j(M,P,R,`α`,`\\alpha`,!0),j(M,P,R,`β`,`\\beta`,!0),j(M,P,R,`γ`,`\\gamma`,!0),j(M,P,R,`δ`,`\\delta`,!0),j(M,P,R,`ϵ`,`\\epsilon`,!0),j(M,P,R,`ζ`,`\\zeta`,!0),j(M,P,R,`η`,`\\eta`,!0),j(M,P,R,`θ`,`\\theta`,!0),j(M,P,R,`ι`,`\\iota`,!0),j(M,P,R,`κ`,`\\kappa`,!0),j(M,P,R,`λ`,`\\lambda`,!0),j(M,P,R,`μ`,`\\mu`,!0),j(M,P,R,`ν`,`\\nu`,!0),j(M,P,R,`ξ`,`\\xi`,!0),j(M,P,R,`ο`,`\\omicron`,!0),j(M,P,R,`π`,`\\pi`,!0),j(M,P,R,`ρ`,`\\rho`,!0),j(M,P,R,`σ`,`\\sigma`,!0),j(M,P,R,`τ`,`\\tau`,!0),j(M,P,R,`υ`,`\\upsilon`,!0),j(M,P,R,`ϕ`,`\\phi`,!0),j(M,P,R,`χ`,`\\chi`,!0),j(M,P,R,`ψ`,`\\psi`,!0),j(M,P,R,`ω`,`\\omega`,!0),j(M,P,R,`ε`,`\\varepsilon`,!0),j(M,P,R,`ϑ`,`\\vartheta`,!0),j(M,P,R,`ϖ`,`\\varpi`,!0),j(M,P,R,`ϱ`,`\\varrho`,!0),j(M,P,R,`ς`,`\\varsigma`,!0),j(M,P,R,`φ`,`\\varphi`,!0),j(M,P,L,`∗`,`*`,!0),j(M,P,L,`+`,`+`),j(M,P,L,`−`,`-`,!0),j(M,P,L,`⋅`,`\\cdot`,!0),j(M,P,L,`∘`,`\\circ`,!0),j(M,P,L,`÷`,`\\div`,!0),j(M,P,L,`±`,`\\pm`,!0),j(M,P,L,`×`,`\\times`,!0),j(M,P,L,`∩`,`\\cap`,!0),j(M,P,L,`∪`,`\\cup`,!0),j(M,P,L,`∖`,`\\setminus`,!0),j(M,P,L,`∧`,`\\land`),j(M,P,L,`∨`,`\\lor`),j(M,P,L,`∧`,`\\wedge`,!0),j(M,P,L,`∨`,`\\vee`,!0),j(M,P,V,`√`,`\\surd`),j(M,P,rt,`⟨`,`\\langle`,!0),j(M,P,rt,`∣`,`\\lvert`),j(M,P,rt,`∥`,`\\lVert`),j(M,P,tt,`?`,`?`),j(M,P,tt,`!`,`!`),j(M,P,tt,`⟩`,`\\rangle`,!0),j(M,P,tt,`∣`,`\\rvert`),j(M,P,tt,`∥`,`\\rVert`),j(M,P,B,`=`,`=`),j(M,P,B,`:`,`:`),j(M,P,B,`≈`,`\\approx`,!0),j(M,P,B,`≅`,`\\cong`,!0),j(M,P,B,`≥`,`\\ge`),j(M,P,B,`≥`,`\\geq`,!0),j(M,P,B,`←`,`\\gets`),j(M,P,B,`>`,`\\gt`,!0),j(M,P,B,`∈`,`\\in`,!0),j(M,P,B,``,`\\@not`),j(M,P,B,`⊂`,`\\subset`,!0),j(M,P,B,`⊃`,`\\supset`,!0),j(M,P,B,`⊆`,`\\subseteq`,!0),j(M,P,B,`⊇`,`\\supseteq`,!0),j(M,F,B,`⊈`,`\\nsubseteq`,!0),j(M,F,B,`⊉`,`\\nsupseteq`,!0),j(M,P,B,`⊨`,`\\models`),j(M,P,B,`←`,`\\leftarrow`,!0),j(M,P,B,`≤`,`\\le`),j(M,P,B,`≤`,`\\leq`,!0),j(M,P,B,`<`,`\\lt`,!0),j(M,P,B,`→`,`\\rightarrow`,!0),j(M,P,B,`→`,`\\to`),j(M,F,B,`≱`,`\\ngeq`,!0),j(M,F,B,`≰`,`\\nleq`,!0),j(M,P,at,`\xA0`,`\\ `),j(M,P,at,`\xA0`,`\\space`),j(M,P,at,`\xA0`,`\\nobreakspace`),j(N,P,at,`\xA0`,`\\ `),j(N,P,at,`\xA0`,` `),j(N,P,at,`\xA0`,`\\space`),j(N,P,at,`\xA0`,`\\nobreakspace`),j(M,P,at,``,`\\nobreak`),j(M,P,at,``,`\\allowbreak`),j(M,P,it,`,`,`,`),j(M,P,it,`;`,`;`),j(M,F,L,`⊼`,`\\barwedge`,!0),j(M,F,L,`⊻`,`\\veebar`,!0),j(M,P,L,`⊙`,`\\odot`,!0),j(M,P,L,`⊕`,`\\oplus`,!0),j(M,P,L,`⊗`,`\\otimes`,!0),j(M,P,V,`∂`,`\\partial`,!0),j(M,P,L,`⊘`,`\\oslash`,!0),j(M,F,L,`⊚`,`\\circledcirc`,!0),j(M,F,L,`⊡`,`\\boxdot`,!0),j(M,P,L,`△`,`\\bigtriangleup`),j(M,P,L,`▽`,`\\bigtriangledown`),j(M,P,L,`†`,`\\dagger`),j(M,P,L,`⋄`,`\\diamond`),j(M,P,L,`⋆`,`\\star`),j(M,P,L,`◃`,`\\triangleleft`),j(M,P,L,`▹`,`\\triangleright`),j(M,P,rt,`{`,`\\{`),j(N,P,V,`{`,`\\{`),j(N,P,V,`{`,`\\textbraceleft`),j(M,P,tt,`}`,`\\}`),j(N,P,V,`}`,`\\}`),j(N,P,V,`}`,`\\textbraceright`),j(M,P,rt,`{`,`\\lbrace`),j(M,P,tt,`}`,`\\rbrace`),j(M,P,rt,`[`,`\\lbrack`,!0),j(N,P,V,`[`,`\\lbrack`,!0),j(M,P,tt,`]`,`\\rbrack`,!0),j(N,P,V,`]`,`\\rbrack`,!0),j(M,P,rt,`(`,`\\lparen`,!0),j(M,P,tt,`)`,`\\rparen`,!0),j(N,P,V,`<`,`\\textless`,!0),j(N,P,V,`>`,`\\textgreater`,!0),j(M,P,rt,`⌊`,`\\lfloor`,!0),j(M,P,tt,`⌋`,`\\rfloor`,!0),j(M,P,rt,`⌈`,`\\lceil`,!0),j(M,P,tt,`⌉`,`\\rceil`,!0),j(M,P,V,`\\`,`\\backslash`),j(M,P,V,`∣`,`|`),j(M,P,V,`∣`,`\\vert`),j(N,P,V,`|`,`\\textbar`,!0),j(M,P,V,`∥`,`\\|`),j(M,P,V,`∥`,`\\Vert`),j(N,P,V,`∥`,`\\textbardbl`),j(N,P,V,`~`,`\\textasciitilde`),j(N,P,V,`\\`,`\\textbackslash`),j(N,P,V,`^`,`\\textasciicircum`),j(M,P,B,`↑`,`\\uparrow`,!0),j(M,P,B,`⇑`,`\\Uparrow`,!0),j(M,P,B,`↓`,`\\downarrow`,!0),j(M,P,B,`⇓`,`\\Downarrow`,!0),j(M,P,B,`↕`,`\\updownarrow`,!0),j(M,P,B,`⇕`,`\\Updownarrow`,!0),j(M,P,z,`∐`,`\\coprod`),j(M,P,z,`⋁`,`\\bigvee`),j(M,P,z,`⋀`,`\\bigwedge`),j(M,P,z,`⨄`,`\\biguplus`),j(M,P,z,`⋂`,`\\bigcap`),j(M,P,z,`⋃`,`\\bigcup`),j(M,P,z,`∫`,`\\int`),j(M,P,z,`∫`,`\\intop`),j(M,P,z,`∬`,`\\iint`),j(M,P,z,`∭`,`\\iiint`),j(M,P,z,`∏`,`\\prod`),j(M,P,z,`∑`,`\\sum`),j(M,P,z,`⨂`,`\\bigotimes`),j(M,P,z,`⨁`,`\\bigoplus`),j(M,P,z,`⨀`,`\\bigodot`),j(M,P,z,`∮`,`\\oint`),j(M,P,z,`∯`,`\\oiint`),j(M,P,z,`∰`,`\\oiiint`),j(M,P,z,`⨆`,`\\bigsqcup`),j(M,P,z,`∫`,`\\smallint`),j(N,P,nt,`…`,`\\textellipsis`),j(M,P,nt,`…`,`\\mathellipsis`),j(N,P,nt,`…`,`\\ldots`,!0),j(M,P,nt,`…`,`\\ldots`,!0),j(M,P,nt,`⋯`,`\\@cdots`,!0),j(M,P,nt,`⋱`,`\\ddots`,!0),j(M,P,V,`⋮`,`\\varvdots`),j(N,P,V,`⋮`,`\\varvdots`),j(M,P,I,`ˊ`,`\\acute`),j(M,P,I,`ˋ`,`\\grave`),j(M,P,I,`¨`,`\\ddot`),j(M,P,I,`~`,`\\tilde`),j(M,P,I,`ˉ`,`\\bar`),j(M,P,I,`˘`,`\\breve`),j(M,P,I,`ˇ`,`\\check`),j(M,P,I,`^`,`\\hat`),j(M,P,I,`⃗`,`\\vec`),j(M,P,I,`˙`,`\\dot`),j(M,P,I,`˚`,`\\mathring`),j(M,P,R,``,`\\@imath`),j(M,P,R,``,`\\@jmath`),j(M,P,V,`ı`,`ı`),j(M,P,V,`ȷ`,`ȷ`),j(N,P,V,`ı`,`\\i`,!0),j(N,P,V,`ȷ`,`\\j`,!0),j(N,P,V,`ß`,`\\ss`,!0),j(N,P,V,`æ`,`\\ae`,!0),j(N,P,V,`œ`,`\\oe`,!0),j(N,P,V,`ø`,`\\o`,!0),j(N,P,V,`Æ`,`\\AE`,!0),j(N,P,V,`Œ`,`\\OE`,!0),j(N,P,V,`Ø`,`\\O`,!0),j(N,P,I,`ˊ`,`\\'`),j(N,P,I,`ˋ`,"\\`"),j(N,P,I,`ˆ`,`\\^`),j(N,P,I,`˜`,`\\~`),j(N,P,I,`ˉ`,`\\=`),j(N,P,I,`˘`,`\\u`),j(N,P,I,`˙`,`\\.`),j(N,P,I,`¸`,`\\c`),j(N,P,I,`˚`,`\\r`),j(N,P,I,`ˇ`,`\\v`),j(N,P,I,`¨`,`\\"`),j(N,P,I,`˝`,`\\H`),j(N,P,I,`◯`,`\\textcircled`);var ot={"--":!0,"---":!0,"``":!0,"''":!0};j(N,P,V,`–`,`--`,!0),j(N,P,V,`–`,`\\textendash`),j(N,P,V,`—`,`---`,!0),j(N,P,V,`—`,`\\textemdash`),j(N,P,V,`‘`,"`",!0),j(N,P,V,`‘`,`\\textquoteleft`),j(N,P,V,`’`,`'`,!0),j(N,P,V,`’`,`\\textquoteright`),j(N,P,V,`“`,"``",!0),j(N,P,V,`“`,`\\textquotedblleft`),j(N,P,V,`”`,`''`,!0),j(N,P,V,`”`,`\\textquotedblright`),j(M,P,V,`°`,`\\degree`,!0),j(N,P,V,`°`,`\\degree`),j(N,P,V,`°`,`\\textdegree`,!0),j(M,P,V,`£`,`\\pounds`),j(M,P,V,`£`,`\\mathsterling`,!0),j(N,P,V,`£`,`\\pounds`),j(N,P,V,`£`,`\\textsterling`,!0),j(M,F,V,`✠`,`\\maltese`),j(N,F,V,`✠`,`\\maltese`);for(var st=`0123456789/@."`,ct=0;ct{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return Pt[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return Ft[Math.floor((r-120782)/10)];if(r===120485||r===120486)return Pt[0];if(120486{if(je(e.classes)!==je(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},Ut=e=>{for(var t=0;tt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},W=function(e,t,n,r){var i=new Le(e,t,n,r);return Wt(i),i},Gt=(e,t,n,r)=>new Le(e,t,n,r),Kt=function(e,t,n){var r=W([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=k(r.height),r.maxFontSize=1,r},qt=function(e,t,n,r){var i=new Re(e,t,n,r);return Wt(i),i},Jt=function(e){var t=new De(e);return Wt(t),t},Yt=function(e,t){return e instanceof De?W([],[e],t):e},Xt=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a{var n=W([`mspace`],[],t),r=O(e,t);return n.style.marginRight=k(r),n},Qt=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},$t={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},en={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},tn=function(e,t){var n=en[e],r=n[0],i=n[1],a=n[2],o=Gt([`katex-overlay`],[new He([new Ue(r)],{width:k(i),height:k(a),style:`width:`+k(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`})],t);return o.height=a,o.style.height=k(a),o.style.width=k(i),o},K={number:3,unit:`mu`},nn={number:4,unit:`mu`},rn={number:5,unit:`mu`},an={mord:{mop:K,mbin:nn,mrel:rn,minner:K},mop:{mord:K,mop:K,mrel:rn,minner:K},mbin:{mord:nn,mop:nn,mopen:nn,minner:nn},mrel:{mord:rn,mop:rn,mopen:rn,minner:rn},mopen:{},mclose:{mop:K,mbin:nn,mrel:rn,minner:K},mpunct:{mord:K,mop:K,mrel:rn,mopen:K,mclose:K,mpunct:K,minner:K},minner:{mord:K,mop:K,mbin:nn,mrel:rn,mopen:K,mpunct:K,minner:K}},on={mord:{mop:K},mop:{mord:K,mop:K},mbin:{},mrel:{},mopen:{},mclose:{mop:K},mpunct:{},minner:{mop:K}},sn={},cn={},ln={};function q(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a{var n=t.classes[0],r=e.classes[0];n===`mbin`&&mn.has(r)?t.classes[0]=`mord`:r===`mbin`&&pn.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),vn(i,(e,t)=>{var n=xn(t),r=xn(e),i=n&&r?e.hasClass(`mtight`)?on[n]?.[r]:an[n]?.[r]:null;if(i)return Zt(i,c)},{node:u},d,f),i},vn=function(e,t,n,r,i){r&&e.push(r);for(var a=0;an=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},yn=function(e){return e instanceof De||e instanceof Re||e instanceof Le&&e.hasClass(`enclosing`)?e:null},bn=function(e,t){var n=yn(e);if(n){var r=n.children;if(r.length){if(t===`right`)return bn(r[r.length-1],`right`);if(t===`left`)return bn(r[0],`left`)}}return e},xn=function(e,t){return e?(t&&(e=bn(e,t)),gn[e.classes[0]]||null):null},Sn=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return W(t.concat(n))},J=function(e,t,n){if(!e)return W();if(cn[e.type]){var r=cn[e.type](e,t);if(n&&t.size!==n.size){r=W(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new a(`Got group of unknown type: '`+e.type+`'`)};function Cn(e,t){var n=W([`katex-base`],e,t),r=W([`katex-strut`]);return r.style.height=k(n.height+n.depth),n.depth&&(r.style.verticalAlign=k(-n.depth)),n.children.unshift(r),n}function wn(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=_n(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s0&&(a.push(Cn(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(Cn(o,t));var l;n?(l=Cn(_n(n,t,!0),t),l.classes=[`katex-tag`],a.push(l)):i&&a.push(i);var u=W([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=k(u.height+u.depth),u.depth&&(d.style.verticalAlign=k(-u.depth))}return u}function Tn(e){return new De(e)}var Y=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=je(this.classes));for(var i=0;i0&&(e+=` class ="`+u(je(this.classes))+`"`),e+=`>`;for(var i=0;i`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},En=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return u(this.toText())}toText(){return this.text}},Dn=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,k(this.width)),e}toMarkup(){return this.character?``+this.character+``:``}toText(){return this.character?this.character:` `}},On=new Set([`\\imath`,`\\jmath`]),kn=new Set([`mrow`,`mtable`]),An=function(e,t,n){var r,i;return A[t][e]&&A[t][e].replace&&e.charCodeAt(0)!==55349&&(!Object.prototype.hasOwnProperty.call(ot,e)||(n==null||(r=n.fontFamily)==null?void 0:r.slice(4,6))!==`tt`&&(n==null||(i=n.font)==null?void 0:i.slice(4,6))!==`tt`)&&(e=A[t][e].replace),new En(e)},jn=function(e){return e.length===1?e[0]:new Y(`mrow`,e)},Mn={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},Nn=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=Mn[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(On.has(a))return null;if(A[r][a]){var o=A[r][a].replace;o&&(a=o)}var s=$t[n].fontName;return Qe(a,s,r)?$t[n].variant:null};function Pn(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof En&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof En&&n.text===`,`}return!1}var Fn=function(e,t,n){if(e.length===1){var r=X(e[0],t);return n&&r instanceof Y&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o=1&&(a.type===`mn`||Pn(a))){var c=s.children[0];c instanceof Y&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof En&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof En&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},In=function(e,t,n){return jn(Fn(e,t,n))},X=function(e,t){if(!e)return new Y(`mrow`);if(ln[e.type])return ln[e.type](e,t);throw new a(`Got group of unknown type: '`+e.type+`'`)};function Ln(e,t,n,r,i){var a=Fn(e,n),o=a.length===1&&a[0]instanceof Y&&kn.has(a[0].type)?a[0]:new Y(`mrow`,a),s=new Y(`annotation`,[new En(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Y(`math`,[new Y(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),W([i?`katex`:`katex-mathml`],[c])}var Rn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],zn=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Bn=function(e,t){return t.size<2?e:Rn[e-1][t.size-1]},Vn=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=zn[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Bn(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:zn[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=Bn(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=et(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};Vn.BASESIZE=6;var Hn=function(e){return new Vn({style:e.displayMode?D.DISPLAY:D.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Un=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=W(n,[e])}return e},Wn=function(e,t,n){var r=Hn(n),i;return n.output===`mathml`?Ln(e,t,r,n.displayMode,!0):(i=n.output===`html`?W([`katex`],[wn(e,r)]):W([`katex`],[Ln(e,t,r,n.displayMode,!1),wn(e,r)]),Un(i,n))},Gn=function(e,t,n){return Un(W([`katex`],[wn(e,Hn(n))]),n)},Kn={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},qn=function(e){var t=new Y(`mo`,[new En(Kn[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},Jn={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},Yn=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),Xn=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(Yn.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:Gt([],[new He([new Ue(o)],{width:`100%`,height:k(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=Jn[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var d=u[0],f=u[1],p=u[2],m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support + `+h+` children.`);for(var v=0;v0&&(i.style.minWidth=k(a)),i},Zn=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=W([`katex-stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new We({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new We({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=Gt([],[new He(c,{width:`100%`,height:k(o)})],i)}return a.height=o,a.style.height=k(o),a},Qn=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],$n=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],er=new Set(Qn),tr=new Set($n);function nr(e){return er.has(e)}function Z(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function rr(e){var t=ir(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function ir(e){return e.type===`atom`||tr.has(e.type)?e:null}function ar(e,t,n){var r=``;for(var i of e.body)if(i.type===`textord`)r+=i.text;else if(n&&i.type===`spacing`&&i.text===` `)r+=` `;else throw new a(t,e);return r}var or=e=>{if(e instanceof Ve)return e;if(qe(e)&&e.children.length===1)return or(e.children[0])},sr=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=Z(e.base,`accent`),n=r.base,e.base=n,i=Ke(J(e,t)),e.base=r):(r=Z(e,`accent`),n=r.base);var a=J(n,t.havingCrampedStyle()),o=r.isShifty&&p(n),s=0;o&&(s=or(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=Xn(r,t),u=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+k(2*s)+`)`,marginLeft:k(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=tn(`vec`,t),f=en.vec[1]):(d=Vt({type:`textord`,mode:r.mode,text:r.label},t),d=Ge(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=W([`accent-body`],[d]);var m=r.label===`\\textcircled`;m&&(u.classes.push(`accent-full`),l=a.height);var h=s;m||(h-=f/2),u.style.left=k(h),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var g=W([`mord`,`katex-accent`],[u],t);return i?(i.children[0]=g,i.height=Math.max(g.height,i.height),i.classes[0]=`mord`,i):g},cr=(e,t)=>{var n=e.isStretchy?qn(e.label):new Y(`mo`,[An(e.label,e.mode)]),r=new Y(`mover`,[X(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},lr=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));q({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],numArgs:1,handler:(e,t)=>{var n=dn(t[0]),r=!lr.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:sr,mathmlBuilder:cr}),q({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),q({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=J(e.base,t),r=Xn(e,t),i=e.label===`\\utilde`?.12:0;return W([`mord`,`accentunder`],[G({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=qn(e.label),r=new Y(`munder`,[X(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var ur=e=>{var t=new Y(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};q({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Yt(J(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Yt(J(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=Xn(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=G({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=G({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return W([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=qn(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=ur(X(e.body,t));r=e.below?new Y(`munderover`,[n,ur(X(e.below,t)),i]):new Y(`mover`,[n,i])}else e.below?r=new Y(`munder`,[n,ur(X(e.below,t))]):(r=ur(),r=new Y(`mover`,[n,r]));return r}});function dr(e,t){var n=_n(e.body,t,!0);return W([e.mclass],n,t)}function fr(e,t){var n,r=Fn(e.body,t);return e.mclass===`minner`?n=new Y(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Y(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Y(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}q({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:fn(i),isCharacterBox:p(i)}},htmlBuilder:dr,mathmlBuilder:fr});var pr=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};q({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:pr(t[0]),body:fn(t[1]),isCharacterBox:p(t[1])}}}),q({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var n=e.parser,r=e.funcName,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:pr(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:fn(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:p(c)}}}),q({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:pr(t[0]),body:fn(t[0])}},htmlBuilder(e,t){var n=_n(e.body,t,!0),r=W([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Y(`mstyle`,Fn(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var mr={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},hr=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),gr=e=>e.type===`textord`&&e.text===`@`,_r=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function vr(e,t,n){var r=mr[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function yr(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new a(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],o=0;oAV`.includes(u))for(var f=0;f<2;f++){for(var p=!0,m=l+1;mAV=|." after @`,s[l])}var h={type:`styling`,body:[vr(u,d,e)],mode:`math`,style:`display`,resetFont:!0};r.push(h),c=hr()}o%2==0?r.push(c):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}q({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Yt(J(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=k(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Y(`mrow`,[X(e.label,t)]);return n=new Y(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Y(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),q({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Yt(J(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Y(`mrow`,[X(e.fragment,t)])}}),q({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=ar(Z(t[0],`ordgroup`),`\\@char has non-numeric argument`),i=parseInt(r),o;if(isNaN(i))throw new a(`\\@char has non-numeric argument `+r);if(i<0||i>1114111)throw new a(`\\@char with invalid code point `+r);return i<=65535?o=String.fromCharCode(i):(i-=65536,o=String.fromCharCode((i>>10)+55296,(i&1023)+56320)),{type:`textord`,mode:n.mode,text:o}}}),q({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var n=e.parser,r=Z(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:fn(i)}},htmlBuilder:(e,t)=>Jt(_n(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=new Y(`mstyle`,Fn(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n}}),q({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var n=e.parser,r=e.breakOnTokenText,i=Z(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),q({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){var r=e.parser,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&Z(i,`size`).value}},htmlBuilder(e,t){var n=W([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=k(O(e.size,t)))),n},mathmlBuilder(e,t){var n=new Y(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,k(O(e.size,t)))),n}});var br={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},xr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new a(`Expected a control sequence`,e);return t},Sr=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},Cr=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};q({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(br[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=br[r.text]),Z(t.parseFunction(),`internal`);throw new a(`Invalid token after macro prefix`,r)}}),q({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a(`Expected a control sequence`,r);for(var o=0,s,c=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){s=t.gullet.future(),c[o].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new a(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==o+1)throw new a(`Argument number "`+r.text+`" out of order`);o++,c.push([])}else if(r.text===`EOF`)throw new a(`Expected a macro definition`);else c[o].push(r.text);var l=t.gullet.consumeArg().tokens;return s&&l.unshift(s),(n===`\\edef`||n===`\\xdef`)&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:o,delimiters:c},n===br[n]),{type:`internal`,mode:t.mode}}}),q({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=xr(t.gullet.popToken());return t.gullet.consumeSpaces(),Cr(t,r,Sr(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),q({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=xr(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Cr(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var wr=function(e,t,n){var r=Qe(A.math[e]&&A.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},Tr=function(e,t,n,r){var i=n.havingBaseStyle(t),a=W(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},Er=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=k(i),e.height-=i,e.depth+=i},Dr=function(e,t,n,r,i,a){var o=Tr(Rt(e,`Main-Regular`,i,r),t,r,a);return n&&Er(o,r,t),o},Or=function(e,t,n,r){return Rt(e,`Size`+t+`-Regular`,n,r)},kr=function(e,t,n,r,i,a){var o=Or(e,t,i,r),s=Tr(W([`delimsizing`,`size`+t],[o],r),D.TEXT,r,a);return n&&Er(s,r,D.TEXT),s},Ar=function(e,t,n){return{type:`elem`,elem:W([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[W([],[Rt(e,t,n)])])}},jr=function(e,t,n){var r=Je[`Size4-Regular`][e.charCodeAt(0)]?Je[`Size4-Regular`][e.charCodeAt(0)][4]:Je[`Size1-Regular`][e.charCodeAt(0)][4],i=Gt([],[new He([new Ue(`inner`,Ce(e,Math.round(1e3*t)))],{width:k(r),height:k(t),style:`width:`+k(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=k(t),i.style.width=k(r),{type:`elem`,elem:i}},Mr=.008,Nr={type:`kern`,size:-1*Mr},Pr=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Fr=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),Ir=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):Pr.has(e)?(c=`∣`,u=`vert`,d=333):Fr.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=wr(o,f,i),m=p.height+p.depth,h=wr(c,f,i),g=h.height+h.depth,_=wr(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=wr(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var ee=C/2-w,T=[];if(u.length>0){var te=C-m-v,E=Math.round(C*1e3),ne=Te(u,Math.round(te*1e3)),re=new Ue(u,ne),ie=k(d/1e3),ae=k(E/1e3),oe=Gt([],[new He([re],{width:ie,height:ae,viewBox:`0 0 `+d+` `+E})],r);oe.height=E/1e3,oe.style.width=ie,oe.style.height=ae,T.push({type:`elem`,elem:oe})}else{if(T.push(Ar(l,f,i)),T.push(Nr),s===null){var se=C-m-v+2*Mr;T.push(jr(c,se,r))}else{var ce=(C-m-v-y)/2+2*Mr;T.push(jr(c,ce,r)),T.push(Nr),T.push(Ar(s,f,i)),T.push(Nr),T.push(jr(c,ce,r))}T.push(Nr),T.push(Ar(o,f,i))}var le=r.havingBaseStyle(D.TEXT);return Tr(W([`delimsizing`,`mult`],[G({positionType:`bottom`,positionData:ee,children:T})],le),D.TEXT,r,a)},Lr=80,Rr=.08,zr=function(e,t,n,r,i){return Gt([`hide-tail`],[new He([new Ue(e,Se(e,r,n))],{width:`400em`,height:k(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Br=function(e,t){var n=t.havingBaseSizing(),r=Xr(`\\surd`,e*n.sizeMultiplier,Jr,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+Lr,e<1?i=1:e<1.4&&(i=.7),s=(1+a+Rr)/i,c=(1+a)/i,o=zr(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+Lr)*Wr[r.size],c=(Wr[r.size]+a)/i,s=(Wr[r.size]+a+Rr)/i,o=zr(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+Rr,c=e+a,l=Math.floor(1e3*e+a)+Lr,o=zr(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=k(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Vr=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),Hr=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Ur=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),Wr=[0,1.2,1.8,2.4,3],Gr=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),Vr.has(e)||Ur.has(e))return kr(e,t,!1,n,r,i);if(Hr.has(e))return Ir(e,Wr[t],!1,n,r,i);throw new a(`Illegal delimiter: '`+e+`'`)},Kr=[{type:`small`,style:D.SCRIPTSCRIPT},{type:`small`,style:D.SCRIPT},{type:`small`,style:D.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],qr=[{type:`small`,style:D.SCRIPTSCRIPT},{type:`small`,style:D.SCRIPT},{type:`small`,style:D.TEXT},{type:`stack`}],Jr=[{type:`small`,style:D.SCRIPTSCRIPT},{type:`small`,style:D.SCRIPT},{type:`small`,style:D.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Yr=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},Xr=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return a}return n[n.length-1]},Zr=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Ur.has(e)?Kr:Vr.has(e)?Jr:qr,s=Xr(e,t,o,r);return s.type===`small`?Dr(e,s.style,n,r,i,a):s.type===`large`?kr(e,s.size,n,r,i,a):Ir(e,t,n,r,i,a)},Qr=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return Zr(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},$r={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},ei=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function ti(e){return`isMiddle`in e}function ni(e,t){var n=ir(e);if(n&&ei.has(n.text))return n;throw n?new a(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new a(`Invalid delimiter type '`+e.type+`'`,e)}q({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=ni(dn(t[0]),e);return{type:`delimsizing`,mode:e.parser.mode,size:$r[e.funcName].size,mclass:$r[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?W([e.mclass]):Gr(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(An(e.delim,e.mode));var n=new Y(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=k(Wr[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function ri(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}q({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new a(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:ni(t[0],e).text,color:n}}}),q({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=ni(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=Z(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{ri(e);for(var n=_n(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o{ri(e);var n=Fn(e.body,t);if(e.left!==`.`){var r=new Y(`mo`,[An(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Y(`mo`,[An(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return jn(n)}}),q({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=ni(t[0],e);if(!e.parser.leftrightDepth)throw new a(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=Sn(t,[]):(n=Gr(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new Y(`mo`,[e.delim===`\\vert`||e.delim===`|`?An(`|`,`text`):An(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),q({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=Z(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{var n=Yt(J(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=p(e.body);if(r===`sout`)a=W([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=O({number:.6,unit:`pt`},t),l=O({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=k(d/2+c);var f=Math.floor(1e3*d*i);a=Gt([`hide-tail`],[new He([new Ue(`phase`,be(f))],{width:`400em`,height:k(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=k(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var m,h,g=0;/box/.test(r)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(r===`colorbox`?0:g),h=m):r===`angl`?(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*g,h=Math.max(0,.25-n.depth)):(m=s?.2:0,h=m),a=Zn(n,r,m,h,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=k(g)):r===`angl`&&g!==.049&&(a.style.borderTopWidth=k(g),a.style.borderRightWidth=k(g)),o=n.depth+h,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var _;if(e.backgroundColor)_=G({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var v=/cancel|phase/.test(r)?[`svg-align`]:[];_=G({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:v}]})}return/cancel/.test(r)&&(_.height=n.height,_.depth=n.depth),/cancel/.test(r)&&!s?W([`mord`,`cancel-lap`],[_],t):W([`mord`],[_],t)},mathmlBuilder:(e,t)=>{var n,r=new Y(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[X(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+k(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),q({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=Z(t[0],`color-token`).color,o=Z(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),q({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),q({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),q({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),q({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}});var ii={};function ai(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c{if(!e.parser.settings.displayMode)throw new a(`{`+e.envName+`} can be used only in display mode.`)},di=new Set([`gather`,`gather*`]);function fi(e){if(!e.includes(`ed`))return!e.includes(`*`)}function pi(e,t,n){var r=t.hskipBeforeAndAfter,i=t.addJot,o=t.cols,s=t.arraystretch,c=t.colSeparationType,l=t.autoTag,u=t.singleRow,d=t.emptySingleRow,f=t.maxNumCols,p=t.leqno;if(e.gullet.beginGroup(),u||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!s){var m=e.gullet.expandMacroAsText(`\\arraystretch`);if(m==null)s=1;else if(s=parseFloat(m),!s||s<0)throw new a(`Invalid \\arraystretch: `+m)}e.gullet.beginGroup();var h=[],g=[h],_=[],v=[],y=l==null?void 0:[];function b(){l&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function x(){y&&(e.gullet.macros.get(`\\df@tag`)?(y.push(e.subparse([new ci(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):y.push(!!l&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(b(),v.push(li(e));;){var S=e.parseExpression(!1,u?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var C={type:`ordgroup`,mode:e.mode,body:S};n&&(C={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[C]}),h.push(C);var w=e.fetch().text;if(w===`&`){if(f&&h.length===f){if(u||c)throw new a(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(w===`\\end`){x(),h.length===1&&C.type===`styling`&&C.body.length===1&&C.body[0].type===`ordgroup`&&C.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),v.length0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(y(o[0]),n=0;n0&&(T+=_,Se))for(n=0;n=s)){var ge=void 0;(r>0||e.hskipBeforeAndAfter)&&(ge=ue?.pregap??f,ge!==0&&(re=W([`arraycolsep`],[]),re.style.width=k(ge),ne.push(re)));var _e=[];for(n=0;n0){for(var we=Kt(`katex-hline`,t,u),Te=Kt(`katex-hdashline`,t,u),Ee=[{type:`elem`,elem:Ce,shift:0}];l.length>0;){var De=l.pop(),Oe=De.pos-te;De.isDashed?Ee.push({type:`elem`,elem:Te,shift:Oe}):Ee.push({type:`elem`,elem:we,shift:Oe})}Ce=G({positionType:`individualShift`,children:Ee})}if(ae.length===0)return W([`mord`],[Ce],t);var ke=W([`katex-tag`],[G({positionType:`individualShift`,children:ae})],t);return Jt([Ce,ke])},gi={c:`center `,l:`left `,r:`right `},_i=function(e,t){for(var n=[],r=new Y(`mtd`,[],[`mtr-glue`]),i=new Y(`mtd`,[],[`mml-eqn-num`]),a=0;a0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=gi[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var ee=1;ee0&&d&&(m=1),n[f]={type:`align`,align:p,pregap:m,postgap:0}}return i.colSeparationType=d?`align`:`alignat`,i};ai({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(ir(t[0])?[t[0]]:Z(t[0],`ordgroup`).body).map(function(e){var t=rr(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new a(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return pi(e.parser,r,mi(e.envName))},htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new a(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var o=pi(e.parser,r,mi(e.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=Array(s).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=pi(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(ir(t[0])?[t[0]]:Z(t[0],`ordgroup`).body).map(function(e){var t=rr(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new a(`Unknown column alignment: `+t,e)});if(n.length>1)throw new a(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=pi(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new a(`{subarray} can contain only one column`);return i},htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=pi(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},mi(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:vi,htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){di.has(e.envName)&&ui(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:fi(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return pi(e.parser,t,`display`)},htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:vi,htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){ui(e);var t={autoTag:fi(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return pi(e.parser,t,`display`)},htmlBuilder:hi,mathmlBuilder:_i}),ai({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return ui(e),yr(e.parser)},htmlBuilder:hi,mathmlBuilder:_i}),Q(`\\nonumber`,`\\gdef\\@eqnsw{0}`),Q(`\\notag`,`\\nonumber`),q({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new a(e.funcName+` valid only within array environment`)}});var yi=ii;q({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var n=e.parser,r=e.funcName,i=t[0];if(i.type!==`ordgroup`)throw new a(`Invalid environment name`,i);var o=ar(i,`Environment name should contain only text characters and spaces`,!0);if(r===`\\begin`){if(!Object.prototype.hasOwnProperty.call(yi,o))throw new a(`No such environment: `+o,i);var s=yi[o],c=n.parseArguments(`\\begin{`+o+`}`,s),l=c.args,u=c.optArgs,d={mode:n.mode,envName:o,parser:n},f=s.handler(d,l,u);n.expect(`\\end`,!1);var p=n.nextToken,m=Z(n.parseFunction(),`environment`);if(m.name!==o)throw new a(`Mismatch: \\begin{`+o+`} matched by \\end{`+m.name+`}`,p);return f}return{type:`environment`,mode:n.mode,name:o,nameGroup:i}}});var bi=(e,t)=>{var n=e.font,r=t.withFont(n);return J(e.body,r)},xi=(e,t)=>{var n=e.font,r=t.withFont(n);return X(e.body,r)},Si={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};q({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=dn(t[0]),a=r in Si?Si[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:bi,mathmlBuilder:xi}),q({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:pr(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:p(r)}}}),q({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});var Ci=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=J(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d){var n=new Y(`mfrac`,[X(e.numer,t),X(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=O(e.barSize,t);n.setAttribute(`linethickness`,k(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Y(`mo`,[new En(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Y(`mo`,[new En(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return jn(i)}return n},Ti=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;q({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),Ti({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:Ci,mathmlBuilder:wi}),q({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var Ei=[`display`,`text`,`script`,`scriptscript`],Di=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};q({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var n=e.parser,r=t[4],i=t[5],a=dn(t[0]),o=a.type===`atom`&&a.family===`open`?Di(a.text):null,s=dn(t[1]),c=s.type===`atom`&&s.family===`close`?Di(s.text):null,l=Z(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=Z(p.body[0],`textord`);f=Ei[Number(m.text)]}}else p=Z(p,`textord`),f=Ei[Number(p.text)];return Ti({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),q({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:Z(t[0],`size`).value,token:r}}}),q({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],i=Z(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));var a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var Oi=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?J(e.sup,t.havingStyle(n.sup()),t):J(e.sub,t.havingStyle(n.sub()),t),i=Z(e.base,`horizBrace`)):i=Z(e,`horizBrace`);var a=J(i.base,t.havingBaseStyle(D.DISPLAY)),o=Xn(i,t),s=i.isOver?G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):G({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=W([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?G({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):G({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return W([`minner`,i.isOver?`mover`:`munder`],[s],t)};q({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:Oi,mathmlBuilder:(e,t)=>{var n=qn(e.label);return new Y(e.isOver?`mover`:`munder`,[X(e.base,t),n])}}),q({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],i=Z(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:fn(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=_n(e.body,t,!1);return qt(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=In(e.body,t);return n instanceof Y||(n=new Y(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),q({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=Z(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a{var n=e.parser,r=e.funcName;e.token;var i=Z(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=i,s={command:`\\htmlClass`,class:i};break;case`\\htmlId`:c.id=i,s={command:`\\htmlId`,id:i};break;case`\\htmlStyle`:c.style=i,s={command:`\\htmlStyle`,style:i};break;case`\\htmlData`:for(var l=`{,}`,u=[],d=``,f=0;f{var n=_n(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=W(r,n,t);for(var a of Object.entries(e.attributes)){var o=a[0],s=a[1];o!==`class`&&i.setAttribute(o,s)}return i},mathmlBuilder:(e,t)=>In(e.body,t)}),q({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:fn(t[0]),mathml:fn(t[1])}),htmlBuilder:(e,t)=>Jt(_n(e.html,t,!1)),mathmlBuilder:(e,t)=>In(e.mathml,t)});var ki=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new a(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Ae(n))throw new a(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};q({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,i={number:0,unit:`em`},o={number:.9,unit:`em`},s={number:0,unit:`em`},c=``;if(n[0])for(var l=Z(n[0],`raw`).string.split(`,`),u=0;u{var n=O(e.height,t),r=0;e.totalheight.number>0&&(r=O(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=O(e.width,t));var a={height:k(n+r)};i>0&&(a.width=k(i)),r>0&&(a.verticalAlign=k(-r));var o=new ze(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Y(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=O(e.height,t),i=0;if(e.totalheight.number>0&&(i=O(e.totalheight,t)-r,n.setAttribute(`valign`,k(-i))),n.setAttribute(`height`,k(r+i)),e.width.number>0){var a=O(e.width,t);n.setAttribute(`width`,k(a))}return n.setAttribute(`src`,e.src),n}}),q({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=Z(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Zt(e.dimension,t)},mathmlBuilder(e,t){return new Dn(O(e.dimension,t))}}),q({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=W([],[J(e.body,t)]),n=W([`katex-inner`],[n],t)):n=W([`katex-inner`],[J(e.body,t)]);var r=W([`katex-fix`],[]),i=W([e.alignment],[n,r],t),a=W([`katex-strut`]);return a.style.height=k(i.height+i.depth),i.depth&&(a.style.verticalAlign=k(-i.depth)),i.children.unshift(a),i=W([`katex-thinbox`],[i],t),W([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Y(`mpadded`,[X(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),q({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),q({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new a(`Mismatched `+e.funcName)}});var Ai=(e,t)=>{switch(t.style.size){case D.DISPLAY.size:return e.display;case D.TEXT.size:return e.text;case D.SCRIPT.size:return e.script;case D.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};q({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:fn(t[0]),text:fn(t[1]),script:fn(t[2]),scriptscript:fn(t[3])}),htmlBuilder:(e,t)=>Jt(_n(Ai(e,t),t,!1)),mathmlBuilder:(e,t)=>In(Ai(e,t),t)});var ji=(e,t,n,r,i,a,o)=>{e=W([],[e]);var s=n&&p(n),c,l;if(t){var u=J(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=J(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=G({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:k(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:k(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=G({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:k(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=G({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:k(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var m=[f];if(c&&a!==0&&!s){var h=W([`mspace`],[],r);h.style.marginRight=k(a),m.unshift(h)}return W([`mop`,`op-limits`],m,r)},Mi=new Set([`\\smallint`]),Ni=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Z(e.base,`op`),i=!0):a=Z(e,`op`);var o=t.style,s=!1;o.size===D.DISPLAY.size&&a.symbol&&!Mi.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=Rt(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=tn(d+`Size`+(s?`2`:`1`),t);c=G({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=_n(a.body,t,!0);p.length===1&&p[0]instanceof Ve?(c=p[0],c.classes[0]=`mop`):c=W([`mop`],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new Y(`mo`,[An(e.name,e.mode)]),Mi.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Y(`mo`,Fn(e.body,t));else{n=new Y(`mi`,[new En(e.name.slice(1))]);var r=new Y(`mo`,[An(`⁡`,`text`)]);n=e.parentIsSupSub?new Y(`mrow`,[n,r]):Tn([n,r])}return n},Fi={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};q({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var n=e.parser,r=e.funcName;return r.length===1&&(r=Fi[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Ni,mathmlBuilder:Pi}),q({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:fn(r)}}});var Ii={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};q({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),q({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),q({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var t=e.parser,n=e.funcName;return n.length===1&&(n=Ii[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}});var Li=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Z(e.base,`operatorname`),i=!0):a=Z(e,`operatorname`);var o;if(a.body.length>0){for(var s=_n(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c{var n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:fn(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:Li,mathmlBuilder:(e,t)=>{for(var n=Fn(e.body,t.withFont(`mathrm`)),r=!0,i=0;ie.toText()).join(``))]);var s=new Y(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Y(`mo`,[An(`⁡`,`text`)]);return e.parentIsSupSub?new Y(`mrow`,[s,c]):Tn([s,c])}}),Q(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),un({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?Jt(_n(e.body,t,!1)):W([`mord`],_n(e.body,t,!0),t)},mathmlBuilder(e,t){return In(e.body,t,!0)}}),q({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=J(e.body,t.havingCrampedStyle()),r=Kt(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return W([`mord`,`katex-overline`],[G({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Y(`mo`,[new En(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y(`mover`,[X(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),q({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:fn(r)}},htmlBuilder:(e,t)=>Jt(_n(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Y(`mphantom`,Fn(e.body,t))}),Q(`\\hphantom`,`\\smash{\\phantom{#1}}`),q({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>W([`mord`,`rlap`],[W([`katex-inner`],[J(e.body,t.withPhantom())]),W([`katex-fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Y(`mpadded`,[new Y(`mphantom`,Fn(fn(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),q({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var n=e.parser,r=Z(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=J(e.body,t);return G({positionType:`shift`,positionData:-O(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Y(`mpadded`,[X(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),q({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),q({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var r=e.parser,i=n[0],a=Z(t[0],`size`),o=Z(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&Z(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=W([`mord`,`katex-rule`],[],t),r=O(e.width,t),i=O(e.height,t),a=e.shift?O(e.shift,t):0;return n.style.borderRightWidth=k(r),n.style.borderTopWidth=k(i),n.style.bottom=k(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=O(e.width,t),r=O(e.height,t),i=e.shift?O(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Y(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,k(n)),o.setAttribute(`height`,k(r));var s=new Y(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,k(i)):(s.setAttribute(`height`,k(i)),s.setAttribute(`depth`,k(-i))),s.setAttribute(`voffset`,k(i)),s}});function Ri(e,t,n){for(var r=_n(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:zi.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Ri(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Y(`mstyle`,Fn(e.body,n));return r.setAttribute(`mathsize`,k(n.sizeMultiplier)),r}}),q({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,i=!1,a=!1,o=n[0]&&Z(n[0],`ordgroup`);if(o)for(var s,c=0;c{var n=W([],[J(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return W([`mord`,`katex-smash`],[n],t);if(n.children)for(var r=0;r{var n=new Y(`mpadded`,[X(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),q({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=J(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Yt(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=k(l);var f=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]});if(e.index){var p=t.havingStyle(D.SCRIPTSCRIPT),m=J(e.index,p,t);return W([`mord`,`sqrt`],[W([`katex-root`],[G({positionType:`shift`,positionData:-(.6*(f.height-f.depth)),children:[{type:`elem`,elem:m}]})]),f],t)}return W([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var n=e.body,r=e.index;return r?new Y(`mroot`,[X(n,t),X(r,t)]):new Y(`msqrt`,[X(n,t)])}});var Bi={display:D.DISPLAY,text:D.TEXT,script:D.SCRIPT,scriptscript:D.SCRIPTSCRIPT};function Vi(e){return e in Bi}q({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!Vi(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=Bi[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),Ri(e.body,r,t)},mathmlBuilder(e,t){var n=Bi[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new Y(`mstyle`,Fn(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var Hi=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===D.DISPLAY.size||n.alwaysHandleSupSub)?Ni:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===D.DISPLAY.size||n.limits)?Li:null:n.type===`accent`?p(n.base)?sr:null:n.type===`horizBrace`&&!e.sub===n.isOver?Oi:null:null};un({type:`supsub`,htmlBuilder(e,t){var n=Hi(e,t);if(n)return n(e,t);var r=e.base,i=e.sup,a=e.sub,o=J(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&p(r);if(i){var m=t.havingStyle(t.style.sup());s=J(i,m,t),f||(u=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(a){var h=t.havingStyle(t.style.sub());c=J(a,h,t),f||(d=o.depth+h.fontMetrics().subDrop*h.sizeMultiplier/t.sizeMultiplier)}var g=t.style===D.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,_=t.sizeMultiplier,v=k(.5/l.ptPerEm/_),y=null;if(c){var b=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Ve||b)&&(y=k(-(o.italic??0)))}var x;if(s&&c){u=Math.max(u,g,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var S=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)0&&(u+=C,d-=C)}x=G({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:v,marginLeft:y},{type:`elem`,elem:s,shift:-u,marginRight:v}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),x=G({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:y,marginRight:v}]});else if(s)u=Math.max(u,g,s.depth+.25*l.xHeight),x=G({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:v}]});else throw Error(`supsub must have either sup or sub.`);return W([xn(o,`right`)||`mord`],[o,W([`msupsub`],[x])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[X(e.base,t)];e.sub&&a.push(X(e.sub,t)),e.sup&&a.push(X(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===D.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===D.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===D.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===D.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===D.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===D.DISPLAY)?`munder`:`msub`}return new Y(o,a)}}),un({type:`atom`,htmlBuilder(e,t){return zt(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Y(`mo`,[An(e.text,e.mode)]);if(e.family===`bin`){var r=Nn(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var Ui={mi:`italic`,mn:`normal`,mtext:`normal`};un({type:`mathord`,htmlBuilder(e,t){return Vt(e,t)},mathmlBuilder(e,t){var n=new Y(`mi`,[An(e.text,e.mode,t)]),r=Nn(e,t)||`italic`;return r!==Ui[n.type]&&n.setAttribute(`mathvariant`,r),n}}),un({type:`textord`,htmlBuilder(e,t){return Vt(e,t)},mathmlBuilder(e,t){var n=An(e.text,e.mode,t),r=Nn(e,t)||`normal`,i=e.mode===`text`?new Y(`mtext`,[n]):/[0-9]/.test(e.text)?new Y(`mn`,[n]):e.text===`\\prime`?new Y(`mo`,[n]):new Y(`mi`,[n]);return r!==Ui[i.type]&&i.setAttribute(`mathvariant`,r),i}});var Wi=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),Gi=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]);un({type:`spacing`,htmlBuilder(e,t){var n=Gi.get(e.text),r=Wi.get(e.text);if(n){var i=n.className||``;if(e.mode===`text`){var o=Vt(e,t);return o.classes.push(i),o}return W([`mspace`,i],[zt(e.text,e.mode,t)],t)}if(r)return W([`mspace`,r],[],t);throw new a(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(Gi.has(e.text))n=new Y(`mtext`,[new En(`\xA0`)]);else if(Wi.has(e.text))return new Y(`mspace`);else throw new a(`Unknown type of space "`+e.text+`"`);return n}});var Ki=()=>{var e=new Y(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};un({type:`tag`,mathmlBuilder(e,t){var n=new Y(`mtable`,[new Y(`mtr`,[Ki(),new Y(`mtd`,[In(e.body,t)]),Ki(),new Y(`mtd`,[In(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var qi={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},Ji={"\\textbf":`textbf`,"\\textmd":`textmd`},Yi={"\\textit":`textit`,"\\textup":`textup`},Xi=(e,t)=>{var n=e.font;return n?qi[n]?t.withTextFontFamily(qi[n]):Ji[n]?t.withTextFontWeight(Ji[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(Yi[n]):t};q({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:fn(i),font:r}},htmlBuilder(e,t){var n=Xi(e,t);return W([`mord`,`text`],_n(e.body,n,!0),n)},mathmlBuilder(e,t){var n=Xi(e,t);return In(e.body,n)}}),q({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=J(e.body,t),r=Kt(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return W([`mord`,`katex-underline`],[G({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Y(`mo`,[new En(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y(`munder`,[X(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),q({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=J(e.body,t),r=t.fontMetrics().axisHeight;return G({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Y(`mrow`,[new Y(`mpadded`,[X(e.body,t)],[`vcenter`])])}}),q({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new a(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=Zi(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?`␣`:`\xA0`),Qi=sn,$i=`[ \r + ]`,ea=`\\\\[a-zA-Z@]+`,ta=`\\\\[^\ud800-\udfff]`,na=`(`+ea+`)`+$i+`*`,ra=`\\\\( +|[ \r ]+ +?)[ \r ]*`,ia=`[̀-ͯ]`,aa=RegExp(ia+`+$`),oa=`(`+$i+`+)|`+(ra+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(ia+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(ia+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+na)+(`|`+ta+`)`),sa=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(oa,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ci(`EOF`,new si(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new a(`Unexpected character: '`+e[t]+`'`,new ci(e[t],new si(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(` +`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new ci(r,new si(this,t,this.tokenRegex.lastIndex))}},ca=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new a(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},la=oi;Q(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Q(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Q(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Q(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Q(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Q(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),Q(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var ua={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Q(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new a("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=ua[t.text],r==null||r>=n)throw new a(`Invalid base-`+n+` digit `+t.text);for(var i;(i=ua[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new a(`\\newcommand's first argument must be a macro name`);var o=i[0].text,s=e.isDefined(o);if(s&&!t)throw new a(`\\newcommand{`+o+`} attempting to redefine `+(o+`; use \\renewcommand`));if(!s&&!n)throw new a(`\\renewcommand{`+o+`} when command `+o+` does not yet exist; use \\newcommand`);var c=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var l=``,u=e.expandNextToken();u.text!==`]`&&u.text!==`EOF`;)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new a(`Invalid number of arguments: `+l);c=parseInt(l),i=e.consumeArg().tokens}return s&&r||e.macros.set(o,{tokens:i,numArgs:c}),``};Q(`\\newcommand`,e=>da(e,!1,!0,!1)),Q(`\\renewcommand`,e=>da(e,!0,!1,!1)),Q(`\\providecommand`,e=>da(e,!0,!0,!0)),Q(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),Q(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),Q(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Qi[n],A.math[n],A.text[n]),``}),Q(`\\bgroup`,`{`),Q(`\\egroup`,`}`),Q(`~`,`\\nobreakspace`),Q(`\\lq`,"`"),Q(`\\rq`,`'`),Q(`\\aa`,`\\r a`),Q(`\\AA`,`\\r A`),Q(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),Q(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),Q(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Q(`ℬ`,`\\mathscr{B}`),Q(`ℰ`,`\\mathscr{E}`),Q(`ℱ`,`\\mathscr{F}`),Q(`ℋ`,`\\mathscr{H}`),Q(`ℐ`,`\\mathscr{I}`),Q(`ℒ`,`\\mathscr{L}`),Q(`ℳ`,`\\mathscr{M}`),Q(`ℛ`,`\\mathscr{R}`),Q(`ℭ`,`\\mathfrak{C}`),Q(`ℌ`,`\\mathfrak{H}`),Q(`ℨ`,`\\mathfrak{Z}`),Q(`\\Bbbk`,`\\Bbb{k}`),Q(`\\llap`,`\\mathllap{\\textrm{#1}}`),Q(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),Q(`\\clap`,`\\mathclap{\\textrm{#1}}`),Q(`\\mathstrut`,`\\vphantom{(}`),Q(`\\underbar`,`\\underline{\\text{#1}}`),Q(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),Q(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Q(`\\ne`,`\\neq`),Q(`≠`,`\\neq`),Q(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Q(`∉`,`\\notin`),Q(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Q(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Q(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Q(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Q(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Q(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Q(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Q(`⟂`,`\\perp`),Q(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),Q(`∌`,`\\notni`),Q(`⌜`,`\\ulcorner`),Q(`⌝`,`\\urcorner`),Q(`⌞`,`\\llcorner`),Q(`⌟`,`\\lrcorner`),Q(`©`,`\\copyright`),Q(`®`,`\\textregistered`),Q(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),Q(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),Q(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),Q(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),Q(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),Q(`⋮`,`\\vdots`),Q(`\\varGamma`,`\\mathit{\\Gamma}`),Q(`\\varDelta`,`\\mathit{\\Delta}`),Q(`\\varTheta`,`\\mathit{\\Theta}`),Q(`\\varLambda`,`\\mathit{\\Lambda}`),Q(`\\varXi`,`\\mathit{\\Xi}`),Q(`\\varPi`,`\\mathit{\\Pi}`),Q(`\\varSigma`,`\\mathit{\\Sigma}`),Q(`\\varUpsilon`,`\\mathit{\\Upsilon}`),Q(`\\varPhi`,`\\mathit{\\Phi}`),Q(`\\varPsi`,`\\mathit{\\Psi}`),Q(`\\varOmega`,`\\mathit{\\Omega}`),Q(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),Q(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),Q(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),Q(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),Q(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),Q(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),Q(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),Q(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var fa={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},pa=new Set([`bin`,`rel`]);Q(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in fa?t=fa[n]:(n.slice(0,4)===`\\not`||n in A.math&&pa.has(A.math[n].group))&&(t=`\\dotsb`),t});var ma={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Q(`\\dotso`,function(e){return e.future().text in ma?`\\ldots\\,`:`\\ldots`}),Q(`\\dotsc`,function(e){var t=e.future().text;return t in ma&&t!==`,`?`\\ldots\\,`:`\\ldots`}),Q(`\\cdots`,function(e){return e.future().text in ma?`\\@cdots\\,`:`\\@cdots`}),Q(`\\dotsb`,`\\cdots`),Q(`\\dotsm`,`\\cdots`),Q(`\\dotsi`,`\\!\\cdots`),Q(`\\dotsx`,`\\ldots\\,`),Q(`\\DOTSI`,`\\relax`),Q(`\\DOTSB`,`\\relax`),Q(`\\DOTSX`,`\\relax`),Q(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),Q(`\\,`,`\\tmspace+{3mu}{.1667em}`),Q(`\\thinspace`,`\\,`),Q(`\\>`,`\\mskip{4mu}`),Q(`\\:`,`\\tmspace+{4mu}{.2222em}`),Q(`\\medspace`,`\\:`),Q(`\\;`,`\\tmspace+{5mu}{.2777em}`),Q(`\\thickspace`,`\\;`),Q(`\\!`,`\\tmspace-{3mu}{.1667em}`),Q(`\\negthinspace`,`\\!`),Q(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),Q(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),Q(`\\enspace`,`\\kern.5em `),Q(`\\enskip`,`\\hskip.5em\\relax`),Q(`\\quad`,`\\hskip1em\\relax`),Q(`\\qquad`,`\\hskip2em\\relax`),Q(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),Q(`\\tag@paren`,`\\tag@literal{({#1})}`),Q(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new a(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),Q(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),Q(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),Q(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),Q(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),Q(`\\newline`,`\\\\\\relax`),Q(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var ha=k(Je[`Main-Regular`][84][1]-.7*Je[`Main-Regular`][65][1]);Q(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+ha+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),Q(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+ha+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),Q(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),Q(`\\@hspace`,`\\hskip #1\\relax`),Q(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),Q(`\\ordinarycolon`,`:`),Q(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),Q(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),Q(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),Q(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),Q(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),Q(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),Q(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),Q(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),Q(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),Q(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),Q(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),Q(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),Q(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),Q(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),Q(`∷`,`\\dblcolon`),Q(`∹`,`\\eqcolon`),Q(`≔`,`\\coloneqq`),Q(`≕`,`\\eqqcolon`),Q(`⩴`,`\\Coloneqq`),Q(`\\ratio`,`\\vcentcolon`),Q(`\\coloncolon`,`\\dblcolon`),Q(`\\colonequals`,`\\coloneqq`),Q(`\\coloncolonequals`,`\\Coloneqq`),Q(`\\equalscolon`,`\\eqqcolon`),Q(`\\equalscoloncolon`,`\\Eqqcolon`),Q(`\\colonminus`,`\\coloneq`),Q(`\\coloncolonminus`,`\\Coloneq`),Q(`\\minuscolon`,`\\eqcolon`),Q(`\\minuscoloncolon`,`\\Eqcolon`),Q(`\\coloncolonapprox`,`\\Colonapprox`),Q(`\\coloncolonsim`,`\\Colonsim`),Q(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),Q(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),Q(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),Q(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),Q(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Q(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),Q(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),Q(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),Q(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),Q(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),Q(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),Q(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),Q(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),Q(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),Q(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),Q(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),Q(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),Q(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),Q(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),Q(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),Q(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),Q(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),Q(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),Q(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),Q(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),Q(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),Q(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),Q(`\\imath`,`\\html@mathml{\\@imath}{ı}`),Q(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),Q(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Q(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Q(`⟦`,`\\llbracket`),Q(`⟧`,`\\rrbracket`),Q(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Q(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Q(`⦃`,`\\lBrace`),Q(`⦄`,`\\rBrace`),Q(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Q(`⦵`,`\\minuso`),Q(`\\darr`,`\\downarrow`),Q(`\\dArr`,`\\Downarrow`),Q(`\\Darr`,`\\Downarrow`),Q(`\\lang`,`\\langle`),Q(`\\rang`,`\\rangle`),Q(`\\uarr`,`\\uparrow`),Q(`\\uArr`,`\\Uparrow`),Q(`\\Uarr`,`\\Uparrow`),Q(`\\N`,`\\mathbb{N}`),Q(`\\R`,`\\mathbb{R}`),Q(`\\Z`,`\\mathbb{Z}`),Q(`\\alef`,`\\aleph`),Q(`\\alefsym`,`\\aleph`),Q(`\\Alpha`,`\\mathrm{A}`),Q(`\\Beta`,`\\mathrm{B}`),Q(`\\bull`,`\\bullet`),Q(`\\Chi`,`\\mathrm{X}`),Q(`\\clubs`,`\\clubsuit`),Q(`\\cnums`,`\\mathbb{C}`),Q(`\\Complex`,`\\mathbb{C}`),Q(`\\Dagger`,`\\ddagger`),Q(`\\diamonds`,`\\diamondsuit`),Q(`\\empty`,`\\emptyset`),Q(`\\Epsilon`,`\\mathrm{E}`),Q(`\\Eta`,`\\mathrm{H}`),Q(`\\exist`,`\\exists`),Q(`\\harr`,`\\leftrightarrow`),Q(`\\hArr`,`\\Leftrightarrow`),Q(`\\Harr`,`\\Leftrightarrow`),Q(`\\hearts`,`\\heartsuit`),Q(`\\image`,`\\Im`),Q(`\\infin`,`\\infty`),Q(`\\Iota`,`\\mathrm{I}`),Q(`\\isin`,`\\in`),Q(`\\Kappa`,`\\mathrm{K}`),Q(`\\larr`,`\\leftarrow`),Q(`\\lArr`,`\\Leftarrow`),Q(`\\Larr`,`\\Leftarrow`),Q(`\\lrarr`,`\\leftrightarrow`),Q(`\\lrArr`,`\\Leftrightarrow`),Q(`\\Lrarr`,`\\Leftrightarrow`),Q(`\\Mu`,`\\mathrm{M}`),Q(`\\natnums`,`\\mathbb{N}`),Q(`\\Nu`,`\\mathrm{N}`),Q(`\\Omicron`,`\\mathrm{O}`),Q(`\\plusmn`,`\\pm`),Q(`\\rarr`,`\\rightarrow`),Q(`\\rArr`,`\\Rightarrow`),Q(`\\Rarr`,`\\Rightarrow`),Q(`\\real`,`\\Re`),Q(`\\reals`,`\\mathbb{R}`),Q(`\\Reals`,`\\mathbb{R}`),Q(`\\Rho`,`\\mathrm{P}`),Q(`\\sdot`,`\\cdot`),Q(`\\sect`,`\\S`),Q(`\\spades`,`\\spadesuit`),Q(`\\sub`,`\\subset`),Q(`\\sube`,`\\subseteq`),Q(`\\supe`,`\\supseteq`),Q(`\\Tau`,`\\mathrm{T}`),Q(`\\thetasym`,`\\vartheta`),Q(`\\weierp`,`\\wp`),Q(`\\Zeta`,`\\mathrm{Z}`),Q(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),Q(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),Q(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),Q(`\\bra`,`\\mathinner{\\langle{#1}|}`),Q(`\\ket`,`\\mathinner{|{#1}\\rangle}`),Q(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),Q(`\\Bra`,`\\left\\langle#1\\right|`),Q(`\\Ket`,`\\left|#1\\right\\rangle`);var ga=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};Q(`\\bra@ket`,ga(!1)),Q(`\\bra@set`,ga(!0)),Q(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),Q(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),Q(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),Q(`\\angln`,`{\\angl n}`),Q(`\\blue`,`\\textcolor{##6495ed}{#1}`),Q(`\\orange`,`\\textcolor{##ffa500}{#1}`),Q(`\\pink`,`\\textcolor{##ff00af}{#1}`),Q(`\\red`,`\\textcolor{##df0030}{#1}`),Q(`\\green`,`\\textcolor{##28ae7b}{#1}`),Q(`\\gray`,`\\textcolor{gray}{#1}`),Q(`\\purple`,`\\textcolor{##9d38bd}{#1}`),Q(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),Q(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),Q(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),Q(`\\blueD`,`\\textcolor{##11accd}{#1}`),Q(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),Q(`\\tealA`,`\\textcolor{##94fff5}{#1}`),Q(`\\tealB`,`\\textcolor{##26edd5}{#1}`),Q(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),Q(`\\tealD`,`\\textcolor{##01a995}{#1}`),Q(`\\tealE`,`\\textcolor{##208170}{#1}`),Q(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),Q(`\\greenB`,`\\textcolor{##8af281}{#1}`),Q(`\\greenC`,`\\textcolor{##74cf70}{#1}`),Q(`\\greenD`,`\\textcolor{##1fab54}{#1}`),Q(`\\greenE`,`\\textcolor{##0d923f}{#1}`),Q(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),Q(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),Q(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),Q(`\\goldD`,`\\textcolor{##e07d10}{#1}`),Q(`\\goldE`,`\\textcolor{##a75a05}{#1}`),Q(`\\redA`,`\\textcolor{##fca9a9}{#1}`),Q(`\\redB`,`\\textcolor{##ff8482}{#1}`),Q(`\\redC`,`\\textcolor{##f9685d}{#1}`),Q(`\\redD`,`\\textcolor{##e84d39}{#1}`),Q(`\\redE`,`\\textcolor{##bc2612}{#1}`),Q(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),Q(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),Q(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),Q(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),Q(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),Q(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),Q(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),Q(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),Q(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),Q(`\\purpleE`,`\\textcolor{##543b78}{#1}`),Q(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),Q(`\\mintB`,`\\textcolor{##edf2df}{#1}`),Q(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),Q(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),Q(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),Q(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),Q(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),Q(`\\grayE`,`\\textcolor{##babec2}{#1}`),Q(`\\grayF`,`\\textcolor{##888d93}{#1}`),Q(`\\grayG`,`\\textcolor{##626569}{#1}`),Q(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),Q(`\\grayI`,`\\textcolor{##21242c}{#1}`),Q(`\\kaBlue`,`\\textcolor{##314453}{#1}`),Q(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var _a={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},va=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new ca(la,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new sa(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new ci(`EOF`,n.loc)),this.pushTokens(r),new ci(``,si.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,o=0,s=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++o;else if(i.text===`}`){if(--o,o===-1)throw new a(`Extra }`,i)}else if(i.text===`EOF`)throw new a(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[s]:`}`)+`'`,i);if(e&&n){if((o===0||o===1&&e[s]===`{`)&&i.text===e[s]){if(++s,s===e.length){t.splice(-s,s);break}}else s=0}}while(o!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new a(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;rthis.settings.maxExpand)throw new a(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new a(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,o=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var s=i.length-1;s>=0;--s){var c=i[s];if(c.text===`#`){if(s===0)throw new a(`Incomplete placeholder at end of macro body`,c);if(c=i[--s],c.text===`#`)i.splice(s+1,1);else if(/^[1-9]$/.test(c.text))i.splice(s,2,...o[c.text-1]);else throw new a(`Not a valid argument number`,c)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ci(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new sa(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(Qi,e)||Object.prototype.hasOwnProperty.call(A.math,e)||Object.prototype.hasOwnProperty.call(A.text,e)||Object.prototype.hasOwnProperty.call(_a,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(Qi,e)&&!Qi[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},ya=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ba=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),xa={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},Sa={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},Ca=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new va(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new a(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ci(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&Qi[i.text]&&Qi[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r=128)this.settings.strict&&(fe(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),o={type:`textord`,mode:`text`,loc:si.range(e),text:t};else return null;if(this.consume(),i)for(var l=0;l{if(!e)return null;if(e.startsWith(`$$`)&&e.endsWith(`$$`)&&e.length>=4){let n=ja(e.slice(2,-2),!0);return(0,$.jsx)(`span`,{className:`inline-block my-1 px-1 overflow-x-auto align-middle`,dangerouslySetInnerHTML:{__html:n}},t)}if(e.startsWith(`\\[`)&&e.endsWith(`\\]`)&&e.length>=4){let n=ja(e.slice(2,-2),!0);return(0,$.jsx)(`span`,{className:`inline-block my-1 px-1 overflow-x-auto align-middle`,dangerouslySetInnerHTML:{__html:n}},t)}if(e.startsWith(`\\(`)&&e.endsWith(`\\)`)&&e.length>=4){let n=ja(e.slice(2,-2),!1);return(0,$.jsx)(`span`,{className:`inline-katex px-0.5 align-baseline`,dangerouslySetInnerHTML:{__html:n}},t)}if(e.startsWith(`$`)&&e.endsWith(`$`)&&e.length>=2){let n=ja(e.slice(1,-1),!1);return(0,$.jsx)(`span`,{className:`inline-katex px-0.5 align-baseline`,dangerouslySetInnerHTML:{__html:n}},t)}if(e.startsWith("`")&&e.endsWith("`")&&e.length>=2)return(0,$.jsx)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] px-1.5 py-0.5 rounded text-[11px] font-mono border border-ink-black shadow-[1px_1px_0px_0px_#000]`,children:e.slice(1,-1)},t);if(e.startsWith(`**`)&&e.endsWith(`**`)&&e.length>=4||e.startsWith(`__`)&&e.endsWith(`__`)&&e.length>=4)return(0,$.jsx)(`strong`,{className:`text-ink-black font-extrabold`,children:Ma(e.slice(2,-2))},t);if(e.startsWith(`*`)&&e.endsWith(`*`)&&e.length>=2)return(0,$.jsx)(`em`,{className:`italic text-slate-800`,children:Ma(e.slice(1,-1))},t);let n=e.match(/^\[([^\]]+)\]\(([^)]+)\)$/);return n?(0,$.jsx)(`a`,{href:n[2],target:`_blank`,rel:`noopener noreferrer`,className:`text-primary underline hover:text-primary/80 font-bold`,children:n[1]},t):e}):[]}var Na=({content:e,className:t=``})=>{if(!e)return null;let n=e.split(/(```[\s\S]*?```|\$\$[\s\S]*?\$\$|\\\[[\s\S]*?\\\])/g);return(0,$.jsx)(`div`,{className:`markdown-content space-y-2.5 text-ink-black text-xs leading-relaxed font-sans ${t}`,children:n.map((e,t)=>{if(!e)return null;if(e.startsWith("```")&&e.endsWith("```")){let n=e.indexOf(` +`),r=``,i=``;return n===-1?i=e.slice(3,-3).trim():(r=e.slice(3,n).trim(),i=e.slice(n+1,-3).trimEnd()),(0,$.jsxs)(`div`,{className:`my-3 rounded-md overflow-hidden border-[2px] border-ink-black shadow-[3px_3px_0px_0px_#1E293B] bg-[#1E293B]`,children:[r&&(0,$.jsxs)(`div`,{className:`bg-slate-800 text-slate-400 px-3 py-1 text-[9px] font-arcade uppercase tracking-wider border-b border-slate-700 flex justify-between items-center`,children:[(0,$.jsx)(`span`,{children:r}),(0,$.jsx)(`span`,{className:`text-[8px] opacity-70`,children:`SNIPPET`})]}),(0,$.jsx)(`pre`,{className:`p-3 overflow-x-auto font-mono text-[11px] text-[#4ADE80] leading-relaxed custom-scrollbar selection:bg-[#4ADE80] selection:text-[#1E293B]`,children:(0,$.jsx)(`code`,{children:i})})]},`code-${t}`)}if(e.startsWith(`$$`)&&e.endsWith(`$$`)||e.startsWith(`\\[`)&&e.endsWith(`\\]`)){let n=ja((e.startsWith(`$$`),e.slice(2,-2)),!0);return(0,$.jsx)(`div`,{className:`my-3 p-3 bg-slate-50 border-2 border-ink-black rounded overflow-x-auto text-center shadow-[2px_2px_0px_0px_rgba(30,41,59,0.3)] custom-scrollbar`,dangerouslySetInnerHTML:{__html:n}},`math-${t}`)}let n=e.split(` +`),r=[],a=0;for(;a=2){let t=e[0].slice(1,-1).split(`|`).map(e=>e.trim()),n=e.slice(2).map(e=>e.slice(1,-1).split(`|`).map(e=>e.trim()));r.push((0,$.jsx)(`div`,{className:`my-3 overflow-x-auto border-2 border-ink-black rounded shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,$.jsxs)(`table`,{className:`w-full text-left border-collapse text-xs`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{className:`bg-slate-200 border-b-2 border-ink-black`,children:t.map((e,t)=>(0,$.jsx)(`th`,{className:`p-2 font-bold font-headline-md border-r last:border-r-0 border-ink-black`,children:Ma(e)},t))})}),(0,$.jsx)(`tbody`,{children:n.map((e,t)=>(0,$.jsx)(`tr`,{className:`border-b border-slate-300 last:border-b-0 ${t%2==1?`bg-slate-50`:`bg-white`}`,children:e.map((e,t)=>(0,$.jsx)(`td`,{className:`p-2 border-r last:border-r-0 border-slate-200 font-medium`,children:Ma(e)},t))},t))})]})},`table-${o}`));continue}}if(e.startsWith(`#### `)){r.push((0,$.jsx)(`h4`,{className:`text-xs font-bold text-ink-black mt-3 mb-1 font-headline-md`,children:Ma(e.substring(5))},o)),a++;continue}if(e.startsWith(`### `)){r.push((0,$.jsxs)(`h3`,{className:`text-xs font-bold text-primary mt-4 mb-1.5 uppercase font-arcade tracking-wide flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`w-2 h-2 bg-primary inline-block rounded-xs`}),Ma(e.substring(4))]},o)),a++;continue}if(e.startsWith(`## `)){r.push((0,$.jsx)(`h2`,{className:`text-sm font-extrabold text-ink-black mt-4 mb-2 font-headline-md border-b-2 border-ink-black pb-1`,children:Ma(e.substring(3))},o)),a++;continue}if(e.startsWith(`# `)){r.push((0,$.jsx)(`h1`,{className:`text-base font-black text-ink-black mt-5 mb-2 font-headline-md`,children:Ma(e.substring(2))},o)),a++;continue}if(i===`---`||i===`***`||i===`___`){r.push((0,$.jsx)(`hr`,{className:`my-3 border-t-2 border-dashed border-slate-300`},o)),a++;continue}if(e.trim().startsWith(`>`)){r.push((0,$.jsx)(`blockquote`,{className:`border-l-4 border-primary pl-3 py-1 my-2 bg-slate-50 italic text-slate-700`,children:Ma(e.trim().substring(1).trim())},o)),a++;continue}if(i.startsWith(`- `)||i.startsWith(`* `)||i.startsWith(`+ `)){let t=e.search(/\S/)>=2?`pl-6`:`pl-2`;r.push((0,$.jsxs)(`div`,{className:`flex items-start gap-2 my-1 ${t}`,children:[(0,$.jsx)(`span`,{className:`text-primary font-bold mt-0.5 shrink-0`,children:`•`}),(0,$.jsx)(`div`,{className:`text-ink-black leading-relaxed flex-1 font-medium`,children:Ma(i.substring(2))})]},o)),a++;continue}let s=i.match(/^(\d+)\.\s+(.*)$/);if(s){let t=e.search(/\S/)>=2?`pl-6`:`pl-2`;r.push((0,$.jsxs)(`div`,{className:`flex items-start gap-2 my-1 ${t}`,children:[(0,$.jsx)(`span`,{className:`text-primary font-arcade text-[9px] font-bold mt-1 shrink-0 px-1 py-0.2 bg-slate-100 border border-ink-black rounded-xs`,children:s[1]}),(0,$.jsx)(`div`,{className:`text-ink-black leading-relaxed flex-1 font-medium`,children:Ma(s[2])})]},o)),a++;continue}r.push((0,$.jsx)(`p`,{className:`text-ink-black my-1 font-medium leading-relaxed`,children:Ma(e)},o)),a++}return(0,$.jsx)(i.Fragment,{children:r},`block-${t}`)})})};function Pa(){let[e,t]=(0,i.useState)(null),[r,a]=(0,i.useState)(``),[o,s]=(0,i.useState)(!1),[c,l]=(0,i.useState)([]),[u,d]=(0,i.useState)(``),[f,p]=(0,i.useState)(!0),[m,h]=(0,i.useState)(0),g=async()=>{p(!0),d(``);try{let{data:{session:e}}=await n.auth.getSession();if(!e){d(`Unauthenticated session`);return}let r=await fetch(`/api/challenges/python/daily`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(r.ok){let e=await r.json();t(e),a(e.starter_code),h(e.total_score)}else d(`Failed to load challenge from server.`)}catch{d(`Connection timed out.`)}finally{p(!1)}};return(0,i.useEffect)(()=>{g()},[]),f?(0,$.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-arcade text-[10px]`,children:[(0,$.jsx)(`div`,{className:`animate-bounce mb-2`,children:`LOADING CHALLENGE...`}),(0,$.jsx)(`div`,{className:`w-48 h-4 bg-white border-[3px] border-ink-black overflow-hidden relative`,children:(0,$.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#9d4edd] w-2/3 animate-pulse border-r-2 border-ink-black`})})]}):e?(0,$.jsx)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm`,children:(0,$.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 custom-scrollbar flex flex-col gap-4`,children:[(0,$.jsxs)(`div`,{className:`flex justify-between items-center bg-slate-100 border-[3px] border-ink-black p-3`,children:[(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`px-2 py-0.5 border-2 border-ink-black font-bold uppercase text-[9px] ${e.difficulty===`Easy`?`bg-green-200 text-green-800`:e.difficulty===`Medium`?`bg-yellow-200 text-yellow-800`:`bg-red-200 text-red-800`}`,children:e.difficulty}),(0,$.jsxs)(`span`,{className:`bg-blue-100 text-blue-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:[`+`,e.points,` PTS`]}),e.completed?(0,$.jsx)(`span`,{className:`bg-emerald-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`COMPLETED`}):(0,$.jsx)(`span`,{className:`bg-rose-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`INCOMPLETE`})]}),(0,$.jsxs)(`div`,{className:`font-arcade text-[8px] text-purple-700 font-bold bg-white border-2 border-ink-black px-2 py-0.5 shadow-[1px_1px_0_0_#1E293B]`,children:[`TOTAL SCORE: `,m]})]}),(0,$.jsxs)(`div`,{className:`border-2 border-ink-black bg-slate-50 p-3 rounded font-sans leading-relaxed text-xs`,children:[(0,$.jsxs)(`h3`,{className:`font-bold border-b border-slate-300 pb-1 mb-2 uppercase tracking-wide text-primary-purple flex items-center gap-1`,children:[(0,$.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`description`}),`Problem: `,e.title]}),(0,$.jsx)(Na,{content:e.description})]}),(0,$.jsxs)(`div`,{className:`flex flex-col flex-1 min-h-[220px]`,children:[(0,$.jsxs)(`div`,{className:`flex justify-between items-center mb-1`,children:[(0,$.jsxs)(`span`,{className:`font-bold text-[10px] tracking-wide uppercase flex items-center gap-1`,children:[(0,$.jsx)(`span`,{className:`material-symbols-outlined text-sm text-purple-600`,children:`code`}),`Write Python Solution:`]}),(0,$.jsx)(`button`,{onClick:()=>a(e.starter_code),className:`text-[9px] underline text-blue-600 hover:text-blue-800 cursor-pointer font-sans`,children:`Reset Starter Code`})]}),(0,$.jsx)(`textarea`,{value:r,onChange:e=>a(e.target.value),className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-3 border-[3px] border-ink-black rounded outline-none focus:ring-2 focus:ring-primary-purple text-xs leading-relaxed resize-none`,placeholder:`# Write your python code here`,spellCheck:`false`})]}),(0,$.jsx)(`div`,{className:`shrink-0`,children:(0,$.jsx)(`button`,{disabled:o,onClick:async()=>{s(!0),d(``),l([]);try{let{data:{session:e}}=await n.auth.getSession();if(!e){d(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/python/submit`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({code:r})});if(i.ok){let e=await i.json();e.success?(l(e.results),e.all_passed&&(h(e.total_score),t(e=>e?{...e,completed:!0}:null))):d(e.error)}else d(`Submission failed at server host.`)}catch{d(`Network connection lost.`)}finally{s(!1)}},className:`w-full bg-highlight-pink text-white font-window-title font-bold py-2 px-4 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none hover:bg-pink-400 transition-all disabled:opacity-50 cursor-pointer text-center text-xs`,children:o?`EXECUTING TEST CASES...`:`RUN SOLUTION SUBMISSION`})}),u&&(0,$.jsxs)(`div`,{className:`border-[3px] border-red-500 bg-red-50 text-red-800 p-3 font-mono text-xs whitespace-pre-wrap`,children:[(0,$.jsx)(`div`,{className:`font-bold mb-1`,children:`COMPILER / RUNTIME ERROR:`}),u]}),c.length>0&&(0,$.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-slate-100 p-3`,children:[(0,$.jsx)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 uppercase`,children:`Test Case Executions:`}),(0,$.jsx)(`div`,{className:`space-y-1.5 font-mono text-xs`,children:c.map((e,t)=>(0,$.jsxs)(`div`,{className:`flex flex-col p-2 border border-slate-300 bg-white`,children:[(0,$.jsxs)(`div`,{className:`flex justify-between`,children:[(0,$.jsxs)(`span`,{className:`font-bold`,children:[`Test Case `,t+1,`:`]}),(0,$.jsx)(`span`,{className:`font-bold uppercase ${e.status===`passed`?`text-green-600`:`text-red-600`}`,children:e.status})]}),(0,$.jsxs)(`div`,{className:`text-[10px] text-slate-500 mt-1`,children:[(0,$.jsxs)(`div`,{children:[`Input: `,JSON.stringify(e.input)]}),e.status===`passed`&&(0,$.jsxs)(`div`,{children:[`Output: `,JSON.stringify(e.got)]}),e.status===`failed`&&(0,$.jsxs)(`div`,{className:`text-red-700`,children:[`Expected: `,JSON.stringify(e.expected),` | Got: `,JSON.stringify(e.got)]}),e.status===`error`&&(0,$.jsxs)(`div`,{className:`text-red-700 font-semibold`,children:[`Error: `,e.error]})]})]},t))})]})]})}):(0,$.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-sans text-center gap-3`,children:[(0,$.jsx)(`span`,{className:`material-symbols-outlined text-red-500 text-4xl`,children:`error`}),(0,$.jsx)(`div`,{className:`font-bold text-ink-black text-sm`,children:u||`No active challenge found.`}),(0,$.jsx)(`button`,{onClick:g,className:`px-3 py-1.5 bg-yellow-400 hover:bg-yellow-300 border-[3px] border-ink-black text-xs font-bold font-window-title cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:`RETRY`})]})}export{Pa as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/ReviewQueue-DMWpFNwe.js b/algospaced-ui/dist/assets/ReviewQueue-DMWpFNwe.js new file mode 100644 index 0000000000000000000000000000000000000000..e49c2762cd0730a0db879f0d6b7da3c7a8072d26 --- /dev/null +++ b/algospaced-ui/dist/assets/ReviewQueue-DMWpFNwe.js @@ -0,0 +1,27 @@ +import{a as e,c as t,i as n,t as r}from"./jsx-runtime-UoOgdb2P.js";import{n as i}from"./PrincessChamber-DVAuHg4W.js";import{i as a,n as o,r as s,t as c}from"./confetti.module-rliWwYSJ.js";import{n as l,t as u}from"./info-P8wDUvT9.js";import{t as d}from"./rotate-ccw-CucqdZpm.js";import{n as f,t as p}from"./triangle-alert-BOx1I1tY.js";import{E as m,F as h,L as g,N as _,R as v,S as y,a as b,c as x,i as S,j as C,k as w,n as ee,o as te,r as ne,s as T,t as E,v as re,z as D}from"./index-DUIMMmBx.js";var ie=D(`award`,[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`,key:`1yiouv`}],[`circle`,{cx:`12`,cy:`8`,r:`6`,key:`1vp47v`}]]),ae=D(`brain-circuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),oe=D(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),se=D(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),ce=D(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),le=D(`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`}]]),ue=D(`file-text`,[[`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 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),de=D(`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`}]]),O=D(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),k=t(e(),1),A=r();function fe(e){if(!e)return{description:``,examples:[],constraints:[]};let t=e.description||``,n=[],r=[];if(Array.isArray(e.examples)&&e.examples.length>0&&(n=e.examples.map(e=>typeof e==`string`?{input:e,output:``}:{input:e?.input||``,output:e?.output||``,explanation:e?.explanation||``})),Array.isArray(e.constraints)&&e.constraints.length>0?r=e.constraints.map(e=>String(e).replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean):typeof e.constraints==`string`&&e.constraints.trim()&&(r=e.constraints.split(` +`).map(e=>e.replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean)),n.length===0||r.length===0){let e=t.search(/\bExample\s*\d*:/i),i=t.search(/\bConstraints\s*:/i),a=-1;if(e!==-1&&i!==-1?a=Math.min(e,i):e===-1?i!==-1&&(a=i):a=e,a!==-1){let e=t.substring(0,a).trim(),i=t.substring(a),o=i,s=``,c=i.search(/\bConstraints\s*:/i);if(c!==-1&&(o=i.substring(0,c).trim(),s=i.substring(c).replace(/\bConstraints\s*:/i,``).trim()),n.length===0&&o){let e=/\bExample\s*(\d*)\s*:/gi,t=[],r;for(;(r=e.exec(o))!==null;)t.push({index:r.index,text:r[0]});for(let e=0;ee.replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean)),(n.length>0||r.length>0)&&(t=e)}}return{description:t,examples:n,constraints:r}}function pe(e){return e.split(/(\*\*.*?\*\*|`.*?`)/g).map((e,t)=>e.startsWith(`**`)&&e.endsWith(`**`)?(0,A.jsx)(`strong`,{className:`text-ink-black font-bold`,children:e.slice(2,-2)},t):e.startsWith("`")&&e.endsWith("`")?(0,A.jsx)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] px-1.5 py-0.5 font-code-mono text-[11px] border border-ink-black`,children:e.slice(1,-1)},t):e)}function me(e){return e.split(/(```[\s\S]*?```)/g).map((e,t)=>{if(e.startsWith("```")){let n=e.split(` +`).slice(1,-1).join(` +`);return(0,A.jsx)(`pre`,{className:`bg-[#1E293B] p-3 border border-ink-black overflow-x-auto font-code-mono text-[11px] text-[#4ADE80] my-2 select-text`,children:(0,A.jsx)(`code`,{children:n})},t)}return e.split(` +`).map((e,n)=>{let r=`${t}-${n}`;if(e.startsWith(`### `))return(0,A.jsx)(`h3`,{className:`text-xs font-bold text-ink-black mt-3 mb-1.5 uppercase font-arcade`,children:e.substring(4)},r);if(e.startsWith(`## `))return(0,A.jsx)(`h2`,{className:`text-sm font-bold text-ink-black mt-4 mb-2 font-headline-md`,children:e.substring(3)},r);if(e.startsWith(`# `))return(0,A.jsx)(`h1`,{className:`text-base font-extrabold text-ink-black mt-5 mb-2 font-headline-md`,children:e.substring(2)},r);if(e.trim().startsWith(`- `)||e.trim().startsWith(`* `)){let t=e.trim().substring(2);return(0,A.jsxs)(`div`,{className:`flex items-start gap-1.5 pl-2 my-1`,children:[(0,A.jsx)(`span`,{className:`text-primary mt-1`,children:`•`}),(0,A.jsx)(`span`,{className:`text-ink-black text-xs leading-relaxed`,children:pe(t)})]},r)}return e.trim()===``?(0,A.jsx)(`div`,{className:`h-2`},r):(0,A.jsx)(`p`,{className:`text-ink-black text-xs leading-relaxed my-1`,children:pe(e)},r)})})}function he({overrideProblemId:e,refreshTrigger:t,onClearOverride:r,onOpenOnboarding:i,setIsOnboardingOpen:a}){let[o,s]=(0,k.useState)([]),[l,u]=(0,k.useState)(!0),[d,f]=(0,k.useState)(!1),[p,m]=(0,k.useState)(null),[h,g]=(0,k.useState)(null),[_,v]=(0,k.useState)(``),[y,b]=(0,k.useState)(null),[S,C]=(0,k.useState)(!1),[w,ne]=(0,k.useState)(void 0),E=(0,k.useRef)(!1),D=(0,k.useRef)(i),ie=(0,k.useRef)(a),ae=(0,k.useRef)(r);(0,k.useEffect)(()=>{D.current=i,ie.current=a,ae.current=r});let oe=(0,k.useCallback)(()=>{D.current?D.current():ie.current&&ie.current(!0)},[]),se=(0,k.useCallback)(async(t=!0)=>{t&&u(!0),g(null),v(``),E.current=!1;try{let{data:{session:t}}=await n.auth.getSession(),r=t?t.access_token:`sandbox`;t?.user?.id&&ne(t.user.id);let i={Authorization:`Bearer ${r}`},a=`/api/reviews/due`;e&&(a=`/api/reviews/problems/id/${e}`);let o=await fetch(a,{headers:i});if(o.ok){let n=await o.json();s(n);let r=t?.user?.id,a=r===`sandbox-user-id`||!r?`sandbox`:r;if(!localStorage.getItem(`algospaced_onboarding_done_${a}`)&&!e&&oe(),n&&n.length>0){let e=n[0].problems,t=e?.problem_number?T(e.problem_number):te(e?.id||``),r=e?.starter_code||t?.starter_code||``;v(r)}else try{let e=await fetch(`/api/journey-progress`,{headers:i});if(e.ok){let t=await e.json();b(x(new Set(t))??null)}else b(x(new Set)??null)}catch{b(x(new Set)??null)}}}catch(e){console.error(`Error fetching review queue:`,e)}finally{u(!1)}},[e,oe]);return(0,k.useEffect)(()=>{let e=!1,t=setTimeout(()=>{e||se(!0)},0);return()=>{e=!0,clearTimeout(t)}},[se,t]),(0,k.useEffect)(()=>{if(!l&&o.length===0&&!e&&!E.current){E.current=!0;try{c({particleCount:90,spread:70,origin:{y:.6}})}catch{}}},[l,o.length,e]),{reviews:o,setReviews:s,loading:l,submitting:d,submittingRating:p,gradeError:h,setGradeError:g,code:_,setCode:v,nextMilestone:y,activatingMilestone:S,currentUserId:w,fetchQueue:se,handleGrade:(0,k.useCallback)(async t=>{if(o.length===0||d)return;let r=o[0];if(!r||!r.id)return;f(!0),m(t),g(null);let i=[...o];try{let{data:{session:a}}=await n.auth.getSession(),o=a?a.access_token:`sandbox`,c=await fetch(`/api/reviews/complete`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${o}`},body:JSON.stringify({review_id:r.id,fsrs_state:r.fsrs_state??0,fsrs_stability:r.fsrs_stability??0,fsrs_difficulty:r.fsrs_difficulty??0,fsrs_elapsed_days:r.fsrs_elapsed_days??0,fsrs_scheduled_days:r.fsrs_scheduled_days??0,fsrs_reps:r.fsrs_reps??0,fsrs_lapses:r.fsrs_lapses??0,last_reviewed:r.last_reviewed,rating:t})});if(c.ok){let n=r?.problems?.name||``,i=r?.problems?.pattern||``,a=`Correct`;a=t===1?`Incorrect`:t===2?`Mixed`:`Correct`,re.addReviewEvent(a,n,i).catch(()=>{}),e&&ae.current?ae.current():(s(e=>e.slice(1)),se(!1))}else{let e=await c.json().catch(()=>({}));g(e.detail||`Server returned error (${c.status}). Please try again.`),s(i)}}catch(e){console.error(`Error logging review completion:`,e);let t=e instanceof Error?e.message:`Network connection failed while logging review.`;g(t),s(i)}finally{f(!1),m(null)}},[o,d,e,se]),handleActivateNextMilestone:(0,k.useCallback)(async()=>{if(y&&!S){C(!0);try{await ee(y),await se()}catch(e){console.error(`Failed to activate next milestone:`,e)}finally{C(!1)}}},[y,S,se]),handleResetStarterCode:(0,k.useCallback)(()=>{let e=o[0]?.problems,t=e?.problem_number?T(e.problem_number):te(e?.id||``),n=e?.starter_code||t?.starter_code||``;v(n)},[o])}}function ge(){let[e,t]=(0,k.useState)(!1),[n,r]=(0,k.useState)(null),[i,a]=(0,k.useState)(null),[o,s]=(0,k.useState)(!1),[c,l]=(0,k.useState)(!1),[u,d]=(0,k.useState)(null);return{sandboxRunning:e,sandboxResults:n,sandboxError:i,savingReference:o,savedRefSuccess:c,saveRefError:u,handleRunSandbox:(0,k.useCallback)(async(n,i)=>{if(!n||!i.trim()||e)return;let o=n.problems,s=o?.problem_number?T(o.problem_number):te(o?.id||``),c=(o?.examples&&o.examples.length>0?o.examples:s?.examples||[]).map(e=>typeof e==`string`?{input:e,expected:``}:{input:e?.input??``,expected:e?.output??``});t(!0),r(null),a(null),l(!1);try{let e=await S(i,c);r(e)}catch(e){let t=e instanceof Error?e.message:`Execution failed`;a(t)}finally{t(!1)}},[e]),handleSaveReference:(0,k.useCallback)(async(e,t,n)=>{if(!e||!t.trim()||o)return;let r=e.problems?.id||e.problem_id;if(r){s(!0),d(null);try{await b(r,t),l(!0),n&&n(t),setTimeout(()=>l(!1),3500)}catch(e){let t=e instanceof Error?e.message:`Failed to save solution`;d(t)}finally{s(!1)}}},[o]),resetSandbox:(0,k.useCallback)(()=>{r(null),a(null),l(!1),d(null)},[])}}function _e(){let[e,t]=(0,k.useState)(!1),[r,i]=(0,k.useState)(null),[a,o]=(0,k.useState)(null),[s,c]=(0,k.useState)(!1),[l,u]=(0,k.useState)(null),[d,f]=(0,k.useState)(null),[p,m]=(0,k.useState)(!1),[h,g]=(0,k.useState)(null);return{aiLoading:e,aiResult:r,aiError:a,explainLoading:s,explanationText:l,explainError:d,aiSolutionLoading:p,aiSolutionError:h,handleAiEvaluation:(0,k.useCallback)(async(r,a)=>{if(!r||!a.trim()||e)return;let s=r.problems;t(!0),i(null),o(null);try{let{data:{session:e}}=await n.auth.getSession(),t=e?e.access_token:`sandbox`,r=await fetch(`/api/reviews/evaluate`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({problem_name:s.name,pattern:s.pattern,optimal_time:s.optimal_time,optimal_space:s.optimal_space,code:a})});if(r.ok){let e=await r.json();i(e)}else{let e=await r.json().catch(()=>({}));o(e.detail||`Failed to analyze code.`)}}catch{o(`Connection to evaluation server failed.`)}finally{t(!1)}},[e]),handleExplainCode:(0,k.useCallback)(async e=>{if(!e||s)return;let t=e.problems;if(!t)return;let r=t.problem_number?T(t.problem_number):te(t.id||``),i=t.reference_code||r?.reference_solution;if(i){c(!0),u(null),f(null);try{let{data:{session:e}}=await n.auth.getSession(),a=e?e.access_token:`sandbox`,o=await fetch(`/api/reviews/explain`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify({problem_number:t.problem_number||r?.problem_number,method:t.pattern||r?.pattern,code:i,problem_name:t.name,optimal_time:t.optimal_time||r?.time_complexity,optimal_space:t.optimal_space||r?.space_complexity})});if(o.ok){let e=await o.json();u(e.explanation)}else{let e=await o.json().catch(()=>({}));f(e.detail||`Failed to generate code explanation.`)}}catch{f(`Connection to explanation server failed.`)}finally{c(!1)}}},[s]),handleFetchAiSolution:(0,k.useCallback)(async(e,t)=>{if(!e||p)return;let n=e.problems,r=n?.id||e.problem_id,i=n?.problem_number?T(n.problem_number):te(n?.id||``);m(!0),g(null);try{let e=await ne({problemId:r,problemNumber:n?.problem_number||i?.problem_number,problemName:n?.name,pattern:n?.pattern||i?.pattern});e.solution&&t&&t(e.solution)}catch(e){let t=e instanceof Error?e.message:`Failed to retrieve AI Grimoire solution`;g(t)}finally{m(!1)}},[p]),resetAiState:(0,k.useCallback)(()=>{i(null),o(null),u(null),f(null),g(null)},[])}}var ve=({problem:e,totalInQueue:t,fsrsState:n,overrideProblemId:r,onClearOverride:i,onOpenJourney:a,onOpenCreateProblem:o,onOpenOnboarding:c})=>{let u=`https://leetcode.com/problemset/all/?search=${encodeURIComponent(e.name||``)}`;return(0,A.jsxs)(`div`,{className:`shrink-0 bg-paper-white border-b-[3px] border-ink-black px-4 py-2.5 flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-2 shadow-[0_2px_0_0_rgba(30,41,59,0.05)]`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-3 overflow-hidden`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2.5 py-1 bg-amber-300 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] shrink-0`,children:[(0,A.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-emerald-500 animate-ping`}),(0,A.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black tracking-wide`,children:r?`CUSTOM OVERRIDE`:`CARD 1 OF ${t}`})]}),(0,A.jsx)(`span`,{className:`text-[9px] font-arcade font-bold px-2 py-0.5 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] shrink-0 text-white ${e.difficulty===`Easy`?`bg-emerald-500`:e.difficulty===`Medium`?`bg-amber-500`:`bg-rose-500`}`,children:e.difficulty?e.difficulty.toUpperCase():`EASY`}),(0,A.jsx)(`div`,{className:`truncate min-w-0`,children:(0,A.jsx)(`h2`,{className:`text-sm sm:text-base font-extrabold text-ink-black font-headline-md truncate leading-tight`,children:e.name})})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0 justify-end`,children:[(0,A.jsxs)(`button`,{onClick:a,className:`px-2 py-1 bg-white hover:bg-amber-50 border-2 border-ink-black text-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,title:`View Journey Path Map`,children:[(0,A.jsx)(C,{className:`w-3 h-3 text-amber-600`}),(0,A.jsx)(`span`,{className:`hidden sm:inline`,children:`JOURNEY`})]}),(0,A.jsxs)(`button`,{onClick:o,className:`px-2 py-1 bg-white hover:bg-purple-50 border-2 border-ink-black text-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,title:`Create or Import Problem`,children:[(0,A.jsx)(oe,{className:`w-3 h-3 text-purple-600`}),(0,A.jsx)(`span`,{className:`hidden sm:inline`,children:`ADD`})]}),(0,A.jsxs)(`button`,{onClick:c,className:`px-2 py-1 bg-amber-200 hover:bg-amber-300 border-2 border-ink-black text-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,title:`Fast-Track: Enroll Known Problems from 150 Catalog`,children:[(0,A.jsx)(y,{className:`w-3 h-3 text-amber-800`}),(0,A.jsx)(`span`,{className:`hidden sm:inline`,children:`FAST-TRACK`})]}),(0,A.jsxs)(`div`,{className:`px-2 py-0.5 bg-white border-2 border-ink-black text-[9px] font-arcade font-bold text-ink-black flex items-center gap-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,A.jsx)(s,{className:`w-3 h-3 text-purple-600`}),(0,A.jsxs)(`span`,{children:[`FSRS: `,n===0?`NEW`:n===1?`LEARNING`:n===2?`REVIEW`:`RELEARNING`]})]}),e.google_doc_url&&(0,A.jsxs)(`a`,{href:e.google_doc_url,target:`_blank`,rel:`noreferrer`,className:`px-2 py-1 bg-white hover:bg-slate-100 border-2 border-ink-black text-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,title:`Open Google Doc Notes`,children:[(0,A.jsx)(`span`,{children:`DOC`}),(0,A.jsx)(l,{className:`w-2.5 h-2.5 text-primary`})]}),(0,A.jsxs)(`a`,{href:u,target:`_blank`,rel:`noreferrer`,className:`px-2 py-1 bg-white hover:bg-slate-100 border-2 border-ink-black text-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,title:`Search LeetCode`,children:[(0,A.jsx)(`span`,{children:`LC`}),(0,A.jsx)(l,{className:`w-2.5 h-2.5 text-amber-600`})]}),r&&i&&(0,A.jsx)(`button`,{onClick:i,className:`px-2 py-1 bg-rose-100 hover:bg-rose-200 border-2 border-ink-black text-rose-800 text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:`EXIT OVERRIDE`})]})]})},ye=({leftTab:e,onSelectLeftTab:t,mobileView:n,problem:r,parsed:i,effectiveReferenceCode:a,copiedSnippet:o,onCopyText:c,code:l,savingReference:u,savedRefSuccess:d,onSaveReference:h,aiSolutionLoading:g,aiSolutionError:b,onFetchAiSolution:x,explainLoading:S,explainError:C,explanationText:ee,onExplainCode:te,activeReview:ne})=>(0,A.jsxs)(`div`,{className:`w-full lg:w-[46%] flex flex-col bg-paper-white border-b-[3px] lg:border-b-0 lg:border-r-[3px] border-ink-black overflow-hidden ${n!==`spec`&&n!==`ref`?`hidden lg:flex`:`flex`}`,children:[(0,A.jsxs)(`div`,{className:`shrink-0 bg-[#f4f1ea] border-b-2 border-ink-black px-3 pt-2 flex items-end gap-1.5 font-arcade text-[9px]`,children:[(0,A.jsxs)(`button`,{onClick:()=>t(`spec`),className:`h-11 px-3 border-t-2 border-x-2 border-ink-black cursor-pointer font-bold transition-all flex items-center justify-center gap-1.5 focus:outline-none focus-visible:outline-none ${e===`spec`?`bg-paper-white text-ink-black -mb-[2px] pb-2 font-extrabold shadow-[0_-2px_0_0_rgba(30,41,59,0.1)] relative z-10 border-b-2 border-b-paper-white`:`bg-slate-200 text-trash-gray hover:bg-slate-100 hover:text-ink-black border-b-2 border-b-ink-black`}`,children:[(0,A.jsx)(ue,{className:`w-3.5 h-3.5 text-purple-700 shrink-0`}),(0,A.jsx)(`span`,{children:`SPECIFICATION`})]}),(0,A.jsxs)(`button`,{onClick:()=>t(`ref`),className:`h-11 px-3 border-t-2 border-x-2 border-ink-black cursor-pointer font-bold transition-all flex items-center justify-center gap-1.5 focus:outline-none focus-visible:outline-none ${e===`ref`?`bg-paper-white text-ink-black -mb-[2px] pb-2 font-extrabold shadow-[0_-2px_0_0_rgba(30,41,59,0.1)] relative z-10 border-b-2 border-b-paper-white`:`bg-slate-200 text-trash-gray hover:bg-slate-100 hover:text-ink-black border-b-2 border-b-ink-black`}`,children:[(0,A.jsx)(ce,{className:`w-3.5 h-3.5 text-blue-700 shrink-0`}),(0,A.jsx)(`span`,{className:`text-center leading-tight`,children:`SOLUTION`})]}),(0,A.jsxs)(`button`,{onClick:()=>t(`leitner`),className:`h-11 px-3 border-t-2 border-x-2 border-ink-black cursor-pointer font-bold transition-all flex items-center justify-center gap-1.5 focus:outline-none focus-visible:outline-none ${e===`leitner`?`bg-paper-white text-ink-black -mb-[2px] pb-2 font-extrabold shadow-[0_-2px_0_0_rgba(30,41,59,0.1)] relative z-10 border-b-2 border-b-paper-white`:`bg-slate-200 text-trash-gray hover:bg-slate-100 hover:text-ink-black border-b-2 border-b-ink-black`}`,children:[(0,A.jsx)(O,{className:`w-3.5 h-3.5 text-emerald-700 shrink-0`}),(0,A.jsxs)(`span`,{className:`text-center leading-tight`,children:[`FSRS`,(0,A.jsx)(`br`,{}),`STATS`]})]})]}),(0,A.jsxs)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar p-4 sm:p-5 space-y-4`,children:[e===`spec`&&(0,A.jsxs)(`div`,{className:`space-y-4`,children:[(0,A.jsx)(`div`,{className:`p-3 bg-amber-50 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 text-xs font-bold text-ink-black`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray uppercase`,children:`Pattern:`}),(0,A.jsx)(`span`,{className:`px-2 py-0.5 bg-white border border-ink-black font-arcade text-[9px] text-purple-700`,children:r.pattern||`General Algorithm`})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray uppercase`,children:`Optimal:`}),(0,A.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-1.5 py-0.5 text-[11px] border border-ink-black`,children:[`T: `,r.optimal_time||`O(N)`]}),(0,A.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-1.5 py-0.5 text-[11px] border border-ink-black`,children:[`S: `,r.optimal_space||`O(1)`]})]})]})}),i.description&&(0,A.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,A.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold mb-2 flex items-center gap-1`,children:[(0,A.jsx)(v,{className:`w-3 h-3 text-primary`}),`PROBLEM DESCRIPTION`]}),(0,A.jsx)(`div`,{className:`font-sans text-xs sm:text-[13px] text-slate-800 leading-relaxed space-y-2 font-medium`,children:i.description.split(` +`).map((e,t)=>e.trim()?(0,A.jsx)(`p`,{className:`m-0 leading-relaxed whitespace-pre-wrap select-text`,children:pe(e)},t):(0,A.jsx)(`div`,{className:`h-1.5`},t))})]}),i.examples.length>0&&(0,A.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,A.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,A.jsx)(y,{className:`w-3 h-3 text-amber-500`}),`EXAMPLES (`,i.examples.length,`)`]}),(0,A.jsx)(`div`,{className:`space-y-2.5`,children:i.examples.map((e,t)=>(0,A.jsxs)(`div`,{className:`p-3 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-2 text-xs`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-primary`,children:[`EXAMPLE `,t+1]}),e.input&&(0,A.jsxs)(`button`,{onClick:()=>c(e.input,`ex-${t}`),className:`px-2 py-0.5 bg-slate-100 hover:bg-slate-200 border border-ink-black text-[9px] font-arcade text-ink-black flex items-center gap-1 cursor-pointer`,title:`Copy input data`,children:[(0,A.jsx)(le,{className:`w-2.5 h-2.5`}),o===`ex-${t}`?`COPIED!`:`COPY`]})]}),e.input&&(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase block`,children:`Input:`}),(0,A.jsx)(`div`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono p-2 border border-ink-black text-[11px] break-all select-text`,children:e.input})]}),e.output&&(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase block`,children:`Output:`}),(0,A.jsx)(`div`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono p-2 border border-ink-black text-[11px] break-all select-text`,children:e.output})]}),e.explanation&&(0,A.jsxs)(`div`,{className:`text-[11px] font-sans text-slate-700 bg-amber-50/70 p-2 border border-dashed border-amber-300 select-text`,children:[(0,A.jsx)(`span`,{className:`font-bold text-ink-black`,children:`Explanation: `}),e.explanation]})]},t))})]}),i.constraints.length>0&&(0,A.jsxs)(`div`,{className:`p-3 bg-[#fdfbf7] border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-2`,children:[(0,A.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1`,children:[(0,A.jsx)(p,{className:`w-3 h-3 text-amber-600`}),`CONSTRAINTS`]}),(0,A.jsx)(`ul`,{className:`space-y-1.5 list-none m-0 p-0`,children:i.constraints.map((e,t)=>(0,A.jsxs)(`li`,{className:`flex items-start gap-2 text-xs`,children:[(0,A.jsx)(`span`,{className:`text-primary font-bold select-none`,children:`•`}),(0,A.jsx)(`code`,{className:`bg-white text-ink-black font-code-mono px-2 py-0.5 border border-slate-300 text-[11px] select-text`,children:e})]},t))})]})]}),e===`ref`&&(0,A.jsxs)(`div`,{className:`space-y-4`,children:[(0,A.jsxs)(`div`,{className:`border-2 border-ink-black bg-[#1E293B] shadow-[3px_3px_0px_0px_rgba(30,41,59,1)]`,children:[(0,A.jsxs)(`div`,{className:`bg-slate-800 px-3 py-1.5 border-b-2 border-ink-black flex items-center justify-between`,children:[(0,A.jsxs)(`span`,{className:`font-arcade text-[9px] text-[#4ADE80] font-bold flex items-center gap-1`,children:[(0,A.jsx)(ce,{className:`w-3 h-3`}),r.reference_code?`CUSTOM SAVED SOLUTION (PYTHON)`:`OFFICIAL SOLUTION (PYTHON)`]}),a&&(0,A.jsxs)(`button`,{onClick:()=>c(a,`ref-code`),className:`px-2 py-0.5 bg-white hover:bg-slate-100 text-ink-black border border-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 cursor-pointer`,children:[(0,A.jsx)(le,{className:`w-2.5 h-2.5`}),o===`ref-code`?`COPIED!`:`COPY`]})]}),(0,A.jsx)(`div`,{className:`p-3 text-xs overflow-x-auto max-h-72 custom-scrollbar`,children:(0,A.jsx)(`pre`,{className:`font-code-mono text-[#4ADE80] text-[11px] leading-relaxed select-text m-0`,children:(0,A.jsx)(`code`,{children:a||`# No solution archived for this problem yet`})})})]}),!a&&(0,A.jsxs)(`div`,{className:`p-4 bg-amber-50 border-2 border-dashed border-amber-300 text-center space-y-3`,children:[(0,A.jsx)(`p`,{className:`text-xs font-sans text-stone-700`,children:`No solution has been generated or saved for this problem yet.`}),(0,A.jsx)(`button`,{onClick:x,disabled:g,className:`px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer inline-flex items-center gap-2 disabled:opacity-50`,children:g?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin`}),(0,A.jsx)(`span`,{children:`CONSULTING AI GRIMOIRE...`})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m,{className:`w-3.5 h-3.5 text-amber-300`}),(0,A.jsx)(`span`,{children:`CONSULT AI GRIMOIRE FOR SOLUTION`})]})}),b&&(0,A.jsx)(`div`,{className:`text-xs text-rose-600 font-medium`,children:b})]}),l.trim()&&(0,A.jsxs)(`button`,{onClick:h,disabled:u,className:`w-full bg-white hover:bg-slate-50 border-2 border-ink-black text-ink-black font-arcade text-[9px] py-2 px-3 font-bold flex items-center justify-center gap-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer disabled:opacity-50`,children:[u?(0,A.jsx)(w,{className:`w-3 h-3 animate-spin`}):d?(0,A.jsx)(_,{className:`w-3.5 h-3.5 text-emerald-600`}):(0,A.jsx)(f,{className:`w-3.5 h-3.5 text-blue-600`}),(0,A.jsx)(`span`,{children:d?`SAVED TO DB!`:`SAVE CURRENT STUDIO CODE AS SOLUTION`})]}),a&&(0,A.jsxs)(`div`,{className:`space-y-3`,children:[(0,A.jsx)(`button`,{onClick:te,disabled:S,className:`w-full bg-amber-300 hover:bg-amber-400 border-2 border-ink-black text-ink-black font-arcade text-[9px] py-2.5 px-4 font-bold flex items-center justify-center gap-2 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer disabled:opacity-50`,children:S?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin`}),(0,A.jsx)(`span`,{children:`EXPLAINING VIA GEMINI...`})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m,{className:`w-3.5 h-3.5 text-purple-700`}),(0,A.jsx)(`span`,{children:`EXPLAIN SOLUTION WITH GEMINI`})]})}),C&&(0,A.jsx)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold`,children:C}),ee&&(0,A.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-2 select-text`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5 pb-2 border-b-2 border-dashed border-ink-black`,children:[(0,A.jsx)(ae,{className:`w-4 h-4 text-purple-600`}),(0,A.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:`Gemini Code Breakdown`})]}),(0,A.jsx)(`div`,{className:`font-sans text-xs space-y-2 max-h-80 overflow-y-auto custom-scrollbar pt-1 font-medium text-slate-800`,children:me(ee)})]})]})]}),e===`leitner`&&(0,A.jsxs)(`div`,{className:`space-y-4`,children:[(0,A.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,A.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,A.jsx)(s,{className:`w-3 h-3 text-purple-600`}),`SPACED REPETITION PROGRESSION`]}),(0,A.jsx)(`div`,{className:`space-y-2`,children:[{state:0,label:`NEW`,color:`#3b82f6`},{state:1,label:`LEARNING`,color:`#f59e0b`},{state:2,label:`REVIEW`,color:`#10b981`},{state:3,label:`RELEARNING`,color:`#ef4444`}].map(e=>{let t=(ne.fsrs_state??0)===e.state;return(0,A.jsxs)(`div`,{className:`p-2.5 border-2 border-ink-black flex items-center justify-between transition-all ${t?`bg-amber-100 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] translate-x-1 font-bold`:`bg-slate-50 opacity-70`}`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`span`,{className:`w-5 h-5 border border-ink-black flex items-center justify-center font-arcade text-[9px] text-white font-bold`,style:{backgroundColor:e.color},children:e.state}),(0,A.jsx)(`span`,{className:`font-arcade text-[9px] text-ink-black`,children:e.label})]}),(0,A.jsx)(`div`,{className:`flex items-center gap-2`,children:t&&(0,A.jsx)(`span`,{className:`px-1.5 py-0.5 bg-emerald-500 text-white font-arcade text-[7px] border border-ink-black font-bold`,children:`CURRENT`})})]},e.state)})})]}),(0,A.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,A.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,A.jsx)(O,{className:`w-3 h-3 text-emerald-600`}),`PERFORMANCE METRICS`]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,A.jsxs)(`div`,{className:`p-2.5 bg-slate-50 border border-ink-black`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase`,children:`Total Reviews`}),(0,A.jsx)(`span`,{className:`font-headline-md text-lg font-bold text-ink-black`,children:ne.total_attempts||0})]}),(0,A.jsxs)(`div`,{className:`p-2.5 bg-slate-50 border border-ink-black`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase`,children:`Correct Recall`}),(0,A.jsx)(`span`,{className:`font-headline-md text-lg font-bold text-emerald-600`,children:ne.times_correct||0})]})]}),(0,A.jsxs)(`div`,{className:`text-xs font-sans text-slate-600 pt-1`,children:[`Next Due Date:`,` `,(0,A.jsx)(`span`,{className:`font-code-mono font-bold text-ink-black`,children:ne.next_review?new Date(ne.next_review).toLocaleDateString():`Today`})]})]})]})]})]});function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t>1;if(e=Ce[r])t=r+1;else return!0;if(t==n)return!1}}function Te(e){return e>=127462&&e<=127487}var Ee=8205;function De(e,t,n=!0,r=!0){return(n?Oe:ke)(e,t,r)}function Oe(e,t,n){if(t==e.length)return t;t&&je(e.charCodeAt(t))&&Me(e.charCodeAt(t-1))&&t--;let r=Ae(e,t);for(t+=Ne(r);t=0&&Te(Ae(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function ke(e,t,n){for(;t>1;){let r=Oe(e,t-2,n);if(r=56320&&e<57344}function Me(e){return e>=55296&&e<56320}function Ne(e){return e<65536?1:2}var j=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=He(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Fe.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=He(this,e,t);let n=[];return this.decompose(e,t,n,0),Fe.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new ze(this),i=new ze(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new ze(this,e)}iterRange(e,t=this.length){return new Be(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Ve(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new Pe(t):Fe.from(Pe.split(t,[]))}},Pe=class e extends j{constructor(e,t=Ie(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new M(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(Re(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=Le(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=He(this,t,n);let i=Le(this.text,Le(r.text,Re(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):Fe.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=` +`){[e,t]=He(this,e,t);let r=``;for(let i=0,a=0;i<=t&&ae&&a&&(r+=n),ei&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},Fe=class e extends j{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=He(this,t,n),r.lines=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=` +`){[e,t]=He(this,e,t);let r=``;for(let i=0,a=0;ie&&i&&(r+=n),ea&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new Pe(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof Pe&&c&&(n=u[u.length-1])instanceof Pe&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new Pe(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};j.empty=new Pe([``],0);function Ie(e){let t=-1;for(let n of e)t+=n.length+1;return t}function Le(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a=n&&(c>r&&(s=s.slice(0,r-i)),i0?1:(e instanceof Pe?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof Pe?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof Pe){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Pe?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Be=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new ze(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},Ve=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(j.prototype[Symbol.iterator]=function(){return this.iter()},ze.prototype[Symbol.iterator]=Be.prototype[Symbol.iterator]=Ve.prototype[Symbol.iterator]=function(){return this});var M=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function He(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function N(e,t,n=!0,r=!0){return De(e,t,n,r)}function Ue(e){return e>=56320&&e<57344}function We(e){return e>=55296&&e<56320}function Ge(e,t){let n=e.charCodeAt(t);if(!We(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Ue(r)?(n-55296<<10)+(r-56320)+65536:n}function Ke(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function qe(e){return e<65536?1:2}var Je=/\r\n?|\n/,Ye=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(Ye||={}),Xe=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return i+(e-r);i+=o}else{if(n!=Ye.Simple&&c>=e&&(n==Ye.TrackDel&&re||n==Ye.TrackBefore&&re))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n=0&&r<=t&&o>=e)return rt?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},Ze=class e extends Xe{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return et(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return tt(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length0&&$e(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;os||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?j.of(l.split(r||Je)):l:j.empty,d=u.length;if(e==s&&d==0)return;eo&&Qe(i,e-o,-1),Qe(i,s-e,d),$e(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;et&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function $e(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function tt(e,t,n,r=!1){let i=[],a=r?[]:null,o=new rt(e),s=new rt(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);Qe(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len=0&&e=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.lent||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var rt=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?j.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?j.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},it=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return P.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return P.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return P.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},P=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>it.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;ie.from-t.from),n=t.indexOf(r);for(let r=1;ri.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function at(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var ot=0,F=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=ot++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:st),!!t.static,t.enables)}of(e){return new ct([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new ct(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new ct(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function st(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var ct=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=ot++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||ut(e,c)){let r=t(e);if(a?!lt(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Ct(o,c);if(this.dependencies.every(t=>t instanceof F?o.facet(t)===e.facet(t):t instanceof pt?o.field(t,!1)==e.field(t,!1):!0)||(a?lt(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function lt(e,t,n){if(e.length!=t.length)return!1;for(let r=0;re[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;te===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(ft).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(ft),i=n.facet(ft),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,ft.of({field:this,create:e})]}get extension(){return this}},mt={lowest:4,low:3,default:2,high:1,highest:0};function ht(e){return t=>new _t(t,e)}var gt={highest:ht(mt.highest),high:ht(mt.high),default:ht(mt.default),low:ht(mt.low),lowest:ht(mt.lowest)},_t=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},vt=class e{of(e){return new yt(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},yt=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},bt=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of xt(t,n,o))e instanceof pt?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,st(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>dt(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function xt(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof yt&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof yt){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof _t)a(e.inner,e.prec);else if(e instanceof pt)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof ct)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,mt.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,mt.default),r.reduce((e,t)=>e.concat(t))}function St(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Ct(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var wt=F.define(),Tt=F.define({combine:e=>e.some(e=>e),static:!0}),Et=F.define({combine:e=>e.length?e[0]:void 0,static:!0}),Dt=F.define(),Ot=F.define(),kt=F.define(),At=F.define({combine:e=>e.length?e[0]:!1}),jt=class{constructor(e,t){this.type=e,this.value=t}static define(){return new Mt}},Mt=class{of(e){return new jt(this,e)}},Nt=class{constructor(e){this.map=e}of(e){return new I(this,e)}},I=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Nt(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};I.reconfigure=I.define(),I.appendConfig=I.define();var Pt=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&at(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};Pt.time=jt.define(),Pt.userEvent=jt.define(),Pt.addToHistory=jt.define(),Pt.remote=jt.define();function Ft(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r=e[r]))a=e[r++],o=e[r++];else if(i=0;n--){let i=r[n](e);e=i instanceof Pt?i:Array.isArray(i)&&i.length==1&&i[0]instanceof Pt?i[0]:Rt(t,Ht(i),!1)}return e}function Bt(e){let t=e.startState,n=t.facet(kt),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=It(r,Lt(t,a,e.changes.newLength),!0))}return r==e?e:Pt.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var Vt=[];function Ht(e){return e==null?Vt:Array.isArray(e)?e:[e]}var L=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(L||={}),Ut=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Wt;try{Wt=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function Gt(e){if(Wt)return Wt.test(e);for(let t=0;t`€`&&(n.toUpperCase()!=n.toLowerCase()||Ut.test(n)))return!0}return!1}function Kt(e){return t=>{if(!/\S/.test(t))return L.Space;if(Gt(t))return L.Word;for(let n=0;n-1)return L.Word;return L.Other}}var R=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;ei.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(I.reconfigure)?(n=null,r=e.value):e.is(I.appendConfig)&&(n=null,r=Ht(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=bt.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Tt)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:P.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=Ht(n.effects);for(let n=1;nn.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:P.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=bt.resolve(t.extensions||[],new Map),r=t.doc instanceof j?t.doc:j.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||Je)),i=t.selection?t.selection instanceof P?t.selection:P.single(t.selection.anchor,t.selection.head):P.single(0);return at(i,r.length),n.staticFacet(Tt)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||` +`}get readOnly(){return this.facet(At)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(wt))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return Kt(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=N(t,a,!1);if(i(t.slice(e,a))!=L.Word)break;a=e}for(;oe.length?e[0]:4}),R.lineSeparator=Et,R.readOnly=At,R.phrases=F.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),R.languageData=wt,R.changeFilter=Dt,R.transactionFilter=Ot,R.transactionExtender=kt,vt.reconfigure=I.define();function qt(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(a!==i&&i!==void 0){if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var Jt=class{eq(e){return this==e}range(e,t=e){return Xt.create(e,t,this)}};Jt.prototype.startSide=Jt.prototype.endSide=0,Jt.prototype.point=!1,Jt.prototype.mapMode=Ye.TrackDel;function Yt(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var Xt=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function Zt(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var Qt=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return $t(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);ih||m==h&&d.startSide>0&&d.endSide<=0)continue;if(!((h-m||d.endSide-d.startSide)<0)){if(l<0&&(l=m),d.point&&(u=Math.max(u,h-m)),(m-r||d.startSide-i)>=0)o.push(d),s.push(m-l),c.push(h-l),r=h,i=d.endSide;else{if(m==h){for(let e=o.length-1;e>0;e--)if((m-c[e-1]||d.startSide-o[e-1].endSide)<=0){o.splice(e,0,d),s.splice(e,0,m),c.splice(e,0,h);continue iter}}a(m,h,d)}}}return{mapped:o.length?new e(s,c,o,u):null,pos:l}}},z=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(Zt)),this.isEmpty)return n.length?e.of(n):this;let s=new rn(this,null,-1).goto(0),c=0,l=[],u=new tn;for(;s.value||c=0){let e=n[c++];u.addInner(e.from,e.to,e.value)||l.push(e)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||as.to||a{a||=new tn,a.add(e,t,n)};for(let e=0;e=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return an.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return an.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=nn(a,o,n),c=new sn(a,s,i),l=new sn(o,s,i);n.iterGaps((e,t,n)=>cn(c,e,l,t,n,r)),n.empty&&n.length==0&&cn(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=1e9-1;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=nn(i,a),s=new sn(i,o,0).goto(n),c=new sn(a,o,0).goto(n);for(;;){if(s.to!=c.to||!ln(s.active,c.active)||s.point&&(!c.point||!Yt(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new sn(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFromo&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new tn;for(let r of e instanceof Xt?[e]:t?en(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=$t(t);for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};z.empty=new z([],[],null,-1);function $t(e){return e[e.length-1]}function en(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(Zt);t=r}return e}z.empty.nextLayer=z.empty;var tn=class e{finishChunk(e){this.chunks.push(new Qt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||=new e).add(t,n,r)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(z.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=z.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function nn(e,t,n){let r=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new rn(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)on(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)on(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),on(this.heap,0)}}};function on(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var sn=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=an.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){un(this.active,e),un(this.activeTo,e),un(this.activeRank,e),this.minActive=fn(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t0;)t++;dn(this.active,t,n),dn(this.activeTo,t,r),dn(this.activeRank,t,i),e&&dn(e,t,this.cursor.from),this.minActive=fn(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&un(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[t]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function cn(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&Yt(e.point,n.point)&&ln(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&a.boundChange(s),d>s&&!ln(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&do)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function ln(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function fn(e,t){let n=-1,r=1e9;for(let i=0;i=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=N(e,r)}return r===!0?-1:e.length}for(var hn=`ͼ`,gn=typeof Symbol>`u`?`__ͼ`:Symbol.for(hn),_n=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),vn=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},yn=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=vn[gn]||1;return vn[gn]=e+1,hn+e.toString(36)}static mount(e,t,n){let r=e[_n],i=n&&n.nonce;r?i&&r.setNonce(i):r=new xn(e,i),r.mount(Array.isArray(t)?t:[t],e)}},bn=new Map,xn=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=bn.get(n);if(t)return e[_n]=t;this.sheet=new r.CSSStyleSheet,bn.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[_n]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},wn=typeof navigator<`u`&&/Mac/.test(navigator.platform),Tn=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),En=0;En<10;En++)Sn[48+En]=Sn[96+En]=String(En);for(var En=1;En<=24;En++)Sn[En+111]=`F`+En;for(var En=65;En<=90;En++)Sn[En]=String.fromCharCode(En+32),Cn[En]=String.fromCharCode(En);for(var Dn in Sn)Cn.hasOwnProperty(Dn)||(Cn[Dn]=Sn[Dn]);function On(e){var t=!(wn&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Tn&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?Cn:Sn)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}function B(){var e=arguments[0];typeof e==`string`&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n==`object`&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i==`string`?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t2),V={mac:Bn||/Mac/.test(An.platform),windows:/Win/.test(An.platform),linux:/Linux|X11/.test(An.platform),ie:Fn,ie_version:Nn?jn.documentMode||6:Pn?+Pn[1]:Mn?+Mn[1]:0,gecko:In,gecko_version:In?+(/Firefox\/(\d+)/.exec(An.userAgent)||[0,0])[1]:0,chrome:!!Ln,chrome_version:Ln?+Ln[1]:0,ios:Bn,android:/Android\b/.test(An.userAgent),webkit:Rn,webkit_version:Rn?+(/\bAppleWebKit\/(\d+)/.exec(An.userAgent)||[0,0])[1]:0,safari:zn,safari_version:zn?+(/\bVersion\/(\d+(\.\d+)?)/.exec(An.userAgent)||[0,0])[1]:0,tabSize:jn.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function Vn(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var Hn=Object.create(null);function Un(e,t,n){if(e==t)return!0;e||=Hn,t||=Hn;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function Wn(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function Gn(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function Kn(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:t>0?1e8:-1e8,new Zn(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=Qn(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new Zn(e,n,r,t,e.widget||null,!0)}static line(e){return new Xn(e)}static set(e,t=!1){return z.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};H.none=z.empty;var Yn=class e extends H{constructor(e){let{start:t,end:n}=Qn(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?Vn(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Hn}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&Un(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};Yn.prototype.point=!1;var Xn=class e extends H{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&Un(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};Xn.prototype.mapMode=Ye.TrackBefore,Xn.prototype.point=!0;var Zn=class e extends H{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?Ye.TrackBefore:Ye.TrackAfter:Ye.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?Jn.WidgetBefore:Jn.WidgetAfter:Jn.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&$n(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};Zn.prototype.point=!0;function Qn(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function $n(e,t){return e==t||!!(e&&t&&e.compare(t))}function er(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var tr=class e extends Jt{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&Un(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||Hn,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return z.of(e,t)}};tr.prototype.startSide=tr.prototype.endSide=-1;function nr(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function rr(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function ir(e,t){if(!t.anchorNode)return!1;try{return rr(e,t.anchorNode)}catch{return!1}}function ar(e){return e.nodeType==3?Sr(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function or(e,t,n,r){return n?lr(e,t,n,r,-1)||lr(e,t,n,r,1):!1}function sr(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function cr(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function lr(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:ur(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=sr(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?ur(e):0}else return!1}}function ur(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function dr(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function fr(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function pr(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function mr(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=fr(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=pr(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right-a&&(h=t.right-e.right+a,n<0&&t.lefte.bottom||t.lefte.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function hr(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var gr=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?ur(t):0),n,Math.min(e.focusOffset,n?ur(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}};function _r(e){let t=[];for(let n=e;n;n=n.nodeType==11?n.host:n.parentNode)n.nodeType==1&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function vr(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}var yr=null;V.safari&&V.safari_version>=26&&(yr=!1);function br(e){if(e.setActive)return e.setActive();if(yr)return e.focus(yr);let t=_r(e);e.focus(yr==null?{get preventScroll(){return yr={preventScroll:!0},!0}}:void 0),yr||(yr=!1,vr(t))}var xr;function Sr(e,t,n=t){let r=xr||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function Cr(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function wr(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function Tr(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,ur(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=ur(n))}else if(n==e)return!0;else r=sr(n),n=n.parentNode}function Er(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function Dr(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=ur(n)}else if(n.parentNode&&!cr(n))r=sr(n),n=n.parentNode;else return null}function Or(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.fromt))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function Br(e,t){if(e.length!=t.length)return!1;for(let n=0;n=0;e-=3)if(Ir[e+1]==-r){let n=Ir[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(W[t]=W[Ir[e]]=r),s=e;break}}else if(Ir.length==189)break;else Ir[s++]=t,Ir[s++]=n,Ir[s++]=c}else if((o=W[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=Ir[t+2];if(n&2)break;if(e)Ir[t+2]|=2;else{if(n&4)break;Ir[t+2]|=4}}}}}function Ur(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=ic;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),W[--t]=u;c=o}else a=o,c++}}}function Wr(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;cc&&o.push(new zr(c,m.from,f)),Gr(e,m.direction==Ar==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?W[p]!=s:W[p]==s))break;else p++;d?Wr(e,c,p,r+1,i,d,o):ct;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=W[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(W[e-1]==s)break run;else break}d?d.push(m):(m.toW.length;)W[W.length]=256;let r=[],i=t==Ar?0:1;return Gr(e,i,i,n,0,e.length,r),r}function qr(e){return[new zr(0,e,0)]}var Jr=``;function Yr(e,t,n,r,i){let a=r.head-e.from,o=zr.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=N(e.text,a,s.forward(i,n));(ls.to)&&(l=c),Jr=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!ie.some(e=>e)}),si=F.define({combine:e=>e.some(e=>e)}),ci=F.define(),li=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(P.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},ui=I.define({map:(e,t)=>e.map(t)}),di=I.define();function fi(e,t,n){let r=e.facet(ei);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var pi=F.define({combine:e=>!e.length||e[0]}),mi=0,hi=F.define({combine(e){return e.filter((t,n)=>{for(let r=0;r{let t=[];return o&&t.push(yi.of(t=>{let n=t.plugin(e);return n?o(n):H.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},gi=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){fi(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(fi(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){fi(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},_i=F.define(),vi=F.define(),yi=F.define(),bi=F.define(),xi=F.define(),Si=F.define(),Ci=F.define();function wi(e,t){let n=e.state.facet(Ci);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return z.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=Xr(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var Ti=F.define();function Ei(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(Ti)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var Di=F.define(),Oi=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAr.push(new Oi(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Ai=[],K=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Ai}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&Wn(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=sr(this.dom),r=this.length?e>0:t>0;return new kr(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Ni)return e;return null}static get(e){return e.cmTile}},ji=class extends K{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=Mi(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=Mi(r);this.length=a}};function Mi(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var Ni=class extends ji{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=K.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof Pi)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(se||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},Pi=class e extends ji{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},Fi=class e extends ji{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0&&!(a.flags&32)||n&&Li(a,d)))&&(f>c||d.flags&32&&t<=1)?(a=d,o=c-u):(u=-1)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):Ii(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new kr(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new kr(e.dom,0);e==n.tile&&(a=!0)}}return new kr(this.dom,0)}};function Ii(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=ar(t);return n[n.length-1]||null}function Li(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.topr&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?V.chrome||V.gecko||(e?(i--,o=1):a=0)?0:s.length-1];return V.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:dr(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},Bi=class e extends K{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return dr(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top0==n)}},Hi=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){let t=r.length;if(i0?s.length<=e:s.length=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof Ri&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(ea(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=K.get(n.dom);e&&e.setDOM(ea(n.dom))}let e=Ri.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=K.get(e.text);i&&this.cache.reused.set(i,2);let a=new zi(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=Zi;let n=Fi.start(e,t||this.cache.find(Fi)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof Ri&&a.mark.eq(i))n=a,t--;else{let e=Ri.of(i,this.cache.find(Ri,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Yi(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(V.ios&&Yi(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(na,0,32)||new Bi(na.toDOM(),0,na,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to=this.pos){let t=e.rank*102+e.value.rank,n=new Ui(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.frome.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(Vi,void 0,1);return n&&(n.flags=t),n||new Vi(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},Gi=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},Ki=[Bi,Fi,zi,Ri,Vi,Pi,Ni];for(let e=0;e[]),this.index=Ki.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=ar){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA{if(e.isWidget()){if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof Ri&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof Ri&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=z.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof Zn){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?ta.block:ta.inline),c=Xi(a),l=this.cache.findWidget(i,t-e,c)||Bi.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=Qi(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=K.get(r);if(r==this.view.contentDOM)break;e instanceof Ri?t.push(e):e?.isLine()?n=e:e instanceof Pi||(r.nodeName==`DIV`&&!n&&r!=this.view.contentDOM?n=new Fi(r,Zi):n||t.push(Ri.of(new Yn({tagName:r.nodeName.toLowerCase(),attributes:Kn(r)}),r)))}return{line:n,marks:t}}};function Yi(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function Xi(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var Zi={class:`cm-line`};function Qi(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&Vn(n,e),r&&(e.class+=` `+r),e)}function $i(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof Ri&&t.push(r.mark)}return t}function ea(e){let t=K.get(e);return t&&t.setDOM(e.cloneNode()),e}var ta=class extends qn{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};ta.inline=new ta(`span`),ta.block=new ta(`div`);var na=new class extends qn{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},ra=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=H.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Ni(e,e.contentDOM),this.updateInner([new Oi(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>tthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!ma(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?sa(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new Oi(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(V.ie||V.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=ua(i,this.decorations,e.changes);o.length&&(t=Oi.extendWithRanges(t,o));let s=fa(a,this.blockWrappers,e.changes);return s.length&&(t=Oi.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new Ji(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&K.get(t.text)&&r.cache.reused.set(K.get(t.text),2),this.tile=r.run(e,t),ia(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=V.chrome||V.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to-1)&&ir(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),V.gecko&&s.empty&&!this.hasComposition&&aa(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new kr(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!or(c.node,c.offset,u.anchorNode,u.anchorOffset)||!or(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{V.android&&V.chrome&&n.contains(u.focusNode)&&pa(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=nr(this.view.root);if(e){if(s.empty){if(V.gecko){let e=ca(c.node,c.offset);if(e&&e!=3){let t=(e==1?Dr:Or)(c.node,c.offset);t&&(c=new kr(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new kr(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new kr(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&or(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=nr(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=ur(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!K.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof ha?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&tMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==U.LTR,c=0,l=(e,u,d)=>{for(let f=0;fr);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof Pi)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?ar(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?U.RTL:U.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=ar(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=ar(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(H.replace({widget:new ha(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return H.set(e)}updateDeco(){let e=1,t=this.view.state.facet(yi).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(xi).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(z.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];etypeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(ci))try{if(t(this.view,e.range,e))return!0}catch(e){fi(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=Ei(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(mr(this.view.scrollDOM,a,t.head1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottome.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){ia(this.tile)}};function ia(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)ia(n,t)}}function aa(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function oa(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=Dr(n.focusNode,n.focusOffset),i=Or(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=K.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=K.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function sa(e,t,n){let r=oa(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new Oi(c.mapPos(a),c.mapPos(o),a,o),text:i}}function ca(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t{et.from&&(n=!0)}),n}var ha=class extends qn{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function ga(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return P.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=N(i.text,a,!1):s=N(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=N(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;se.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+mn(o,a,e.state.tabSize)}function va(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.tot)return i;(!e||i.type==Jn.Text&&(e.type!=i.type||(n<0?i.fromt)))&&(e=i)}}return e||r}return r}function ya(e,t,n,r){let i=va(e,t.head,t.assoc||-1),a=!r||i.type!=Jn.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==U.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return P.cursor(o,n?-1:1)}return P.cursor(n?i.to:i.from,n?-1:1)}function ba(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=Yr(i,a,o,s,n),l=Jr;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=` +`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function xa(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==L.Space&&(i=t),i==t}}function Sa(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return P.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=Da(e,{x:d,y:r},!1,a);if(n?r>c.bottom:rs:u{if(t>e&&tt(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:P.cursor(r,re.viewState.docHeight)return new Ea(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==Jn.Text){if(r<0?l.toe.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==Jn.Text){let t=_a(e,i,l,o,s);return new Ea(t,t==l.from?1:-1)}}if(l.type!=Jn.Text)return c<(l.top+l.bottom)/2?new Ea(l.from,1):new Ea(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new Oa(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var Oa=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from>1;adjust:if(a.has(f)){for(let e=1;e=i&&(t-=n),!a.has(t)){f=t;break adjust}}break search}a.add(f);let p=t(f),m=0;if(p)for(let e=0;e1)){if(t.bottomthis.y)(!c||c.top>t.top)&&(c=t),m=-1;else{let e=t.left>this.x?this.x-t.left:t.right(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==U.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r{let i=n[r]-t,a=n[r+1]-t;return Sr(e.dom,i,a).getClientRects()});return r.after?new Ea(n[r.i+1],-1):new Ea(n[r.i],1)}scanTile(e,t){if(!e.length)return new Ea(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:Sr(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Ea(n[r.i+1],-1):new Ea(a,1)}},ka=`￿`,Aa=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(R.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ka}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=K.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=K.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:cr(r))||cr(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!Ma(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=K.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(ja(e,n.node,n.offset)?t:0))}};function ja(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=Fa(e.docView.tile,t,n,0))){let t=i||a?[]:Ba(e),n=new Aa(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=Va(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!rr(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!rr(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((V.ios||V.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to-1&&o.ranges.length>1)this.newSel=o.replaceRange(P.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=P.create([P.cursor(n,r)])}else this.newSel=P.single(r,n)}}};function Fa(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;cn)return Fa(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o=0?e.children[o].dom:null}}return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function Ia(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||V.android&&t.text.length=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:j.of(t.text.slice(a.from-e,u).split(ka))}:(d=za(l,t.text,s-e,c))&&(V.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==`￿￿`&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:j.of(t.text.slice(d.from,d.toB).split(ka))})}else r&&(!e.hasFocus&&i.facet(pi)||Ha(r,a))&&(r=null);if(!n&&!r)return!1;if((V.mac||V.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=P.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:j.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).toDate.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:V.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==` + `&&e.lineWrapping&&(r&&=P.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:j.of([` `])}),n)return La(e,n,r,o);if(r&&!Ha(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=wa(i.facet(Si).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function La(e,t,n,r=-1){if(V.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(V.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&Cr(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.lengthi.head)&&Cr(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&Cr(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=Ra(e,t,n);return e.state.facet(ni).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function Ra(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.froma.to){let n=t.fromt(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:P.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.fromt.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&oa(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?P.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function za(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function Ba(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new Na(n,r)),(i!=n||a!=r)&&t.push(new Na(i,a))),t}function Va(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?P.single(n+t,r+t):null}function Ha(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var Ua=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,V.safari&&e.contentDOM.addEventListener(`input`,()=>null),V.gecko&&Do(e.contentDOM.ownerDocument)}handleEvent(e){ro(this.view,e)&&!this.ignoreDuringComposition(e)&&(e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e))))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Ka(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Ya.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),V.android&&V.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(V.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(qa.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||Ja.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return t.shiftKey&&V.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&Wa(this.view.win)&&(t.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t},setTimeout(()=>this.flushIOSKey(),50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||this.view.observer.pendingRecords().length||t.key==`Enter`&&e&&e.from0?!0:V.safari&&!V.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function Wa(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function Ga(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){fi(n.state,e)}}}function Ka(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(Ga(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(Ga(t.value,r))}}for(let e in io)n(e).handlers.push(io[e]);for(let e in ao)n(e).observers.push(ao[e]);return t}var qa=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],Ja=`dthko`,Ya=[16,17,18,20,91,92,224,225],Xa=6;function Za(e){return Math.max(0,e)*.7+8}function Qa(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var $a=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=hr(e.contentDOM),this.atoms=e.state.facet(Si).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(R.allowMultipleSelections)&&eo(e,t),this.dragging=no(e,t)&&go(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Qa(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=Ei(this.view);e.clientX-s.left<=r+Xa?t=-Za(r-e.clientX):e.clientX+s.right>=a-Xa&&(t=Za(e.clientX-a)),e.clientY-s.top<=i+Xa?n=-Za(i-e.clientY):e.clientY+s.bottom>=o-Xa&&(n=Za(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=wa(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function eo(e,t){let n=e.state.facet(Zr);return n.length?n[0](t):V.mac?t.metaKey:t.ctrlKey}function to(e,t){let n=e.state.facet(Qr);return n.length?n[0](t):V.mac?!t.altKey:!t.ctrlKey}function no(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=nr(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function ro(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=K.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var io=Object.create(null),ao=Object.create(null),oo=V.ie&&V.ie_version<15||V.ios&&V.webkit_version<604;function so(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),lo(e,n.value)},50)}function co(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function lo(e,t){t=co(e.state,ii,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(So!=null&&n.selection.ranges.every(e=>e.empty)&&So==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:P.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:P.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}ao.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,V.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},ao.wheel=ao.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},io.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),ao.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},ao.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},ao.touchend=(e,t)=>{e.inputState.touchActive=!1},io.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet($r))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=_o(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new $a(e,t,n,r)),r&&e.observer.ignore(()=>{br(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function uo(e,t,n,r){if(r==1)return P.cursor(t,n);if(r==2)return ga(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return oDate.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(mo+1)%3:1}function _o(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=go(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=uo(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=uo(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i1&&(c=vo(i,s.pos))?c:o?i.addRange(l):P.create([l])}}}function vo(e,t){for(let n=0;n=t)return P.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}io.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=P.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,co(e.state,ai,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},io.dragend=e=>(e.inputState.draggedContent=null,!1);function yo(e,t,n,r){if(n=co(e.state,ii,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&to(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}io.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&yo(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData(`Text`);if(n)return yo(e,t,n,!0),!0}return!1},io.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=oo?null:t.clipboardData;return n?(lo(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(so(e),!1)};function bo(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function xo(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:co(e,ai,t.join(e.lineBreak)),ranges:n,linewise:r}}var So=null;io.copy=io.cut=(e,t)=>{if(!ir(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=xo(e.state);if(!n&&!i)return!1;So=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=oo?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(bo(e,n),!1)};var Co=jt.define();function wo(e,t){let n=[];for(let r of e.facet(ri)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:Co.of(!0)}):null}function To(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=wo(e.state,t);n?e.dispatch(n):e.update([])}},10)}ao.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),To(e)},ao.blur=e=>{e.observer.clearSelectionRange(),To(e)},ao.compositionstart=ao.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},ao.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,V.chrome&&V.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},ao.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},io.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return La(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(V.chrome&&V.android&&(n=qa.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return V.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),V.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>ao.compositionend(e,t),20),!1};var Eo=new Set;function Do(e){Eo.has(e)||(Eo.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var Oo=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],ko=!1;function Ao(){ko=!1}var jo=class{constructor(e){this.lineWrapping=e,this.doc=j.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Oo.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Po&&(ko=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,q.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,q.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,sa*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break}else if(i=i&&a(this.lineAt(0,q.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},zo=class e extends Ro{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new No(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof Bo&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Bo?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):Fo.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},Bo=class e extends Fo{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return Fo.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=Po&&(s=-2);let c=new zo(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=Fo.of(r);return(s<0||Math.abs(c.height-this.height)>=Po||Math.abs(s-this.heightMetrics(t,n).perLine)>=Po)&&(ko=!0),Io(this,c)}return(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}},Vo=class extends Fo{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return eo))return c;let l=t==q.ByPosNoHeight?q.ByPosNoHeight:q.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,q.ByPos,n,r,i);e=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&Ho(i,a-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?Fo.of(this.break?[e,null,t]:[e,t]):(this.left=Io(this.left,e),this.right=Io(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function Ho(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof Bo&&(r=e[t+1])instanceof Bo&&e.splice(t-1,3,new Bo(n.length+1+r.length))}var Uo=5,Wo=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof zo?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new zo(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=Uo)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new zo(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new Bo(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof zo)return e;let t=new zo(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof zo)&&!this.isCovered?this.nodes.push(new zo(0,-1,0)):(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function Jo(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left0&&t.top0}function Yo(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var Xo=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;ntypeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new jo(n),this.stateDeco=as(t),this.heightMap=Fo.empty().applyChanges(this.stateDeco,j.empty,this.heightOracle.setDoc(t.doc),[new Oi(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=H.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new $o(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?is:new os(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ss(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=as(this.state);let r=e.changedRanges,i=Oi.extendWithRanges(r,Go(n,this.stateDeco,e?e.changes:Ze.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Ao(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||ko)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heads.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(si)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?U.RTL:U.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=pr(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=hr(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=Er(this.scrollParent||e.win);let m=(this.printing?Yo:qo)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!Jo(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),Ao();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?Fo.empty().applyChanges(this.stateDeco,j.empty,this.heightOracle,[new Oi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new Mo(n.from,i))}ko&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new $o(r.lineAt(a-n*1e3,q.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,q.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(es.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,q.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e=o+Math.max(10,Math.min(n,250)))&&r>a-2e3&&i>1,a=r<<1;if(this.defaultTextDirection!=U.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-rr&&ee.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)e.fromt));if(!f){if(ae.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(P.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new Xo(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length2e6)for(let n of e)n.from>=t.from&&n.fromt.from&&s(t.from,c,t,i),le.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];z.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ss(this.heightMap.lineAt(e,q.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||ss(this.heightMap.lineAt(this.scaler.fromDOM(e),q.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return ss(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},$o=class{constructor(e,t){this.from=e,this.to=t}};function es(e,t,n){let r=[],i=e,a=0;return z.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function ns(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function rs(e,t){for(let n of e)if(t(n))return n}var is={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function as(e){let t=e.facet(yi).filter(e=>typeof e!=`function`),n=e.facet(xi).filter(e=>typeof e!=`function`);return n.length&&t.push(z.join(n)),t}var os=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,q.ByPos,e,0,0).top,o=t.lineAt(i,q.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=te.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function ss(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new No(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>ss(e,t)):e._content)}var cs=F.define({combine:e=>e.join(` `)}),ls=F.define({combine:e=>e.indexOf(!0)>-1}),us=yn.newName(),ds=yn.newName(),fs=yn.newName(),ps={"&light":`.`+ds,"&dark":`.`+fs};function ms(e,t,n){return new yn(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var hs=ms(`.`+us,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},".cm-panels-top":{top:`0`},".cm-panels-bottom":{bottom:`0`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{background:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat`,backgroundSize:`.4em`,backgroundPosition:`calc(min(50%, 0px)) center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},ps),gs={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},_s=V.ie&&V.ie_version<=11,vs=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new gr,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(V.ie&&V.ie_version<=11||V.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&V.android&&e.constructor.EDIT_CONTEXT!==!1&&!(V.chrome&&V.chrome_version<126)&&(this.editContext=new Ss(e),e.state.facet(pi)&&(e.contentDOM.editContext=this.editContext.editContext)),_s&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type!=`change`&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(pi)?n.root.activeElement!=this.dom:!ir(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(V.ie&&V.ie_version<=11||V.android&&V.chrome)&&!n.state.selection.main.empty&&r.focusNode&&or(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=nr(e.root);if(!t)return!1;let n=V.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&xs(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=ir(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Cr(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&ir(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Pa(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=Ia(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!Ha(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=ys(t,e.previousSibling||e.target.previousSibling,-1),r=ys(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return e.type==`characterData`?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(pi)!=e.state.facet(pi)&&(e.view.contentDOM.editContext=e.state.facet(pi)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function ys(e,t,n){for(;t;){let r=K.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function bs(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return or(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function xs(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return bs(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?bs(e,n):null}var Ss=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&ithis.to&&(s=i);let l=za(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=P.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));Ha(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:j.of(n.text.slice(l.from,l.toB).split(` +`))};if((V.mac||V.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:j.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);La(e,u,P.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=nr(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to){if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}r=null,this.revertPending(e.state)}if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(ithis.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},J=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||wr(e.parent)||document,this.viewState=new Qo(this,e.state||R.create(e)),e.scrollTo&&e.scrollTo.is(ui)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(hi).map(e=>new gi(e));for(let e of this.plugins)e.update(this);this.observer=new vs(this),this.inputState=new Ua(this),this.inputState.ensureHandlers(this.plugins),this.docView=new ra(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Pt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(Co))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=wo(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(R.phrases)!=this.state.facet(R.phrases))return this.setState(a);i=ki.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new li(t.empty?t:P.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(ui)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Ts.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Di)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(cs)!=i.state.facet(cs)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(ti))try{e(i)}catch(e){fi(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Ia(this,u)&&l.force&&Cr(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new Qo(this,e),this.plugins=e.facet(hi).map(e=>new gi(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new ra(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(hi),n=e.state.facet(hi);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new gi(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a,scaleY:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0){if(Er(n||this.win))i=-1,a=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}o=this.viewState.scaleY}this.updateState=1;let s=this.viewState.measure();if(!s&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let c=[];s&4||([this.measureRequests,c]=[c,this.measureRequests]);let l=c.map(e=>{try{return e.read(this)}catch(e){return fi(this.state,e),ws}}),u=ki.create(this,this.state,[]),d=!1;u.flags|=s,t?t.flags|=s:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let e=0;e1||e<-1)&&!(V.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(ti))e(t)}get themeClasses(){return us+` `+(this.state.facet(ls)?fs:ds)+` `+this.state.facet(cs)}updateAttrs(){let e=Es(this,_i,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(pi)?`true`:`false`,class:`cm-content`,style:`${V.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),Es(this,vi,t);let n=this.observer.ignore(()=>{let n=Gn(this.contentDOM,this.contentAttrs,t),r=Gn(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Di);let t=this.state.facet(e.cspNonce);yn.mount(this.root,this.styleModules.concat(hs).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tt.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Ta(this,e,ba(this,e,t,n))}moveByGroup(e,t){return Ta(this,e,ba(this,e,t,t=>xa(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return P.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return ya(this,e,t,n)}moveVertically(e,t,n){return Ta(this,e,Sa(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Da(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Da(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[zr.find(r,e-n.from,-1,t)];return this.docView.coordsAt(e,t,i.dir==U.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(oi)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Cs)return qr(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||Br(r.isolates,n=wi(this,e))))return r.order;n||=wi(this,e);let r=Kr(e.text,t,n);return this.bidiCache.push(new Ts(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||V.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{br(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return ui.of(new li(typeof e==`number`?P.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return ui.of(new li(P.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return G.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return G.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=yn.newName(),r=[cs.of(n),Di.of(ms(`.${n}`,e))];return t&&t.dark&&r.push(ls.of(!0)),r}static baseTheme(e){return gt.lowest(Di.of(ms(`.`+us,e,ps)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&K.get(t)||K.get(e))?.root?.view||null}};J.styleModule=Di,J.inputHandler=ni,J.clipboardInputFilter=ii,J.clipboardOutputFilter=ai,J.scrollHandler=ci,J.focusChangeEffect=ri,J.perLineTextDirection=oi,J.exceptionSink=ei,J.updateListener=ti,J.editable=pi,J.mouseSelectionStyle=$r,J.dragMovesSelection=Qr,J.clickAddsSelectionRange=Zr,J.decorations=yi,J.blockWrappers=bi,J.outerDecorations=xi,J.atomicRanges=Si,J.bidiIsolatedRanges=Ci,J.cursorScrollMargin=F.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),J.scrollMargins=Ti,J.darkTheme=ls,J.cspNonce=F.define({combine:e=>e.length?e[0]:``}),J.contentAttributes=vi,J.editorAttributes=_i,J.lineWrapping=J.contentAttributes.of({class:`cm-lineWrapping`}),J.announce=I.define();var Cs=4096,ws={},Ts=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:U.LTR;for(let a=Math.max(0,t.length-10);a=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&Vn(a,n)}return n}var Ds=V.mac?`mac`:V.windows?`win`:V.linux?`linux`:`key`;function Os(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;ee.concat(t),[]))),n}function Ps(e,t,n){return zs(Ns(e.state),t,e,n)}var Fs=null,Is=4e3;function Ls(e,t=Ds){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>Os(e,t));for(let t=1;t{let r=Fs={view:t,prefix:n,scope:e};return setTimeout(()=>{Fs==r&&(Fs=null)},Is),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,Rs))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var Rs=null;function zs(e,t,n,r){Rs=t;let i=On(t),a=qe(Ge(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;Fs&&Fs.view==n&&Fs.scope==r&&(o=Fs.prefix+` `,Ya.indexOf(t.keyCode)<0&&(c=!0,Fs=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+ks(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(V.windows&&t.ctrlKey&&t.altKey)&&!(V.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=Sn[t.keyCode])&&p!=i?(d(f[o+ks(p,t,!0)])||t.shiftKey&&(m=Cn[t.keyCode])!=i&&m!=p&&d(f[o+ks(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+ks(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),Rs=null,s}var Bs=class e{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement(`div`);return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+`px`,e.style.top=this.top+`px`,this.width!=null&&(e.style.width=this.width+`px`),e.style.height=this.height+`px`}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(t,n,r){if(r.empty){let i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let a=Vs(t);return[new e(n,i.left-a.left,i.top-a.top,null,i.bottom-i.top)]}return Us(t,n,r)}};function Vs(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==U.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function Hs(e,t,n,r){let i=e.coordsAtPos(t,n*2);if(!i)return r;let a=e.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,s=e.posAtCoords({x:a.left+1,y:o}),c=e.posAtCoords({x:a.right-1,y:o});return s==null||c==null?r:{from:Math.max(r.from,Math.min(s,c)),to:Math.min(r.to,Math.max(s,c))}}function Us(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),a=e.textDirection==U.LTR,o=e.contentDOM,s=o.getBoundingClientRect(),c=Vs(e),l=o.querySelector(`.cm-line`),u=l&&window.getComputedStyle(l),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),p=va(e,r,1),m=va(e,i,-1),h=p.type==Jn.Text?p:null,g=m.type==Jn.Text?m:null;if(h&&(e.lineWrapping||p.widgetLineBreaks)&&(h=Hs(e,r,1,h)),g&&(e.lineWrapping||m.widgetLineBreaks)&&(g=Hs(e,i,-1,g)),h&&g&&h.from==g.from&&h.to==g.to)return v(y(n.from,n.to,h));{let t=h?y(n.from,null,h):b(p,!1),r=g?y(null,n.to,g):b(m,!0),i=[];return(h||p).to<(g||m).from-(h&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2l&&r.from=a)break;s>i&&c(Math.max(e,i),t==null&&e<=l,Math.min(s,a),n==null&&s>=u,o.dir)}if(i=r.to+1,i>=a)break}return s.length==0&&c(l,t==null,u,n==null,e.textDirection),{top:i,bottom:o,horizontal:s}}function b(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}function Ws(e,t){return e.constructor==t.constructor&&e.eq(t)}var Gs=class{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement(`div`)),this.dom.classList.add(`cm-layer`),t.above&&this.dom.classList.add(`cm-layer-above`),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute(`aria-hidden`,`true`),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Ks)!=e.state.facet(Ks)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(Ks);for(;t!Ws(e,this.drawn[t]))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,V.webkit&&(this.dom.style.display=this.dom.firstChild?``:`none`)}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},Ks=F.define();function qs(e){return[G.define(t=>new Gs(t,e)),Ks.of(e)]}var Js=F.define({combine(e){return qt(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Ys(e={}){return[Js.of(e),Zs,$s,tc,si.of(!0)]}function Xs(e){return e.startState.facet(Js)!=e.state.facet(Js)}var Zs=qs({above:!0,markers(e){let{state:t}=e,n=t.facet(Js),r=[];for(let i of t.selection.ranges){let a=i==t.selection.main;if(i.empty||n.drawRangeCursor&&!(a&&V.ios&&n.iosSelectionHandles)){let t=a?`cm-cursor cm-cursor-primary`:`cm-cursor cm-cursor-secondary`,n=i.empty?i:P.cursor(i.head,i.assoc);for(let i of Bs.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName=t.style.animationName==`cm-blink`?`cm-blink2`:`cm-blink`);let n=Xs(e);return n&&Qs(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){Qs(t.state,e)},class:`cm-cursorLayer`});function Qs(e,t){t.style.animationDuration=e.facet(Js).cursorBlinkRate+`ms`}var $s=qs({above:!1,markers(e){let t=[],{main:n,ranges:r}=e.state.selection;for(let n of r)if(!n.empty)for(let r of Bs.forRange(e,`cm-selectionBackground`,n))t.push(r);if(V.ios&&!n.empty&&e.state.facet(Js).iosSelectionHandles){for(let r of Bs.forRange(e,`cm-selectionHandle cm-selectionHandle-start`,P.cursor(n.from,1)))t.push(r);for(let r of Bs.forRange(e,`cm-selectionHandle cm-selectionHandle-end`,P.cursor(n.to,1)))t.push(r)}return t},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||Xs(e)},class:`cm-selectionLayer`}),ec=V.gecko&&V.gecko_version==153?`#ffffff01`:`transparent`,tc=gt.highest(J.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:`${ec} !important`},caretColor:`transparent !important`},".cm-content":{caretColor:`transparent !important`,"& :focus":{caretColor:`initial !important`,"&::selection, & ::selection":{backgroundColor:`Highlight !important`}}}})),nc=I.define({map(e,t){return e==null?null:t.mapPos(e)}}),rc=pt.define({create(){return null},update(e,t){return e!=null&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(nc)?t.value:e,e)}}),ic=G.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(rc);n==null?this.cursor!=null&&((t=this.cursor)==null||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement(`div`)),this.cursor.className=`cm-dropCursor`),(e.startState.field(rc)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(rc),n=t!=null&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+`px`,this.cursor.style.top=e.top/n+`px`,this.cursor.style.height=e.height/n+`px`):this.cursor.style.left=`-100000px`}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(rc)!=e&&this.view.dispatch({effects:nc.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){(e.target==this.view.contentDOM||!this.view.contentDOM.contains(e.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function ac(){return[rc,ic]}function oc(e,t,n,r,i){t.lastIndex=0;for(let a=e.iterRange(n,r),o=n,s;!a.next().done;o+=a.value.length)if(!a.lineBreak)for(;s=t.exec(a.value);)i(o+s.index,s)}function sc(e,t){let n=e.visibleRanges;if(n.length==1&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:a}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),a=Math.min(e.state.doc.lineAt(a).to,a+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=a:r.push({from:i,to:a});return r}var cc=class{constructor(e){let{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:a=1e3}=e;if(!t.global)throw RangeError(`The regular expression given to MatchDecorator should have its 'g' flag set`);if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if(typeof n==`function`)this.addMatch=(e,t,r,i)=>{let a=n(e,t,r);a&&i(r,r+e[0].length,a)};else if(n)this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n);else throw RangeError(`Either 'decorate' or 'decoration' should be provided to MatchDecorator`);this.boundary=i,this.maxLength=a}createDeco(e){let t=new tn,n=t.add.bind(t);for(let{from:t,to:r}of sc(e,this.maxLength))oc(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((t,i,a,o)=>{o>=e.view.viewport.from&&a<=e.view.viewport.to&&(n=Math.min(a,n),r=Math.max(o,r))}),e.viewportMoved||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let a=Math.max(i.from,n),o=Math.min(i.to,r);if(o>=a){let n=e.state.doc.lineAt(a),r=n.ton.from;a--)if(this.boundary.test(n.text[a-1-n.from])){s=a;break}for(;ol.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=s-n.from;(u=this.regexp.exec(n.text))&&u.indexthis.addMatch(n,e,t,d));t=t.update({filterFrom:s,filterTo:c,filter:(e,t)=>ec,add:l})}}return t}},lc=/x/.unicode==null?`g`:`gu`,uc=RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩-]`,lc),dc={0:`null`,7:`bell`,8:`backspace`,10:`newline`,11:`vertical tab`,13:`carriage return`,27:`escape`,8203:`zero width space`,8204:`zero width non-joiner`,8205:`zero width joiner`,8206:`left-to-right mark`,8207:`right-to-left mark`,8232:`line separator`,8237:`left-to-right override`,8238:`right-to-left override`,8294:`left-to-right isolate`,8295:`right-to-left isolate`,8297:`pop directional isolate`,8233:`paragraph separator`,65279:`zero width no-break space`,65532:`object replacement`},fc=null;function pc(){if(fc==null&&typeof document<`u`&&document.body){let e=document.body.style;fc=(e.tabSize??e.MozTabSize)!=null}return fc||!1}var mc=F.define({combine(e){let t=qt(e,{render:null,specialChars:uc,addSpecialChars:null});return(t.replaceTabs=!pc())&&(t.specialChars=RegExp(` |`+t.specialChars.source,lc)),t.addSpecialChars&&(t.specialChars=RegExp(t.specialChars.source+`|`+t.addSpecialChars.source,lc)),t}});function hc(e={}){return[mc.of(e),_c()]}var gc=null;function _c(){return gc||=G.fromClass(class{constructor(e){this.view=e,this.decorations=H.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(mc)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new cc({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,a=Ge(t[0],0);if(a==9){let e=i.lineAt(r),t=n.state.tabSize,a=pn(e.text,t,r-e.from);return H.replace({widget:new xc((t-a%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[a]||(this.decorationCache[a]=H.replace({widget:new bc(e,a)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(mc);e.startState.facet(mc)==t?this.decorations=this.decorator.updateDeco(e,this.decorations):(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view))}},{decorations:e=>e.decorations})}var vc=`•`;function yc(e){return e>=32?vc:e==10?`␤`:String.fromCharCode(9216+e)}var bc=class extends qn{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=yc(this.code),n=e.state.phrase(`Control character`)+` `+(dc[this.code]||`0x`+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let i=document.createElement(`span`);return i.textContent=t,i.title=n,i.setAttribute(`aria-label`,n),i.className=`cm-specialChar`,i}ignoreEvent(){return!1}},xc=class extends qn{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement(`span`);return e.textContent=` `,e.className=`cm-tab`,e.style.width=this.width+`px`,e}ignoreEvent(){return!1}};function Sc(){return wc}var Cc=H.line({class:`cm-activeLine`}),wc=G.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(Cc.range(i.from)),t=i.from)}return H.set(n)}},{decorations:e=>e.decorations}),Tc=class extends qn{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement(`span`);return t.className=`cm-placeholder`,t.style.pointerEvents=`none`,t.appendChild(typeof this.content==`string`?document.createTextNode(this.content):typeof this.content==`function`?this.content(e):this.content.cloneNode(!0)),t.setAttribute(`aria-hidden`,`true`),t}coordsAt(e){let t=e.firstChild?ar(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=dr(t[0],n.direction!=`rtl`),i=parseInt(n.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}};function Ec(e){let t=G.fromClass(class{constructor(t){this.view=t,this.placeholder=e?H.set([H.widget({widget:new Tc(e),side:1}).range(0)]):H.none}get decorations(){return this.view.state.doc.length?H.none:this.placeholder}},{decorations:e=>e.decorations});return typeof e==`string`?[t,J.contentAttributes.of({"aria-placeholder":e})]:t}var Dc=2e3;function Oc(e,t,n){let r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),a=[];if(t.off>Dc||n.off>Dc||t.col<0||n.col<0){let o=Math.min(t.off,n.off),s=Math.max(t.off,n.off);for(let t=r;t<=i;t++){let n=e.doc.line(t);n.length<=s&&a.push(P.range(n.from+o,n.to+s))}}else{let o=Math.min(t.col,n.col),s=Math.max(t.col,n.col);for(let t=r;t<=i;t++){let n=e.doc.line(t),r=mn(n.text,o,e.tabSize,!0);if(r<0)a.push(P.cursor(n.to));else{let t=mn(n.text,s,e.tabSize);a.push(P.range(n.from+r,n.from+t))}}}return a}function kc(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}function Ac(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,a=i>Dc?-1:i==r.length?kc(e,t.clientX):pn(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:a,off:i}}function jc(e,t){let n=Ac(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get(t,i,a){let o=Ac(e,t);if(!o)return r;let s=Oc(e.state,n,o);return s.length?a?P.create(s.concat(r.ranges)):P.create(s):r}}:null}function Mc(e){let t=e?.eventFilter||(e=>e.altKey&&e.button==0);return J.mouseSelectionStyle.of((e,n)=>t(n)?jc(e,n):null)}var Nc={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},Pc={style:`cursor: crosshair`};function Fc(e={}){let[t,n]=Nc[e.key||`Alt`],r=G.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){(e.keyCode==t||!n(e))&&this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,J.contentAttributes.of(e=>e.plugin(r)?.isDown?Pc:null)]}var Ic=`-10000px`,Lc=class{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let a=[],o=t?[]:null;for(let n=0;nt[n]=e),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=a,!0}};function Rc(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}var zc=F.define({combine:e=>({position:V.ios?`absolute`:e.find(e=>e.position)?.position||`fixed`,parent:e.find(e=>e.parent)?.parent||null,tooltipSpace:e.find(e=>e.tooltipSpace)?.tooltipSpace||Rc})}),Bc=new WeakMap,Vc=G.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(zc);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver==`function`?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Lc(e,Gc,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver=typeof IntersectionObserver==`function`?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener(`resize`,this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement(`div`),this.container.style.position=`relative`,this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(zc);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add(`cm-tooltip`),e.arrow&&!n.dom.querySelector(`.cm-tooltip > .cm-tooltip-arrow`)){let e=document.createElement(`div`);e.className=`cm-tooltip-arrow`,n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=Ic,n.dom.style.left=`0px`,this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener(`resize`,this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(e=t.destroy)==null||e.call(t);this.parent&&this.container.remove(),(t=this.resizeObserver)==null||t.disconnect(),(n=this.intersectionObserver)==null||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if(this.position==`fixed`&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(V.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(n||this.position==`absolute`){if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState)}let r=this.view.scrollDOM.getBoundingClientRect(),i=Ei(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(zc).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){if(e.makeAbsolute){this.madeAbsolute=!0,this.position=`absolute`;for(let e of this.manager.tooltipViews)e.dom.style.position=`absolute`}let{visible:t,space:n,scaleX:r,scaleY:i}=e,a=[];for(let o=0;o=Math.min(t.bottom,n.bottom)||u.rightMath.min(t.right,n.right)+.1)){l.style.top=Ic;continue}let f=s.arrow?c.dom.querySelector(`.cm-tooltip-arrow`):null,p=f?7:0,m=d.right-d.left,h=Bc.get(c)??d.bottom-d.top,g=c.offset||Wc,_=this.view.textDirection==U.LTR,v=d.width>n.right-n.left?_?n.left:n.right-d.width:_?Math.max(n.left,Math.min(u.left-(f?14:0)+g.x,n.right-m)):Math.min(Math.max(n.left,u.left-m+(f?14:0)-g.x),n.right-m),y=this.above[o];!s.strictSide&&(y?u.top-h-p-g.yn.bottom)&&y==n.bottom-u.bottom>u.top-n.top&&(y=this.above[o]=!y);let b=(y?u.top-n.top:n.bottom-u.bottom)-p;if(bv&&e.topx&&(x=y?e.top-h-2-p:e.bottom+p+2);if(this.position==`absolute`?(l.style.top=(x-e.parent.top)/i+`px`,Hc(l,(v-e.parent.left)/r)):(l.style.top=x/i+`px`,Hc(l,v/r)),f){let e=u.left+(_?g.x:-g.x)-(v+14-7);f.style.left=e/r+`px`}c.overlap!==!0&&a.push({left:v,top:x,right:S,bottom:x+h}),l.classList.toggle(`cm-tooltip-above`,y),l.classList.toggle(`cm-tooltip-below`,!y),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=Ic}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Hc(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+`px`)}var Uc=J.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:`border-box`},"&light .cm-tooltip":{border:`1px solid #bbb`,backgroundColor:`#f5f5f5`},"&light .cm-tooltip-section:not(:first-child)":{borderTop:`1px solid #bbb`},"&dark .cm-tooltip":{backgroundColor:`#333338`,color:`white`},".cm-tooltip-arrow":{height:`7px`,width:`14px`,position:`absolute`,zIndex:-1,overflow:`hidden`,"&:before, &:after":{content:`''`,position:`absolute`,width:0,height:0,borderLeft:`7px solid transparent`,borderRight:`7px solid transparent`},".cm-tooltip-above &":{bottom:`-7px`,"&:before":{borderTop:`7px solid #bbb`},"&:after":{borderTop:`7px solid #f5f5f5`,bottom:`1px`}},".cm-tooltip-below &":{top:`-7px`,"&:before":{borderBottom:`7px solid #bbb`},"&:after":{borderBottom:`7px solid #f5f5f5`,top:`1px`}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:`#333338`,borderBottomColor:`#333338`},"&:after":{borderTopColor:`transparent`,borderBottomColor:`transparent`}}}),Wc={x:0,y:0},Gc=F.define({enables:[Vc,Uc]}),Kc=F.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])}),qc=class e{static create(t){return new e(t)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement(`div`),this.dom.classList.add(`cm-tooltip-hover`),this.manager=new Lc(e,Kc,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add(`cm-tooltip-section`),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)==null||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(r!==void 0){if(t===void 0)t=r;else if(t!==r)return}}return t}get offset(){return this.passProp(`offset`)}get getCoords(){return this.passProp(`getCoords`)}get overlap(){return this.passProp(`overlap`)}get resize(){return this.passProp(`resize`)}},Jc=Gc.compute([Kc],e=>{let t=e.facet(Kc);return t.length===0?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>e.end??e.pos)),create:qc.create,above:t[0].above,arrow:t.some(e=>e.arrow)}}),Yc=F.define(),Xc=class{constructor(e,t,n,r,i,a){this.view=e,this.source=t,this.field=n,this.locked=r,this.setHover=i,this.hoverTime=a,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener(`mouseleave`,this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener(`mousemove`,this.mousemove=this.mousemove.bind(this))}update(e){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;en.bottom||t.xn.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(r)).find(e=>e.from<=r&&e.to>=r),o=a&&a.dir==U.RTL?-1:1;i=t.x{if(t&&(!Array.isArray(t)||t.length)){let n=Array.isArray(t)?t:[t];r&&this.locked.set(n,r),e.dispatch({effects:this.setHover.of(n)})}};if(i&&`then`in i){let n=this.pending={pos:t};i.then(e=>{this.pending==n&&(this.pending=null,a(e))},t=>fi(e.state,t,`hover tooltip`))}else a(i)}get tooltip(){let e=this.view.plugin(Vc),t=e?e.manager.tooltips.findIndex(e=>e.create==qc.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:t,tooltip:n}=this;if(t.length&&!this.locked.has(t)&&n&&!Qc(n.dom,e)||this.pending){let{pos:n}=t[0]||this.pending,r=t[0]?.end??n;(n==r?this.view.posAtCoords(this.lastMove)!=n:!$c(this.view,n,r,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length&&!this.locked.has(t)){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener(`mouseleave`,t);let{active:r}=this;r.length&&!this.locked.has(r)&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener(`mouseleave`,t)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener(`mouseleave`,this.mouseleave),this.view.dom.removeEventListener(`mousemove`,this.mousemove)}},Zc=4;function Qc(e,t){let{left:n,right:r,top:i,bottom:a}=e.getBoundingClientRect(),o;if(o=e.querySelector(`.cm-tooltip-arrow`)){let e=o.getBoundingClientRect();i=Math.min(e.top,i),a=Math.max(e.bottom,a)}return t.clientX>=n-Zc&&t.clientX<=r+Zc&&t.clientY>=i-Zc&&t.clientY<=a+Zc}function $c(e,t,n,r,i,a){let o=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(o.left>r||o.righti||Math.min(o.bottom,s)=t&&c<=n}function el(e,t={}){let n=I.define(),r=new WeakMap,i=pt.define({create(){return[]},update(e,a){let o=r.get(e);if(e.length&&(t.hideOnChange&&(a.docChanged||a.selection)||o&&o(a)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(a,e)))),a.docChanged&&e.length){let t=[];for(let n of e){let e=a.changes.mapPos(n.pos,-1,Ye.TrackDel);if(e!=null){let r=Object.assign(Object.create(null),n);r.pos=e,r.end!=null&&(r.end=a.changes.mapPos(r.end)),t.push(r)}}e=t}for(let t of a.effects)t.is(n)&&(e=t.value,o=void 0),(t.is(rl)&&!t.value||t.value==i)&&(e=[]);return e.length&&o&&r.set(e,o),e},provide:e=>Kc.from(e)}),a=G.define(a=>new Xc(a,e,i,r,n,t.hoverTime||300));return{active:i,extension:[i,a,Yc.of(a),Jc]}}function tl(e,t,n,r={}){let i=e.state.facet(Yc).map(t=>e.plugin(t)).filter(e=>!!e);if(r.tooltip&&r.tooltip.active){let e=i.find(e=>e.field==r.tooltip.active);e&&(i=[e])}for(let a of i)a.activateHover(e,t,n,r.until??(()=>!1))}function nl(e,t){let n=e.plugin(Vc);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}var rl=I.define(),il=F.define({combine(e){let t,n;for(let r of e)t||=r.topContainer,n||=r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function al(e,t){let n=e.plugin(ol),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var ol=G.fromClass(class{constructor(e){this.input=e.state.facet(ll),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(il);this.top=new sl(e,!0,t.topContainer),this.bottom=new sl(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add(`cm-panel`),e.mount&&e.mount()}update(e){let t=e.state.facet(il);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new sl(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new sl(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(ll);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],a=[],o=[];for(let n of t){let t=this.specs.indexOf(n),s;t<0?(s=n(e.view),o.push(s)):(s=this.panels[t],s.update&&s.update(e)),r.push(s),(s.top?i:a).push(s)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(a);for(let e of o)e.dom.classList.add(`cm-panel`),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>J.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})}),sl=class{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes=``,this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&=(this.dom.remove(),void 0);return}if(!this.dom){this.dom=document.createElement(`div`),this.dom.className=this.top?`cm-panels cm-panels-top`:`cm-panels cm-panels-bottom`;let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=cl(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=cl(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(` `))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(` `))e&&this.container.classList.add(e)}}};function cl(e){let t=e.nextSibling;return e.remove(),t}var ll=F.define({enables:ol});function ul(e,t){let n,r=new Promise(e=>n=e),i=e=>hl(e,t,n);e.state.field(fl,!1)?e.dispatch({effects:pl.of(i)}):e.dispatch({effects:I.appendConfig.of(fl.init(()=>[i]))});let a=ml.of(i);return{close:a,result:r.then(t=>((e.win.queueMicrotask||(t=>e.win.setTimeout(t,10)))(()=>{e.state.field(fl).indexOf(i)>-1&&e.dispatch({effects:a})}),t))}}function dl(e,t){let n=e.state.field(fl,!1)||[];for(let r of n){let n=al(e,r);if(n&&n.dom.classList.contains(t))return n}return null}var fl=pt.define({create(){return[]},update(e,t){for(let n of t.effects)n.is(pl)?e=[n.value].concat(e):n.is(ml)&&(e=e.filter(e=>e!=n.value));return e},provide:e=>ll.computeN([e],t=>t.field(e))}),pl=I.define(),ml=I.define();function hl(e,t,n){let r=t.content?t.content(e,()=>o(null)):null;if(!r){if(r=B(`form`),t.input){let e=B(`input`,t.input);/^(text|password|number|email|tel|url)$/.test(e.type)&&e.classList.add(`cm-textfield`),e.name||=`input`,r.appendChild(B(`label`,(t.label||``)+`: `,e))}else r.appendChild(document.createTextNode(t.label||``));r.appendChild(document.createTextNode(` `)),r.appendChild(B(`button`,{class:`cm-button`,type:`submit`},t.submitLabel||`OK`))}let i=r.nodeName==`FORM`?[r]:r.querySelectorAll(`form`);for(let e=0;e{e.keyCode==27?(e.preventDefault(),o(null)):e.keyCode==13&&(e.preventDefault(),o(t))}),t.addEventListener(`submit`,e=>{e.preventDefault(),o(t)})}let a=B(`div`,r,B(`button`,{onclick:()=>o(null),"aria-label":e.state.phrase(`close`),class:`cm-dialog-close`,type:`button`},[`×`]));t.class&&(a.className=t.class),a.classList.add(`cm-dialog`);function o(t){a.contains(a.ownerDocument.activeElement)&&e.focus(),n(t)}return{dom:a,top:t.top,mount:()=>{if(t.focus){let e;e=typeof t.focus==`string`?r.querySelector(t.focus):r.querySelector(`input`)||r.querySelector(`button`),e&&`select`in e?e.select():e&&`focus`in e&&e.focus()}}}}var gl=class extends Jt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};gl.prototype.elementClass=``,gl.prototype.toDOM=void 0,gl.prototype.mapMode=Ye.TrackBefore,gl.prototype.startSide=gl.prototype.endSide=-1,gl.prototype.point=!0;var _l=F.define(),vl=F.define(),yl={class:``,renderEmptyElements:!1,elementStyle:``,markers:()=>z.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:`before`},bl=F.define();function xl(e){return[Cl(),bl.of({...yl,...e})]}var Sl=F.define({combine:e=>e.some(e=>e)});function Cl(e){let t=[wl];return e&&e.fixed===!1&&t.push(Sl.of(!0)),t}var wl=G.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(bl).map(t=>new Ol(e,t)),this.fixed=!e.state.facet(Sl);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Sl)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=z.iter(this.view.state.facet(_l),this.view.viewport.from),r=[],i=this.gutters.map(e=>new Dl(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==Jn.Text&&t){El(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==Jn.Text){El(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(bl),n=e.state.facet(bl),r=e.docChanged||e.heightChanged||e.viewportChanged||!z.eq(e.startState.facet(_l),e.state.facet(_l),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new Ol(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>J.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==U.LTR?{left:r,right:i}:{right:r,left:i}})});function Tl(e){return Array.isArray(e)?e:[e]}function El(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var Dl=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=z.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new kl(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];El(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;(r.length!=0||a.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(vl)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Ol=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=Tl(t.markers(e)),t.initialSpacer&&(this.spacer=new kl(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=Tl(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!z.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},kl=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),Al(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=ir(e,t,n)||i(e,t,n):i}return n}})}}),Pl=class extends gl{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function Fl(e,t){return e.state.facet(Nl).formatNumber(t,e.state)}var Il=bl.compute([Nl],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(jl)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new Pl(Fl(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(Ml)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(Nl)!=e.state.facet(Nl),initialSpacer(e){return new Pl(Fl(e,Rl(e.state.doc.lines)))},updateSpacer(e,t){let n=Fl(t.view,Rl(t.view.state.doc.lines));return n==e.number?e:new Pl(n)},domEventHandlers:e.facet(Nl).domEventHandlers,side:`before`}));function Ll(e={}){return[Nl.of(e),Cl(),Il]}function Rl(e){let t=9;for(;t{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(zl.range(i)))}return z.of(t)});function Vl(){return Bl}var Hl=1024,Ul=0,Wl=class{constructor(e,t){this.from=e,this.to=t}},Y=class{constructor(e={}){this.id=Ul++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=ql.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};Y.closedBy=new Y({deserialize:e=>e.split(` `)}),Y.openedBy=new Y({deserialize:e=>e.split(` `)}),Y.group=new Y({deserialize:e=>e.split(` `)}),Y.isolate=new Y({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),Y.contextHash=new Y({perNode:!0}),Y.lookAhead=new Y({perNode:!0}),Y.mounted=new Y({perNode:!0});var Gl=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[Y.mounted.id]}},Kl=Object.create(null),ql=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):Kl,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(Y.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(Y.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};ql.none=new ql(``,Object.create(null),0,8);var Jl=class e{constructor(e){this.types=e;for(let t=0;t0;for(let e=this.cursor(a|X.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:hu(ql.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(ql.none,t,n,r)))}static build(e){return fu(e)}};Z.empty=new Z(ql.none,[],[],0);var Zl=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},Ql=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return ql.none}toString(){let e=[];for(let t=0;t0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function eu(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&X.EnterBracketed&&l instanceof Z&&(d=Gl.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||$l(i,r,u,u+l.length)){if(l instanceof Ql){if(a&X.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new ou(new au(o,l,t,u),null,e)}else if(a&X.IncludeAnonymous||!l.type.isAnonymous||du(l)){let s;if(!(a&X.IgnoreMounts)&&(s=Gl.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&X.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&X.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&X.IgnoreOverlays)&&(i=Gl.get(this._tree))&&i.overlay){let a=t-this.from,o=r&X.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function ru(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function iu(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var au=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},ou=class e extends tu{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&X.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new Z(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function su(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;rn.from||i.to=t){let o=new nu(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(eu(o,t,n,!1))}}return i?su(i):r}var uu=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~X.EnterBracketed,e instanceof nu)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof nu?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&X.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&X.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&X.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&X.IncludeAnonymous||e instanceof Ql||!e.type.isAnonymous||du(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e=0;i--){if(i<0)return iu(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function du(e){return e.children.some(e=>e instanceof Ql||!e.type.isAnonymous||du(e))}function fu(e){let{buffer:t,nodeSet:n,maxBufferLength:r=Hl,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new Zl(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,ee=l,te=c;if(w<0){if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}if(w==-3){c=x;return}if(w==-4){l=x;return}throw RangeError(`Unrecognized record size: ${w}`)}let ne=s[x],T,E,re=S-e;if(C-S<=r&&(E=h(o.pos-t,y))){let t=new Uint16Array(E.size-E.skip),r=o.pos-E.size,i=t.length;for(;o.pos>r;)i=g(E.start,t,i);T=new Ql(t,C-E.start,n),re=E.start-e}else{let e=o.pos-w;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=C;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,ee,te),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s-1&&s>0){let e=f(ne,te);T=hu(ne,t,n,0,t.length,0,C-S,e,e)}else T=m(ne,t,n,C-S,ee-C,te)}_.push(T),v.push(re)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new Ql(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof Z){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(Y.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[Y.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[Y.lookAhead,i];o=o?[e].concat(o):[e]}return new Z(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new Z(s[e.topID],_.reverse(),v.reverse(),y)}var pu=new WeakMap;function mu(e,t){if(!e.isAnonymous||t instanceof Ql||t.type!=e)return 1;let n=pu.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Z)){n=1;break}n+=mu(e,r)}pu.set(t,n)}return n}function hu(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(hu(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var gu=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof ou?this.setBuffer(e.context.buffer,e.index,t):e instanceof nu&&this.map.set(e.tree,t)}get(e){return e instanceof ou?this.getBuffer(e.context.buffer,e.index):e instanceof nu?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},_u=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s=r)for(;o&&o.from=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=anew Wl(e.from,e.to)):[new Wl(0,0)]:[new Wl(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},yu=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new Y({perNode:!0});var bu=0,xu=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=bu++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new Cu(e);return e=>e.modified.indexOf(t)>-1?e:Cu.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},Su=0,Cu=class e{constructor(e){this.name=e,this.instances=[],this.id=Su++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&wu(n,e.modified));if(r)return r;let i=[],a=new xu(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=Tu(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function wu(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function Tu(e){let t=[[]];for(let n=0;nt.length-e.length)}function Eu(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new Ou(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return Du.add(t)}var Du=new Y({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new Ou(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),Ou=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function Au(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function ju(e,t,n,r=0,i=e.length){let a=new Mu(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var Mu=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=Nu(e)||Ou.empty,u=Au(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(Y.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function Nu(e){let t=e.type.prop(Du);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var Q=xu.define,Pu=Q(),Fu=Q(),Iu=Q(Fu),Lu=Q(Fu),Ru=Q(),zu=Q(Ru),Bu=Q(Ru),Vu=Q(),Hu=Q(Vu),Uu=Q(),Wu=Q(),Gu=Q(),Ku=Q(Gu),qu=Q(),$={comment:Pu,lineComment:Q(Pu),blockComment:Q(Pu),docComment:Q(Pu),name:Fu,variableName:Q(Fu),typeName:Iu,tagName:Q(Iu),propertyName:Lu,attributeName:Q(Lu),className:Q(Fu),labelName:Q(Fu),namespace:Q(Fu),macroName:Q(Fu),literal:Ru,string:zu,docString:Q(zu),character:Q(zu),attributeValue:Q(zu),number:Bu,integer:Q(Bu),float:Q(Bu),bool:Q(Ru),regexp:Q(Ru),escape:Q(Ru),color:Q(Ru),url:Q(Ru),keyword:Uu,self:Q(Uu),null:Q(Uu),atom:Q(Uu),unit:Q(Uu),modifier:Q(Uu),operatorKeyword:Q(Uu),controlKeyword:Q(Uu),definitionKeyword:Q(Uu),moduleKeyword:Q(Uu),operator:Wu,derefOperator:Q(Wu),arithmeticOperator:Q(Wu),logicOperator:Q(Wu),bitwiseOperator:Q(Wu),compareOperator:Q(Wu),updateOperator:Q(Wu),definitionOperator:Q(Wu),typeOperator:Q(Wu),controlOperator:Q(Wu),punctuation:Gu,separator:Q(Gu),bracket:Ku,angleBracket:Q(Ku),squareBracket:Q(Ku),paren:Q(Ku),brace:Q(Ku),content:Vu,heading:Hu,heading1:Q(Hu),heading2:Q(Hu),heading3:Q(Hu),heading4:Q(Hu),heading5:Q(Hu),heading6:Q(Hu),contentSeparator:Q(Vu),list:Q(Vu),quote:Q(Vu),emphasis:Q(Vu),strong:Q(Vu),link:Q(Vu),monospace:Q(Vu),strikethrough:Q(Vu),inserted:Q(),deleted:Q(),changed:Q(),invalid:Q(),meta:qu,documentMeta:Q(qu),annotation:Q(qu),processingInstruction:Q(qu),definition:xu.defineModifier(`definition`),constant:xu.defineModifier(`constant`),function:xu.defineModifier(`function`),standard:xu.defineModifier(`standard`),local:xu.defineModifier(`local`),special:xu.defineModifier(`special`)};for(let e in $){let t=$[e];t instanceof xu&&(t.name=e)}ku([{tag:$.link,class:`tok-link`},{tag:$.heading,class:`tok-heading`},{tag:$.emphasis,class:`tok-emphasis`},{tag:$.strong,class:`tok-strong`},{tag:$.keyword,class:`tok-keyword`},{tag:$.atom,class:`tok-atom`},{tag:$.bool,class:`tok-bool`},{tag:$.url,class:`tok-url`},{tag:$.labelName,class:`tok-labelName`},{tag:$.inserted,class:`tok-inserted`},{tag:$.deleted,class:`tok-deleted`},{tag:$.literal,class:`tok-literal`},{tag:$.string,class:`tok-string`},{tag:$.number,class:`tok-number`},{tag:[$.regexp,$.escape,$.special($.string)],class:`tok-string2`},{tag:$.variableName,class:`tok-variableName`},{tag:$.local($.variableName),class:`tok-variableName tok-local`},{tag:$.definition($.variableName),class:`tok-variableName tok-definition`},{tag:$.special($.variableName),class:`tok-variableName2`},{tag:$.definition($.propertyName),class:`tok-propertyName tok-definition`},{tag:$.typeName,class:`tok-typeName`},{tag:$.namespace,class:`tok-namespace`},{tag:$.className,class:`tok-className`},{tag:$.macroName,class:`tok-macroName`},{tag:$.propertyName,class:`tok-propertyName`},{tag:$.operator,class:`tok-operator`},{tag:$.comment,class:`tok-comment`},{tag:$.meta,class:`tok-meta`},{tag:$.invalid,class:`tok-invalid`},{tag:$.punctuation,class:`tok-punctuation`}]);var Ju=new Y;function Yu(e){return F.define({combine:e?t=>t.concat(e):void 0})}var Xu=new Y,Zu=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,R.prototype.hasOwnProperty(`tree`)||Object.defineProperty(R.prototype,"tree",{get(){return ed(this)}}),this.parser=t,this.extension=[ld.of(this),R.languageData.of((e,t,n)=>{let r=Qu(e,t,n),i=r.type.prop(Ju);if(!i)return[];let a=e.facet(i),o=r.type.prop(Xu);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return Qu(e,t,n).type.prop(Ju)==this.data}findRegions(e){let t=e.facet(ld);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(Ju)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(Y.mounted);if(i){if(i.tree.prop(Ju)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;ne.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function ed(e){let t=e.field(Zu.state,!1);return t?t.tree:Z.empty}var td=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},nd=null,rd=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],Z.empty,0,r,[],null)}startParse(){return this.parser.startParse(new td(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Z.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(_u.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=nd;nd=this;try{return e()}finally{nd=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=id(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=_u.applyChanges(r,e),i=Z.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);ne.from&&(this.fragments=id(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends vu{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=nd;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new Z(ql.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return nd}};function id(e,t,n){return _u.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var ad=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=rd.create(t.facet(ld).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};Zu.state=pt.define({create:ad.init,update(e,t){for(let e of t.effects)if(e.is(Zu.setState))return e.value;return t.startState.facet(ld)==t.state.facet(ld)?e.apply(t):ad.init(t.state)}});var od=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(od=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var sd=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,cd=G.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Zu.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Zu.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=od(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,s=i.context.work(()=>sd&&sd()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Zu.setState.of(new ad(i.context))})),this.chunkBudget>0&&(!s||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>fi(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ld=F.define({combine(e){return e.length?e[0]:null},enables:e=>[Zu.state,cd,J.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),ud=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},dd=F.define(),fd=F.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function pd(e){let t=e.facet(fd);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function md(e,t){let n=``,r=e.tabSize,i=e.facet(fd)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e=t?vd(e,n,t):null}var gd=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=pd(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return pn(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},_d=new Y;function vd(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.fromr.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return yd(r,e,n)}function yd(e,t,n){for(let r=e;r;r=r.next){let e=xd(r.node);if(e)return e(Cd.create(t,n,r))}return 0}function bd(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function xd(e){let t=e.type.prop(_d);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(Y.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>Dd(e,!0,1,void 0,n&&!bd(e)?t.from:void 0)}return e.parent==null?Sd:null}function Sd(){return 0}var Cd=class e extends gd{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(wd(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return yd(this.context.next,this.base,this.pos)}};function wd(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function Td(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function Ed({closing:e,align:t=!0,units:n=1}){return r=>Dd(r,t,n,e)}function Dd(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?Td(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}var Od=200;function kd(){return R.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent(`input.type`)&&!e.isUserEvent(`input.complete`))return e;let t=e.startState.languageDataAt(`indentOnInput`,e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+Od)return e;let a=n.sliceString(i.from,r);if(!t.some(e=>e.test(a)))return e;let{state:o}=e,s=-1,c=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=hd(o,t.from);if(n==null)continue;let r=/^\s*/.exec(t.text)[0],i=md(o,n);r!=i&&c.push({from:t.from,to:t.from+r.length,insert:i})}return c.length?[e,{changes:c,sequential:!0}]:e})}var Ad=F.define(),jd=new Y;function Md(e){let t=e.firstChild,n=e.lastChild;return t&&t.ton)continue;if(a&&i.from=t&&r.to>n&&(a=r)}}return a}function Pd(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function Fd(e,t,n){for(let r of e.facet(Ad)){let i=r(e,t,n);if(i)return i}return Nd(e,t,n)}function Id(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var Ld=I.define({map:Id}),Rd=I.define({map:Id});function zd(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}var Bd=pt.define({create(){return H.none},update(e,t){t.isUserEvent(`delete`)&&t.changes.iterChangedRanges((t,n)=>e=Vd(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(Ld)&&!Ud(e,r.value.from,r.value.to)?n.push(r.value):r.is(Rd)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(Xd),i=n.map(e=>(r?H.replace({widget:new ef(r(t.state,e))}):$d).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=Vd(e,t.selection.main.head)),e},provide:e=>J.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError(`Invalid JSON for fold state`);let t=[];for(let n=0;n{et&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function Hd(e,t,n){var r;let i=null;return(r=e.field(Bd,!1))==null||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function Ud(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function Wd(e,t){return e.field(Bd,!1)?t:t.concat(I.appendConfig.of(Zd()))}var Gd=e=>{for(let t of zd(e)){let n=Fd(e.state,t.from,t.to);if(n)return e.dispatch({effects:Wd(e.state,[Ld.of(n),qd(e,n)])}),!0}return!1},Kd=e=>{if(!e.state.field(Bd,!1))return!1;let t=[];for(let n of zd(e)){let r=Hd(e.state,n.from,n.to);r&&t.push(Rd.of(r),qd(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function qd(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return J.announce.of(`${e.state.phrase(n?`Folded lines`:`Unfolded lines`)} ${r} ${e.state.phrase(`to`)} ${i}.`)}var Jd=[{key:`Ctrl-Shift-[`,mac:`Cmd-Alt-[`,run:Gd},{key:`Ctrl-Shift-]`,mac:`Cmd-Alt-]`,run:Kd},{key:`Ctrl-Alt-[`,run:e=>{let{state:t}=e,n=[];for(let r=0;r{let t=e.state.field(Bd,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(Rd.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],Yd={placeholderDOM:null,preparePlaceholder:null,placeholderText:`…`},Xd=F.define({combine(e){return qt(e,Yd)}});function Zd(e){let t=[Bd,af];return e&&t.push(Xd.of(e)),t}function Qd(e,t){let{state:n}=e,r=n.facet(Xd),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=Hd(e.state,n.from,n.to);r&&e.dispatch({effects:Rd.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let a=document.createElement(`span`);return a.textContent=r.placeholderText,a.setAttribute(`aria-label`,n.phrase(`folded code`)),a.title=n.phrase(`unfold`),a.className=`cm-foldPlaceholder`,a.onclick=i,a}var $d=H.replace({widget:new class extends qn{toDOM(e){return Qd(e,null)}}}),ef=class extends qn{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Qd(e,this.value)}},tf={openText:`⌄`,closedText:`›`,markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},nf=class extends gl{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement(`span`);return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?`Fold line`:`Unfold line`),t}};function rf(e={}){let t={...tf,...e},n=new nf(t,!0),r=new nf(t,!1),i=G.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(ld)!=e.state.facet(ld)||e.startState.field(Bd,!1)!=e.state.field(Bd,!1)||ed(e.startState)!=ed(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new tn;for(let i of e.viewportLineBlocks){let a=Hd(e.state,i.from,i.to)?r:Fd(e.state,i.from,i.to)?n:null;a&&t.add(i.from,i.from,a)}return t.finish()}}),{domEventHandlers:a}=t;return[i,xl({class:`cm-foldGutter`,markers(e){return e.plugin(i)?.markers||z.empty},initialSpacer(){return new nf(t,!1)},domEventHandlers:{...a,click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=Hd(e.state,t.from,t.to);if(r)return e.dispatch({effects:Rd.of(r)}),!0;let i=Fd(e.state,t.from,t.to);return i?(e.dispatch({effects:Ld.of(i)}),!0):!1}}}),Zd()]}var af=J.baseTheme({".cm-foldPlaceholder":{backgroundColor:`#eee`,border:`1px solid #ddd`,color:`#888`,borderRadius:`.2em`,margin:`0 1px`,padding:`0 1px`,cursor:`pointer`},".cm-foldGutter span":{padding:`0 1px`,cursor:`pointer`}}),of=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=yn.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof Zu?e=>e.prop(Ju)==a.data:a?e=>e==a:void 0,this.style=ku(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new yn(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},sf=F.define(),cf=F.define({combine(e){return e.length?[e[0]]:null}});function lf(e){let t=e.facet(sf);return t.length?t:e.facet(cf)}function uf(e,t){let n=[ff],r;return e instanceof of&&(e.module&&n.push(J.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(cf.of(e)):r?n.push(sf.computeN([J.darkTheme],t=>t.facet(J.darkTheme)==(r==`dark`)?[e]:[])):n.push(sf.of(e)),n}var df=class{constructor(e){this.markCache=Object.create(null),this.tree=ed(e.state),this.decorations=this.buildDeco(e,lf(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=ed(e.state),n=lf(e.state),r=n!=lf(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return H.none;let n=new tn;for(let{from:r,to:i}of e.visibleRanges)ju(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=H.mark({class:r})))},r,i);return n.finish()}},ff=gt.high(G.fromClass(df,{decorations:e=>e.decorations})),pf=of.define([{tag:$.meta,color:`#404740`},{tag:$.link,textDecoration:`underline`},{tag:$.heading,textDecoration:`underline`,fontWeight:`bold`},{tag:$.emphasis,fontStyle:`italic`},{tag:$.strong,fontWeight:`bold`},{tag:$.strikethrough,textDecoration:`line-through`},{tag:$.keyword,color:`#708`},{tag:[$.atom,$.bool,$.url,$.contentSeparator,$.labelName],color:`#219`},{tag:[$.literal,$.inserted],color:`#164`},{tag:[$.string,$.deleted],color:`#a11`},{tag:[$.regexp,$.escape,$.special($.string)],color:`#e40`},{tag:$.definition($.variableName),color:`#00f`},{tag:$.local($.variableName),color:`#30a`},{tag:[$.typeName,$.namespace],color:`#085`},{tag:$.className,color:`#167`},{tag:[$.special($.variableName),$.macroName],color:`#256`},{tag:$.definition($.propertyName),color:`#00c`},{tag:$.comment,color:`#940`},{tag:$.invalid,color:`#f00`}]),mf=J.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:`#328c8252`},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bb555544`}}),hf=1e4,gf=`()[]{}`,_f=F.define({combine(e){return qt(e,{afterCursor:!0,brackets:gf,maxScanDistance:hf,renderMatch:bf})}}),vf=H.mark({class:`cm-matchingBracket`}),yf=H.mark({class:`cm-nonmatchingBracket`});function bf(e){let t=[],n=e.matched?vf:yf;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function xf(e){let t=[],n=e.facet(_f);for(let r of e.selection.ranges){if(!r.empty)continue;let i=Df(e,r.head,-1,n)||r.head>0&&Df(e,r.head-1,1,n)||n.afterCursor&&(Df(e,r.head,1,n)||r.heade.decorations}),mf];function Cf(e={}){return[_f.of(e),Sf]}var wf=new Y;function Tf(e,t,n){let r=e.prop(t<0?Y.openedBy:Y.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function Ef(e){let t=e.type.prop(wf);return t?t(e.node):e}function Df(e,t,n,r={}){let i=r.maxScanDistance||hf,a=r.brackets||gf,o=ed(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=Tf(r.type,n,a);if(i&&r.from0?t>=o.from&&to.from&&t<=o.to))return Of(e,t,n,r,o,i,a)}}return kf(e,t,n,o,s.type,i,a)}function Of(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i)){if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var Af=Object.create(null),jf=[ql.none],Mf=[],Nf=Object.create(null),Pf=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])Pf[e]=If(Af,t);function Ff(e,t){Mf.indexOf(e)>-1||(Mf.push(e),console.warn(t))}function If(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||$[n];r?typeof r==`function`?t.length?t=t.map(r):Ff(n,`Modifier ${n} used at start of tag`):t.length?Ff(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:Ff(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=Nf[i];if(a)return a.id;let o=Nf[i]=ql.define({id:jf.length,name:r,props:[Eu({[r]:n})]});return jf.push(o),o.id}U.RTL,U.LTR;var Lf=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=Hf(e.state,n.from);return r.line?zf(e):r.block?Vf(e):!1};function Rf(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var zf=Rf(qf,0),Bf=Rf(Kf,0),Vf=Rf((e,t)=>Kf(e,t,Gf(t)),0);function Hf(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var Uf=50;function Wf(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-Uf,r),o=e.sliceDoc(i,i+Uf),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+Uf),d=e.sliceDoc(i-Uf,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function Gf(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function Kf(e,t,n=t.selection.ranges){let r=n.map(e=>Hf(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>Wf(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;ti&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;ee.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var Jf=jt.define(),Yf=jt.define(),Xf=F.define(),Zf=F.define({combine(e){return qt(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),Qf=pt.define({create(){return _p.empty},update(e,t){let n=t.state.facet(Zf),r=t.annotation(Jf);if(r){let i=ap.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?op(o,o.length,n.minDepth,i):fp(o,t.startState.selection),new _p(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(Yf);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(Pt.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=ap.fromTransaction(t),o=t.annotation(Pt.time),s=t.annotation(Pt.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new _p(e.done.map(ap.fromJSON),e.undone.map(ap.fromJSON))}});function $f(e={}){return[Qf,Zf.of(e),J.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?tp:e.inputType==`historyRedo`?np:null;return n?(e.preventDefault(),n(t)):!1}})]}function ep(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(Qf,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var tp=ep(0,!1),np=ep(1,!1),rp=ep(0,!0),ip=ep(1,!0),ap=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&Ze.fromJSON(t.changes),[],t.mapped&&Xe.fromJSON(t.mapped),t.startSelection&&P.fromJSON(t.startSelection),t.selectionsAfter.map(P.fromJSON))}static fromTransaction(t,n){let r=up;for(let e of t.startState.facet(Xf)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,up)}static selection(t){return new e(void 0,up,void 0,void 0,t)}};function op(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function sp(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e=t&&i<=o&&(r=!0)}}),r}function cp(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function lp(e,t){return e.length?t.length?e.concat(t):e:t}var up=[],dp=200;function fp(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-dp));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),op(e,e.length-1,1e9,n.setSelAfter(r)))}return[ap.selection([t])]}function pp(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function mp(e,t){if(!e.length)return e;let n=e.length,r=up;for(;n;){let i=hp(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[ap.selection(r)]:up}function hp(e,t,n){let r=lp(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):up,n);if(!e.changes)return ap.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new ap(i,I.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var gp=/^(input\.type|delete)($|\.)/,_p=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||gp.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?e.moveByChar(n,t):Sp(n,t))}function wp(e){return e.textDirectionAt(e.state.selection.main.head)==U.LTR}var Tp=e=>Cp(e,!wp(e)),Ep=e=>Cp(e,wp(e));function Dp(e,t){return xp(e,n=>n.empty?e.moveByGroup(n,t):Sp(n,t))}var Op=e=>Dp(e,!wp(e)),kp=e=>Dp(e,wp(e));typeof Intl<`u`&&Intl.Segmenter;function Ap(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function jp(e,t,n){let r=ed(e).resolveInner(t.head),i=n?Y.closedBy:Y.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;Ap(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?Df(e,r.from,1):Df(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,P.cursor(s,n?-1:1)}var Mp=e=>xp(e,t=>jp(e.state,t,!wp(e))),Np=e=>xp(e,t=>jp(e.state,t,wp(e)));function Pp(e,t){return xp(e,n=>{if(!n.empty)return Sp(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var Fp=e=>Pp(e,!1),Ip=e=>Pp(e,!0);function Lp(e){let t=e.scrollDOM.clientHeightr.empty?e.moveVertically(r,t,n.height):Sp(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottomRp(e,!1),Bp=e=>Rp(e,!0);function Vp(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=P.cursor(r.from+n))}return i}var Hp=e=>xp(e,t=>Vp(e,t,!0)),Up=e=>xp(e,t=>Vp(e,t,!1)),Wp=e=>xp(e,t=>Vp(e,t,!wp(e))),Gp=e=>xp(e,t=>Vp(e,t,wp(e))),Kp=e=>xp(e,t=>P.cursor(e.lineBlockAt(t.head).from,1)),qp=e=>xp(e,t=>P.cursor(e.lineBlockAt(t.head).to,-1));function Jp(e,t,n){let r=!1,i=yp(e.selection,t=>{let i=Df(e,t.head,-1)||Df(e,t.head,1)||t.head>0&&Df(e,t.head-1,1)||t.headJp(e,t,!1);function Xp(e,t,n){let r=yp(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=P.range(e.head,e.anchor));let r=n(e);return P.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(bp(e.state,r)),!0)}function Zp(e,t){return Xp(e,t,n=>e.moveByChar(n,t))}var Qp=e=>Zp(e,!wp(e)),$p=e=>Zp(e,wp(e));function em(e,t){return Xp(e,t,n=>e.moveByGroup(n,t))}var tm=e=>em(e,!wp(e)),nm=e=>em(e,wp(e)),rm=e=>{let t=!wp(e);return Xp(e,t,n=>jp(e.state,n,t))},im=e=>{let t=wp(e);return Xp(e,t,n=>jp(e.state,n,t))};function am(e,t){return Xp(e,t,n=>e.moveVertically(n,t))}var om=e=>am(e,!1),sm=e=>am(e,!0);function cm(e,t){return Xp(e,t,n=>e.moveVertically(n,t,Lp(e).height))}var lm=e=>cm(e,!1),um=e=>cm(e,!0),dm=e=>Xp(e,!0,t=>Vp(e,t,!0)),fm=e=>Xp(e,!1,t=>Vp(e,t,!1)),pm=e=>{let t=!wp(e);return Xp(e,t,n=>Vp(e,n,t))},mm=e=>{let t=wp(e);return Xp(e,t,n=>Vp(e,n,t))},hm=e=>Xp(e,!1,t=>P.cursor(e.lineBlockAt(t.head).from)),gm=e=>Xp(e,!0,t=>P.cursor(e.lineBlockAt(t.head).to)),_m=({state:e,dispatch:t})=>(t(bp(e,{anchor:0})),!0),vm=({state:e,dispatch:t})=>(t(bp(e,{anchor:e.doc.length})),!0),ym=({state:e,dispatch:t})=>(t(bp(e,{anchor:e.selection.main.anchor,head:0})),!0),bm=({state:e,dispatch:t})=>(t(bp(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),xm=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),Sm=({state:e,dispatch:t})=>{let n=Vm(e).map(({from:t,to:n})=>P.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:P.create(n),userEvent:`select`})),!0},Cm=({state:e,dispatch:t})=>{let n=yp(e.selection,t=>{let n=ed(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return P.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(bp(e,n)),!0)};function wm(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.heada.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(bp(n,P.create(i,i.length-1))),!0)}var Tm=e=>wm(e,!1),Em=e=>wm(e,!0),Dm=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=P.create([n.main]):n.main.empty||(r=P.create([P.cursor(n.main.head)])),r?(t(bp(e,r)),!0):!1};function Om(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);oi&&(n=`delete.forward`,o=km(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=km(e,i,!1),a=km(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:P.cursor(i,it(e)))r.between(t,t,(e,r)=>{et&&(t=n?r:e)});return t}var Am=(e,t,n)=>Om(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&iAm(e,!1,!0),Mm=e=>Am(e,!0,!1),Nm=(e,t)=>Om(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=N(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),Pm=e=>Nm(e,!1),Fm=e=>Nm(e,!0),Im=e=>Om(e,t=>{let n=e.lineBlockAt(t.head).to;return t.headOm(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),Rm=e=>Om(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:j.of([``,``])},range:P.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},Bm=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:N(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:N(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:P.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function Vm(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function Hm(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of Vm(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(P.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(P.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:P.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var Um=({state:e,dispatch:t})=>Hm(e,t,!1),Wm=({state:e,dispatch:t})=>Hm(e,t,!0);function Gm(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Vm(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var Km=({state:e,dispatch:t})=>Gm(e,t,!1),qm=({state:e,dispatch:t})=>Gm(e,t,!0),Jm=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Vm(t).map(({from:e,to:n})=>(e>0?e--:n{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function Ym(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=ed(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(Y.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var Xm=Qm(!1),Zm=Qm(!0);function Qm(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&Ym(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new gd(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=hd(s,r);for(c??=pn(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);ia.from&&r{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:P.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var eh=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new gd(e,{overrideIndentation:e=>n[e]??-1}),i=$m(e,(t,i,a)=>{let o=hd(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=md(e,o);(s!=c||a.from!e.readOnly&&(t(e.update($m(e,(t,n)=>{n.push({from:t.from,insert:e.facet(fd)})}),{userEvent:`input.indent`})),!0),nh=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update($m(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=pn(r,e.tabSize),a=0,o=md(e,Math.max(0,i-pd(e)));for(;a(e.setTabFocusMode(),!0),ih=[{key:`Ctrl-b`,run:Tp,shift:Qp,preventDefault:!0},{key:`Ctrl-f`,run:Ep,shift:$p},{key:`Ctrl-p`,run:Fp,shift:om},{key:`Ctrl-n`,run:Ip,shift:sm},{key:`Ctrl-a`,run:Kp,shift:hm},{key:`Ctrl-e`,run:qp,shift:gm},{key:`Ctrl-d`,run:Mm},{key:`Ctrl-h`,run:jm},{key:`Ctrl-k`,run:Im},{key:`Ctrl-Alt-h`,run:Pm},{key:`Ctrl-o`,run:zm},{key:`Ctrl-t`,run:Bm},{key:`Ctrl-v`,run:Bp}],ah=[{key:`ArrowLeft`,run:Tp,shift:Qp,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:Op,shift:tm,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:Wp,shift:pm,preventDefault:!0},{key:`ArrowRight`,run:Ep,shift:$p,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:kp,shift:nm,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:Gp,shift:mm,preventDefault:!0},{key:`ArrowUp`,run:Fp,shift:om,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:_m,shift:ym},{mac:`Ctrl-ArrowUp`,run:zp,shift:lm},{key:`ArrowDown`,run:Ip,shift:sm,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:vm,shift:bm},{mac:`Ctrl-ArrowDown`,run:Bp,shift:um},{key:`PageUp`,run:zp,shift:lm},{key:`PageDown`,run:Bp,shift:um},{key:`Home`,run:Up,shift:fm,preventDefault:!0},{key:`Mod-Home`,run:_m,shift:ym},{key:`End`,run:Hp,shift:dm,preventDefault:!0},{key:`Mod-End`,run:vm,shift:bm},{key:`Enter`,run:Xm,shift:Xm},{key:`Mod-a`,run:xm},{key:`Backspace`,run:jm,shift:jm,preventDefault:!0},{key:`Delete`,run:Mm,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:Pm,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:Fm,preventDefault:!0},{mac:`Mod-Backspace`,run:Lm,preventDefault:!0},{mac:`Mod-Delete`,run:Rm,preventDefault:!0}].concat(ih.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),oh=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:Mp,shift:rm},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:Np,shift:im},{key:`Alt-ArrowUp`,run:Um},{key:`Shift-Alt-ArrowUp`,run:Km},{key:`Alt-ArrowDown`,run:Wm},{key:`Shift-Alt-ArrowDown`,run:qm},{key:`Mod-Alt-ArrowUp`,run:Tm},{key:`Mod-Alt-ArrowDown`,run:Em},{key:`Escape`,run:Dm},{key:`Mod-Enter`,run:Zm},{key:`Alt-l`,mac:`Ctrl-l`,run:Sm},{key:`Mod-i`,run:Cm,preventDefault:!0},{key:`Mod-[`,run:nh},{key:`Mod-]`,run:th},{key:`Mod-Alt-\\`,run:eh},{key:`Shift-Mod-k`,run:Jm},{key:`Shift-Mod-\\`,run:Yp},{key:`Mod-/`,run:Lf},{key:`Alt-A`,mac:`Ctrl-A`,run:Bf},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:rh}].concat(ah),sh={key:`Tab`,run:th,shift:nh},ch=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,lh=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(ch(e)):ch,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ge(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Ke(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=qe(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=_h(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return ph.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=_h(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=mh.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(fh.prototype[Symbol.iterator]=hh.prototype[Symbol.iterator]=function(){return this});function gh(e){try{return new RegExp(e,dh),!0}catch{return!1}}function _h(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t=56320&&r<57344;)t++;return t}var vh=e=>{let t=dl(e,`cm-goto-line`);if(t){let e=t.dom.querySelector(`input[type=text]`);return e&&e.select(),!0}let{state:n}=e,r=String(n.doc.lineAt(e.state.selection.main.head).number),{close:i,result:a}=ul(e,{class:`cm-goto-line`,label:n.phrase(`Go to line`),input:{type:`text`,name:`line`,value:r},focus:!0,submitLabel:n.phrase(`go`)});return a.then(t=>{let r=t&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);if(!r){e.dispatch({effects:i});return}let a=n.doc.lineAt(n.selection.main.head),[,o,s,c,l]=r,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/n.doc.lines),d=Math.round(n.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=n.doc.line(Math.max(1,Math.min(n.doc.lines,d))),p=P.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[i,J.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},yh={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},bh=F.define({combine(e){return qt(e,yh,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function xh(e){let t=[Dh,Eh];return e&&t.push(bh.of(e)),t}var Sh=H.mark({class:`cm-selectionMatch`}),Ch=H.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function wh(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=L.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=L.Word)}function Th(e,t,n,r){return e(t.sliceDoc(n,n+1))==L.Word&&e(t.sliceDoc(r-1,r))==L.Word}var Eh=G.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(bh),{state:n}=e,r=n.selection;if(r.ranges.length>1)return H.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return H.none;let e=n.wordAt(i.head);if(!e)return H.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e200)return H.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(wh(o,n,i.from,i.to)&&Th(o,n,i.from,i.to)))return H.none}else if(a=n.sliceDoc(i.from,i.to),!a)return H.none}let s=[];for(let r of e.visibleRanges){let e=new lh(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||wh(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(Ch.range(r,a)):(r>=i.to||a<=i.from)&&s.push(Sh.range(r,a)),s.length>t.maxMatches))return H.none}}return H.set(s)}},{decorations:e=>e.decorations}),Dh=J.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),Oh=({state:e,dispatch:t})=>{let{selection:n}=e,r=P.create(n.ranges.map(t=>e.wordAt(t.head)||P.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function kh(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new lh(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new lh(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Ah=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return Oh({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=kh(e,r);return i?(t(e.update({selection:e.selection.addRange(P.range(i.from,i.to),!1),effects:J.scrollIntoView(i.to)})),!0):!1},jh=F.define({combine(e){return qt(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new dg(e),scrollToMatch:e=>J.scrollIntoView(e)})}}),Mh=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||gh(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?` +`:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Uh(this):new Lh(this)}getCursor(e,t=0,n){let r=e.doc?e:R.create({doc:e});return n??=r.doc.length,this.regexp?zh(this,r,t,n):Fh(this,r,t,n)}},Nh=class{constructor(e){this.spec=e}};function Ph(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function Fh(e,t,n,r){let i;return e.wholeWord&&(i=Ih(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=Ph(e.test,t,i)),new lh(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function Ih(e,t){return(n,r,i,a)=>((a>n||a+i.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Fh(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function Rh(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function zh(e,t,n,r){let i;return e.wholeWord&&(i=Hh(t.charCategorizer(t.selection.main.head))),e.test&&(i=Rh(e.test,t,i)),new fh(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function Bh(e,t){return e.slice(N(e,t,!1),t)}function Vh(e,t){return e.slice(t,N(e,t))}function Hh(e){return(t,n,r)=>!r[0].length||(e(Bh(r.input,r.index))!=L.Word||e(Vh(r.input,r.index))!=L.Word)&&(e(Vh(r.input,r.index+r[0].length))!=L.Word||e(Bh(r.input,r.index+r[0].length))!=L.Word)}var Uh=class extends Nh{nextMatch(e,t,n){let r=zh(this.spec,e,n,e.doc.length).next();return r.done&&(r=zh(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=zh(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=zh(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},Wh=I.define(),Gh=I.define(),Kh=pt.define({create(e){return new qh(ag(e).create(),null)},update(e,t){for(let n of t.effects)n.is(Wh)?e=new qh(n.value.create(),e.panel):n.is(Gh)&&(e=new qh(e.query,n.value?ig:null));return e},provide:e=>ll.from(e,e=>e.panel)}),qh=class{constructor(e,t){this.query=e,this.panel=t}},Jh=H.mark({class:`cm-searchMatch`}),Yh=H.mark({class:`cm-searchMatch cm-searchMatch-selected`}),Xh=G.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Kh))}update(e){let t=e.state.field(Kh);(t!=e.startState.field(Kh)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return H.none;let{view:n}=this,r=new tn;for(let t=0,i=n.visibleRanges,a=i.length;ti[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?Yh:Jh)})}return r.finish()}},{decorations:e=>e.decorations});function Zh(e){return t=>{let n=t.state.field(Kh,!1);return n&&n.query.spec.valid?e(t,n):cg(t)}}var Qh=Zh((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=P.single(r.from,r.to),a=e.state.facet(jh);return e.dispatch({selection:i,effects:[hg(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),sg(e),!0}),$h=Zh((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=P.single(i.from,i.to),o=e.state.facet(jh);return e.dispatch({selection:a,effects:[hg(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),sg(e),!0}),eg=Zh((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:P.create(n.map(e=>P.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),tg=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new lh(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(P.range(t.value.from,t.value.to))}return t(e.update({selection:P.create(a,o),userEvent:`select.search.matches`})),!0},ng=Zh((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(J.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=P.single(o.from,o.to).map(d),u.push(hg(e,o)),u.push(n.facet(jh).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),rg=Zh((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:J.announce.of(r),userEvent:`input.replace.all`}),!0});function ig(e){return e.state.facet(jh).createPanel(e)}function ag(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(jh);return new Mh({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function og(e){let t=al(e,ig);return t&&t.dom.querySelector(`[main-field]`)}function sg(e){let t=og(e);t&&t==e.root.activeElement&&t.select()}var cg=e=>{let t=e.state.field(Kh,!1);if(t&&t.panel){let n=og(e);if(n&&n!=e.root.activeElement){let r=ag(e.state,t.query.spec);r.valid&&e.dispatch({effects:Wh.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[Gh.of(!0),t?Wh.of(ag(e.state,t.query.spec)):I.appendConfig.of(_g)]});return!0},lg=e=>{let t=e.state.field(Kh,!1);if(!t||!t.panel)return!1;let n=al(e,ig);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Gh.of(!1)}),!0},ug=[{key:`Mod-f`,run:cg,scope:`editor search-panel`},{key:`F3`,run:Qh,shift:$h,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:Qh,shift:$h,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:lg,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:tg},{key:`Mod-Alt-g`,run:vh},{key:`Mod-d`,run:Ah,preventDefault:!0}],dg=class{constructor(e){this.view=e;let t=this.query=e.state.field(Kh).query.spec;this.commit=this.commit.bind(this),this.searchField=B(`input`,{value:t.search,placeholder:fg(e,`Find`),"aria-label":fg(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=B(`input`,{value:t.replace,placeholder:fg(e,`Replace`),"aria-label":fg(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=B(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=B(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=B(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return B(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=B(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>Qh(e),[fg(e,`next`)]),n(`prev`,()=>$h(e),[fg(e,`previous`)]),n(`select`,()=>eg(e),[fg(e,`all`)]),B(`label`,null,[this.caseField,fg(e,`match case`)]),B(`label`,null,[this.reField,fg(e,`regexp`)]),B(`label`,null,[this.wordField,fg(e,`by word`)]),...e.state.readOnly?[]:[B(`br`),this.replaceField,n(`replace`,()=>ng(e),[fg(e,`replace`)]),n(`replaceAll`,()=>rg(e),[fg(e,`replace all`)])],B(`button`,{name:`close`,onclick:()=>lg(e),"aria-label":fg(e,`close`),type:`button`},[`×`])])}commit(){let e=new Mh({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Wh.of(e)}))}keydown(e){Ps(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?$h:Qh)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),ng(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(Wh)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(jh).top}};function fg(e,t){return e.state.phrase(t)}var pg=30,mg=/[\s\.,:;?!]/;function hg(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-pg),o=Math.min(i,n+pg),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;es.length-pg;e--)if(!mg.test(s[e-1])&&mg.test(s[e])){s=s.slice(0,e);break}}return J.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var gg=J.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),_g=[Kh,gt.low(Xh),gg],vg=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ed(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Tg(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function yg(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function bg(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;etypeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:bg(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function Sg(e,t){return n=>{for(let t=ed(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var Cg=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function wg(e){return e.selection.main.from}function Tg(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var Eg=jt.define();function Dg(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:P.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var Og=new WeakMap;function kg(e){if(!Array.isArray(e))return e;let t=Og.get(e);return t||Og.set(e,t=xg(e)),t}var Ag=I.define(),jg=I.define(),Mg=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(v=Ke(c))==v.toLowerCase()?v==v.toUpperCase()?0:2:1;(!r||y==1&&h||_==0&&y!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(g=!1)),_=y,r+=qe(c)}return u==s&&a[0]==0&&g?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(g?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?qe(Ge(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},Ng=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Ig,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Fg(e(n),t(n)),optionClass:(e,t)=>n=>Fg(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Fg(e,t){return e?t?e+` `+t:e:t}function Ig(e,t,n,r,i,a){let o=e.textDirection==U.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var Lg=I.define();function Rg(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;eo&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return oe.position-t.position).map(e=>e.render)}function zg(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var Bg=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(Pg);this.optionContent=Rg(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=zg(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:Lg.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(Pg).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:jg.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=zg(r.length,i,e.state.facet(Pg).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected=this.range.to)&&(this.range=zg(t.options.length,t.selected,this.view.state.facet(Pg).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>fi(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&Hg(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;an.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.tonew Bg(n,e,t)}function Hg(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function Ug(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function Wg(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(Pg);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new Cg(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new Ng(n):new Mg(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new Cg(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.namet.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):Ug(e.completion)>Ug(c)&&(s[s.length-1]=e),c=e.completion}return s}var Gg=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,Xg(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=Wg(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(Pg).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e,1e8),create:a_,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Kg=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Zg,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(Pg),i=(r.override||n.languageDataAt(`autocomplete`,wg(n)).map(kg)).map(e=>(this.active.find(t=>t.source==e)||new $g(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(n_));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!qg(i,this.active)||o?a=Gg.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new $g(e.source,0):e));for(let e of t.effects)e.is(Lg)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Jg:Yg}};function qg(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Zg=[];function Qg(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(Eg);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var $g=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=Qg(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(Ag))i=new e(i.source,1,n.value);else if(n.is(jg))i=new e(i.source,0);else if(n.is(n_))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(wg(e.state))}},e_=class e extends $g{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=wg(t.state);if(o>a||!r||n&2&&(wg(t.startState)==this.from||oe.map(t))}}),r_=pt.define({create(){return Kg.start()},update(e,t){return e.update(t)},provide:e=>[Gc.from(e,e=>e.tooltip),J.contentAttributes.from(e,e=>e.attrs)]});function i_(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(r_).active.find(e=>e.source==t.source);return r instanceof e_&&(typeof n==`string`?e.dispatch({...Dg(e.state,n,r.from,r.to),annotations:Eg.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var a_=Vg(r_,i_);function o_(e,t=`option`){return n=>{let r=n.state.field(r_,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:Lg.of(s)}),!0}}var s_=e=>{let t=e.state.field(r_,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.state.field(r_,!1)?(e.dispatch({effects:Ag.of(!0)}),!0):!1,l_=e=>{let t=e.state.field(r_,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:jg.of(null)}),!0)},u_=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},d_=50,f_=1e3,p_=G.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(r_).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(r_),n=e.state.facet(Pg);if(!e.selectionSet&&!e.docChanged&&e.startState.field(r_)==t)return;let r=e.transactions.some(e=>{let t=Qg(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;td_&&Date.now()-n.time>f_){for(let e of n.context.abortListeners)try{e()}catch(e){fi(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(Ag)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(r_);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Pg).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new vg(t,wg(t),e.explicit,this.view),r=new u_(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:jg.of(null)}),fi(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Pg).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Pg),n=this.view.state.field(r_);for(let r=0;re.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new $g(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:n_.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(r_,!1);if(t&&t.tooltip&&this.view.state.facet(Pg).closeOnBlur){let n=t.open&&nl(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:jg.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Ag.of(!1)}),20),this.composing=0}}}),m_=typeof navigator==`object`&&/Win/.test(navigator.platform),h_=gt.highest(J.domEventHandlers({keydown(e,t){let n=t.state.field(r_,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(m_&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&i_(t,r),!1}})),g_=J.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),__=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},v_=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,Ye.TrackDel),r=t.mapPos(this.to,1,Ye.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},y_=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;tnew v_(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new __(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},b_=H.widget({widget:new class extends qn{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),x_=H.mark({class:`cm-snippetField`}),S_=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=H.set(e.map(e=>(e.from==e.to?b_:x_).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},C_=I.define({map(e,t){return e&&e.map(t)}}),w_=I.define(),T_=pt.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(C_))return n.value;if(n.is(w_)&&e)return new S_(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>J.decorations.from(e,e=>e?e.deco:H.none)});function E_(e,t){return P.create(e.filter(e=>e.field==t).map(e=>P.range(e.from,e.to)))}function D_(e){let t=y_.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:j.of(a)},scrollIntoView:!0,annotations:n?[Eg.of(n),Pt.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=E_(o,0)),o.some(e=>e.field>0)){let t=new S_(o,0),n=c.effects=[C_.of(t)];e.state.field(T_,!1)===void 0&&n.push(I.appendConfig.of([T_,j_,N_,g_]))}e.dispatch(e.state.update(c))}}function O_(e){return({state:t,dispatch:n})=>{let r=t.field(T_,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:E_(r.ranges,i),effects:C_.of(a?null:new S_(r.ranges,i)),scrollIntoView:!0})),!0}}var k_=[{key:`Tab`,run:O_(1),shift:O_(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(T_,!1)?(t(e.update({effects:C_.of(null)})),!0):!1}],A_=F.define({combine(e){return e.length?e[0]:k_}}),j_=gt.highest(js.compute([A_],e=>e.facet(A_)));function M_(e,t){return{...t,apply:D_(e)}}var N_=J.domEventHandlers({mousedown(e,t){let n=t.state.field(T_,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:E_(n.ranges,i.field),effects:C_.of(n.ranges.some(e=>e.field>i.field)?new S_(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),P_={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},F_=I.define({map(e,t){return t.mapPos(e,-1,Ye.TrackAfter)??void 0}}),I_=new class extends Jt{};I_.startSide=1,I_.endSide=-1;var L_=pt.define({create(){return z.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(F_)&&(e=e.update({add:[I_.range(n.value,n.value+1)]}));return e}});function R_(){return[U_,L_]}var z_=`()[]{}<>«»»«[]{}`;function B_(e){for(let t=0;t<16;t+=2)if(z_.charCodeAt(t)==e)return z_.charAt(t+1);return Ke(e<128?e:e+1)}function V_(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||P_}var H_=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),U_=J.inputHandler.of((e,t,n,r)=>{if((H_?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&qe(Ge(r,0))==1||t!=i.from||n!=i.to)return!1;let a=G_(e.state,r);return a?(e.dispatch(a),!0):!1}),W_=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=V_(e,e.selection.main.head).brackets||P_.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=J_(e.doc,t.head);for(let i of n)if(i==r&&q_(e.doc,t.head)==B_(Ge(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:P.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function G_(e,t){let n=V_(e,e.selection.main.head),r=n.brackets||P_.brackets;for(let i of r){let a=B_(Ge(i,0));if(t==i)return a==i?Z_(e,i,r.indexOf(i+i+i)>-1,n):Y_(e,i,a,n.before||P_.before);if(t==a&&K_(e,e.selection.main.from))return X_(e,i,a)}return null}function K_(e,t){let n=!1;return e.field(L_).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function q_(e,t){let n=e.sliceString(t,t+2);return n.slice(0,qe(Ge(n,0)))}function J_(e,t){let n=e.sliceString(t-2,t);return qe(Ge(n,0))==n.length?n:n.slice(1)}function Y_(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:F_.of(a.to+t.length),range:P.range(a.anchor+t.length,a.head+t.length)};let o=q_(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:F_.of(a.head+t.length),range:P.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function X_(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&q_(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:P.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function Z_(e,t,n,r){let i=r.stringPrefixes||P_.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:F_.of(r.to+t.length),range:P.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=q_(e.doc,o),c;if(s==t){if(Q_(e,o))return{changes:{insert:t+t,from:o},effects:F_.of(o+t.length),range:P.cursor(o+t.length)};if(K_(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:P.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=ev(e,o-2*t.length,i))>-1&&Q_(e,c))return{changes:{insert:t+t+t+t,from:o},effects:F_.of(o+t.length),range:P.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=L.Word&&ev(e,o,i)>-1&&!$_(e,o,t,i))return{changes:{insert:t+t,from:o},effects:F_.of(o+t.length),range:P.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function Q_(e,t){let n=ed(e).resolveInner(t+1);return n.parent&&n.from==t}function $_(e,t,n,r){let i=ed(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function ev(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=L.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=L.Word)return n}return-1}function tv(e={}){return[h_,r_,Pg.of(e),p_,rv,g_]}var nv=[{key:`Ctrl-Space`,run:c_},{mac:"Alt-`",run:c_},{mac:`Alt-i`,run:c_},{key:`Escape`,run:l_},{key:`ArrowDown`,run:o_(!0)},{key:`ArrowUp`,run:o_(!1)},{key:`PageDown`,run:o_(!0,`page`)},{key:`PageUp`,run:o_(!1,`page`)},{key:`Enter`,run:s_}],rv=gt.highest(js.computeN([Pg],e=>e.facet(Pg).defaultKeymap?[nv]:[])),iv=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},av=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(yv).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new tn,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;et.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=Av(s);if(i)o.add(n,n,H.widget({widget:new Cv(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,H.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e{if(!(t&&i.diagnostics.indexOf(t)<0)){if(!r)r=new iv(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new iv(r.from,n,r.diagnostic)}}),r}function sv(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(yv).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(lv))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function cv(e,t){return e.field(fv,!1)?t:t.concat(I.appendConfig.of(Mv))}var lv=I.define(),uv=I.define(),dv=I.define(),fv=pt.define({create(){return new av(H.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=ov(n,e.selected.diagnostic,i)||ov(n,null,i)}!n.size&&i&&t.state.facet(yv).autoPanel&&(i=null),e=new av(n,i,r)}for(let n of t.effects)if(n.is(lv)){let r=t.state.facet(yv).autoPanel?n.value.length?Tv.open:null:e.panel;e=av.init(n.value,r,t.state)}else n.is(uv)?e=new av(e.diagnostics,n.value?Tv.open:null,e.selected):n.is(dv)&&(e=new av(e.diagnostics,e.panel,n.value));return e},provide:e=>[ll.from(e,e=>e.panel),J.decorations.from(e,e=>e.diagnostics)]}),pv=H.mark({class:`cm-lintRange cm-lintRange-active`});function mv(e,t,n){let{diagnostics:r}=e.state.field(fv),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(tSv(e,t,!1)))}var gv=e=>{let t=e.state.field(fv,!1);(!t||!t.panel)&&e.dispatch({effects:cv(e.state,[uv.of(!0)])});let n=al(e,Tv.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},_v=e=>{let t=e.state.field(fv,!1);return!t||!t.panel?!1:(e.dispatch({effects:uv.of(!1)}),!0)},vv=[{key:`Mod-Shift-m`,run:gv,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(fv,!1);if(!t)return!1;let n=e.state.selection.main,r=ov(t.diagnostics,null,n.to+1);return!r&&(r=ov(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),tl(e,r.from,1,{tooltip:jv,until:e=>e.docChanged||e.newSelection.main.headr.to}),!0)}}],yv=F.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),...qt(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:bv,tooltipFilter:bv,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function bv(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function xv(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function Sv(e,t,n){let r=n?xv(t.actions):[];return B(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},B(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=ov(e.state.field(fv).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),B(`u`,s.slice(c,c+1)),s.slice(c+1)];return B(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&B(`div`,{class:`cm-diagnosticSource`},t.source))}var Cv=class extends qn{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return B(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},wv=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=Sv(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},Tv=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(t.keyCode==27)_v(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=xv(n.actions);for(let i=0;i{for(let t=0;t_v(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(fv).selected;if(!e)return-1;for(let t=0;t{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;tn&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=ov(this.view.state.field(fv).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:dv.of(t)})}static open(t){return new e(t)}};function Ev(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function Dv(e){return Ev(``,`width="6" height="3"`)}var Ov=J.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:Dv(`#f11`)},".cm-lintRange-warning":{backgroundImage:Dv(`orange`)},".cm-lintRange-info":{backgroundImage:Dv(`#999`)},".cm-lintRange-hint":{backgroundImage:Dv(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:`#86714a80`},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:`#2e343e`}}});function kv(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function Av(e){let t=`hint`,n=1;for(let r of e){let e=kv(r.severity);e>n&&(n=e,t=r.severity)}return t}var jv=el(mv,{hideOn:sv}),Mv=[fv,J.decorations.compute([fv],e=>{let{selected:t,panel:n}=e.field(fv);return!t||!n||t.from==t.to?H.none:H.set([pv.range(t.from,t.to)])}),jv,Ov],Nv=function(e){e===void 0&&(e={});var t=e.crosshairCursor,n=t!==void 0&&t,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(W_)),e.defaultKeymap!==!1&&(r=r.concat(oh)),e.searchKeymap!==!1&&(r=r.concat(ug)),e.historyKeymap!==!1&&(r=r.concat(vp)),e.foldKeymap!==!1&&(r=r.concat(Jd)),e.completionKeymap!==!1&&(r=r.concat(nv)),e.lintKeymap!==!1&&(r=r.concat(vv));var i=[];return e.lineNumbers!==!1&&i.push(Ll()),e.highlightActiveLineGutter!==!1&&i.push(Vl()),e.highlightSpecialChars!==!1&&i.push(hc()),e.history!==!1&&i.push($f()),e.foldGutter!==!1&&i.push(rf()),e.drawSelection!==!1&&i.push(Ys()),e.dropCursor!==!1&&i.push(ac()),e.allowMultipleSelections!==!1&&i.push(R.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(kd()),e.syntaxHighlighting!==!1&&i.push(uf(pf,{fallback:!0})),e.bracketMatching!==!1&&i.push(Cf()),e.closeBrackets!==!1&&i.push(R_()),e.autocompletion!==!1&&i.push(tv()),e.rectangularSelection!==!1&&i.push(Mc()),n!==!1&&i.push(Fc()),e.highlightActiveLine!==!1&&i.push(Sc()),e.highlightSelectionMatches!==!1&&i.push(xh()),e.tabSize&&typeof e.tabSize==`number`&&i.push(fd.of(` `.repeat(e.tabSize))),i.concat([js.of(r.flat())]).filter(Boolean)},Pv=`#e5c07b`,Fv=`#e06c75`,Iv=`#56b6c2`,Lv=`#ffffff`,Rv=`#abb2bf`,zv=`#7d8799`,Bv=`#61afef`,Vv=`#98c379`,Hv=`#d19a66`,Uv=`#c678dd`,Wv=`#21252b`,Gv=`#2c313a`,Kv=`#282c34`,qv=`#353a42`,Jv=`#3E4451`,Yv=`#528bff`,Xv=[J.theme({"&":{color:Rv,backgroundColor:Kv},".cm-content":{caretColor:Yv},".cm-cursor, .cm-dropCursor":{borderLeftColor:Yv},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Jv},".cm-panels":{backgroundColor:Wv,color:Rv},".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:Kv,color:zv,border:`none`},".cm-activeLineGutter":{backgroundColor:Gv},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:qv},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:qv,borderBottomColor:qv},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Gv,color:Rv}}},{dark:!0}),uf(of.define([{tag:$.keyword,color:Uv},{tag:[$.name,$.deleted,$.character,$.propertyName,$.macroName],color:Fv},{tag:[$.function($.variableName),$.labelName],color:Bv},{tag:[$.color,$.constant($.name),$.standard($.name)],color:Hv},{tag:[$.definition($.name),$.separator],color:Rv},{tag:[$.typeName,$.className,$.number,$.changed,$.annotation,$.modifier,$.self,$.namespace],color:Pv},{tag:[$.operator,$.operatorKeyword,$.url,$.escape,$.regexp,$.link,$.special($.string)],color:Iv},{tag:[$.meta,$.comment],color:zv},{tag:$.strong,fontWeight:`bold`},{tag:$.emphasis,fontStyle:`italic`},{tag:$.strikethrough,textDecoration:`line-through`},{tag:$.link,color:zv,textDecoration:`underline`},{tag:$.heading,fontWeight:`bold`,color:Fv},{tag:[$.atom,$.bool,$.special($.variableName)],color:Hv},{tag:[$.processingInstruction,$.string,$.inserted],color:Vv},{tag:$.invalid,color:Lv}]))],Zv=J.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),Qv=function(e){e===void 0&&(e={});var t=e,n=t.indentWithTab,r=n===void 0||n,i=t.editable,a=i===void 0||i,o=t.readOnly,s=o!==void 0&&o,c=t.theme,l=c===void 0?`light`:c,u=t.placeholder,d=u===void 0?``:u,f=t.basicSetup,p=f===void 0||f,m=[];switch(r&&m.unshift(js.of([sh])),p&&(typeof p==`boolean`?m.unshift(Nv()):m.unshift(Nv(p))),d&&m.unshift(Ec(d)),l){case`light`:m.push(Zv);break;case`dark`:m.push(Xv);break;case`none`:break;default:m.push(l)}return a===!1&&m.push(J.editable.of(!1)),s&&m.push(R.readOnly.of(!0)),[...m]},$v=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),ey=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}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}},ty=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},ny=null,ry=()=>typeof window>`u`?new ty:(ny||=new ty,ny),iy=J.theme({"& .cm-scroller":{height:`100% !important`}}),ay=null,oy=null;function sy(e,t,n,r,i,a){if(!e&&!t&&!n&&!r&&!i&&!a)return null;var o=JSON.stringify({height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a});return o===ay?oy:(ay=o,oy=J.theme({"&":{height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a}}),oy)}var cy=jt.define(),ly=200,uy=[];function dy(e){var t=e.value,n=e.selection,r=e.onChange,i=e.onStatistics,a=e.onCreateEditor,o=e.onUpdate,s=e.extensions,c=s===void 0?uy:s,l=e.autoFocus,u=e.theme,d=u===void 0?`light`:u,f=e.height,p=f===void 0?null:f,m=e.minHeight,h=m===void 0?null:m,g=e.maxHeight,_=g===void 0?null:g,v=e.width,y=v===void 0?null:v,b=e.minWidth,x=b===void 0?null:b,S=e.maxWidth,C=S===void 0?null:S,w=e.placeholder,ee=w===void 0?``:w,te=e.editable,ne=te===void 0||te,T=e.readOnly,E=T!==void 0&&T,re=e.indentWithTab,D=re===void 0||re,ie=e.basicSetup,ae=ie===void 0||ie,oe=e.root,se=e.initialState,ce=(0,k.useState)(),le=ce[0],ue=ce[1],de=(0,k.useState)(),O=de[0],A=de[1],fe=(0,k.useState)(),pe=fe[0],me=fe[1],he=(0,k.useState)(()=>({current:null}))[0],ge=(0,k.useState)(()=>({current:null}))[0],_e=sy(p,h,_,y,x,C),ve=J.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(cy))&&(he.current?he.current.reset():(he.current=new ey(()=>{if(ge.current){var e=ge.current;ge.current=null,e()}he.current=null},ly),ry().add(he.current)),r(e.state.doc.toString(),e)),i&&i($v(e))}),ye=Qv({theme:d,editable:ne,readOnly:E,placeholder:ee,indentWithTab:D,basicSetup:ae}),be=[ve,..._e?[_e]:[],iy,...ye];return o&&typeof o==`function`&&be.push(J.updateListener.of(o)),be=be.concat(c),(0,k.useLayoutEffect)(()=>{if(le&&!pe){var e={doc:t,selection:n,extensions:be},r=se?R.fromJSON(se.json,e,se.fields):R.create(e);if(me(r),!O){var i=new J({state:r,parent:le,root:oe});A(i),a&&a(i,r)}}return()=>{O&&(me(void 0),A(void 0))}},[le,pe]),(0,k.useEffect)(()=>{e.container&&ue(e.container)},[e.container]),(0,k.useEffect)(()=>()=>{O&&(O.destroy(),A(void 0)),he.current&&=(he.current.cancel(),null)},[O]),(0,k.useEffect)(()=>{l&&O&&O.focus()},[l,O]),(0,k.useEffect)(()=>{O&&O.dispatch({effects:I.reconfigure.of(be)})},[d,c,p,h,_,y,x,C,ee,ne,E,D,ae,r,o]),(0,k.useEffect)(()=>{if(t!==void 0){var e=O?O.state.doc.toString():``;if(O&&t!==e){var n=he.current&&!he.current.isDone,r=()=>{O&&t!==O.state.doc.toString()&&O.dispatch({changes:{from:0,to:O.state.doc.toString().length,insert:t||``},annotations:[cy.of(!0)]})};n?ge.current=r:r()}}},[t,O]),{state:pe,setState:me,view:O,setView:A,container:le,setContainer:ue}}var fy=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],py=(0,k.forwardRef)((e,t)=>{var n=e.className,r=e.value,i=r===void 0?``:r,a=e.selection,o=e.extensions,s=o===void 0?[]:o,c=e.onChange,l=e.onStatistics,u=e.onCreateEditor,d=e.onUpdate,f=e.autoFocus,p=e.theme,m=p===void 0?`light`:p,h=e.height,g=e.minHeight,_=e.maxHeight,v=e.width,y=e.minWidth,b=e.maxWidth,x=e.basicSetup,S=e.placeholder,C=e.indentWithTab,w=e.editable,ee=e.readOnly,te=e.root,ne=e.initialState,T=xe(e,fy),E=(0,k.useRef)(null),re=dy({root:te,value:i,autoFocus:f,theme:m,height:h,minHeight:g,maxHeight:_,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:S,indentWithTab:C,editable:w,readOnly:ee,selection:a,onChange:c,onStatistics:l,onCreateEditor:u,onUpdate:d,extensions:s,initialState:ne}),D=re.state,ie=re.view,ae=re.container,oe=re.setContainer;(0,k.useImperativeHandle)(t,()=>({editor:E.current,state:D,view:ie}),[E,ae,D,ie]);var se=(0,k.useCallback)(e=>{E.current=e,oe(e)},[oe]);if(typeof i!=`string`)throw Error(`value must be typeof string but got `+typeof i);var ce=typeof m==`string`?`cm-theme-`+m:`cm-theme`;return(0,A.jsx)(`div`,be({ref:se,className:``+ce+(n?` `+n:``)},T))});py.displayName=`CodeMirror`;var my=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new hy(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizeo;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new gy(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;rt&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t0&&this.emitLookAhead()}},hy=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},gy=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},_y=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function vy(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var yy=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},by=new yy,xy=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=by,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;in.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t=this.chunk2Pos&&nt.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=by,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},Sy=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;Ty(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};Sy.prototype.contextual=Sy.prototype.fallback=Sy.prototype.extend=!1;var Cy=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?vy(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(Ty(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};Cy.prototype.contextual=Sy.prototype.fallback=Sy.prototype.extend=!1;var wy=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function Ty(e,t,n,r,i,a){let o=0,s=1<0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||Dy(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function Ey(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function Dy(e,t,n,r){let i=Ey(n,r,t);return i<0||Ey(n,r,e)t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var jy=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ay(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ay(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(i instanceof Z){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},My=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new yy)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;rl.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new yy,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new yy,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;te.bufferLength*4?new jy(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;at)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&By(r);if(e)return Oy&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw Oy&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return Oy&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(Y.contextHash)||0)==n))return e.useNode(o,r),Oy&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof Z)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof Z&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),Oy&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;or?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Py(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),Oy&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(Oy&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)Oy&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))Oy&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),Oy&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),Py(o,n)):(!r||r.scoree,Ly=class{constructor(e){this.start=e.start,this.shift=e.shift||Iy,this.reduce=e.reduce||Iy,this.reuse=e.reuse||Iy,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Ry=class e extends vu{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;ne.topRules[t][1]),r=[];for(let e=0;e=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new Jl(t.map((t,i)=>ql.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Hl;let a=vy(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;etypeof e==`number`?new Sy(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new Ny(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=zy(this.data,n+2);else break}r=t(zy(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=zy(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=Vy(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;ee)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scoree.external(n,r)<<1|t}return e.get}var Hy=1,Uy=194,Wy=195,Gy=196,Ky=197,qy=198,Jy=199,Yy=200,Xy=2,Zy=3,Qy=201,$y=24,eb=25,tb=49,nb=50,rb=55,ib=56,ab=57,ob=59,sb=60,cb=61,lb=62,ub=63,db=65,fb=238,pb=71,mb=241,hb=242,gb=243,_b=244,vb=245,yb=246,bb=247,xb=248,Sb=72,Cb=249,wb=250,Tb=251,Eb=252,Db=253,Ob=254,kb=255,Ab=256,jb=73,Mb=77,Nb=263,Pb=112,Fb=130,Ib=151,Lb=152,Rb=155,zb=10,Bb=13,Vb=32,Hb=9,Ub=35,Wb=40,Gb=46,Kb=123,qb=125,Jb=39,Yb=34,Xb=92,Zb=111,Qb=120,$b=78,ex=117,tx=85,nx=new Set([eb,tb,nb,Nb,db,Fb,ib,ab,fb,lb,ub,Sb,jb,Mb,sb,cb,Ib,Lb,Rb,Pb]);function rx(e){return e==zb||e==Bb}function ix(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}var ax=new wy((e,t)=>{let n;if(e.next<0)e.acceptToken(Jy);else if(t.context.flags&sx)rx(e.next)&&e.acceptToken(qy,1);else if(((n=e.peek(-1))<0||rx(n))&&t.canShift(Ky)){let t=0;for(;e.next==Vb||e.next==Hb;)e.advance(),t++;(e.next==zb||e.next==Bb||e.next==Ub)&&e.acceptToken(Ky,-t)}else rx(e.next)&&e.acceptToken(Gy,1)},{contextual:!0}),ox=new wy((e,t)=>{let n=t.context;if(n.flags)return;let r=e.peek(-1);if(r==zb||r==Bb){let t=0,r=0;for(;;){if(e.next==Vb)t++;else if(e.next==Hb)t+=8-t%8;else break;e.advance(),r++}t!=n.indent&&e.next!=zb&&e.next!=Bb&&e.next!=Ub&&(t[e,t|cx])),_x=new Ly({start:mx,reduce(e,t,n,r){return e.flags&sx&&nx.has(t)||(t==pb||t==Sb)&&e.flags&cx?e.parent:e},shift(e,t,n,r){return t==Uy?new px(e,hx(r.read(r.pos,n.pos)),0):t==Wy?e.parent:t==$y||t==rb||t==ob||t==Zy?new px(e,0,sx):gx.has(t)?new px(e,0,gx.get(t)|e.flags&sx):e},hash(e){return e.hash}}),vx=new wy(e=>{for(let t=0;t<5;t++){if(e.next!=`print`.charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let n=e.peek(t);if(n!=Vb&&n!=Hb){n!=Wb&&n!=Gb&&n!=zb&&n!=Bb&&n!=Ub&&e.acceptToken(Hy);return}}}),yx=new wy((e,t)=>{let{flags:n}=t.context,r=n&lx?Yb:Jb,i=(n&ux)>0,a=!(n&dx),o=(n&fx)>0,s=e.pos;for(;!(e.next<0);)if(o&&e.next==Kb){if(e.peek(1)==Kb)e.advance(2);else{if(e.pos==s){e.acceptToken(Zy,1);return}break}}else if(a&&e.next==Xb){if(e.pos==s){e.advance();let t=e.next;t>=0&&(e.advance(),bx(e,t)),e.acceptToken(Xy);return}break}else if(e.next==Xb&&!a&&e.peek(1)>-1)e.advance(2);else if(e.next==r&&(!i||e.peek(1)==r&&e.peek(2)==r)){if(e.pos==s){e.acceptToken(Qy,i?3:1);return}break}else if(e.next==zb){if(i)e.advance();else if(e.pos==s){e.acceptToken(Qy);return}break}else e.advance();e.pos>s&&e.acceptToken(Yy)});function bx(e,t){if(t==Zb)for(let t=0;t<2&&e.next>=48&&e.next<=55;t++)e.advance();else if(t==Qb)for(let t=0;t<2&&ix(e.next);t++)e.advance();else if(t==ex)for(let t=0;t<4&&ix(e.next);t++)e.advance();else if(t==tx)for(let t=0;t<8&&ix(e.next);t++)e.advance();else if(t==$b&&e.next==Kb){for(e.advance();e.next>=0&&e.next!=qb&&e.next!=Jb&&e.next!=Yb&&e.next!=zb;)e.advance();e.next==qb&&e.advance()}}var xx=Eu({'async "*" "**" FormatConversion FormatSpec':$.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":$.controlKeyword,"in not and or is del":$.operatorKeyword,"from def class global nonlocal lambda":$.definitionKeyword,import:$.moduleKeyword,"with as print":$.keyword,Boolean:$.bool,None:$.null,VariableName:$.variableName,"CallExpression/VariableName":$.function($.variableName),"FunctionDefinition/VariableName":$.function($.definition($.variableName)),"ClassDefinition/VariableName":$.definition($.className),PropertyName:$.propertyName,"CallExpression/MemberExpression/PropertyName":$.function($.propertyName),Comment:$.lineComment,Number:$.number,String:$.string,FormatString:$.special($.string),Escape:$.escape,UpdateOp:$.updateOperator,"ArithOp!":$.arithmeticOperator,BitOp:$.bitwiseOperator,CompareOp:$.compareOperator,AssignOp:$.definitionOperator,Ellipsis:$.punctuation,At:$.meta,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace,".":$.derefOperator,", ;":$.separator}),Sx={__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},Cx=Ry.deserialize({version:14,states:"##jQ`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'#FyOOOOQS'#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,5kOOQS1G1`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,5jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!lO!lO!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,5nQdO,5sQdO1G4OOOQS-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<mO#BQQdO,5>mOOQS1G0v1G0vOOQS<rO#KgQdO,5>rO#KrQdO,5>rO#K}QdO,5>qO#L`QdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<VAN>VO$ oQdO<cAN>cO0rQdO1G1|O$!PQtO1G1|P$!ZQdO'#FvOOQS1G2R1G2RP$!hQdO'#F{O$!uQdO7+)jO$#`QdO,5>gOOOO-E9z-E9zOOOW<tO$4{QdO,5>tO1XQdO,5vO$)nQdO,5>vOOQS1G1p1G1pOOQS,5<[,5<[OOQU7+'P7+'PO$+zQdO1G/iO$)nQdO,5wO$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,5S~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!;|!_![!]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:[vx,ox,ax,yx,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>Sx[e]||-1}],tokenPrec:7668}),wx=new gu,Tx=new Set([`Script`,`Body`,`FunctionDefinition`,`ClassDefinition`,`LambdaExpression`,`ForStatement`,`MatchClause`]);function Ex(e){return(t,n,r)=>{if(r)return!1;let i=t.node.getChild(`VariableName`);return i&&n(i,e),!0}}var Dx={FunctionDefinition:Ex(`function`),ClassDefinition:Ex(`class`),ForStatement(e,t,n){if(n){for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name==`VariableName`)t(n,`variable`);else if(n.name==`in`)break}},ImportStatement(e,t){let{node:n}=e,r=n.firstChild?.name==`from`;for(let e=n.getChild(`import`);e;e=e.nextSibling)e.name==`VariableName`&&e.nextSibling?.name!=`as`&&t(e,r?`variable`:`namespace`)},AssignStatement(e,t){for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name==`VariableName`)t(n,`variable`);else if(n.name==`:`||n.name==`AssignOp`)break},ParamList(e,t){for(let n=null,r=e.node.firstChild;r;r=r.nextSibling)r.name==`VariableName`&&(!n||!/\*|AssignOp/.test(n.name))&&t(r,`variable`),n=r},CapturePattern:Ex(`variable`),AsPattern:Ex(`variable`),__proto__:null};function Ox(e,t){let n=wx.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(X.IncludeAnonymous).iterate(t=>{if(t.name){let e=Dx[t.name];if(e&&e(t,a,i)||!i&&Tx.has(t.name))return!1;i=!1}else if(t.to-t.from>8192){for(let n of Ox(e,t.node))r.push(n);return!1}}),wx.set(t,r),r}var kx=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,Ax=[`String`,`FormatString`,`Comment`,`PropertyName`];function jx(e){let t=ed(e.state).resolveInner(e.pos,-1);if(Ax.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&kx.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)Tx.has(n.name)&&(r=r.concat(Ox(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:kx}}var Mx=[`__annotations__`,`__builtins__`,`__debug__`,`__doc__`,`__import__`,`__name__`,`__loader__`,`__package__`,`__spec__`,`False`,`None`,`True`].map(e=>({label:e,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(e=>({label:e,type:`type`}))).concat([`bool`,`bytearray`,`bytes`,`classmethod`,`complex`,`float`,`frozenset`,`int`,`list`,`map`,`memoryview`,`object`,`range`,`set`,`staticmethod`,`str`,`super`,`tuple`,`type`].map(e=>({label:e,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(e=>({label:e,type:`function`}))),Nx=[M_("def ${name}(${params}):\n ${}",{label:`def`,detail:`function`,type:`keyword`}),M_("for ${name} in ${collection}:\n ${}",{label:`for`,detail:`loop`,type:`keyword`}),M_("while ${}:\n ${}",{label:`while`,detail:`loop`,type:`keyword`}),M_(`try: + \${} +except \${error}: + \${}`,{label:`try`,detail:`/ except block`,type:`keyword`}),M_(`if \${}: + +`,{label:`if`,detail:`block`,type:`keyword`}),M_(`if \${}: + \${} +else: + \${}`,{label:`if`,detail:`/ else block`,type:`keyword`}),M_("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:`class`,detail:`definition`,type:`keyword`}),M_("import ${module}",{label:`import`,detail:`statement`,type:`keyword`}),M_("from ${module} import ${names}",{label:`from`,detail:`import`,type:`keyword`})],Px=Sg(Ax,xg(Mx.concat(Nx)));function Fx(e){let{node:t,pos:n}=e,r=e.lineIndent(n,-1),i=null;for(;;){let a=t.childBefore(n);if(!a)break;if(a.name==`Comment`)n=a.from;else if(a.name==`Body`||a.name==`MatchBody`)e.baseIndentFor(a)+e.unit<=r&&(i=a),t=a;else if(a.name==`MatchClause`)t=a;else if(a.type.is(`Statement`))t=a;else break}return i}function Ix(e,t){let n=e.baseIndentFor(t),r=e.lineAt(e.pos,-1),i=r.from+r.text.length;return/^\s*($|#)/.test(r.text)&&e.node.ton?null:n+e.unit}var Lx=$u.define({name:`python`,parser:Cx.configure({props:[_d.add({Body:e=>Ix(e,/^\s*(#|$)/.test(e.textAfter)&&Fx(e)||e.node)??e.continue(),MatchBody:e=>Ix(e,Fx(e)||e.node)??e.continue(),IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),"ForStatement WhileStatement":e=>/^\s*else:/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except[ :]|finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),MatchStatement:e=>/^\s*case /.test(e.textAfter)?e.baseIndent+e.unit:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":Ed({closing:`)`}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":Ed({closing:`}`}),"ArrayExpression ArrayComprehensionExpression":Ed({closing:`]`}),MemberExpression:e=>e.baseIndent+e.unit,"String FormatString":()=>null,Script:e=>{let t=Fx(e);return(t&&Ix(e,t))??e.continue()}}),jd.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":Md,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)}),"String FormatString":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.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 Rx(){return new ud(Lx,[Lx.data.of({autocomplete:jx}),Lx.data.of({autocomplete:Px})])}var zx=({mobileView:e,activeMode:t,onSelectMode:n,isAutocompleteEnabled:r,onToggleAutocomplete:o,onResetStarterCode:s,code:c,onChangeCode:l,sandboxRunning:h,sandboxError:v,sandboxResults:y,onRunSandbox:b,savingReference:x,savedRefSuccess:S,saveRefError:C,onSaveReference:ee,aiLoading:te,aiError:ne,aiResult:T,onAiEvaluation:E,optimalTime:re,optimalSpace:D})=>(0,A.jsxs)(`div`,{className:`w-full lg:w-[54%] flex flex-col bg-[#fffdfa] overflow-y-auto custom-scrollbar ${e===`code`?`flex`:`hidden lg:flex`}`,children:[(0,A.jsxs)(`div`,{className:`shrink-0 bg-[#f7f5ed] border-b-2 border-ink-black p-2.5 sm:px-4 flex flex-wrap items-center justify-between gap-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[9px]`,children:[(0,A.jsxs)(`button`,{onClick:()=>n(`ai`),className:`px-3 py-1.5 border-2 border-ink-black cursor-pointer font-bold transition-all flex items-center gap-1.5 ${t===`ai`?`bg-purple-200 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] translate-y-0.5 text-ink-black`:`bg-white text-trash-gray hover:bg-slate-100`}`,children:[(0,A.jsx)(m,{className:`w-3.5 h-3.5 text-purple-600`}),`AI EVALUATION`]}),(0,A.jsxs)(`button`,{onClick:()=>n(`offline`),className:`px-3 py-1.5 border-2 border-ink-black cursor-pointer font-bold transition-all flex items-center gap-1.5 ${t===`offline`?`bg-amber-200 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] translate-y-0.5 text-ink-black`:`bg-white text-trash-gray hover:bg-slate-100`}`,children:[(0,A.jsx)(se,{className:`w-3.5 h-3.5 text-amber-600`}),`OFFLINE SELF-GRADE`]})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 cursor-pointer select-none`,children:[(0,A.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>o(e.target.checked),className:`sr-only peer`}),(0,A.jsx)(`div`,{className:`relative w-7 h-3.5 bg-slate-300 border border-ink-black rounded-full peer peer-checked:bg-grass-green transition-all after:content-[''] after:absolute after:top-[1px] after:left-[2px] after:bg-white after:border after:border-ink-black after:rounded-full after:h-2 after:w-2 after:transition-all peer-checked:after:translate-x-3`}),(0,A.jsx)(`span`,{className:`text-[8px] font-arcade font-bold text-trash-gray peer-checked:text-ink-black`,children:`AUTOCOMPLETE`})]}),(0,A.jsxs)(`button`,{onClick:s,className:`px-2 py-1 bg-white hover:bg-slate-100 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-ink-black text-[8px] font-arcade font-bold flex items-center gap-1.5 cursor-pointer transition-all`,title:`Reset to starter code`,children:[(0,A.jsx)(d,{className:`w-2.5 h-2.5`}),(0,A.jsx)(`span`,{children:`RESET`})]}),(0,A.jsxs)(`button`,{onClick:()=>l(``),className:`px-2 py-1 bg-white hover:bg-rose-50 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-rose-700 text-[8px] font-arcade font-bold flex items-center gap-1.5 cursor-pointer transition-all`,title:`Clear editor`,children:[(0,A.jsx)(i,{className:`w-2.5 h-2.5 text-rose-600`}),(0,A.jsx)(`span`,{children:`CLEAR`})]})]})]}),t===`ai`?(0,A.jsxs)(`div`,{className:`p-4 sm:p-5 flex-1 flex flex-col space-y-4`,children:[(0,A.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-[260px] sm:min-h-[300px]`,children:[(0,A.jsxs)(`div`,{className:`bg-[#1E293B] text-slate-300 px-3 py-1.5 border-t-2 border-x-2 border-ink-black flex items-center justify-between font-arcade text-[8px]`,children:[(0,A.jsx)(`span`,{className:`text-[#4ADE80] font-bold`,children:`solution.py`}),(0,A.jsx)(`span`,{className:`text-slate-400`,children:`Recall & type from memory`})]}),(0,A.jsx)(`div`,{className:`flex-1 border-2 border-ink-black overflow-hidden bg-[#1E293B]`,children:(0,A.jsx)(py,{value:c,onChange:l,placeholder:`def solve(nums): + # Write your solution from memory here...`,height:`100%`,theme:`dark`,extensions:[Rx()],basicSetup:{autocompletion:r,lineNumbers:!0,foldGutter:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,defaultKeymap:!0,searchKeymap:!0,historyKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0},className:`w-full h-full text-xs font-code-mono`})})]}),(0,A.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3 pt-1`,children:[(0,A.jsx)(`span`,{className:`text-[11px] font-sans text-trash-gray font-semibold leading-tight`,children:`Run zero-token tests instantly in local sandbox, or consult Gemini for deep Big-O & edge case review.`}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,A.jsx)(`button`,{onClick:b,disabled:h||!c.trim(),className:`bg-emerald-600 hover:bg-emerald-700 text-white font-arcade text-[10px] py-2.5 px-4 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-1 active:shadow-none transition-all cursor-pointer font-bold disabled:opacity-50 flex items-center gap-1.5`,title:`Run functional test cases in local Python sandbox (zero tokens)`,children:h?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin`}),(0,A.jsx)(`span`,{children:`TESTING...`})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(de,{className:`w-3.5 h-3.5 fill-white text-white`}),(0,A.jsx)(`span`,{children:`RUN TESTS`})]})}),(0,A.jsx)(`button`,{onClick:E,disabled:te||!c.trim(),className:`bg-purple-600 hover:bg-purple-700 text-white font-arcade text-[10px] py-2.5 px-4 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-1 active:shadow-none transition-all cursor-pointer font-bold disabled:opacity-50 flex items-center gap-1.5`,title:`Deep AI review of Big-O complexity and edge cases`,children:te?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin`}),(0,A.jsx)(`span`,{children:`EVALUATING...`})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m,{className:`w-3.5 h-3.5 text-amber-300`}),(0,A.jsx)(`span`,{children:`GEMINI EVAL`})]})})]})]}),h&&(0,A.jsxs)(`div`,{className:`p-3 border-2 border-ink-black bg-emerald-50 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] flex items-center gap-3 animate-pulse`,children:[(0,A.jsx)(w,{className:`w-5 h-5 text-emerald-600 animate-spin shrink-0`}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h4`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:`SANDBOX EXECUTION IN PROGRESS`}),(0,A.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray font-semibold mt-0.5`,children:`Executing against test cases in isolated Python sandbox...`})]})]}),v&&(0,A.jsxs)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] flex items-center gap-2`,children:[(0,A.jsx)(p,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,A.jsx)(`span`,{children:v})]}),y&&(0,A.jsxs)(`div`,{className:`border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-3.5 ${y.status===`passed`?`bg-[#f0fdf4]`:`bg-[#fff1f2]`}`,children:[(0,A.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-2 pb-2.5 border-b-2 border-dashed border-ink-black`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,A.jsx)(`div`,{className:`w-8 h-8 border-2 border-ink-black flex items-center justify-center font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${y.status===`passed`?`bg-grass-green text-ink-black`:`bg-rose-500 text-white`}`,children:y.status===`passed`?(0,A.jsx)(g,{className:`w-5 h-5 stroke-[3]`}):(0,A.jsx)(p,{className:`w-4 h-4`})}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`div`,{className:`font-arcade text-[10px] font-bold text-ink-black flex items-center gap-1.5 uppercase`,children:y.status===`passed`?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{children:`SANDBOX VERDICT: ALL TESTS PASSED`}),(0,A.jsx)(_,{className:`w-3.5 h-3.5 text-emerald-600 inline`})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`span`,{children:[`SANDBOX VERDICT: `,y.status===`error`?`EXECUTION ERROR`:`TESTS FAILED`]}),(0,A.jsx)(a,{className:`w-3.5 h-3.5 text-rose-600 inline`})]})}),(0,A.jsxs)(`div`,{className:`font-sans text-[11px] text-slate-600 font-semibold`,children:[y.passed_count??0,` of `,y.total_tests??0,` test cases passed (`,(y.duration_ms??0).toFixed(1),`ms execution, 0 tokens)`]})]})]}),y.status===`passed`&&(0,A.jsxs)(`button`,{onClick:ee,disabled:x,className:`px-3 py-1.5 bg-white hover:bg-emerald-100 border-2 border-ink-black text-ink-black font-arcade text-[8px] font-bold flex items-center gap-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 disabled:opacity-50`,children:[x?(0,A.jsx)(w,{className:`w-3 h-3 animate-spin`}):S?(0,A.jsx)(_,{className:`w-3.5 h-3.5 text-emerald-600`}):(0,A.jsx)(f,{className:`w-3.5 h-3.5 text-blue-600`}),(0,A.jsx)(`span`,{children:S?`SAVED TO DB!`:`SAVE AS OFFICIAL SOLUTION`})]})]}),C&&(0,A.jsx)(`div`,{className:`p-2 border border-rose-500 bg-rose-100 text-rose-800 text-[11px] font-semibold`,children:C}),y.results&&y.results.length>0&&(0,A.jsxs)(`div`,{className:`space-y-2`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray uppercase font-bold block`,children:`TEST CASE BREAKDOWN:`}),(0,A.jsx)(`div`,{className:`space-y-1.5 max-h-56 overflow-y-auto custom-scrollbar`,children:y.results.map((e,t)=>(0,A.jsxs)(`div`,{className:`p-2.5 border-2 border-ink-black text-xs font-mono shadow-[2px_2px_0px_0px_rgba(30,41,59,0.3)] ${e.passed?`bg-white`:`bg-rose-50`}`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between font-arcade text-[8px] mb-1`,children:[(0,A.jsxs)(`span`,{className:`font-bold text-ink-black`,children:[`CASE #`,t+1]}),(0,A.jsx)(`span`,{className:e.passed?`text-emerald-700 font-bold`:`text-rose-700 font-bold`,children:e.passed?`✓ PASSED`:`✗ FAILED`})]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-1.5 text-[10px]`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`text-slate-500 block`,children:`Input:`}),(0,A.jsx)(`span`,{className:`font-code-mono text-ink-black font-semibold break-all`,children:JSON.stringify(e.input)})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`text-slate-500 block`,children:`Expected:`}),(0,A.jsx)(`span`,{className:`font-code-mono text-emerald-700 font-semibold break-all`,children:JSON.stringify(e.expected)})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`text-slate-500 block`,children:`Output:`}),(0,A.jsx)(`span`,{className:`font-code-mono font-semibold break-all ${e.passed?`text-emerald-700`:`text-rose-700`}`,children:e.output===void 0?`None`:JSON.stringify(e.output)})]})]}),e.error&&(0,A.jsx)(`div`,{className:`mt-1.5 p-1.5 bg-rose-100 text-rose-900 text-[10px] font-mono border border-rose-300 break-all`,children:e.error})]},t))})]}),y.error&&(0,A.jsx)(`div`,{className:`p-3 bg-[#1E293B] text-rose-400 font-code-mono text-[11px] border-2 border-ink-black overflow-x-auto whitespace-pre-wrap select-text`,children:y.error}),y.status===`passed`&&(0,A.jsx)(`div`,{className:`p-2 bg-emerald-100/70 border border-emerald-300 text-emerald-900 text-xs flex items-center justify-between`,children:(0,A.jsxs)(`span`,{className:`font-sans font-medium`,children:[`✨ Looks great! All unit tests pass. You can save as solution or smash `,(0,A.jsx)(`strong`,{className:`font-arcade text-[9px]`,children:`[3] Smashed It`}),` below.`]})})]}),te&&(0,A.jsxs)(`div`,{className:`p-4 border-2 border-ink-black bg-amber-50 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] flex items-center gap-3 animate-pulse`,children:[(0,A.jsx)(w,{className:`w-6 h-6 text-purple-600 animate-spin shrink-0`}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h4`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:`AI CODE ANALYSIS IN PROGRESS`}),(0,A.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray font-semibold mt-0.5`,children:`Checking edge cases, bounds, and Big-O efficiency against optimal constraints...`})]})]}),ne&&(0,A.jsx)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:ne}),T&&(0,A.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-[#fefce8] p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-4`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between pb-3 border-b-2 border-dashed border-ink-black`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,A.jsx)(`div`,{className:`w-9 h-9 border-2 border-ink-black flex items-center justify-center font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${T.is_correct?`bg-grass-green text-ink-black`:`bg-rose-500 text-white`}`,children:T.is_correct?(0,A.jsx)(g,{className:`w-5 h-5 stroke-[3]`}):(0,A.jsx)(ie,{className:`w-5 h-5`})}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`font-arcade text-[10px] font-bold text-ink-black flex items-center gap-1.5`,children:T.is_correct?(0,A.jsxs)(A.Fragment,{children:[`VERDICT: PASSED`,(0,A.jsx)(_,{className:`w-3.5 h-3.5 text-emerald-600 inline`})]}):(0,A.jsxs)(A.Fragment,{children:[`VERDICT: FAILED`,(0,A.jsx)(a,{className:`w-3.5 h-3.5 text-rose-600 inline`})]})}),(0,A.jsx)(`span`,{className:`font-sans text-[11px] text-slate-600 font-semibold`,children:T.is_correct?`Algorithm matches expected logic and patterns.`:`Bugs or edge-case failures detected.`})]})]}),(0,A.jsx)(`span`,{className:`font-arcade text-[9px] px-2 py-1 border-2 border-ink-black uppercase font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${T.is_correct?`bg-emerald-100 text-emerald-800`:`bg-rose-100 text-rose-800`}`,children:T.is_correct?`CORRECT`:`INCORRECT`})]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,A.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase font-bold`,children:`Time Complexity`}),(0,A.jsxs)(`div`,{className:`flex items-baseline gap-2 mt-1`,children:[(0,A.jsx)(`span`,{className:`font-code-mono text-xs font-bold text-ink-black`,children:T.detected_complexity?.time||`N/A`}),(0,A.jsxs)(`span`,{className:`text-[10px] font-sans text-slate-500 font-semibold`,children:[`(Target: `,re||`O(N)`,`)`]})]})]}),(0,A.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase font-bold`,children:`Space Complexity`}),(0,A.jsxs)(`div`,{className:`flex items-baseline gap-2 mt-1`,children:[(0,A.jsx)(`span`,{className:`font-code-mono text-xs font-bold text-ink-black`,children:T.detected_complexity?.space||`N/A`}),(0,A.jsxs)(`span`,{className:`text-[10px] font-sans text-slate-500 font-semibold`,children:[`(Target: `,D||`O(1)`,`)`]})]})]})]}),T.bugs&&T.bugs.length>0&&(0,A.jsxs)(`div`,{className:`p-3 bg-white border-2 border-ink-black space-y-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,A.jsxs)(`span`,{className:`font-arcade text-[8px] text-rose-600 uppercase font-bold block flex items-center gap-1`,children:[(0,A.jsx)(p,{className:`w-3 h-3 text-rose-500`}),`TRACES & EDGE CASE ISSUES:`]}),(0,A.jsx)(`ul`,{className:`list-disc list-inside text-xs text-slate-800 space-y-1 font-semibold pl-1`,children:T.bugs.map((e,t)=>(0,A.jsx)(`li`,{className:`leading-relaxed select-text`,children:e},t))})]}),T.key_suggestion&&(0,A.jsxs)(`div`,{className:`p-3 bg-amber-50 border-2 border-ink-black space-y-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,A.jsxs)(`span`,{className:`font-arcade text-[8px] text-amber-700 uppercase font-bold block flex items-center gap-1`,children:[(0,A.jsx)(m,{className:`w-3 h-3 text-amber-500`}),`KEY REFACTORING TIP:`]}),(0,A.jsx)(`p`,{className:`text-xs text-slate-800 font-medium leading-relaxed m-0 select-text`,children:T.key_suggestion})]}),(0,A.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-dashed border-ink-black flex items-center justify-between`,children:[(0,A.jsxs)(`span`,{className:`text-xs font-bold text-ink-black flex items-center gap-1.5`,children:[(0,A.jsx)(u,{className:`w-4 h-4 text-primary`}),`AI Recommendation:`]}),(0,A.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-purple-700`,children:T.is_correct?`Click [3] Smashed It to advance!`:`Click [1] Forgot to reset.`})]})]})]}):(0,A.jsxs)(`div`,{className:`p-5 flex-1 space-y-4`,children:[(0,A.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,A.jsxs)(`h3`,{className:`font-arcade text-xs text-ink-black uppercase font-bold flex items-center gap-1.5`,children:[(0,A.jsx)(g,{className:`w-4 h-4 text-emerald-600`}),`Self-Grading Protocol`]}),(0,A.jsxs)(`ol`,{className:`list-decimal list-inside space-y-2 font-sans text-xs text-slate-700 font-medium leading-relaxed`,children:[(0,A.jsxs)(`li`,{children:[`Open the `,(0,A.jsx)(`strong`,{className:`text-ink-black`,children:`Solution`}),` tab in the left pane to compare logic.`]}),(0,A.jsx)(`li`,{children:`Verify if you correctly remembered pointer movements, memoization tables, or data structures.`}),(0,A.jsx)(`li`,{children:`Check if your mental solution satisfies the optimal Big-O limits.`}),(0,A.jsx)(`li`,{children:`Select your Spaced Repetition grade using the action bar below or keyboard keys 1, 2, or 3.`})]})]}),(0,A.jsxs)(`div`,{className:`p-4 bg-amber-50 border-2 border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] space-y-2`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[9px] text-trash-gray uppercase font-bold block`,children:`Grading Impact on Leitner Box:`}),(0,A.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-2 font-arcade text-[8px] text-ink-black`,children:[(0,A.jsxs)(`div`,{className:`p-2 bg-rose-100 border border-ink-black`,children:[(0,A.jsx)(`div`,{className:`font-bold text-rose-700`,children:`[1] FORGOT`}),(0,A.jsx)(`div`,{className:`font-sans text-[10px] text-slate-600 font-medium mt-1`,children:`Resets to Box 1`})]}),(0,A.jsxs)(`div`,{className:`p-2 bg-amber-100 border border-ink-black`,children:[(0,A.jsx)(`div`,{className:`font-bold text-amber-700`,children:`[2] MIXED`}),(0,A.jsx)(`div`,{className:`font-sans text-[10px] text-slate-600 font-medium mt-1`,children:`Keeps same box`})]}),(0,A.jsxs)(`div`,{className:`p-2 bg-emerald-100 border border-ink-black`,children:[(0,A.jsx)(`div`,{className:`font-bold text-emerald-700`,children:`[3] SMASHED IT`}),(0,A.jsx)(`div`,{className:`font-sans text-[10px] text-slate-600 font-medium mt-1`,children:`Advances +1 box`})]})]})]})]})]}),Bx=({gradeError:e,onDismissGradeError:t,submitting:n,submittingRating:r,onGrade:i})=>(0,A.jsxs)(`div`,{className:`shrink-0 bg-[#f8f5eb] border-t-[3px] border-ink-black p-3 sm:p-3.5 flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3 shadow-[0_-3px_0_0_rgba(30,41,59,0.08)]`,children:[(0,A.jsxs)(`div`,{className:`hidden sm:flex items-center gap-2 font-arcade text-[8px] text-trash-gray font-bold uppercase`,children:[(0,A.jsx)(`span`,{className:`px-1.5 py-0.5 bg-white border border-ink-black`,children:`KEYS 1-4`}),(0,A.jsx)(`span`,{children:`QUICK GRADE`})]}),(0,A.jsxs)(`div`,{className:`flex-1 flex flex-col`,children:[e&&(0,A.jsxs)(`div`,{className:`p-2.5 mb-2 bg-red-100 border-2 border-red-500 text-red-800 text-xs font-semibold shadow-[2px_2px_0px_0px_#1E293B] flex items-center justify-between`,children:[(0,A.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,A.jsx)(p,{className:`w-4 h-4 text-red-600 shrink-0`}),e]}),(0,A.jsx)(`button`,{onClick:t,className:`text-red-900 font-bold hover:underline cursor-pointer ml-2 text-xs`,children:`Dismiss`})]}),(0,A.jsxs)(`div`,{className:`flex gap-2 sm:gap-3`,children:[(0,A.jsx)(`button`,{onClick:()=>i(1),disabled:n,className:`flex-1 bg-[#ff4d4d] hover:bg-[#ff3333] border-[3px] border-ink-black py-2.5 sm:py-3 px-2 arcade-btn cursor-pointer disabled:opacity-60 text-white flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 1 on keyboard`,children:r===1?(0,A.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin`})}):(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-xs sm:text-sm font-extrabold tracking-wide uppercase`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[9px] px-1 py-0.5 bg-black/20 rounded`,children:`1`}),(0,A.jsx)(`span`,{children:`Again`})]})})}),(0,A.jsx)(`button`,{onClick:()=>i(2),disabled:n,className:`flex-1 bg-[#ff9933] hover:bg-[#ff8000] border-[3px] border-ink-black py-2.5 sm:py-3 px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 2 on keyboard`,children:r===2?(0,A.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-xs sm:text-sm font-extrabold tracking-wide uppercase`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[9px] px-1 py-0.5 bg-black/10 rounded`,children:`2`}),(0,A.jsx)(`span`,{children:`Hard`})]})})}),(0,A.jsx)(`button`,{onClick:()=>i(3),disabled:n,className:`flex-1 bg-[#4ade80] hover:bg-[#22c55e] border-[3px] border-ink-black py-2.5 sm:py-3 px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 3 on keyboard`,children:r===3?(0,A.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-xs sm:text-sm font-extrabold tracking-wide uppercase`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[9px] px-1 py-0.5 bg-black/10 rounded`,children:`3`}),(0,A.jsx)(`span`,{children:`Good`})]})})}),(0,A.jsx)(`button`,{onClick:()=>i(4),disabled:n,className:`flex-1 bg-[#60a5fa] hover:bg-[#3b82f6] border-[3px] border-ink-black py-2.5 sm:py-3 px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 4 on keyboard`,children:r===4?(0,A.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-xs sm:text-sm font-extrabold tracking-wide uppercase`,children:[(0,A.jsx)(`span`,{className:`font-arcade text-[9px] px-1 py-0.5 bg-black/10 rounded`,children:`4`}),(0,A.jsx)(`span`,{children:`Easy`})]})})})]})]})]}),Vx=({nextMilestone:e,activatingMilestone:t,onActivateNextMilestone:n,onOpenOnboarding:r,onOpenJourney:i,onOpenCreateProblem:a,onOpenWindow:s,overrideProblemId:c,onClearOverride:l,hasCustomOnboardingModal:u,isOnboardingOpen:f,onCloseOnboarding:p,onCompletedOnboarding:_,currentUserId:b})=>(0,A.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-[#fdf8e1] p-6 overflow-y-auto custom-scrollbar`,children:(0,A.jsxs)(`div`,{className:`w-full max-w-lg bg-paper-white border-[4px] border-ink-black gadget-shadow p-6 sm:p-8 relative overflow-hidden text-center space-y-6`,children:[(0,A.jsx)(`div`,{className:`absolute top-0 left-0 right-0 h-3 bg-gradient-to-r from-grass-green via-amber-300 to-highlight-pink`}),(0,A.jsxs)(`div`,{className:`relative inline-block mt-2`,children:[(0,A.jsx)(`div`,{className:`w-20 h-20 bg-amber-300 border-[3px] border-ink-black rounded-2xl flex items-center justify-center mx-auto gadget-shadow rotate-[-3deg] hover:rotate-0 transition-transform`,children:(0,A.jsx)(o,{className:`w-10 h-10 text-ink-black stroke-[2.5]`})}),(0,A.jsx)(`div`,{className:`absolute -bottom-2 -right-2 bg-grass-green border-2 border-ink-black px-2 py-0.5 font-arcade text-[8px] text-ink-black font-bold uppercase shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:`100% DONE`})]}),(0,A.jsxs)(`div`,{className:`space-y-2`,children:[(0,A.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-1 bg-emerald-100 border-2 border-ink-black text-emerald-800 font-arcade text-[9px] font-bold`,children:[(0,A.jsx)(g,{className:`w-3 h-3 stroke-[3]`}),` ALL CARDS MASTERED FOR TODAY`]}),(0,A.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-extrabold text-ink-black font-headline-md tracking-tight`,children:`Queue Clear! Fantastic Job!`}),(0,A.jsx)(`p`,{className:`text-xs sm:text-sm font-sans text-trash-gray max-w-md mx-auto leading-relaxed font-semibold`,children:`All spaced-repetition cards have been reviewed. Your streak is safe and memory intervals are locked in for tomorrow.`})]}),e&&(0,A.jsxs)(`div`,{className:`p-4 sm:p-5 bg-gradient-to-br from-amber-50 to-orange-50 border-[3px] border-ink-black gadget-shadow text-left space-y-3`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-amber-800 uppercase tracking-wider flex items-center gap-1.5`,children:[(0,A.jsx)(C,{className:`w-3.5 h-3.5 text-amber-600`}),`NEXT UNEXPLORED MILESTONE`]}),(0,A.jsxs)(`span`,{className:`font-mono text-[10px] font-bold px-2 py-0.5 rounded bg-amber-900/10 text-amber-900 border border-amber-900/20`,children:[`LC #`,e.problem_number]})]}),(0,A.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,A.jsxs)(`div`,{className:`min-w-0`,children:[(0,A.jsx)(`h3`,{className:`font-headline-md text-base sm:text-lg font-bold text-ink-black truncate`,children:e.name}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2 mt-1 flex-wrap`,children:[(0,A.jsx)(`span`,{className:`px-2 py-0.5 rounded font-arcade text-[8px] font-bold uppercase text-white ${e.difficulty===`Easy`?`bg-emerald-600`:e.difficulty===`Medium`?`bg-amber-600`:`bg-rose-600`}`,children:e.difficulty}),(0,A.jsx)(`span`,{className:`px-2 py-0.5 rounded font-arcade text-[8px] bg-purple-100 text-purple-800 border border-purple-300 font-bold`,children:e.pattern}),(0,A.jsxs)(`span`,{className:`text-[11px] font-code-mono text-slate-600`,children:[`T: `,e.time_complexity,` | S: `,e.space_complexity]})]})]}),(0,A.jsx)(`button`,{onClick:n,disabled:t,className:`px-4 py-2.5 bg-grass-green hover:bg-emerald-400 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 flex items-center justify-center gap-1.5 disabled:opacity-50`,children:t?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(w,{className:`w-3.5 h-3.5 animate-spin`}),(0,A.jsx)(`span`,{children:`ACTIVATING...`})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m,{className:`w-3.5 h-3.5 text-amber-700`}),(0,A.jsx)(`span`,{children:`ACTIVATE & REVIEW NOW`})]})})]})]}),(0,A.jsxs)(`div`,{className:`p-4 sm:p-5 bg-gradient-to-r from-amber-100 via-amber-200 to-yellow-100 border-[3px] border-ink-black gadget-shadow text-left flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3`,children:[(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-amber-900 uppercase flex items-center gap-1.5`,children:[(0,A.jsx)(y,{className:`w-3.5 h-3.5 text-amber-700`}),`FAST-TRACK EXPEDITION ENROLLMENT`]}),(0,A.jsx)(`h3`,{className:`font-headline-md text-base sm:text-lg font-bold text-ink-black`,children:`Already Solved Problems Elsewhere?`}),(0,A.jsx)(`p`,{className:`font-sans text-xs text-trash-gray font-semibold max-w-md`,children:`Check off algorithms and LeetCode problems you already know to enroll them into Box 1, 2, or 3 and advance your journey map.`})]}),(0,A.jsxs)(`button`,{onClick:r,className:`px-4 py-2.5 bg-amber-400 hover:bg-amber-300 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 flex items-center gap-1.5`,children:[(0,A.jsx)(y,{className:`w-3.5 h-3.5 text-amber-900`}),(0,A.jsx)(`span`,{children:`OPEN 150-PROBLEM CHECKLIST`})]})]}),(0,A.jsxs)(`div`,{className:`border-t-[3px] border-dashed border-ink-black pt-5 space-y-3`,children:[(0,A.jsx)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold text-left`,children:`CONTINUE PRACTICING:`}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2.5`,children:[(0,A.jsxs)(`button`,{onClick:i,className:`p-3 bg-amber-100 hover:bg-amber-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsx)(C,{className:`w-4 h-4 text-amber-600`}),(0,A.jsx)(h,{className:`w-3 h-3 text-ink-black`})]}),(0,A.jsxs)(`div`,{className:`mt-2`,children:[(0,A.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Journey Trail`}),(0,A.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`150 Curated nodes`})]})]}),(0,A.jsxs)(`button`,{onClick:a,className:`p-3 bg-purple-100 hover:bg-purple-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsx)(oe,{className:`w-4 h-4 text-purple-700`}),(0,A.jsx)(h,{className:`w-3 h-3 text-ink-black`})]}),(0,A.jsxs)(`div`,{className:`mt-2`,children:[(0,A.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Add Problem`}),(0,A.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`New LeetCode entry`})]})]}),(0,A.jsxs)(`button`,{onClick:()=>s?.(`companion`),className:`p-3 bg-yellow-100 hover:bg-yellow-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsx)(`span`,{className:`material-symbols-outlined text-amber-600 text-lg`,children:`castle`}),(0,A.jsx)(h,{className:`w-3 h-3 text-ink-black`})]}),(0,A.jsxs)(`div`,{className:`mt-2`,children:[(0,A.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Princess Tower`}),(0,A.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`Visit Aurelia`})]})]}),(0,A.jsxs)(`button`,{onClick:()=>s?.(`computer`),className:`p-3 bg-cyan-100 hover:bg-cyan-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsx)(v,{className:`w-4 h-4 text-cyan-700`}),(0,A.jsx)(h,{className:`w-3 h-3 text-ink-black`})]}),(0,A.jsxs)(`div`,{className:`mt-2`,children:[(0,A.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`File Explorer`}),(0,A.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`Browse all files`})]})]})]})]}),c&&l&&(0,A.jsxs)(`button`,{onClick:l,className:`mt-3 bg-white hover:bg-slate-100 border-[3px] border-ink-black text-ink-black font-bold px-4 py-2 text-xs uppercase tracking-wide shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer inline-flex items-center gap-2`,children:[(0,A.jsx)(d,{className:`w-3.5 h-3.5`}),` Return to Scheduled Queue`]}),!u&&(0,A.jsx)(E,{isOpen:f,onClose:p,onCompleted:_,userId:b})]})});function Hx({overrideProblemId:e,onClearOverride:t,onOpenWindow:n,onOpenJourney:r,onOpenCreateProblem:i,onOpenOnboarding:a,refreshTrigger:o}){let[s,c]=(0,k.useState)(`ai`),[l,u]=(0,k.useState)(`spec`),[d,f]=(0,k.useState)(`spec`),[p,m]=(0,k.useState)(null),[h,g]=(0,k.useState)(!1),[_,y]=(0,k.useState)(()=>localStorage.getItem(`isAutocompleteEnabled`)!==`false`),{reviews:b,setReviews:x,loading:S,submitting:C,submittingRating:ee,gradeError:ne,setGradeError:re,code:D,setCode:ie,nextMilestone:ae,activatingMilestone:oe,currentUserId:se,fetchQueue:le,handleGrade:de,handleActivateNextMilestone:O,handleResetStarterCode:pe}=he({overrideProblemId:e,refreshTrigger:o,onClearOverride:t,onOpenOnboarding:a,setIsOnboardingOpen:g}),{sandboxRunning:me,sandboxResults:be,sandboxError:xe,savingReference:Se,savedRefSuccess:Ce,saveRefError:we,handleRunSandbox:Te,handleSaveReference:Ee}=ge(),{aiLoading:De,aiResult:Oe,aiError:ke,explainLoading:Ae,explanationText:je,explainError:Me,aiSolutionLoading:Ne,aiSolutionError:j,handleAiEvaluation:Pe,handleExplainCode:Fe,handleFetchAiSolution:Ie}=_e();(0,k.useEffect)(()=>{let e=e=>{let t=e.target;t?.closest(`.cm-editor`)||t?.tagName===`INPUT`||t?.tagName===`TEXTAREA`||t?.isContentEditable||b.length===0||C||(e.key===`1`?(e.preventDefault(),de(1)):e.key===`2`?(e.preventDefault(),de(2)):e.key===`3`?(e.preventDefault(),de(3)):e.key===`4`&&(e.preventDefault(),de(4)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[de,b.length,C]);let Le=(e,t)=>{navigator.clipboard.writeText(e),m(t),setTimeout(()=>m(null),1800)},Re=(0,k.useCallback)(()=>{r?r():n?.(`journey`)},[r,n]),ze=(0,k.useCallback)(()=>{i?i():n?.(`createProblem`)},[i,n]),Be=(0,k.useCallback)(()=>{a?a():g(!0)},[a]);if(S)return(0,A.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-[#fdf8e1] text-ink-black`,children:(0,A.jsxs)(`div`,{className:`flex flex-col items-center gap-4 p-8 bg-paper-white border-[3px] border-ink-black gadget-shadow text-center max-w-xs`,children:[(0,A.jsx)(`div`,{className:`w-12 h-12 bg-amber-200 border-2 border-ink-black flex items-center justify-center animate-spin`,children:(0,A.jsx)(w,{className:`w-6 h-6 text-ink-black`})}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h3`,{className:`font-arcade text-xs text-ink-black uppercase tracking-wider font-bold`,children:`LOADING QUEUE`}),(0,A.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray mt-1 font-semibold`,children:`Fetching scheduled FSRS review cards...`})]})]})});if(b.length===0)return(0,A.jsx)(Vx,{nextMilestone:ae,activatingMilestone:oe,onActivateNextMilestone:O,onOpenOnboarding:Be,onOpenJourney:Re,onOpenCreateProblem:ze,onOpenWindow:n,overrideProblemId:e,onClearOverride:t,hasCustomOnboardingModal:!!a,isOnboardingOpen:h,onCloseOnboarding:()=>g(!1),onCompletedOnboarding:le,currentUserId:se});let Ve=b[0],M=Ve?.problems||{},He=M.problem_number?T(M.problem_number):te(M.id||``),N=fe({...He,...M,examples:M.examples&&M.examples.length>0?M.examples:He?.examples,constraints:M.constraints&&(Array.isArray(M.constraints)?M.constraints.length>0:M.constraints)?M.constraints:He?.constraints}),Ue=M.reference_code||He?.reference_solution||``;return(0,A.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] flex flex-col overflow-hidden select-none`,children:[(0,A.jsx)(ve,{problem:M,totalInQueue:b.length,fsrsState:Ve.fsrs_state??0,overrideProblemId:e,onClearOverride:t,onOpenJourney:Re,onOpenCreateProblem:ze,onOpenOnboarding:Be}),(0,A.jsxs)(`div`,{className:`lg:hidden shrink-0 bg-amber-100 border-b-[3px] border-ink-black px-3 py-1.5 flex gap-2 overflow-x-auto`,children:[(0,A.jsxs)(`button`,{onClick:()=>f(`spec`),className:`px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 ${d===`spec`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,A.jsx)(ue,{className:`w-3 h-3`}),`SPEC`]}),(0,A.jsxs)(`button`,{onClick:()=>f(`code`),className:`px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 ${d===`code`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,A.jsx)(ce,{className:`w-3 h-3`}),`CODE STUDIO`]}),(0,A.jsxs)(`button`,{onClick:()=>f(`ref`),className:`px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 ${d===`ref`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,A.jsx)(v,{className:`w-3 h-3`}),`SOLUTION`]})]}),(0,A.jsxs)(`div`,{className:`flex-1 flex flex-col lg:flex-row overflow-hidden`,children:[(0,A.jsx)(ye,{leftTab:l,onSelectLeftTab:e=>{u(e),e===`ref`?f(`ref`):e===`spec`&&f(`spec`)},mobileView:d,problem:M,catalogProb:He,parsed:N,effectiveReferenceCode:Ue,copiedSnippet:p,onCopyText:Le,code:D,savingReference:Se,savedRefSuccess:Ce,onSaveReference:()=>Ee(Ve,D,e=>{x(t=>t.map((t,n)=>n===0?{...t,problems:{...t.problems,reference_code:e}}:t))}),aiSolutionLoading:Ne,aiSolutionError:j,onFetchAiSolution:()=>Ie(Ve,e=>{x(t=>t.map((t,n)=>n===0?{...t,problems:{...t.problems,reference_code:e}}:t))}),explainLoading:Ae,explainError:Me,explanationText:je,onExplainCode:()=>Fe(Ve),activeReview:Ve}),(0,A.jsx)(zx,{mobileView:d,activeMode:s,onSelectMode:c,isAutocompleteEnabled:_,onToggleAutocomplete:e=>{y(e),localStorage.setItem(`isAutocompleteEnabled`,String(e))},onResetStarterCode:pe,code:D,onChangeCode:ie,sandboxRunning:me,sandboxError:xe,sandboxResults:be,onRunSandbox:()=>Te(Ve,D),savingReference:Se,savedRefSuccess:Ce,saveRefError:we,onSaveReference:()=>Ee(Ve,D,e=>{x(t=>t.map((t,n)=>n===0?{...t,problems:{...t.problems,reference_code:e}}:t))}),aiLoading:De,aiError:ke,aiResult:Oe,onAiEvaluation:()=>Pe(Ve,D),optimalTime:M.optimal_time||`O(N)`,optimalSpace:M.optimal_space||`O(1)`})]}),(0,A.jsx)(Bx,{gradeError:ne,onDismissGradeError:()=>re(null),submitting:C,submittingRating:ee,onGrade:de}),!a&&(0,A.jsx)(E,{isOpen:h,onClose:()=>g(!1),onCompleted:le,userId:se})]})}export{Hx as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/Settings-CiPNPtHx.js b/algospaced-ui/dist/assets/Settings-CiPNPtHx.js new file mode 100644 index 0000000000000000000000000000000000000000..c443419829eb285b24ec6f3a519b3ed40fccade7 --- /dev/null +++ b/algospaced-ui/dist/assets/Settings-CiPNPtHx.js @@ -0,0 +1 @@ +import{a as e,c as t,t as n}from"./jsx-runtime-UoOgdb2P.js";import{n as r,t as i}from"./info-P8wDUvT9.js";import{t as a}from"./rotate-ccw-CucqdZpm.js";import{n as o,t as s}from"./triangle-alert-BOx1I1tY.js";import{D as c,E as l,M as u,N as d,S as f,d as p,f as m,g as h,l as g,p as _,u as v,z as y}from"./index-DUIMMmBx.js";var b=y(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),x=y(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),S=y(`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`}]]),C=y(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),w=y(`key`,[[`path`,{d:`m2 21 9.6-9.6`,key:`9l79m3`}],[`path`,{d:`m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19`,key:`fw8biw`}],[`circle`,{cx:`15.5`,cy:`7.5`,r:`5.5`,key:`4wxmhb`}]]),T=t(e(),1),E=n(),D=[{id:`default`,name:`Default`,desc:`Subject to Availability`},{id:`groq`,name:`Groq`,badge:`Fastest`,desc:`Llama 3.3 & Qwen`,keyPrefix:`gsk_...`,portalUrl:`https://console.groq.com/keys`},{id:`gemini`,name:`Google Gemini`,desc:`Gemini 2.5 / 3.5`,keyPrefix:`AIzaSy...`,portalUrl:`https://aistudio.google.com/app/apikey`},{id:`openrouter`,name:`OpenRouter`,desc:`Multi-Provider`,keyPrefix:`sk-or-v1-...`,portalUrl:`https://openrouter.ai/keys`}];function O(){let[e,t]=(0,T.useState)(()=>localStorage.getItem(`algospaced_custom_ai_provider`)||`default`),[n,y]=(0,T.useState)(()=>localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``),[O,k]=(0,T.useState)(!1),[A,j]=(0,T.useState)(null),[M,N]=(0,T.useState)(()=>g()),[P,F]=(0,T.useState)(null),[I,L]=(0,T.useState)(()=>v().currentFloor),R=!!(n.trim()&&e!=="default"),z=e!=="default"&&!n.trim(),B=D.find(t=>t.id===e),V=e=>{t(e),localStorage.setItem(`algospaced_custom_ai_provider`,e),j(e==="default"?{type:`info`,text:`Switched to Server Default (Shared Pool).`}:{type:`info`,text:`Switched to ${e.toUpperCase()}.`}),setTimeout(()=>j(null),3e3)};return(0,E.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] p-5 sm:p-6 flex flex-col gap-4 select-none font-sans text-ink-black overflow-y-auto custom-scrollbar`,children:[(0,E.jsxs)(`div`,{className:`flex flex-col gap-0.5 border-b-[3px] border-ink-black pb-2.5`,children:[(0,E.jsxs)(`h3`,{className:`font-headline-md font-bold text-sm m-0 flex items-center gap-2 tracking-wide`,children:[(0,E.jsx)(w,{className:`w-4 h-4 text-ink-black`}),`API & AI Configuration`]}),(0,E.jsx)(`p`,{className:`text-[11px] text-trash-gray font-medium m-0`,children:`Configure your AI model provider..`})]}),(0,E.jsx)(`div`,{className:`px-4 py-3 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] transition-all ${R?`bg-emerald-50`:z?`bg-rose-50`:`bg-amber-50/70`}`,children:(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[R?(0,E.jsx)(f,{className:`w-4 h-4 text-emerald-600 shrink-0`}):z?(0,E.jsx)(b,{className:`w-4 h-4 text-rose-600 shrink-0`}):(0,E.jsx)(x,{className:`w-4 h-4 text-amber-600 shrink-0`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`text-xs font-bold font-headline-md text-ink-black flex items-center gap-1.5`,children:(0,E.jsxs)(`span`,{children:[`Active:`,` `,R?`${e.toUpperCase()} (Custom Key)`:z?`${e.toUpperCase()} (Key Required)`:`Default`]})}),(0,E.jsx)(`div`,{className:`text-[10px] text-trash-gray font-medium`,children:R?`Requests are routed directly through your personal API key.`:z?`Enter your API key below to activate this provider.`:`Using basic, free built-in developer keys with auto-failover.`})]})]}),(0,E.jsx)(`span`,{className:`px-2 py-0.5 text-[9px] font-bold font-arcade uppercase border-2 border-ink-black shrink-0 ${R?`bg-emerald-300 text-emerald-950`:z?`bg-rose-300 text-rose-950`:`bg-amber-200 text-amber-950`}`,children:R?`ACTIVE`:z?`NEEDS KEY`:`LIMITED`})]})}),(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-4`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider mb-2 font-headline-md flex items-center gap-1.5`,children:[(0,E.jsx)(x,{className:`w-3.5 h-3.5 text-ink-black`}),`Select Provider`]}),(0,E.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2`,children:D.map(t=>{let n=e===t.id;return(0,E.jsxs)(`button`,{type:`button`,onClick:()=>V(t.id),className:`p-2.5 border-[2px] text-left transition-all cursor-pointer flex flex-col justify-between rounded ${n?`border-ink-black bg-[#ffe24c] shadow-[2px_2px_0px_0px_#1E293B] font-bold`:`border-slate-300 bg-slate-50 hover:bg-slate-100 text-slate-700`}`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,E.jsx)(`span`,{className:`text-xs font-bold font-headline-md`,children:t.name}),t.badge&&(0,E.jsx)(`span`,{className:`text-[8px] font-bold uppercase px-1 py-0.2 bg-orange-100 text-orange-700 rounded border border-orange-300`,children:t.badge})]}),(0,E.jsx)(`span`,{className:`text-[9px] mt-1 text-slate-600 leading-tight block`,children:t.desc})]},t.id)})})]}),e==="default"?(0,E.jsxs)(`div`,{className:`p-3.5 bg-slate-50 border border-slate-200 rounded flex items-start gap-3`,children:[(0,E.jsx)(s,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs text-slate-700`,children:[(0,E.jsxs)(`span`,{className:`font-bold text-ink-black`,children:[`Shared Quotas (`,(0,E.jsx)(`i`,{children:`limited`}),`)`]}),(0,E.jsx)(`p`,{className:`text-[11px] text-trash-gray m-0 leading-relaxed`,children:`Powered by shared, basic developer keys. Because limits are shared with everyone, requests may fail. Use your own provider keys above for stable performance.`})]})]}):(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,E.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md flex items-center gap-1.5`,children:[(0,E.jsx)(w,{className:`w-3.5 h-3.5 text-ink-black`}),B?.name,` API Key`]}),B?.portalUrl&&(0,E.jsxs)(`a`,{href:B.portalUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-[10px] text-sky-600 hover:text-sky-800 font-medium flex items-center gap-1 no-underline`,children:[(0,E.jsx)(`span`,{children:`Get API Key`}),(0,E.jsx)(r,{className:`w-3 h-3`})]})]}),(0,E.jsxs)(`div`,{className:`relative`,children:[(0,E.jsx)(`input`,{type:O?`text`:`password`,value:n,onChange:e=>y(e.target.value),placeholder:`Enter ${B?.keyPrefix||`API Key`}`,className:`w-full bg-white border-[2px] border-ink-black rounded py-2 pl-3 pr-9 text-ink-black placeholder-slate-400 focus:outline-none focus:border-sky-600 text-xs font-code-mono`}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>k(!O),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-trash-gray hover:text-ink-black cursor-pointer bg-transparent border-0 outline-none p-1`,title:O?`Hide API key`:`Show API key`,children:O?(0,E.jsx)(S,{className:`w-3.5 h-3.5`}):(0,E.jsx)(C,{className:`w-3.5 h-3.5`})})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[10px] text-trash-gray font-medium`,children:[(0,E.jsx)(c,{className:`w-3.5 h-3.5 text-emerald-600 shrink-0`}),(0,E.jsx)(`span`,{children:`Stored locally in your browser. Sent directly via request headers.`})]}),(0,E.jsxs)(`div`,{className:`flex gap-2 pt-1`,children:[(0,E.jsxs)(`button`,{onClick:()=>{let t=n.trim();if(!t){j({type:`error`,text:`Please enter an API key for ${e.toUpperCase()}.`}),setTimeout(()=>j(null),3e3);return}localStorage.setItem(`algospaced_custom_api_key`,t),localStorage.setItem(`sandbox_gemini_api_key`,t),localStorage.setItem(`algospaced_custom_ai_provider`,e),j({type:`success`,text:`${e.toUpperCase()} API key saved successfully.`}),setTimeout(()=>j(null),3e3)},className:`flex-1 flex items-center justify-center gap-1.5 py-2 border-[2px] border-ink-black bg-[#ffe24c] hover:bg-yellow-300 text-xs font-bold text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:[(0,E.jsx)(o,{className:`w-3.5 h-3.5`}),`Save Key`]}),n&&(0,E.jsx)(`button`,{onClick:()=>{localStorage.removeItem(`algospaced_custom_api_key`),localStorage.removeItem(`sandbox_gemini_api_key`),y(``),j({type:`info`,text:`Cleared custom API key.`}),setTimeout(()=>j(null),3e3)},className:`px-3 py-2 border-[2px] border-slate-300 bg-white hover:bg-slate-50 text-xs font-bold text-slate-700 hover:text-rose-600 shadow-[2px_2px_0px_0px_rgba(0,0,0,0.05)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:`Clear Key`})]})]}),A&&(0,E.jsxs)(`div`,{className:`p-2.5 border-[2px] border-ink-black text-xs font-medium rounded flex items-center gap-2 ${A.type===`success`?`bg-emerald-100 border-emerald-600 text-emerald-900`:A.type===`error`?`bg-rose-100 border-rose-600 text-rose-900`:`bg-sky-100 border-sky-600 text-sky-900`}`,children:[A.type===`success`?(0,E.jsx)(d,{className:`w-3.5 h-3.5 shrink-0`}):A.type===`error`?(0,E.jsx)(b,{className:`w-3.5 h-3.5 shrink-0`}):(0,E.jsx)(i,{className:`w-3.5 h-3.5 shrink-0`}),A.text]}),e!=="default"&&(0,E.jsx)(`div`,{className:`pt-2 border-t border-slate-200 flex justify-end`,children:(0,E.jsxs)(`button`,{onClick:()=>{localStorage.removeItem(`algospaced_custom_api_key`),localStorage.removeItem(`sandbox_gemini_api_key`),localStorage.setItem(`algospaced_custom_ai_provider`,`default`),y(``),t(`default`),j({type:`info`,text:`Reset to Server Default provider.`}),setTimeout(()=>j(null),3e3)},className:`flex items-center gap-1.5 py-1.5 px-3 border border-slate-300 bg-slate-50 hover:bg-slate-100 text-[11px] font-bold text-slate-600 hover:text-ink-black transition-all cursor-pointer rounded`,children:[(0,E.jsx)(a,{className:`w-3 h-3 text-slate-500`}),`Reset to Server Default`]})})]}),(0,E.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-4`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(`div`,{className:`w-7 h-7 rounded bg-[#FFE24C] border-[2px] border-ink-black flex items-center justify-center shadow-[1px_1px_0px_0px_#1E293B]`,children:(0,E.jsx)(l,{className:`w-4 h-4 text-ink-black`})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black m-0`,children:`Princess AI Companion & RPG Settings`}),(0,E.jsx)(`p`,{className:`text-[10px] text-trash-gray font-medium m-0`,children:`Trapped Princess Persona, Study Break Timer & 8-bit RPG Audio`})]})]}),(0,E.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,E.jsx)(`span`,{className:`text-[11px] font-bold text-ink-black font-headline-md uppercase`,children:M.enabled?`Enabled`:`Disabled`}),(0,E.jsx)(`input`,{type:`checkbox`,checked:M.enabled,onChange:e=>N(t=>({...t,enabled:e.target.checked})),className:`w-4 h-4 accent-amber-500 cursor-pointer`})]})]}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,E.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,E.jsx)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md`,children:`Companion Name`}),(0,E.jsx)(`input`,{type:`text`,value:M.name,onChange:e=>N(t=>({...t,name:e.target.value})),placeholder:`e.g. Princess Aurelia`,className:`bg-white border-[2px] border-ink-black rounded py-2 px-3 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600`})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,E.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md flex items-center gap-1`,children:[(0,E.jsx)(u,{className:`w-3.5 h-3.5 text-amber-700`}),`Study Break Reminder`]}),(0,E.jsxs)(`select`,{value:M.breakIntervalMinutes,onChange:e=>N(t=>({...t,breakIntervalMinutes:Number(e.target.value)})),className:`bg-white border-[2px] border-ink-black rounded py-2 px-3 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600 cursor-pointer`,children:[(0,E.jsx)(`option`,{value:25,children:`Every 25 Minutes (Classic Pomodoro)`}),(0,E.jsx)(`option`,{value:45,children:`Every 45 Minutes`}),(0,E.jsx)(`option`,{value:60,children:`Every 60 Minutes`}),(0,E.jsx)(`option`,{value:0,children:`Disabled (No automatic break popups)`})]})]})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,E.jsx)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md`,children:`Princess Backstory & Persona Prompt`}),(0,E.jsx)(`textarea`,{rows:2,value:M.backstory,onChange:e=>N(t=>({...t,backstory:e.target.value})),placeholder:`Describe her background, tone, and connection to your DSA studies...`,className:`bg-white border-[2px] border-ink-black rounded p-2.5 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600 resize-y`})]}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1`,children:[(0,E.jsxs)(`label`,{className:`flex items-center gap-2.5 p-2.5 bg-white border border-slate-300 rounded cursor-pointer hover:border-ink-black transition-all`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:M.soundEnabled,onChange:e=>{let t=e.target.checked;N(e=>({...e,soundEnabled:t})),h(!t)},className:`w-4 h-4 accent-amber-500 cursor-pointer`}),(0,E.jsxs)(`div`,{className:`text-xs`,children:[(0,E.jsx)(`span`,{className:`font-bold text-ink-black block`,children:`8-bit Sound Effects`}),(0,E.jsx)(`span`,{className:`text-[10px] text-trash-gray`,children:`Typewriter blips, chimes & fanfare`})]})]}),(0,E.jsxs)(`label`,{className:`flex items-center gap-2.5 p-2.5 bg-white border border-slate-300 rounded cursor-pointer hover:border-ink-black transition-all`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:M.autoPopupEnabled,onChange:e=>N(t=>({...t,autoPopupEnabled:e.target.checked})),className:`w-4 h-4 accent-amber-500 cursor-pointer`}),(0,E.jsxs)(`div`,{className:`text-xs`,children:[(0,E.jsx)(`span`,{className:`font-bold text-ink-black block`,children:`Spontaneous RPG Popups`}),(0,E.jsx)(`span`,{className:`text-[10px] text-trash-gray`,children:`Speech bubbles for breaks & milestones`})]})]})]}),(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-slate-200`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>{m(M),F({type:`success`,text:`Princess Companion settings saved!`}),setTimeout(()=>F(null),3e3)},className:`flex items-center gap-1.5 py-2 px-4 border-[2px] border-ink-black bg-[#ffe24c] hover:bg-yellow-300 text-xs font-bold text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:[(0,E.jsx)(o,{className:`w-3.5 h-3.5`}),`Save Companion Settings`]}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>{N(_),m(_),F({type:`info`,text:`Reset companion to default settings.`}),setTimeout(()=>F(null),3e3)},className:`py-2 px-3 border border-slate-300 bg-white hover:bg-slate-50 text-xs font-bold text-slate-700 transition-all cursor-pointer rounded`,children:`Default Persona`})]}),(0,E.jsxs)(`button`,{type:`button`,onClick:()=>{if(window.confirm(`Are you sure you want to reset your Spire Journey progress back to 0 problems?`)){let e=p();L(e.currentFloor),F({type:`info`,text:`Spire journey progress reset to 0 problems.`}),setTimeout(()=>F(null),3e3)}},className:`flex items-center gap-1 py-1.5 px-3 border border-rose-300 bg-rose-50 hover:bg-rose-100 text-rose-700 text-[11px] font-bold transition-all cursor-pointer rounded`,children:[(0,E.jsx)(a,{className:`w-3 h-3 text-rose-500`}),(0,E.jsxs)(`span`,{children:[`Reset Journey (`,I,`/150 LC)`]})]})]}),P&&(0,E.jsxs)(`div`,{className:`p-2.5 border-[2px] border-ink-black text-xs font-medium rounded flex items-center gap-2 ${P.type===`success`?`bg-emerald-100 border-emerald-600 text-emerald-900`:`bg-sky-100 border-sky-600 text-sky-900`}`,children:[(0,E.jsx)(d,{className:`w-3.5 h-3.5 shrink-0`}),P.text]})]}),(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-2.5`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,E.jsx)(i,{className:`w-3.5 h-3.5 text-[#0ea5e9]`}),(0,E.jsx)(`h4`,{className:`text-xs font-bold uppercase font-headline-md m-0`,children:`Get Free API Keys`})]}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-2 text-[10px]`,children:[(0,E.jsxs)(`a`,{href:`https://console.groq.com/keys`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,E.jsx)(`span`,{children:`Groq Cloud`}),(0,E.jsx)(r,{className:`w-3 h-3 text-slate-400`})]}),(0,E.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Fast inference with generous free rate limits.`})]}),(0,E.jsxs)(`a`,{href:`https://aistudio.google.com/app/apikey`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,E.jsx)(`span`,{children:`Google AI Studio`}),(0,E.jsx)(r,{className:`w-3 h-3 text-slate-400`})]}),(0,E.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Free Gemini Flash API quota.`})]}),(0,E.jsxs)(`a`,{href:`https://openrouter.ai/keys`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,E.jsx)(`span`,{children:`OpenRouter`}),(0,E.jsx)(r,{className:`w-3 h-3 text-slate-400`})]}),(0,E.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Unified API for open-weights models.`})]})]})]})]})}export{O as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/TerminalEmulator-C4E1edMP.js b/algospaced-ui/dist/assets/TerminalEmulator-C4E1edMP.js new file mode 100644 index 0000000000000000000000000000000000000000..9fac721a6f93277413b604a3fa94ad6bda7cb547 --- /dev/null +++ b/algospaced-ui/dist/assets/TerminalEmulator-C4E1edMP.js @@ -0,0 +1 @@ +import{a as e,c as t,i as n,t as r}from"./jsx-runtime-UoOgdb2P.js";var i=t(e(),1),a=r();function o(e,t){if(e.length===0||t.length===0)return[`Empty result set.`];let n={};e.forEach(e=>{n[e]=e.length}),t.forEach(t=>{e.forEach(e=>{let r=t[e]!==null&&t[e]!==void 0?String(t[e]):`NULL`;r.length>(n[e]||0)&&(n[e]=r.length)})});let r=`+`+e.map(e=>`-`.repeat(n[e]+2)).join(`+`)+`+`,i=[r,`|`+e.map(e=>` ${e.padEnd(n[e])} `).join(`|`)+`|`,r];return t.forEach(t=>{let r=`|`+e.map(e=>` ${(t[e]!==null&&t[e]!==void 0?String(t[e]):`NULL`).padEnd(n[e])} `).join(`|`)+`|`;i.push(r)}),i.push(r),i}function s({onOpenWindow:e,onClose:t}){let[r,s]=(0,i.useState)([`AlgoSpaced OS [Version 1.0.24-beta]`,`(c) Retro Arcade Systems. All rights reserved.`,``,`Type "help" for a list of available commands.`,``]),[c,l]=(0,i.useState)(``),u=(0,i.useRef)(null);(0,i.useEffect)(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[r]);let d=e=>{let t=e.trim(),n=/[^\s"']+|"([^"]*)"|'([^']*)'/g,r=[],i;for(;(i=n.exec(t))!==null;)r.push(i[1]||i[2]||i[0]);return{command:r[0]?.toLowerCase()||``,args:r.slice(1)}},f=async r=>{let i=r.trim();if(i===``){s(e=>[...e,`$`]);return}let{command:a,args:c}=d(i),l=[`$ ${i}`];switch(a){case`help`:l.push(`Available commands:`,` help - Display this documentation`,` streak - Retrieve your active Leitner combo streak metrics`,` sync - Run google drive file import sync`,` reviews - Fetch Leetcode numbers due for daily review`,` python play - Open Daily Python Challenge window`,` sql play - Open Interactive SQL Playground window`,` db init - Initialize SQL session and open playground window`,` db status - Check active SQL session objectives`,` db query [Q] - Execute query and format results inside CLI`,` open - Open window (usage: open queue | journey | system | python | db)`,` clear - Clear terminal buffer`,` exit - Close the terminal shell`);break;case`clear`:s([]);return;case`exit`:l.push(`Closing terminal session...`),setTimeout(()=>{t()},500);break;case`open`:{let t=c[0]?.toLowerCase();t===`queue`||t===`daily`||t===`reviews`?(e(`queue`),l.push(`Launching Daily Queue window...`)):t===`journey`||t===`path`||t===`map`?(e(`journey`),l.push(`Launching Journey Path window...`)):t===`system`||t===`computer`||t===`sys`?(e(`computer`),l.push(`Launching System Information window...`)):t===`python`||t===`challenge`?(e(`python`),l.push(`Launching Daily Python Challenge window...`)):t===`db`||t===`mysql`||t===`sql`?(e(`mysql`),l.push(`Launching MySQL Playground window...`)):l.push(`Usage: open [queue | journey | system | python | db]`);break}case`streak`:l.push(`Connecting to streak.sys database...`);try{let{data:{session:e}}=await n.auth.getSession();if(!e){l.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/streak`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();l.push(`Database Response:`,` Active Streak: ${e.current_streak} days`,` Max Combo: ${e.longest_streak} days`,` Last Activity: ${e.last_active_date?new Date(e.last_active_date).toLocaleDateString():`N/A`}`)}else l.push(`Error: Failed to query database endpoint`)}catch{l.push(`Error: Connection timed out`)}break;case`sync`:l.push(`Initializing Google Drive synchronization sync.exe...`);try{let{data:{session:e}}=await n.auth.getSession();if(!e){l.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/sync`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();l.push(`Sync Result: ${e.message}`)}else l.push(`Error: Sync command failed at backend host`)}catch{l.push(`Error: Cloud host unreachable`)}break;case`reviews`:l.push(`Querying leitner_cards partition...`);try{let{data:{session:e}}=await n.auth.getSession();if(!e){l.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/reviews/due`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();e.length===0?l.push(`Queue status: CLEAR! 0 cards due.`):l.push(`Queue status: ${e.length} card(s) due:`,...e.map(e=>` - LeetCode ${e.problems?.problem_number}: ${e.problems?.name} (Box ${e.box_level})`))}else l.push(`Error: Failed to fetch due items`)}catch{l.push(`Error: Database connection lost`)}break;case`python`:c[0]?.toLowerCase()===`play`?(l.push(`Launching Daily Python Challenge window...`),e(`python`)):l.push(`Usage: python play`);break;case`sql`:case`mysql`:case`db`:{let t=c[0]?.toLowerCase();if(t===`play`)l.push(`Launching MySQL Playground window...`),e(`mysql`);else if(t===`init`){l.push(`Initializing MySQL Playground and launching window...`),e(`mysql`);try{let{data:{session:e}}=await n.auth.getSession();if(!e){l.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/init?refresh=true`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();l.push(`Database Session Created: "${e.title}"`,`Objective: ${e.objective}`)}else l.push(`Error: Failed to initialize DB session on backend host.`)}catch{l.push(`Error: Server connection lost.`)}}else if(t===`status`){l.push(`Fetching SQL playground status...`),e(`mysql`);try{let{data:{session:e}}=await n.auth.getSession();if(!e){l.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/status`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();e.active?l.push(`Active SQL Challenge: "${e.title}"`,`Objective: ${e.objective}`,`Status: ${e.completed?`COMPLETED (Done)`:`IN PROGRESS`}`):l.push(e.message)}else l.push(`Error: Failed to fetch DB status.`)}catch{l.push(`Error: Server timed out.`)}}else if(t===`query`){let t=i.toLowerCase().indexOf(`query`),r=t===-1?``:i.substring(t+5).trim().replace(/^["']|["']$/g,``);if(!r){l.push(`Usage: db query [SQL Statement] - Remember to wrap query in double quotes.`);break}l.push(`Running query: ${r}`),e(`mysql`);try{let{data:{session:e}}=await n.auth.getSession();if(!e){l.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/query`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({query:r})});if(t.ok){let e=await t.json();e.success?(l.push(`Query OK. Affected ${e.rows_affected} rows.`,...o(e.columns,e.rows)),e.is_correct&&l.push(`OBJECTIVE ACHIEVED! Congratulations.`)):l.push(`SQL Error: ${e.error}`)}else l.push(`Error: SQL execution failed.`)}catch{l.push(`Error: Database server unreachable.`)}}else l.push(`Usage: sql play | db init | db status | db query "SELECT..."`);break}default:l.push(`Command not recognized: "${a}". Type "help" for a list of available actions.`)}s(e=>[...e,...l,``])};return(0,a.jsxs)(`div`,{className:`w-full h-full bg-[#1E293B] text-[#4ADE80] font-code-mono p-4 flex flex-col overflow-hidden text-xs md:text-sm select-text`,children:[(0,a.jsx)(`div`,{ref:u,className:`flex-1 overflow-y-auto mb-2 custom-scrollbar space-y-1`,children:r.map((e,t)=>(0,a.jsx)(`div`,{className:`whitespace-pre-wrap leading-relaxed min-h-[1.2em]`,children:e},t))}),(0,a.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),f(c),l(``)},className:`flex items-center gap-1.5 border-t border-slate-700 pt-2 shrink-0 select-none`,children:[(0,a.jsx)(`span`,{className:`font-bold text-[#ffcc00]`,children:`$`}),(0,a.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),className:`flex-1 bg-transparent text-[#4ADE80] outline-none border-none p-0 focus:ring-0 font-code-mono text-xs md:text-sm`,autoFocus:!0,placeholder:`Type command...`})]})]})}export{s as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/confetti.module-rliWwYSJ.js b/algospaced-ui/dist/assets/confetti.module-rliWwYSJ.js new file mode 100644 index 0000000000000000000000000000000000000000..41f4ba6d079c8379ca421defaec5e67bf00ff6ff --- /dev/null +++ b/algospaced-ui/dist/assets/confetti.module-rliWwYSJ.js @@ -0,0 +1,2 @@ +import{z as e}from"./index-DUIMMmBx.js";var t=e(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),n=e(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),r=e(`trophy`,[[`path`,{d:`M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2`,key:`pwuv1l`}],[`path`,{d:`M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2`,key:`1y54w1`}],[`path`,{d:`M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3`,key:`e30mpu`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3`,key:`i0yafy`}]]),i={};(function e(t,n,r,i){var a=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D==`function`&&typeof DOMMatrix==`function`,s=(function(){if(!t.OffscreenCanvas)return!1;try{var e=new OffscreenCanvas(1,1),n=e.getContext(`2d`);n.fillRect(0,0,1,1);var r=e.transferToImageBitmap();n.createPattern(r,`no-repeat`)}catch{return!1}return!0})();function c(){}function l(e){var r=n.exports.Promise,i=r===void 0?t.Promise:r;return typeof i==`function`?new i(e):(e(c,c),null)}var u=(function(e,t){return{transform:function(n){if(e)return n;if(t.has(n))return t.get(n);var r=new OffscreenCanvas(n.width,n.height);return r.getContext(`2d`).drawImage(n,0,0),t.set(n,r),r},clear:function(){t.clear()}}})(s,new Map),d=function(){var e,t,n={},r=0;return typeof requestAnimationFrame==`function`&&typeof cancelAnimationFrame==`function`?(e=function(e){var t=Math.random();return n[t]=requestAnimationFrame(function i(a){r===a||r+16-1i.map(i=>d[i]); +import{a as e,c as t,i as n,n as r,o as i,r as a,t as o}from"./jsx-runtime-UoOgdb2P.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var s=i((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,w());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}}var S=!1,ee=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-tet&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?w():S=!1}}}var w;if(typeof y==`function`)w=function(){y(re)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=re,w=function(){ae.postMessage(null)}}else w=function(){_(re,0)};function oe(t,n){ee=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ee),ee=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,w()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),c=i(((e,t)=>{t.exports=s()})),l=i((t=>{var n=e();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=i((t=>{var n=c(),r=e(),i=u();function a(e){var t=`https://react.dev/errors/`+e;if(1pe||(e.current=fe[pe],fe[pe]=null,pe--)}function O(e,t){pe++,fe[pe]=e.current,e.current=t}var he=me(null),ge=me(null),_e=me(null),ve=me(null);function ye(e,t){switch(O(_e,t),O(ge,e),O(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}D(he),O(he,e)}function k(){D(he),D(ge),D(_e)}function be(e){e.memoizedState!==null&&O(ve,e);var t=he.current,n=Hd(t,e.type);t!==n&&(O(ge,e),O(he,n))}function xe(e){ge.current===e&&(D(he),D(ge)),ve.current===e&&(D(ve),Qf._currentValue=de)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=n.unstable_scheduleCallback,je=n.unstable_cancelCallback,Me=n.unstable_shouldYield,Ne=n.unstable_requestPaint,Pe=n.unstable_now,Fe=n.unstable_getCurrentPriorityLevel,Ie=n.unstable_ImmediatePriority,Le=n.unstable_UserBlockingPriority,Re=n.unstable_NormalPriority,ze=n.unstable_LowPriority,Be=n.unstable_IdlePriority,Ve=n.log,He=n.unstable_setDisableYieldValue,Ue=null,We=null;function Ge(e){if(typeof Ve==`function`&&He(e),We&&typeof We.setStrictMode==`function`)try{We.setStrictMode(Ue,e)}catch{}}var Ke=Math.clz32?Math.clz32:Ye,qe=Math.log,Je=Math.LN2;function Ye(e){return e>>>=0,e===0?32:31-(qe(e)/Je|0)|0}var Xe=256,Ze=262144,Qe=4194304;function A(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=A(n))):i=A(o):i=A(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=A(n))):i=A(o)):i=A(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function j(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tt(){var e=Qe;return Qe<<=1,!(Qe&62914560)&&(Qe=4194304),e}function nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),gn=!1;if(hn)try{var _n={};Object.defineProperty(_n,"passive",{get:function(){gn=!0}}),window.addEventListener(`test`,_n,_n),window.removeEventListener(`test`,_n,_n)}catch{gn=!1}var vn=null,yn=null,bn=null;function xn(){if(bn)return bn;var e,t=yn,n=t.length,r,i=`value`in vn?vn.value:vn.textContent,a=i.length;for(e=0;e=$n),nr=` `,rr=!1;function ir(e,t){switch(e){case`keyup`:return Zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ar(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var or=!1;function sr(e,t){switch(e){case`compositionend`:return ar(t);case`keypress`:return t.which===32?(rr=!0,nr):null;case`textInput`:return e=t.data,e===nr&&rr?null:e;default:return null}}function cr(e,t){if(or)return e===`compositionend`||!Qn&&ir(e,t)?(e=xn(),bn=yn=vn=null,or=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ar(n)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ht(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ht(e.document)}return t}function Pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Fr=hn&&`documentMode`in document&&11>=document.documentMode,Ir=null,Lr=null,Rr=null,zr=!1;function Br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zr||Ir==null||Ir!==Ht(r)||(r=Ir,`selectionStart`in r&&Pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rr&&kr(Rr,r)||(Rr=r,r=Ed(Lr,`onSelect`),0>=o,i-=o,Mi=1<<32-Ke(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),P&&Pi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),P&&Pi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return P&&Pi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),P&&Pi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===w&&Na(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ba(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=yi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=vi(o.type,o.key,o.props,null,e.mode,c),Ba(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Si(o,e.mode,c),c.return=e,e=c}return s(e);case w:return o=Na(o),b(e,r,o,c)}if(ue(o))return h(e,r,o,c);if(se(o)){if(l=se(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,za(o),c);if(o.$$typeof===ee)return b(e,r,sa(e,o),c);Va(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ra=0;var i=b(e,t,n,r);return La=null,i}catch(t){if(t===Da||t===ka)throw t;var a=mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ua=Ha(!0),Wa=Ha(!1),Ga=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=di(e),ui(e,null,n),t}return si(e,r,t,n),di(e)}function Xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}function Za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qa=!1;function $a(){if(Qa){var e=va;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ga=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===_a&&(Qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ga=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function to(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=T.T,s={};T.T=s,Ls(e,!1,t,n);try{var c=i(),l=T.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,xa(c,r),pu(e)):Is(e,t,r,pu(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{E.p=a,o!==null&&s.types!==null&&(o.types=s.types),T.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Os(e).queue;Ts(e,i,t,de,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:de},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},pu())}function As(){return oa(Qf)}function js(){return B().memoizedState}function Ms(){return B().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ja(n);var r=Ya(t,e,n);r!==null&&(hu(r,t,n),Xa(r,t,n)),t={cache:pa()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=ci(e,t,n,r),n!==null&&(hu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,pu())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Or(s,o))return si(e,t,i,0),K===null&&oi(),!1}catch{}if(n=ci(e,t,i,r),n!==null)return hu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(a(479))}else t=ci(e,n,r,2),t!==null&&hu(t,e,2)}function Rs(e){var t=e.alternate;return e===I||t!==null&&t===I}function zs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var Vs={readContext:oa,use:Io,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z};Vs.useEffectEvent=z;var Hs={readContext:oa,use:Io,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(bo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(bo){Ge(!0);try{n(t)}finally{Ge(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ps.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Fs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(No(),e,t)},useTransition:function(){var e=Jo(!1);return e=Ts.bind(null,I,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,i=No();if(P){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),K===null)throw Error(a(349));J&127||Uo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fs(Go.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=K.identifierPrefix;if(P){var n=Ni,r=Mi;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[M]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return H(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=_e.current,Ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=zi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[M]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ui(t,!0)}else e=Bd(e).createTextNode(r),e[M]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ki(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[M]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(a(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[M]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),i=!1}else i=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),H(t),null);case 4:return k(),e===null&&Sd(t.stateNode.containerInfo),H(t),null;case 10:return ea(t.type),H(t),null;case 19:if(D(F),r=t.memoizedState,r===null)return H(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)zc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=go(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_i(n,e),n=n.sibling;return O(F,F.current&1|2),P&&Pi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>tu&&(t.flags|=128,i=!0,zc(r,!1),t.lanes=4194304)}}else{if(!i){if(e=go(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!P)return H(t),null}else 2*Pe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,zc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(H(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,n=F.current,O(F,i?n&1|2:n&1),P&&Pi(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&D(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ea(fa),H(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Vc(e,t){switch(Li(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(fa),k(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(ho(t),t.alternate===null)throw Error(a(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return D(F),null;case 4:return k(),null;case 10:return ea(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&D(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(fa),null;case 25:return null;default:return null}}function Hc(e,t){switch(Li(t),t.tag){case 3:ea(fa),k();break;case 26:case 27:case 5:xe(t);break;case 4:k();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:D(F);break;case 10:ea(t.type);break;case 22:case 23:ho(t),so(),e!==null&&D(Ca);break;case 24:ea(fa)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){Z(e,e.return,t)}}}function Kc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[pt]=t}catch(t){Z(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=on));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[M]=e,t[pt]=n}catch(t){Z(e,e.return,t)}}var nl=!1,U=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Nr(e),Pr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(o,r,n),o[M]=e,Tt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=jr(s,h),v=jr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,T.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(a(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,id(0,!1),We&&typeof We.onPostCommitFiberRoot==`function`)try{We.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{E.p=i,T.T=r,Vu(e,t)}}function Wu(e,t,n){t=wi(n,t),t=tc(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(rt(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=wi(n,e),n=nc(2),r=Ya(t,n,2),r!==null&&(rc(n,r,t,e),rt(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Pe()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=tt()),e=li(e,t),e!==null&&(rt(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ae(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ke(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=$e(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a))}r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Pe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Wt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Wt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Wt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Wt(n.imageSizes)+`"]`)):i+=`[href="`+Wt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Wt(r)+`"][href="`+Wt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=wt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Tt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=wt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Tt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=wt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Tt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=_e.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=wt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=wt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=wt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Wt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Wt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Wt(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,Tt(i),i):(r=n,(i=mf.get(o))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Tt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=d()})),p=t(e(),1),m=f(),h=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),g=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),v=e=>{let t=_(e);return t.charAt(0).toUpperCase()+t.slice(1)},y={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`},b=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},x=(0,p.createContext)({}),S=()=>(0,p.useContext)(x),ee=(0,p.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:m=``}=S()??{},g=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,p.createElement)(`svg`,{ref:c,...y,width:t??l??y.width,height:t??l??y.height,stroke:e??f,strokeWidth:g,className:h(`lucide`,m,i),...!a&&!b(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),C=(e,t)=>{let n=(0,p.forwardRef)(({className:n,...r},i)=>(0,p.createElement)(ee,{ref:i,iconNode:t,className:h(`lucide-${g(v(e))}`,`lucide-${e}`,n),...r}));return n.displayName=v(e),n},te=C(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),ne=C(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),re=C(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),w=C(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ie=C(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ae=C(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),oe=C(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),se=C(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]]),ce=C(`coffee`,[[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M14 2v2`,key:`6buw04`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`,key:`pwadti`}],[`path`,{d:`M6 2v2`,key:`colzsn`}]]),le=C(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),ue=C(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),T=C(`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`}]]),E=C(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),de=C(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),fe=C(`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`}]]),pe=C(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),me=C(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),D=C(`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`}]]),O=C(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),he=C(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),ge=C(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),_e=C(`volume-x`,[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]),ve=C(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ye=C(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),k=o();function be(){let[e,t]=(0,p.useState)(!1),[n,i]=(0,p.useState)(``),[a,o]=(0,p.useState)(``),[s,c]=(0,p.useState)(``),[l,u]=(0,p.useState)(!1),[d,f]=(0,p.useState)(!1),[m,h]=(0,p.useState)(null),g=a.length>=8,_=/[A-Z]/.test(a),v=/[a-z]/.test(a),y=/[0-9]/.test(a),b=/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~`]/.test(a),x=a.length>0&&a===s,S=g&&_&&v&&y&&b;return(0,k.jsxs)(`div`,{className:`fixed inset-0 w-full h-full max-h-[100dvh] overflow-y-auto overscroll-contain custom-scrollbar flex flex-col items-center px-3 pt-3 pb-8 sm:px-4 sm:py-6 md:p-8 relative selection:bg-highlight-pink selection:text-white`,children:[(0,k.jsx)(`div`,{className:`fixed inset-0 w-full h-full bg-cover bg-center -z-10 saturate-150 contrast-125 pointer-events-none`,style:{backgroundImage:`url('https://lh3.googleusercontent.com/aida-public/AB6AXuAMJHVhhK8_G7F8sbhn8F7w4AZWXb1O_-HLKvrZ_fJlbUVMcVuxxEOO_LlOh8qIwtAn2KvzvCwzmtNLLEZ5uYkCEsx8ZWXJR609qgSMRSX8LBBeskk4VzVXnyzsgIKCedeV2PvGxJlUNnledcWKCXqG9egQi8dgTcA7C2z82QyM73KZ4s7ZRzZHNupuQt1ocfcMl9E_x1PWFRridl751LIpyGZgednS5CmVw2rZvFc_tbp2QTxgVHJ_59myEBmy6aajbO06AhkKmCvI')`}}),(0,k.jsxs)(`div`,{className:`w-full max-w-md bg-paper-white border-[4px] border-ink-black window-shadow z-10 flex flex-col overflow-hidden shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] relative my-auto shrink-0`,children:[(0,k.jsx)(`div`,{className:`bg-[#0ea5e9] border-b-[4px] border-ink-black px-3 sm:px-4 py-2 sm:py-2.5 flex justify-between items-center text-white select-none`,children:(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined select-none text-base sm:text-xl`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,k.jsx)(`span`,{className:`font-window-title text-xs sm:text-base font-bold tracking-wide`,children:`System_Setup.exe`})]})}),(0,k.jsxs)(`div`,{className:`p-4 sm:p-6 bg-[#fdf8e1] flex-1 flex flex-col`,children:[typeof window<`u`&&window.self!==window.top&&(0,k.jsxs)(`div`,{className:`mb-4 sm:mb-5 p-3 sm:p-3.5 border-[3px] border-[#ea580c] bg-[#ffedd5] text-[#9a3412] text-xs font-bold font-arcade leading-relaxed shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[`⚠️ RUNNING INSIDE IFRAME`,(0,k.jsx)(`p`,{className:`mt-1 font-sans text-[11px] font-normal text-ink-black normal-case leading-normal`,children:`If Google Sign-In popup is restricted inside Hugging Face wrapper, open the standalone link below:`}),(0,k.jsx)(`a`,{href:`https://iamfebin-algospaced-dsa.hf.space/`,target:`_top`,className:`mt-2.5 inline-block w-full text-center bg-[#ea580c] hover:bg-[#c2410c] text-white border-[2.5px] border-ink-black py-1.5 px-3 rounded-lg font-window-title text-xs font-bold transition-all shadow-[1.5px_1.5px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:`OPEN FULLSCREEN / DIRECT SITE`})]}),(0,k.jsxs)(`div`,{className:`flex flex-col items-center mb-4 sm:mb-6`,children:[(0,k.jsx)(`div`,{className:`w-12 h-12 sm:w-16 sm:h-16 bg-paper-white border-[3px] border-ink-black flex items-center justify-center gadget-shadow shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] mb-2.5 sm:mb-4`,children:(0,k.jsx)(me,{className:`w-7 h-7 sm:w-9 sm:h-9 text-primary`})}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-extrabold tracking-tight text-ink-black font-headline-md leading-none m-0`,children:`AlgoSpaced`}),(0,k.jsx)(`span`,{className:`text-[9px] sm:text-[10px] font-arcade bg-[#facc15] text-ink-black font-extrabold px-1.5 sm:px-2 py-0.5 border-[2px] border-ink-black shadow-[2px_2px_0px_0px_#1E293B] uppercase rotate-[-3deg]`,children:`BETA`})]}),(0,k.jsx)(`p`,{className:`text-[10px] sm:text-xs font-arcade text-trash-gray mt-1.5 sm:mt-2 tracking-wide uppercase text-center`,children:`Spaced Repetition for DSA`})]}),(0,k.jsxs)(`div`,{className:`flex gap-2 mb-4 sm:mb-6 font-arcade text-[9px] sm:text-[10px]`,children:[(0,k.jsx)(`button`,{onClick:()=>{t(!1),h(null)},className:`flex-1 py-2 sm:py-2.5 border-[3px] border-ink-black cursor-pointer font-bold tracking-wider outline-none transition-all shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none active:translate-y-0.5 ${e?`bg-white text-trash-gray hover:bg-surface-container`:`bg-secondary-container text-ink-black translate-y-0.5 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`}`,children:`SIGN IN`}),(0,k.jsx)(`button`,{onClick:()=>{t(!0),h(null)},className:`flex-1 py-2 sm:py-2.5 border-[3px] border-ink-black cursor-pointer font-bold tracking-wider outline-none transition-all shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none active:translate-y-0.5 ${e?`bg-secondary-container text-ink-black translate-y-0.5 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`:`bg-white text-trash-gray hover:bg-surface-container`}`,children:`CREATE ACCOUNT`})]}),m&&(0,k.jsxs)(`div`,{className:`mb-4 sm:mb-6 p-3 sm:p-4 border-[3px] border-ink-black text-xs font-arcade leading-relaxed ${m.type===`error`?`bg-red-100 border-red-500 text-error shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`:m.type===`unverified`?`bg-amber-100 border-amber-500 text-amber-900 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`:`bg-emerald-100 border-emerald-500 text-emerald-700 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`}`,children:[(0,k.jsx)(`p`,{children:m.text}),m.type===`unverified`&&(0,k.jsxs)(`button`,{type:`button`,onClick:async()=>{if(!n.trim()||!a){h({type:`error`,text:`Please enter your email and password above to resend the verification link.`});return}try{f(!0),await r.resendVerificationEmail(n.trim(),a),h({type:`success`,text:`Verification email resent to ${n.trim()}! Please check your inbox and spam folder.`})}catch(e){h({type:`error`,text:e.message||`Failed to resend verification email. Check your credentials.`})}finally{f(!1)}},disabled:d,className:`mt-3 w-full bg-amber-500 hover:bg-amber-600 text-white font-window-title text-xs font-bold py-2 px-3 border-[2px] border-ink-black rounded flex items-center justify-center gap-2 cursor-pointer shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none uppercase disabled:opacity-50`,children:[(0,k.jsx)(fe,{className:`w-3.5 h-3.5 ${d?`animate-spin`:``}`}),d?`SENDING LINK...`:`RESEND VERIFICATION EMAIL`]})]}),(0,k.jsxs)(`form`,{onSubmit:async i=>{i.preventDefault(),u(!0),h(null);let l=n.trim();if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)){h({type:`error`,text:`Please enter a valid email address.`}),u(!1);return}if(e){if(!S){h({type:`error`,text:`Password does not meet the security criteria. Please check the requirements below.`}),u(!1);return}if(a!==s){h({type:`error`,text:`Passwords do not match. Please re-enter.`}),u(!1);return}try{await r.signUpWithEmail(l,a),h({type:`success`,text:`Registration successful! A verification link has been sent to your email. Please verify your email before logging in.`}),t(!1),o(``),c(``)}catch(e){let t=e.message||`An error occurred during registration.`;e.code===`auth/email-already-in-use`?t=`This email address is already registered. Please sign in instead.`:e.code===`auth/invalid-email`?t=`The email address format is invalid.`:e.code===`auth/weak-password`&&(t=`Firebase requires a stronger password.`),h({type:`error`,text:t})}finally{u(!1)}}else try{await r.signInWithEmail(l,a)}catch(e){if(e.code===`auth/email-not-verified`)h({type:`unverified`,text:`Your email address is not verified yet. Please check your inbox for the activation link.`});else{let t=e.message||`An error occurred during sign in.`;e.code===`auth/invalid-credential`||e.code===`auth/user-not-found`||e.code===`auth/wrong-password`?t=`Invalid email or password. Please check your credentials.`:e.code===`auth/too-many-requests`&&(t=`Access temporarily locked due to many failed attempts. Try again later or reset password.`),h({type:`error`,text:t})}}finally{u(!1)}},className:`space-y-3 sm:space-y-4`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Email Address`}),(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(E,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,k.jsx)(`input`,{type:`email`,required:!0,value:n,onChange:e=>i(e.target.value),placeholder:`name@arcade.com`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Password`}),(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(T,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,k.jsx)(`input`,{type:`password`,required:!0,value:a,onChange:e=>o(e.target.value),placeholder:`••••••••`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),e&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Confirm Password`}),(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(ue,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,k.jsx)(`input`,{type:`password`,required:!0,value:s,onChange:e=>c(e.target.value),placeholder:`••••••••`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),(0,k.jsxs)(`div`,{className:`p-2.5 sm:p-3 bg-white border-[2px] border-ink-black rounded-lg text-[9px] sm:text-[10px] font-code-mono space-y-1 shadow-[inset_1px_1px_0px_rgba(0,0,0,0.05)]`,children:[(0,k.jsx)(`div`,{className:`font-bold font-arcade uppercase text-[8px] sm:text-[9px] text-trash-gray mb-1 sm:mb-1.5`,children:`Password Security Requirements:`}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 ${g?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[g?(0,k.jsx)(w,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,k.jsx)(ve,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,k.jsx)(`span`,{children:`Minimum 8 characters`})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 ${_&&v?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[_&&v?(0,k.jsx)(w,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,k.jsx)(ve,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,k.jsx)(`span`,{children:`Uppercase & lowercase letters (A-Z, a-z)`})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 ${y?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[y?(0,k.jsx)(w,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,k.jsx)(ve,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,k.jsx)(`span`,{children:`At least 1 number (0-9)`})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 ${b?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[b?(0,k.jsx)(w,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,k.jsx)(ve,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,k.jsx)(`span`,{children:`At least 1 special character (!@#$%^&*...)`})]}),s.length>0&&(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 ${x?`text-emerald-700 font-bold`:`text-red-600 font-bold`}`,children:[x?(0,k.jsx)(w,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,k.jsx)(ve,{className:`w-3 h-3 text-red-500 shrink-0 stroke-[3]`}),(0,k.jsx)(`span`,{children:x?`Passwords match`:`Passwords do not match`})]})]})]}),(0,k.jsxs)(`button`,{type:`submit`,disabled:l||e&&(!S||!x),className:`w-full bg-[#ffcc00] hover:bg-yellow-400 border-[3px] sm:border-[4px] border-ink-black rounded-xl py-2.5 sm:py-3.5 font-window-title text-sm sm:text-base text-ink-black arcade-btn cursor-pointer disabled:opacity-50 flex items-center justify-center gap-2 uppercase font-bold tracking-wide transition-all shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none`,children:[l?`PROCESSING...`:e?`CREATE ACCOUNT`:`SIGN IN`,!l&&(0,k.jsx)(ne,{className:`w-4 h-4 stroke-[3px]`})]})]}),(0,k.jsxs)(`div`,{className:`relative my-3.5 sm:my-5 select-none`,children:[(0,k.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,k.jsx)(`div`,{className:`w-full border-t-[3px] border-ink-black border-dashed`})}),(0,k.jsx)(`div`,{className:`relative flex justify-center text-[9px] sm:text-[10px] uppercase font-arcade`,children:(0,k.jsx)(`span`,{className:`bg-[#fdf8e1] px-2 sm:px-3 text-trash-gray font-bold`,children:`OR LOAD ALTERNATE`})})]}),(0,k.jsxs)(`button`,{onClick:async()=>{try{u(!0),h(null),await r.signInWithGoogle()}catch(e){h({type:`error`,text:e.message||`Google Sign-In failed to initialize`}),u(!1)}},disabled:l,className:`w-full bg-white hover:bg-slate-100 border-[3px] border-ink-black text-ink-black font-bold py-2.5 sm:py-3 px-3 sm:px-4 rounded-xl flex items-center justify-center gap-2.5 sm:gap-3 transition-all text-[11px] sm:text-xs cursor-pointer shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none`,children:[(0,k.jsxs)(`svg`,{className:`w-4 h-4 shrink-0`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z`,fill:`#4285F4`}),(0,k.jsx)(`path`,{d:`M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z`,fill:`#34A853`}),(0,k.jsx)(`path`,{d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z`,fill:`#FBBC05`}),(0,k.jsx)(`path`,{d:`M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.52 6.16-4.52z`,fill:`#EA4335`})]}),`SIGN IN WITH GOOGLE`]}),(0,k.jsxs)(`button`,{onClick:()=>{r.enterSandbox()},disabled:l,className:`mt-2.5 sm:mt-3 w-full bg-[#10b981] hover:bg-emerald-600 text-white font-window-title py-2.5 sm:py-3 px-3 sm:px-4 border-[3px] border-ink-black rounded-xl flex items-center justify-center gap-2 cursor-pointer shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none uppercase font-bold text-[11px] sm:text-xs`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`sports_esports`}),`Enter Sandbox Mode (No Login)`]})]})]})]})}var xe=`algospaced_desktop_icon_positions_v2`,Se=96,Ce=105,we=24,Te=60,Ee=112,De=108,Oe=e=>{let t={},n=e.filter(e=>!e.hidden),r=typeof window<`u`?window.innerHeight-100:700,i=we,a=Te;return n.forEach(e=>{a+Ce>r&&a>Te&&(i+=De,a=Te),t[e.id]={x:i,y:a},a+=Ee}),t},ke=(e,t)=>{let n=Oe(t);if(!e||typeof e!=`object`)return n;let r={},i=new Set,a=(e,t)=>`${Math.round(e/50)},${Math.round(t/50)}`;return[...t].sort((e,t)=>e.id===`queue`?-1:+(t.id===`queue`)).forEach(t=>{let o=e[t.id];if(o&&Number.isFinite(o.x)&&Number.isFinite(o.y)){let e=a(o.x,o.y);if(!i.has(e)){r[t.id]={x:Math.max(8,o.x),y:Math.max(48,o.y)},i.add(e);return}}let s=n[t.id]||{x:we,y:Te},c=s.x,l=s.y;for(;i.has(a(c,l));)l+=Ee,typeof window<`u`&&l+Ce>window.innerHeight-100&&(c+=De,l=Te);r[t.id]={x:c,y:l},i.add(a(c,l))}),r},Ae=(0,p.forwardRef)(({icons:e,isMobile:t=!1,onContextMenu:n},r)=>{let[i,a]=(0,p.useState)(()=>{try{let t=localStorage.getItem(xe);if(t){let n=JSON.parse(t);if(n&&typeof n==`object`)return ke(n,e)}}catch(e){console.error(`Error loading icon positions:`,e)}return Oe(e)}),[o,s]=(0,p.useState)(null),[c,l]=(0,p.useState)(null),u=(0,p.useRef)({startX:0,startY:0,initialIconX:0,initialIconY:0,hasMoved:!1,pointerId:null});(0,p.useEffect)(()=>{let t=()=>{a(t=>{let n=ke(t,e),r=!1,i=Math.max(100,window.innerWidth-Se),a=Math.max(100,window.innerHeight-120);if(e.forEach(e=>{let t=n[e.id];if(t){let o=Math.max(8,Math.min(t.x,i)),s=Math.max(48,Math.min(t.y,a));(o!==t.x||s!==t.y)&&(n[e.id]={x:o,y:s},r=!0)}}),r||JSON.stringify(n)!==JSON.stringify(t))try{localStorage.setItem(xe,JSON.stringify(n))}catch{}return n})};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),(0,p.useImperativeHandle)(r,()=>({autoArrange:()=>{let t=Oe(e);a(t);try{localStorage.setItem(xe,JSON.stringify(t))}catch{}},resetLayout:()=>{localStorage.removeItem(xe),localStorage.removeItem(`algospaced_desktop_icon_positions_v1`);let t=Oe(e);a(t)}})),(0,p.useEffect)(()=>{let e=e=>{e.target.closest(`.desktop-icon-unit`)||s(null)};return window.addEventListener(`pointerdown`,e),()=>window.removeEventListener(`pointerdown`,e)},[]);let d=(t,n)=>{if(t.button!==0&&t.pointerType===`mouse`)return;t.stopPropagation();let r=Oe(e)[n.id]||{x:we,y:Te},a=i[n.id],o=a&&Number.isFinite(a.x)&&Number.isFinite(a.y)?a:r;u.current={startX:t.clientX,startY:t.clientY,initialIconX:o.x,initialIconY:o.y,hasMoved:!1,pointerId:t.pointerId},l(n.id);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}},f=e=>{if(!c)return;let{startX:t,startY:n,initialIconX:r,initialIconY:i,hasMoved:o}=u.current,s=e.clientX-t,l=e.clientY-n;if(!o&&Math.hypot(s,l)>6&&(u.current.hasMoved=!0),u.current.hasMoved){let e=Math.max(100,window.innerWidth-Se),t=Math.max(100,window.innerHeight-110),n=Math.max(8,Math.min(r+s,e)),o=Math.max(48,Math.min(i+l,t));a(e=>({...e,[c]:{x:n,y:o}}))}},m=(e,t)=>{if(c!==t.id)return;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let{hasMoved:n}=u.current;if(n)try{localStorage.setItem(xe,JSON.stringify(i))}catch{}else s(t.id),t.action();l(null)},h=e=>{e.action()},g=e.filter(e=>!e.hidden);return(0,k.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 select-none overflow-hidden`,onContextMenu:n,children:g.map(t=>{let n=Oe(e),r=i[t.id],a=r&&Number.isFinite(r.x)&&Number.isFinite(r.y)?r:n[t.id]||{x:we,y:Te},s=o===t.id,l=c===t.id;return(0,k.jsxs)(`div`,{id:`desktop-icon-${t.id}`,style:{transform:`translate3d(${a.x}px, ${a.y}px, 0)`,touchAction:`none`},onPointerDown:e=>d(e,t),onPointerMove:f,onPointerUp:e=>m(e,t),onPointerCancel:e=>m(e,t),onDoubleClick:()=>h(t),className:`desktop-icon-unit absolute top-0 left-0 w-[96px] flex flex-col items-center justify-center gap-1.5 p-2 pointer-events-auto cursor-grab active:cursor-grabbing group transition-transform duration-75 ${l?`z-30 scale-105 opacity-90`:`z-10`}`,children:[(0,k.jsx)(`div`,{className:`w-16 h-16 bg-paper-white border-[3px] flex items-center justify-center transition-all ${s?`border-[#0ea5e9] bg-[#dbeafe] shadow-[4px_4px_0px_0px_#0ea5e9] ring-2 ring-[#0ea5e9]`:`border-ink-black gadget-shadow group-hover:bg-secondary-container shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)]`} ${t.iconImg?`p-1 overflow-hidden`:``}`,children:t.iconImg?(0,k.jsx)(`img`,{alt:typeof t.label==`string`?t.label:t.id,className:`w-full h-full object-cover pointer-events-none select-none`,src:t.iconImg,draggable:!1}):(0,k.jsx)(`span`,{className:`material-symbols-outlined text-4xl select-none text-ink-black`,style:{fontVariationSettings:`'FILL' 1`},children:t.icon||`apps`})}),(0,k.jsx)(`span`,{className:`font-icon-label text-[9px] px-1.5 py-1 border-[2px] text-center leading-tight uppercase transition-all select-none ${s?`bg-[#0ea5e9] text-white border-ink-black shadow-[2px_2px_0px_0px_#1E293B]`:`bg-ink-black text-white border-ink-black`}`,style:{boxShadow:s?`2px 2px 0px 0px #1E293B`:`2px 2px 0px 0px ${t.badgeShadowColor||`#fde047`}`},children:t.label})]},t.id)})})});function je({x:e,y:t,isOpen:n,onClose:r,onAutoArrange:i,onResetLayout:a,onChangeWallpaper:o,onOpenWindow:s,onTriggerSync:c,onToggleFullscreen:l,isFullscreen:u}){let d=(0,p.useRef)(null);if((0,p.useEffect)(()=>{let e=e=>{d.current&&!d.current.contains(e.target)&&r()};return n&&(window.addEventListener(`mousedown`,e),window.addEventListener(`scroll`,r)),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`scroll`,r)}},[n,r]),!n)return null;let f=Math.min(e,window.innerWidth-220-10),m=Math.min(t,window.innerHeight-320-60);return(0,k.jsxs)(`div`,{ref:d,style:{left:`${Math.max(10,f)}px`,top:`${Math.max(10,m)}px`},className:`fixed z-[100] w-56 bg-paper-white border-[3px] border-ink-black gadget-shadow py-1.5 flex flex-col select-none text-ink-black animate-fade-in shadow-[4px_4px_0px_0px_#1E293B]`,children:[(0,k.jsxs)(`div`,{className:`px-3 py-1 bg-[#0ea5e9] text-white border-b-2 border-ink-black flex items-center justify-between mb-1 -mt-1.5 -mx-0`,children:[(0,k.jsx)(`span`,{className:`font-window-title text-[11px] font-bold tracking-wider uppercase`,children:`Desktop Options`}),(0,k.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`desktop_windows`})]}),(0,k.jsxs)(`button`,{onClick:()=>{i(),r()},className:`px-3 py-1.5 hover:bg-[#fde047] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`grid_view`}),`Auto Arrange Icons`]}),(0,k.jsxs)(`button`,{onClick:()=>{a(),r()},className:`px-3 py-1.5 hover:bg-[#fde047] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`restart_alt`}),`Reset Icon Layout`]}),(0,k.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,k.jsxs)(`button`,{onClick:()=>{o(),r()},className:`px-3 py-1.5 hover:bg-[#39ff14] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`wallpaper`}),`Change Wallpaper...`]}),(0,k.jsxs)(`button`,{onClick:()=>{l(),r()},className:`px-3 py-1.5 hover:bg-[#39ff14] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:u?`fullscreen_exit`:`fullscreen`}),u?`Exit Fullscreen`:`Enter Fullscreen`]}),(0,k.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,k.jsxs)(`button`,{onClick:()=>{s(`queue`),r()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`view_list`}),`Daily Queue`]}),(0,k.jsxs)(`button`,{onClick:()=>{s(`terminal`),r()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`terminal`}),`Terminal Emulator`]}),(0,k.jsxs)(`button`,{onClick:()=>{s(`computer`),r()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`folder`}),`My Computer`]}),(0,k.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,k.jsxs)(`button`,{onClick:()=>{c(),r()},className:`px-3 py-1.5 hover:bg-[#f72585] hover:text-white flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`cloud_sync`}),`Sync with Drive`]})]})}var Me=[{floorRange:[1,30],title:`The Plains of Arrays & Strings`,description:`Rolling green meadows and ancient cobblestone roads where foundational endurance is forged.`,bgLore:`Looking out towards the distant horizon, the silhouette of the Big-O Spire pierces the clouds.`},{floorRange:[31,60],title:`The Whispering Forest of Pointers`,description:`Winding paths through dense emerald groves where two pointers navigate labyrinthine trails.`,bgLore:`Aurelia’s beacon shines above the canopy, guiding your compass through tangled groves.`},{floorRange:[61,90],title:`The Grand Caverns of Trees & Graphs`,description:`Bioluminescent caves with branching crystal arches and subterranean passes.`,bgLore:`Halfway to the tower! Her voice echoes with hope over the enchanted royal crystal relay.`},{floorRange:[91,120],title:`The High Mountain Passes of Heaps & Backtracking`,description:`Perilous alpine ridges and snowy peaks overlooking the deep Spire valley.`,bgLore:`From the highest ridge, the base of the Spire is in sight through the swirling mountain mist!`},{floorRange:[121,149],title:`The Enchanted Valley of Dynamic Programming`,description:`Shimmering mystical grounds where optimal decisions bridge the final moat.`,bgLore:`The final leagues! The Spire looms directly ahead, its ancient runic wards trembling.`},{floorRange:[150,150],title:`The Gates of the Big-O Spire`,description:`Standing at the threshold of the grand obsidian gates to shatter the seal and free Aurelia!`,bgLore:`150 algorithmic leagues conquered! You have completed the grand journey and reached the Spire!`}];function Ne(e){return Me.find(t=>e>=t.floorRange[0]&&e<=t.floorRange[1])||Me[0]}var Pe={30:{id:`letter-30`,floor:30,chapterTitle:`The Plains of Arrays & Strings`,title:`A Courier from the Open Plains`,letterText:`My Dearest Champion, + +From the highest window of the Spire, I watched your travel banner cross the border stones of the open plains. Thirty leagues conquered! + +Where many lose heart in the first days of travel, your steps have grown swifter with every problem. Ahead lies the Whispering Forest—dense and shadowed, but fear not: your compass is true. + +Rest by the brook tonight. I have set the northern beacon to burn through the night in your honor. + +With growing hope, +Aurelia`},60:{id:`letter-60`,floor:60,chapterTitle:`The Whispering Forest of Pointers`,title:`The Falcon Over the Canopy`,letterText:`Noble Friend, + +My falcon returns carrying the scent of pine and pinecone dust from your camp! Sixty leagues! You have navigated the winding labyrinth of pointers and emerged into open foothills. + +I can see the glow of your campfire even without the glass. Do you know how long it has been since someone traveled this royal road? The kingdom had begun to forget, but your discipline is breathing life back into these lands. + +Take this moment to drink deep and stretch your limbs. The subterranean caverns ahead are dark, but we shall illuminate every cavern together. + +Steadfastly yours, +Aurelia`},90:{id:`letter-90`,floor:90,chapterTitle:`The Grand Caverns of Trees & Graphs`,title:`Echoes in the Crystal Chasm`,letterText:`My Cherished Champion, + +Ninety problems mastered! More than halfway to the gates! + +When the magical relays shook earlier today, I knew you had emerged from the deep crystal arches. The sheer complexity of those subterranean paths would have broken an ordinary will. But you navigated every branch and node with patience. + +The icy peaks of the High Passes loom next. Wear your warm cloak and do not hurry your steps—stamina is the secret to cresting the high mountains. + +Ever watching over you, +Aurelia`},120:{id:`letter-120`,floor:120,chapterTitle:`The High Mountain Passes`,title:`Light Across the Snowy Summit`,letterText:`My Legendary Hero, + +One hundred and twenty leagues! From my tower balcony, I watched your lantern flare as you stepped onto the high alpine ridge overlooking the valley. + +The Spire is in plain sight now. Its obsidian spires and ancient runic rings tremble in the wind. Only the Enchanted Valley of Dynamic Programming stands between your boots and the grand courtyard gates. + +Whatever fear or fatigue tries to whisper to you tonight, cast it into the mountain wind. You have proven yourself ten times over. + +With all my heart, +Aurelia`},150:{id:`letter-150`,floor:150,chapterTitle:`The Gates of the Big-O Spire`,title:`The Shattering of the Seals`,letterText:`TO MY DELIVERER AND CHAMPION, + +ALL ONE HUNDRED AND FIFTY LEAGUES CONQUERED! + +The five chromatic seals have shattered into glittering dust across the obsidian courtyard! The doors of the Spire swing open to the morning sun for the first time in an age. + +You did not just conquer a list of problems—you demonstrated the rarest virtue in all the kingdoms: relentless, patient, unyielding mastery. + +The tower is open. Step through the archway, hero—let us walk out into the sunlight together. + +Free at last, +Aurelia`}},Fe={problem_correct:[{text:`Yes! Nicely done. Getting a stubborn problem to pass cleanly always feels so satisfying.`,emotion:`excited_expression`},{text:`Look at that—another one down! You’re really finding your rhythm today.`,emotion:`smiling_warmly`},{text:`Awesome job! Step by step, you’re steadily working your way through all of these.`,emotion:`smiling_warmly`}],problem_incorrect:[{text:`Hey, don’t sweat it. Even seasoned engineers stumble on test cases constantly. We can always look at the edge cases again.`,emotion:`concerned`},{text:`Take a breath. Getting stuck isn’t failing—it’s literally just your brain building the intuition for the next time.`,emotion:`thinking_expression`},{text:`Ugh, those hidden edge cases can be ruthless. Give your mind a minute to clear, then come back to it with fresh eyes.`,emotion:`smiling_warmly`}],break_reminder:[{text:`Hey, you’ve been at this for a while. Go grab some water and stretch your shoulders for five minutes—trust me, you’ve earned it.`,emotion:`concerned`},{text:`Quick check-in: how are your eyes feeling? Step away from the screen for just a few minutes.`,emotion:`smiling_warmly`}],idle_chat:[{text:`Hey! Thanks for stopping by to chat. How’s your headspace today?`,emotion:`smiling_warmly`},{text:`Whenever the whole 150-problem journey feels overwhelming, just remember: you only ever have to solve the one in front of you.`,emotion:`thinking_expression`}]};async function Ie(e){let t=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``,r=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;try{let{data:{session:i}}=await n.auth.getSession(),a={"Content-Type":`application/json`,Authorization:`Bearer ${i?.access_token||`sandbox`}`};t.trim()&&r!=="default"&&(a[`x-custom-api-key`]=t.trim(),a[`x-gemini-api-key`]=t.trim(),a[`x-ai-provider`]=r);let o=e.messages.map(e=>({sender:e.sender,text:e.text,emotion:e.emotion})),s={princess_name:e.princess_name||`Princess Aurelia`,user_message:e.user_message,current_floor:e.current_floor,streak_days:e.streak_days||0,hero_name:e.hero_name||`Champion`,target_goal:e.target_goal||``,bond_tier:e.bond_tier||`Acquaintance`,current_rhythm:e.current_rhythm||`day`,hero_codex:e.hero_codex,episodic_memories:e.episodic_memories,messages:o},c=await fetch(`/api/companion/chat`,{method:`POST`,headers:a,body:JSON.stringify(s)});if(c.ok){let e=await c.json();if(e.text)return{text:e.text,emotion:e.emotion||`smiling_warmly`,tool_calls:Array.isArray(e.tool_calls)?e.tool_calls:[],choice_suggestions:Array.isArray(e.choice_suggestions)?e.choice_suggestions:[],provider_used:e.provider_used||`Spire Agent`}}}catch(e){console.warn(`[CompanionAPI] Backend endpoint unreachable, falling back to offline grimoire:`,e)}let i=Fe.idle_chat,a=i[Math.floor(Math.random()*i.length)];return{text:a.text,emotion:a.emotion,tool_calls:[],choice_suggestions:[`Tell me about the Spire`,`Can we take a rest by the fire?`],provider_used:`Offline Script`}}async function Le(e,t){let r=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``,i=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;try{let{data:{session:a}}=await n.auth.getSession(),o={"Content-Type":`application/json`,Authorization:`Bearer ${a?.access_token||`sandbox`}`};r.trim()&&i!=="default"&&(o[`x-custom-api-key`]=r.trim(),o[`x-gemini-api-key`]=r.trim(),o[`x-ai-provider`]=i);let s=e.messages.map(e=>({sender:e.sender,text:e.text,emotion:e.emotion})),c={princess_name:e.princess_name||`Princess Aurelia`,user_message:e.user_message,current_floor:e.current_floor,streak_days:e.streak_days||0,hero_name:e.hero_name||`Champion`,target_goal:e.target_goal||``,bond_tier:e.bond_tier||`Acquaintance`,current_rhythm:e.current_rhythm||`day`,hero_codex:e.hero_codex,episodic_memories:e.episodic_memories,messages:s},l=await fetch(`/api/companion/chat/stream`,{method:`POST`,headers:o,body:JSON.stringify(c)});if(!l.ok||!l.body)throw Error(`Streaming failed with status ${l.status}`);let u=l.body.getReader(),d=new TextDecoder(`utf-8`),f=``,p=!1;for(;;){let{done:e,value:n}=await u.read();if(e)break;f+=d.decode(n,{stream:!0});let r=f.split(` + +`);f=r.pop()||``;for(let e of r){if(!e.trim())continue;let n=`message`,r=``,i=e.split(` +`);for(let e of i)e.startsWith(`event:`)?n=e.replace(`event:`,``).trim():e.startsWith(`data:`)&&(r=e.replace(`data:`,``).trim());if(n===`text_delta`&&r)try{let e=JSON.parse(r);e.delta&&t.onDelta(e.delta)}catch(e){console.warn(`[CompanionAPI] Failed to parse delta:`,e)}else if(n===`done`&&r)try{let e=JSON.parse(r);p=!0,t.onDone({text:e.text||``,emotion:e.emotion||`smiling_warmly`,tool_calls:Array.isArray(e.tool_calls)?e.tool_calls:[],choice_suggestions:Array.isArray(e.choice_suggestions)?e.choice_suggestions:[],provider_used:e.provider_used||`Spire Agent Stream`})}catch(e){console.warn(`[CompanionAPI] Failed to parse done payload:`,e)}else if(n===`error`&&r){p=!0;try{let e=JSON.parse(r);t.onDone({text:e.text||`Stay strong, champion!`,emotion:e.emotion||`smiling_warmly`,tool_calls:[],choice_suggestions:e.choice_suggestions||[],provider_used:`fallback`})}catch(e){console.warn(`[CompanionAPI] Error event parse failed:`,e)}}}}if(!p){let n=await Ie(e);t.onDone(n)}}catch(n){console.warn(`[CompanionAPI] Stream error, falling back to standard API:`,n);try{let n=await Ie(e);t.onDone(n)}catch(e){t.onError?.(e)}}}async function Re(e){try{let{data:{session:t}}=await n.auth.getSession(),r=t?.access_token||`sandbox`;await fetch(`/api/companion/telemetry`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({...e,source:`client`,timestamp:e.timestamp||Date.now()/1e3})})}catch{}}var ze={open_app_window:e=>{let t=String(e.window_id||e.windowId||`queue`).toLowerCase(),n=t;return[`reviewer`,`code_reviewer`,`ai`,`grimoire`].includes(t)?n=`queue`:[`map`,`path`,`trail`].includes(t)?n=`journey`:[`files`,`explorer`,`system`].includes(t)&&(n=`computer`),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:open_window`,{detail:{windowId:n}})),{toolName:`open_app_window`,success:!0,message:`Summoned window: ${n}`,data:{windowId:n}}},set_study_timer:e=>{let t=Math.max(1,Math.min(120,Number(e.minutes||10)));return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:start_timer`,{detail:{minutes:t}})),{toolName:`set_study_timer`,success:!0,message:`Set tower countdown hourglass for ${t} minutes.`,data:{minutes:t}}},play_ambient_sound:e=>{let t=String(e.soundscape||`campfire`).toLowerCase();return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:play_soundscape`,{detail:{soundscape:t}})),{toolName:`play_ambient_sound`,success:!0,message:`Kindled ambient soundscape: ${t}.`,data:{soundscape:t}}},bookmark_for_spaced_review:e=>{let t=String(e.problem_name||e.problemName||`Unspecified Problem`),n=String(e.reason||`Flagged by Princess Aurelia for reinforcement`);return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:bookmark_problem`,{detail:{problemName:t,reason:n}})),{toolName:`bookmark_for_spaced_review`,success:!0,message:`Marked "${t}" in the royal grimoire for priority review.`,data:{problemName:t,reason:n}}},write_spire_diary:e=>{let t=String(e.entry||e.text||``).trim();return t?(typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:write_diary`,{detail:{text:t}})),{toolName:`write_spire_diary`,success:!0,message:`Recorded observation into the Spire Chronicles.`,data:{text:t}}):{toolName:`write_spire_diary`,success:!1,message:`Empty diary entry provided.`}},update_hero_codex:e=>{let t=String(e.key||``).trim(),n=String(e.value||``).trim();return!t||!n?{toolName:`update_hero_codex`,success:!1,message:`Missing key or value for hero codex update.`}:(typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:update_codex`,{detail:{key:t,value:n}})),{toolName:`update_hero_codex`,success:!0,message:`Updated Hero Codex: ${t} -> ${n}`,data:{key:t,value:n}})},record_episodic_event:e=>{let t=String(e.eventType||e.event_type||`session_summary`),n=String(e.title||`Event`).trim(),r=String(e.description||``).trim(),i=e.relatedPattern||e.related_pattern?String(e.relatedPattern||e.related_pattern):void 0;return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:record_event`,{detail:{eventType:t,title:n,description:r,relatedPattern:i}})),{toolName:`record_episodic_event`,success:!0,message:`Recorded episodic memory: ${n}`,data:{eventType:t,title:n,description:r,relatedPattern:i}}}};async function Be(e){let t=ze[e.name],n=typeof performance<`u`?performance.now():Date.now();if(!t){console.warn(`[AgentTools] No handler registered for tool: ${e.name}`);let t={toolName:e.name,success:!1,message:`Unknown enchantment: ${e.name}`,durationMs:0};return Re({tool_name:e.name,args:e.args,success:!1,error:t.message,execution_time_ms:0}),t}try{let r=await t(e.args||{}),i=typeof performance<`u`?performance.now():Date.now(),a=Math.round(i-n),o={...r,durationMs:a};return Re({tool_name:e.name,args:e.args,success:o.success,error:o.success?void 0:o.message,execution_time_ms:a}),o}catch(t){console.error(`[AgentTools] Error executing ${e.name}:`,t);let r=typeof performance<`u`?performance.now():Date.now(),i=Math.round(r-n),a={toolName:e.name,success:!1,message:t?.message||`Tool execution encountered an error.`,durationMs:i};return Re({tool_name:e.name,args:e.args,success:!1,error:a.message,execution_time_ms:i}),a}}var Ve={dawn:{state:`dawn`,label:`Morning Sunbreak`,hourRange:[6,12],activity:`Sipping warm mountain tea and watching the sunrise over the valley`,lightingClass:`from-amber-100/90 via-yellow-50/80 to-amber-200/50`,defaultEmotion:`smiling_warmly`,greetings:[`Morning! The sunrise looks pretty incredible from up here today. How are you feeling—ready to solve a few problems, or still waiting for your coffee to kick in?`,`Hey, good morning! Did you get some good rest? Don’t rush into the hardest problems right away—let’s ease in with a warmup.`,`Good morning! It’s really quiet and peaceful right now. Honestly the best time to get some focused thinking done before the rest of the world wakes up.`]},day:{state:`day`,label:`High Sun`,hourRange:[12,18],activity:`Reviewing architectural scrolls in the tower library`,lightingClass:`from-sky-100/80 via-amber-50/70 to-yellow-100/60`,defaultEmotion:`neutral`,greetings:[`Hey, welcome back! How’s your focus holding up today? Remember to step back and take a breath if your eyes start feeling tired.`,`Hey there! I was just organizing some notes in the tower library. What problem pattern are we working through right now?`,`Good to see you! Remember, steady consistency beats frantic cramming every single time. One clean solution at a time.`]},dusk:{state:`dusk`,label:`Twilight & Beacon Fire`,hourRange:[18,22],activity:`Lighting lanterns along the stone balcony as the sun sets`,lightingClass:`from-orange-100/90 via-purple-100/60 to-amber-200/70`,defaultEmotion:`smiling_warmly`,greetings:[`Evening! You’ve put in solid effort today. How are you feeling—ready to wrap things up, or finishing one last review?`,`Hey, the sun is setting over the valley. It’s so easy to lose track of time when deep in code. Make sure you stretch your neck and shoulders a bit.`,`Good evening! How did today’s practice go? Even getting through one tricky problem is real, meaningful progress.`]},night:{state:`night`,label:`Midnight Candlelight`,hourRange:[22,6],activity:`Listening to the quiet wind outside by soft candlelight`,lightingClass:`from-indigo-950/80 via-slate-900/90 to-amber-950/40 text-amber-100`,defaultEmotion:`concerned`,greetings:[`Hey... it’s getting really late. Are you okay? Late-night debugging usually just turns simple typos into monsters—promise me you’ll head to sleep soon.`,`Midnight already? I’m always glad to talk with you, but coding while exhausted will just burn you out. Take it easy tonight, okay?`,`Still awake? Don’t push yourself past your limit. Your brain actually reorganizes problem solutions while you sleep—go rest up for tomorrow.`]}};function He(e=new Date){let t=e.getHours();return t>=6&&t<12?`dawn`:t>=12&&t<18?`day`:t>=18&&t<22?`dusk`:`night`}function Ue(e=new Date){return Ve[He(e)]}function We(e=`Champion`){let t=Ue(),n=t.greetings;return{text:(n[Math.floor(Math.random()*n.length)]||n[0]).replace(/\{hero\}/g,e||`Champion`),emotion:t.defaultEmotion,rhythm:t.state}}function Ge(e,t=`Champion`){return{text:`Hey, ${t}... ${e} misses in a row is almost always mental fatigue, not a lack of ability. Step away from the screen for just five minutes, grab a drink of water, and let your head clear. You’ll see the solution much faster once you reset.`,emotion:`concerned`}}var Ke=`algospaced_companion_state_v2`,qe={enabled:!0,name:`Princess Aurelia`,backstory:`Princess Aurelia is a noble, intelligent, and deeply caring scholar-princess trapped inside the Spire of Big-O Complexity. You are her champion traveling the 150 leagues of the royal road to break her magical seals.`,breakIntervalMinutes:25,soundEnabled:!0,autoPopupEnabled:!0},Je={heroName:`Champion`,targetGoal:``,preferredLanguage:`Python`,strengths:[],nemesisPatterns:[],personalNotes:[],lastUpdated:Date.now()};function Ye(e,t,n){let r={...e,lastUpdated:Date.now()},i=n.trim();if(!i)return e;switch(t){case`heroName`:r.heroName=i;break;case`targetGoal`:r.targetGoal=i;break;case`preferredLanguage`:r.preferredLanguage=i;break;case`strengths`:r.strengths.includes(i)||(r.strengths=[...r.strengths,i].slice(-10));break;case`nemesisPatterns`:r.nemesisPatterns.includes(i)||(r.nemesisPatterns=[...r.nemesisPatterns,i].slice(-10));break;case`personalNotes`:let e=r.personalNotes.findIndex(e=>e.toLowerCase().includes(i.toLowerCase().slice(0,15)));e>=0?r.personalNotes[e]=i:r.personalNotes=[...r.personalNotes,i].slice(-15);break;default:r.personalNotes.includes(i)||(r.personalNotes=[...r.personalNotes,i].slice(-15))}return r}function Xe(e,t,n,r=3){if(!e||e.length===0)return[];let i=(t+` `+(n||``)).toLowerCase(),a=e.map((e,t)=>{let r=0,a=(e.title+` `+e.description+` `+(e.relatedPattern||``)).toLowerCase();n&&e.relatedPattern&&e.relatedPattern.toLowerCase()===n.toLowerCase()&&(r+=5);let o=i.split(/\s+/).filter(e=>e.length>3);for(let e of o)a.includes(e)&&(r+=2);let s=(Date.now()-e.timestamp)/864e5;return r+=Math.max(0,3-s*.3),e.eventType===`breakthrough`&&(r+=2),e.eventType===`fatigue_episode`&&(r+=2),{event:e,index:t,score:r}});a.sort((e,t)=>t.score-e.score);let o=a.slice(0,2),s=new Set,c=[];for(let t of o)if(!(t.score<=.5)&&(s.has(t.event.id)||(s.add(t.event.id),c.push(`[${t.event.eventType.toUpperCase()}] ${t.event.title}: ${t.event.description}`)),t.event.contiguousEventId)){let n=e.find(e=>e.id===t.event.contiguousEventId);n&&!s.has(n.id)&&c.length=50?`Soulbound Confidante`:e>=10?`Trusted Ally`:`Acquaintance`}function Qe(){let e=Ue(),t={id:`turn-init`,sender:`princess`,text:`Hey! I’m Aurelia. It gets pretty quiet up here in the tower, so I’m really glad you stopped by. How are you holding up with your coding practice today?`,emotion:`smiling_warmly`,timestamp:Date.now(),provider:`Spire Relay`};try{let n=localStorage.getItem(Ke);if(n){let r=JSON.parse(n),i=Array.isArray(r.transcript)&&r.transcript.length>0?r.transcript:[t],a=i.filter(e=>e.sender===`user`).length;return{transcript:i,activeEmotion:r.activeEmotion||e.defaultEmotion,isTyping:!1,isLoading:!1,heroProfile:r.heroProfile||{heroName:`Champion`,targetGoal:``},heroCodex:r.heroCodex||{...Je,heroName:r.heroProfile?.heroName||`Champion`,targetGoal:r.heroProfile?.targetGoal||``},episodicEvents:Array.isArray(r.episodicEvents)?r.episodicEvents:[],journeyLog:Array.isArray(r.journeyLog)?r.journeyLog:[],currentFloor:Number(r.currentFloor||0),maxFloor:150,totalSolved:Number(r.totalSolved||r.currentFloor||0),unlockedMilestones:Array.isArray(r.unlockedMilestones)?r.unlockedMilestones:[0],unlockedLetters:Array.isArray(r.unlockedLetters)?r.unlockedLetters:[],spireChronicles:Array.isArray(r.spireChronicles)?r.spireChronicles:[],bondTier:Ze(a),currentRhythm:e.state,currentActivity:e.activity,companionSettings:{...qe,...r.companionSettings||{}},consecutiveFailures:0,recentToolTelemetry:Array.isArray(r.recentToolTelemetry)?r.recentToolTelemetry:[]}}}catch(e){console.warn(`[CompanionStore] Failed to load from localStorage:`,e)}return{transcript:[t],activeEmotion:e.defaultEmotion,isTyping:!1,isLoading:!1,heroProfile:{heroName:`Champion`,targetGoal:``},heroCodex:Je,episodicEvents:[],journeyLog:[],currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0],unlockedLetters:[],spireChronicles:[],bondTier:`Acquaintance`,currentRhythm:e.state,currentActivity:e.activity,companionSettings:qe,consecutiveFailures:0,recentToolTelemetry:[]}}var A=Qe(),$e=new Set;function et(){try{let e={transcript:A.transcript.slice(-60),activeEmotion:A.activeEmotion,heroProfile:A.heroProfile,heroCodex:A.heroCodex,episodicEvents:A.episodicEvents.slice(-40),journeyLog:A.journeyLog.slice(-50),currentFloor:A.currentFloor,totalSolved:A.totalSolved,unlockedMilestones:A.unlockedMilestones,unlockedLetters:A.unlockedLetters,spireChronicles:A.spireChronicles.slice(-30),companionSettings:A.companionSettings,recentToolTelemetry:(A.recentToolTelemetry||[]).slice(-30)};localStorage.setItem(Ke,JSON.stringify(e))}catch(e){console.error(`[CompanionStore] Save error:`,e)}$e.forEach(e=>e())}function j(e){A={...A,...e},et()}var tt={getState:()=>A,subscribe:e=>($e.add(e),()=>$e.delete(e)),setEmotion:e=>{j({activeEmotion:e})},setIsTyping:e=>{j({isTyping:e})},updateProfile:e=>{j({heroProfile:{...A.heroProfile,...e}})},updateCodex:(e,t)=>{let n=Ye(A.heroCodex,e,t);j({heroCodex:n,heroProfile:{...A.heroProfile,heroName:n.heroName,targetGoal:n.targetGoal,preferredLanguage:n.preferredLanguage}})},removeCodexItem:(e,t)=>{let n=(A.heroCodex[e]||[]).filter(e=>e!==t);j({heroCodex:{...A.heroCodex,[e]:n,lastUpdated:Date.now()}})},recordEpisodicEvent:e=>{let t=A.episodicEvents[0];j({episodicEvents:[{id:`ev-${Date.now()}`,timestamp:Date.now(),...e,contiguousEventId:e.contiguousEventId||t?.id},...A.episodicEvents].slice(0,40)})},updateSettings:e=>{j({companionSettings:{...A.companionSettings,...e}})},executeTool:async e=>{let t=await Be(e);return e.name===`write_spire_diary`&&t.success&&t.data?.text?tt.addDiaryEntry(t.data.text):e.name===`update_hero_codex`&&t.success&&t.data?.key&&t.data?.value?tt.updateCodex(t.data.key,t.data.value):e.name===`record_episodic_event`&&t.success&&t.data&&tt.recordEpisodicEvent({eventType:t.data.eventType||`session_summary`,title:t.data.title||`Event`,description:t.data.description||``,relatedPattern:t.data.relatedPattern,emotionalTone:A.activeEmotion}),j({recentToolTelemetry:[{tool_name:e.name,args:e.args,success:t.success,execution_time_ms:t.durationMs||0,hero_name:A.heroCodex.heroName||`Champion`,source:`client`,error:t.success?void 0:t.message,timestamp:Date.now()/1e3},...A.recentToolTelemetry||[]].slice(0,30)}),t},addDiaryEntry:e=>{j({spireChronicles:[{id:`diary-${Date.now()}`,timestamp:Date.now(),floor:A.currentFloor,text:e},...A.spireChronicles]})},sendMessage:async e=>{let t=e.trim();if(!t||A.isLoading)return;let n={id:`user-${Date.now()}`,sender:`user`,text:t,timestamp:Date.now()},r=[...A.transcript,n],i=r.filter(e=>e.sender===`user`).length,a=Ze(i),o=`princess-${Date.now()}`,s={id:o,sender:`princess`,text:``,emotion:`thinking_expression`,timestamp:Date.now(),isStreaming:!0,provider:`Spire Agent Stream`};j({transcript:[...r,s],isLoading:!0,isTyping:!0,activeEmotion:`thinking_expression`,bondTier:a});try{let e=Ue(),n=Xe(A.episodicEvents,t),i=``;await Le({princess_name:A.companionSettings.name,user_message:t,current_floor:A.currentFloor,streak_days:0,hero_name:A.heroCodex.heroName||A.heroProfile.heroName||`Champion`,target_goal:A.heroCodex.targetGoal||A.heroProfile.targetGoal,bond_tier:a,current_rhythm:e.state,hero_codex:A.heroCodex,episodic_memories:n,messages:r.slice(-10)},{onDelta:e=>{i+=e,j({transcript:A.transcript.map(e=>e.id===o?{...e,text:i,isStreaming:!0}:e),isLoading:!1,isTyping:!0})},onDone:e=>{if(Array.isArray(e.tool_calls))for(let t of e.tool_calls)tt.executeTool(t);let t=e.text||i||`I believe in you, champion!`;j({transcript:A.transcript.map(n=>n.id===o?{...n,text:t,emotion:e.emotion,toolCalls:e.tool_calls,choiceSuggestions:e.choice_suggestions,provider:e.provider_used||`Spire Agent Stream`,isStreaming:!1}:n),activeEmotion:e.emotion,isLoading:!1,isTyping:!1})},onError:e=>{console.warn(`[CompanionStore] Stream failed, using fallback:`,e);let t=Fe.idle_chat,n=t[Math.floor(Math.random()*t.length)];j({transcript:A.transcript.map(e=>e.id===o?{...e,text:n.text,emotion:n.emotion,provider:`Offline Script`,isStreaming:!1}:e),activeEmotion:n.emotion,isLoading:!1,isTyping:!1})}})}catch(e){console.error(`[CompanionStore] Send message error:`,e);let t=Fe.idle_chat,n=t[Math.floor(Math.random()*t.length)],r={id:o,sender:`princess`,text:n.text,emotion:n.emotion,timestamp:Date.now(),provider:`Offline Script`,isStreaming:!1};j({transcript:A.transcript.map(e=>e.id===o?r:e),activeEmotion:n.emotion,isLoading:!1,isTyping:!1})}},addReviewEvent:async(e,t=`a problem`,n=``)=>{let r=e===`Correct`,i=A.currentFloor,a=A.totalSolved,o=[...A.unlockedMilestones],s=[...A.unlockedLetters],c=A.consecutiveFailures,l=r?0:c+1,u=!1,d=0;if(r&&A.currentFloor=e&&!o.includes(e)){o.push(e),u=!0,d=e;let t=Pe[e];t&&!s.some(t=>t.floor===e)&&s.push({...t,unlockedAt:Date.now()})}}let f={id:`ep-${Date.now()}`,timestamp:Date.now(),type:r?`victory`:`struggle`,summary:`${r?`Mastered`:`Faced`} ${t} (${n||`DSA`}) - Graded ${e}`,floor:i};if(j({currentFloor:i,totalSolved:a,unlockedMilestones:o,unlockedLetters:s,consecutiveFailures:l,journeyLog:[f,...A.journeyLog]}),u&&tt.recordEpisodicEvent({eventType:`milestone`,title:`Passed League ${d}`,description:`Advanced past League ${d} on the road to the Spire of Big-O! Unlocked a royal missive from Aurelia.`,relatedPattern:n,emotionalTone:`excited_expression`}),r&&c>=2){let e=A.episodicEvents.find(e=>e.eventType===`fatigue_episode`||n&&e.relatedPattern?.toLowerCase()===n.toLowerCase());tt.recordEpisodicEvent({eventType:`breakthrough`,title:`Breakthrough: ${t}`,description:`Broke through previous hurdles to solve ${t}${n?` (${n})`:``} flawlessly!`,relatedPattern:n,emotionalTone:`excited_expression`,contiguousEventId:e?.id})}if(l>=3){tt.recordEpisodicEvent({eventType:`fatigue_episode`,title:`Fatigue: ${n||t}`,description:`Encountered 3 consecutive review struggles, most recently on ${t}${n?` (${n})`:``}. Aurelia intervened with rest advice.`,relatedPattern:n,emotionalTone:`concerned`});let e=Ge(l,A.heroProfile.heroName),r={id:`fatigue-${Date.now()}`,sender:`princess`,text:e.text,emotion:e.emotion,timestamp:Date.now(),provider:`Fatigue Watchdog`};j({transcript:[...A.transcript,r],activeEmotion:e.emotion});return}let p=Ue(),m=Fe[r?`problem_correct`:`problem_incorrect`],h=m[Math.floor(Math.random()*m.length)],g={id:`rev-${Date.now()}`,sender:`princess`,text:h.text,emotion:h.emotion,timestamp:Date.now(),provider:`Journey Log`};j({transcript:[...A.transcript,g],activeEmotion:h.emotion,currentRhythm:p.state,currentActivity:p.activity})},triggerProactiveGreeting:()=>{let e=Ue();j({currentRhythm:e.state,currentActivity:e.activity});let t=A.transcript[A.transcript.length-1],n=Date.now();if(t&&n-t.timestamp<18e5)return;let r=We(A.heroProfile.heroName||`Champion`),i={id:`proactive-${n}`,sender:`princess`,text:r.text,emotion:r.emotion,timestamp:n,provider:`Tower Rhythm`};j({transcript:[...A.transcript,i],activeEmotion:r.emotion})},clearTranscript:()=>{j({transcript:[{id:`init-${Date.now()}`,sender:`princess`,text:`The slate is refreshed, champion! How may I accompany your algorithmic journey right now?`,emotion:`smiling_warmly`,timestamp:Date.now(),provider:`Spire Relay`}],activeEmotion:`smiling_warmly`})},syncWithBackend:async()=>{try{let{data:{session:e}}=await n.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},r=await fetch(`/api/journey-progress`,{headers:t});if(r.ok){let e=await r.json(),t=Array.isArray(e)?e.length:0,n=Math.min(150,t),i=[30,60,90,120,150],a=[0],o=[...A.unlockedLetters];i.forEach(e=>{if(n>=e){a.push(e);let t=Pe[e];t&&!o.some(t=>t.floor===e)&&o.push({...t,unlockedAt:Date.now()})}}),j({currentFloor:n,totalSolved:t,unlockedMilestones:a,unlockedLetters:o})}}catch(e){console.warn(`[CompanionStore] Sync with backend journey failed:`,e)}}};function nt(){return(0,p.useSyncExternalStore)(tt.subscribe,tt.getState,tt.getState)}var rt={neutral:{id:`neutral`,label:`Calm`,imagePath:`/sprites/princess/neutral.png`},smiling_warmly:{id:`smiling_warmly`,label:`Smiling Warmly`,imagePath:`/sprites/princess/smiling_warmly.png`},excited_expression:{id:`excited_expression`,label:`Excited`,imagePath:`/sprites/princess/excited_expression.png`},thinking_expression:{id:`thinking_expression`,label:`Thinking`,imagePath:`/sprites/princess/thinking_expression.png`},concerned:{id:`concerned`,label:`Concerned`,imagePath:`/sprites/princess/concerned.png`},fear:{id:`fear`,label:`Startled`,imagePath:`/sprites/princess/fear.png`},sad_expression:{id:`sad_expression`,label:`Melancholy`,imagePath:`/sprites/princess/sad_expression.png`}},it=null;function at(){if(typeof window>`u`)return null;if(!it){let e=window.AudioContext||window.webkitAudioContext;e&&(it=new e)}return it&&it.state===`suspended`&&it.resume().catch(()=>{}),it}function ot(){try{return localStorage.getItem(`companion_sound_enabled`)===`false`}catch{return!1}}function st(e){try{localStorage.setItem(`companion_sound_enabled`,e?`false`:`true`)}catch{}}function ct(e=0){if(ot())return;let t=at();if(t)try{let n=t.createOscillator(),r=t.createGain();n.type=`triangle`;let i=520+e%5*20;n.frequency.setValueAtTime(i,t.currentTime),n.frequency.exponentialRampToValueAtTime(i*1.2,t.currentTime+.025),r.gain.setValueAtTime(.04,t.currentTime),r.gain.exponentialRampToValueAtTime(1e-4,t.currentTime+.035),n.connect(r),r.connect(t.destination),n.start(),n.stop(t.currentTime+.04)}catch{}}function lt(){if(ot())return;let e=at();if(e)try{let t=[523.25,659.25,783.99,1046.5],n=e.currentTime;t.forEach((t,r)=>{let i=e.createOscillator(),a=e.createGain();i.type=`sine`,i.frequency.setValueAtTime(t,n+r*.06),a.gain.setValueAtTime(.06,n+r*.06),a.gain.exponentialRampToValueAtTime(.001,n+r*.06+.18),i.connect(a),a.connect(e.destination),i.start(n+r*.06),i.stop(n+r*.06+.2)})}catch{}}function ut(){if(ot())return;let e=at();if(e)try{let t=[440,554.37,659.25,880],n=e.currentTime;t.forEach((t,r)=>{let i=e.createOscillator(),a=e.createGain();i.type=`triangle`,i.frequency.setValueAtTime(t,n+r*.09),a.gain.setValueAtTime(.07,n+r*.09),a.gain.exponentialRampToValueAtTime(1e-4,n+r*.09+.35),i.connect(a),a.connect(e.destination),i.start(n+r*.09),i.stop(n+r*.09+.4)})}catch{}}function dt({onOpenCompanionWindow:e}){let t=nt(),[n,r]=(0,p.useState)(!1),[i,a]=(0,p.useState)(``),[o,s]=(0,p.useState)(!1),[c,l]=(0,p.useState)(ot()),u=(0,p.useRef)(null),d=(0,p.useRef)(null),f=(0,p.useRef)(``);if((0,p.useEffect)(()=>{let e=t.transcript[t.transcript.length-1];if(e&&e.sender===`princess`&&t.companionSettings.enabled&&t.companionSettings.autoPopupEnabled&&e.id!==f.current&&(e.id.startsWith(`rev-`)||e.id.startsWith(`fatigue-`)||e.id.startsWith(`proactive-`))){f.current=e.id,r(!0),lt(),a(``),s(!0);let t=0;u.current&&clearInterval(u.current),u.current=setInterval(()=>{t{r(!1)},8e3))},24)}},[t.transcript,t.companionSettings.enabled,t.companionSettings.autoPopupEnabled]),!n)return null;let m=t.transcript[t.transcript.length-1],h=rt[t.activeEmotion]||rt.smiling_warmly,g=Ne(t.currentFloor);return(0,k.jsx)(`div`,{className:`fixed bottom-14 right-3 sm:right-6 z-[9990] max-w-[480px] w-[calc(100vw-24px)] transition-all animate-in fade-in slide-in-from-bottom-5 duration-300 select-none`,onClick:()=>{o&&m&&(u.current&&clearInterval(u.current),a(m.text),s(!1))},children:(0,k.jsxs)(`div`,{className:`relative bg-[#FFFDF0] border-[3px] border-ink-black rounded-lg shadow-[6px_6px_0px_0px_#1E293B] overflow-hidden flex flex-col font-sans`,children:[(0,k.jsxs)(`div`,{className:`bg-[#FFE24C] border-b-[3px] border-ink-black px-3 py-1.5 flex items-center justify-between`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,k.jsxs)(`span`,{className:`text-xs font-bold font-headline-md text-ink-black tracking-wide truncate flex items-center gap-1`,children:[(0,k.jsx)(D,{className:`w-3.5 h-3.5 text-amber-600 shrink-0`}),t.companionSettings.name||`Princess Aurelia`]}),(0,k.jsxs)(`span`,{className:`bg-ink-black text-[#FFE24C] text-[9px] font-bold font-arcade px-1.5 py-0.5 rounded shrink-0`,children:[t.currentFloor,`/150 LC`]})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation();let t=!c;l(t),st(t)},className:`p-1 hover:bg-black/10 rounded text-ink-black cursor-pointer border-0 bg-transparent`,title:c?`Unmute Audio`:`Mute Audio`,children:c?(0,k.jsx)(_e,{className:`w-3.5 h-3.5`}):(0,k.jsx)(ge,{className:`w-3.5 h-3.5`})}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>r(!1),className:`p-1 hover:bg-rose-500 hover:text-white rounded text-ink-black cursor-pointer border-0 bg-transparent`,title:`Dismiss`,children:(0,k.jsx)(ve,{className:`w-3.5 h-3.5`})})]})]}),(0,k.jsxs)(`div`,{className:`p-3 sm:p-4 flex gap-3 sm:gap-4 items-start`,children:[(0,k.jsx)(`div`,{className:`relative shrink-0 flex flex-col items-center`,children:(0,k.jsxs)(`div`,{className:`w-16 h-20 sm:w-20 sm:h-24 bg-gradient-to-b from-amber-100 to-amber-200 border-[2px] border-ink-black rounded overflow-hidden shadow-[2px_2px_0px_0px_#1E293B]`,children:[(0,k.jsx)(`img`,{src:h.imagePath,alt:h.label,className:`w-full h-full object-cover object-top`,onError:e=>{e.target.src=`/sprites/princess/neutral.png`}}),(0,k.jsx)(`div`,{className:`absolute bottom-0 inset-x-0 bg-ink-black/80 text-[8px] text-amber-200 text-center py-0.5 font-bold uppercase tracking-wider`,children:h.label})]})}),(0,k.jsxs)(`div`,{className:`flex-1 flex flex-col justify-between min-h-[85px]`,children:[(0,k.jsxs)(`div`,{className:`relative bg-white border-[2px] border-ink-black rounded p-2.5 shadow-xs min-h-[60px]`,children:[(0,k.jsx)(`div`,{className:`absolute -left-[7px] top-4 w-3 h-3 bg-white border-l-[2px] border-b-[2px] border-ink-black rotate-45`}),(0,k.jsxs)(`p`,{className:`text-xs sm:text-[13px] text-ink-black font-medium leading-relaxed m-0 whitespace-pre-wrap`,children:[i,o&&(0,k.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-amber-500 ml-0.5 animate-pulse align-middle`})]})]}),(0,k.jsxs)(`div`,{className:`text-[10px] text-trash-gray font-medium mt-1.5 flex items-center justify-between`,children:[(0,k.jsxs)(`span`,{className:`truncate`,children:[`🗺️ `,g.title]}),o&&(0,k.jsx)(`span`,{className:`text-[9px] text-amber-700 font-bold animate-pulse shrink-0`,children:`Speaking...`})]})]})]}),(0,k.jsxs)(`div`,{className:`px-3 pb-3 pt-1 flex flex-wrap items-center justify-end gap-2 border-t border-amber-200/60 bg-amber-50/40`,children:[(0,k.jsxs)(`button`,{type:`button`,onClick:()=>{e(),r(!1)},className:`flex items-center gap-1 px-2.5 py-1 bg-[#FFE24C] hover:bg-yellow-300 text-ink-black border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,k.jsx)(de,{className:`w-3 h-3`}),(0,k.jsx)(`span`,{children:`Talk to Her`}),(0,k.jsx)(ae,{className:`w-3 h-3`})]}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>r(!1),className:`px-2.5 py-1 bg-white hover:bg-slate-100 text-slate-700 border-[2px] border-slate-300 rounded text-[11px] font-bold active:translate-y-0.5 transition-all cursor-pointer`,children:`Dismiss`})]})]})})}var ft={neutral:{id:`neutral`,label:`Calm`,imagePath:`/sprites/princess/neutral.png`},smiling_warmly:{id:`smiling_warmly`,label:`Smiling Warmly`,imagePath:`/sprites/princess/smiling_warmly.png`},excited_expression:{id:`excited_expression`,label:`Excited`,imagePath:`/sprites/princess/excited_expression.png`},thinking_expression:{id:`thinking_expression`,label:`Thinking`,imagePath:`/sprites/princess/thinking_expression.png`},concerned:{id:`concerned`,label:`Concerned`,imagePath:`/sprites/princess/concerned.png`},fear:{id:`fear`,label:`Startled`,imagePath:`/sprites/princess/fear.png`},sad_expression:{id:`sad_expression`,label:`Melancholy`,imagePath:`/sprites/princess/sad_expression.png`}},M={enabled:!0,name:`Princess Aurelia`,backstory:`Princess Aurelia is trapped in the high Spire of Big-O Complexity. You are a brave traveler journeying across the kingdom. By mastering all 150 LeetCode problems along the royal road, you will reach the tower gates and break her magical seal!`,breakIntervalMinutes:25,soundEnabled:!0,autoPopupEnabled:!0},pt=[{floorRange:[1,30],title:`The Plains of Arrays & Strings`,description:`Rolling green meadows and ancient cobblestone roads where the journey begins.`,bgLore:`Looking out towards the distant horizon, the silhouette of the Spire pierces the clouds.`},{floorRange:[31,60],title:`The Whispering Forest of Pointers`,description:`Winding paths through dense groves where two pointers guide your compass.`,bgLore:`Aurelia’s magical beacon shines above the treetops, guiding your footsteps along the trail.`},{floorRange:[61,90],title:`The Grand Caverns of Trees & Graphs`,description:`Bioluminescent caves with branching crystal arches and subterranean passes.`,bgLore:`Halfway to the tower! Her voice echoes with hope over the enchanted royal relay.`},{floorRange:[91,120],title:`The High Mountain Passes of Heaps & Backtracking`,description:`Perilous alpine ridges and snowy peaks overlooking the Spire valley.`,bgLore:`From the highest ridge, the base of the Spire is in sight through the mountain mist!`},{floorRange:[121,149],title:`The Enchanted Valley of Dynamic Programming`,description:`Shimmering mystical grounds where optimal solutions bridge the final moat.`,bgLore:`The final leagues! The Spire looms directly ahead, its ancient runic wards trembling.`},{floorRange:[150,150],title:`The Gates of the Big-O Spire`,description:`Standing at the threshold of the grand tower gates to break the seal and free Aurelia!`,bgLore:`150 algorithms conquered! You have completed the grand journey and reached the Spire!`}],mt={break_reminder:[{id:`br-1`,text:`Brave traveler! You have traveled many leagues today. Even the swiftest steeds rest by the campfire—shall we pause for a stretch and some water?`,emotion:`concerned`,context:`break_reminder`},{id:`br-2`,text:`I can see your progress across the plains from my tower window! Please rest your eyes for a moment; a clear mind travels swiftest.`,emotion:`smiling_warmly`,context:`break_reminder`},{id:`br-3`,text:`The evening winds carry word of your relentless march. Take 5 minutes to rest—I will keep watch from the Spire beacon!`,emotion:`thinking_expression`,context:`break_reminder`},{id:`br-4`,text:`Do not exhaust yourself on the road, my hero! Pacing is the secret to enduring a 150-problem expedition. Let us take a short pause.`,emotion:`concerned`,context:`break_reminder`}],problem_correct:[{id:`pc-1`,text:`Magnificent! You conquered that obstacle and advanced another league closer to my tower!`,emotion:`excited_expression`,context:`problem_correct`},{id:`pc-2`,text:`A flawless solution! With every problem you master, the distance between us grows shorter.`,emotion:`smiling_warmly`,context:`problem_correct`},{id:`pc-3`,text:`Incredible speed and elegance! I felt the Spire beacon flare with light as you crossed another milestone!`,emotion:`excited_expression`,context:`problem_correct`},{id:`pc-4`,text:`You handled that algorithm with true mastery. Step by step, league by league, you are approaching the Spire gates!`,emotion:`smiling_warmly`,context:`problem_correct`}],problem_incorrect:[{id:`pi-1`,text:`Do not despair, noble traveler! The road to the Spire has rough terrain. Review the edge cases and let us push forward!`,emotion:`concerned`,context:`problem_incorrect`},{id:`pi-2`,text:`Every wrong turn on the map teaches you the true layout of the land. Let us examine the test case together.`,emotion:`thinking_expression`,context:`problem_incorrect`},{id:`pi-3`,text:`Stay steadfast! I believe in your courage and intellect. Take a breath—we will conquer this pass together!`,emotion:`smiling_warmly`,context:`problem_incorrect`},{id:`pi-4`,text:`A challenging problem! But overcoming difficult obstacles is what makes a legendary hero. Keep your head high!`,emotion:`neutral`,context:`problem_incorrect`}],streak_milestone:[{id:`sm-1`,text:`A glorious travel streak! Your daily dedication across the realms is inspiring. The Spire bells chime in your honor!`,emotion:`excited_expression`,context:`streak_milestone`},{id:`sm-2`,text:`Look at that continuous march! Consistency is the true magic that brings you across all 150 leagues to the tower.`,emotion:`smiling_warmly`,context:`streak_milestone`}],study_start:[{id:`ss-1`,text:`Welcome back to the trail, brave adventurer! Which algorithmic territories shall we cross today on our way to the Spire?`,emotion:`smiling_warmly`,context:`study_start`},{id:`ss-2`,text:`I saw the dust of your travel carriage on the horizon! Ready to conquer today’s review queue and draw closer to the tower?`,emotion:`excited_expression`,context:`study_start`}],idle_motivation:[{id:`im-1`,text:`Whenever the trail seems daunting, break the problem into smaller sub-problems. Every step counts toward the 150 milestone!`,emotion:`thinking_expression`,context:`idle_motivation`},{id:`im-2`,text:`I am watching over your journey and cheering you on! Your quest brings hope to this entire realm.`,emotion:`smiling_warmly`,context:`idle_motivation`},{id:`im-3`,text:`150 problems is a grand quest, but you have the intellect and heart to reach the Spire gates!`,emotion:`neutral`,context:`idle_motivation`}],tower_milestone:[{id:`tm-1`,text:`You have crossed the Plains of Arrays! 30 problems mastered—the first realm is behind us!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:30},{id:`tm-2`,text:`You emerged from the Whispering Forest! 60 problems solved—I can see your banner waving near the foothills!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:60},{id:`tm-3`,text:`Through the Grand Caverns! 90 problems conquered—more than halfway to the Spire!`,emotion:`smiling_warmly`,context:`tower_milestone`,floorRequirement:90},{id:`tm-4`,text:`You crested the High Mountain Passes! 120 problems conquered—the Spire valley is right before you!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:120},{id:`tm-5`,text:`YOU HAVE REACHED THE SPIRE GATES! All 150 LeetCode problems conquered! The grand seals shatter—freedom at last, my legendary champion!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:150}],chat_response:[]},ht=`companion_settings`,gt=`tower_progress`;function _t(){try{let e=localStorage.getItem(ht);return e?{...M,...JSON.parse(e)}:M}catch{return M}}function vt(e){try{localStorage.setItem(ht,JSON.stringify(e))}catch(e){console.error(`Failed to save companion settings:`,e)}}function yt(){try{let e=localStorage.getItem(gt);return e?JSON.parse(e):{currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]}}catch{return{currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]}}}function bt(e){try{localStorage.setItem(gt,JSON.stringify(e))}catch(e){console.error(`Failed to save tower progress:`,e)}}function xt(){let e={currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]};return bt(e),e}async function St(){try{let{data:{session:e}}=await n.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},r=await fetch(`/api/journey-progress`,{headers:t});if(r.ok){let e=await r.json(),t=Array.isArray(e)?e.length:0,n=Math.min(150,t),i=[30,60,90,120,150],a=[0];i.forEach(e=>{n>=e&&a.push(e)});let o={currentFloor:n,maxFloor:150,totalSolved:t,unlockedMilestones:a};return bt(o),o}}catch(e){console.error(`Failed to sync companion progress with backend journey:`,e)}return yt()}function Ct(e){return pt.find(t=>e>=t.floorRange[0]&&e<=t.floorRange[1])||pt[0]}function wt(e,t){let n=mt[e]||mt.idle_motivation;if(t&&e===`tower_milestone`){let e=n.find(e=>e.floorRequirement===t);if(e)return e}return n[Math.floor(Math.random()*n.length)]||n[0]}function Tt({event:e,onClose:t,onOpenCompanionWindow:n}){let[r,i]=(0,p.useState)(``),[a,o]=(0,p.useState)(!1),[s,c]=(0,p.useState)(ot()),[l,u]=(0,p.useState)(yt()),d=_t(),f=(0,p.useRef)(null),m=(0,p.useRef)(null);if((0,p.useEffect)(()=>{u(yt())},[e]),(0,p.useEffect)(()=>{if(!e){i(``),o(!1);return}lt();let n=e.text;i(``),o(!0);let r=0;return f.current&&clearInterval(f.current),f.current=setInterval(()=>{r0&&(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{t()},e.autoCloseDelay)))},28),()=>{f.current&&clearInterval(f.current),m.current&&clearTimeout(m.current)}},[e]),!e||!d.enabled)return null;let h=ft[e.emotion]||ft.smiling_warmly,g=Ct(l.currentFloor),_=e=>{e.stopPropagation();let t=!s;c(t),st(t)},v=()=>{a&&e&&(f.current&&clearInterval(f.current),i(e.text),o(!1))},y=e.context===`break_reminder`;return(0,k.jsx)(`div`,{className:`fixed bottom-14 right-3 sm:right-6 z-[9990] max-w-[480px] w-[calc(100vw-24px)] transition-all animate-in fade-in slide-in-from-bottom-5 duration-300 select-none`,onClick:v,children:(0,k.jsxs)(`div`,{className:`relative bg-[#FFFDF0] border-[3px] border-ink-black rounded-lg shadow-[6px_6px_0px_0px_#1E293B] overflow-hidden flex flex-col font-sans`,children:[(0,k.jsxs)(`div`,{className:`bg-[#FFE24C] border-b-[3px] border-ink-black px-3 py-1.5 flex items-center justify-between`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,k.jsxs)(`span`,{className:`text-xs font-bold font-headline-md text-ink-black tracking-wide truncate flex items-center gap-1`,children:[(0,k.jsx)(D,{className:`w-3.5 h-3.5 text-amber-600 shrink-0`}),d.name||`Princess Aurelia`]}),(0,k.jsxs)(`span`,{className:`bg-ink-black text-[#FFE24C] text-[9px] font-bold font-arcade px-1.5 py-0.5 rounded shrink-0`,children:[l.currentFloor,`/150 LC`]})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:_,className:`p-1 hover:bg-black/10 rounded text-ink-black cursor-pointer transition-colors border-0 bg-transparent`,title:s?`Unmute Audio`:`Mute Audio`,children:s?(0,k.jsx)(_e,{className:`w-3.5 h-3.5`}):(0,k.jsx)(ge,{className:`w-3.5 h-3.5`})}),(0,k.jsx)(`button`,{type:`button`,onClick:t,className:`p-1 hover:bg-rose-500 hover:text-white rounded text-ink-black cursor-pointer transition-colors border-0 bg-transparent`,title:`Dismiss Dialogue`,children:(0,k.jsx)(ve,{className:`w-3.5 h-3.5`})})]})]}),(0,k.jsxs)(`div`,{className:`p-3 sm:p-4 flex gap-3 sm:gap-4 items-start`,children:[(0,k.jsx)(`div`,{className:`relative shrink-0 flex flex-col items-center`,children:(0,k.jsxs)(`div`,{className:`w-16 h-20 sm:w-20 sm:h-24 bg-gradient-to-b from-amber-100 to-amber-200 border-[2px] border-ink-black rounded overflow-hidden shadow-[2px_2px_0px_0px_#1E293B] relative group`,children:[(0,k.jsx)(`img`,{src:h.imagePath,alt:h.label,className:`w-full h-full object-cover object-top transition-transform duration-300 group-hover:scale-105`,onError:e=>{e.target.src=`/sprites/princess/neutral.png`}}),(0,k.jsx)(`div`,{className:`absolute bottom-0 inset-x-0 bg-ink-black/80 text-[8px] text-amber-200 text-center py-0.5 font-bold uppercase tracking-wider backdrop-blur-xs`,children:h.label})]})}),(0,k.jsxs)(`div`,{className:`flex-1 flex flex-col justify-between min-h-[90px]`,children:[(0,k.jsxs)(`div`,{className:`relative bg-white border-[2px] border-ink-black rounded p-2.5 shadow-[2px_2px_0px_0px_rgba(0,0,0,0.06)] min-h-[64px]`,children:[(0,k.jsx)(`div`,{className:`absolute -left-[7px] top-4 w-3 h-3 bg-white border-l-[2px] border-b-[2px] border-ink-black rotate-45`}),(0,k.jsxs)(`p`,{className:`text-xs sm:text-[13px] text-ink-black font-medium leading-relaxed m-0 whitespace-pre-wrap`,children:[r,a&&(0,k.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-amber-500 ml-0.5 animate-pulse align-middle`})]})]}),(0,k.jsxs)(`div`,{className:`text-[10px] text-trash-gray font-medium mt-1.5 flex items-center justify-between`,children:[(0,k.jsx)(`span`,{className:`truncate flex items-center gap-1`,children:(0,k.jsxs)(`span`,{children:[`🗺️ `,g.title]})}),a&&(0,k.jsx)(`span`,{className:`text-[9px] text-amber-700 font-bold animate-pulse shrink-0`,children:`Speaking...`})]})]})]}),(0,k.jsxs)(`div`,{className:`px-3 pb-3 pt-1 flex flex-wrap items-center justify-end gap-2 border-t border-amber-200/60 bg-amber-50/40`,children:[y&&(0,k.jsxs)(`button`,{type:`button`,onClick:()=>{t()},className:`flex items-center gap-1 px-2.5 py-1 bg-emerald-500 hover:bg-emerald-600 text-white border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,k.jsx)(ce,{className:`w-3 h-3`}),(0,k.jsx)(`span`,{children:`Take a Break`})]}),(0,k.jsxs)(`button`,{type:`button`,onClick:()=>{n(),t()},className:`flex items-center gap-1 px-2.5 py-1 bg-[#FFE24C] hover:bg-yellow-300 text-ink-black border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,k.jsx)(de,{className:`w-3 h-3`}),(0,k.jsx)(`span`,{children:`Talk to Her`}),(0,k.jsx)(ae,{className:`w-3 h-3`})]}),(0,k.jsx)(`button`,{type:`button`,onClick:t,className:`px-2.5 py-1 bg-white hover:bg-slate-100 text-slate-700 border-[2px] border-slate-300 rounded text-[11px] font-bold active:translate-y-0.5 transition-all cursor-pointer`,children:`Dismiss`})]})]})})}var Et=[{id:`nc-217`,problem_number:217,name:`Contains Duplicate`,pattern:`Arrays & Hashing`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def containsDuplicate(self, nums: list[int]) -> bool: + pass`,description:`Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.`,examples:[{input:`nums = [1,2,3,1]`,output:`true`},{input:`nums = [1,2,3,4]`,output:`false`}],constraints:[`1 <= nums.length <= 10^5`,`-10^9 <= nums[i] <= 10^9`],leetcode_url:`https://leetcode.com/problems/contains-duplicate/`,reference_solution:`class Solution: + def containsDuplicate(self, nums: list[int]) -> bool: + seen = set() + for n in nums: + if n in seen: + return True + seen.add(n) + return False`},{id:`nc-242`,problem_number:242,name:`Valid Anagram`,pattern:`Arrays & Hashing`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def isAnagram(self, s: str, t: str) -> bool: + pass`,description:`Given two strings s and t, return true if t is an anagram of s, and false otherwise.`,examples:[{input:`s = "anagram", t = "nagaram"`,output:`true`},{input:`s = "rat", t = "car"`,output:`false`}],constraints:[`1 <= s.length, t.length <= 5 * 10^4`,`s and t consist of lowercase English letters.`],leetcode_url:`https://leetcode.com/problems/valid-anagram/`,reference_solution:`class Solution: + def isAnagram(self, s: str, t: str) -> bool: + if len(s) != len(t): + return False + counts = {} + for char in s: + counts[char] = counts.get(char, 0) + 1 + for char in t: + if char not in counts or counts[char] == 0: + return False + counts[char] -= 1 + return True`},{id:`nc-1`,problem_number:1,name:`Two Sum`,pattern:`Arrays & Hashing`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def twoSum(self, nums: list[int], target: int) -> list[int]: + pass`,description:`Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.`,examples:[{input:`nums = [2,7,11,15], target = 9`,output:`[0,1]`}],constraints:[`2 <= nums.length <= 10^4`,`-10^9 <= nums[i] <= 10^9`,`Exactly one solution exists.`],leetcode_url:`https://leetcode.com/problems/two-sum/`,reference_solution:`class Solution: + def twoSum(self, nums: list[int], target: int) -> list[int]: + prev = {} + for i, n in enumerate(nums): + diff = target - n + if diff in prev: + return [prev[diff], i] + prev[n] = i + return []`},{id:`nc-49`,problem_number:49,name:`Group Anagrams`,pattern:`Arrays & Hashing`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def groupAnagrams(self, strs: list[str]) -> list[list[str]]: + pass`,description:`Given an array of strings strs, group the anagrams together. You can return the answer in any order.`,examples:[{input:`strs = ["eat","tea","tan","ate","nat","bat"]`,output:`[["bat"],["nat","tan"],["ate","eat","tea"]]`}],constraints:[`1 <= strs.length <= 10^4`,`0 <= strs[i].length <= 100`],leetcode_url:`https://leetcode.com/problems/group-anagrams/`,reference_solution:`from collections import defaultdict + +class Solution: + def groupAnagrams(self, strs: list[str]) -> list[list[str]]: + res = defaultdict(list) + for s in strs: + count = [0] * 26 + for c in s: + count[ord(c) - ord('a')] += 1 + res[tuple(count)].append(s) + return list(res.values())`},{id:`nc-347`,problem_number:347,name:`Top K Frequent Elements`,pattern:`Arrays & Hashing`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def topKFrequent(self, nums: list[int], k: int) -> list[int]: + pass`,description:`Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.`,examples:[{input:`nums = [1,1,1,2,2,3], k = 2`,output:`[1,2]`}],constraints:[`1 <= nums.length <= 10^5`,`1 <= k <= unique elements count`],leetcode_url:`https://leetcode.com/problems/top-k-frequent-elements/`,reference_solution:`class Solution: + def topKFrequent(self, nums: list[int], k: int) -> list[int]: + count = {} + freq = [[] for _ in range(len(nums) + 1)] + for n in nums: + count[n] = 1 + count.get(n, 0) + for n, c in count.items(): + freq[c].append(n) + res = [] + for i in range(len(freq) - 1, 0, -1): + for n in freq[i]: + res.append(n) + if len(res) == k: + return res + return res`},{id:`nc-271`,problem_number:271,name:`Encode and Decode Strings`,pattern:`Arrays & Hashing`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Codec: + def encode(self, strs: list[str]) -> str: + pass + def decode(self, s: str) -> list[str]: + pass`,description:`Design an algorithm to encode a list of strings to a single string and decode it back.`,examples:[{input:`dummy_input = ["lint","code","love","you"]`,output:`["lint","code","love","you"]`}],constraints:[`1 <= strs.length <= 200`],leetcode_url:`https://leetcode.com/problems/encode-and-decode-strings/`,reference_solution:`class Codec: + def encode(self, strs: list[str]) -> str: + res = "" + for s in strs: + res += str(len(s)) + "#" + s + return res + + def decode(self, s: str) -> list[str]: + res, i = [], 0 + while i < len(s): + j = i + while s[j] != "#": + j += 1 + length = int(s[i:j]) + res.append(s[j + 1 : j + 1 + length]) + i = j + 1 + length + return res`},{id:`nc-238`,problem_number:238,name:`Product of Array Except Self`,pattern:`Arrays & Hashing`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def productExceptSelf(self, nums: list[int]) -> list[int]: + pass`,description:`Given an integer array nums, return an array answer such that answer[i] is equal to the product of all elements except nums[i]. Without division in O(n).`,examples:[{input:`nums = [1,2,3,4]`,output:`[24,12,8,6]`}],constraints:[`2 <= nums.length <= 10^5`,`-30 <= nums[i] <= 30`],leetcode_url:`https://leetcode.com/problems/product-of-array-except-self/`,reference_solution:`class Solution: + def productExceptSelf(self, nums: list[int]) -> list[int]: + res = [1] * len(nums) + prefix = 1 + for i in range(len(nums)): + res[i] = prefix + prefix *= nums[i] + postfix = 1 + for i in range(len(nums) - 1, -1, -1): + res[i] *= postfix + postfix *= nums[i] + return res`},{id:`nc-36`,problem_number:36,name:`Valid Sudoku`,pattern:`Arrays & Hashing`,difficulty:`Medium`,time_complexity:`O(1)`,space_complexity:`O(1)`,starter_code:`class Solution: + def isValidSudoku(self, board: list[list[str]]) -> bool: + pass`,description:`Determine if a 9 x 9 Sudoku board is valid according to Sudoku rules.`,examples:[{input:`board = 9x9 board`,output:`true`}],constraints:[`board is 9x9`,`digits 1-9 or '.'`],leetcode_url:`https://leetcode.com/problems/valid-sudoku/`,reference_solution:`from collections import defaultdict + +class Solution: + def isValidSudoku(self, board: list[list[str]]) -> bool: + cols = defaultdict(set) + rows = defaultdict(set) + squares = defaultdict(set) + for r in range(9): + for c in range(9): + if board[r][c] == ".": + continue + val = board[r][c] + if val in rows[r] or val in cols[c] or val in squares[(r // 3, c // 3)]: + return False + cols[c].add(val) + rows[r].add(val) + squares[(r // 3, c // 3)].add(val) + return True`},{id:`nc-128`,problem_number:128,name:`Longest Consecutive Sequence`,pattern:`Arrays & Hashing`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def longestConsecutive(self, nums: list[int]) -> int: + pass`,description:`Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence in O(n) time.`,examples:[{input:`nums = [100,4,200,1,3,2]`,output:`4`}],constraints:[`0 <= nums.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/longest-consecutive-sequence/`,reference_solution:`class Solution: + def longestConsecutive(self, nums: list[int]) -> int: + numSet = set(nums) + longest = 0 + for n in numSet: + if (n - 1) not in numSet: + length = 1 + while (n + length) in numSet: + length += 1 + longest = max(longest, length) + return longest`},{id:`nc-125`,problem_number:125,name:`Valid Palindrome`,pattern:`Two Pointers`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def isPalindrome(self, s: str) -> bool: + pass`,description:`Check if a string is a palindrome considering only alphanumeric characters and ignoring cases.`,examples:[{input:`s = "A man, a plan, a canal: Panama"`,output:`true`}],constraints:[`1 <= s.length <= 2 * 10^5`],leetcode_url:`https://leetcode.com/problems/valid-palindrome/`,reference_solution:`class Solution: + def isPalindrome(self, s: str) -> bool: + l, r = 0, len(s) - 1 + while l < r: + while l < r and not s[l].isalnum(): + l += 1 + while l < r and not s[r].isalnum(): + r -= 1 + if s[l].lower() != s[r].lower(): + return False + l += 1 + r -= 1 + return True`},{id:`nc-167`,problem_number:167,name:`Two Sum II - Input Array Is Sorted`,pattern:`Two Pointers`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def twoSum(self, numbers: list[int], target: int) -> list[int]: + pass`,description:`Given a 1-indexed sorted array numbers, find two numbers that add up to target.`,examples:[{input:`numbers = [2,7,11,15], target = 9`,output:`[1,2]`}],constraints:[`2 <= numbers.length <= 3 * 10^4`],leetcode_url:`https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/`,reference_solution:`class Solution: + def twoSum(self, numbers: list[int], target: int) -> list[int]: + l, r = 0, len(numbers) - 1 + while l < r: + cur = numbers[l] + numbers[r] + if cur > target: + r -= 1 + elif cur < target: + l += 1 + else: + return [l + 1, r + 1] + return []`},{id:`nc-15`,problem_number:15,name:`3Sum`,pattern:`Two Pointers`,difficulty:`Medium`,time_complexity:`O(N^2)`,space_complexity:`O(1)`,starter_code:`class Solution: + def threeSum(self, nums: list[int]) -> list[list[int]]: + pass`,description:`Find all unique triplets in nums that sum to 0.`,examples:[{input:`nums = [-1,0,1,2,-1,-4]`,output:`[[-1,-1,2],[-1,0,1]]`}],constraints:[`3 <= nums.length <= 3000`],leetcode_url:`https://leetcode.com/problems/3sum/`,reference_solution:`class Solution: + def threeSum(self, nums: list[int]) -> list[list[int]]: + res = [] + nums.sort() + for i, a in enumerate(nums): + if a > 0: + break + if i > 0 and a == nums[i - 1]: + continue + l, r = i + 1, len(nums) - 1 + while l < r: + threeSum = a + nums[l] + nums[r] + if threeSum > 0: + r -= 1 + elif threeSum < 0: + l += 1 + else: + res.append([a, nums[l], nums[r]]) + l += 1 + r -= 1 + while nums[l] == nums[l - 1] and l < r: + l += 1 + return res`},{id:`nc-11`,problem_number:11,name:`Container With Most Water`,pattern:`Two Pointers`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def maxArea(self, height: list[int]) -> int: + pass`,description:`Find two lines that together with the x-axis form a container storing the most water.`,examples:[{input:`height = [1,8,6,2,5,4,8,3,7]`,output:`49`}],constraints:[`2 <= height.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/container-with-most-water/`,reference_solution:`class Solution: + def maxArea(self, height: list[int]) -> int: + l, r = 0, len(height) - 1 + res = 0 + while l < r: + res = max(res, min(height[l], height[r]) * (r - l)) + if height[l] <= height[r]: + l += 1 + else: + r -= 1 + return res`},{id:`nc-42`,problem_number:42,name:`Trapping Rain Water`,pattern:`Two Pointers`,difficulty:`Hard`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def trap(self, height: list[int]) -> int: + pass`,description:`Compute how much water an elevation map can trap after raining.`,examples:[{input:`height = [0,1,0,2,1,0,1,3,2,1,2,1]`,output:`6`}],constraints:[`1 <= height.length <= 2 * 10^4`],leetcode_url:`https://leetcode.com/problems/trapping-rain-water/`,reference_solution:`class Solution: + def trap(self, height: list[int]) -> int: + if not height: + return 0 + l, r = 0, len(height) - 1 + leftMax, rightMax = height[l], height[r] + res = 0 + while l < r: + if leftMax < rightMax: + l += 1 + leftMax = max(leftMax, height[l]) + res += leftMax - height[l] + else: + r -= 1 + rightMax = max(rightMax, height[r]) + res += rightMax - height[r] + return res`},{id:`nc-121`,problem_number:121,name:`Best Time to Buy and Sell Stock`,pattern:`Sliding Window`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def maxProfit(self, prices: list[int]) -> int: + pass`,description:`Maximize profit by choosing a single day to buy one stock and choosing a different day in the future to sell it.`,examples:[{input:`prices = [7,1,5,3,6,4]`,output:`5`}],constraints:[`1 <= prices.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/best-time-to-buy-and-sell-stock/`,reference_solution:`class Solution: + def maxProfit(self, prices: list[int]) -> int: + l, r = 0, 1 + maxP = 0 + while r < len(prices): + if prices[l] < prices[r]: + maxP = max(maxP, prices[r] - prices[l]) + else: + l = r + r += 1 + return maxP`},{id:`nc-3`,problem_number:3,name:`Longest Substring Without Repeating Characters`,pattern:`Sliding Window`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def lengthOfLongestSubstring(self, s: str) -> int: + pass`,description:`Find the length of the longest substring without duplicate characters.`,examples:[{input:`s = "abcabcbb"`,output:`3`}],constraints:[`0 <= s.length <= 5 * 10^4`],leetcode_url:`https://leetcode.com/problems/longest-substring-without-repeating-characters/`,reference_solution:`class Solution: + def lengthOfLongestSubstring(self, s: str) -> int: + charSet = set() + l, res = 0, 0 + for r in range(len(s)): + while s[r] in charSet: + charSet.remove(s[l]) + l += 1 + charSet.add(s[r]) + res = max(res, r - l + 1) + return res`},{id:`nc-424`,problem_number:424,name:`Longest Repeating Character Replacement`,pattern:`Sliding Window`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def characterReplacement(self, s: str, k: int) -> int: + pass`,description:`Choose at most k characters and replace them with any other uppercase character to get the longest substring containing the same letter.`,examples:[{input:`s = "ABAB", k = 2`,output:`4`}],constraints:[`1 <= s.length <= 10^5`,`0 <= k <= s.length`],leetcode_url:`https://leetcode.com/problems/longest-repeating-character-replacement/`,reference_solution:`class Solution: + def characterReplacement(self, s: str, k: int) -> int: + count = {} + res = l = maxf = 0 + for r in range(len(s)): + count[s[r]] = 1 + count.get(s[r], 0) + maxf = max(maxf, count[s[r]]) + while (r - l + 1) - maxf > k: + count[s[l]] -= 1 + l += 1 + res = max(res, r - l + 1) + return res`},{id:`nc-567`,problem_number:567,name:`Permutation in String`,pattern:`Sliding Window`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def checkInclusion(self, s1: str, s2: str) -> bool: + pass`,description:`Return true if s2 contains a permutation of s1, or false otherwise.`,examples:[{input:`s1 = "ab", s2 = "eidbaooo"`,output:`true`}],constraints:[`1 <= s1.length, s2.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/permutation-in-string/`,reference_solution:`class Solution: + def checkInclusion(self, s1: str, s2: str) -> bool: + if len(s1) > len(s2): + return False + s1C, s2C = [0] * 26, [0] * 26 + for i in range(len(s1)): + s1C[ord(s1[i]) - ord('a')] += 1 + s2C[ord(s2[i]) - ord('a')] += 1 + matches = sum(1 for i in range(26) if s1C[i] == s2C[i]) + l = 0 + for r in range(len(s1), len(s2)): + if matches == 26: + return True + idx = ord(s2[r]) - ord('a') + s2C[idx] += 1 + if s1C[idx] == s2C[idx]: matches += 1 + elif s1C[idx] + 1 == s2C[idx]: matches -= 1 + idx = ord(s2[l]) - ord('a') + s2C[idx] -= 1 + if s1C[idx] == s2C[idx]: matches += 1 + elif s1C[idx] - 1 == s2C[idx]: matches -= 1 + l += 1 + return matches == 26`},{id:`nc-76`,problem_number:76,name:`Minimum Window Substring`,pattern:`Sliding Window`,difficulty:`Hard`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def minWindow(self, s: str, t: str) -> str: + pass`,description:`Given two strings s and t, return the minimum window substring of s such that every character in t is included in the window.`,examples:[{input:`s = "ADOBECODEBANC", t = "ABC"`,output:`"BANC"`}],constraints:[`1 <= s.length, t.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/minimum-window-substring/`,reference_solution:`class Solution: + def minWindow(self, s: str, t: str) -> str: + if not t: return "" + countT, window = {}, {} + for c in t: countT[c] = 1 + countT.get(c, 0) + have, need = 0, len(countT) + res, resLen = [-1, -1], float('inf') + l = 0 + for r in range(len(s)): + c = s[r] + window[c] = 1 + window.get(c, 0) + if c in countT and window[c] == countT[c]: have += 1 + while have == need: + if (r - l + 1) < resLen: + res = [l, r] + resLen = r - l + 1 + window[s[l]] -= 1 + if s[l] in countT and window[s[l]] < countT[s[l]]: have -= 1 + l += 1 + l, r = res + return s[l:r+1] if resLen != float('inf') else ""`},{id:`nc-239`,problem_number:239,name:`Sliding Window Maximum`,pattern:`Sliding Window`,difficulty:`Hard`,time_complexity:`O(N)`,space_complexity:`O(K)`,starter_code:`class Solution: + def maxSlidingWindow(self, nums: list[int], k: int) -> list[int]: + pass`,description:`Return the max sliding window of size k moving from very left of array to very right.`,examples:[{input:`nums = [1,3,-1,-3,5,3,6,7], k = 3`,output:`[3,3,5,5,6,7]`}],constraints:[`1 <= nums.length <= 10^5`,`1 <= k <= nums.length`],leetcode_url:`https://leetcode.com/problems/sliding-window-maximum/`,reference_solution:`from collections import deque + +class Solution: + def maxSlidingWindow(self, nums: list[int], k: int) -> list[int]: + output = [] + q = deque() + l = r = 0 + while r < len(nums): + while q and nums[q[-1]] < nums[r]: + q.pop() + q.append(r) + if l > q[0]: + q.popleft() + if (r + 1) >= k: + output.append(nums[q[0]]) + l += 1 + r += 1 + return output`},{id:`nc-20`,problem_number:20,name:`Valid Parentheses`,pattern:`Stack`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def isValid(self, s: str) -> bool: + pass`,description:`Determine if the input string has valid matching brackets '()', '{}', '[]'.`,examples:[{input:`s = "()[]{}"`,output:`true`},{input:`s = "(]"`,output:`false`}],constraints:[`1 <= s.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/valid-parentheses/`,reference_solution:`class Solution: + def isValid(self, s: str) -> bool: + Map = {")": "(", "]": "[", "}": "{"} + stack = [] + for c in s: + if c not in Map: + stack.append(c) + continue + if not stack or stack[-1] != Map[c]: + return False + stack.pop() + return not stack`},{id:`nc-155`,problem_number:155,name:`Min Stack`,pattern:`Stack`,difficulty:`Medium`,time_complexity:`O(1)`,space_complexity:`O(N)`,starter_code:`class MinStack: + def __init__(self): + pass + def push(self, val: int) -> None: + pass + def pop(self) -> None: + pass + def top(self) -> int: + pass + def getMin(self) -> int: + pass`,description:`Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.`,examples:[{input:`["MinStack","push","push","push","getMin","pop","top","getMin"]`,output:`[null,null,null,null,-3,null,0,-2]`}],constraints:[`Methods push, pop, top and getMin are called.`],leetcode_url:`https://leetcode.com/problems/min-stack/`,reference_solution:`class MinStack: + def __init__(self): + self.stack = [] + self.minStack = [] + def push(self, val: int) -> None: + self.stack.append(val) + val = min(val, self.minStack[-1] if self.minStack else val) + self.minStack.append(val) + def pop(self) -> None: + self.stack.pop() + self.minStack.pop() + def top(self) -> int: + return self.stack[-1] + def getMin(self) -> int: + return self.minStack[-1]`},{id:`nc-150`,problem_number:150,name:`Evaluate Reverse Polish Notation`,pattern:`Stack`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def evalRPN(self, tokens: list[str]) -> int: + pass`,description:`Evaluate the value of an arithmetic expression in Reverse Polish Notation.`,examples:[{input:`tokens = ["2","1","+","3","*"]`,output:`9`}],constraints:[`1 <= tokens.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/evaluate-reverse-polish-notation/`,reference_solution:`class Solution: + def evalRPN(self, tokens: list[str]) -> int: + stack = [] + for c in tokens: + if c == "+": + stack.append(stack.pop() + stack.pop()) + elif c == "-": + a, b = stack.pop(), stack.pop() + stack.append(b - a) + elif c == "*": + stack.append(stack.pop() * stack.pop()) + elif c == "/": + a, b = stack.pop(), stack.pop() + stack.append(int(float(b) / a)) + else: + stack.append(int(c)) + return stack[0]`},{id:`nc-739`,problem_number:739,name:`Daily Temperatures`,pattern:`Stack`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def dailyTemperatures(self, temperatures: list[int]) -> list[int]: + pass`,description:`Given daily temperatures, return an array answer where answer[i] is the days you have to wait after ith day to get warmer temperature.`,examples:[{input:`temperatures = [73,74,75,71,69,72,76,73]`,output:`[1,1,4,2,1,1,0,0]`}],constraints:[`1 <= temperatures.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/daily-temperatures/`,reference_solution:`class Solution: + def dailyTemperatures(self, temperatures: list[int]) -> list[int]: + res = [0] * len(temperatures) + stack = [] + for i, t in enumerate(temperatures): + while stack and t > stack[-1][0]: + stackT, stackInd = stack.pop() + res[stackInd] = i - stackInd + stack.append((t, i)) + return res`},{id:`nc-853`,problem_number:853,name:`Car Fleet`,pattern:`Stack`,difficulty:`Medium`,time_complexity:`O(N log N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def carFleet(self, target: int, position: list[int], speed: list[int]) -> int: + pass`,description:`Calculate how many car fleets will arrive at destination target position.`,examples:[{input:`target = 12, position = [10,8,0,5,3], speed = [2,4,1,1,3]`,output:`3`}],constraints:[`n == position.length == speed.length`],leetcode_url:`https://leetcode.com/problems/car-fleet/`,reference_solution:`class Solution: + def carFleet(self, target: int, position: list[int], speed: list[int]) -> int: + pair = [(p, s) for p, s in zip(position, speed)] + pair.sort(reverse=True) + stack = [] + for p, s in pair: + stack.append((target - p) / s) + if len(stack) >= 2 and stack[-1] <= stack[-2]: + stack.pop() + return len(stack)`},{id:`nc-84`,problem_number:84,name:`Largest Rectangle in Histogram`,pattern:`Stack`,difficulty:`Hard`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def largestRectangleArea(self, heights: list[int]) -> int: + pass`,description:`Given an array of integers heights representing bar heights, return area of the largest rectangle in histogram.`,examples:[{input:`heights = [2,1,5,6,2,3]`,output:`10`}],constraints:[`1 <= heights.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/largest-rectangle-in-histogram/`,reference_solution:`class Solution: + def largestRectangleArea(self, heights: list[int]) -> int: + maxArea = 0 + stack = [] + for i, h in enumerate(heights): + start = i + while stack and stack[-1][1] > h: + index, height = stack.pop() + maxArea = max(maxArea, height * (i - index)) + start = index + stack.append((start, h)) + for i, h in stack: + maxArea = max(maxArea, h * (len(heights) - i)) + return maxArea`},{id:`nc-704`,problem_number:704,name:`Binary Search`,pattern:`Binary Search`,difficulty:`Easy`,time_complexity:`O(log N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def search(self, nums: list[int], target: int) -> int: + pass`,description:`Given an array of integers nums which is sorted in ascending order, search target in nums in O(log n) runtime.`,examples:[{input:`nums = [-1,0,3,5,9,12], target = 9`,output:`4`}],constraints:[`1 <= nums.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/binary-search/`,reference_solution:`class Solution: + def search(self, nums: list[int], target: int) -> int: + l, r = 0, len(nums) - 1 + while l <= r: + m = l + ((r - l) // 2) + if nums[m] > target: + r = m - 1 + elif nums[m] < target: + l = m + 1 + else: + return m + return -1`},{id:`nc-74`,problem_number:74,name:`Search a 2D Matrix`,pattern:`Binary Search`,difficulty:`Medium`,time_complexity:`O(log(M * N))`,space_complexity:`O(1)`,starter_code:`class Solution: + def searchMatrix(self, matrix: list[list[int]], target: int) -> bool: + pass`,description:`Write an efficient algorithm that searches for a value target in an m x n integer matrix with sorted rows.`,examples:[{input:`matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3`,output:`true`}],constraints:[`m == matrix.length`,`n == matrix[i].length`],leetcode_url:`https://leetcode.com/problems/search-a-2d-matrix/`,reference_solution:`class Solution: + def searchMatrix(self, matrix: list[list[int]], target: int) -> bool: + ROWS, COLS = len(matrix), len(matrix[0]) + top, bot = 0, ROWS - 1 + while top <= bot: + row = (top + bot) // 2 + if target > matrix[row][-1]: + top = row + 1 + elif target < matrix[row][0]: + bot = row - 1 + else: + break + if not (top <= bot): + return False + row = (top + bot) // 2 + l, r = 0, COLS - 1 + while l <= r: + m = (l + r) // 2 + if target > matrix[row][m]: + l = m + 1 + elif target < matrix[row][m]: + r = m - 1 + else: + return True + return False`},{id:`nc-875`,problem_number:875,name:`Koko Eating Bananas`,pattern:`Binary Search`,difficulty:`Medium`,time_complexity:`O(N log(max(P)))`,space_complexity:`O(1)`,starter_code:`class Solution: + def minEatingSpeed(self, piles: list[int], h: int) -> int: + pass`,description:`Return the minimum integer k such that Koko can eat all bananas within h hours.`,examples:[{input:`piles = [3,6,7,11], h = 8`,output:`4`}],constraints:[`1 <= piles.length <= 10^4`,`piles.length <= h <= 10^9`],leetcode_url:`https://leetcode.com/problems/koko-eating-bananas/`,reference_solution:`import math + +class Solution: + def minEatingSpeed(self, piles: list[int], h: int) -> int: + l, r = 1, max(piles) + res = r + while l <= r: + k = (l + r) // 2 + totalTime = sum(math.ceil(p / k) for p in piles) + if totalTime <= h: + res = k + r = k - 1 + else: + l = k + 1 + return res`},{id:`nc-153`,problem_number:153,name:`Find Minimum in Rotated Sorted Array`,pattern:`Binary Search`,difficulty:`Medium`,time_complexity:`O(log N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def findMin(self, nums: list[int]) -> int: + pass`,description:`Given the sorted rotated array nums of unique elements, return the minimum element in O(log n).`,examples:[{input:`nums = [3,4,5,1,2]`,output:`1`}],constraints:[`n == nums.length`,`1 <= n <= 5000`],leetcode_url:`https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/`,reference_solution:`class Solution: + def findMin(self, nums: list[int]) -> int: + res = nums[0] + l, r = 0, len(nums) - 1 + while l <= r: + if nums[l] < nums[r]: + res = min(res, nums[l]) + break + m = (l + r) // 2 + res = min(res, nums[m]) + if nums[m] >= nums[l]: + l = m + 1 + else: + r = m - 1 + return res`},{id:`nc-33`,problem_number:33,name:`Search in Rotated Sorted Array`,pattern:`Binary Search`,difficulty:`Medium`,time_complexity:`O(log N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def search(self, nums: list[int], target: int) -> int: + pass`,description:`Given rotated sorted array nums with unique values and target, return index of target or -1 in O(log n).`,examples:[{input:`nums = [4,5,6,7,0,1,2], target = 0`,output:`4`}],constraints:[`1 <= nums.length <= 5000`],leetcode_url:`https://leetcode.com/problems/search-in-rotated-sorted-array/`,reference_solution:`class Solution: + def search(self, nums: list[int], target: int) -> int: + l, r = 0, len(nums) - 1 + while l <= r: + mid = (l + r) // 2 + if target == nums[mid]: return mid + if nums[l] <= nums[mid]: + if target > nums[mid] or target < nums[l]: l = mid + 1 + else: r = mid - 1 + else: + if target < nums[mid] or target > nums[r]: r = mid - 1 + else: l = mid + 1 + return -1`},{id:`nc-981`,problem_number:981,name:`Time Based Key-Value Store`,pattern:`Binary Search`,difficulty:`Medium`,time_complexity:`O(log N)`,space_complexity:`O(N)`,starter_code:`class TimeMap: + def __init__(self): + pass + def set(self, key: str, value: str, timestamp: int) -> None: + pass + def get(self, key: str, timestamp: int) -> str: + pass`,description:`Design a time-based key-value data structure that can store multiple values for the same key at different time stamps.`,examples:[{input:`["TimeMap","set","get","get","set","get","get"]`,output:`[null,null,"bar","bar",null,"bar2","bar2"]`}],constraints:[`1 <= key.length, value.length <= 100`],leetcode_url:`https://leetcode.com/problems/time-based-key-value-store/`,reference_solution:`class TimeMap: + def __init__(self): + self.keyStore = {} + def set(self, key: str, value: str, timestamp: int) -> None: + if key not in self.keyStore: self.keyStore[key] = [] + self.keyStore[key].append([value, timestamp]) + def get(self, key: str, timestamp: int) -> str: + res, values = "", self.keyStore.get(key, []) + l, r = 0, len(values) - 1 + while l <= r: + m = (l + r) // 2 + if values[m][1] <= timestamp: + res = values[m][0] + l = m + 1 + else: + r = m - 1 + return res`},{id:`nc-4`,problem_number:4,name:`Median of Two Sorted Arrays`,pattern:`Binary Search`,difficulty:`Hard`,time_complexity:`O(log(min(N, M)))`,space_complexity:`O(1)`,starter_code:`class Solution: + def findMedianSortedArrays(self, nums1: list[int], nums2: list[int]) -> float: + pass`,description:`Given two sorted arrays nums1 and nums2, return median of two sorted arrays in O(log (m+n)).`,examples:[{input:`nums1 = [1,3], nums2 = [2]`,output:`2.00000`}],constraints:[`nums1.length == m`,`nums2.length == n`],leetcode_url:`https://leetcode.com/problems/median-of-two-sorted-arrays/`,reference_solution:`class Solution: + def findMedianSortedArrays(self, nums1: list[int], nums2: list[int]) -> float: + A, B = nums1, nums2 + total = len(nums1) + len(nums2) + half = total // 2 + if len(B) < len(A): A, B = B, A + l, r = 0, len(A) - 1 + while True: + i = (l + r) // 2 + j = half - i - 2 + Aleft = A[i] if i >= 0 else float("-infinity") + Aright = A[i + 1] if (i + 1) < len(A) else float("infinity") + Bleft = B[j] if j >= 0 else float("-infinity") + Bright = B[j + 1] if (j + 1) < len(B) else float("infinity") + if Aleft <= Bright and Bleft <= Aright: + if total % 2: + return min(Aright, Bright) + return (max(Aleft, Bleft) + min(Aright, Bright)) / 2 + elif Aleft > Bright: + r = i - 1 + else: + l = i + 1`},{id:`nc-206`,problem_number:206,name:`Reverse Linked List`,pattern:`Linked List`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]: + pass`,description:`Given the head of a singly linked list, reverse the list, and return the reversed list.`,examples:[{input:`head = [1,2,3,4,5]`,output:`[5,4,3,2,1]`}],constraints:[`The number of nodes in the list is in range [0, 5000].`],leetcode_url:`https://leetcode.com/problems/reverse-linked-list/`,reference_solution:`class Solution: + def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]: + prev, curr = None, head + while curr: + nxt = curr.next + curr.next = prev + prev = curr + curr = nxt + return prev`},{id:`nc-21`,problem_number:21,name:`Merge Two Sorted Lists`,pattern:`Linked List`,difficulty:`Easy`,time_complexity:`O(N + M)`,space_complexity:`O(1)`,starter_code:`class Solution: + def mergeTwoLists(self, list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]: + pass`,description:`Merge two sorted linked lists into one sorted list.`,examples:[{input:`list1 = [1,2,4], list2 = [1,3,4]`,output:`[1,1,2,3,4,4]`}],constraints:[`Number of nodes in both lists is in range [0, 50].`],leetcode_url:`https://leetcode.com/problems/merge-two-sorted-lists/`,reference_solution:`class Solution: + def mergeTwoLists(self, list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]: + dummy = node = ListNode() + while list1 and list2: + if list1.val < list2.val: + node.next = list1 + list1 = list1.next + else: + node.next = list2 + list2 = list2.next + node = node.next + node.next = list1 or list2 + return dummy.next`},{id:`nc-141`,problem_number:141,name:`Linked List Cycle`,pattern:`Linked List`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def hasCycle(self, head: Optional[ListNode]) -> bool: + pass`,description:`Given head, return true if there is a cycle in the linked list.`,examples:[{input:`head = [3,2,0,-4], pos = 1`,output:`true`}],constraints:[`The number of the nodes in the list is in range [0, 10^4].`],leetcode_url:`https://leetcode.com/problems/linked-list-cycle/`,reference_solution:`class Solution: + def hasCycle(self, head: Optional[ListNode]) -> bool: + slow = fast = head + while fast and fast.next: + slow = slow.next + fast = fast.next.next + if slow == fast: + return True + return False`},{id:`nc-143`,problem_number:143,name:`Reorder List`,pattern:`Linked List`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def reorderList(self, head: Optional[ListNode]) -> None: + pass`,description:`Reorder the list to be on the following form: L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → …`,examples:[{input:`head = [1,2,3,4]`,output:`[1,4,2,3]`}],constraints:[`Number of nodes in list is in range [1, 5 * 10^4].`],leetcode_url:`https://leetcode.com/problems/reorder-list/`,reference_solution:`class Solution: + def reorderList(self, head: Optional[ListNode]) -> None: + slow, fast = head, head.next + while fast and fast.next: + slow = slow.next + fast = fast.next.next + second = slow.next + prev = slow.next = None + while second: + tmp = second.next + second.next = prev + prev = second + second = tmp + first, second = head, prev + while second: + tmp1, tmp2 = first.next, second.next + first.next = second + second.next = tmp1 + first, second = tmp1, tmp2`},{id:`nc-19`,problem_number:19,name:`Remove Nth Node From End of List`,pattern:`Linked List`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def removeNthFromEnd(self, head: Optional[ListNode], n: int) -> Optional[ListNode]: + pass`,description:`Remove the nth node from the end of the list and return its head.`,examples:[{input:`head = [1,2,3,4,5], n = 2`,output:`[1,2,3,5]`}],constraints:[`1 <= sz <= 30`,`1 <= n <= sz`],leetcode_url:`https://leetcode.com/problems/remove-nth-node-from-end-of-list/`,reference_solution:`class Solution: + def removeNthFromEnd(self, head: Optional[ListNode], n: int) -> Optional[ListNode]: + dummy = ListNode(0, head) + left = dummy + right = head + while n > 0 and right: + right = right.next + n -= 1 + while right: + left = left.next + right = right.next + left.next = left.next.next + return dummy.next`},{id:`nc-138`,problem_number:138,name:`Copy List with Random Pointer`,pattern:`Linked List`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def copyRandomList(self, head: 'Optional[Node]') -> 'Optional[Node]': + pass`,description:`Construct a deep copy of a linked list where each node has next and random pointers.`,examples:[{input:`head = [[7,null],[13,0],[11,4],[10,2],[1,0]]`,output:`[[7,null],[13,0],[11,4],[10,2],[1,0]]`}],constraints:[`0 <= n <= 1000`],leetcode_url:`https://leetcode.com/problems/copy-list-with-random-pointer/`,reference_solution:`class Solution: + def copyRandomList(self, head: 'Optional[Node]') -> 'Optional[Node]': + oldToCopy = {None: None} + cur = head + while cur: + oldToCopy[cur] = Node(cur.val) + cur = cur.next + cur = head + while cur: + copy = oldToCopy[cur] + copy.next = oldToCopy[cur.next] + copy.random = oldToCopy[cur.random] + cur = cur.next + return oldToCopy[head]`},{id:`nc-2`,problem_number:2,name:`Add Two Numbers`,pattern:`Linked List`,difficulty:`Medium`,time_complexity:`O(max(N, M))`,space_complexity:`O(1)`,starter_code:`class Solution: + def addTwoNumbers(self, l1: Optional[ListNode], l2: Optional[ListNode]) -> Optional[ListNode]: + pass`,description:`Add two non-empty linked lists representing two non-negative integers stored in reverse order.`,examples:[{input:`l1 = [2,4,3], l2 = [5,6,4]`,output:`[7,0,8]`}],constraints:[`Number of nodes in range [1, 100].`],leetcode_url:`https://leetcode.com/problems/add-two-numbers/`,reference_solution:`class Solution: + def addTwoNumbers(self, l1: Optional[ListNode], l2: Optional[ListNode]) -> Optional[ListNode]: + dummy = ListNode() + cur = dummy + carry = 0 + while l1 or l2 or carry: + v1 = l1.val if l1 else 0 + v2 = l2.val if l2 else 0 + val = v1 + v2 + carry + carry = val // 10 + val = val % 10 + cur.next = ListNode(val) + cur = cur.next + l1 = l1.next if l1 else None + l2 = l2.next if l2 else None + return dummy.next`},{id:`nc-287`,problem_number:287,name:`Find the Duplicate Number`,pattern:`Linked List`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def findDuplicate(self, nums: list[int]) -> int: + pass`,description:`Find the duplicate number in nums without modifying the array and using only O(1) extra space.`,examples:[{input:`nums = [1,3,4,2,2]`,output:`2`}],constraints:[`1 <= n <= 10^5`,`nums.length == n + 1`],leetcode_url:`https://leetcode.com/problems/find-the-duplicate-number/`,reference_solution:`class Solution: + def findDuplicate(self, nums: list[int]) -> int: + slow = fast = 0 + while True: + slow = nums[slow] + fast = nums[nums[fast]] + if slow == fast: + break + slow2 = 0 + while True: + slow = nums[slow] + slow2 = nums[slow2] + if slow == slow2: + return slow`},{id:`nc-146`,problem_number:146,name:`LRU Cache`,pattern:`Linked List`,difficulty:`Medium`,time_complexity:`O(1)`,space_complexity:`O(capacity)`,starter_code:`class LRUCache: + def __init__(self, capacity: int): + pass + def get(self, key: int) -> int: + pass + def put(self, key: int, value: int) -> None: + pass`,description:`Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.`,examples:[{input:`["LRUCache","put","put","get","put","get","put","get","get","get"]`,output:`[null,null,null,1,null,-1,null,-1,3,4]`}],constraints:[`1 <= capacity <= 3000`],leetcode_url:`https://leetcode.com/problems/lru-cache/`,reference_solution:`class Node: + def __init__(self, k, v): + self.key, self.val = k, v + self.prev = self.next = None + +class LRUCache: + def __init__(self, capacity: int): + self.cap = capacity + self.cache = {} + self.left, self.right = Node(0, 0), Node(0, 0) + self.left.next, self.right.prev = self.right, self.left + def remove(self, node): + prev, nxt = node.prev, node.next + prev.next, nxt.prev = nxt, prev + def insert(self, node): + prev, nxt = self.right.prev, self.right + prev.next = nxt.prev = node + node.next, node.prev = nxt, prev + def get(self, key: int) -> int: + if key in self.cache: + self.remove(self.cache[key]) + self.insert(self.cache[key]) + return self.cache[key].val + return -1 + def put(self, key: int, value: int) -> None: + if key in self.cache: + self.remove(self.cache[key]) + self.cache[key] = Node(key, value) + self.insert(self.cache[key]) + if len(self.cache) > self.cap: + lru = self.left.next + self.remove(lru) + del self.cache[lru.key]`},{id:`nc-23`,problem_number:23,name:`Merge k Sorted Lists`,pattern:`Linked List`,difficulty:`Hard`,time_complexity:`O(N log K)`,space_complexity:`O(1)`,starter_code:`class Solution: + def mergeKLists(self, lists: list[Optional[ListNode]]) -> Optional[ListNode]: + pass`,description:`Merge all the linked-lists into one sorted linked-list and return it.`,examples:[{input:`lists = [[1,4,5],[1,3,4],[2,6]]`,output:`[1,1,2,3,4,4,5,6]`}],constraints:[`k == lists.length`,`0 <= k <= 10^4`],leetcode_url:`https://leetcode.com/problems/merge-k-sorted-lists/`,reference_solution:`class Solution: + def mergeKLists(self, lists: list[Optional[ListNode]]) -> Optional[ListNode]: + if not lists or len(lists) == 0: + return None + while len(lists) > 1: + mergedLists = [] + for i in range(0, len(lists), 2): + l1 = lists[i] + l2 = lists[i + 1] if (i + 1) < len(lists) else None + mergedLists.append(self.mergeList(l1, l2)) + lists = mergedLists + return lists[0] + def mergeList(self, l1, l2): + dummy = node = ListNode() + while l1 and l2: + if l1.val < l2.val: + node.next, l1 = l1, l1.next + else: + node.next, l2 = l2, l2.next + node = node.next + node.next = l1 or l2 + return dummy.next`},{id:`nc-25`,problem_number:25,name:`Reverse Nodes in k-Group`,pattern:`Linked List`,difficulty:`Hard`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def reverseKGroup(self, head: Optional[ListNode], k: int) -> Optional[ListNode]: + pass`,description:`Reverse the nodes of the list k at a time, and return the modified list.`,examples:[{input:`head = [1,2,3,4,5], k = 2`,output:`[2,1,4,3,5]`}],constraints:[`1 <= k <= sz <= 5000`],leetcode_url:`https://leetcode.com/problems/reverse-nodes-in-k-group/`,reference_solution:`class Solution: + def reverseKGroup(self, head: Optional[ListNode], k: int) -> Optional[ListNode]: + dummy = ListNode(0, head) + groupPrev = dummy + while True: + kth = self.getKth(groupPrev, k) + if not kth: + break + groupNext = kth.next + prev, curr = kth.next, groupPrev.next + while curr != groupNext: + tmp = curr.next + curr.next = prev + prev = curr + curr = tmp + tmp = groupPrev.next + groupPrev.next = kth + groupPrev = tmp + return dummy.next + def getKth(self, curr, k): + while curr and k > 0: + curr = curr.next + k -= 1 + return curr`},{id:`nc-226`,problem_number:226,name:`Invert Binary Tree`,pattern:`Trees`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: + pass`,description:`Given the root of a binary tree, invert the tree, and return its root.`,examples:[{input:`root = [4,2,7,1,3,6,9]`,output:`[4,7,2,9,6,3,1]`}],constraints:[`The number of nodes in the tree is in the range [0, 100].`],leetcode_url:`https://leetcode.com/problems/invert-binary-tree/`,reference_solution:`class Solution: + def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: + if not root: + return None + root.left, root.right = root.right, root.left + self.invertTree(root.left) + self.invertTree(root.right) + return root`},{id:`nc-104`,problem_number:104,name:`Maximum Depth of Binary Tree`,pattern:`Trees`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def maxDepth(self, root: Optional[TreeNode]) -> int: + pass`,description:`Given the root of a binary tree, return its maximum depth.`,examples:[{input:`root = [3,9,20,null,null,15,7]`,output:`3`}],constraints:[`Number of nodes is in range [0, 10^4].`],leetcode_url:`https://leetcode.com/problems/maximum-depth-of-binary-tree/`,reference_solution:`class Solution: + def maxDepth(self, root: Optional[TreeNode]) -> int: + if not root: + return 0 + return 1 + max(self.maxDepth(root.left), self.maxDepth(root.right))`},{id:`nc-543`,problem_number:543,name:`Diameter of Binary Tree`,pattern:`Trees`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def diameterOfBinaryTree(self, root: Optional[TreeNode]) -> int: + pass`,description:`Return the length of the diameter of the tree.`,examples:[{input:`root = [1,2,3,4,5]`,output:`3`}],constraints:[`Number of nodes in range [1, 10^4].`],leetcode_url:`https://leetcode.com/problems/diameter-of-binary-tree/`,reference_solution:`class Solution: + def diameterOfBinaryTree(self, root: Optional[TreeNode]) -> int: + res = 0 + def dfs(curr): + nonlocal res + if not curr: + return 0 + left, right = dfs(curr.left), dfs(curr.right) + res = max(res, left + right) + return 1 + max(left, right) + dfs(root) + return res`},{id:`nc-110`,problem_number:110,name:`Balanced Binary Tree`,pattern:`Trees`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def isBalanced(self, root: Optional[TreeNode]) -> bool: + pass`,description:`Determine if a binary tree is height-balanced.`,examples:[{input:`root = [3,9,20,null,null,15,7]`,output:`true`}],constraints:[`Number of nodes in range [0, 5000].`],leetcode_url:`https://leetcode.com/problems/balanced-binary-tree/`,reference_solution:`class Solution: + def isBalanced(self, root: Optional[TreeNode]) -> bool: + def dfs(root): + if not root: + return [True, 0] + left, right = dfs(root.left), dfs(root.right) + balanced = left[0] and right[0] and abs(left[1] - right[1]) <= 1 + return [balanced, 1 + max(left[1], right[1])] + return dfs(root)[0]`},{id:`nc-100`,problem_number:100,name:`Same Tree`,pattern:`Trees`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool: + pass`,description:`Check if two binary trees are structurally identical and the nodes have the same value.`,examples:[{input:`p = [1,2,3], q = [1,2,3]`,output:`true`}],constraints:[`Number of nodes in range [0, 100].`],leetcode_url:`https://leetcode.com/problems/same-tree/`,reference_solution:`class Solution: + def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool: + if not p and not q: + return True + if p and q and p.val == q.val: + return self.isSameTree(p.left, q.left) and self.isSameTree(p.right, q.right) + return False`},{id:`nc-572`,problem_number:572,name:`Subtree of Another Tree`,pattern:`Trees`,difficulty:`Easy`,time_complexity:`O(S * T)`,space_complexity:`O(N)`,starter_code:`class Solution: + def isSubtree(self, root: Optional[TreeNode], subRoot: Optional[TreeNode]) -> bool: + pass`,description:`Return true if there is a subtree of root with the same structure and node values of subRoot.`,examples:[{input:`root = [3,4,5,1,2], subRoot = [4,1,2]`,output:`true`}],constraints:[`Number of nodes in root is in range [1, 2000].`],leetcode_url:`https://leetcode.com/problems/subtree-of-another-tree/`,reference_solution:`class Solution: + def isSubtree(self, root: Optional[TreeNode], subRoot: Optional[TreeNode]) -> bool: + if not subRoot: + return True + if not root: + return False + if self.sameTree(root, subRoot): + return True + return self.isSubtree(root.left, subRoot) or self.isSubtree(root.right, subRoot) + def sameTree(self, root, subRoot): + if not root and not subRoot: + return True + if root and subRoot and root.val == subRoot.val: + return self.sameTree(root.left, subRoot.left) and self.sameTree(root.right, subRoot.right) + return False`},{id:`nc-235`,problem_number:235,name:`Lowest Common Ancestor of a Binary Search Tree`,pattern:`Trees`,difficulty:`Medium`,time_complexity:`O(log N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': + pass`,description:`Find the lowest common ancestor (LCA) node of two given nodes in the BST.`,examples:[{input:`root = [6,2,8,0,4,7,9,null,null,3,5], p = 2, q = 8`,output:`6`}],constraints:[`All Node.val are unique.`],leetcode_url:`https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/`,reference_solution:`class Solution: + def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': + cur = root + while cur: + if p.val > cur.val and q.val > cur.val: + cur = cur.right + elif p.val < cur.val and q.val < cur.val: + cur = cur.left + else: + return cur`},{id:`nc-102`,problem_number:102,name:`Binary Tree Level Order Traversal`,pattern:`Trees`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def levelOrder(self, root: Optional[TreeNode]) -> list[list[int]]: + pass`,description:`Return the level order traversal of its nodes' values (i.e., from left to right, level by level).`,examples:[{input:`root = [3,9,20,null,null,15,7]`,output:`[[3],[9,20],[15,7]]`}],constraints:[`Number of nodes in range [0, 2000].`],leetcode_url:`https://leetcode.com/problems/binary-tree-level-order-traversal/`,reference_solution:`from collections import deque + +class Solution: + def levelOrder(self, root: Optional[TreeNode]) -> list[list[int]]: + res = [] + q = deque([root]) + while q: + val = [] + for _ in range(len(q)): + node = q.popleft() + if node: + val.append(node.val) + q.append(node.left) + q.append(node.right) + if val: + res.append(val) + return res`},{id:`nc-199`,problem_number:199,name:`Binary Tree Right Side View`,pattern:`Trees`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def rightSideView(self, root: Optional[TreeNode]) -> list[int]: + pass`,description:`Return the values of the nodes you can see ordered from top to bottom standing on the right side.`,examples:[{input:`root = [1,2,3,null,5,null,4]`,output:`[1,3,4]`}],constraints:[`Number of nodes in range [0, 100].`],leetcode_url:`https://leetcode.com/problems/binary-tree-right-side-view/`,reference_solution:`from collections import deque + +class Solution: + def rightSideView(self, root: Optional[TreeNode]) -> list[int]: + res = [] + q = deque([root]) + while q: + rightSide = None + for _ in range(len(q)): + node = q.popleft() + if node: + rightSide = node + q.append(node.left) + q.append(node.right) + if rightSide: + res.append(rightSide.val) + return res`},{id:`nc-1448`,problem_number:1448,name:`Count Good Nodes in Binary Tree`,pattern:`Trees`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def goodNodes(self, root: TreeNode) -> int: + pass`,description:`A node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X.`,examples:[{input:`root = [3,1,4,3,null,1,5]`,output:`4`}],constraints:[`Number of nodes in range [1, 10^5].`],leetcode_url:`https://leetcode.com/problems/count-good-nodes-in-binary-tree/`,reference_solution:`class Solution: + def goodNodes(self, root: TreeNode) -> int: + def dfs(node, maxVal): + if not node: + return 0 + res = 1 if node.val >= maxVal else 0 + maxVal = max(maxVal, node.val) + res += dfs(node.left, maxVal) + res += dfs(node.right, maxVal) + return res + return dfs(root, root.val)`},{id:`nc-98`,problem_number:98,name:`Validate Binary Search Tree`,pattern:`Trees`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def isValidBST(self, root: Optional[TreeNode]) -> bool: + pass`,description:`Determine if a binary tree is a valid binary search tree (BST).`,examples:[{input:`root = [2,1,3]`,output:`true`}],constraints:[`Number of nodes in range [1, 10^4].`],leetcode_url:`https://leetcode.com/problems/validate-binary-search-tree/`,reference_solution:`class Solution: + def isValidBST(self, root: Optional[TreeNode]) -> bool: + def valid(node, left, right): + if not node: + return True + if not (left < node.val < right): + return False + return valid(node.left, left, node.val) and valid(node.right, node.val, right) + return valid(root, float("-inf"), float("inf"))`},{id:`nc-230`,problem_number:230,name:`Kth Smallest Element in a BST`,pattern:`Trees`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def kthSmallest(self, root: Optional[TreeNode], k: int) -> int: + pass`,description:`Given the root of a BST, return the kth smallest value (1-indexed) of all the values in the tree.`,examples:[{input:`root = [3,1,4,null,2], k = 1`,output:`1`}],constraints:[`1 <= k <= n <= 10^4`],leetcode_url:`https://leetcode.com/problems/kth-smallest-element-in-a-bst/`,reference_solution:`class Solution: + def kthSmallest(self, root: Optional[TreeNode], k: int) -> int: + stack = [] + curr = root + while stack or curr: + while curr: + stack.append(curr) + curr = curr.left + curr = stack.pop() + k -= 1 + if k == 0: + return curr.val + curr = curr.right`},{id:`nc-105`,problem_number:105,name:`Construct Binary Tree from Preorder and Inorder Traversal`,pattern:`Trees`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def buildTree(self, preorder: list[int], inorder: list[int]) -> Optional[TreeNode]: + pass`,description:`Construct and return the binary tree given two integer arrays preorder and inorder.`,examples:[{input:`preorder = [3,9,20,15,7], inorder = [9,3,15,20,7]`,output:`[3,9,20,null,null,15,7]`}],constraints:[`1 <= preorder.length <= 3000`],leetcode_url:`https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/`,reference_solution:`class Solution: + def buildTree(self, preorder: list[int], inorder: list[int]) -> Optional[TreeNode]: + if not preorder or not inorder: + return None + root = TreeNode(preorder[0]) + mid = inorder.index(preorder[0]) + root.left = self.buildTree(preorder[1 : mid + 1], inorder[:mid]) + root.right = self.buildTree(preorder[mid + 1 :], inorder[mid + 1 :]) + return root`},{id:`nc-124`,problem_number:124,name:`Binary Tree Maximum Path Sum`,pattern:`Trees`,difficulty:`Hard`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def maxPathSum(self, root: Optional[TreeNode]) -> int: + pass`,description:`Return the maximum path sum of any non-empty path in a binary tree.`,examples:[{input:`root = [1,2,3]`,output:`6`},{input:`root = [-10,9,20,null,null,15,7]`,output:`42`}],constraints:[`Number of nodes in range [1, 3 * 10^4].`],leetcode_url:`https://leetcode.com/problems/binary-tree-maximum-path-sum/`,reference_solution:`class Solution: + def maxPathSum(self, root: Optional[TreeNode]) -> int: + res = [root.val] + def dfs(root): + if not root: + return 0 + leftMax = max(dfs(root.left), 0) + rightMax = max(dfs(root.right), 0) + res[0] = max(res[0], root.val + leftMax + rightMax) + return root.val + max(leftMax, rightMax) + dfs(root) + return res[0]`},{id:`nc-297`,problem_number:297,name:`Serialize and Deserialize Binary Tree`,pattern:`Trees`,difficulty:`Hard`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Codec: + def serialize(self, root): + pass + def deserialize(self, data): + pass`,description:`Design an algorithm to serialize and deserialize a binary tree.`,examples:[{input:`root = [1,2,3,null,null,4,5]`,output:`[1,2,3,null,null,4,5]`}],constraints:[`Number of nodes in range [0, 10^4].`],leetcode_url:`https://leetcode.com/problems/serialize-and-deserialize-binary-tree/`,reference_solution:`class Codec: + def serialize(self, root): + res = [] + def dfs(node): + if not node: + res.append("N") + return + res.append(str(node.val)) + dfs(node.left) + dfs(node.right) + dfs(root) + return ",".join(res) + def deserialize(self, data): + vals = data.split(",") + self.i = 0 + def dfs(): + if vals[self.i] == "N": + self.i += 1 + return None + node = TreeNode(int(vals[self.i])) + self.i += 1 + node.left = dfs() + node.right = dfs() + return node + return dfs()`},{id:`nc-703`,problem_number:703,name:`Kth Largest Element in a Stream`,pattern:`Heap / Priority Queue`,difficulty:`Easy`,time_complexity:`O(N log K)`,space_complexity:`O(K)`,starter_code:`class KthLargest: + def __init__(self, k: int, nums: list[int]): + pass + def add(self, val: int) -> int: + pass`,description:`Design a class to find the kth largest element in a stream.`,examples:[{input:`["KthLargest","add","add","add","add","add"]`,output:`[null,4,5,5,8,8]`}],constraints:[`1 <= k <= 10^4`],leetcode_url:`https://leetcode.com/problems/kth-largest-element-in-a-stream/`,reference_solution:`import heapq + +class KthLargest: + def __init__(self, k: int, nums: list[int]): + self.minHeap, self.k = nums, k + heapq.heapify(self.minHeap) + while len(self.minHeap) > k: heapq.heappop(self.minHeap) + def add(self, val: int) -> int: + heapq.heappush(self.minHeap, val) + if len(self.minHeap) > self.k: heapq.heappop(self.minHeap) + return self.minHeap[0]`},{id:`nc-1046`,problem_number:1046,name:`Last Stone Weight`,pattern:`Heap / Priority Queue`,difficulty:`Easy`,time_complexity:`O(N log N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def lastStoneWeight(self, stones: list[int]) -> int: + pass`,description:`Smash the two heaviest stones x and y together until at most one stone is left.`,examples:[{input:`stones = [2,7,4,1,8,1]`,output:`1`}],constraints:[`1 <= stones.length <= 30`],leetcode_url:`https://leetcode.com/problems/last-stone-weight/`,reference_solution:`import heapq + +class Solution: + def lastStoneWeight(self, stones: list[int]) -> int: + stones = [-s for s in stones] + heapq.heapify(stones) + while len(stones) > 1: + first = heapq.heappop(stones) + second = heapq.heappop(stones) + if second > first: heapq.heappush(stones, first - second) + stones.append(0) + return abs(stones[0])`},{id:`nc-973`,problem_number:973,name:`K Closest Points to Origin`,pattern:`Heap / Priority Queue`,difficulty:`Medium`,time_complexity:`O(N log K)`,space_complexity:`O(K)`,starter_code:`class Solution: + def kClosest(self, points: list[list[int]], k: int) -> list[list[int]]: + pass`,description:`Given an array of points, return the k closest points to the origin (0, 0).`,examples:[{input:`points = [[1,3],[-2,2]], k = 1`,output:`[[-2,2]]`}],constraints:[`1 <= k <= points.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/k-closest-points-to-origin/`,reference_solution:`import heapq + +class Solution: + def kClosest(self, points: list[list[int]], k: int) -> list[list[int]]: + pts = [] + for x, y in points: + dist = (x ** 2) + (y ** 2) + pts.append([dist, x, y]) + heapq.heapify(pts) + res = [] + for _ in range(k): + dist, x, y = heapq.heappop(pts) + res.append([x, y]) + return res`},{id:`nc-215`,problem_number:215,name:`Kth Largest Element in an Array`,pattern:`Heap / Priority Queue`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def findKthLargest(self, nums: list[int], k: int) -> int: + pass`,description:`Given an integer array nums and an integer k, return the kth largest element in the array.`,examples:[{input:`nums = [3,2,1,5,6,4], k = 2`,output:`5`}],constraints:[`1 <= k <= nums.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/kth-largest-element-in-an-array/`,reference_solution:`import heapq + +class Solution: + def findKthLargest(self, nums: list[int], k: int) -> int: + return heapq.nlargest(k, nums)[-1]`},{id:`nc-621`,problem_number:621,name:`Task Scheduler`,pattern:`Heap / Priority Queue`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def leastInterval(self, tasks: list[str], n: int) -> int: + pass`,description:`Return the minimum number of CPU intervals required to complete all tasks with cooling period n.`,examples:[{input:`tasks = ["A","A","A","B","B","B"], n = 2`,output:`8`}],constraints:[`1 <= tasks.length <= 10^4`,`0 <= n <= 100`],leetcode_url:`https://leetcode.com/problems/task-scheduler/`,reference_solution:`from collections import Counter, deque +import heapq + +class Solution: + def leastInterval(self, tasks: list[str], n: int) -> int: + count = Counter(tasks) + maxHeap = [-cnt for cnt in count.values()] + heapq.heapify(maxHeap) + time = 0 + q = deque() + while maxHeap or q: + time += 1 + if maxHeap: + cnt = 1 + heapq.heappop(maxHeap) + if cnt: q.append([cnt, time + n]) + if q and q[0][1] == time: + heapq.heappush(maxHeap, q.popleft()[0]) + return time`},{id:`nc-355`,problem_number:355,name:`Design Twitter`,pattern:`Heap / Priority Queue`,difficulty:`Medium`,time_complexity:`O(10 log K)`,space_complexity:`O(N)`,starter_code:`class Twitter: + def __init__(self): + pass + def postTweet(self, userId: int, tweetId: int) -> None: + pass + def getNewsFeed(self, userId: int) -> list[int]: + pass + def follow(self, followerId: int, followeeId: int) -> None: + pass + def unfollow(self, followerId: int, followeeId: int) -> None: + pass`,description:`Design a simplified version of Twitter where users can post tweets, follow/unfollow, and get the 10 most recent tweets.`,examples:[{input:`["Twitter","postTweet","getNewsFeed","follow","postTweet","getNewsFeed"]`,output:`[null,null,[5],null,null,[6,5]]`}],constraints:[`1 <= userId, followeeId <= 500`],leetcode_url:`https://leetcode.com/problems/design-twitter/`,reference_solution:`from collections import defaultdict +import heapq + +class Twitter: + def __init__(self): + self.count = 0 + self.tweetMap = defaultdict(list) + self.followMap = defaultdict(set) + def postTweet(self, userId: int, tweetId: int) -> None: + self.tweetMap[userId].append([self.count, tweetId]) + self.count -= 1 + def getNewsFeed(self, userId: int) -> list[int]: + res, minHeap = [], [] + self.followMap[userId].add(userId) + for followeeId in self.followMap[userId]: + if followeeId in self.tweetMap: + index = len(self.tweetMap[followeeId]) - 1 + count, tweetId = self.tweetMap[followeeId][index] + heapq.heappush(minHeap, [count, tweetId, followeeId, index - 1]) + while minHeap and len(res) < 10: + count, tweetId, followeeId, index = heapq.heappop(minHeap) + res.append(tweetId) + if index >= 0: + count, tweetId = self.tweetMap[followeeId][index] + heapq.heappush(minHeap, [count, tweetId, followeeId, index - 1]) + return res + def follow(self, followerId: int, followeeId: int) -> None: + self.followMap[followerId].add(followeeId) + def unfollow(self, followerId: int, followeeId: int) -> None: + if followeeId in self.followMap[followerId]: self.followMap[followerId].remove(followeeId)`},{id:`nc-295`,problem_number:295,name:`Find Median from Data Stream`,pattern:`Heap / Priority Queue`,difficulty:`Hard`,time_complexity:`O(log N)`,space_complexity:`O(N)`,starter_code:`class MedianFinder: + def __init__(self): + pass + def addNum(self, num: int) -> None: + pass + def findMedian(self) -> float: + pass`,description:`Find the median of all elements added so far from a data stream.`,examples:[{input:`["MedianFinder","addNum","addNum","findMedian","addNum","findMedian"]`,output:`[null,null,null,1.5,null,2.0]`}],constraints:[`-10^5 <= num <= 10^5`],leetcode_url:`https://leetcode.com/problems/find-median-from-data-stream/`,reference_solution:`import heapq + +class MedianFinder: + def __init__(self): + self.small, self.large = [], [] + def addNum(self, num: int) -> None: + if self.large and num > self.large[0]: heapq.heappush(self.large, num) + else: heapq.heappush(self.small, -1 * num) + if len(self.small) > len(self.large) + 1: + val = -1 * heapq.heappop(self.small) + heapq.heappush(self.large, val) + if len(self.large) > len(self.small) + 1: + val = heapq.heappop(self.large) + heapq.heappush(self.small, -1 * val) + def findMedian(self) -> float: + if len(self.small) > len(self.large): return -1 * self.small[0] + elif len(self.large) > len(self.small): return self.large[0] + return (-1 * self.small[0] + self.large[0]) / 2.0`},{id:`nc-78`,problem_number:78,name:`Subsets`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(N * 2^N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def subsets(self, nums: list[int]) -> list[list[int]]: + pass`,description:`Given an integer array nums of unique elements, return all possible subsets (the power set).`,examples:[{input:`nums = [1,2,3]`,output:`[[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]`}],constraints:[`1 <= nums.length <= 10`],leetcode_url:`https://leetcode.com/problems/subsets/`,reference_solution:`class Solution: + def subsets(self, nums: list[int]) -> list[list[int]]: + res = [] + subset = [] + def dfs(i): + if i >= len(nums): + res.append(subset.copy()) + return + subset.append(nums[i]) + dfs(i + 1) + subset.pop() + dfs(i + 1) + dfs(0) + return res`},{id:`nc-39`,problem_number:39,name:`Combination Sum`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(2^target)`,space_complexity:`O(target)`,starter_code:`class Solution: + def combinationSum(self, candidates: list[int], target: int) -> list[list[int]]: + pass`,description:`Return a list of all unique combinations of candidates where the chosen numbers sum to target.`,examples:[{input:`candidates = [2,3,6,7], target = 7`,output:`[[2,2,3],[7]]`}],constraints:[`1 <= candidates.length <= 30`],leetcode_url:`https://leetcode.com/problems/combination-sum/`,reference_solution:`class Solution: + def combinationSum(self, candidates: list[int], target: int) -> list[list[int]]: + res = [] + def dfs(i, cur, total): + if total == target: + res.append(cur.copy()) + return + if i >= len(candidates) or total > target: + return + cur.append(candidates[i]) + dfs(i, cur, total + candidates[i]) + cur.pop() + dfs(i + 1, cur, total) + dfs(0, [], 0) + return res`},{id:`nc-40`,problem_number:40,name:`Combination Sum II`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(2^N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def combinationSum2(self, candidates: list[int], target: int) -> list[list[int]]: + pass`,description:`Find all unique combinations in candidates where the candidate numbers sum to target, using each number once.`,examples:[{input:`candidates = [10,1,2,7,6,1,5], target = 8`,output:`[[1,1,6],[1,2,5],[1,7],[2,6]]`}],constraints:[`1 <= candidates.length <= 100`],leetcode_url:`https://leetcode.com/problems/combination-sum-ii/`,reference_solution:`class Solution: + def combinationSum2(self, candidates: list[int], target: int) -> list[list[int]]: + candidates.sort() + res = [] + def backtrack(cur, pos, target): + if target == 0: + res.append(cur.copy()) + return + if target <= 0: + return + prev = -1 + for i in range(pos, len(candidates)): + if candidates[i] == prev: + continue + cur.append(candidates[i]) + backtrack(cur, i + 1, target - candidates[i]) + cur.pop() + prev = candidates[i] + backtrack([], 0, target) + return res`},{id:`nc-46`,problem_number:46,name:`Permutations`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(N! * N)`,space_complexity:`O(N!)`,starter_code:`class Solution: + def permute(self, nums: list[int]) -> list[list[int]]: + pass`,description:`Given an array nums of distinct integers, return all the possible permutations.`,examples:[{input:`nums = [1,2,3]`,output:`[[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]`}],constraints:[`1 <= nums.length <= 6`],leetcode_url:`https://leetcode.com/problems/permutations/`,reference_solution:`class Solution: + def permute(self, nums: list[int]) -> list[list[int]]: + res = [] + if len(nums) == 1: return [nums[:]] + for i in range(len(nums)): + n = nums.pop(0) + perms = self.permute(nums) + for perm in perms: perm.append(n) + res.extend(perms) + nums.append(n) + return res`},{id:`nc-90`,problem_number:90,name:`Subsets II`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(N * 2^N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def subsetsWithDup(self, nums: list[int]) -> list[list[int]]: + pass`,description:`Given an integer array nums that may contain duplicates, return all possible subsets (the power set).`,examples:[{input:`nums = [1,2,2]`,output:`[[],[1],[1,2],[1,2,2],[2],[2,2]]`}],constraints:[`1 <= nums.length <= 10`],leetcode_url:`https://leetcode.com/problems/subsets-ii/`,reference_solution:`class Solution: + def subsetsWithDup(self, nums: list[int]) -> list[list[int]]: + res = [] + nums.sort() + def backtrack(i, subset): + if i == len(nums): + res.append(subset[::]) + return + subset.append(nums[i]) + backtrack(i + 1, subset) + subset.pop() + while i + 1 < len(nums) and nums[i] == nums[i + 1]: i += 1 + backtrack(i + 1, subset) + backtrack(0, []) + return res`},{id:`nc-22`,problem_number:22,name:`Generate Parentheses`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(4^N / sqrt(N))`,space_complexity:`O(N)`,starter_code:`class Solution: + def generateParenthesis(self, n: int) -> list[str]: + pass`,description:`Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.`,examples:[{input:`n = 3`,output:`["((()))","(()())","(())()","()(())","()()()"]`}],constraints:[`1 <= n <= 8`],leetcode_url:`https://leetcode.com/problems/generate-parentheses/`,reference_solution:`class Solution: + def generateParenthesis(self, n: int) -> list[str]: + stack, res = [], [] + def backtrack(openN, closedN): + if openN == closedN == n: + res.append("".join(stack)) + return + if openN < n: + stack.append("(") + backtrack(openN + 1, closedN) + stack.pop() + if closedN < openN: + stack.append(")") + backtrack(openN, closedN + 1) + stack.pop() + backtrack(0, 0) + return res`},{id:`nc-79`,problem_number:79,name:`Word Search`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(M * N * 4^L)`,space_complexity:`O(L)`,starter_code:`class Solution: + def exist(self, board: list[list[str]], word: str) -> bool: + pass`,description:`Given an m x n grid of characters board and a string word, return true if word exists in the grid.`,examples:[{input:`board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCCED"`,output:`true`}],constraints:[`m == board.length`,`n = board[i].length`,`1 <= word.length <= 15`],leetcode_url:`https://leetcode.com/problems/word-search/`,reference_solution:`class Solution: + def exist(self, board: list[list[str]], word: str) -> bool: + ROWS, COLS = len(board), len(board[0]) + path = set() + def dfs(r, c, i): + if i == len(word): return True + if (r < 0 or c < 0 or r >= ROWS or c >= COLS or word[i] != board[r][c] or (r, c) in path): return False + path.add((r, c)) + res = (dfs(r + 1, c, i + 1) or dfs(r - 1, c, i + 1) or dfs(r, c + 1, i + 1) or dfs(r, c - 1, i + 1)) + path.remove((r, c)) + return res + for r in range(ROWS): + for c in range(COLS): + if dfs(r, c, 0): return True + return False`},{id:`nc-131`,problem_number:131,name:`Palindrome Partitioning`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(N * 2^N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def partition(self, s: str) -> list[list[str]]: + pass`,description:`Partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitionings.`,examples:[{input:`s = "aab"`,output:`[["a","a","b"],["aa","b"]]`}],constraints:[`1 <= s.length <= 16`],leetcode_url:`https://leetcode.com/problems/palindrome-partitioning/`,reference_solution:`class Solution: + def partition(self, s: str) -> list[list[str]]: + res, part = [], [] + def dfs(i): + if i >= len(s): + res.append(part.copy()) + return + for j in range(i, len(s)): + if self.isPali(s, i, j): + part.append(s[i : j + 1]) + dfs(j + 1) + part.pop() + dfs(0) + return res + def isPali(self, s, l, r): + while l < r: + if s[l] != s[r]: return False + l, r = l + 1, r - 1 + return True`},{id:`nc-17`,problem_number:17,name:`Letter Combinations of a Phone Number`,pattern:`Backtracking`,difficulty:`Medium`,time_complexity:`O(N * 4^N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def letterCombinations(self, digits: str) -> list[str]: + pass`,description:`Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.`,examples:[{input:`digits = "23"`,output:`["ad","ae","af","bd","be","bf","cd","ce","cf"]`}],constraints:[`0 <= digits.length <= 4`],leetcode_url:`https://leetcode.com/problems/letter-combinations-of-a-phone-number/`,reference_solution:`class Solution: + def letterCombinations(self, digits: str) -> list[str]: + res = [] + digitToChar = {"2": "abc", "3": "def", "4": "ghi", "5": "jkl", "6": "mno", "7": "qprs", "8": "tuv", "9": "wxyz"} + def backtrack(i, curStr): + if len(curStr) == len(digits): + res.append(curStr) + return + for c in digitToChar[digits[i]]: + backtrack(i + 1, curStr + c) + if digits: backtrack(0, "") + return res`},{id:`nc-51`,problem_number:51,name:`N-Queens`,pattern:`Backtracking`,difficulty:`Hard`,time_complexity:`O(N!)`,space_complexity:`O(N^2)`,starter_code:`class Solution: + def solveNQueens(self, n: int) -> list[list[str]]: + pass`,description:`Place n queens on an n x n chessboard such that no two queens attack each other.`,examples:[{input:`n = 4`,output:`[[".Q..","...Q","Q...","..Q."],["..Q.","Q...","...Q",".Q.."]]`}],constraints:[`1 <= n <= 9`],leetcode_url:`https://leetcode.com/problems/n-queens/`,reference_solution:`class Solution: + def solveNQueens(self, n: int) -> list[list[str]]: + col, posDiag, negDiag = set(), set(), set() + res = [] + board = [["."] * n for _ in range(n)] + def backtrack(r): + if r == n: + copy = ["".join(row) for row in board] + res.append(copy) + return + for c in range(n): + if c in col or (r + c) in posDiag or (r - c) in negDiag: continue + col.add(c); posDiag.add(r + c); negDiag.add(r - c); board[r][c] = "Q" + backtrack(r + 1) + col.remove(c); posDiag.remove(r + c); negDiag.remove(r - c); board[r][c] = "." + backtrack(0) + return res`},{id:`nc-208`,problem_number:208,name:`Implement Trie (Prefix Tree)`,pattern:`Tries`,difficulty:`Medium`,time_complexity:`O(L)`,space_complexity:`O(N * L)`,starter_code:`class Trie: + def __init__(self): + pass + def insert(self, word: str) -> None: + pass + def search(self, word: str) -> bool: + pass + def startsWith(self, prefix: str) -> bool: + pass`,description:`Implement a trie with insert, search, and startsWith methods.`,examples:[{input:`["Trie","insert","search","search","startsWith","insert","search"]`,output:`[null,null,true,false,true,null,true]`}],constraints:[`1 <= word.length, prefix.length <= 2000`],leetcode_url:`https://leetcode.com/problems/implement-trie-prefix-tree/`,reference_solution:`class TrieNode: + def __init__(self): + self.children = {} + self.end = False + +class Trie: + def __init__(self): + self.root = TrieNode() + def insert(self, word: str) -> None: + curr = self.root + for c in word: + if c not in curr.children: + curr.children[c] = TrieNode() + curr = curr.children[c] + curr.end = True + def search(self, word: str) -> bool: + curr = self.root + for c in word: + if c not in curr.children: return False + curr = curr.children[c] + return curr.end + def startsWith(self, prefix: str) -> bool: + curr = self.root + for c in prefix: + if c not in curr.children: return False + curr = curr.children[c] + return True`},{id:`nc-211`,problem_number:211,name:`Design Add and Search Words Data Structure`,pattern:`Tries`,difficulty:`Medium`,time_complexity:`O(M)`,space_complexity:`O(N)`,starter_code:`class WordDictionary: + def __init__(self): + pass + def addWord(self, word: str) -> None: + pass + def search(self, word: str) -> bool: + pass`,description:`Design a data structure that supports adding new words and finding if a string matches any previously added string, with '.' wildcard support.`,examples:[{input:`["WordDictionary","addWord","addWord","addWord","search","search","search","search"]`,output:`[null,null,null,null,false,true,true,true]`}],constraints:[`1 <= word.length <= 25`],leetcode_url:`https://leetcode.com/problems/design-add-and-search-words-data-structure/`,reference_solution:`class TrieNode: + def __init__(self): + self.children = {} + self.word = False + +class WordDictionary: + def __init__(self): + self.root = TrieNode() + def addWord(self, word: str) -> None: + cur = self.root + for c in word: + if c not in cur.children: cur.children[c] = TrieNode() + cur = cur.children[c] + cur.word = True + def search(self, word: str) -> bool: + def dfs(j, root): + cur = root + for i in range(j, len(word)): + c = word[i] + if c == ".": + for child in cur.children.values(): + if dfs(i + 1, child): return True + return False + else: + if c not in cur.children: return False + cur = cur.children[c] + return cur.word + return dfs(0, self.root)`},{id:`nc-212`,problem_number:212,name:`Word Search II`,pattern:`Tries`,difficulty:`Hard`,time_complexity:`O(M * N * 4^L)`,space_complexity:`O(W * L)`,starter_code:`class Solution: + def findWords(self, board: list[list[str]], words: list[str]) -> list[str]: + pass`,description:`Given an m x n board of characters and a list of strings words, return all words on the board.`,examples:[{input:`board = [["o","a","a","n"],["e","t","a","e"],["i","h","k","r"],["i","f","l","v"]], words = ["oath","pea","eat","rain"]`,output:`["eat","oath"]`}],constraints:[`m == board.length`,`n == board[i].length`,`1 <= words.length <= 3 * 10^4`],leetcode_url:`https://leetcode.com/problems/word-search-ii/`,reference_solution:`class TrieNode: + def __init__(self): + self.children = {} + self.isWord = False + def addWord(self, word): + cur = self + for c in word: + if c not in cur.children: cur.children[c] = TrieNode() + cur = cur.children[c] + cur.isWord = True + +class Solution: + def findWords(self, board: list[list[str]], words: list[str]) -> list[str]: + root = TrieNode() + for w in words: root.addWord(w) + ROWS, COLS = len(board), len(board[0]) + res, visit = set(), set() + def dfs(r, c, node, word): + if (r < 0 or c < 0 or r == ROWS or c == COLS or (r, c) in visit or board[r][c] not in node.children): + return + visit.add((r, c)) + node = node.children[board[r][c]] + word += board[r][c] + if node.isWord: res.add(word) + dfs(r + 1, c, node, word) + dfs(r - 1, c, node, word) + dfs(r, c + 1, node, word) + dfs(r, c - 1, node, word) + visit.remove((r, c)) + for r in range(ROWS): + for c in range(COLS): + dfs(r, c, root, "") + return list(res)`},{id:`nc-200`,problem_number:200,name:`Number of Islands`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def numIslands(self, grid: list[list[str]]) -> int: + pass`,description:`Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.`,examples:[{input:`grid = [["1","1","1","1","0"],["1","1","0","1","0"],["1","1","0","0","0"],["0","0","0","0","0"]]`,output:`1`}],constraints:[`m == grid.length`,`n == grid[i].length`],leetcode_url:`https://leetcode.com/problems/number-of-islands/`,reference_solution:`class Solution: + def numIslands(self, grid: list[list[str]]) -> int: + if not grid: return 0 + rows, cols = len(grid), len(grid[0]) + islands = 0 + def dfs(r, c): + if r < 0 or c < 0 or r >= rows or c >= cols or grid[r][c] != "1": return + grid[r][c] = "0" + dfs(r + 1, c); dfs(r - 1, c); dfs(r, c + 1); dfs(r, c - 1) + for r in range(rows): + for c in range(cols): + if grid[r][c] == "1": + dfs(r, c) + islands += 1 + return islands`},{id:`nc-695`,problem_number:695,name:`Max Area of Island`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def maxAreaOfIsland(self, grid: list[list[int]]) -> int: + pass`,description:`Return the maximum area of an island in grid. If there is no island, return 0.`,examples:[{input:`grid = [[0,0,1,0,0,0,0,1,0,0,0,0,0],...]`,output:`6`}],constraints:[`m == grid.length`,`n == grid[i].length`],leetcode_url:`https://leetcode.com/problems/max-area-of-island/`,reference_solution:`class Solution: + def maxAreaOfIsland(self, grid: list[list[int]]) -> int: + ROWS, COLS = len(grid), len(grid[0]) + visit = set() + def dfs(r, c): + if r < 0 or r == ROWS or c < 0 or c == COLS or grid[r][c] == 0 or (r, c) in visit: return 0 + visit.add((r, c)) + return 1 + dfs(r + 1, c) + dfs(r - 1, c) + dfs(r, c + 1) + dfs(r, c - 1) + area = 0 + for r in range(ROWS): + for c in range(COLS): + area = max(area, dfs(r, c)) + return area`},{id:`nc-133`,problem_number:133,name:`Clone Graph`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(V + E)`,space_complexity:`O(V)`,starter_code:`class Solution: + def cloneGraph(self, node: Optional['Node']) -> Optional['Node']: + pass`,description:`Given a reference of a node in a connected undirected graph, return a deep copy (clone) of the graph.`,examples:[{input:`adjList = [[2,4],[1,3],[2,4],[1,3]]`,output:`[[2,4],[1,3],[2,4],[1,3]]`}],constraints:[`The number of nodes in the graph is in range [0, 100].`],leetcode_url:`https://leetcode.com/problems/clone-graph/`,reference_solution:`class Solution: + def cloneGraph(self, node: Optional['Node']) -> Optional['Node']: + oldToNew = {} + def dfs(node): + if node in oldToNew: return oldToNew[node] + copy = Node(node.val) + oldToNew[node] = copy + for nei in node.neighbors: copy.neighbors.append(dfs(nei)) + return copy + return dfs(node) if node else None`},{id:`nc-286`,problem_number:286,name:`Walls and Gates`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def wallsAndGates(self, rooms: list[list[int]]) -> None: + pass`,description:`Fill each empty room with the distance to its nearest gate. A gate is 0, a wall is -1, an empty room is 2147483647.`,examples:[{input:`rooms = [[2147483647,-1,0,2147483647],...]`,output:`[[3,-1,0,1],...]`}],constraints:[`m == rooms.length`,`n == rooms[i].length`],leetcode_url:`https://leetcode.com/problems/walls-and-gates/`,reference_solution:`from collections import deque + +class Solution: + def wallsAndGates(self, rooms: list[list[int]]) -> None: + ROWS, COLS = len(rooms), len(rooms[0]) + q = deque() + for r in range(ROWS): + for c in range(COLS): + if rooms[r][c] == 0: q.append((r, c)) + while q: + r, c = q.popleft() + for dr, dc in [(1, 0), (-1, 0), (0, 1), (0, -1)]: + nr, nc = r + dr, c + dc + if 0 <= nr < ROWS and 0 <= nc < COLS and rooms[nr][nc] == 2147483647: + rooms[nr][nc] = rooms[r][c] + 1 + q.append((nr, nc))`},{id:`nc-994`,problem_number:994,name:`Rotting Oranges`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def orangesRotting(self, grid: list[list[int]]) -> int: + pass`,description:`Return the minimum number of minutes that must elapse until no cell has a fresh orange.`,examples:[{input:`grid = [[2,1,1],[1,1,0],[0,1,1]]`,output:`4`}],constraints:[`m == grid.length`,`n == grid[i].length`],leetcode_url:`https://leetcode.com/problems/rotting-oranges/`,reference_solution:`from collections import deque + +class Solution: + def orangesRotting(self, grid: list[list[int]]) -> int: + q = deque() + fresh = time = 0 + ROWS, COLS = len(grid), len(grid[0]) + for r in range(ROWS): + for c in range(COLS): + if grid[r][c] == 1: fresh += 1 + if grid[r][c] == 2: q.append((r, c)) + directions = [[0, 1], [0, -1], [1, 0], [-1, 0]] + while fresh > 0 and q: + for _ in range(len(q)): + r, c = q.popleft() + for dr, dc in directions: + row, col = r + dr, c + dc + if row in range(ROWS) and col in range(COLS) and grid[row][col] == 1: + grid[row][col] = 2 + q.append((row, col)) + fresh -= 1 + time += 1 + return time if fresh == 0 else -1`},{id:`nc-417`,problem_number:417,name:`Pacific Atlantic Water Flow`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def pacificAtlantic(self, heights: list[list[int]]) -> list[list[int]]: + pass`,description:`Return a list of grid coordinates where water can flow to both the Pacific and Atlantic oceans.`,examples:[{input:`heights = [[1,2,2,3,5],[3,2,3,4,4],[2,4,5,3,1],[6,7,1,4,5],[5,1,1,2,4]]`,output:`[[0,4],[1,3],[1,4],[2,2],[3,0],[3,1],[4,0]]`}],constraints:[`m == heights.length`,`n == heights[r].length`],leetcode_url:`https://leetcode.com/problems/pacific-atlantic-water-flow/`,reference_solution:`class Solution: + def pacificAtlantic(self, heights: list[list[int]]) -> list[list[int]]: + ROWS, COLS = len(heights), len(heights[0]) + pac, atl = set(), set() + def dfs(r, c, visit, prevHeight): + if (r, c) in visit or r < 0 or c < 0 or r == ROWS or c == COLS or heights[r][c] < prevHeight: return + visit.add((r, c)) + dfs(r + 1, c, visit, heights[r][c]); dfs(r - 1, c, visit, heights[r][c]) + dfs(r, c + 1, visit, heights[r][c]); dfs(r, c - 1, visit, heights[r][c]) + for c in range(COLS): + dfs(0, c, pac, heights[0][c]); dfs(ROWS - 1, c, atl, heights[ROWS - 1][c]) + for r in range(ROWS): + dfs(r, 0, pac, heights[r][0]); dfs(r, COLS - 1, atl, heights[r][COLS - 1]) + res = [] + for r in range(ROWS): + for c in range(COLS): + if (r, c) in pac and (r, c) in atl: res.append([r, c]) + return res`},{id:`nc-130`,problem_number:130,name:`Surrounded Regions`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def solve(self, board: list[list[str]]) -> None: + pass`,description:`Given an m x n matrix board containing 'X' and 'O', capture all regions that are 4-directionally surrounded by 'X'.`,examples:[{input:`board = [["X","X","X","X"],["X","O","O","X"],["X","X","O","X"],["X","O","X","X"]]`,output:`[["X","X","X","X"],["X","X","X","X"],["X","X","X","X"],["X","O","X","X"]]`}],constraints:[`m == board.length`,`n == board[i].length`],leetcode_url:`https://leetcode.com/problems/surrounded-regions/`,reference_solution:`class Solution: + def solve(self, board: list[list[str]]) -> None: + ROWS, COLS = len(board), len(board[0]) + def capture(r, c): + if r < 0 or c < 0 or r == ROWS or c == COLS or board[r][c] != "O": return + board[r][c] = "T" + capture(r + 1, c); capture(r - 1, c); capture(r, c + 1); capture(r, c - 1) + for r in range(ROWS): + for c in range(COLS): + if board[r][c] == "O" and (r in [0, ROWS - 1] or c in [0, COLS - 1]): capture(r, c) + for r in range(ROWS): + for c in range(COLS): + if board[r][c] == "O": board[r][c] = "X" + elif board[r][c] == "T": board[r][c] = "O"`},{id:`nc-207`,problem_number:207,name:`Course Schedule`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(V + E)`,space_complexity:`O(V + E)`,starter_code:`class Solution: + def canFinish(self, numCourses: int, prerequisites: list[list[int]]) -> bool: + pass`,description:`Return true if you can finish all courses given prerequisite pairs, or false otherwise.`,examples:[{input:`numCourses = 2, prerequisites = [[1,0]]`,output:`true`}],constraints:[`1 <= numCourses <= 2000`],leetcode_url:`https://leetcode.com/problems/course-schedule/`,reference_solution:`class Solution: + def canFinish(self, numCourses: int, prerequisites: list[list[int]]) -> bool: + preMap = {i: [] for i in range(numCourses)} + for crs, pre in prerequisites: preMap[crs].append(pre) + visiting = set() + def dfs(crs): + if crs in visiting: return False + if preMap[crs] == []: return True + visiting.add(crs) + for pre in preMap[crs]: + if not dfs(pre): return False + visiting.remove(crs) + preMap[crs] = [] + return True + for c in range(numCourses): + if not dfs(c): return False + return True`},{id:`nc-210`,problem_number:210,name:`Course Schedule II`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(V + E)`,space_complexity:`O(V + E)`,starter_code:`class Solution: + def findOrder(self, numCourses: int, prerequisites: list[list[int]]) -> list[int]: + pass`,description:`Return the ordering of courses you should take to finish all courses.`,examples:[{input:`numCourses = 2, prerequisites = [[1,0]]`,output:`[0,1]`}],constraints:[`1 <= numCourses <= 2000`],leetcode_url:`https://leetcode.com/problems/course-schedule-ii/`,reference_solution:`class Solution: + def findOrder(self, numCourses: int, prerequisites: list[list[int]]) -> list[int]: + prereq = {c: [] for c in range(numCourses)} + for crs, pre in prerequisites: prereq[crs].append(pre) + output = [] + visit, cycle = set(), set() + def dfs(crs): + if crs in cycle: return False + if crs in visit: return True + cycle.add(crs) + for pre in prereq[crs]: + if not dfs(pre): return False + cycle.remove(crs) + visit.add(crs) + output.append(crs) + return True + for c in range(numCourses): + if not dfs(c): return [] + return output`},{id:`nc-261`,problem_number:261,name:`Graph Valid Tree`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(V + E)`,space_complexity:`O(V + E)`,starter_code:`class Solution: + def validTree(self, n: int, edges: list[list[int]]) -> bool: + pass`,description:`Given n nodes labeled from 0 to n - 1 and a list of undirected edges, return true if these edges form a valid tree.`,examples:[{input:`n = 5, edges = [[0,1],[0,2],[0,3],[1,4]]`,output:`true`}],constraints:[`1 <= n <= 2000`],leetcode_url:`https://leetcode.com/problems/graph-valid-tree/`,reference_solution:`class Solution: + def validTree(self, n: int, edges: list[list[int]]) -> bool: + if not n: return True + adj = {i: [] for i in range(n)} + for n1, n2 in edges: + adj[n1].append(n2) + adj[n2].append(n1) + visit = set() + def dfs(i, prev): + if i in visit: return False + visit.add(i) + for j in adj[i]: + if j == prev: continue + if not dfs(j, i): return False + return True + return dfs(0, -1) and len(visit) == n`},{id:`nc-323`,problem_number:323,name:`Number of Connected Components in an Undirected Graph`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(V + E)`,space_complexity:`O(V)`,starter_code:`class Solution: + def countComponents(self, n: int, edges: list[list[int]]) -> int: + pass`,description:`Find the number of connected components in an undirected graph.`,examples:[{input:`n = 5, edges = [[0,1],[1,2],[3,4]]`,output:`2`}],constraints:[`1 <= n <= 2000`],leetcode_url:`https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/`,reference_solution:`class Solution: + def countComponents(self, n: int, edges: list[list[int]]) -> int: + par = [i for i in range(n)] + rank = [1] * n + def find(n1): + res = n1 + while res != par[res]: + par[res] = par[par[res]] + res = par[res] + return res + def union(n1, n2): + p1, p2 = find(n1), find(n2) + if p1 == p2: return 0 + if rank[p2] > rank[p1]: par[p1] = p2; rank[p2] += rank[p1] + else: par[p2] = p1; rank[p1] += rank[p2] + return 1 + res = n + for n1, n2 in edges: res -= union(n1, n2) + return res`},{id:`nc-684`,problem_number:684,name:`Redundant Connection`,pattern:`Graphs`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def findRedundantConnection(self, edges: list[list[int]]) -> list[int]: + pass`,description:`Return an edge that can be removed so that the resulting graph is a tree of n nodes.`,examples:[{input:`edges = [[1,2],[1,3],[2,3]]`,output:`[2,3]`}],constraints:[`n == edges.length`,`3 <= n <= 1000`],leetcode_url:`https://leetcode.com/problems/redundant-connection/`,reference_solution:`class Solution: + def findRedundantConnection(self, edges: list[list[int]]) -> list[int]: + par = [i for i in range(len(edges) + 1)] + rank = [1] * (len(edges) + 1) + def find(n): + p = par[n] + while p != par[p]: + par[p] = par[par[p]] + p = par[p] + return p + def union(n1, n2): + p1, p2 = find(n1), find(n2) + if p1 == p2: return False + if rank[p1] > rank[p2]: par[p2] = p1; rank[p1] += rank[p2] + else: par[p1] = p2; rank[p2] += rank[p1] + return True + for n1, n2 in edges: + if not union(n1, n2): return [n1, n2]`},{id:`nc-127`,problem_number:127,name:`Word Ladder`,pattern:`Graphs`,difficulty:`Hard`,time_complexity:`O(M^2 * N)`,space_complexity:`O(M^2 * N)`,starter_code:`class Solution: + def ladderLength(self, beginWord: str, endWord: str, wordList: list[str]) -> int: + pass`,description:`Return the number of words in the shortest transformation sequence from beginWord to endWord.`,examples:[{input:`beginWord = "hit", endWord = "cog", wordList = ["hot","dot","dog","lot","log","cog"]`,output:`5`}],constraints:[`1 <= beginWord.length <= 10`],leetcode_url:`https://leetcode.com/problems/word-ladder/`,reference_solution:`from collections import defaultdict, deque + +class Solution: + def ladderLength(self, beginWord: str, endWord: str, wordList: list[str]) -> int: + if endWord not in wordList: return 0 + nei = defaultdict(list) + wordList.append(beginWord) + for word in wordList: + for j in range(len(word)): + pattern = word[:j] + "*" + word[j + 1 :] + nei[pattern].append(word) + visit = set([beginWord]) + q = deque([beginWord]) + res = 1 + while q: + for _ in range(len(q)): + word = q.popleft() + if word == endWord: return res + for j in range(len(word)): + pattern = word[:j] + "*" + word[j + 1 :] + for neiWord in nei[pattern]: + if neiWord not in visit: + visit.add(neiWord) + q.append(neiWord) + res += 1 + return 0`},{id:`nc-743`,problem_number:743,name:`Network Delay Time`,pattern:`Advanced Graphs`,difficulty:`Medium`,time_complexity:`O(E log V)`,space_complexity:`O(V + E)`,starter_code:`class Solution: + def networkDelayTime(self, times: list[list[int]], n: int, k: int) -> int: + pass`,description:`Given network times, return the minimum time it takes for all n nodes to receive the signal from node k.`,examples:[{input:`times = [[2,1,1],[2,3,1],[3,4,1]], n = 4, k = 2`,output:`2`}],constraints:[`1 <= k <= n <= 100`,`1 <= times.length <= 6000`],leetcode_url:`https://leetcode.com/problems/network-delay-time/`,reference_solution:`from collections import defaultdict +import heapq + +class Solution: + def networkDelayTime(self, times: list[list[int]], n: int, k: int) -> int: + edges = defaultdict(list) + for u, v, w in times: + edges[u].append((v, w)) + minHeap = [(0, k)] + visit = set() + t = 0 + while minHeap: + w1, n1 = heapq.heappop(minHeap) + if n1 in visit: continue + visit.add(n1) + t = max(t, w1) + for n2, w2 in edges[n1]: + if n2 not in visit: + heapq.heappush(minHeap, (w1 + w2, n2)) + return t if len(visit) == n else -1`},{id:`nc-332`,problem_number:332,name:`Reconstruct Itinerary`,pattern:`Advanced Graphs`,difficulty:`Hard`,time_complexity:`O(E log E)`,space_complexity:`O(E)`,starter_code:`class Solution: + def findItinerary(self, tickets: list[list[str]]) -> list[str]: + pass`,description:`Find the itinerary that begins with 'JFK' using all tickets exactly once in lexical order.`,examples:[{input:`tickets = [["MUC","LHR"],["JFK","MUC"],["SFO","SJC"],["LHR","SFO"]]`,output:`["JFK","MUC","LHR","SFO","SJC"]`}],constraints:[`1 <= tickets.length <= 300`],leetcode_url:`https://leetcode.com/problems/reconstruct-itinerary/`,reference_solution:`from collections import defaultdict + +class Solution: + def findItinerary(self, tickets: list[list[str]]) -> list[str]: + adj = defaultdict(list) + for src, dst in sorted(tickets, reverse=True): + adj[src].append(dst) + res = [] + def dfs(src): + while adj[src]: + dfs(adj[src].pop()) + res.append(src) + dfs("JFK") + return res[::-1]`},{id:`nc-1584`,problem_number:1584,name:`Min Cost to Connect All Points`,pattern:`Advanced Graphs`,difficulty:`Medium`,time_complexity:`O(N^2 log N)`,space_complexity:`O(N^2)`,starter_code:`class Solution: + def minCostConnectPoints(self, points: list[list[int]]) -> int: + pass`,description:`Return the minimum cost to make all points connected using Manhattan distance (Prim's or Kruskal's).`,examples:[{input:`points = [[0,0],[2,2],[3,10],[5,2],[7,0]]`,output:`20`}],constraints:[`1 <= points.length <= 1000`],leetcode_url:`https://leetcode.com/problems/min-cost-to-connect-all-points/`,reference_solution:`from collections import defaultdict +import heapq + +class Solution: + def minCostConnectPoints(self, points: list[list[int]]) -> int: + N = len(points) + adj = defaultdict(list) + for i in range(N): + x1, y1 = points[i] + for j in range(i + 1, N): + x2, y2 = points[j] + dist = abs(x1 - x2) + abs(y1 - y2) + adj[i].append((dist, j)) + adj[j].append((dist, i)) + res = 0 + visit = set() + minH = [[0, 0]] + while len(visit) < N: + cost, i = heapq.heappop(minH) + if i in visit: continue + res += cost + visit.add(i) + for neiCost, nei in adj[i]: + if nei not in visit: + heapq.heappush(minH, [neiCost, nei]) + return res`},{id:`nc-778`,problem_number:778,name:`Swim in Rising Water`,pattern:`Advanced Graphs`,difficulty:`Hard`,time_complexity:`O(N^2 log N)`,space_complexity:`O(N^2)`,starter_code:`class Solution: + def swimInWater(self, grid: list[list[int]]) -> int: + pass`,description:`Return the minimum time until you can reach the bottom right square from top left square.`,examples:[{input:`grid = [[0,2],[1,3]]`,output:`3`}],constraints:[`n == grid.length == grid[i].length`,`1 <= n <= 50`],leetcode_url:`https://leetcode.com/problems/swim-in-rising-water/`,reference_solution:`import heapq + +class Solution: + def swimInWater(self, grid: list[list[int]]) -> int: + N = len(grid) + visit = set() + minH = [[grid[0][0], 0, 0]] + directions = [[0, 1], [0, -1], [1, 0], [-1, 0]] + visit.add((0, 0)) + while minH: + t, r, c = heapq.heappop(minH) + if r == N - 1 and c == N - 1: + return t + for dr, dc in directions: + nr, nc = r + dr, c + dc + if 0 <= nr < N and 0 <= nc < N and (nr, nc) not in visit: + visit.add((nr, nc)) + heapq.heappush(minH, [max(t, grid[nr][nc]), nr, nc])`},{id:`nc-269`,problem_number:269,name:`Alien Dictionary`,pattern:`Advanced Graphs`,difficulty:`Hard`,time_complexity:`O(C)`,space_complexity:`O(1)`,starter_code:`class Solution: + def alienOrder(self, words: list[str]) -> str: + pass`,description:`Derive the alphabetical order of characters in a foreign language given sorted words.`,examples:[{input:`words = ["wrt","wrf","er","ett","rftt"]`,output:`"wertf"`}],constraints:[`1 <= words.length <= 100`,`1 <= words[i].length <= 100`],leetcode_url:`https://leetcode.com/problems/alien-dictionary/`,reference_solution:`class Solution: + def alienOrder(self, words: list[str]) -> str: + adj = {c: set() for w in words for c in w} + for i in range(len(words) - 1): + w1, w2 = words[i], words[i + 1] + minLen = min(len(w1), len(w2)) + if len(w1) > len(w2) and w1[:minLen] == w2[:minLen]: return "" + for j in range(minLen): + if w1[j] != w2[j]: + adj[w1[j]].add(w2[j]) + break + visited = {} # False = visited, True = in current path + res = [] + def dfs(c): + if c in visited: return visited[c] + visited[c] = True + for nei in adj[c]: + if dfs(nei): return True + visited[c] = False + res.append(c) + for c in adj: + if dfs(c): return "" + return "".join(res[::-1])`},{id:`nc-787`,problem_number:787,name:`Cheapest Flights Within K Stops`,pattern:`Advanced Graphs`,difficulty:`Medium`,time_complexity:`O(K * E)`,space_complexity:`O(V)`,starter_code:`class Solution: + def findCheapestPrice(self, n: int, flights: list[list[int]], src: int, dst: int, k: int) -> int: + pass`,description:`Find the cheapest price from src to dst with at most k stops (Bellman-Ford).`,examples:[{input:`n = 4, flights = [[0,1,100],[1,2,100],[2,0,100],[1,3,600],[2,3,200]], src = 0, dst = 3, k = 1`,output:`700`}],constraints:[`1 <= n <= 100`,`0 <= k < n`],leetcode_url:`https://leetcode.com/problems/cheapest-flights-within-k-stops/`,reference_solution:`class Solution: + def findCheapestPrice(self, n: int, flights: list[list[int]], src: int, dst: int, k: int) -> int: + prices = [float("inf")] * n + prices[src] = 0 + for _ in range(k + 1): + tmp = prices.copy() + for s, d, p in flights: + if prices[s] == float("inf"): continue + if prices[s] + p < tmp[d]: tmp[d] = prices[s] + p + prices = tmp + return -1 if prices[dst] == float("inf") else prices[dst]`},{id:`nc-70`,problem_number:70,name:`Climbing Stairs`,pattern:`1-D DP`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def climbStairs(self, n: int) -> int: + pass`,description:`You are climbing a staircase. It takes n steps to reach the top. Each time you can climb 1 or 2 steps. In how many distinct ways can you climb to the top?`,examples:[{input:`n = 3`,output:`3`}],constraints:[`1 <= n <= 45`],leetcode_url:`https://leetcode.com/problems/climbing-stairs/`,reference_solution:`class Solution: + def climbStairs(self, n: int) -> int: + one, two = 1, 1 + for _ in range(n - 1): + one, two = one + two, one + return one`},{id:`nc-746`,problem_number:746,name:`Min Cost Climbing Stairs`,pattern:`1-D DP`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def minCostClimbingStairs(self, cost: list[int]) -> int: + pass`,description:`Return the minimum cost to reach the top of the floor after starting from step 0 or 1.`,examples:[{input:`cost = [10,15,20]`,output:`15`}],constraints:[`2 <= cost.length <= 1000`],leetcode_url:`https://leetcode.com/problems/min-cost-climbing-stairs/`,reference_solution:`class Solution: + def minCostClimbingStairs(self, cost: list[int]) -> int: + cost.append(0) + for i in range(len(cost) - 3, -1, -1): + cost[i] += min(cost[i + 1], cost[i + 2]) + return min(cost[0], cost[1])`},{id:`nc-198`,problem_number:198,name:`House Robber`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def rob(self, nums: list[int]) -> int: + pass`,description:`Determine the maximum amount of money you can rob tonight without alerting the police (cannot rob adjacent houses).`,examples:[{input:`nums = [1,2,3,1]`,output:`4`}],constraints:[`1 <= nums.length <= 100`,`0 <= nums[i] <= 400`],leetcode_url:`https://leetcode.com/problems/house-robber/`,reference_solution:`class Solution: + def rob(self, nums: list[int]) -> int: + rob1, rob2 = 0, 0 + for n in nums: + rob1, rob2 = rob2, max(n + rob1, rob2) + return rob2`},{id:`nc-213`,problem_number:213,name:`House Robber II`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def rob(self, nums: list[int]) -> int: + pass`,description:`All houses at this place are arranged in a circle. Rob the maximum money without triggering the alarm.`,examples:[{input:`nums = [2,3,2]`,output:`3`}],constraints:[`1 <= nums.length <= 100`],leetcode_url:`https://leetcode.com/problems/house-robber-ii/`,reference_solution:`class Solution: + def rob(self, nums: list[int]) -> int: + def helper(arr): + r1, r2 = 0, 0 + for n in arr: + r1, r2 = r2, max(n + r1, r2) + return r2 + return max(nums[0], helper(nums[1:]), helper(nums[:-1]))`},{id:`nc-5`,problem_number:5,name:`Longest Palindromic Substring`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N^2)`,space_complexity:`O(1)`,starter_code:`class Solution: + def longestPalindrome(self, s: str) -> str: + pass`,description:`Given a string s, return the longest palindromic substring in s.`,examples:[{input:`s = "babad"`,output:`"bab"`}],constraints:[`1 <= s.length <= 1000`],leetcode_url:`https://leetcode.com/problems/longest-palindromic-substring/`,reference_solution:`class Solution: + def longestPalindrome(self, s: str) -> str: + res = "" + for i in range(len(s)): + # odd length + l, r = i, i + while l >= 0 and r < len(s) and s[l] == s[r]: + if (r - l + 1) > len(res): res = s[l:r + 1] + l -= 1 + r += 1 + # even length + l, r = i, i + 1 + while l >= 0 and r < len(s) and s[l] == s[r]: + if (r - l + 1) > len(res): res = s[l:r + 1] + l -= 1 + r += 1 + return res`},{id:`nc-647`,problem_number:647,name:`Palindromic Substrings`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N^2)`,space_complexity:`O(1)`,starter_code:`class Solution: + def countSubstrings(self, s: str) -> int: + pass`,description:`Given a string s, return the number of palindromic substrings in it.`,examples:[{input:`s = "aaa"`,output:`6`}],constraints:[`1 <= s.length <= 1000`],leetcode_url:`https://leetcode.com/problems/palindromic-substring/`,reference_solution:`class Solution: + def countSubstrings(self, s: str) -> int: + res = 0 + for i in range(len(s)): + for l, r in ((i, i), (i, i + 1)): + while l >= 0 and r < len(s) and s[l] == s[r]: + res += 1 + l -= 1 + r += 1 + return res`},{id:`nc-91`,problem_number:91,name:`Decode Ways`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def numDecodings(self, s: str) -> int: + pass`,description:`Return the number of ways to decode an encoded message containing digits mapping to 'A'-'Z'.`,examples:[{input:`s = "226"`,output:`3`}],constraints:[`1 <= s.length <= 100`],leetcode_url:`https://leetcode.com/problems/decode-ways/`,reference_solution:`class Solution: + def numDecodings(self, s: str) -> int: + dp = {len(s): 1} + for i in range(len(s) - 1, -1, -1): + if s[i] == "0": + dp[i] = 0 + else: + dp[i] = dp[i + 1] + if i + 1 < len(s) and (s[i] == "1" or (s[i] == "2" and s[i + 1] in "0123456")): + dp[i] += dp[i + 2] + return dp[0]`},{id:`nc-322`,problem_number:322,name:`Coin Change`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(amount * len(coins))`,space_complexity:`O(amount)`,starter_code:`class Solution: + def coinChange(self, coins: list[int], amount: int) -> int: + pass`,description:`Return the fewest number of coins needed to make up the given amount. If impossible, return -1.`,examples:[{input:`coins = [1,2,5], amount = 11`,output:`3`}],constraints:[`1 <= coins.length <= 12`,`0 <= amount <= 10^4`],leetcode_url:`https://leetcode.com/problems/coin-change/`,reference_solution:`class Solution: + def coinChange(self, coins: list[int], amount: int) -> int: + dp = [amount + 1] * (amount + 1) + dp[0] = 0 + for a in range(1, amount + 1): + for c in coins: + if a - c >= 0: + dp[a] = min(dp[a], 1 + dp[a - c]) + return dp[amount] if dp[amount] != amount + 1 else -1`},{id:`nc-152`,problem_number:152,name:`Maximum Product Subarray`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def maxProduct(self, nums: list[int]) -> int: + pass`,description:`Find a contiguous non-empty subarray within a numerical array that has the largest product.`,examples:[{input:`nums = [2,3,-2,4]`,output:`6`}],constraints:[`1 <= nums.length <= 2 * 10^4`],leetcode_url:`https://leetcode.com/problems/maximum-product-subarray/`,reference_solution:`class Solution: + def maxProduct(self, nums: list[int]) -> int: + res = max(nums) + curMin, curMax = 1, 1 + for n in nums: + if n == 0: + curMin, curMax = 1, 1 + continue + tmp = curMax * n + curMax = max(n * curMax, n * curMin, n) + curMin = min(tmp, n * curMin, n) + res = max(res, curMax) + return res`},{id:`nc-139`,problem_number:139,name:`Word Break`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N * M * K)`,space_complexity:`O(N)`,starter_code:`class Solution: + def wordBreak(self, s: str, wordDict: list[str]) -> bool: + pass`,description:`Return true if s can be segmented into a space-separated sequence of one or more dictionary words.`,examples:[{input:`s = "leetcode", wordDict = ["leet","code"]`,output:`true`}],constraints:[`1 <= s.length <= 300`],leetcode_url:`https://leetcode.com/problems/word-break/`,reference_solution:`class Solution: + def wordBreak(self, s: str, wordDict: list[str]) -> bool: + dp = [False] * (len(s) + 1) + dp[len(s)] = True + for i in range(len(s) - 1, -1, -1): + for w in wordDict: + if (i + len(w)) <= len(s) and s[i:i + len(w)] == w: + dp[i] = dp[i + len(w)] + if dp[i]: break + return dp[0]`},{id:`nc-300`,problem_number:300,name:`Longest Increasing Subsequence`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N log N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def lengthOfLIS(self, nums: list[int]) -> int: + pass`,description:`Given an integer array nums, return the length of the longest strictly increasing subsequence.`,examples:[{input:`nums = [10,9,2,5,3,7,101,18]`,output:`4`}],constraints:[`1 <= nums.length <= 2500`],leetcode_url:`https://leetcode.com/problems/longest-increasing-subsequence/`,reference_solution:`import bisect + +class Solution: + def lengthOfLIS(self, nums: list[int]) -> int: + sub = [] + for x in nums: + idx = bisect.bisect_left(sub, x) + if idx == len(sub): sub.append(x) + else: sub[idx] = x + return len(sub)`},{id:`nc-416`,problem_number:416,name:`Partition Equal Subset Sum`,pattern:`1-D DP`,difficulty:`Medium`,time_complexity:`O(N * sum)`,space_complexity:`O(sum)`,starter_code:`class Solution: + def canPartition(self, nums: list[int]) -> bool: + pass`,description:`Determine if nums can be partitioned into two subsets such that the sum of elements in both subsets is equal.`,examples:[{input:`nums = [1,5,11,5]`,output:`true`}],constraints:[`1 <= nums.length <= 200`,`1 <= nums[i] <= 100`],leetcode_url:`https://leetcode.com/problems/partition-equal-subset-sum/`,reference_solution:`class Solution: + def canPartition(self, nums: list[int]) -> bool: + total = sum(nums) + if total % 2 != 0: return False + target = total // 2 + dp = {0} + for n in nums: + nextDp = set() + for t in dp: + if t + n == target: return True + nextDp.add(t + n) + nextDp.add(t) + dp = nextDp + return target in dp`},{id:`nc-62`,problem_number:62,name:`Unique Paths`,pattern:`2-D DP`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def uniquePaths(self, m: int, n: int) -> int: + pass`,description:`A robot is located at the top-left corner of a m x n grid. How many possible unique paths are there to the bottom-right corner?`,examples:[{input:`m = 3, n = 7`,output:`28`}],constraints:[`1 <= m, n <= 100`],leetcode_url:`https://leetcode.com/problems/unique-paths/`,reference_solution:`class Solution: + def uniquePaths(self, m: int, n: int) -> int: + row = [1] * n + for _ in range(m - 1): + newRow = [1] * n + for j in range(n - 2, -1, -1): + newRow[j] = newRow[j + 1] + row[j] + row = newRow + return row[0]`},{id:`nc-1143`,problem_number:1143,name:`Longest Common Subsequence`,pattern:`2-D DP`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def longestCommonSubsequence(self, text1: str, text2: str) -> int: + pass`,description:`Given two strings text1 and text2, return the length of their longest common subsequence.`,examples:[{input:`text1 = "abcde", text2 = "ace"`,output:`3`}],constraints:[`1 <= text1.length, text2.length <= 1000`],leetcode_url:`https://leetcode.com/problems/longest-common-subsequence/`,reference_solution:`class Solution: + def longestCommonSubsequence(self, text1: str, text2: str) -> int: + dp = [[0 for _ in range(len(text2) + 1)] for _ in range(len(text1) + 1)] + for i in range(len(text1) - 1, -1, -1): + for j in range(len(text2) - 1, -1, -1): + if text1[i] == text2[j]: + dp[i][j] = 1 + dp[i + 1][j + 1] + else: + dp[i][j] = max(dp[i + 1][j], dp[i][j + 1]) + return dp[0][0]`},{id:`nc-309`,problem_number:309,name:`Best Time to Buy and Sell Stock with Cooldown`,pattern:`2-D DP`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def maxProfit(self, prices: list[int]) -> int: + pass`,description:`Find the maximum profit you can achieve with stock trading with a 1-day cooldown after selling.`,examples:[{input:`prices = [1,2,3,0,2]`,output:`3`}],constraints:[`1 <= prices.length <= 5000`],leetcode_url:`https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/`,reference_solution:`class Solution: + def maxProfit(self, prices: list[int]) -> int: + dp = {} + def dfs(i, buying): + if i >= len(prices): return 0 + if (i, buying) in dp: return dp[(i, buying)] + cooldown = dfs(i + 1, buying) + if buying: + buy = dfs(i + 1, not buying) - prices[i] + dp[(i, buying)] = max(buy, cooldown) + else: + sell = dfs(i + 2, not buying) + prices[i] + dp[(i, buying)] = max(sell, cooldown) + return dp[(i, buying)] + return dfs(0, True)`},{id:`nc-518`,problem_number:518,name:`Coin Change II`,pattern:`2-D DP`,difficulty:`Medium`,time_complexity:`O(N * amount)`,space_complexity:`O(amount)`,starter_code:`class Solution: + def change(self, amount: int, coins: list[int]) -> int: + pass`,description:`Return the number of combinations that make up the given amount using infinite coins of each denomination.`,examples:[{input:`amount = 5, coins = [1,2,5]`,output:`4`}],constraints:[`1 <= coins.length <= 300`,`0 <= amount <= 5000`],leetcode_url:`https://leetcode.com/problems/coin-change-ii/`,reference_solution:`class Solution: + def change(self, amount: int, coins: list[int]) -> int: + dp = [0] * (amount + 1) + dp[0] = 1 + for c in coins: + for a in range(c, amount + 1): + dp[a] += dp[a - c] + return dp[amount]`},{id:`nc-494`,problem_number:494,name:`Target Sum`,pattern:`2-D DP`,difficulty:`Medium`,time_complexity:`O(N * total)`,space_complexity:`O(total)`,starter_code:`class Solution: + def findTargetSumWays(self, nums: list[int], target: int) -> int: + pass`,description:`Assign '+' or '-' before each integer in nums so that the resulting expression evaluates to target.`,examples:[{input:`nums = [1,1,1,1,1], target = 3`,output:`5`}],constraints:[`1 <= nums.length <= 20`,`0 <= sum(nums[i]) <= 1000`],leetcode_url:`https://leetcode.com/problems/target-sum/`,reference_solution:`from collections import defaultdict + +class Solution: + def findTargetSumWays(self, nums: list[int], target: int) -> int: + dp = defaultdict(int) + dp[0] = 1 + for n in nums: + nextDp = defaultdict(int) + for cur, count in dp.items(): + nextDp[cur + n] += count + nextDp[cur - n] += count + dp = nextDp + return dp[target]`},{id:`nc-97`,problem_number:97,name:`Interleaving String`,pattern:`2-D DP`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def isInterleave(self, s1: str, s2: str, s3: str) -> bool: + pass`,description:`Given s1, s2, and s3, find whether s3 is formed by an interleaving of s1 and s2.`,examples:[{input:`s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac"`,output:`true`}],constraints:[`0 <= s1.length, s2.length <= 100`,`0 <= s3.length <= 200`],leetcode_url:`https://leetcode.com/problems/interleaving-string/`,reference_solution:`class Solution: + def isInterleave(self, s1: str, s2: str, s3: str) -> bool: + if len(s1) + len(s2) != len(s3): return False + dp = [[False] * (len(s2) + 1) for _ in range(len(s1) + 1)] + dp[len(s1)][len(s2)] = True + for i in range(len(s1), -1, -1): + for j in range(len(s2), -1, -1): + if i < len(s1) and s1[i] == s3[i + j] and dp[i + 1][j]: + dp[i][j] = True + if j < len(s2) and s2[j] == s3[i + j] and dp[i][j + 1]: + dp[i][j] = True + return dp[0][0]`},{id:`nc-329`,problem_number:329,name:`Longest Increasing Path in a Matrix`,pattern:`2-D DP`,difficulty:`Hard`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def longestIncreasingPath(self, matrix: list[list[int]]) -> int: + pass`,description:`Given an m x n integers matrix, return the length of the longest increasing path.`,examples:[{input:`matrix = [[9,9,4],[6,6,8],[2,1,1]]`,output:`4`}],constraints:[`m == matrix.length`,`n == matrix[i].length`,`1 <= m, n <= 200`],leetcode_url:`https://leetcode.com/problems/longest-increasing-path-in-a-matrix/`,reference_solution:`class Solution: + def longestIncreasingPath(self, matrix: list[list[int]]) -> int: + ROWS, COLS = len(matrix), len(matrix[0]) + dp = {} + def dfs(r, c, prevVal): + if r < 0 or r == ROWS or c < 0 or c == COLS or matrix[r][c] <= prevVal: + return 0 + if (r, c) in dp: return dp[(r, c)] + res = 1 + for dr, dc in [(0, 1), (0, -1), (1, 0), (-1, 0)]: + res = max(res, 1 + dfs(r + dr, c + dc, matrix[r][c])) + dp[(r, c)] = res + return res + for r in range(ROWS): + for c in range(COLS): dfs(r, c, -1) + return max(dp.values())`},{id:`nc-115`,problem_number:115,name:`Distinct Subsequences`,pattern:`2-D DP`,difficulty:`Hard`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def numDistinct(self, s: str, t: str) -> int: + pass`,description:`Given two strings s and t, return the number of distinct subsequences of s which equals t.`,examples:[{input:`s = "rabbbit", t = "rabbit"`,output:`3`}],constraints:[`1 <= s.length, t.length <= 1000`],leetcode_url:`https://leetcode.com/problems/distinct-subsequences/`,reference_solution:`class Solution: + def numDistinct(self, s: str, t: str) -> int: + cache = {} + def dfs(i, j): + if j == len(t): return 1 + if i == len(s): return 0 + if (i, j) in cache: return cache[(i, j)] + if s[i] == t[j]: + cache[(i, j)] = dfs(i + 1, j + 1) + dfs(i + 1, j) + else: + cache[(i, j)] = dfs(i + 1, j) + return cache[(i, j)] + return dfs(0, 0)`},{id:`nc-72`,problem_number:72,name:`Edit Distance`,pattern:`2-D DP`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def minDistance(self, word1: str, word2: str) -> int: + pass`,description:`Return minimum operations to convert word1 to word2 (insert, delete, or replace a character).`,examples:[{input:`word1 = "horse", word2 = "ros"`,output:`3`}],constraints:[`0 <= word1.length, word2.length <= 500`],leetcode_url:`https://leetcode.com/problems/edit-distance/`,reference_solution:`class Solution: + def minDistance(self, word1: str, word2: str) -> int: + dp = [[float("inf")] * (len(word2) + 1) for _ in range(len(word1) + 1)] + for j in range(len(word2) + 1): dp[len(word1)][j] = len(word2) - j + for i in range(len(word1) + 1): dp[i][len(word2)] = len(word1) - i + for i in range(len(word1) - 1, -1, -1): + for j in range(len(word2) - 1, -1, -1): + if word1[i] == word2[j]: + dp[i][j] = dp[i + 1][j + 1] + else: + dp[i][j] = 1 + min(dp[i + 1][j], dp[i][j + 1], dp[i + 1][j + 1]) + return dp[0][0]`},{id:`nc-312`,problem_number:312,name:`Burst Balloons`,pattern:`2-D DP`,difficulty:`Hard`,time_complexity:`O(N^3)`,space_complexity:`O(N^2)`,starter_code:`class Solution: + def maxCoins(self, nums: list[int]) -> int: + pass`,description:`Burst balloon i to get nums[i - 1] * nums[i] * nums[i + 1] coins. Return the maximum coins you can collect.`,examples:[{input:`nums = [3,1,5,8]`,output:`167`}],constraints:[`n == nums.length`,`1 <= n <= 300`],leetcode_url:`https://leetcode.com/problems/burst-balloons/`,reference_solution:`class Solution: + def maxCoins(self, nums: list[int]) -> int: + nums = [1] + [n for n in nums if n > 0] + [1] + n = len(nums) + dp = [[0] * n for _ in range(n)] + for length in range(1, n - 1): + for left in range(0, n - length - 1): + right = left + length + 1 + for i in range(left + 1, right): + dp[left][right] = max(dp[left][right], nums[left] * nums[i] * nums[right] + dp[left][i] + dp[i][right]) + return dp[0][n - 1]`},{id:`nc-10`,problem_number:10,name:`Regular Expression Matching`,pattern:`2-D DP`,difficulty:`Hard`,time_complexity:`O(M * N)`,space_complexity:`O(M * N)`,starter_code:`class Solution: + def isMatch(self, s: str, p: str) -> bool: + pass`,description:`Implement regular expression matching with support for '.' and '*'.`,examples:[{input:`s = "aa", p = "a*"`,output:`true`}],constraints:[`1 <= s.length <= 20`,`1 <= p.length <= 20`],leetcode_url:`https://leetcode.com/problems/regular-expression-matching/`,reference_solution:`class Solution: + def isMatch(self, s: str, p: str) -> bool: + cache = {} + def dfs(i, j): + if (i, j) in cache: return cache[(i, j)] + if i >= len(s) and j >= len(p): return True + if j >= len(p): return False + match = i < len(s) and (s[i] == p[j] or p[j] == ".") + if (j + 1) < len(p) and p[j + 1] == "*": + cache[(i, j)] = dfs(i, j + 2) or (match and dfs(i + 1, j)) + return cache[(i, j)] + if match: + cache[(i, j)] = dfs(i + 1, j + 1) + return cache[(i, j)] + cache[(i, j)] = False + return False + return dfs(0, 0)`},{id:`nc-53`,problem_number:53,name:`Maximum Subarray`,pattern:`Greedy`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def maxSubArray(self, nums: list[int]) -> int: + pass`,description:`Given an integer array nums, find the subarray with the largest sum, and return its sum (Kadane's Algorithm).`,examples:[{input:`nums = [-2,1,-3,4,-1,2,1,-5,4]`,output:`6`}],constraints:[`1 <= nums.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/maximum-subarray/`,reference_solution:`class Solution: + def maxSubArray(self, nums: list[int]) -> int: + maxSub = nums[0] + curSum = 0 + for n in nums: + if curSum < 0: curSum = 0 + curSum += n + maxSub = max(maxSub, curSum) + return maxSub`},{id:`nc-55`,problem_number:55,name:`Jump Game`,pattern:`Greedy`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def canJump(self, nums: list[int]) -> bool: + pass`,description:`Determine if you are able to reach the last index starting at index 0.`,examples:[{input:`nums = [2,3,1,1,4]`,output:`true`}],constraints:[`1 <= nums.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/jump-game/`,reference_solution:`class Solution: + def canJump(self, nums: list[int]) -> bool: + goal = len(nums) - 1 + for i in range(len(nums) - 2, -1, -1): + if i + nums[i] >= goal: goal = i + return goal == 0`},{id:`nc-45`,problem_number:45,name:`Jump Game II`,pattern:`Greedy`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def jump(self, nums: list[int]) -> int: + pass`,description:`Return the minimum number of jumps to reach the last index.`,examples:[{input:`nums = [2,3,1,1,4]`,output:`2`}],constraints:[`1 <= nums.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/jump-game-ii/`,reference_solution:`class Solution: + def jump(self, nums: list[int]) -> int: + res = 0 + l = r = 0 + while r < len(nums) - 1: + farthest = 0 + for i in range(l, r + 1): + farthest = max(farthest, i + nums[i]) + l = r + 1 + r = farthest + res += 1 + return res`},{id:`nc-134`,problem_number:134,name:`Gas Station`,pattern:`Greedy`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def canCompleteCircuit(self, gas: list[int], cost: list[int]) -> int: + pass`,description:`Return the starting gas station's index if you can travel around the circuit once, or -1 otherwise.`,examples:[{input:`gas = [1,2,3,4,5], cost = [3,4,5,1,2]`,output:`3`}],constraints:[`n == gas.length == cost.length`,`1 <= n <= 10^5`],leetcode_url:`https://leetcode.com/problems/gas-station/`,reference_solution:`class Solution: + def canCompleteCircuit(self, gas: list[int], cost: list[int]) -> int: + if sum(gas) < sum(cost): return -1 + total = 0 + res = 0 + for i in range(len(gas)): + total += (gas[i] - cost[i]) + if total < 0: + total = 0 + res = i + 1 + return res`},{id:`nc-846`,problem_number:846,name:`Hand of Straights`,pattern:`Greedy`,difficulty:`Medium`,time_complexity:`O(N log N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def isNStraightHand(self, hand: list[int], groupSize: int) -> bool: + pass`,description:`Determine if Alice can rearrange hand into groups of groupSize consecutive cards.`,examples:[{input:`hand = [1,2,3,6,2,3,4,7,8], groupSize = 3`,output:`true`}],constraints:[`1 <= hand.length <= 10^4`,`1 <= groupSize <= hand.length`],leetcode_url:`https://leetcode.com/problems/hand-of-straights/`,reference_solution:`from collections import Counter +import heapq + +class Solution: + def isNStraightHand(self, hand: list[int], groupSize: int) -> bool: + if len(hand) % groupSize != 0: return False + count = Counter(hand) + minH = list(count.keys()) + heapq.heapify(minH) + while minH: + first = minH[0] + for i in range(first, first + groupSize): + if i not in count: return False + count[i] -= 1 + if count[i] == 0: + if i != minH[0]: return False + heapq.heappop(minH) + return True`},{id:`nc-1899`,problem_number:1899,name:`Merge Triplets to Form Target Triplet`,pattern:`Greedy`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def mergeTriplets(self, triplets: list[list[int]], target: list[int]) -> bool: + pass`,description:`Return true if you can obtain target by merging triplets using component-wise maximum.`,examples:[{input:`triplets = [[2,5,3],[1,8,4],[1,7,5]], target = [2,7,5]`,output:`true`}],constraints:[`1 <= triplets.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/merge-triplets-to-form-target-triplet/`,reference_solution:`class Solution: + def mergeTriplets(self, triplets: list[list[int]], target: list[int]) -> bool: + good = set() + for t in triplets: + if t[0] > target[0] or t[1] > target[1] or t[2] > target[2]: continue + for i, v in enumerate(t): + if v == target[i]: good.add(i) + return len(good) == 3`},{id:`nc-763`,problem_number:763,name:`Partition Labels`,pattern:`Greedy`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def partitionLabels(self, s: str) -> list[int]: + pass`,description:`Partition s into as many parts as possible so that each letter appears in at most one part.`,examples:[{input:`s = "ababcbacadefegdehijhklij"`,output:`[9,7,8]`}],constraints:[`1 <= s.length <= 500`],leetcode_url:`https://leetcode.com/problems/partition-labels/`,reference_solution:`class Solution: + def partitionLabels(self, s: str) -> list[int]: + lastIndex = {c: i for i, c in enumerate(s)} + res = [] + size, end = 0, 0 + for i, c in enumerate(s): + size += 1 + end = max(end, lastIndex[c]) + if i == end: + res.append(size) + size = 0 + return res`},{id:`nc-678`,problem_number:678,name:`Valid Parenthesis String`,pattern:`Greedy`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def checkValidString(self, s: str) -> bool: + pass`,description:`Given a string s containing '(', ')' and '*', return true if s is valid (where '*' can be '(', ')' or empty).`,examples:[{input:`s = "(*))"`,output:`true`}],constraints:[`1 <= s.length <= 100`],leetcode_url:`https://leetcode.com/problems/valid-parenthesis-string/`,reference_solution:`class Solution: + def checkValidString(self, s: str) -> bool: + leftMin, leftMax = 0, 0 + for c in s: + if c == "(": + leftMin, leftMax = leftMin + 1, leftMax + 1 + elif c == ")": + leftMin, leftMax = leftMin - 1, leftMax - 1 + else: + leftMin, leftMax = leftMin - 1, leftMax + 1 + if leftMax < 0: return False + if leftMin < 0: leftMin = 0 + return leftMin == 0`},{id:`nc-57`,problem_number:57,name:`Insert Interval`,pattern:`Intervals`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def insert(self, intervals: list[list[int]], newInterval: list[int]) -> list[list[int]]: + pass`,description:`Insert newInterval into intervals (sorted by start) and merge overlapping intervals.`,examples:[{input:`intervals = [[1,3],[6,9]], newInterval = [2,5]`,output:`[[1,5],[6,9]]`}],constraints:[`0 <= intervals.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/insert-interval/`,reference_solution:`class Solution: + def insert(self, intervals: list[list[int]], newInterval: list[int]) -> list[list[int]]: + res = [] + for i in range(len(intervals)): + if newInterval[1] < intervals[i][0]: + res.append(newInterval) + return res + intervals[i:] + elif newInterval[0] > intervals[i][1]: + res.append(intervals[i]) + else: + newInterval = [min(newInterval[0], intervals[i][0]), max(newInterval[1], intervals[i][1])] + res.append(newInterval) + return res`},{id:`nc-56`,problem_number:56,name:`Merge Intervals`,pattern:`Intervals`,difficulty:`Medium`,time_complexity:`O(N log N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def merge(self, intervals: list[list[int]], newInterval: list[int]) -> list[list[int]]: + pass`,description:`Merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals.`,examples:[{input:`intervals = [[1,3],[2,6],[8,10],[15,18]]`,output:`[[1,6],[8,10],[15,18]]`}],constraints:[`1 <= intervals.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/merge-intervals/`,reference_solution:`class Solution: + def merge(self, intervals: list[list[int]]) -> list[list[int]]: + intervals.sort(key=lambda i: i[0]) + output = [intervals[0]] + for start, end in intervals[1:]: + lastEnd = output[-1][1] + if start <= lastEnd: + output[-1][1] = max(lastEnd, end) + else: + output.append([start, end]) + return output`},{id:`nc-435`,problem_number:435,name:`Non-overlapping Intervals`,pattern:`Intervals`,difficulty:`Medium`,time_complexity:`O(N log N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def eraseOverlapIntervals(self, intervals: list[list[int]]) -> int: + pass`,description:`Return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.`,examples:[{input:`intervals = [[1,2],[2,3],[3,4],[1,3]]`,output:`1`}],constraints:[`1 <= intervals.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/non-overlapping-intervals/`,reference_solution:`class Solution: + def eraseOverlapIntervals(self, intervals: list[list[int]]) -> int: + intervals.sort() + res = 0 + prevEnd = intervals[0][1] + for start, end in intervals[1:]: + if start >= prevEnd: + prevEnd = end + else: + res += 1 + prevEnd = min(end, prevEnd) + return res`},{id:`nc-252`,problem_number:252,name:`Meeting Rooms`,pattern:`Intervals`,difficulty:`Easy`,time_complexity:`O(N log N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def canAttendMeetings(self, intervals: list[list[int]]) -> bool: + pass`,description:`Given an array of meeting time intervals, determine if a person could attend all meetings.`,examples:[{input:`intervals = [[0,30],[5,10],[15,20]]`,output:`false`}],constraints:[`0 <= intervals.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/meeting-rooms/`,reference_solution:`class Solution: + def canAttendMeetings(self, intervals: list[list[int]]) -> bool: + intervals.sort(key=lambda i: i[0]) + for i in range(1, len(intervals)): + if intervals[i][0] < intervals[i - 1][1]: return False + return True`},{id:`nc-253`,problem_number:253,name:`Meeting Rooms II`,pattern:`Intervals`,difficulty:`Medium`,time_complexity:`O(N log N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def minMeetingRooms(self, intervals: list[list[int]]) -> int: + pass`,description:`Given an array of meeting time intervals, find the minimum number of conference rooms required.`,examples:[{input:`intervals = [[0,30],[5,10],[15,20]]`,output:`2`}],constraints:[`1 <= intervals.length <= 10^4`],leetcode_url:`https://leetcode.com/problems/meeting-rooms-ii/`,reference_solution:`class Solution: + def minMeetingRooms(self, intervals: list[list[int]]) -> int: + start = sorted([i[0] for i in intervals]) + end = sorted([i[1] for i in intervals]) + res, count = 0, 0 + s, e = 0, 0 + while s < len(intervals): + if start[s] < end[e]: + count += 1 + s += 1 + else: + count -= 1 + e += 1 + res = max(res, count) + return res`},{id:`nc-1851`,problem_number:1851,name:`Minimum Interval to Include Each Query`,pattern:`Intervals`,difficulty:`Hard`,time_complexity:`O(N log N + Q log Q)`,space_complexity:`O(N + Q)`,starter_code:`class Solution: + def minInterval(self, intervals: list[list[int]], queries: list[int]) -> list[int]: + pass`,description:`For each query, find the size of the smallest interval that contains that query value.`,examples:[{input:`intervals = [[1,4],[2,4],[3,6],[4,4]], queries = [2,3,4,5]`,output:`[3,3,1,4]`}],constraints:[`1 <= intervals.length <= 10^5`,`1 <= queries.length <= 10^5`],leetcode_url:`https://leetcode.com/problems/minimum-interval-to-include-each-query/`,reference_solution:`import heapq + +class Solution: + def minInterval(self, intervals: list[list[int]], queries: list[int]) -> list[int]: + intervals.sort() + minHeap = [] + res = {} + i = 0 + for q in sorted(queries): + while i < len(intervals) and intervals[i][0] <= q: + l, r = intervals[i] + heapq.heappush(minHeap, (r - l + 1, r)) + i += 1 + while minHeap and minHeap[0][1] < q: + heapq.heappop(minHeap) + res[q] = minHeap[0][0] if minHeap else -1 + return [res[q] for q in queries]`},{id:`nc-48`,problem_number:48,name:`Rotate Image`,pattern:`Math & Geometry`,difficulty:`Medium`,time_complexity:`O(N^2)`,space_complexity:`O(1)`,starter_code:`class Solution: + def rotate(self, matrix: list[list[int]]) -> None: + pass`,description:`Rotate the n x n 2D matrix clockwise by 90 degrees in-place.`,examples:[{input:`matrix = [[1,2,3],[4,5,6],[7,8,9]]`,output:`[[7,4,1],[8,5,2],[9,6,3]]`}],constraints:[`n == matrix.length == matrix[i].length`,`1 <= n <= 20`],leetcode_url:`https://leetcode.com/problems/rotate-image/`,reference_solution:`class Solution: + def rotate(self, matrix: list[list[int]]) -> None: + l, r = 0, len(matrix) - 1 + while l < r: + for i in range(r - l): + top, bottom = l, r + topLeft = matrix[top][l + i] + matrix[top][l + i] = matrix[bottom - i][l] + matrix[bottom - i][l] = matrix[bottom][r - i] + matrix[bottom][r - i] = matrix[top + i][r] + matrix[top + i][r] = topLeft + r -= 1 + l += 1`},{id:`nc-54`,problem_number:54,name:`Spiral Matrix`,pattern:`Math & Geometry`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def spiralOrder(self, matrix: list[list[int]]) -> list[int]: + pass`,description:`Return all elements of the m x n matrix in spiral order.`,examples:[{input:`matrix = [[1,2,3],[4,5,6],[7,8,9]]`,output:`[1,2,3,6,9,8,7,4,5]`}],constraints:[`m == matrix.length`,`n == matrix[i].length`,`1 <= m, n <= 10`],leetcode_url:`https://leetcode.com/problems/spiral-matrix/`,reference_solution:`class Solution: + def spiralOrder(self, matrix: list[list[int]]) -> list[int]: + res = [] + left, right = 0, len(matrix[0]) + top, bottom = 0, len(matrix) + while left < right and top < bottom: + for i in range(left, right): res.append(matrix[top][i]) + top += 1 + for i in range(top, bottom): res.append(matrix[i][right - 1]) + right -= 1 + if not (left < right and top < bottom): break + for i in range(right - 1, left - 1, -1): res.append(matrix[bottom - 1][i]) + bottom -= 1 + for i in range(bottom - 1, top - 1, -1): res.append(matrix[i][left]) + left += 1 + return res`},{id:`nc-73`,problem_number:73,name:`Set Matrix Zeroes`,pattern:`Math & Geometry`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def setZeroes(self, matrix: list[list[int]]) -> None: + pass`,description:`Given an m x n integer matrix, if an element is 0, set its entire row and column to 0's in place.`,examples:[{input:`matrix = [[1,1,1],[1,0,1],[1,1,1]]`,output:`[[1,0,1],[0,0,0],[1,0,1]]`}],constraints:[`m == matrix.length`,`n == matrix[0].length`,`1 <= m, n <= 200`],leetcode_url:`https://leetcode.com/problems/set-matrix-zeroes/`,reference_solution:`class Solution: + def setZeroes(self, matrix: list[list[int]]) -> None: + ROWS, COLS = len(matrix), len(matrix[0]) + rowZero = False + for r in range(ROWS): + for c in range(COLS): + if matrix[r][c] == 0: + matrix[0][c] = 0 + if r > 0: matrix[r][0] = 0 + else: rowZero = True + for r in range(1, ROWS): + for c in range(1, COLS): + if matrix[0][c] == 0 or matrix[r][0] == 0: + matrix[r][c] = 0 + if matrix[0][0] == 0: + for r in range(ROWS): matrix[r][0] = 0 + if rowZero: + for c in range(COLS): matrix[0][c] = 0`},{id:`nc-202`,problem_number:202,name:`Happy Number`,pattern:`Math & Geometry`,difficulty:`Easy`,time_complexity:`O(log N)`,space_complexity:`O(log N)`,starter_code:`class Solution: + def isHappy(self, n: int) -> bool: + pass`,description:`Determine if a number n is happy by continually replacing it with the sum of the squares of its digits.`,examples:[{input:`n = 19`,output:`true`}],constraints:[`1 <= n <= 2^31 - 1`],leetcode_url:`https://leetcode.com/problems/happy-number/`,reference_solution:`class Solution: + def isHappy(self, n: int) -> bool: + visit = set() + while n not in visit: + visit.add(n) + n = sum(int(digit) ** 2 for digit in str(n)) + if n == 1: return True + return False`},{id:`nc-66`,problem_number:66,name:`Plus One`,pattern:`Math & Geometry`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def plusOne(self, digits: list[int]) -> list[int]: + pass`,description:`Increment the large integer represented by an array of digits by one.`,examples:[{input:`digits = [1,2,3]`,output:`[1,2,4]`}],constraints:[`1 <= digits.length <= 100`],leetcode_url:`https://leetcode.com/problems/plus-one/`,reference_solution:`class Solution: + def plusOne(self, digits: list[int]) -> list[int]: + for i in reversed(range(len(digits))): + if digits[i] == 9: digits[i] = 0 + else: + digits[i] += 1 + return digits + return [1] + digits`},{id:`nc-50`,problem_number:50,name:`Pow(x, n)`,pattern:`Math & Geometry`,difficulty:`Medium`,time_complexity:`O(log N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def myPow(self, x: float, n: int) -> float: + pass`,description:`Implement pow(x, n), which calculates x raised to the power n.`,examples:[{input:`x = 2.00000, n = 10`,output:`1024.00000`}],constraints:[`-100.0 < x < 100.0`,`-2^31 <= n <= 2^31-1`],leetcode_url:`https://leetcode.com/problems/powx-n/`,reference_solution:`class Solution: + def myPow(self, x: float, n: int) -> float: + def helper(x, n): + if x == 0: return 0 + if n == 0: return 1 + res = helper(x * x, n // 2) + return x * res if n % 2 else res + res = helper(x, abs(n)) + return res if n >= 0 else 1 / res`},{id:`nc-43`,problem_number:43,name:`Multiply Strings`,pattern:`Math & Geometry`,difficulty:`Medium`,time_complexity:`O(M * N)`,space_complexity:`O(M + N)`,starter_code:`class Solution: + def multiply(self, num1: str, num2: str) -> str: + pass`,description:`Given two non-negative integers num1 and num2 represented as strings, return their product as a string.`,examples:[{input:`num1 = "2", num2 = "3"`,output:`"6"`}],constraints:[`1 <= num1.length, num2.length <= 200`],leetcode_url:`https://leetcode.com/problems/multiply-strings/`,reference_solution:`class Solution: + def multiply(self, num1: str, num2: str) -> str: + if "0" in [num1, num2]: return "0" + res = [0] * (len(num1) + len(num2)) + num1, num2 = num1[::-1], num2[::-1] + for i1 in range(len(num1)): + for i2 in range(len(num2)): + digit = int(num1[i1]) * int(num2[i2]) + res[i1 + i2] += digit + res[i1 + i2 + 1] += res[i1 + i2] // 10 + res[i1 + i2] = res[i1 + i2] % 10 + res, beg = res[::-1], 0 + while beg < len(res) and res[beg] == 0: beg += 1 + return "".join(map(str, res[beg:]))`},{id:`nc-2013`,problem_number:2013,name:`Detect Squares`,pattern:`Math & Geometry`,difficulty:`Medium`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class DetectSquares: + def __init__(self): + pass + def add(self, point: list[int]) -> None: + pass + def count(self, point: list[int]) -> int: + pass`,description:`Design a data structure that adds points and counts axis-aligned squares with a given query point.`,examples:[{input:`["DetectSquares","add","add","add","count","count","add","count"]`,output:`[null,null,null,null,1,0,null,2]`}],constraints:[`point.length == 2`,`0 <= x, y <= 1000`],leetcode_url:`https://leetcode.com/problems/detect-squares/`,reference_solution:`from collections import defaultdict + +class DetectSquares: + def __init__(self): + self.ptsCount = defaultdict(int) + self.pts = [] + def add(self, point: list[int]) -> None: + self.ptsCount[tuple(point)] += 1 + self.pts.append(point) + def count(self, point: list[int]) -> int: + res = 0 + px, py = point + for x, y in self.pts: + if (abs(py - y) != abs(px - x)) or x == px or y == py: continue + res += self.ptsCount[(x, py)] * self.ptsCount[(px, y)] + return res`},{id:`nc-136`,problem_number:136,name:`Single Number`,pattern:`Bit Manipulation`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def singleNumber(self, nums: list[int]) -> int: + pass`,description:`Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.`,examples:[{input:`nums = [2,2,1]`,output:`1`}],constraints:[`1 <= nums.length <= 3 * 10^4`],leetcode_url:`https://leetcode.com/problems/single-number/`,reference_solution:`class Solution: + def singleNumber(self, nums: list[int]) -> int: + res = 0 + for n in nums: res ^= n + return res`},{id:`nc-191`,problem_number:191,name:`Number of 1 Bits`,pattern:`Bit Manipulation`,difficulty:`Easy`,time_complexity:`O(1)`,space_complexity:`O(1)`,starter_code:`class Solution: + def hammingWeight(self, n: int) -> int: + pass`,description:`Return the number of set bits (Hamming weight) that the integer n has.`,examples:[{input:`n = 11`,output:`3`}],constraints:[`1 <= n <= 2^31 - 1`],leetcode_url:`https://leetcode.com/problems/number-of-1-bits/`,reference_solution:`class Solution: + def hammingWeight(self, n: int) -> int: + res = 0 + while n: + n &= (n - 1) + res += 1 + return res`},{id:`nc-338`,problem_number:338,name:`Counting Bits`,pattern:`Bit Manipulation`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: + def countBits(self, n: int) -> list[int]: + pass`,description:`Given an integer n, return an array ans of length n + 1 such that ans[i] is the number of 1's in the binary representation of i.`,examples:[{input:`n = 5`,output:`[0,1,1,2,1,2]`}],constraints:[`0 <= n <= 10^5`],leetcode_url:`https://leetcode.com/problems/counting-bits/`,reference_solution:`class Solution: + def countBits(self, n: int) -> list[int]: + dp = [0] * (n + 1) + offset = 1 + for i in range(1, n + 1): + if offset * 2 == i: offset = i + dp[i] = 1 + dp[i - offset] + return dp`},{id:`nc-190`,problem_number:190,name:`Reverse Bits`,pattern:`Bit Manipulation`,difficulty:`Easy`,time_complexity:`O(1)`,space_complexity:`O(1)`,starter_code:`class Solution: + def reverseBits(self, n: int) -> int: + pass`,description:`Reverse bits of a given 32 bits unsigned integer.`,examples:[{input:`n = 00000010100101000001111010011100`,output:`964176192 (00111001011110000010100101000000)`}],constraints:[`The input must be a binary string of length 32`],leetcode_url:`https://leetcode.com/problems/reverse-bits/`,reference_solution:`class Solution: + def reverseBits(self, n: int) -> int: + res = 0 + for i in range(32): + bit = (n >> i) & 1 + res |= (bit << (31 - i)) + return res`},{id:`nc-268`,problem_number:268,name:`Missing Number`,pattern:`Bit Manipulation`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(1)`,starter_code:`class Solution: + def missingNumber(self, nums: list[int]) -> int: + pass`,description:`Given an array nums containing n distinct numbers in range [0, n], return the only number in the range that is missing.`,examples:[{input:`nums = [3,0,1]`,output:`2`}],constraints:[`n == nums.length`,`1 <= n <= 10^4`],leetcode_url:`https://leetcode.com/problems/missing-number/`,reference_solution:`class Solution: + def missingNumber(self, nums: list[int]) -> int: + res = len(nums) + for i in range(len(nums)): + res += (i - nums[i]) + return res`},{id:`nc-371`,problem_number:371,name:`Sum of Two Integers`,pattern:`Bit Manipulation`,difficulty:`Medium`,time_complexity:`O(1)`,space_complexity:`O(1)`,starter_code:`class Solution: + def getSum(self, a: int, b: int) -> int: + pass`,description:`Given two integers a and b, return the sum of the two integers without using the operators + and -.`,examples:[{input:`a = 1, b = 2`,output:`3`}],constraints:[`-1000 <= a, b <= 1000`],leetcode_url:`https://leetcode.com/problems/sum-of-two-integers/`,reference_solution:`class Solution: + def getSum(self, a: int, b: int) -> int: + mask = 0xFFFFFFFF + while (b & mask) != 0: + carry = (a & b) << 1 + a = a ^ b + b = carry + return (a & mask) if b > 0 else a`},{id:`nc-7`,problem_number:7,name:`Reverse Integer`,pattern:`Bit Manipulation`,difficulty:`Medium`,time_complexity:`O(log X)`,space_complexity:`O(1)`,starter_code:`class Solution: + def reverse(self, x: int) -> int: + pass`,description:`Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes overflow, return 0.`,examples:[{input:`x = 123`,output:`321`}],constraints:[`-2^31 <= x <= 2^31 - 1`],leetcode_url:`https://leetcode.com/problems/reverse-integer/`,reference_solution:`class Solution: + def reverse(self, x: int) -> int: + sign = -1 if x < 0 else 1 + x = abs(x) + res = int(str(x)[::-1]) * sign + return res if -2**31 <= res <= 2**31 - 1 else 0`}],Dt=new Map,Ot=new Map,kt=new Map;for(let e of Et){Dt.set(e.problem_number,e),Ot.set(e.id,e);let t=kt.get(e.pattern)||[];t.push(e),kt.set(e.pattern,t)}function At(e){return Dt.get(e)}function jt(e){return Ot.get(e)}function Mt(){return Et}function Nt(){return Array.from(kt.keys())}function Pt(e,t){if(t&&t.length>0){for(let n of t)if(!e.has(n)){let e=Dt.get(n);if(e)return e}}for(let t of Et)if(!e.has(t.problem_number))return t}async function Ft(){try{let{data:{session:e}}=await n.auth.getSession();return e?e.access_token:`sandbox`}catch{return`sandbox`}}async function It(e){let t=await Ft(),n=await fetch(`/api/reviews/activate`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify(e)});if(!n.ok){let e=await n.json().catch(()=>({detail:`Failed to activate problem`}));throw Error(e.detail||`Failed to activate problem`)}return n.json()}async function Lt(e){return It({problem_number:e.problem_number,name:e.name,pattern:e.pattern,difficulty:e.difficulty,time_complexity:e.time_complexity,space_complexity:e.space_complexity,description:e.description,starter_code:e.starter_code,reference_solution:e.reference_solution,examples:e.examples,constraints:e.constraints,leetcode_url:e.leetcode_url})}async function Rt(e,t,n){let r=await Ft(),i=await fetch(`/api/reviews/save-reference`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({problem_id:e||void 0,problem_number:n,code:t})});if(!i.ok){let e=await i.json().catch(()=>({detail:`Failed to save reference solution`}));throw Error(e.detail||`Failed to save reference solution`)}return i.json()}async function zt(e){let t=await Ft(),n=await fetch(`/api/reviews/ai-solution`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({problem_id:e.problemId,problem_number:e.problemNumber,problem_name:e.problemName,pattern:e.pattern})});if(!n.ok){let e=await n.json().catch(()=>({detail:`Failed to fetch solution`}));throw Error(e.detail||`Failed to fetch solution`)}return n.json()}async function Bt(e,t,n=4){let r=await Ft(),i=await fetch(`/api/reviews/test-run`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({code:e,test_cases:t,timeout:n})});return i.ok?i.json():{success:!1,error:(await i.json().catch(()=>({detail:`Execution service error`}))).detail||`Execution service error`}}async function Vt(e){let t=await Ft(),n={problems:e.map(e=>({problem_number:e.problem_number,name:e.name,pattern:e.pattern,difficulty:e.difficulty,time_complexity:e.time_complexity,space_complexity:e.space_complexity,description:e.description,starter_code:e.starter_code,reference_solution:e.reference_solution,examples:e.examples,constraints:e.constraints,leetcode_url:e.leetcode_url}))},r=await fetch(`/api/reviews/activate-batch`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify(n)});if(!r.ok){let e=await r.json().catch(()=>({detail:`Failed to batch activate problems`}));throw Error(e.detail||`Failed to batch activate problems`)}return r.json()}var Ht=[217,242,1,49,20];function Ut({isOpen:e,onClose:t,onCompleted:n,userId:r}){let[i,a]=(0,p.useState)(`welcome`),[o,s]=(0,p.useState)(new Set),[c,l]=(0,p.useState)(``),[u,d]=(0,p.useState)(`ALL`),[f,m]=(0,p.useState)({}),[h,g]=(0,p.useState)(!1),[_,v]=(0,p.useState)(null),[y,b]=(0,p.useState)(null),x=()=>`algospaced_onboarding_done_${r===`sandbox-user-id`?`sandbox`:r||`sandbox`}`;(0,p.useEffect)(()=>{if(e){let e=localStorage.getItem(x());a(e?`checklist`:`welcome`),b(null),v(null)}},[e,r]);let S=(0,p.useMemo)(()=>Mt(),[]),ee=(0,p.useMemo)(()=>Nt(),[]),C=(0,p.useMemo)(()=>{let e=c.trim().toLowerCase();return S.filter(t=>u!==`ALL`&&t.pattern!==u?!1:!e||t.name.toLowerCase().includes(e)||t.problem_number.toString().includes(e)||t.pattern.toLowerCase().includes(e)||t.difficulty.toLowerCase().includes(e))},[S,c,u]),ne=(0,p.useMemo)(()=>{let e=new Map;for(let t of C){let n=e.get(t.pattern)||[];n.push(t),e.set(t.pattern,n)}return e},[C]);if(!e)return null;let ae=()=>{localStorage.setItem(x(),`true`)},ce=async()=>{g(!0),b(null),v(`Enrolling 5 foundational starter problems...`);try{await Vt(Ht.map(e=>At(e)).filter(e=>e!==void 0)),ae(),v(`All 5 starter problems enrolled into Box 1!`),setTimeout(()=>{n(),t()},700)}catch(e){console.error(`Failed to start from scratch:`,e),b(e instanceof Error?e.message:`Failed to enroll starter problems`),g(!1)}},ue=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},T=e=>{let t=S.filter(t=>t.pattern===e),n=t.every(e=>o.has(e.problem_number));s(e=>{let r=new Set(e);for(let e of t)n?r.delete(e.problem_number):r.add(e.problem_number);return r})},E=e=>{s(t=>{let n=new Set(t);for(let t of S)t.difficulty===e&&n.add(t.problem_number);return n})},de=()=>{s(new Set(S.map(e=>e.problem_number)))},me=()=>{s(new Set)},ge=e=>{m(t=>({...t,[e]:!t[e]}))};return(0,k.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/75 backdrop-blur-sm p-3 sm:p-6 overflow-y-auto`,children:(0,k.jsxs)(`div`,{className:`w-full max-w-4xl max-h-[92vh] bg-paper-white border-[4px] border-ink-black gadget-shadow flex flex-col relative overflow-hidden text-ink-black`,children:[(0,k.jsxs)(`div`,{className:`h-10 bg-gradient-to-r from-amber-400 via-amber-300 to-grass-green border-b-[3px] border-ink-black px-4 flex items-center justify-between shrink-0`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`w-3 h-3 rounded-full bg-rose-500 border border-ink-black`}),(0,k.jsx)(`span`,{className:`w-3 h-3 rounded-full bg-amber-500 border border-ink-black`}),(0,k.jsx)(`span`,{className:`w-3 h-3 rounded-full bg-emerald-500 border border-ink-black`}),(0,k.jsxs)(`span`,{className:`font-arcade text-[11px] font-bold tracking-wider text-ink-black uppercase ml-2 flex items-center gap-1.5`,children:[(0,k.jsx)(le,{className:`w-4 h-4 text-amber-900`}),`EXPEDITION ONBOARDING PROTOCOL`]})]}),(0,k.jsx)(`button`,{onClick:()=>{ae(),t()},disabled:h,className:`p-1 hover:bg-black/10 rounded transition-colors text-ink-black cursor-pointer border-0`,title:`Dismiss for now`,children:(0,k.jsx)(ve,{className:`w-4 h-4`})})]}),i===`welcome`&&(0,k.jsxs)(`div`,{className:`p-6 sm:p-10 space-y-8 overflow-y-auto custom-scrollbar text-center`,children:[(0,k.jsxs)(`div`,{className:`space-y-3`,children:[(0,k.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3 py-1 bg-amber-100 border-2 border-ink-black font-arcade text-[10px] font-bold text-amber-900 uppercase`,children:[(0,k.jsx)(D,{className:`w-3.5 h-3.5 text-amber-700`}),`WELCOME TO ALGOSPACED`]}),(0,k.jsx)(`h1`,{className:`font-headline-md text-2xl sm:text-4xl font-extrabold text-ink-black tracking-tight`,children:`How would you like to begin your journey?`}),(0,k.jsx)(`p`,{className:`font-sans text-xs sm:text-sm text-trash-gray max-w-xl mx-auto leading-relaxed font-semibold`,children:`AlgoSpaced uses a 5-box Leitner spaced repetition engine. Choose how to seed your active practice cards.`})]}),(0,k.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6 max-w-2xl mx-auto text-left`,children:[(0,k.jsxs)(`div`,{className:`p-5 sm:p-6 bg-gradient-to-br from-emerald-50 to-emerald-100/60 border-[3px] border-ink-black gadget-shadow hover:translate-y-[-2px] transition-all flex flex-col justify-between space-y-4`,children:[(0,k.jsxs)(`div`,{className:`space-y-3`,children:[(0,k.jsx)(`div`,{className:`w-12 h-12 bg-grass-green border-2 border-ink-black rounded-xl flex items-center justify-center shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:(0,k.jsx)(re,{className:`w-6 h-6 text-ink-black stroke-[2.5]`})}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-emerald-800 uppercase tracking-wide`,children:`RECOMMENDED FOR NOVICES`}),(0,k.jsx)(`h2`,{className:`font-headline-md text-lg sm:text-xl font-bold text-ink-black mt-0.5`,children:`🌱 Start From Scratch`})]}),(0,k.jsx)(`p`,{className:`font-sans text-xs text-trash-gray leading-relaxed font-semibold`,children:`Begin with the 5 foundational starter problems: Contains Duplicate, Valid Anagram, Two Sum, Group Anagrams, and Valid Parentheses.`})]}),(0,k.jsx)(`button`,{onClick:ce,disabled:h,className:`w-full py-3 bg-grass-green hover:bg-emerald-400 text-ink-black font-arcade text-[10px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center justify-center gap-2 disabled:opacity-50`,children:h?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(fe,{className:`w-4 h-4 animate-spin`}),(0,k.jsx)(`span`,{children:`INITIALIZING...`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(w,{className:`w-4 h-4 stroke-[3]`}),(0,k.jsx)(`span`,{children:`START FRESH (5 PROBLEMS)`})]})})]}),(0,k.jsxs)(`div`,{className:`p-5 sm:p-6 bg-gradient-to-br from-amber-50 to-orange-100/60 border-[3px] border-ink-black gadget-shadow hover:translate-y-[-2px] transition-all flex flex-col justify-between space-y-4`,children:[(0,k.jsxs)(`div`,{className:`space-y-3`,children:[(0,k.jsx)(`div`,{className:`w-12 h-12 bg-amber-400 border-2 border-ink-black rounded-xl flex items-center justify-center shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:(0,k.jsx)(ye,{className:`w-6 h-6 text-ink-black stroke-[2.5]`})}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-amber-800 uppercase tracking-wide`,children:`LEETCODE VETERANS`}),(0,k.jsx)(`h2`,{className:`font-headline-md text-lg sm:text-xl font-bold text-ink-black mt-0.5`,children:`⚡ Fast-Track Checklist`})]}),(0,k.jsx)(`p`,{className:`font-sans text-xs text-trash-gray leading-relaxed font-semibold`,children:`Already solved LeetCode 75 or NeetCode 150? Check off the problems you know, pick your Leitner Box interval, and jump straight into review.`})]}),(0,k.jsxs)(`button`,{onClick:()=>a(`checklist`),disabled:h,className:`w-full py-3 bg-amber-400 hover:bg-amber-300 text-ink-black font-arcade text-[10px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center justify-center gap-2`,children:[(0,k.jsx)(`span`,{children:`SELECT WHAT I KNOW (150 POOL)`}),(0,k.jsx)(te,{className:`w-4 h-4 rotate-180`})]})]})]}),_&&(0,k.jsx)(`p`,{className:`font-arcade text-[10px] text-emerald-700 font-bold animate-pulse`,children:_}),y&&(0,k.jsx)(`p`,{className:`font-arcade text-[10px] text-rose-600 font-bold`,children:y})]}),i===`checklist`&&(0,k.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,k.jsxs)(`div`,{className:`p-3 sm:p-4 bg-amber-50/60 border-b-[2px] border-ink-black shrink-0 space-y-3`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsxs)(`button`,{onClick:()=>a(`welcome`),className:`px-2.5 py-1.5 bg-paper-white hover:bg-slate-100 border-2 border-ink-black font-arcade text-[9px] font-bold text-ink-black flex items-center gap-1 cursor-pointer transition-colors shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`,children:[(0,k.jsx)(te,{className:`w-3.5 h-3.5`}),`BACK`]}),(0,k.jsx)(`h2`,{className:`font-headline-md text-base sm:text-lg font-bold text-ink-black`,children:`Fast-Track Catalog Checklist`})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2 bg-paper-white border-2 border-ink-black p-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,k.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-trash-gray px-1 uppercase`,children:`FSRS STATE:`}),(0,k.jsx)(`span`,{className:`px-2 py-1 font-arcade text-[9px] font-bold bg-amber-400 text-ink-black border border-ink-black`,children:`ALL START AS 'NEW'`})]})]}),(0,k.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2 items-center justify-between`,children:[(0,k.jsxs)(`div`,{className:`relative w-full sm:w-72`,children:[(0,k.jsx)(pe,{className:`w-3.5 h-3.5 text-trash-gray absolute left-3 top-1/2 -translate-y-1/2`}),(0,k.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),placeholder:`Search by title, number, or pattern...`,className:`w-full pl-8 pr-3 py-1.5 bg-paper-white border-2 border-ink-black font-sans text-xs text-ink-black font-medium outline-none focus:bg-amber-50`}),c&&(0,k.jsx)(`button`,{onClick:()=>l(``),className:`absolute right-2 top-1/2 -translate-y-1/2 text-trash-gray hover:text-ink-black p-0.5`,children:(0,k.jsx)(ve,{className:`w-3 h-3`})})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap w-full sm:w-auto justify-end`,children:[(0,k.jsx)(`button`,{onClick:()=>E(`Easy`),className:`px-2 py-1 bg-emerald-100 hover:bg-emerald-200 border border-emerald-800 text-emerald-900 font-arcade text-[8px] font-bold cursor-pointer transition-colors`,children:`+ ALL EASY`}),(0,k.jsx)(`button`,{onClick:()=>E(`Medium`),className:`px-2 py-1 bg-amber-100 hover:bg-amber-200 border border-amber-800 text-amber-900 font-arcade text-[8px] font-bold cursor-pointer transition-colors`,children:`+ ALL MEDIUM`}),(0,k.jsx)(`button`,{onClick:de,className:`px-2 py-1 bg-purple-100 hover:bg-purple-200 border border-purple-800 text-purple-900 font-arcade text-[8px] font-bold cursor-pointer transition-colors`,children:`SELECT ALL (150)`}),(0,k.jsx)(`button`,{onClick:me,className:`px-2 py-1 bg-slate-100 hover:bg-slate-200 border border-slate-700 text-slate-800 font-arcade text-[8px] font-bold cursor-pointer transition-colors`,children:`CLEAR`})]})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 overflow-x-auto custom-scrollbar pb-1 text-[8px] font-arcade font-bold`,children:[(0,k.jsxs)(`button`,{onClick:()=>d(`ALL`),className:`px-2 py-0.5 border cursor-pointer shrink-0 transition-colors ${u===`ALL`?`bg-ink-black text-amber-300 border-ink-black`:`bg-paper-white text-trash-gray border-slate-300 hover:text-ink-black`}`,children:[`ALL PATTERNS (`,S.length,`)`]}),ee.map(e=>{let t=S.filter(t=>t.pattern===e).length;return(0,k.jsxs)(`button`,{onClick:()=>d(e),className:`px-2 py-0.5 border cursor-pointer shrink-0 transition-colors ${u===e?`bg-ink-black text-amber-300 border-ink-black`:`bg-paper-white text-trash-gray border-slate-300 hover:text-ink-black`}`,children:[e.toUpperCase(),` (`,t,`)`]},e)})]})]}),(0,k.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 sm:p-6 custom-scrollbar space-y-4 bg-slate-50/50`,children:[Array.from(ne.entries()).map(([e,t])=>{let n=t.filter(e=>o.has(e.problem_number)).length,r=n===t.length,i=f[e]!==!1;return(0,k.jsxs)(`div`,{className:`bg-paper-white border-2 border-ink-black gadget-shadow overflow-hidden`,children:[(0,k.jsxs)(`div`,{className:`px-3.5 py-2.5 bg-gradient-to-r from-amber-100 to-amber-50 border-b-2 border-ink-black flex items-center justify-between`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`button`,{onClick:()=>ge(e),className:`p-1 hover:bg-black/10 rounded cursor-pointer transition-colors text-ink-black`,children:i?(0,k.jsx)(oe,{className:`w-3.5 h-3.5`}):(0,k.jsx)(ie,{className:`w-3.5 h-3.5`})}),(0,k.jsx)(`span`,{className:`font-headline-md text-xs sm:text-sm font-bold text-ink-black`,children:e}),(0,k.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold px-1.5 py-0.5 rounded bg-amber-900/10 text-amber-900 border border-amber-900/20`,children:[n,` / `,t.length,` selected`]})]}),(0,k.jsx)(`button`,{onClick:()=>T(e),className:`px-2 py-1 font-arcade text-[8px] font-bold border border-ink-black bg-paper-white hover:bg-amber-200 transition-colors cursor-pointer flex items-center gap-1 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`,children:r?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(O,{className:`w-3 h-3 text-emerald-600`}),(0,k.jsx)(`span`,{children:`DESELECT ALL`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(he,{className:`w-3 h-3 text-slate-500`}),(0,k.jsx)(`span`,{children:`SELECT ALL`})]})})]}),i&&(0,k.jsx)(`div`,{className:`p-3 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2`,children:t.map(e=>{let t=o.has(e.problem_number);return(0,k.jsxs)(`div`,{onClick:()=>ue(e.problem_number),className:`p-2.5 border-2 transition-all cursor-pointer select-none flex items-start gap-2.5 ${t?`bg-amber-50/80 border-amber-600 shadow-[2px_2px_0px_0px_#d97706]`:`bg-paper-white border-slate-300 hover:border-ink-black`}`,children:[(0,k.jsx)(`div`,{className:`mt-0.5 shrink-0`,children:t?(0,k.jsx)(O,{className:`w-4 h-4 text-emerald-600 stroke-[2.5]`}):(0,k.jsx)(he,{className:`w-4 h-4 text-slate-400 stroke-[2]`})}),(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,k.jsxs)(`span`,{className:`font-mono text-[9px] font-bold text-trash-gray`,children:[`#`,e.problem_number]}),(0,k.jsx)(`span`,{className:`px-1.5 py-0.2 rounded font-arcade text-[7px] font-bold uppercase text-white ${e.difficulty===`Easy`?`bg-emerald-600`:e.difficulty===`Medium`?`bg-amber-600`:`bg-rose-600`}`,children:e.difficulty})]}),(0,k.jsx)(`h3`,{className:`font-headline-md text-xs font-bold text-ink-black truncate mt-0.5`,children:e.name}),(0,k.jsxs)(`div`,{className:`text-[10px] font-code-mono text-slate-500 truncate mt-0.5`,children:[`T: `,e.time_complexity,` | S: `,e.space_complexity]})]})]},e.problem_number)})})]},e)}),ne.size===0&&(0,k.jsxs)(`div`,{className:`p-8 text-center bg-paper-white border-2 border-dashed border-slate-300 text-trash-gray space-y-2`,children:[(0,k.jsx)(pe,{className:`w-8 h-8 mx-auto text-slate-400`}),(0,k.jsx)(`p`,{className:`font-arcade text-xs font-bold`,children:`NO MATCHING PROBLEMS FOUND`}),(0,k.jsx)(`p`,{className:`text-xs font-sans`,children:`Try searching another keyword or clearing filters.`})]})]}),(0,k.jsxs)(`div`,{className:`p-3 sm:p-4 bg-paper-white border-t-[3px] border-ink-black shrink-0 flex flex-col sm:flex-row items-center justify-between gap-3 shadow-[0px_-4px_10px_rgba(0,0,0,0.05)]`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`div`,{className:`w-7 h-7 rounded-lg bg-emerald-100 border border-emerald-800 flex items-center justify-center`,children:(0,k.jsx)(se,{className:`w-4 h-4 text-emerald-700`})}),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`span`,{className:`font-arcade text-[10px] font-bold text-ink-black`,children:[o.size,` of `,S.length,` PROBLEMS SELECTED`]}),(0,k.jsx)(`div`,{className:`font-sans text-[11px] text-trash-gray font-semibold`,children:`Target: FSRS (New)`})]})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2 w-full sm:w-auto justify-end`,children:[y&&(0,k.jsx)(`span`,{className:`font-arcade text-[9px] text-rose-600 font-bold mr-2 truncate`,children:y}),(0,k.jsx)(`button`,{onClick:async()=>{if(o.size!==0){g(!0),b(null),v(`Enrolling ${o.size} problems into FSRS...`);try{let e=S.filter(e=>o.has(e.problem_number));await Vt(e),ae(),v(`Successfully enrolled ${e.length} problems!`),setTimeout(()=>{n(),t()},700)}catch(e){console.error(`Failed to batch activate:`,e),b(e instanceof Error?e.message:`Failed to enroll problems`),g(!1)}}},disabled:o.size===0||h,className:`w-full sm:w-auto px-6 py-2.5 bg-gradient-to-r from-amber-400 to-grass-green hover:from-amber-300 hover:to-emerald-400 text-ink-black font-arcade text-[10px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center justify-center gap-2 disabled:opacity-40 disabled:cursor-not-allowed`,children:h?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(fe,{className:`w-3.5 h-3.5 animate-spin`}),(0,k.jsx)(`span`,{children:`ENROLLING...`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ye,{className:`w-3.5 h-3.5 text-amber-900`}),(0,k.jsxs)(`span`,{children:[`ENROLL `,o.size,` PROBLEMS (FSRS)`]})]})})]})]})]})]})})}var Wt={queue:{isOpen:!0,isMinimized:!1},journey:{isOpen:!1,isMinimized:!1},terminal:{isOpen:!1,isMinimized:!1},computer:{isOpen:!1,isMinimized:!1},sync:{isOpen:!1,isMinimized:!1},python:{isOpen:!1,isMinimized:!1},mysql:{isOpen:!1,isMinimized:!1},settings:{isOpen:!1,isMinimized:!1},createProblem:{isOpen:!1,isMinimized:!1},companion:{isOpen:!1,isMinimized:!1}};function Gt(e){let[t,n]=(0,p.useState)(Wt),[r,i]=(0,p.useState)(`queue`),[a,o]=(0,p.useState)(null),[s,c]=(0,p.useState)(0),l=(0,p.useCallback)(t=>{let r=t;n(e=>({...e,[r]:{isOpen:!0,isMinimized:!1}})),i(t),e&&e()},[e]);return{windows:t,activeWindow:r,setActiveWindow:i,overrideProblemId:a,setOverrideProblemId:o,refreshExplorerTrigger:s,openWindow:l,closeWindow:(0,p.useCallback)(e=>{let t=e;n(e=>{let n=e[t]||{isOpen:!1,isMinimized:!1};return{...e,[t]:{...n,isOpen:!1}}})},[]),minimizeWindow:(0,p.useCallback)(e=>{let t=e;n(e=>{let n=e[t]||{isOpen:!0,isMinimized:!1};return{...e,[t]:{...n,isMinimized:!0}}})},[]),toggleWindowMinimize:(0,p.useCallback)(e=>{let t=e;n(n=>{let a=n[t]||{isOpen:!1,isMinimized:!1};return a.isMinimized||!a.isOpen?(i(e),{...n,[t]:{isOpen:!0,isMinimized:!1}}):r===e?{...n,[t]:{...a,isMinimized:!0}}:(i(e),n)})},[r]),handleSelectProblemForReview:(0,p.useCallback)(e=>{o(e),l(`queue`)},[l]),triggerRefreshExplorer:(0,p.useCallback)(()=>{c(e=>e+1)},[]),isAnyWindowOpen:(0,p.useMemo)(()=>Object.values(t).some(e=>e.isOpen&&!e.isMinimized),[t])}}function Kt(e,t){let[r,i]=(0,p.useState)(``),[a,o]=(0,p.useState)(null),[s,c]=(0,p.useState)(!1),[l,u]=(0,p.useState)(!1),[d,f]=(0,p.useState)(!1),[m,h]=(0,p.useState)(null);(0,p.useEffect)(()=>{let e=()=>{let e=new Date,t=e.getHours(),n=e.getMinutes(),r=t>=12?`PM`:`AM`;t%=12,t||=12;let a=n<10?`0`+n:String(n);i(`${t}:${a} ${r}`)};e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[]);let g=(0,p.useCallback)(async()=>{try{let{data:{session:e}}=await n.auth.getSession();if(!e)return;let t=await fetch(`/api/streak`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();o(e)}}catch(e){console.error(`Error fetching streak:`,e)}},[]);return(0,p.useEffect)(()=>{if(e){let e=setTimeout(()=>{g()},0);return St(),()=>clearTimeout(e)}},[e,g]),(0,p.useEffect)(()=>{let e=()=>{c(window.innerWidth<768)};return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),(0,p.useEffect)(()=>{let e=()=>{u(!!document.fullscreenElement)};return document.addEventListener(`fullscreenchange`,e),()=>{document.removeEventListener(`fullscreenchange`,e)}},[]),(0,p.useEffect)(()=>{let e=e=>{e.ctrlKey&&e.preventDefault()},t=e=>{e.ctrlKey&&(e.key===`=`||e.key===`-`||e.key===`0`||e.key===`+`||e.code===`NumpadAdd`||e.code===`NumpadSubtract`)&&e.preventDefault()},n=e=>{e.touches.length>1&&e.preventDefault()};return document.addEventListener(`wheel`,e,{passive:!1}),document.addEventListener(`keydown`,t),document.addEventListener(`touchmove`,n,{passive:!1}),()=>{document.removeEventListener(`wheel`,e),document.removeEventListener(`keydown`,t),document.removeEventListener(`touchmove`,n)}},[]),{time:r,streak:a,fetchStreak:g,isMobile:s,isFullscreen:l,toggleFullscreen:(0,p.useCallback)(()=>{document.fullscreenElement?document.exitFullscreen().catch(e=>{console.error(`Error exiting fullscreen: ${e.message}`)}):document.documentElement.requestFullscreen().catch(e=>{console.error(`Error enabling fullscreen: ${e.message}`)})},[]),syncing:d,syncResult:m,triggerSync:(0,p.useCallback)(async()=>{t&&t(),f(!0),h(null);try{let{data:{session:e}}=await n.auth.getSession();if(!e)return;let t=await fetch(`/api/sync`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();h(e.message||`Synchronization successfully completed!`),g(),St()}else h(`Sync operation failed at server host.`)}catch{h(`Cloud synchronization server unreachable.`)}finally{f(!1)}},[t,g])}}var qt=`https://lh3.googleusercontent.com/aida-public/AB6AXuAMJHVhhK8_G7F8sbhn8F7w4AZWXb1O_-HLKvrZ_fJlbUVMcVuxxEOO_LlOh8qIwtAn2KvzvCwzmtNLLEZ5uYkCEsx8ZWXJR609qgSMRSX8LBBeskk4VzVXnyzsgIKCedeV2PvGxJlUNnledcWKCXqG9egQi8dgTcA7C2z82QyM73KZ4s7ZRzZHNupuQt1ocfcMl9E_x1PWFRridl751LIpyGZgednS5CmVw2rZvFc_tbp2QTxgVHJ_59myEBmy6aajbO06AhkKmCvI`;function Jt(){let[e,t]=(0,p.useState)(()=>localStorage.getItem(`desktopWallpaperUrl`)||qt),n=(0,p.useCallback)(e=>{let n=new FileReader;n.onload=n=>{let r=new Image;r.onload=()=>{let i=document.createElement(`canvas`),a=r.width,o=r.height,s=1920,c=1080;(a>s||o>c)&&(a/o>s/c?(o=Math.round(o*s/a),a=s):(a=Math.round(a*c/o),o=c)),i.width=a,i.height=o;let l=i.getContext(`2d`);if(l){l.drawImage(r,0,0,a,o);try{let n=i.toDataURL(`image/jpeg`,.7);t(n),localStorage.setItem(`desktopWallpaperUrl`,n),localStorage.setItem(`customWallpaperUrl`,n),localStorage.setItem(`customWallpaperName`,e.name)}catch(e){console.error(`Failed to save compressed image to localStorage:`,e);let r=n.target?.result;t(r)}}else{let r=n.target?.result;t(r);try{localStorage.setItem(`desktopWallpaperUrl`,r),localStorage.setItem(`customWallpaperUrl`,r),localStorage.setItem(`customWallpaperName`,e.name)}catch(e){console.error(`Failed to save raw image to localStorage:`,e)}}},r.src=n.target?.result},n.readAsDataURL(e)},[]);return{wallpaperUrl:e,setWallpaperUrl:t,compressAndSaveWallpaper:n,handleWallpaperChange:(0,p.useCallback)((e,t)=>{t&&t();let r=e.target.files?.[0];r&&n(r)},[n])}}function Yt(e,t){let[n,r]=(0,p.useState)(null);return(0,p.useEffect)(()=>{if(e){let e=_t();if(e.enabled&&e.autoPopupEnabled){let e=setTimeout(()=>{let e=wt(`study_start`);r({text:e.text,emotion:e.emotion,title:`✨ Welcome, Noble Hero!`,context:`study_start`,autoCloseDelay:7e3})},2500);return()=>clearTimeout(e)}}},[e]),(0,p.useEffect)(()=>{let e=e=>{let t=e;t.detail&&r(t.detail)},n=e=>{let n=e;n.detail?.windowId&&t(n.detail.windowId)};window.addEventListener(`companion:dialogue`,e),window.addEventListener(`companion:open_window`,n);let i=Date.now(),a=setInterval(()=>{let e=_t();if(!(!e.enabled||!e.autoPopupEnabled||!e.breakIntervalMinutes||e.breakIntervalMinutes<=0)&&(Date.now()-i)/6e4>=e.breakIntervalMinutes){i=Date.now(),ut();let e=wt(`break_reminder`);r({text:e.text,emotion:e.emotion,title:`☕ Time for a Royal Pause`,context:`break_reminder`,autoCloseDelay:12e3})}},3e4);return()=>{window.removeEventListener(`companion:dialogue`,e),window.removeEventListener(`companion:open_window`,n),clearInterval(a)}},[t]),{companionDialogueEvent:n,setCompanionDialogueEvent:r}}var Xt=({isMobile:e,username:t,streak:n})=>e?null:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`absolute top-desktop-margin right-desktop-margin w-64 bg-paper-white border-[3px] border-ink-black gadget-shadow z-20 overflow-hidden flex flex-col shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] select-none`,children:[(0,k.jsx)(`div`,{className:`bg-[#0ea5e9] border-b-[3px] border-ink-black px-3 py-1 flex justify-between items-center text-white`,children:(0,k.jsx)(`span`,{className:`font-window-title text-xs font-bold tracking-wide`,children:`Profile.sys`})}),(0,k.jsxs)(`div`,{className:`p-3 flex items-center gap-3 bg-[#fdf8e1]`,children:[(0,k.jsx)(`div`,{className:`w-12 h-12 border-[3px] border-ink-black overflow-hidden bg-primary-fixed-dim shadow-[2px_2px_0_0_#1E293B] shrink-0`,children:(0,k.jsx)(`img`,{alt:`Profile Avatar`,className:`w-full h-full object-cover`,src:`https://lh3.googleusercontent.com/aida-public/AB6AXuBl1MnAmh_W_EWibibrGw1F1YSenuKlaIn3JymUnBKn1nPLjAaOBjoLzdT5krzVDmihFhXOk-DEtNTdM2Js1_Ttr--5WZohhyqD1QfpS6j_yU1_-4wweOmgWq2HLUYNMf0mzQDNLNu5KbACEJKL5sm1YaTLPePlO687X3VHYsUhWTpUQeBwFjushaBpyW8tEa2dJj5ZSRWq0qa5GhtE0zAAW741e2SIRtFOp7CvBYEEetymSiucK513lli1TUwgWIgXvlfxZoGbH00q`})}),(0,k.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,k.jsx)(`div`,{className:`font-headline-md text-sm font-bold text-ink-black truncate`,children:t}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1 text-red-500 mt-1 select-none font-bold`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`local_fire_department`}),(0,k.jsxs)(`span`,{className:`font-arcade text-[7px]`,children:[n?.current_streak??0,` DAY STREAK`]})]})]})]})]}),(0,k.jsxs)(`div`,{className:`fixed bottom-16 right-5 pointer-events-none select-none text-right z-10 flex flex-col items-end leading-tight text-white/50 drop-shadow-[0_1px_2px_rgba(0,0,0,0.85)]`,children:[(0,k.jsx)(`span`,{className:`text-[13px] font-medium tracking-tight`,children:`AlgoSpaced (Beta)`}),(0,k.jsx)(`span`,{className:`text-[11px] font-normal text-white/40 mt-0.5`,children:`Build 1.0.24-preview`})]})]}),Zt=({isOpen:e,onOpenWindow:t,onOpenOnboarding:n,onTriggerSync:r,onSignOut:i})=>e?(0,k.jsxs)(`div`,{onClick:e=>e.stopPropagation(),id:`start-menu`,className:`absolute bottom-14 left-0 w-64 bg-white border-[3px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col p-4 z-[60] ml-2 mb-2 select-none`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-2 mb-3`,children:[(0,k.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black tracking-wider`,children:`ALGOSPACED OS`}),(0,k.jsx)(`span`,{className:`font-arcade text-[7px] font-extrabold bg-[#facc15] text-ink-black px-1.5 py-0.5 border-[1.5px] border-ink-black shadow-[1.5px_1.5px_0_0_#1E293B]`,children:`BETA`})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-2.5 font-window-title text-base font-bold`,children:[(0,k.jsxs)(`button`,{onClick:()=>t(`queue`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`}),`Daily Queue`]}),(0,k.jsxs)(`button`,{onClick:()=>t(`journey`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`route`}),`Journey Path`]}),(0,k.jsxs)(`button`,{onClick:n,className:`w-full text-left hover:bg-amber-100 px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg text-amber-600`,style:{fontVariationSettings:`'FILL' 1`},children:`bolt`}),`Fast-Track Checklist`]}),(0,k.jsxs)(`button`,{onClick:r,className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`cloud_sync`}),`Drive Sync`]}),(0,k.jsxs)(`button`,{onClick:()=>t(`terminal`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`terminal`}),`Terminal`]}),(0,k.jsxs)(`button`,{onClick:()=>t(`computer`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`desktop_windows`}),`My Computer`]}),(0,k.jsxs)(`button`,{onClick:()=>t(`companion`),className:`w-full text-left hover:bg-[#ffe24c]/40 px-3 py-1.5 border-2 border-transparent hover:border-[#f59e0b] transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg text-[#f59e0b]`,style:{fontVariationSettings:`'FILL' 1`},children:`castle`}),`Princess Tower`]}),(0,k.jsxs)(`button`,{onClick:()=>t(`python`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),`Python Challenge`]}),(0,k.jsxs)(`button`,{onClick:()=>t(`mysql`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`database`}),`MySQL Playground`]}),(0,k.jsxs)(`button`,{onClick:()=>t(`settings`),className:`w-full text-left hover:bg-[#10b981]/25 px-3 py-1.5 border-2 border-transparent hover:border-[#10b981] transition-colors cursor-pointer flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg text-[#10b981]`,style:{fontVariationSettings:`'FILL' 1`},children:`key`}),`API Configuration`]})]}),(0,k.jsx)(`div`,{className:`mt-4 flex justify-end border-t-[3px] border-ink-black pt-4 select-none`,children:(0,k.jsx)(`button`,{onClick:i,className:`bg-highlight-pink text-white font-window-title px-4 py-2.5 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_#1E293B] active:translate-y-0.5 active:translate-x-0.5 active:shadow-none hover:bg-rose-600 transition-all cursor-pointer font-bold uppercase text-xs`,children:`Shut Down`})})]}):null,Qt=({onToggleStart:e,onCloseStart:t,isMobile:n,windows:r,activeWindow:i,onToggleWindow:a,time:o})=>(0,k.jsxs)(`div`,{onClick:t,className:`fixed bottom-0 left-0 w-full z-50 flex items-center justify-between h-14 border-t-[4px] border-ink-black bg-[#0ea5e9] px-0 select-none shadow-[0_-4px_0_0_rgba(30,41,59,0.1)]`,children:[(0,k.jsxs)(`div`,{className:`flex items-center h-full overflow-x-auto custom-scrollbar`,children:[(0,k.jsxs)(`button`,{onClick:t=>{t.stopPropagation(),e()},className:`h-full ${n?`px-3`:`px-6`} flex items-center gap-2 border-r-[4px] border-ink-black bg-[#39ff14] text-ink-black hover:bg-[#28e007] active:bg-[#1fb304] transition-colors shadow-[inset_-3px_-3px_0px_rgba(0,0,0,0.2),inset_3px_3px_0px_rgba(255,255,255,0.5)] font-bold cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-2xl font-bold`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,k.jsx)(`span`,{className:`font-display-lg ${n?`text-sm`:`text-lg`} italic tracking-wide`,children:`Start`})]}),r.queue.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`queue`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`queue`&&!r.queue.isMinimized?`bg-paper-white text-ink-black font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`view_list`}),(0,k.jsx)(`span`,{children:n?`Queue`:`Daily Queue`})]}),r.journey.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`journey`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`journey`&&!r.journey.isMinimized?`bg-paper-white text-ink-black font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`route`}),(0,k.jsx)(`span`,{children:n?`Journey`:`Journey Path`})]}),r.terminal.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`terminal`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`terminal`&&!r.terminal.isMinimized?`bg-paper-white text-ink-black font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`terminal`}),(0,k.jsx)(`span`,{children:`Terminal`})]}),r.sync.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`sync`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`sync`&&!r.sync.isMinimized?`bg-paper-white text-ink-black font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`cloud_sync`}),(0,k.jsx)(`span`,{children:n?`Sync`:`Drive Sync`})]}),r.computer.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`computer`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`computer`&&!r.computer.isMinimized?`bg-paper-white text-ink-black font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`desktop_windows`}),(0,k.jsx)(`span`,{children:n?`Comp`:`My Computer`})]}),r.createProblem?.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`createProblem`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`createProblem`&&!r.createProblem.isMinimized?`bg-paper-white text-ink-black font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`note_add`}),(0,k.jsx)(`span`,{children:n?`New File`:`Create Problem`})]}),r.python.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`python`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`python`&&!r.python.isMinimized?`bg-paper-white text-ink-black font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`sports_esports`}),(0,k.jsx)(`span`,{children:n?`Python`:`Python Challenge`})]}),r.mysql.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`mysql`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`mysql`&&!r.mysql.isMinimized?`bg-paper-white text-ink-black font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`database`}),(0,k.jsx)(`span`,{children:n?`SQL`:`MySQL Playground`})]}),r.companion?.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`companion`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`companion`&&!r.companion.isMinimized?`bg-paper-white text-amber-700 font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold text-amber-600`,children:`castle`}),(0,k.jsx)(`span`,{children:n?`Princess`:`Princess Tower`})]}),r.settings?.isOpen&&(0,k.jsxs)(`button`,{onClick:()=>a(`settings`),className:`h-full ${n?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] ${i===`settings`&&!r.settings.isMinimized?`bg-paper-white text-[#10b981] font-extrabold translate-y-[2px]`:`bg-surface-variant text-trash-gray hover:bg-white/40`}`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold text-[#10b981]`,children:`key`}),(0,k.jsx)(`span`,{children:n?`API`:`API Config`})]})]}),(0,k.jsxs)(`div`,{className:`flex items-center h-full border-l-[4px] border-ink-black bg-[#0284c7] text-white px-4 gap-4 shadow-[inset_3px_3px_0px_rgba(0,0,0,0.2)]`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined cursor-pointer select-none text-lg`,children:`volume_up`}),(0,k.jsx)(`span`,{className:`material-symbols-outlined cursor-pointer select-none text-lg`,children:`network_wifi`}),(0,k.jsx)(`div`,{className:`font-arcade text-[9px] font-bold flex flex-col items-center leading-none justify-center select-none pt-0.5`,children:(0,k.jsx)(`span`,{children:o})})]})]}),$t=({isMobile:e,isAnyWindowOpen:t,username:n,streak:r,onToggleWindow:i,onTriggerSync:a})=>!e||t?null:(0,k.jsxs)(`div`,{className:`w-full h-[calc(100vh-56px)] overflow-y-auto custom-scrollbar p-6 pb-24 flex flex-col gap-6 z-10 relative`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col select-none border-b-[3px] border-dashed border-ink-black pb-4`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,k.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase tracking-wider`,children:`AlgoSpaced OS v1.0`}),(0,k.jsx)(`span`,{className:`text-[7px] font-arcade bg-[#facc15] text-ink-black font-extrabold px-1.5 py-0.5 border-[1.5px] border-ink-black shadow-[1px_1px_0px_0px_#1E293B]`,children:`BETA`})]}),(0,k.jsx)(`h1`,{className:`text-4xl font-extrabold font-headline-md text-ink-black uppercase tracking-tight mt-1`,children:`start`})]}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,k.jsxs)(`div`,{className:`col-span-2 bg-[#fdf8e1] border-[3px] border-ink-black p-4 flex items-center gap-4 gadget-shadow shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)]`,children:[(0,k.jsx)(`div`,{className:`w-12 h-12 border-[3px] border-ink-black overflow-hidden bg-primary-fixed-dim shadow-[2px_2px_0_0_#1E293B] shrink-0`,children:(0,k.jsx)(`img`,{alt:`Profile Avatar`,className:`w-full h-full object-cover`,src:`https://lh3.googleusercontent.com/aida-public/AB6AXuBl1MnAmh_W_EWibibrGw1F1YSenuKlaIn3JymUnBKn1nPLjAaOBjoLzdT5krzVDmihFhXOk-DEtNTdM2Js1_Ttr--5WZohhyqD1QfpS6j_yU1_-4wweOmgWq2HLUYNMf0mzQDNLNu5KbACEJKL5sm1YaTLPePlO687X3VHYsUhWTpUQeBwFjushaBpyW8tEa2dJj5ZSRWq0qa5GhtE0zAAW741e2SIRtFOp7CvBYEEetymSiucK513lli1TUwgWIgXvlfxZoGbH00q`})}),(0,k.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,k.jsx)(`div`,{className:`font-headline-md text-sm font-bold text-ink-black truncate`,children:n}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1 text-red-500 mt-1 select-none font-bold`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`local_fire_department`}),(0,k.jsxs)(`span`,{className:`font-arcade text-[7px]`,children:[r?.current_streak??0,` DAY STREAK`]})]})]})]}),(0,k.jsxs)(`button`,{onClick:()=>i(`queue`),className:`bg-grass-green text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`}),(0,k.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`DAILY`,(0,k.jsx)(`br`,{}),`QUEUE`]})]}),(0,k.jsxs)(`button`,{onClick:()=>i(`journey`),className:`bg-[#0ea5e9] text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`route`}),(0,k.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`JOURNEY`,(0,k.jsx)(`br`,{}),`PATH`]})]}),(0,k.jsxs)(`button`,{onClick:()=>i(`computer`),className:`bg-paper-white text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsx)(`img`,{alt:`My Computer`,className:`w-10 h-10 object-cover border-2 border-ink-black bg-white`,src:`https://lh3.googleusercontent.com/aida-public/AB6AXuD2tUGA2d7QiNyajDAWYK183zhNTgtAZpOXK3E9wRvHGs-t6ykWt9uPScYe_fziWzQI0pREcY_ThI341WvGMusyYmnAkagfuwx6wubIs1ES68DO8CCNAlcHcb2zOUU4MJeYuhWDy1uYRqyGYjIaDUqfgNWk2vm4WzwRqoorn2dxtZ6QdJhEKbXjG8fG9chkkvr68qJf0fLUL6bIqBXZg2FJ30S7zS3oZ4IZsug-wLyRYuJ4Gu_86snNUo1whNrBdZm5OMREfc9sLbwJ`}),(0,k.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:`MY COMP`})]}),(0,k.jsxs)(`button`,{onClick:()=>i(`terminal`),className:`bg-[#1e293b] text-[#39ff14] border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsx)(`img`,{alt:`Terminal`,className:`w-10 h-10 object-cover border-2 border-ink-black bg-white`,src:`https://lh3.googleusercontent.com/aida-public/AB6AXuA2AvcQ2oKWP8AJ8yR5nF82LLDEH1FKySUK-npnqEjvJ6Cs9xp8joCwH7x43oTCAC5xhO2rQdYzka3B6u72FNbdxMnsv3WJLye3bKochu8AnnRlS3szfYSaj724sYsiZo4n8G-oWqvl7C0rOGaDaU2nRH1xXmW2PBi6L2NryTsUaTCVZQKTKBBNNEOig5kh7B52e-iIuj2PTzaSjF9ebp6gMuCnBtJT8Sxo5Qsmvfm-t2U5r_qQpRiYj--Ut41T7NTh-tHgs4S4kBvz`}),(0,k.jsx)(`span`,{className:`font-arcade text-[8px] text-[#39ff14] font-bold tracking-tight uppercase leading-tight`,children:`TERMINAL`})]}),(0,k.jsxs)(`button`,{onClick:()=>i(`python`),className:`bg-[#9d4edd] text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,k.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`PYTHON`,(0,k.jsx)(`br`,{}),`PLAY`]})]}),(0,k.jsxs)(`button`,{onClick:()=>i(`mysql`),className:`bg-[#ffcc00] text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`database`}),(0,k.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`MYSQL`,(0,k.jsx)(`br`,{}),`PLAY`]})]}),(0,k.jsxs)(`button`,{onClick:()=>i(`companion`),className:`bg-[#f59e0b] hover:bg-amber-600 text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsx)(`img`,{alt:`Princess`,className:`w-10 h-10 object-cover object-top border-2 border-ink-black bg-amber-100 rounded`,src:`/sprites/princess/smiling_warmly.png`}),(0,k.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`PRINCESS`,(0,k.jsx)(`br`,{}),`TOWER`]})]}),(0,k.jsxs)(`button`,{onClick:()=>i(`settings`),className:`bg-[#10b981] hover:bg-emerald-600 text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`key`}),(0,k.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:`API CONFIG`})]}),(0,k.jsxs)(`button`,{onClick:a,className:`col-span-2 bg-[#ffe24c] hover:bg-yellow-300 text-ink-black border-[3px] border-ink-black p-4 flex items-center justify-between gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-3xl`,style:{fontVariationSettings:`'FILL' 1`},children:`cloud_sync`}),(0,k.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase`,children:`DRIVE NOTES SYNC`})]}),(0,k.jsx)(`span`,{className:`material-symbols-outlined text-lg`,children:`chevron_right`})]})]})]});function en({id:e,title:t,isOpen:n,isMinimized:r,onClose:i,onMinimize:a,activeWindow:o,setActiveWindow:s,children:c,icon:l=`terminal`,defaultWidth:u=`700px`,defaultHeight:d=`600px`,defaultX:f,defaultY:m,titleBarColor:h=`#0ea5e9`,isMobile:g=!1}){let _=e=>{let t=parseInt(e,10);return isNaN(t)?500:t},[v,y]=(0,p.useState)(()=>f===void 0&&m===void 0?{x:Math.floor(Math.random()*40)-20,y:Math.floor(Math.random()*40)-20}:{x:f??0,y:m??0}),[b,x]=(0,p.useState)({width:_(u),height:_(d)}),[S,ee]=(0,p.useState)(!1),[C,te]=(0,p.useState)(!1),[ne,re]=(0,p.useState)(!1),w=(0,p.useRef)({x:0,y:0}),ie=(0,p.useRef)({width:0,height:0,x:0,y:0}),ae=(0,p.useRef)(null),oe=o===e;return(0,p.useEffect)(()=>{let e=e=>{if(S){let t=e.clientX-w.current.x,n=e.clientY-w.current.y;y({x:t,y:n})}else if(C){let t=e.clientX-ie.current.x,n=e.clientY-ie.current.y,r=Math.max(350,ie.current.width+t),i=Math.max(250,ie.current.height+n);x({width:r,height:i})}},t=()=>{ee(!1),te(!1)};return(S||C)&&(document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t)),()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)}},[S,C,g]),!n||r?null:(0,k.jsxs)(`div`,{ref:ae,onMouseDown:()=>s(e),style:g?{zIndex:oe?40:30}:ne?{width:`100vw`,height:`calc(100vh - 56px)`,top:0,left:0,transform:`none`,zIndex:oe?40:30}:{width:`${b.width}px`,height:`${b.height}px`,transform:`translate(calc(-50% + ${v.x}px), calc(-50% + ${v.y}px))`,zIndex:oe?40:30},className:`absolute bg-paper-white border-[4px] flex flex-col overflow-hidden window-shadow transition-all ${g?`top-0 left-0 w-full h-[calc(100vh-56px)] max-w-none max-h-none border-t-0 border-x-0`:ne?`top-0 left-0 max-w-none max-h-none border-ink-black`:`top-1/2 left-1/2 max-w-[98vw] max-h-[90vh] border-ink-black`} ${oe?`border-ink-black shadow-[8px_8px_0px_0px_rgba(30,41,59,1)]`:`border-ink-black opacity-95 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)]`}`,children:[(0,k.jsxs)(`div`,{onMouseDown:t=>{if(g||ne||t.button!==0)return;let n=t.target;n.closest(`.window-control-btn`)||n.closest(`.window-resize-handle`)||(s(e),ee(!0),w.current={x:t.clientX-v.x,y:t.clientY-v.y},t.preventDefault())},style:{backgroundColor:h},className:`border-b-[4px] border-ink-black px-4 py-2 flex justify-between items-center text-white shrink-0 cursor-move select-none`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&(0,k.jsx)(`span`,{className:`material-symbols-outlined select-none`,style:{fontVariationSettings:`'FILL' 1`},children:l}),(0,k.jsx)(`span`,{className:`font-window-title text-sm md:text-base font-bold tracking-wide select-none`,children:t})]}),(0,k.jsxs)(`div`,{className:`flex gap-1.5`,children:[!g&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`button`,{onClick:e=>{e.stopPropagation(),a()},className:`window-control-btn w-7 h-7 bg-white text-ink-black border-[3px] border-ink-black flex items-center justify-center hover:bg-yellow-300 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,children:(0,k.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:`minimize`})}),(0,k.jsx)(`button`,{onClick:e=>{e.stopPropagation(),re(!ne)},className:`window-control-btn w-7 h-7 bg-white text-ink-black border-[3px] border-ink-black flex items-center justify-center hover:bg-yellow-300 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,children:(0,k.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:ne?`filter_none`:`crop_square`})})]}),(0,k.jsx)(`button`,{onClick:e=>{e.stopPropagation(),i()},className:`window-control-btn w-7 h-7 bg-highlight-pink text-white border-[3px] border-ink-black flex items-center justify-center hover:bg-rose-600 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,children:(0,k.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:`close`})})]})]}),(0,k.jsx)(`div`,{className:`flex-1 overflow-hidden relative bg-paper-white flex flex-col`,children:c}),!g&&!ne&&(0,k.jsx)(`div`,{onMouseDown:t=>{g||ne||t.button===0&&(t.stopPropagation(),t.preventDefault(),s(e),te(!0),ie.current={width:b.width,height:b.height,x:t.clientX,y:t.clientY})},className:`window-resize-handle absolute bottom-0 right-0 w-4 h-4 cursor-se-resize flex items-end justify-end p-0.5 select-none z-[50]`,children:(0,k.jsxs)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 10 10`,className:`text-ink-black opacity-60`,children:[(0,k.jsx)(`line`,{x1:`8`,y1:`2`,x2:`2`,y2:`8`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`line`,{x1:`8`,y1:`5`,x2:`5`,y2:`8`,stroke:`currentColor`,strokeWidth:`1.5`})]})})]})}var tn=`modulepreload`,nn=function(e){return`/`+e},rn={},an=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=nn(t,n),t=s(t),t in rn)return;rn[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:tn,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},on=(0,p.lazy)(()=>an(()=>import(`./ReviewQueue-DMWpFNwe.js`),__vite__mapDeps([0,1,2,3,4,5,6]))),sn=(0,p.lazy)(()=>an(()=>import(`./JourneyPath-BQEZfHUb.js`),__vite__mapDeps([7,1,4,5,3]))),cn=(0,p.lazy)(()=>an(()=>import(`./TerminalEmulator-C4E1edMP.js`),__vite__mapDeps([8,1]))),ln=(0,p.lazy)(()=>an(()=>import(`./PythonChallenge-DW7sVm2l.js`),__vite__mapDeps([9,1]))),un=(0,p.lazy)(()=>an(()=>import(`./MySQLPlayground-n_MnQGWR.js`),__vite__mapDeps([10,1]))),dn=(0,p.lazy)(()=>an(()=>import(`./FileExplorer-BA3lbKpy.js`),__vite__mapDeps([11,1]))),fn=(0,p.lazy)(()=>an(()=>import(`./Settings-CiPNPtHx.js`),__vite__mapDeps([12,1,5,3,6]))),pn=(0,p.lazy)(()=>an(()=>import(`./CreateProblemForm-tTF8KCdI.js`),__vite__mapDeps([13,1]))),mn=(0,p.lazy)(()=>an(()=>import(`./PrincessChamber-DVAuHg4W.js`).then(e=>e.t),__vite__mapDeps([2,1,3]))),hn=({windows:e,activeWindow:t,setActiveWindow:n,isMobile:r,openWindow:i,closeWindow:a,minimizeWindow:o,overrideProblemId:s,setOverrideProblemId:c,handleSelectProblemForReview:l,refreshExplorerTrigger:u,triggerRefreshExplorer:d,setIsOnboardingOpen:f,wallpaperUrl:m,setWallpaperUrl:h,syncing:g,syncResult:_,triggerSync:v})=>{let y=(0,p.useCallback)(()=>c(null),[c]),b=(0,p.useCallback)(()=>i(`journey`),[i]),x=(0,p.useCallback)(()=>i(`createProblem`),[i]),S=(0,p.useCallback)(()=>f(!0),[f]);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(en,{id:`queue`,title:`Daily Queue.exe`,icon:`terminal`,isOpen:e.queue.isOpen,isMinimized:e.queue.isMinimized,onClose:()=>a(`queue`),onMinimize:()=>o(`queue`),activeWindow:t,setActiveWindow:n,defaultWidth:`980px`,defaultHeight:`680px`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading ReviewQueue.exe...`}),children:(0,k.jsx)(on,{overrideProblemId:s,onClearOverride:y,onOpenWindow:i,onOpenJourney:b,onOpenCreateProblem:x,onOpenOnboarding:S,refreshTrigger:u})})}),(0,k.jsx)(en,{id:`journey`,title:`Journey_Path.exe`,icon:`route`,isOpen:e.journey.isOpen,isMinimized:e.journey.isMinimized,onClose:()=>a(`journey`),onMinimize:()=>o(`journey`),activeWindow:t,setActiveWindow:n,defaultWidth:`980px`,defaultHeight:`680px`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading JourneyPath.exe...`}),children:(0,k.jsx)(sn,{onSelectProblemForReview:l})})}),(0,k.jsx)(en,{id:`terminal`,title:`Arcade Terminal.com`,icon:`terminal`,isOpen:e.terminal.isOpen,isMinimized:e.terminal.isMinimized,onClose:()=>a(`terminal`),onMinimize:()=>o(`terminal`),activeWindow:t,setActiveWindow:n,defaultWidth:`640px`,defaultHeight:`450px`,titleBarColor:`#1e293b`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading Terminal.exe...`}),children:(0,k.jsx)(cn,{onOpenWindow:i,onClose:()=>a(`terminal`)})})}),(0,k.jsx)(en,{id:`sync`,title:`Drive_Sync.sys`,icon:`cloud_sync`,isOpen:e.sync.isOpen,isMinimized:e.sync.isMinimized,onClose:()=>a(`sync`),onMinimize:()=>o(`sync`),activeWindow:t,setActiveWindow:n,defaultWidth:`480px`,defaultHeight:`320px`,titleBarColor:`#855400`,isMobile:r,children:(0,k.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] p-6 flex flex-col justify-between`,children:[(0,k.jsxs)(`div`,{className:`space-y-4`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3 border-b-2 border-dashed border-ink-black pb-3`,children:[(0,k.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-[#855400] animate-bounce`,children:`cloud_sync`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h4`,{className:`font-arcade text-[10px] font-bold text-ink-black`,children:`DRIVE NOTES SYNCHRONIZATION`}),(0,k.jsx)(`span`,{className:`text-[8px] font-arcade text-trash-gray font-bold uppercase mt-1 block`,children:`Importing LeetCode sheets`})]})]}),g?(0,k.jsxs)(`div`,{className:`space-y-3 py-2`,children:[(0,k.jsx)(`span`,{className:`text-[9px] font-arcade text-ink-black font-bold block animate-pulse`,children:`SYNC PROCESS RUNNING...`}),(0,k.jsx)(`div`,{className:`w-full h-6 bg-white border-[3px] border-ink-black relative overflow-hidden select-none`,children:(0,k.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#ffe24c] border-r-2 border-ink-black w-[75%] animate-pulse`})}),(0,k.jsx)(`p`,{className:`text-[9px] font-sans text-trash-gray leading-normal font-semibold`,children:`Connecting to Supabase partition, requesting Google Drive manifest, indexing note items...`})]}):(0,k.jsx)(`div`,{className:`p-3 bg-white border-[3px] border-ink-black text-xs font-semibold text-ink-black leading-relaxed shadow-[2px_2px_0px_0px_#1E293B]`,children:_||`Idle. Ready to synchronize Leitner box data logs from Sheets drive storage.`})]}),(0,k.jsxs)(`div`,{className:`flex gap-3 justify-end pt-4 border-t border-slate-200`,children:[(0,k.jsx)(`button`,{onClick:()=>a(`sync`),className:`px-4 py-2 bg-white hover:bg-slate-100 text-ink-black border-[3px] border-ink-black font-bold text-xs shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`CLOSE`}),(0,k.jsx)(`button`,{onClick:v,disabled:g,className:`px-4 py-2 bg-[#ffcc00] hover:bg-yellow-300 text-ink-black border-[3px] border-ink-black font-bold text-xs shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none disabled:opacity-50 cursor-pointer`,children:g?`SYNCING...`:`SYNC NOW`})]})]})}),(0,k.jsx)(en,{id:`computer`,title:`File Explorer`,icon:`desktop_windows`,isOpen:e.computer.isOpen,isMinimized:e.computer.isMinimized,onClose:()=>a(`computer`),onMinimize:()=>o(`computer`),activeWindow:t,setActiveWindow:n,defaultWidth:`640px`,defaultHeight:`480px`,titleBarColor:`#006686`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading FileExplorer.exe...`}),children:(0,k.jsx)(dn,{onSetWallpaper:h,activeWallpaperUrl:m,onOpenCreateProblem:()=>i(`createProblem`),onOpenQueue:()=>i(`queue`),onOpenJourney:()=>i(`journey`),refreshTrigger:u})})}),e.createProblem?.isOpen&&(0,k.jsx)(en,{id:`createProblem`,title:`Create Problem`,icon:`note_add`,isOpen:e.createProblem.isOpen,isMinimized:e.createProblem.isMinimized,onClose:()=>a(`createProblem`),onMinimize:()=>o(`createProblem`),activeWindow:t,setActiveWindow:n,defaultWidth:`640px`,defaultHeight:`700px`,titleBarColor:`#a855f7`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading CreateForm.exe...`}),children:(0,k.jsx)(pn,{onClose:()=>a(`createProblem`),onSuccess:()=>{d(),i(`queue`)}})})}),(0,k.jsx)(en,{id:`python`,title:`Python Challenge`,icon:`sports_esports`,isOpen:e.python.isOpen,isMinimized:e.python.isMinimized,onClose:()=>a(`python`),onMinimize:()=>o(`python`),activeWindow:t,setActiveWindow:n,defaultWidth:`620px`,defaultHeight:`580px`,titleBarColor:`#9d4edd`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading PythonChallenge.exe...`}),children:(0,k.jsx)(ln,{})})}),(0,k.jsx)(en,{id:`mysql`,title:`MySQL Playground`,icon:`database`,isOpen:e.mysql.isOpen,isMinimized:e.mysql.isMinimized,onClose:()=>a(`mysql`),onMinimize:()=>o(`mysql`),activeWindow:t,setActiveWindow:n,defaultWidth:`660px`,defaultHeight:`580px`,titleBarColor:`#0ea5e9`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading MySQLPlayground.exe...`}),children:(0,k.jsx)(un,{})})}),(0,k.jsx)(en,{id:`settings`,title:`API Configuration`,icon:`key`,isOpen:e.settings?.isOpen,isMinimized:e.settings?.isMinimized,onClose:()=>a(`settings`),onMinimize:()=>o(`settings`),activeWindow:t,setActiveWindow:n,defaultWidth:`520px`,defaultHeight:`460px`,titleBarColor:`#10b981`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading APIConfig.exe...`}),children:(0,k.jsx)(fn,{})})}),e.companion?.isOpen&&(0,k.jsx)(en,{id:`companion`,title:`Princess Companion - Spire Tower Parlor`,icon:`castle`,isOpen:e.companion.isOpen,isMinimized:e.companion.isMinimized,onClose:()=>a(`companion`),onMinimize:()=>o(`companion`),activeWindow:t,setActiveWindow:n,defaultWidth:`840px`,defaultHeight:`600px`,titleBarColor:`#f59e0b`,isMobile:r,children:(0,k.jsx)(p.Suspense,{fallback:(0,k.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Entering the Spire Tower Chamber...`}),children:(0,k.jsx)(mn,{})})})]})};function gn(){let[e,t]=(0,p.useState)(null),[r,i]=(0,p.useState)(!0),[a,o]=(0,p.useState)(!1),[s,c]=(0,p.useState)(!1),l=(0,p.useRef)(null),[u,d]=(0,p.useState)({visible:!1,x:0,y:0}),{windows:f,activeWindow:m,setActiveWindow:h,overrideProblemId:g,setOverrideProblemId:_,refreshExplorerTrigger:v,openWindow:y,closeWindow:b,minimizeWindow:x,toggleWindowMinimize:S,handleSelectProblemForReview:ee,triggerRefreshExplorer:C,isAnyWindowOpen:te}=Gt((0,p.useCallback)(()=>c(!1),[])),{time:ne,streak:re,isMobile:w,isFullscreen:ie,toggleFullscreen:ae,syncing:oe,syncResult:se,triggerSync:ce}=Kt(e,()=>y(`sync`)),{wallpaperUrl:le,setWallpaperUrl:ue,handleWallpaperChange:T}=Jt(),{companionDialogueEvent:E,setCompanionDialogueEvent:de}=Yt(e,y);(0,p.useEffect)(()=>{n.auth.getSession().then(({data:{session:e}})=>{t(e?.user??null),i(!1)});let{data:{subscription:e}}=n.auth.onAuthStateChange((e,n)=>{t(n?.user??null),i(!1)});return()=>{e.unsubscribe()}},[]),(0,p.useEffect)(()=>{if(!r){let e=document.getElementById(`app-loader`);e&&e.remove()}},[r]),(0,p.useEffect)(()=>{if(!r&&e){let t=e.id,n=t===`sandbox-user-id`||!t?`sandbox`:t;if(!localStorage.getItem(`algospaced_onboarding_done_${n}`)){let e=setTimeout(()=>{o(!0)},0);return()=>clearTimeout(e)}}},[r,e]);let fe=e=>{let t=e.target;t.closest(`.window-shadow`)||t.closest(`button`)||t.closest(`input`)||t.closest(`textarea`)||t.closest(`details`)||t.closest(`#start-menu`)||(e.preventDefault(),d({visible:!0,x:e.clientX,y:e.clientY}))},pe=()=>{u.visible&&d(e=>({...e,visible:!1}))},me=()=>{pe(),ae()},D=async()=>{c(!1),await n.auth.signOut()},O=e?.email?e.email.split(`@`)[0]:`Player_One`,he=(0,p.useMemo)(()=>[{id:`queue`,label:(0,k.jsxs)(k.Fragment,{children:[`DAILY`,(0,k.jsx)(`br`,{}),`QUEUE`]}),icon:`view_list`,badgeShadowColor:`#fde047`,action:()=>y(`queue`)},{id:`journey`,label:(0,k.jsxs)(k.Fragment,{children:[`JOURNEY`,(0,k.jsx)(`br`,{}),`PATH`]}),icon:`route`,badgeShadowColor:`#fde047`,action:()=>y(`journey`)},{id:`sync`,label:(0,k.jsxs)(k.Fragment,{children:[`DRIVE`,(0,k.jsx)(`br`,{}),`SYNC`]}),icon:`cloud_sync`,badgeShadowColor:`#fde047`,action:ce},{id:`computer`,label:(0,k.jsxs)(k.Fragment,{children:[`MY`,(0,k.jsx)(`br`,{}),`COMP`]}),iconImg:`https://lh3.googleusercontent.com/aida-public/AB6AXuD2tUGA2d7QiNyajDAWYK183zhNTgtAZpOXK3E9wRvHGs-t6ykWt9uPScYe_fziWzQI0pREcY_ThI341WvGMusyYmnAkagfuwx6wubIs1ES68DO8CCNAlcHcb2zOUU4MJeYuhWDy1uYRqyGYjIaDUqfgNWk2vm4WzwRqoorn2dxtZ6QdJhEKbXjG8fG9chkkvr68qJf0fLUL6bIqBXZg2FJ30S7zS3oZ4IZsug-wLyRYuJ4Gu_86snNUo1whNrBdZm5OMREfc9sLbwJ`,badgeShadowColor:`#fde047`,action:()=>y(`computer`)},{id:`terminal`,label:`TERMINAL`,iconImg:`https://lh3.googleusercontent.com/aida-public/AB6AXuA2AvcQ2oKWP8AJ8yR5nF82LLDEH1FKySUK-npnqEjvJ6Cs9xp8joCwH7x43oTCAC5xhO2rQdYzka3B6u72FNbdxMnsv3WJLye3bKochu8AnnRlS3szfYSaj724sYsiZo4n8G-oWqvl7C0rOGaDaU2nRH1xXmW2PBi6L2NryTsUaTCVZQKTKBBNNEOig5kh7B52e-iIuj2PTzaSjF9ebp6gMuCnBtJT8Sxo5Qsmvfm-t2U5r_qQpRiYj--Ut41T7NTh-tHgs4S4kBvz`,badgeShadowColor:`#fde047`,action:()=>y(`terminal`)},{id:`python`,label:(0,k.jsxs)(k.Fragment,{children:[`PYTHON`,(0,k.jsx)(`br`,{}),`CHALLENGE`]}),icon:`sports_esports`,badgeShadowColor:`#4cc9f0`,action:()=>y(`python`)},{id:`mysql`,label:(0,k.jsxs)(k.Fragment,{children:[`MYSQL`,(0,k.jsx)(`br`,{}),`PLAYGROUND`]}),icon:`database`,badgeShadowColor:`#f72585`,action:()=>y(`mysql`)},{id:`companion`,label:(0,k.jsxs)(k.Fragment,{children:[`PRINCESS`,(0,k.jsx)(`br`,{}),`TOWER`]}),iconImg:`/sprites/princess/smiling_warmly.png`,badgeShadowColor:`#fde047`,action:()=>y(`companion`)},{id:`settings`,label:(0,k.jsx)(k.Fragment,{children:`API CONFIG`}),icon:`key`,badgeShadowColor:`#10b981`,action:()=>y(`settings`)}],[y,ce]);return r?null:e?(0,k.jsxs)(`div`,{onContextMenu:fe,onClick:pe,className:`w-screen h-screen m-0 p-0 relative font-sans text-ink-black overflow-hidden select-none`,children:[(0,k.jsx)(`div`,{className:`absolute inset-0 w-full h-full bg-cover bg-center z-[-1] saturate-150 contrast-125 transition-all duration-300`,style:{backgroundImage:`url('${le}')`}}),!w&&(0,k.jsx)(Ae,{ref:l,icons:he,isMobile:w,onContextMenu:fe}),(0,k.jsx)(Xt,{isMobile:w,username:O,streak:re}),(0,k.jsx)($t,{isMobile:w,isAnyWindowOpen:te,username:O,streak:re,onToggleWindow:S,onTriggerSync:ce}),(0,k.jsx)(hn,{windows:f,activeWindow:m,setActiveWindow:h,isMobile:w,openWindow:y,closeWindow:b,minimizeWindow:x,overrideProblemId:g,setOverrideProblemId:_,handleSelectProblemForReview:ee,refreshExplorerTrigger:v,triggerRefreshExplorer:C,setIsOnboardingOpen:o,wallpaperUrl:le,setWallpaperUrl:ue,syncing:oe,syncResult:se,triggerSync:ce}),(0,k.jsx)(Zt,{isOpen:s,onOpenWindow:y,onOpenOnboarding:()=>{c(!1),o(!0)},onTriggerSync:ce,onSignOut:D}),(0,k.jsx)(Qt,{isStartOpen:s,onToggleStart:()=>c(e=>!e),onCloseStart:()=>c(!1),isMobile:w,windows:f,activeWindow:m,onToggleWindow:S,time:ne}),(0,k.jsx)(Tt,{event:E,onClose:()=>de(null),onOpenCompanionWindow:()=>y(`companion`)}),(0,k.jsx)(dt,{onOpenCompanionWindow:()=>y(`companion`)}),(0,k.jsx)(Ut,{isOpen:a,onClose:()=>o(!1),onCompleted:C,userId:e?.id||`sandbox`}),(0,k.jsx)(je,{isOpen:u.visible,x:u.x,y:u.y,onClose:pe,onAutoArrange:()=>l.current?.autoArrange(),onResetLayout:()=>l.current?.resetLayout(),onChangeWallpaper:()=>document.getElementById(`wallpaper-input`)?.click(),onOpenWindow:y,onTriggerSync:ce,onToggleFullscreen:me,isFullscreen:ie}),(0,k.jsx)(`input`,{type:`file`,id:`wallpaper-input`,accept:`image/*`,onChange:e=>T(e,pe),className:`hidden`})]}):(0,k.jsx)(be,{})}var _n=window.fetch;window.fetch=async(e,t)=>{let n=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`),r=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;if(r&&r!=="default"&&n&&n.trim()){let i=typeof e==`string`?e:`url`in e?e.url:e.toString();if(i&&i.includes(`/api/`)){let i=t?{...t}:{},a=new Headers(i.headers||{});return a.set(`X-Custom-API-Key`,n.trim()),a.set(`X-Gemini-API-Key`,n.trim()),a.set(`X-AI-Provider`,r),i.headers=a,_n(e,i)}}return _n(e,t)};async function vn(){try{let e=await fetch(`/api/config`);if(!e.ok)throw Error(`Failed to load runtime configuration`);let t=await e.json();a(t)}catch(e){console.warn(`Failed to load runtime config from API, falling back to build environment:`,e),a({apiKey:`AIzaSyAdIkWuL0yqiL1jMT7H7Eq0Tc6oyDGaIcc`,authDomain:`algospaced-dsa.firebaseapp.com`,projectId:`algospaced-dsa`,storageBucket:`algospaced-dsa.firebasestorage.app`,messagingSenderId:`1039270308844`,appId:`1:1039270308844:web:6499e8813a9f7926f7aec9`,measurementId:`G-K33PLR1N8E`})}(0,m.createRoot)(document.getElementById(`root`)).render((0,k.jsx)(p.StrictMode,{children:(0,k.jsx)(gn,{})}))}vn();export{T as A,ve as C,me as D,D as E,ae as F,ie as I,w as L,ce as M,se as N,pe as O,oe as P,re as R,ye as S,ge as T,rt as _,Rt as a,Pe as b,Pt as c,xt as d,vt as f,st as g,ct as h,Bt as i,le as j,fe as k,_t as l,ot as m,Lt as n,jt as o,M as p,zt as r,At as s,Ut as t,yt as u,tt as v,_e as w,Ne as x,nt as y,C as z}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/index-YaUnCfgP.css b/algospaced-ui/dist/assets/index-YaUnCfgP.css new file mode 100644 index 0000000000000000000000000000000000000000..f9d94c02f6dca6c54825e32cad81a0e8feac0b8a --- /dev/null +++ b/algospaced-ui/dist/assets/index-YaUnCfgP.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Be Vietnam Pro", system-ui, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:"Courier Prime", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-900:oklch(39.8% .07 227.392);--color-cyan-950:oklch(30.2% .056 229.695);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-indigo-950:oklch(25.7% .09 281.288);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-purple-950:oklch(29.1% .149 302.717);--color-pink-400:oklch(71.8% .202 349.761);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-rose-950:oklch(27.1% .105 12.094);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-800:oklch(26.8% .007 34.298);--color-stone-900:oklch(21.6% .006 56.043);--color-stone-950:oklch(14.7% .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--drop-shadow-sm:0 1px 2px #00000026;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-arcade:"Press Start 2P", monospace;--font-headline-md:"Bricolage Grotesque", sans-serif;--font-display-lg:"Bricolage Grotesque", sans-serif;--font-code-mono:"Courier Prime", monospace;--font-window-title:"Bricolage Grotesque", sans-serif;--font-icon-label:"Press Start 2P", monospace;--color-paper-white:#f9f8f3;--color-ink-black:#1e293b;--color-highlight-pink:#f472b6;--color-grass-green:#4ade80;--color-trash-gray:#64748b;--color-primary-purple:#9d4edd;--color-accent-cyan:#4cc9f0;--color-accent-pink:#f72585;--spacing-desktop-margin:32px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-2{inset:calc(var(--spacing) * -2)}.-inset-10{inset:calc(var(--spacing) * -10)}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-2{top:calc(var(--spacing) * -2)}.-top-2\.5{top:calc(var(--spacing) * -2.5)}.-top-3{top:calc(var(--spacing) * -3)}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-4{top:calc(var(--spacing) * 4)}.top-16{top:calc(var(--spacing) * 16)}.top-desktop-margin{top:var(--spacing-desktop-margin)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.right-desktop-margin{right:var(--spacing-desktop-margin)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.bottom-0{bottom:0}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-2\.5{bottom:calc(var(--spacing) * 2.5)}.bottom-14{bottom:calc(var(--spacing) * 14)}.bottom-16{bottom:calc(var(--spacing) * 16)}.-left-\[7px\]{left:-7px}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.isolate{isolation:isolate}.-z-10{z-index:calc(10 * -1)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[10\]{z-index:10}.z-\[50\]{z-index:50}.z-\[60\]{z-index:60}.z-\[100\]{z-index:100}.z-\[120\]{z-index:120}.z-\[999\]{z-index:999}.z-\[9990\]{z-index:9990}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-6{grid-column:span 6/span 6}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.container\!{width:100%!important}@media (width>=40rem){.container\!{max-width:40rem!important}}@media (width>=48rem){.container\!{max-width:48rem!important}}@media (width>=64rem){.container\!{max-width:64rem!important}}@media (width>=80rem){.container\!{max-width:80rem!important}}@media (width>=96rem){.container\!{max-width:96rem!important}}.m-0{margin:0}.m-2{margin:calc(var(--spacing) * 2)}.-mx-0{margin-inline:0}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-8{margin-block:calc(var(--spacing) * 8)}.my-auto{margin-block:auto}.-mt-1\.5{margin-top:calc(var(--spacing) * -1.5)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-\[2px\]{margin-bottom:-2px}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-1{width:var(--spacing);height:var(--spacing)}.h-0{height:0}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-40{height:calc(var(--spacing) * 40)}.h-44{height:calc(var(--spacing) * 44)}.h-84{height:calc(var(--spacing) * 84)}.h-120{height:calc(var(--spacing) * 120)}.h-\[2px\]{height:2px}.h-\[80\%\]{height:80%}.h-\[85\%\]{height:85%}.h-\[90\%\]{height:90%}.h-\[calc\(100vh-56px\)\]{height:calc(100vh - 56px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-16{max-height:calc(var(--spacing) * 16)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[90vh\]{max-height:90vh}.max-h-\[92vh\]{max-height:92vh}.max-h-\[100dvh\]{max-height:100dvh}.max-h-\[140px\]{max-height:140px}.max-h-\[180px\]{max-height:180px}.max-h-\[520px\]{max-height:520px}.max-h-\[560px\]{max-height:560px}.max-h-\[calc\(100vh-180px\)\]{max-height:calc(100vh - 180px)}.max-h-none{max-height:none}.min-h-0{min-height:0}.min-h-\[1\.2em\]{min-height:1.2em}.min-h-\[60px\]{min-height:60px}.min-h-\[64px\]{min-height:64px}.min-h-\[85px\]{min-height:85px}.min-h-\[90px\]{min-height:90px}.min-h-\[120px\]{min-height:120px}.min-h-\[220px\]{min-height:220px}.min-h-\[260px\]{min-height:260px}.w-0{width:0}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-2\/3{width:66.6667%}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-36{width:calc(var(--spacing) * 36)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\[75\%\]{width:75%}.w-\[80\%\]{width:80%}.w-\[90\%\]{width:90%}.w-\[96px\]{width:96px}.w-\[calc\(100\%-1\.25rem\)\]{width:calc(100% - 1.25rem)}.w-\[calc\(100vw-24px\)\]{width:calc(100vw - 24px)}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[90\%\]{max-width:90%}.max-w-\[98vw\]{max-width:98vw}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[400px\]{max-width:400px}.max-w-\[480px\]{max-width:480px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-\[54px\]{min-width:54px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\[2\]{flex:2}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[2px\]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.rotate-\[-3deg\]{rotate:-3deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-se-resize{cursor:se-resize}.cursor-wait{cursor:wait}.resize{resize:both}.resize\!{resize:both!important}.resize-none{resize:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-slate-200>:not(:last-child)){border-color:var(--color-slate-200)}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2\.5px\]{border-style:var(--tw-border-style);border-width:2.5px}.border-\[2px\]{border-style:var(--tw-border-style);border-width:2px}.border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.border-\[4px\]{border-style:var(--tw-border-style);border-width:4px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-x-2{border-inline-style:var(--tw-border-style);border-inline-width:2px}.border-x-6{border-inline-style:var(--tw-border-style);border-inline-width:6px}.border-x-8{border-inline-style:var(--tw-border-style);border-inline-width:8px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-\[3px\]{border-top-style:var(--tw-border-style);border-top-width:3px}.border-t-\[4px\]{border-top-style:var(--tw-border-style);border-top-width:4px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-r-\[3px\]{border-right-style:var(--tw-border-style);border-right-width:3px}.border-r-\[4px\]{border-right-style:var(--tw-border-style);border-right-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-6{border-bottom-style:var(--tw-border-style);border-bottom-width:6px}.border-b-8{border-bottom-style:var(--tw-border-style);border-bottom-width:8px}.border-b-\[2px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-\[3px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:3px}.border-b-\[4px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-l-\[2px\]{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-\[4px\]{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\[\#0ea5e9\]{border-color:#0ea5e9}.border-\[\#4a392b\]{border-color:#4a392b}.border-\[\#5a4836\]{border-color:#5a4836}.border-\[\#594634\]{border-color:#594634}.border-\[\#c8b28f\]{border-color:#c8b28f}.border-\[\#cbb38e\]{border-color:#cbb38e}.border-\[\#cfbc9c\]{border-color:#cfbc9c}.border-\[\#ea580c\]{border-color:#ea580c}.border-amber-100{border-color:var(--color-amber-100)}.border-amber-100\/80{border-color:#fef3c6cc}@supports (color:color-mix(in lab, red, red)){.border-amber-100\/80{border-color:color-mix(in oklab, var(--color-amber-100) 80%, transparent)}}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-200\/60{border-color:#fee68599}@supports (color:color-mix(in lab, red, red)){.border-amber-200\/60{border-color:color-mix(in oklab, var(--color-amber-200) 60%, transparent)}}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/40{border-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/50{border-color:color-mix(in oklab, var(--color-amber-500) 50%, transparent)}}.border-amber-500\/80{border-color:#f99c00cc}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/80{border-color:color-mix(in oklab, var(--color-amber-500) 80%, transparent)}}.border-amber-600{border-color:var(--color-amber-600)}.border-amber-600\/30{border-color:#dd74004d}@supports (color:color-mix(in lab, red, red)){.border-amber-600\/30{border-color:color-mix(in oklab, var(--color-amber-600) 30%, transparent)}}.border-amber-600\/70{border-color:#dd7400b3}@supports (color:color-mix(in lab, red, red)){.border-amber-600\/70{border-color:color-mix(in oklab, var(--color-amber-600) 70%, transparent)}}.border-amber-700{border-color:var(--color-amber-700)}.border-amber-700\/30{border-color:#b750004d}@supports (color:color-mix(in lab, red, red)){.border-amber-700\/30{border-color:color-mix(in oklab, var(--color-amber-700) 30%, transparent)}}.border-amber-800{border-color:var(--color-amber-800)}.border-amber-800\/20{border-color:#953d0033}@supports (color:color-mix(in lab, red, red)){.border-amber-800\/20{border-color:color-mix(in oklab, var(--color-amber-800) 20%, transparent)}}.border-amber-900\/10{border-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/10{border-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.border-amber-900\/15{border-color:#7b330626}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/15{border-color:color-mix(in oklab, var(--color-amber-900) 15%, transparent)}}.border-amber-900\/20{border-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/20{border-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.border-amber-900\/30{border-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/30{border-color:color-mix(in oklab, var(--color-amber-900) 30%, transparent)}}.border-amber-900\/40{border-color:#7b330666}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/40{border-color:color-mix(in oklab, var(--color-amber-900) 40%, transparent)}}.border-amber-900\/50{border-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/50{border-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.border-black\/10{border-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.border-black\/10{border-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.border-black\/20{border-color:#0003}@supports (color:color-mix(in lab, red, red)){.border-black\/20{border-color:color-mix(in oklab, var(--color-black) 20%, transparent)}}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-cyan-400{border-color:var(--color-cyan-400)}.border-cyan-500\/40{border-color:#00b7d766}@supports (color:color-mix(in lab, red, red)){.border-cyan-500\/40{border-color:color-mix(in oklab, var(--color-cyan-500) 40%, transparent)}}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-400{border-color:var(--color-emerald-400)}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/40{border-color:color-mix(in oklab, var(--color-emerald-500) 40%, transparent)}}.border-emerald-600{border-color:var(--color-emerald-600)}.border-emerald-600\/30{border-color:#0097674d}@supports (color:color-mix(in lab, red, red)){.border-emerald-600\/30{border-color:color-mix(in oklab, var(--color-emerald-600) 30%, transparent)}}.border-emerald-800{border-color:var(--color-emerald-800)}.border-green-500{border-color:var(--color-green-500)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-ink-black{border-color:var(--color-ink-black)}.border-ink-black\/20{border-color:#1e293b33}@supports (color:color-mix(in lab, red, red)){.border-ink-black\/20{border-color:color-mix(in oklab, var(--color-ink-black) 20%, transparent)}}.border-orange-300{border-color:var(--color-orange-300)}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-purple-400{border-color:var(--color-purple-400)}.border-purple-800{border-color:var(--color-purple-800)}.border-purple-800\/40{border-color:#6e11b066}@supports (color:color-mix(in lab, red, red)){.border-purple-800\/40{border-color:color-mix(in oklab, var(--color-purple-800) 40%, transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-rose-300{border-color:var(--color-rose-300)}.border-rose-400{border-color:var(--color-rose-400)}.border-rose-500{border-color:var(--color-rose-500)}.border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab, red, red)){.border-rose-500\/30{border-color:color-mix(in oklab, var(--color-rose-500) 30%, transparent)}}.border-rose-500\/40{border-color:#ff235766}@supports (color:color-mix(in lab, red, red)){.border-rose-500\/40{border-color:color-mix(in oklab, var(--color-rose-500) 40%, transparent)}}.border-rose-600{border-color:var(--color-rose-600)}.border-rose-600\/30{border-color:#e700444d}@supports (color:color-mix(in lab, red, red)){.border-rose-600\/30{border-color:color-mix(in oklab, var(--color-rose-600) 30%, transparent)}}.border-sky-400{border-color:var(--color-sky-400)}.border-sky-500\/40{border-color:#00a5ef66}@supports (color:color-mix(in lab, red, red)){.border-sky-500\/40{border-color:color-mix(in oklab, var(--color-sky-500) 40%, transparent)}}.border-sky-600{border-color:var(--color-sky-600)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-800{border-color:var(--color-slate-800)}.border-slate-900{border-color:var(--color-slate-900)}.border-slate-900\/60{border-color:#0f172b99}@supports (color:color-mix(in lab, red, red)){.border-slate-900\/60{border-color:color-mix(in oklab, var(--color-slate-900) 60%, transparent)}}.border-stone-300{border-color:var(--color-stone-300)}.border-stone-400{border-color:var(--color-stone-400)}.border-stone-600{border-color:var(--color-stone-600)}.border-stone-700{border-color:var(--color-stone-700)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-400{border-color:var(--color-yellow-400)}.border-x-transparent{border-inline-color:#0000}.border-b-\[\#FFFDF0\]{border-bottom-color:#fffdf0}.border-b-ink-black{border-bottom-color:var(--color-ink-black)}.border-b-paper-white{border-bottom-color:var(--color-paper-white)}.border-b-white{border-bottom-color:var(--color-white)}.bg-\[\#0ea5e9\]{background-color:#0ea5e9}.bg-\[\#1E293B\]{background-color:#1e293b}.bg-\[\#1a1612\]\/90{background-color:oklab(20.3473% .00389921 .00928028/.9)}.bg-\[\#1c1813\]{background-color:#1c1813}.bg-\[\#1c1813\]\/95{background-color:oklab(21.1924% .00328737 .0109585/.95)}.bg-\[\#1e293b\]{background-color:#1e293b}.bg-\[\#1e1914\]\/60{background-color:oklab(21.7534% .00480779 .0113813/.6)}.bg-\[\#1f1a14\]\/90{background-color:oklab(22.1543% .00422043 .01306/.9)}.bg-\[\#2c2217\]{background-color:#2c2217}.bg-\[\#2d251d\]{background-color:#2d251d}.bg-\[\#4ADE80\],.bg-\[\#4ade80\]{background-color:#4ade80}.bg-\[\#9d4edd\]{background-color:#9d4edd}.bg-\[\#10b981\]{background-color:#10b981}.bg-\[\#39ff14\]{background-color:#39ff14}.bg-\[\#60a5fa\]{background-color:#60a5fa}.bg-\[\#231e18\]{background-color:#231e18}.bg-\[\#0284c7\]{background-color:#0284c7}.bg-\[\#252019\]{background-color:#252019}.bg-\[\#FFE24C\]{background-color:#ffe24c}.bg-\[\#FFF9E6\]{background-color:#fff9e6}.bg-\[\#FFFDF0\]{background-color:#fffdf0}.bg-\[\#a7f3d0\]{background-color:#a7f3d0}.bg-\[\#d9d9d9\]{background-color:#d9d9d9}.bg-\[\#dbeafe\]{background-color:#dbeafe}.bg-\[\#ea580c\]{background-color:#ea580c}.bg-\[\#f0e6c8\]{background-color:#f0e6c8}.bg-\[\#f0fdf4\]{background-color:#f0fdf4}.bg-\[\#f4f1ea\]{background-color:#f4f1ea}.bg-\[\#f6edd2\]{background-color:#f6edd2}.bg-\[\#f7efe0\]{background-color:#f7efe0}.bg-\[\#f7efe0\]\/90{background-color:oklab(95.4339% .00254038 .0215065/.9)}.bg-\[\#f7efe0\]\/95{background-color:oklab(95.4339% .00254038 .0215065/.95)}.bg-\[\#f7f5ed\]{background-color:#f7f5ed}.bg-\[\#f8f5eb\]{background-color:#f8f5eb}.bg-\[\#f8fafc\]{background-color:#f8fafc}.bg-\[\#f9f2e3\]\/80{background-color:oklab(96.2559% .00149918 .0211427/.8)}.bg-\[\#f59e0b\]{background-color:#f59e0b}.bg-\[\#facc15\]{background-color:#facc15}.bg-\[\#fbf5e8\]\/98{background-color:oklab(97.1282% .00123182 .0182835/.98)}.bg-\[\#fcf7ee\]{background-color:#fcf7ee}.bg-\[\#fcf8ef\]\/95{background-color:oklab(97.9749% .000698805 .0126095/.95)}.bg-\[\#fdf8e1\]{background-color:#fdf8e1}.bg-\[\#fdfbf7\]{background-color:#fdfbf7}.bg-\[\#fefce8\]{background-color:#fefce8}.bg-\[\#ff4d4d\]{background-color:#ff4d4d}.bg-\[\#ff9933\]{background-color:#f93}.bg-\[\#ffcc00\]{background-color:#fc0}.bg-\[\#ffe24c\]{background-color:#ffe24c}.bg-\[\#ffedd5\]{background-color:#ffedd5}.bg-\[\#fff1f2\]{background-color:#fff1f2}.bg-\[\#fffaf0\]{background-color:#fffaf0}.bg-\[\#fffdfa\]{background-color:#fffdfa}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\/40{background-color:#fffbeb66}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/40{background-color:color-mix(in oklab, var(--color-amber-50) 40%, transparent)}}.bg-amber-50\/60{background-color:#fffbeb99}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/60{background-color:color-mix(in oklab, var(--color-amber-50) 60%, transparent)}}.bg-amber-50\/70{background-color:#fffbebb3}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/70{background-color:color-mix(in oklab, var(--color-amber-50) 70%, transparent)}}.bg-amber-50\/80{background-color:#fffbebcc}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/80{background-color:color-mix(in oklab, var(--color-amber-50) 80%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\/70{background-color:#fef3c6b3}@supports (color:color-mix(in lab, red, red)){.bg-amber-100\/70{background-color:color-mix(in oklab, var(--color-amber-100) 70%, transparent)}}.bg-amber-200{background-color:var(--color-amber-200)}.bg-amber-200\/60{background-color:#fee68599}@supports (color:color-mix(in lab, red, red)){.bg-amber-200\/60{background-color:color-mix(in oklab, var(--color-amber-200) 60%, transparent)}}.bg-amber-300{background-color:var(--color-amber-300)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/20{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-amber-600\/15{background-color:#dd740026}@supports (color:color-mix(in lab, red, red)){.bg-amber-600\/15{background-color:color-mix(in oklab, var(--color-amber-600) 15%, transparent)}}.bg-amber-600\/20{background-color:#dd740033}@supports (color:color-mix(in lab, red, red)){.bg-amber-600\/20{background-color:color-mix(in oklab, var(--color-amber-600) 20%, transparent)}}.bg-amber-700\/10{background-color:#b750001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-700\/10{background-color:color-mix(in oklab, var(--color-amber-700) 10%, transparent)}}.bg-amber-900\/5{background-color:#7b33060d}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/5{background-color:color-mix(in oklab, var(--color-amber-900) 5%, transparent)}}.bg-amber-900\/10{background-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/10{background-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.bg-amber-950\/5{background-color:#4619010d}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/5{background-color:color-mix(in oklab, var(--color-amber-950) 5%, transparent)}}.bg-amber-950\/10{background-color:#4619011a}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/10{background-color:color-mix(in oklab, var(--color-amber-950) 10%, transparent)}}.bg-amber-950\/80{background-color:#461901cc}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/80{background-color:color-mix(in oklab, var(--color-amber-950) 80%, transparent)}}.bg-amber-950\/90{background-color:#461901e6}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/90{background-color:color-mix(in oklab, var(--color-amber-950) 90%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab, red, red)){.bg-black\/20{background-color:color-mix(in oklab, var(--color-black) 20%, transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab, red, red)){.bg-black\/70{background-color:color-mix(in oklab, var(--color-black) 70%, transparent)}}.bg-black\/75{background-color:#000000bf}@supports (color:color-mix(in lab, red, red)){.bg-black\/75{background-color:color-mix(in oklab, var(--color-black) 75%, transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-950\/80{background-color:#053345cc}@supports (color:color-mix(in lab, red, red)){.bg-cyan-950\/80{background-color:color-mix(in oklab, var(--color-cyan-950) 80%, transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-100\/70{background-color:#d0fae5b3}@supports (color:color-mix(in lab, red, red)){.bg-emerald-100\/70{background-color:color-mix(in oklab, var(--color-emerald-100) 70%, transparent)}}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/20{background-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-600\/10{background-color:#0097671a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\/10{background-color:color-mix(in oklab, var(--color-emerald-600) 10%, transparent)}}.bg-emerald-600\/15{background-color:#00976726}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\/15{background-color:color-mix(in oklab, var(--color-emerald-600) 15%, transparent)}}.bg-emerald-950\/80{background-color:#002c22cc}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\/80{background-color:color-mix(in oklab, var(--color-emerald-950) 80%, transparent)}}.bg-emerald-950\/90{background-color:#002c22e6}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\/90{background-color:color-mix(in oklab, var(--color-emerald-950) 90%, transparent)}}.bg-grass-green{background-color:var(--color-grass-green)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-500{background-color:var(--color-green-500)}.bg-highlight-pink{background-color:var(--color-highlight-pink)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-50\/50{background-color:#eef2ff80}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\/50{background-color:color-mix(in oklab, var(--color-indigo-50) 50%, transparent)}}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-700{background-color:var(--color-indigo-700)}.bg-ink-black{background-color:var(--color-ink-black)}.bg-ink-black\/20{background-color:#1e293b33}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/20{background-color:color-mix(in oklab, var(--color-ink-black) 20%, transparent)}}.bg-ink-black\/40{background-color:#1e293b66}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/40{background-color:color-mix(in oklab, var(--color-ink-black) 40%, transparent)}}.bg-ink-black\/50{background-color:#1e293b80}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/50{background-color:color-mix(in oklab, var(--color-ink-black) 50%, transparent)}}.bg-ink-black\/80{background-color:#1e293bcc}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/80{background-color:color-mix(in oklab, var(--color-ink-black) 80%, transparent)}}.bg-ink-black\/85{background-color:#1e293bd9}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/85{background-color:color-mix(in oklab, var(--color-ink-black) 85%, transparent)}}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\/10{background-color:color-mix(in oklab, var(--color-orange-500) 10%, transparent)}}.bg-paper-white{background-color:var(--color-paper-white)}.bg-primary-purple{background-color:var(--color-primary-purple)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-200{background-color:var(--color-purple-200)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-purple-950\/30{background-color:#3c03664d}@supports (color:color-mix(in lab, red, red)){.bg-purple-950\/30{background-color:color-mix(in oklab, var(--color-purple-950) 30%, transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-300{background-color:var(--color-rose-300)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-500\/5{background-color:#ff23570d}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/5{background-color:color-mix(in oklab, var(--color-rose-500) 5%, transparent)}}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/10{background-color:color-mix(in oklab, var(--color-rose-500) 10%, transparent)}}.bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/15{background-color:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.bg-rose-600{background-color:var(--color-rose-600)}.bg-rose-600\/10{background-color:#e700441a}@supports (color:color-mix(in lab, red, red)){.bg-rose-600\/10{background-color:color-mix(in oklab, var(--color-rose-600) 10%, transparent)}}.bg-rose-950\/90{background-color:#4d0218e6}@supports (color:color-mix(in lab, red, red)){.bg-rose-950\/90{background-color:color-mix(in oklab, var(--color-rose-950) 90%, transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-950\/80{background-color:#052f4acc}@supports (color:color-mix(in lab, red, red)){.bg-sky-950\/80{background-color:color-mix(in oklab, var(--color-sky-950) 80%, transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab, red, red)){.bg-slate-50\/50{background-color:color-mix(in oklab, var(--color-slate-50) 50%, transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-stone-100{background-color:var(--color-stone-100)}.bg-stone-200{background-color:var(--color-stone-200)}.bg-stone-800{background-color:var(--color-stone-800)}.bg-stone-900{background-color:var(--color-stone-900)}.bg-stone-950{background-color:var(--color-stone-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.bg-white\/80{background-color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.bg-white\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab, red, red)){.bg-white\/85{background-color:color-mix(in oklab, var(--color-white) 85%, transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-white\/95{background-color:#fffffff2}@supports (color:color-mix(in lab, red, red)){.bg-white\/95{background-color:color-mix(in oklab, var(--color-white) 95%, transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-200{background-color:var(--color-yellow-200)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\[\#F0F9FF\]{--tw-gradient-from:#f0f9ff;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#F0FDF4\]{--tw-gradient-from:#f0fdf4;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#F8FAFC\]{--tw-gradient-from:#f8fafc;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FAF5FF\]{--tw-gradient-from:#faf5ff;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FFFBEB\]{--tw-gradient-from:#fffbeb;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FFFDF0\]{--tw-gradient-from:#fffdf0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-50{--tw-gradient-from:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-100{--tw-gradient-from:var(--color-amber-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-100\/90{--tw-gradient-from:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.from-amber-100\/90{--tw-gradient-from:color-mix(in oklab, var(--color-amber-100) 90%, transparent)}}.from-amber-100\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400{--tw-gradient-from:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400\/30{--tw-gradient-from:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.from-amber-400\/30{--tw-gradient-from:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.from-amber-400\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400\/40{--tw-gradient-from:#fcbb0066}@supports (color:color-mix(in lab, red, red)){.from-amber-400\/40{--tw-gradient-from:color-mix(in oklab, var(--color-amber-400) 40%, transparent)}}.from-amber-400\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-500{--tw-gradient-from:var(--color-amber-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-50{--tw-gradient-from:var(--color-emerald-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-grass-green{--tw-gradient-from:var(--color-grass-green);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-600\/40{--tw-gradient-from:#4f39f666}@supports (color:color-mix(in lab, red, red)){.from-indigo-600\/40{--tw-gradient-from:color-mix(in oklab, var(--color-indigo-600) 40%, transparent)}}.from-indigo-600\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-950\/80{--tw-gradient-from:#1e1a4dcc}@supports (color:color-mix(in lab, red, red)){.from-indigo-950\/80{--tw-gradient-from:color-mix(in oklab, var(--color-indigo-950) 80%, transparent)}}.from-indigo-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-100\/90{--tw-gradient-from:#ffedd5e6}@supports (color:color-mix(in lab, red, red)){.from-orange-100\/90{--tw-gradient-from:color-mix(in oklab, var(--color-orange-100) 90%, transparent)}}.from-orange-100\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-400\/40{--tw-gradient-from:#ff8b1a66}@supports (color:color-mix(in lab, red, red)){.from-orange-400\/40{--tw-gradient-from:color-mix(in oklab, var(--color-orange-400) 40%, transparent)}}.from-orange-400\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-purple{--tw-gradient-from:var(--color-primary-purple);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-100\/80{--tw-gradient-from:#dff2fecc}@supports (color:color-mix(in lab, red, red)){.from-sky-100\/80{--tw-gradient-from:color-mix(in oklab, var(--color-sky-100) 80%, transparent)}}.from-sky-100\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-\[\#DCFCE7\]{--tw-gradient-via:#dcfce7;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#E0F2FE\]{--tw-gradient-via:#e0f2fe;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#F1F5F9\]{--tw-gradient-via:#f1f5f9;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#F3E8FF\]{--tw-gradient-via:#f3e8ff;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#FEF3C7\]{--tw-gradient-via:#fef3c7;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#FFF9E6\]{--tw-gradient-via:#fff9e6;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-50\/70{--tw-gradient-via:#fffbebb3}@supports (color:color-mix(in lab, red, red)){.via-amber-50\/70{--tw-gradient-via:color-mix(in oklab, var(--color-amber-50) 70%, transparent)}}.via-amber-50\/70{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-200{--tw-gradient-via:var(--color-amber-200);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-300{--tw-gradient-via:var(--color-amber-300);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-blue-500\/30{--tw-gradient-via:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.via-blue-500\/30{--tw-gradient-via:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.via-blue-500\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-100\/60{--tw-gradient-via:#f3e8ff99}@supports (color:color-mix(in lab, red, red)){.via-purple-100\/60{--tw-gradient-via:color-mix(in oklab, var(--color-purple-100) 60%, transparent)}}.via-purple-100\/60{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-400\/30{--tw-gradient-via:#c07eff4d}@supports (color:color-mix(in lab, red, red)){.via-purple-400\/30{--tw-gradient-via:color-mix(in oklab, var(--color-purple-400) 30%, transparent)}}.via-purple-400\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-slate-900\/90{--tw-gradient-via:#0f172be6}@supports (color:color-mix(in lab, red, red)){.via-slate-900\/90{--tw-gradient-via:color-mix(in oklab, var(--color-slate-900) 90%, transparent)}}.via-slate-900\/90{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-50\/80{--tw-gradient-via:#fefce8cc}@supports (color:color-mix(in lab, red, red)){.via-yellow-50\/80{--tw-gradient-via:color-mix(in oklab, var(--color-yellow-50) 80%, transparent)}}.via-yellow-50\/80{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-300\/30{--tw-gradient-via:#ffe02a4d}@supports (color:color-mix(in lab, red, red)){.via-yellow-300\/30{--tw-gradient-via:color-mix(in oklab, var(--color-yellow-300) 30%, transparent)}}.via-yellow-300\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-300\/40{--tw-gradient-via:#ffe02a66}@supports (color:color-mix(in lab, red, red)){.via-yellow-300\/40{--tw-gradient-via:color-mix(in oklab, var(--color-yellow-300) 40%, transparent)}}.via-yellow-300\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-400{--tw-gradient-via:var(--color-yellow-400);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\[\#E2E8F0\]{--tw-gradient-to:#e2e8f0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#EDE9FE\]{--tw-gradient-to:#ede9fe;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FCE7F3\]{--tw-gradient-to:#fce7f3;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FEF3C7\]{--tw-gradient-to:#fef3c7;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FEF9C3\]{--tw-gradient-to:#fef9c3;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FFE4E6\]{--tw-gradient-to:#ffe4e6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FFF3CD\]{--tw-gradient-to:#fff3cd;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-accent-pink{--tw-gradient-to:var(--color-accent-pink);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-50{--tw-gradient-to:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200{--tw-gradient-to:var(--color-amber-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200\/50{--tw-gradient-to:#fee68580}@supports (color:color-mix(in lab, red, red)){.to-amber-200\/50{--tw-gradient-to:color-mix(in oklab, var(--color-amber-200) 50%, transparent)}}.to-amber-200\/50{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200\/70{--tw-gradient-to:#fee685b3}@supports (color:color-mix(in lab, red, red)){.to-amber-200\/70{--tw-gradient-to:color-mix(in oklab, var(--color-amber-200) 70%, transparent)}}.to-amber-200\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-300\/20{--tw-gradient-to:#ffd23633}@supports (color:color-mix(in lab, red, red)){.to-amber-300\/20{--tw-gradient-to:color-mix(in oklab, var(--color-amber-300) 20%, transparent)}}.to-amber-300\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-500\/20{--tw-gradient-to:#f99c0033}@supports (color:color-mix(in lab, red, red)){.to-amber-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.to-amber-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-950\/40{--tw-gradient-to:#46190166}@supports (color:color-mix(in lab, red, red)){.to-amber-950\/40{--tw-gradient-to:color-mix(in oklab, var(--color-amber-950) 40%, transparent)}}.to-amber-950\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-100\/60{--tw-gradient-to:#d0fae599}@supports (color:color-mix(in lab, red, red)){.to-emerald-100\/60{--tw-gradient-to:color-mix(in oklab, var(--color-emerald-100) 60%, transparent)}}.to-emerald-100\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-400{--tw-gradient-to:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-grass-green{--tw-gradient-to:var(--color-grass-green);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-highlight-pink{--tw-gradient-to:var(--color-highlight-pink);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-400\/30{--tw-gradient-to:#7d87ff4d}@supports (color:color-mix(in lab, red, red)){.to-indigo-400\/30{--tw-gradient-to:color-mix(in oklab, var(--color-indigo-400) 30%, transparent)}}.to-indigo-400\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-100\/60{--tw-gradient-to:#ffedd599}@supports (color:color-mix(in lab, red, red)){.to-orange-100\/60{--tw-gradient-to:color-mix(in oklab, var(--color-orange-100) 60%, transparent)}}.to-orange-100\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-rose-300\/20{--tw-gradient-to:#ffa2ae33}@supports (color:color-mix(in lab, red, red)){.to-rose-300\/20{--tw-gradient-to:color-mix(in oklab, var(--color-rose-300) 20%, transparent)}}.to-rose-300\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-yellow-100{--tw-gradient-to:var(--color-yellow-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-yellow-100\/60{--tw-gradient-to:#fef9c299}@supports (color:color-mix(in lab, red, red)){.to-yellow-100\/60{--tw-gradient-to:color-mix(in oklab, var(--color-yellow-100) 60%, transparent)}}.to-yellow-100\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.fill-white{fill:var(--color-white)}.stroke-\[2\.5\]{stroke-width:2.5px}.stroke-\[2\]{stroke-width:2px}.stroke-\[3\],.stroke-\[3px\]{stroke-width:3px}.object-cover{object-fit:cover}.object-top{object-position:top}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.px-0{padding-inline:0}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-16{padding-top:calc(var(--spacing) * 16)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-9{padding-right:calc(var(--spacing) * 9)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-baseline{vertical-align:baseline}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-arcade{font-family:var(--font-arcade)}.font-code-mono{font-family:var(--font-code-mono)}.font-display-lg{font-family:var(--font-display-lg)}.font-headline-md{font-family:var(--font-headline-md)}.font-icon-label{font-family:var(--font-icon-label)}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.font-window-title{font-family:var(--font-window-title)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[18px\]{font-size:18px}.text-\[22px\]{font-size:22px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#0ea5e9\]{color:#0ea5e9}.text-\[\#1c120c\]{color:#1c120c}.text-\[\#2c1d11\]{color:#2c1d11}.text-\[\#2c2014\]{color:#2c2014}.text-\[\#4ADE80\]{color:#4ade80}.text-\[\#9a3412\]{color:#9a3412}.text-\[\#10b981\]{color:#10b981}.text-\[\#39ff14\]{color:#39ff14}.text-\[\#137c36\]{color:#137c36}.text-\[\#332415\]{color:#332415}.text-\[\#855400\]{color:#855400}.text-\[\#FFE24C\]{color:#ffe24c}.text-\[\#c5221f\]{color:#c5221f}.text-\[\#c06100\]{color:#c06100}.text-\[\#e2d5c2\]{color:#e2d5c2}.text-\[\#f2e6d5\]{color:#f2e6d5}.text-\[\#f4ebd9\]{color:#f4ebd9}.text-\[\#f59e0b\]{color:#f59e0b}.text-\[\#fef3c7\]{color:#fef3c7}.text-\[\#ffcc00\]{color:#fc0}.text-accent-cyan{color:var(--color-accent-cyan)}.text-amber-100{color:var(--color-amber-100)}.text-amber-200{color:var(--color-amber-200)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-amber-950{color:var(--color-amber-950)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-700{color:var(--color-cyan-700)}.text-cyan-900{color:var(--color-cyan-900)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-emerald-950{color:var(--color-emerald-950)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-indigo-900{color:var(--color-indigo-900)}.text-indigo-950{color:var(--color-indigo-950)}.text-inherit{color:inherit}.text-ink-black{color:var(--color-ink-black)}.text-orange-400{color:var(--color-orange-400)}.text-orange-700{color:var(--color-orange-700)}.text-primary-purple{color:var(--color-primary-purple)}.text-purple-300{color:var(--color-purple-300)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-purple-900{color:var(--color-purple-900)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-900{color:var(--color-red-900)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-rose-900{color:var(--color-rose-900)}.text-rose-950{color:var(--color-rose-950)}.text-sky-300{color:var(--color-sky-300)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-900{color:var(--color-sky-900)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-stone-200{color:var(--color-stone-200)}.text-stone-300{color:var(--color-stone-300)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.text-stone-800{color:var(--color-stone-800)}.text-stone-900{color:var(--color-stone-900)}.text-trash-gray{color:var(--color-trash-gray)}.text-white{color:var(--color-white)}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab, red, red)){.text-white\/40{color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.text-white\/50{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.italic\!{font-style:italic!important}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.placeholder-slate-400::placeholder{color:var(--color-slate-400)}.placeholder-stone-500::placeholder{color:var(--color-stone-500)}.placeholder-trash-gray::placeholder{color:var(--color-trash-gray)}.accent-amber-500{accent-color:var(--color-amber-500)}.accent-primary-purple{accent-color:var(--color-primary-purple)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-95{opacity:.95}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-2px_0_0_rgba\(30\,41\,59\,0\.1\)\]{--tw-shadow:0 -2px 0 0 var(--tw-shadow-color,#1e293b1a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-3px_0_0_rgba\(30\,41\,59\,0\.08\)\]{--tw-shadow:0 -3px 0 0 var(--tw-shadow-color,#1e293b14);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-4px_0_0_rgba\(30\,41\,59\,0\.1\)\]{--tw-shadow:0 -4px 0 0 var(--tw-shadow-color,#1e293b1a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(157\,78\,221\,0\.3\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#9d4edd4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(157\,78\,221\,0\.25\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#9d4edd40);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_2px_0_0_rgba\(30\,41\,59\,0\.05\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,#1e293b0d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0px_-4px_10px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:0px -4px 10px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0_0_\#000\]{--tw-shadow:1.5px 1.5px 0 0 var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0_0_\#1E293B\]{--tw-shadow:1.5px 1.5px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0px_0px_\#1E293B\]{--tw-shadow:1.5px 1.5px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:1.5px 1.5px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0_0_\#1E293B\]{--tw-shadow:1px 1px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_\#1E293B\]{--tw-shadow:1px 1px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_\#000\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_\#1E293B\],.shadow-\[1px_1px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:1px 1px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0_0_\#1E293B\]{--tw-shadow:2px 2px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_\#1E293B\]{--tw-shadow:2px 2px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_\#1E293B\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_\#d97706\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#d97706);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.06\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(30\,41\,59\,0\.3\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:2px 2px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[3px_3px_0px_0px_\#1E293B\],.shadow-\[3px_3px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:3px 3px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[3px_3px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:3px 3px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0_0_\#1E293B\]{--tw-shadow:4px 4px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_0px_\#0ea5e9\]{--tw-shadow:4px 4px 0px 0px var(--tw-shadow-color,#0ea5e9);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_0px_\#1E293B\],.shadow-\[4px_4px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:4px 4px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:4px 4px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[6px_6px_0px_0px_\#1E293B\]{--tw-shadow:6px 6px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[8px_8px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:8px 8px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_-3px_-3px_0px_rgba\(0\,0\,0\,0\.2\)\,inset_3px_3px_0px_rgba\(255\,255\,255\,0\.5\)\]{--tw-shadow:inset -3px -3px 0px var(--tw-shadow-color,#0003), inset 3px 3px 0px var(--tw-shadow-color,#ffffff80);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_0px_3px_0px_rgba\(255\,255\,255\,0\.8\)\]{--tw-shadow:inset 0px 3px 0px var(--tw-shadow-color,#fffc);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_1px_1px_0px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:inset 1px 1px 0px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_2px_2px_0px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:inset 2px 2px 0px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_2px_2px_0px_rgba\(255\,255\,255\,0\.8\)\]{--tw-shadow:inset 2px 2px 0px var(--tw-shadow-color,#fffc);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_3px_3px_0px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:inset 3px 3px 0px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-700\/20{--tw-shadow-color:#b7500033}@supports (color:color-mix(in lab, red, red)){.shadow-amber-700\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-700) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-\[\#0ea5e9\]{--tw-ring-color:#0ea5e9}.ring-amber-500\/40{--tw-ring-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.ring-amber-500\/40{--tw-ring-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.ring-amber-700\/30{--tw-ring-color:#b750004d}@supports (color:color-mix(in lab, red, red)){.ring-amber-700\/30{--tw-ring-color:color-mix(in oklab, var(--color-amber-700) 30%, transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-md{--tw-blur:blur(var(--blur-md));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.contrast-125{--tw-contrast:contrast(125%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_1px_2px_rgba\(0\,0\,0\,0\.85\)\]{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#000000d9));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-sm{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-sm));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.saturate-125{--tw-saturate:saturate(125%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.saturate-150{--tw-saturate:saturate(150%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}.\[animation-delay\:0\.2s\]{animation-delay:.2s}.\[animation-delay\:0\.4s\]{animation-delay:.4s}@media (hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.peer-checked\:bg-grass-green:is(:where(.peer):checked~*){background-color:var(--color-grass-green)}.peer-checked\:text-ink-black:is(:where(.peer):checked~*){color:var(--color-ink-black)}.selection\:bg-\[\#4ADE80\] ::selection{background-color:#4ade80}.selection\:bg-\[\#4ADE80\]::selection{background-color:#4ade80}.selection\:bg-highlight-pink ::selection{background-color:var(--color-highlight-pink)}.selection\:bg-highlight-pink::selection{background-color:var(--color-highlight-pink)}.selection\:text-\[\#1E293B\] ::selection{color:#1e293b}.selection\:text-\[\#1E293B\]::selection{color:#1e293b}.selection\:text-white ::selection{color:var(--color-white)}.selection\:text-white::selection{color:var(--color-white)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:top-\[1px\]:after{content:var(--tw-content);top:1px}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:w-2:after{content:var(--tw-content);width:calc(var(--spacing) * 2)}.after\:rounded-full:after{content:var(--tw-content);border-radius:2147483647px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-ink-black:after{content:var(--tw-content);border-color:var(--color-ink-black)}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.peer-checked\:after\:translate-x-3:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 3);translate:var(--tw-translate-x) var(--tw-translate-y)}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\:translate-y-\[-2px\]:hover{--tw-translate-y:-2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:rotate-0:hover{rotate:0deg}.hover\:border-\[\#10b981\]:hover{border-color:#10b981}.hover\:border-\[\#f59e0b\]:hover{border-color:#f59e0b}.hover\:border-amber-600\/50:hover{border-color:#dd740080}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-600\/50:hover{border-color:color-mix(in oklab, var(--color-amber-600) 50%, transparent)}}.hover\:border-amber-700\/60:hover{border-color:#b7500099}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-700\/60:hover{border-color:color-mix(in oklab, var(--color-amber-700) 60%, transparent)}}.hover\:border-ink-black:hover{border-color:var(--color-ink-black)}.hover\:bg-\[\#3b82f6\]:hover{background-color:#3b82f6}.hover\:bg-\[\#4cc9f0\]:hover{background-color:#4cc9f0}.hover\:bg-\[\#10b981\]\/25:hover{background-color:oklab(69.5873% -.142158 .0448781/.25)}.hover\:bg-\[\#22c55e\]:hover{background-color:#22c55e}.hover\:bg-\[\#28e007\]:hover{background-color:#28e007}.hover\:bg-\[\#39ff14\]:hover{background-color:#39ff14}.hover\:bg-\[\#251f18\]:hover{background-color:#251f18}.hover\:bg-\[\#c2410c\]:hover{background-color:#c2410c}.hover\:bg-\[\#f72585\]:hover{background-color:#f72585}.hover\:bg-\[\#fcf5e6\]:hover{background-color:#fcf5e6}.hover\:bg-\[\#fde047\]:hover{background-color:#fde047}.hover\:bg-\[\#ff3333\]:hover{background-color:#f33}.hover\:bg-\[\#ff8000\]:hover{background-color:#ff8000}.hover\:bg-\[\#ffe24c\]\/40:hover{background-color:oklab(91.1399% -.0228156 .162602/.4)}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\:bg-amber-200\/50:hover{background-color:#fee68580}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-200\/50:hover{background-color:color-mix(in oklab, var(--color-amber-200) 50%, transparent)}}.hover\:bg-amber-300:hover{background-color:var(--color-amber-300)}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500:hover{background-color:var(--color-amber-500)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.hover\:bg-amber-500\/25:hover{background-color:#f99c0040}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/25:hover{background-color:color-mix(in oklab, var(--color-amber-500) 25%, transparent)}}.hover\:bg-amber-500\/30:hover{background-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/30:hover{background-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.hover\:bg-amber-600:hover{background-color:var(--color-amber-600)}.hover\:bg-amber-600\/25:hover{background-color:#dd740040}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-600\/25:hover{background-color:color-mix(in oklab, var(--color-amber-600) 25%, transparent)}}.hover\:bg-amber-700\/20:hover{background-color:#b7500033}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-700\/20:hover{background-color:color-mix(in oklab, var(--color-amber-700) 20%, transparent)}}.hover\:bg-amber-900\/5:hover{background-color:#7b33060d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/5:hover{background-color:color-mix(in oklab, var(--color-amber-900) 5%, transparent)}}.hover\:bg-amber-900\/10:hover{background-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/10:hover{background-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.hover\:bg-amber-900\/20:hover{background-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/20:hover{background-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.hover\:bg-black\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\:bg-black\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/10:hover{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.hover\:bg-cyan-200:hover{background-color:var(--color-cyan-200)}.hover\:bg-emerald-100:hover{background-color:var(--color-emerald-100)}.hover\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\:bg-emerald-300:hover{background-color:var(--color-emerald-300)}.hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\:bg-emerald-500\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-500\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\:bg-emerald-600\/20:hover{background-color:#00976733}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-600\/20:hover{background-color:color-mix(in oklab, var(--color-emerald-600) 20%, transparent)}}.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-pink-400:hover{background-color:var(--color-pink-400)}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-purple-200:hover{background-color:var(--color-purple-200)}.hover\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\:bg-rose-50:hover{background-color:var(--color-rose-50)}.hover\:bg-rose-100:hover{background-color:var(--color-rose-100)}.hover\:bg-rose-200:hover{background-color:var(--color-rose-200)}.hover\:bg-rose-500:hover{background-color:var(--color-rose-500)}.hover\:bg-rose-500\/10:hover{background-color:#ff23571a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-500\/10:hover{background-color:color-mix(in oklab, var(--color-rose-500) 10%, transparent)}}.hover\:bg-rose-500\/25:hover{background-color:#ff235740}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-500\/25:hover{background-color:color-mix(in oklab, var(--color-rose-500) 25%, transparent)}}.hover\:bg-rose-600:hover{background-color:var(--color-rose-600)}.hover\:bg-rose-600\/20:hover{background-color:#e7004433}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-600\/20:hover{background-color:color-mix(in oklab, var(--color-rose-600) 20%, transparent)}}.hover\:bg-sky-400:hover{background-color:var(--color-sky-400)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:bg-slate-900:hover{background-color:var(--color-slate-900)}.hover\:bg-slate-950:hover{background-color:var(--color-slate-950)}.hover\:bg-stone-500\/10:hover{background-color:#79716b1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-stone-500\/10:hover{background-color:color-mix(in oklab, var(--color-stone-500) 10%, transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\:bg-white\/40:hover{background-color:#fff6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/40:hover{background-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.hover\:bg-yellow-200:hover{background-color:var(--color-yellow-200)}.hover\:bg-yellow-300:hover{background-color:var(--color-yellow-300)}.hover\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}.hover\:from-amber-300:hover{--tw-gradient-from:var(--color-amber-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-emerald-400:hover{--tw-gradient-to:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-600:hover{color:var(--color-amber-600)}.hover\:text-amber-800:hover{color:var(--color-amber-800)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-ink-black:hover{color:var(--color-ink-black)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-red-800:hover{color:var(--color-red-800)}.hover\:text-rose-300:hover{color:var(--color-rose-300)}.hover\:text-rose-600:hover{color:var(--color-rose-600)}.hover\:text-sky-800:hover{color:var(--color-sky-800)}.hover\:text-stone-200:hover{color:var(--color-stone-200)}.hover\:text-stone-900:hover{color:var(--color-stone-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:border-amber-500:focus{border-color:var(--color-amber-500)}.focus\:border-amber-500\/70:focus{border-color:#f99c00b3}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-500\/70:focus{border-color:color-mix(in oklab, var(--color-amber-500) 70%, transparent)}}.focus\:border-amber-600:focus{border-color:var(--color-amber-600)}.focus\:border-amber-700\/60:focus{border-color:#b7500099}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-700\/60:focus{border-color:color-mix(in oklab, var(--color-amber-700) 60%, transparent)}}.focus\:border-sky-600:focus{border-color:var(--color-sky-600)}.focus\:bg-amber-50:focus{background-color:var(--color-amber-50)}.focus\:bg-white:focus{background-color:var(--color-white)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-primary-purple:focus{--tw-ring-color:var(--color-primary-purple)}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-sky-500)}.focus\:outline-none:focus,.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:translate-x-0\.5:active{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-x-1:active{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-y-0\.5:active{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-y-1:active{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-125:active{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:cursor-grabbing:active{cursor:grabbing}.active\:bg-\[\#1fb304\]:active{background-color:#1fb304}.active\:shadow-none:active{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=40rem){.sm\:right-6{right:calc(var(--spacing) * 6)}.sm\:my-5{margin-block:calc(var(--spacing) * 5)}.sm\:mt-0{margin-top:0}.sm\:mt-2{margin-top:calc(var(--spacing) * 2)}.sm\:mt-3{margin-top:calc(var(--spacing) * 3)}.sm\:mt-4{margin-top:calc(var(--spacing) * 4)}.sm\:mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.sm\:mb-2{margin-bottom:calc(var(--spacing) * 2)}.sm\:mb-4{margin-bottom:calc(var(--spacing) * 4)}.sm\:mb-5{margin-bottom:calc(var(--spacing) * 5)}.sm\:mb-6{margin-bottom:calc(var(--spacing) * 6)}.sm\:flex{display:flex}.sm\:inline{display:inline}.sm\:inline-flex{display:inline-flex}.sm\:h-4{height:calc(var(--spacing) * 4)}.sm\:h-9{height:calc(var(--spacing) * 9)}.sm\:h-16{height:calc(var(--spacing) * 16)}.sm\:h-24{height:calc(var(--spacing) * 24)}.sm\:h-52{height:calc(var(--spacing) * 52)}.sm\:min-h-\[300px\]{min-height:300px}.sm\:w-4{width:calc(var(--spacing) * 4)}.sm\:w-9{width:calc(var(--spacing) * 9)}.sm\:w-16{width:calc(var(--spacing) * 16)}.sm\:w-20{width:calc(var(--spacing) * 20)}.sm\:w-28{width:calc(var(--spacing) * 28)}.sm\:w-44{width:calc(var(--spacing) * 44)}.sm\:w-72{width:calc(var(--spacing) * 72)}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:gap-2{gap:calc(var(--spacing) * 2)}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}:where(.sm\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.sm\:self-center{align-self:center}.sm\:border-\[4px\]{border-style:var(--tw-border-style);border-width:4px}.sm\:p-3{padding:calc(var(--spacing) * 3)}.sm\:p-3\.5{padding:calc(var(--spacing) * 3.5)}.sm\:p-4{padding:calc(var(--spacing) * 4)}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:p-8{padding:calc(var(--spacing) * 8)}.sm\:p-10{padding:calc(var(--spacing) * 10)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.sm\:py-3{padding-block:calc(var(--spacing) * 3)}.sm\:py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.sm\:py-6{padding-block:calc(var(--spacing) * 6)}.sm\:pr-4{padding-right:calc(var(--spacing) * 4)}.sm\:pl-0{padding-left:0}.sm\:pl-10{padding-left:calc(var(--spacing) * 10)}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.sm\:text-\[9px\]{font-size:9px}.sm\:text-\[10px\]{font-size:10px}.sm\:text-\[11px\]{font-size:11px}.sm\:text-\[13px\]{font-size:13px}}@media (width>=48rem){.md\:inline{display:inline}.md\:inline-flex{display:inline-flex}.md\:w-84{width:calc(var(--spacing) * 84)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:p-8{padding:calc(var(--spacing) * 8)}.md\:px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.md\:py-2{padding-block:calc(var(--spacing) * 2)}.md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.md\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (width>=64rem){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-\[46\%\]{width:46%}.lg\:w-\[54\%\]{width:54%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:border-r-\[3px\]{border-right-style:var(--tw-border-style);border-right-width:3px}.lg\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}@media (prefers-color-scheme:dark){.dark\:border-stone-700{border-color:var(--color-stone-700)}.dark\:bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.dark\:text-amber-300{color:var(--color-amber-300)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-purple-400{color:var(--color-purple-400)}.dark\:text-rose-400{color:var(--color-rose-400)}.dark\:text-stone-300{color:var(--color-stone-300)}@media (hover:hover){.dark\:hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}}}}body{color:#1e293b;background:linear-gradient(135deg,#0f172a 0%,#020617 100%);width:100vw;height:100vh;margin:0;padding:0;font-family:Be Vietnam Pro,sans-serif;overflow:hidden}.material-symbols-outlined{white-space:nowrap;vertical-align:middle;max-width:1em;display:inline-block;overflow:hidden}::-webkit-scrollbar{width:12px;height:12px}::-webkit-scrollbar-track{background:#f9f8f3;border-left:3px solid #1e293b}::-webkit-scrollbar-thumb{background:#fde047;border:3px solid #1e293b;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#ffe24c}.custom-scrollbar::-webkit-scrollbar{width:10px;height:10px}.custom-scrollbar::-webkit-scrollbar-track{background:#f9f8f3;border-left:3px solid #1e293b}.custom-scrollbar::-webkit-scrollbar-thumb{background:#0ea5e9;border:3px solid #1e293b}.window-shadow,.gadget-shadow{box-shadow:6px 6px #1e293b}.arcade-btn{transition:all .1s;box-shadow:0 6px #1e293b,inset 0 4px #fff6}.arcade-btn:active{transform:translateY(6px);box-shadow:0 0 #1e293b,inset 0 2px #0003}.icon-hover-shift{transition:all .1s ease-in-out}.icon-hover-shift:hover{transform:translate(-2px,-2px)}.icon-hover-shift:active{transform:translate(2px,2px)}.cm-editor{border:3px solid #1e293b;border-radius:.5rem;color:#4ade80!important;background-color:#1e293b!important;outline:none!important;font-family:Courier Prime,monospace!important;font-size:13px!important}.cm-scroller{font-family:inherit!important}.cm-gutters{color:#64748b!important;background-color:#1e293b!important;border-right:3px solid #1e293b!important}.cm-activeLineGutter{color:#4ade80!important;background-color:#4ade801a!important}.cm-activeLine{background-color:#4ade800d!important}.cm-cursor{border-left-color:#4ade80!important}.font-cinzel{font-family:Cinzel,serif}.font-cinzel-dec{font-family:Cinzel Decorative,serif}.font-garamond{font-family:EB Garamond,serif}.font-pencil{font-family:Kalam,cursive}.parchment-bg{background-color:#f3e9d2;background-image:radial-gradient(circle,#f8f1e3f2,#e2d0aee6),radial-gradient(circle at 10% 20%,#bd9a6c40 0%,#0000 40%),radial-gradient(circle at 90% 80%,#a883544d 0%,#0000 45%),radial-gradient(circle at 80% 15%,#a0764633 0%,#0000 35%),radial-gradient(circle at 25% 85%,#af8a5c40 0%,#0000 35%)}.parchment-dark-bg{background-color:#171512;background-image:radial-gradient(circle,#26211bf2,#120f0cf2),radial-gradient(circle at 10% 20%,#5544304d 0%,#0000 40%),radial-gradient(circle at 90% 80%,#46342059 0%,#0000 45%)}.map-vignette{box-shadow:inset 0 0 80px #4e361b73,inset 0 0 160px #2d1e0c59}.map-dark-vignette{box-shadow:inset 0 0 90px #000000d9,inset 0 0 180px #000000b3}@keyframes beacon-pulse{0%{r:10px;opacity:.9}50%{r:22px;opacity:.35}to{r:30px;opacity:0}}@keyframes path-shimmer{0%{stroke-dashoffset:200px}to{stroke-dashoffset:0}}.beacon-wave{animation:2s cubic-bezier(.215,.61,.355,1) infinite beacon-pulse}.beacon-wave-delayed{animation:2s cubic-bezier(.215,.61,.355,1) .8s infinite beacon-pulse}.canvas-interactive{cursor:grab}.canvas-interactive:active{cursor:grabbing}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.18.5"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.katex-newline{display:block}.katex .katex-base{white-space:nowrap;width:min-content;position:relative}.katex .katex-base,.katex .katex-strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .katex-vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .katex-thinbox{flex-direction:row;width:0;max-width:0;display:inline-flex}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .katex-hdashline,.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-rule,.katex .katex-underline .underline-line,.katex .mfrac .frac-line{min-height:1px}.katex .mspace{display:inline-block}.katex .katex-smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.katex-inner,.katex .llap>.katex-inner,.katex .rlap>.katex-inner{position:absolute}.katex .clap>.katex-fix,.katex .llap>.katex-fix,.katex .rlap>.katex-fix{display:inline-block}.katex .llap>.katex-inner{right:0}.katex .clap>.katex-inner,.katex .rlap>.katex-inner{left:0}.katex .clap>.katex-inner>span{margin-left:-50%;margin-right:50%}.katex .katex-rule{border:0 solid;display:inline-block;position:relative}.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .katex-hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.katex-root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .katex-sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .katex-sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .katex-sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .katex-sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .katex-sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .katex-sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .katex-sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .katex-sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .katex-sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .katex-sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .katex-sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .katex-sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .katex-sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .katex-sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .katex-sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .katex-sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .katex-sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .katex-sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .katex-sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .katex-sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .katex-sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .katex-sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .katex-sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .katex-sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .katex-sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .katex-sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .katex-sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .katex-sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .katex-sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .katex-sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .katex-sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .katex-sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .katex-sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .katex-sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .katex-sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .katex-sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .katex-sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .katex-sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .katex-sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .katex-sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .katex-sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .katex-sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .katex-sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .katex-sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .katex-sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .katex-sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .katex-sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .katex-sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .katex-sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .katex-sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .katex-sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .katex-sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .katex-sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .katex-sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .katex-sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .katex-sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .katex-sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .katex-sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .katex-sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .katex-sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .katex-sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .katex-sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .katex-sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .katex-sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .katex-sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .katex-sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .katex-sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .katex-sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .katex-sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .katex-sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .katex-sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .katex-sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .katex-sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .katex-sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .katex-sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .katex-sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .katex-sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .katex-sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .katex-sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .katex-sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .katex-sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .katex-sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .katex-sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .katex-sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .katex-sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .katex-sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .katex-sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .katex-sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .katex-sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .katex-sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .katex-sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .katex-sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .katex-sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .katex-sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .katex-sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .katex-sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .katex-sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .katex-sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .katex-sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .katex-sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .katex-sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .katex-sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .katex-sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .katex-sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .katex-sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .katex-sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .katex-sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .katex-sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .katex-sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .katex-sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .katex-sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .katex-sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .katex-sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .katex-sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .katex-sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .katex-sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .katex-sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .katex-sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .katex-sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .katex-sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .katex-sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .katex-accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .katex-accent .accent-body{position:relative}.katex .katex-accent .accent-body:not(.accent-full){width:0}.katex .katex-overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .katex-stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .katex-stretchy:after,.katex .katex-stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .katex-sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.katex-tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.katex-tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/algospaced-ui/dist/assets/info-P8wDUvT9.js b/algospaced-ui/dist/assets/info-P8wDUvT9.js new file mode 100644 index 0000000000000000000000000000000000000000..f3fcc40592eb0829719c86b04511f0f81bf389f3 --- /dev/null +++ b/algospaced-ui/dist/assets/info-P8wDUvT9.js @@ -0,0 +1 @@ +import{z as e}from"./index-DUIMMmBx.js";var t=e(`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`}]]),n=e(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]);export{t as n,n as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/jsx-runtime-UoOgdb2P.js b/algospaced-ui/dist/assets/jsx-runtime-UoOgdb2P.js new file mode 100644 index 0000000000000000000000000000000000000000..b01d9970bef3df7b1576081e352ba081b81c7c71 --- /dev/null +++ b/algospaced-ui/dist/assets/jsx-runtime-UoOgdb2P.js @@ -0,0 +1 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},te=Object.assign,h={};function g(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function ne(){}ne.prototype=g.prototype;function re(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}var ie=re.prototype=new ne;ie.constructor=re,te(ie,g.prototype),ie.isPureReactComponent=!0;var ae=Array.isArray;function oe(){}var _={H:null,A:null,T:null,S:null},se=Object.prototype.hasOwnProperty;function ce(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function le(e,t){return ce(e.type,t,e.props)}function v(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function y(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ue=/\/+/g;function de(e,t){return typeof e==`object`&&e&&e.key!=null?y(``+e.key):t.toString(36)}function fe(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(oe,oe):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function b(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,b(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+de(e,0):a,ae(o)?(i=``,c!=null&&(i=c.replace(ue,`$&/`)+`/`),b(o,r,i,``,function(e){return e})):o!=null&&(v(o)&&(o=le(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ue,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ae(e))for(var u=0;u{t.exports=u()})),f=()=>void 0,p=function(e){let t=[],n=0;for(let r=0;r>6|192,t[n++]=i&63|128):(i&64512)==55296&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},ee=function(e){let t=[],n=0,r=0;for(;n191&&i<224){let a=e[n++];t[r++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){let a=e[n++],o=e[n++],s=e[n++],c=((i&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{let a=e[n++],o=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(a&63)<<6|o&63)}}return t.join(``)},m={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`,get ENCODED_VALS(){return this.ENCODED_VALS_BASE+`+/=`},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+`-_.`},HAS_NATIVE_SUPPORT:typeof atob==`function`,encodeByteArray(e,t){if(!Array.isArray(e))throw Error(`encodeByteArray takes an array as a parameter`);this.init_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t>2,u=(i&3)<<4|o>>4,d=(o&15)<<2|c>>6,f=c&63;s||(f=64,a||(d=64)),r.push(n[l],n[u],n[d],n[f])}return r.join(``)},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(p(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):ee(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t>4;if(r.push(c),o!==64){let e=a<<4&240|o>>2;if(r.push(e),s!==64){let e=o<<6&192|s;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},te=class extends Error{constructor(){super(...arguments),this.name=`DecodeBase64StringError`}},h=function(e){let t=p(e);return m.encodeByteArray(t,!0)},g=function(e){return h(e).replace(/\./g,``)},ne=function(e){try{return m.decodeString(e,!0)}catch(e){console.error(`base64Decode failed: `,e)}return null};function re(){if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`Unable to locate global object.`)}var ie=()=>re().__FIREBASE_DEFAULTS__,ae=()=>{if(typeof process>`u`)return;let e={}.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},oe=()=>{if(typeof document>`u`)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=e&&ne(e[1]);return t&&JSON.parse(t)},_=()=>{try{return f()||ie()||ae()||oe()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},se=e=>_()?.emulatorHosts?.[e],ce=()=>_()?.config,le=e=>_()?.[`_${e}`],v=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),typeof e==`function`&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,n))}}};function y(){return typeof navigator<`u`&&typeof navigator.userAgent==`string`?navigator.userAgent:``}function ue(){return typeof window<`u`&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(y())}function de(){return typeof navigator<`u`&&navigator.userAgent===`Cloudflare-Workers`}function fe(){let e=typeof chrome==`object`?chrome.runtime:typeof browser==`object`?browser.runtime:void 0;return typeof e==`object`&&e.id!==void 0}function b(){return typeof navigator==`object`&&navigator.product===`ReactNative`}function x(){let e=y();return e.indexOf(`MSIE `)>=0||e.indexOf(`Trident/`)>=0}function pe(){try{return typeof indexedDB==`object`}catch{return!1}}function me(){return new Promise((e,t)=>{try{let n=!0,r=`validate-browser-context-for-indexeddb-analytics-module`,i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{t(i.error?.message||``)}}catch(e){t(e)}})}var he=`FirebaseError`,S=class e extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=he,Object.setPrototypeOf(this,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,C.prototype.create)}},C=class{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?ge(i,n):`Error`;return new S(r,`${this.serviceName}: ${a} (${r}).`,n)}};function ge(e,t){try{let n=0,r=``;for(;n`:String(s)),n=a+1}return r}catch{return e}}function _e(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function w(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);for(let i of n){if(!r.includes(i))return!1;let n=e[i],a=t[i];if(ve(n)&&ve(a)){if(!w(n,a))return!1}else if(n!==a)return!1}for(let e of r)if(!n.includes(e))return!1;return!0}function ve(e){return typeof e==`object`&&!!e}function ye(e){let t=[];for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+`=`+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+`=`+encodeURIComponent(r));return t.length?`&`+t.join(`&`):``}function be(e){let t={};return e.replace(/^\?/,``).split(`&`).forEach(e=>{if(e){let[n,r]=e.split(`=`);t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function xe(e){let t=e.indexOf(`?`);if(!t)return``;let n=e.indexOf(`#`,t);return e.substring(t,n>0?n:void 0)}function Se(e,t){let n=new Ce(e,t);return n.subscribe.bind(n)}var Ce=class{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(e===void 0&&t===void 0&&n===void 0)throw Error(`Missing Observer.`);r=we(e,[`next`,`error`,`complete`])?e:{next:e,error:t,complete:n},r.next===void 0&&(r.next=Te),r.error===void 0&&(r.error=Te),r.complete===void 0&&(r.complete=Te);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),i}unsubscribeOne(e){this.observers!==void 0&&this.observers[e]!==void 0&&(delete this.observers[e],--this.observerCount,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t{if(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(e){typeof console<`u`&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function we(e,t){if(typeof e!=`object`||!e)return!1;for(let n of t)if(n in e&&typeof e[n]==`function`)return!0;return!1}function Te(){}function T(e){return e&&e._delegate?e._delegate:e}function Ee(e){try{return(e.startsWith(`http://`)||e.startsWith(`https://`)?new URL(e).hostname:e).endsWith(`.cloudworkstations.dev`)}catch{return!1}}async function De(e){return(await fetch(e,{credentials:`include`})).ok}var E=class{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode=`LAZY`,this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}},D=`[DEFAULT]`,Oe=class{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new v;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){let t=this.normalizeInstanceIdentifier(e?.identifier),n=e?.optional??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(n)return null;throw e}if(n)return null;throw Error(`Service ${this.name} is not available`)}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(Ae(e))try{this.getOrInitializeService({instanceIdentifier:D})}catch{}for(let[e,t]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch{}}}}clearInstance(e=D){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>`INTERNAL`in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>`_delete`in e).map(e=>e._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=D){return this.instances.has(e)}getOptions(e=D){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){let n=this.normalizeInstanceIdentifier(t),r=this.onInitCallbacks.get(n)??new Set;r.add(e),this.onInitCallbacks.set(n,r);let i=this.instances.get(n);return i&&e(i,n),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:ke(e),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=D){return this.component?this.component.multipleInstances?e:D:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!==`EXPLICIT`}};function ke(e){return e===D?void 0:e}function Ae(e){return e.instantiationMode===`EAGER`}var je=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new Oe(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}},Me=[],O;(function(e){e[e.DEBUG=0]=`DEBUG`,e[e.VERBOSE=1]=`VERBOSE`,e[e.INFO=2]=`INFO`,e[e.WARN=3]=`WARN`,e[e.ERROR=4]=`ERROR`,e[e.SILENT=5]=`SILENT`})(O||={});var Ne={debug:O.DEBUG,verbose:O.VERBOSE,info:O.INFO,warn:O.WARN,error:O.ERROR,silent:O.SILENT},Pe=O.INFO,Fe={[O.DEBUG]:`log`,[O.VERBOSE]:`log`,[O.INFO]:`info`,[O.WARN]:`warn`,[O.ERROR]:`error`},Ie=(e,t,...n)=>{if(tt.some(t=>e instanceof t),ze,Be;function Ve(){return ze||=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]}function He(){return Be||=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey]}var Ue=new WeakMap,We=new WeakMap,Ge=new WeakMap,Ke=new WeakMap,qe=new WeakMap;function Je(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`success`,i),e.removeEventListener(`error`,a)},i=()=>{t(k(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener(`success`,i),e.addEventListener(`error`,a)});return t.then(t=>{t instanceof IDBCursor&&Ue.set(t,e)}).catch(()=>{}),qe.set(t,e),t}function Ye(e){if(We.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`complete`,i),e.removeEventListener(`error`,a),e.removeEventListener(`abort`,a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException(`AbortError`,`AbortError`)),r()};e.addEventListener(`complete`,i),e.addEventListener(`error`,a),e.addEventListener(`abort`,a)});We.set(e,t)}var Xe={get(e,t,n){if(e instanceof IDBTransaction){if(t===`done`)return We.get(e);if(t===`objectStoreNames`)return e.objectStoreNames||Ge.get(e);if(t===`store`)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return k(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t===`done`||t===`store`)||t in e}};function Ze(e){Xe=e(Xe)}function Qe(e){return e===IDBDatabase.prototype.transaction&&!(`objectStoreNames`in IDBTransaction.prototype)?function(t,...n){let r=e.call(et(this),t,...n);return Ge.set(r,t.sort?t.sort():[t]),k(r)}:He().includes(e)?function(...t){return e.apply(et(this),t),k(Ue.get(this))}:function(...t){return k(e.apply(et(this),t))}}function $e(e){return typeof e==`function`?Qe(e):(e instanceof IDBTransaction&&Ye(e),Re(e,Ve())?new Proxy(e,Xe):e)}function k(e){if(e instanceof IDBRequest)return Je(e);if(Ke.has(e))return Ke.get(e);let t=$e(e);return t!==e&&(Ke.set(e,t),qe.set(t,e)),t}var et=e=>qe.get(e);function tt(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){let o=indexedDB.open(e,t),s=k(o);return r&&o.addEventListener(`upgradeneeded`,e=>{r(k(o.result),e.oldVersion,e.newVersion,k(o.transaction),e)}),n&&o.addEventListener(`blocked`,e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{a&&e.addEventListener(`close`,()=>a()),i&&e.addEventListener(`versionchange`,e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}var nt=[`get`,`getKey`,`getAll`,`getAllKeys`,`count`],rt=[`put`,`add`,`delete`,`clear`],it=new Map;function at(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t==`string`))return;if(it.get(t))return it.get(t);let n=t.replace(/FromIndex$/,``),r=t!==n,i=rt.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||nt.includes(n)))return;let a=async function(e,...t){let a=this.transaction(e,i?`readwrite`:`readonly`),o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return it.set(t,a),a}Ze(e=>({...e,get:(t,n,r)=>at(t,n)||e.get(t,n,r),has:(t,n)=>!!at(t,n)||e.has(t,n)}));var ot=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(st(e)){let t=e.getImmediate();return`${t.library}/${t.version}`}return null}).filter(e=>e).join(` `)}};function st(e){return e.getComponent()?.type===`VERSION`}var ct=`@firebase/app`,lt=`0.16.1`,A=new Le(`@firebase/app`),ut=`@firebase/app-compat`,dt=`@firebase/analytics-compat`,ft=`@firebase/analytics`,pt=`@firebase/app-check-compat`,mt=`@firebase/app-check`,ht=`@firebase/auth`,gt=`@firebase/auth-compat`,_t=`@firebase/database`,vt=`@firebase/data-connect`,yt=`@firebase/database-compat`,bt=`@firebase/functions`,xt=`@firebase/functions-compat`,St=`@firebase/installations`,Ct=`@firebase/installations-compat`,wt=`@firebase/messaging`,Tt=`@firebase/messaging-compat`,Et=`@firebase/performance`,Dt=`@firebase/performance-compat`,Ot=`@firebase/remote-config`,kt=`@firebase/remote-config-compat`,At=`@firebase/storage`,jt=`@firebase/storage-compat`,Mt=`@firebase/firestore`,Nt=`@firebase/ai`,Pt=`@firebase/firestore-compat`,Ft=`firebase`,It=`12.18.0`,Lt=`[DEFAULT]`,Rt={[ct]:`fire-core`,[ut]:`fire-core-compat`,[ft]:`fire-analytics`,[dt]:`fire-analytics-compat`,[mt]:`fire-app-check`,[pt]:`fire-app-check-compat`,[ht]:`fire-auth`,[gt]:`fire-auth-compat`,[_t]:`fire-rtdb`,[vt]:`fire-data-connect`,[yt]:`fire-rtdb-compat`,[bt]:`fire-fn`,[xt]:`fire-fn-compat`,[St]:`fire-iid`,[Ct]:`fire-iid-compat`,[wt]:`fire-fcm`,[Tt]:`fire-fcm-compat`,[Et]:`fire-perf`,[Dt]:`fire-perf-compat`,[Ot]:`fire-rc`,[kt]:`fire-rc-compat`,[At]:`fire-gcs`,[jt]:`fire-gcs-compat`,[Mt]:`fire-fst`,[Pt]:`fire-fst-compat`,[Nt]:`fire-vertex`,"fire-js":`fire-js`,[Ft]:`fire-js-all`},j=new Map,zt=new Map,Bt=new Map;function Vt(e,t){try{e.container.addComponent(t)}catch(n){A.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function Ht(e){let t=e.name;if(Bt.has(t))return A.debug(`There were multiple attempts to register component ${t}.`),!1;Bt.set(t,e);for(let t of j.values())Vt(t,e);for(let t of zt.values())Vt(t,e);return!0}function Ut(e,t){let n=e.container.getProvider(`heartbeat`).getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function M(e){return e!=null&&e.settings!==void 0}var N=new C(`app`,`Firebase`,{"no-app":`No Firebase App '{$appName}' has been created - call initializeApp() first`,"bad-app-name":`Illegal App name: '{$appName}'`,"duplicate-app":`Firebase App named '{$appName}' already exists with different {$mismatchedParam}. Existing: '{$oldValue}'. New: '{$newValue}'.`,"app-deleted":`Firebase App named '{$appName}' already deleted`,"server-app-deleted":`Firebase Server App has been deleted`,"no-options":`Need to provide options, when not being deployed to hosting via source.`,"invalid-app-argument":`firebase.{$appName}() takes either no argument or a Firebase App instance.`,"invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":`Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.`,"idb-get":`Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.`,"idb-set":`Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.`,"idb-delete":`Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.`,"finalization-registry-not-supported":`FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.`,"invalid-server-app-environment":`FirebaseServerApp is not for use in browser environments.`}),Wt=class{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new E(`app`,()=>this,`PUBLIC`))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw N.create(`app-deleted`,{appName:this._name})}},P=It;function Gt(e,t={}){let n=e;typeof t!=`object`&&(t={name:t});let r={name:Lt,automaticDataCollectionEnabled:!0,...t},i=r.name;if(typeof i!=`string`||!i)throw N.create(`bad-app-name`,{appName:String(i)});if(n||=ce(),!n)throw N.create(`no-options`);let a=j.get(i);if(a){if(!w(n,a.options))throw N.create(`duplicate-app`,{appName:i,mismatchedParam:`options`,oldValue:JSON.stringify(a.options),newValue:JSON.stringify(n)});if(w(r,a.config))return a;throw N.create(`duplicate-app`,{appName:i,mismatchedParam:`config`,oldValue:JSON.stringify(a.config),newValue:JSON.stringify(r)})}let o=new je(i);for(let e of Bt.values())o.addComponent(e);let s=new Wt(n,r,o);return j.set(i,s),s}function Kt(e=Lt){let t=j.get(e);if(!t&&e===`[DEFAULT]`&&ce())return Gt();if(!t)throw N.create(`no-app`,{appName:e});return t}function qt(){return Array.from(j.values())}function F(e,t,n){let r=Rt[e]??e;n&&(r+=`-${n}`);let i=r.match(/\s|\//),a=t.match(/\s|\//);if(i||a){let e=[`Unable to register library "${r}" with version "${t}":`];i&&e.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&a&&e.push(`and`),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),A.warn(e.join(` `));return}Ht(new E(`${r}-version`,()=>({library:r,version:t}),`VERSION`))}var Jt=`firebase-heartbeat-database`,Yt=1,I=`firebase-heartbeat-store`,Xt=null;function Zt(){return Xt||=tt(Jt,Yt,{upgrade:(e,t)=>{if(t===0)try{e.createObjectStore(I)}catch(e){console.warn(e)}}}).catch(e=>{throw N.create(`idb-open`,{originalErrorMessage:e.message})}),Xt}async function Qt(e){try{let t=(await Zt()).transaction(I),n=await t.objectStore(I).get(en(e));return await t.done,n}catch(e){if(e instanceof S)A.warn(e.message);else{let t=N.create(`idb-get`,{originalErrorMessage:e?.message});A.warn(t.message)}}}async function $t(e,t){try{let n=(await Zt()).transaction(I,`readwrite`);await n.objectStore(I).put(t,en(e)),await n.done}catch(e){if(e instanceof S)A.warn(e.message);else{let t=N.create(`idb-set`,{originalErrorMessage:e?.message});A.warn(t.message)}}}function en(e){return`${e.name}!${e.options.appId}`}var tn=1024,nn=30,rn=class{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider(`app`).getImmediate();this._storage=new sn(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{let e=this.container.getProvider(`platform-logger`).getImmediate().getPlatformInfoString(),t=an();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))return;if(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats.length>nn){let e=ln(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){A.warn(e)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return``;let e=an(),{heartbeatsToSend:t,unsentEntries:n}=on(this._heartbeatsCache.heartbeats),r=g(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}catch(e){return A.warn(e),``}}};function an(){return new Date().toISOString().substring(0,10)}function on(e,t=tn){let n=[],r=e.slice();for(let i of e){let e=n.find(e=>e.agent===i.agent);if(!e){if(n.push({agent:i.agent,dates:[i.date]}),cn(n)>t){n.pop();break}}else if(e.dates.push(i.date),cn(n)>t){e.dates.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}var sn=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return pe()?me().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){let e=await Qt(this.app);return e?.heartbeats?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return $t(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return $t(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}};function cn(e){return g(JSON.stringify({version:2,heartbeats:e})).length}function ln(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let r=1;rnew ot(e),`PRIVATE`)),Ht(new E(`heartbeat`,e=>new rn(e),`PRIVATE`)),F(ct,lt,e),F(ct,lt,`esm2020`),F(`fire-js`,``)}un(``),F(`firebase`,`12.18.0`,`app`);function dn(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}var fn=dn,pn=new C(`auth`,`Firebase`,dn()),mn=new Le(`@firebase/auth`);function hn(e,...t){mn.logLevel<=O.WARN&&mn.warn(`Auth (${P}): ${e}`,...t)}function gn(e,...t){mn.logLevel<=O.ERROR&&mn.error(`Auth (${P}): ${e}`,...t)}function L(e,...t){throw yn(e,...t)}function R(e,...t){return yn(e,...t)}function _n(e,t,n){return new C(`auth`,`Firebase`,{...fn(),[t]:n}).create(t,{appName:e.name})}function z(e){return _n(e,`operation-not-supported-in-this-environment`,`Operations that alter the current user are not supported in conjunction with FirebaseServerApp`)}function vn(e,t,n){let r=n;if(!(t instanceof r))throw r.name!==t.constructor.name&&L(e,`argument-error`),_n(e,`argument-error`,`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function yn(e,...t){if(typeof e!=`string`){let n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return pn.create(e,...t)}function B(e,t,...n){if(!e)throw yn(t,...n)}function V(e){let t=`INTERNAL ASSERTION FAILED: `+e;throw gn(t),Error(t)}function H(e,t){e||V(t)}function bn(){return typeof self<`u`&&self.location?.href||``}function xn(){return Sn()===`http:`||Sn()===`https:`}function Sn(){return typeof self<`u`&&self.location?.protocol||null}function Cn(){return typeof navigator<`u`&&navigator&&`onLine`in navigator&&typeof navigator.onLine==`boolean`&&(xn()||fe()||`connection`in navigator)?navigator.onLine:!0}function wn(){if(typeof navigator>`u`)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}var U=class{constructor(e,t){this.shortDelay=e,this.longDelay=t,H(t>e,`Short delay should be less than long delay!`),this.isMobile=ue()||b()}get(){return Cn()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Tn(e,t){H(e.emulator,`Emulator should always be set here`);let{url:n}=e.emulator;return t?`${n}${t.startsWith(`/`)?t.slice(1):t}`:n}var En=class{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<`u`&&`fetch`in self)return self.fetch;if(typeof globalThis<`u`&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<`u`)return fetch;V(`Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill`)}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<`u`&&`Headers`in self)return self.Headers;if(typeof globalThis<`u`&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<`u`)return Headers;V(`Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill`)}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<`u`&&`Response`in self)return self.Response;if(typeof globalThis<`u`&&globalThis.Response)return globalThis.Response;if(typeof Response<`u`)return Response;V(`Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill`)}},Dn={CREDENTIAL_MISMATCH:`custom-token-mismatch`,MISSING_CUSTOM_TOKEN:`internal-error`,INVALID_IDENTIFIER:`invalid-email`,MISSING_CONTINUE_URI:`internal-error`,INVALID_PASSWORD:`wrong-password`,MISSING_PASSWORD:`missing-password`,INVALID_LOGIN_CREDENTIALS:`invalid-credential`,EMAIL_EXISTS:`email-already-in-use`,PASSWORD_LOGIN_DISABLED:`operation-not-allowed`,INVALID_IDP_RESPONSE:`invalid-credential`,INVALID_PENDING_TOKEN:`invalid-credential`,FEDERATED_USER_ID_ALREADY_LINKED:`credential-already-in-use`,MISSING_REQ_TYPE:`internal-error`,EMAIL_NOT_FOUND:`user-not-found`,RESET_PASSWORD_EXCEED_LIMIT:`too-many-requests`,EXPIRED_OOB_CODE:`expired-action-code`,INVALID_OOB_CODE:`invalid-action-code`,MISSING_OOB_CODE:`internal-error`,CREDENTIAL_TOO_OLD_LOGIN_AGAIN:`requires-recent-login`,INVALID_ID_TOKEN:`invalid-user-token`,TOKEN_EXPIRED:`user-token-expired`,USER_NOT_FOUND:`user-token-expired`,TOO_MANY_ATTEMPTS_TRY_LATER:`too-many-requests`,PASSWORD_DOES_NOT_MEET_REQUIREMENTS:`password-does-not-meet-requirements`,INVALID_CODE:`invalid-verification-code`,INVALID_SESSION_INFO:`invalid-verification-id`,INVALID_TEMPORARY_PROOF:`invalid-credential`,MISSING_SESSION_INFO:`missing-verification-id`,SESSION_EXPIRED:`code-expired`,MISSING_ANDROID_PACKAGE_NAME:`missing-android-pkg-name`,UNAUTHORIZED_DOMAIN:`unauthorized-continue-uri`,INVALID_OAUTH_CLIENT_ID:`invalid-oauth-client-id`,ADMIN_ONLY_OPERATION:`admin-restricted-operation`,INVALID_MFA_PENDING_CREDENTIAL:`invalid-multi-factor-session`,MFA_ENROLLMENT_NOT_FOUND:`multi-factor-info-not-found`,MISSING_MFA_ENROLLMENT_ID:`missing-multi-factor-info`,MISSING_MFA_PENDING_CREDENTIAL:`missing-multi-factor-session`,SECOND_FACTOR_EXISTS:`second-factor-already-in-use`,SECOND_FACTOR_LIMIT_EXCEEDED:`maximum-second-factor-count-exceeded`,BLOCKING_FUNCTION_ERROR_RESPONSE:`internal-error`,RECAPTCHA_NOT_ENABLED:`recaptcha-not-enabled`,MISSING_RECAPTCHA_TOKEN:`missing-recaptcha-token`,INVALID_RECAPTCHA_TOKEN:`invalid-recaptcha-token`,INVALID_RECAPTCHA_ACTION:`invalid-recaptcha-action`,MISSING_CLIENT_TYPE:`missing-client-type`,MISSING_RECAPTCHA_VERSION:`missing-recaptcha-version`,INVALID_RECAPTCHA_VERSION:`invalid-recaptcha-version`,INVALID_REQ_TYPE:`invalid-req-type`},On=[`/v1/accounts:signInWithCustomToken`,`/v1/accounts:signInWithEmailLink`,`/v1/accounts:signInWithIdp`,`/v1/accounts:signInWithPassword`,`/v1/accounts:signInWithPhoneNumber`,`/v1/token`],kn=new U(3e4,6e4);function W(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function G(e,t,n,r,i={}){return An(e,i,async()=>{let i={},a={};r&&(t===`GET`?a=r:i={body:JSON.stringify(r)});let o=ye({...a,key:e.config.apiKey}).slice(1),s=await e._getAdditionalHeaders();s[`Content-Type`]=`application/json`,e.languageCode&&(s[`X-Firebase-Locale`]=e.languageCode);let c={method:t,headers:s,...i};return de()||(c.referrerPolicy=`strict-origin-when-cross-origin`),e.emulatorConfig&&Ee(e.emulatorConfig.host)&&(c.credentials=`include`),En.fetch()(await Mn(e,e.config.apiHost,n,o),c)})}async function An(e,t,n){e._canInitEmulator=!1;let r={...Dn,...t};try{let t=new Pn(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();let a=await i.json();if(`needConfirmation`in a)throw Fn(e,`account-exists-with-different-credential`,a);if(i.ok&&!(`errorMessage`in a))return a;{let[t,n]=(i.ok?a.errorMessage:a.error.message).split(` : `);if(t===`FEDERATED_USER_ID_ALREADY_LINKED`)throw Fn(e,`credential-already-in-use`,a);if(t===`EMAIL_EXISTS`)throw Fn(e,`email-already-in-use`,a);if(t===`USER_DISABLED`)throw Fn(e,`user-disabled`,a);let o=r[t]||t.toLowerCase().replace(/[_\s]+/g,`-`);if(n)throw _n(e,o,n);L(e,o)}}catch(t){if(t instanceof S)throw t;L(e,`network-request-failed`,{message:String(t)})}}async function jn(e,t,n,r,i={}){let a=await G(e,t,n,r,i);return`mfaPendingCredential`in a&&L(e,`multi-factor-auth-required`,{_serverResponse:a}),a}async function Mn(e,t,n,r){let i=`${t}${n}?${r}`,a=e,o=a.config.emulator?Tn(e.config,i):`${e.config.apiScheme}://${i}`;return On.includes(n)&&(await a._persistenceManagerAvailable,a._getPersistenceType()===`COOKIE`)?a._getPersistence()._getFinalTarget(o).toString():o}function Nn(e){switch(e){case`ENFORCE`:return`ENFORCE`;case`AUDIT`:return`AUDIT`;case`OFF`:return`OFF`;default:return`ENFORCEMENT_STATE_UNSPECIFIED`}}var Pn=class{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(R(this.auth,`network-request-failed`)),kn.get())})}};function Fn(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=R(e,t,r);return i.customData._tokenResponse=n,i}function In(e){return e!==void 0&&e.enterprise!==void 0}var Ln=class{constructor(e){if(this.siteKey=``,this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw Error(`recaptchaKey undefined`);this.siteKey=e.recaptchaKey.split(`/`)[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return Nn(t.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)===`ENFORCE`||this.getProviderEnforcementState(e)===`AUDIT`}isAnyProviderEnabled(){return this.isProviderEnabled(`EMAIL_PASSWORD_PROVIDER`)||this.isProviderEnabled(`PHONE_PROVIDER`)}};async function Rn(e,t){return G(e,`GET`,`/v2/recaptchaConfig`,W(e,t))}async function zn(e,t){return G(e,`POST`,`/v1/accounts:delete`,t)}async function Bn(e,t){return G(e,`POST`,`/v1/accounts:lookup`,t)}function Vn(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function Hn(e,t=!1){let n=T(e),r=await n.getIdToken(t),i=Wn(r);B(i&&i.exp&&i.auth_time&&i.iat,n.auth,`internal-error`);let a=typeof i.firebase==`object`?i.firebase:void 0,o=a?.sign_in_provider;return{claims:i,token:r,authTime:Vn(Un(i.auth_time)),issuedAtTime:Vn(Un(i.iat)),expirationTime:Vn(Un(i.exp)),signInProvider:o||null,signInSecondFactor:a?.sign_in_second_factor||null}}function Un(e){return Number(e)*1e3}function Wn(e){let[t,n,r]=e.split(`.`);if(t===void 0||n===void 0||r===void 0)return gn(`JWT malformed, contained fewer than 3 sections`),null;try{let e=ne(n);return e?JSON.parse(e):(gn(`Failed to decode base64 JWT payload`),null)}catch(e){return gn(`Caught error parsing JWT payload as JSON`,e?.toString()),null}}function Gn(e){let t=Wn(e);return B(t,`internal-error`),B(t.exp!==void 0,`internal-error`),B(t.iat!==void 0,`internal-error`),Number(t.exp)-Number(t.iat)}async function Kn(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof S&&qn(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}function qn({code:e}){return e===`auth/user-disabled`||e===`auth/user-token-expired`}var Jn=class{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){if(e){let e=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),e}{this.errorBackoff=3e4;let e=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e?.code===`auth/network-request-failed`&&this.schedule(!0);return}this.schedule()}},Yn=class{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=Vn(this.lastLoginAt),this.creationTime=Vn(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};async function Xn(e){let t=e.auth,n=await Kn(e,Bn(t,{idToken:await e.getIdToken()}));B(n?.users.length,t,`internal-error`);let r=n.users[0];e._notifyReloadListener(r);let i=r.providerUserInfo?.length?$n(r.providerUserInfo):[],a=Qn(e.providerData,i),o=e.isAnonymous,s=!(e.email&&r.passwordHash)&&!a?.length,c=o?s:!1,l={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:a,metadata:new Yn(r.createdAt,r.lastLoginAt),isAnonymous:c};Object.assign(e,l)}async function Zn(e){let t=T(e);await Xn(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function Qn(e,t){return[...e.filter(e=>!t.some(t=>t.providerId===e.providerId)),...t]}function $n(e){return e.map(({providerId:e,...t})=>({providerId:e,uid:t.rawId||``,displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}async function er(e,t){let n=await An(e,{},async()=>{let n=ye({grant_type:`refresh_token`,refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,a=await Mn(e,r,`/v1/token`,`key=${i}`),o=await e._getAdditionalHeaders();o[`Content-Type`]=`application/x-www-form-urlencoded`;let s={method:`POST`,headers:o,body:n};return e.emulatorConfig&&Ee(e.emulatorConfig.host)&&(s.credentials=`include`),En.fetch()(a,s)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function tr(e,t){return G(e,`POST`,`/v2/accounts:revokeToken`,W(e,t))}var nr=class e{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){B(e.idToken,`internal-error`),B(e.idToken!==void 0,`internal-error`),B(e.refreshToken!==void 0,`internal-error`);let t=`expiresIn`in e&&e.expiresIn!==void 0?Number(e.expiresIn):Gn(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){B(e.length!==0,`internal-error`);let t=Gn(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return!t&&this.accessToken&&!this.isExpired?this.accessToken:(B(this.refreshToken,e,`user-token-expired`),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:n,refreshToken:r,expiresIn:i}=await er(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(t,n){let{refreshToken:r,accessToken:i,expirationTime:a}=n,o=new e;return r&&(B(typeof r==`string`,`internal-error`,{appName:t}),o.refreshToken=r),i&&(B(typeof i==`string`,`internal-error`,{appName:t}),o.accessToken=i),a&&(B(typeof a==`number`,`internal-error`,{appName:t}),o.expirationTime=a),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new e,this.toJSON())}_performRefresh(){return V(`not implemented`)}};function K(e,t){B(typeof e==`string`||e===void 0,`internal-error`,{appName:t})}var q=class e{constructor({uid:e,auth:t,stsTokenManager:n,...r}){this.providerId=`firebase`,this.proactiveRefresh=new Jn(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,this.stsTokenManager=n,this.accessToken=n.accessToken,this.displayName=r.displayName||null,this.email=r.email||null,this.emailVerified=r.emailVerified||!1,this.phoneNumber=r.phoneNumber||null,this.photoURL=r.photoURL||null,this.isAnonymous=r.isAnonymous||!1,this.tenantId=r.tenantId||null,this.providerData=r.providerData?[...r.providerData]:[],this.metadata=new Yn(r.createdAt||void 0,r.lastLoginAt||void 0)}async getIdToken(e){let t=await Kn(this,this.stsTokenManager.getToken(this.auth,e));return B(t,this.auth,`internal-error`),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return Hn(this,e)}reload(){return Zn(this)}_assign(e){this!==e&&(B(this.uid===e.uid,this.auth,`internal-error`),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>({...e})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(t){let n=new e({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(e){B(!this.reloadListener,this.auth,`internal-error`),this.reloadListener=e,this.reloadUserInfo&&=(this._notifyReloadListener(this.reloadUserInfo),null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await Xn(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(M(this.auth.app))return Promise.reject(z(this.auth));let e=await this.getIdToken();return await Kn(this,zn(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||``}static _fromJSON(t,n){let r=n.displayName??void 0,i=n.email??void 0,a=n.phoneNumber??void 0,o=n.photoURL??void 0,s=n.tenantId??void 0,c=n._redirectEventId??void 0,l=n.createdAt??void 0,u=n.lastLoginAt??void 0,{uid:d,emailVerified:f,isAnonymous:p,providerData:ee,stsTokenManager:m}=n;B(d&&m,t,`internal-error`);let te=nr.fromJSON(this.name,m);B(typeof d==`string`,t,`internal-error`),K(r,t.name),K(i,t.name),B(typeof f==`boolean`,t,`internal-error`),B(typeof p==`boolean`,t,`internal-error`),K(a,t.name),K(o,t.name),K(s,t.name),K(c,t.name),K(l,t.name),K(u,t.name);let h=new e({uid:d,auth:t,email:i,emailVerified:f,displayName:r,isAnonymous:p,photoURL:o,phoneNumber:a,tenantId:s,stsTokenManager:te,createdAt:l,lastLoginAt:u});return ee&&Array.isArray(ee)&&(h.providerData=ee.map(e=>({...e}))),c&&(h._redirectEventId=c),h}static async _fromIdTokenResponse(t,n,r=!1){let i=new nr;i.updateFromServerResponse(n);let a=new e({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return await Xn(a),a}static async _fromGetAccountInfoResponse(t,n,r){let i=n.users[0];B(i.localId!==void 0,`internal-error`);let a=i.providerUserInfo===void 0?[]:$n(i.providerUserInfo),o=!(i.email&&i.passwordHash)&&!a?.length,s=new nr;s.updateFromIdToken(r);let c=new e({uid:i.localId,auth:t,stsTokenManager:s,isAnonymous:o}),l={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:a,metadata:new Yn(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!a?.length};return Object.assign(c,l),c}},rr=new Map;function J(e){H(e instanceof Function,`Expected a class definition`);let t=rr.get(e);return t?(H(t instanceof e,`Instance stored in cache mismatched with class`),t):(t=new e,rr.set(e,t),t)}var ir=class{constructor(){this.type=`NONE`,this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return t===void 0?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}};ir.type=`NONE`;var ar=ir;function or(e,t,n){return`firebase:${e}:${t}:${n}`}var sr=class e{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=or(this.userKey,r.apiKey,i),this.fullPersistenceKey=or(`persistence`,r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);if(!e)return null;if(typeof e==`string`){let t=await Bn(this.auth,{idToken:e}).catch(()=>void 0);return t?q._fromGetAccountInfoResponse(this.auth,t,e):null}return q._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,r=`authUser`){if(!n.length)return new e(J(ar),t,r);let i=(await Promise.all(n.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),a=i[0]||J(ar),o=or(r,t.config.apiKey,t.name),s=null;for(let e of n)try{let n=await e._get(o);if(n){let r;if(typeof n==`string`){let e=await Bn(t,{idToken:n}).catch(()=>void 0);if(!e)break;r=await q._fromGetAccountInfoResponse(t,e,n)}else r=q._fromJSON(t,n);e!==a&&(s=r),a=e;break}}catch{}let c=i.filter(e=>e._shouldAllowMigration);return!a._shouldAllowMigration||!c.length?new e(a,t,r):(a=c[0],s&&await a._set(o,s.toJSON()),await Promise.all(n.map(async e=>{if(e!==a)try{await e._remove(o)}catch{}})),new e(a,t,r))}};function cr(e){let t=e.toLowerCase();if(t.includes(`opera/`)||t.includes(`opr/`)||t.includes(`opios/`))return`Opera`;if(fr(t))return`IEMobile`;if(t.includes(`msie`)||t.includes(`trident/`))return`IE`;if(t.includes(`edge/`))return`Edge`;if(lr(t))return`Firefox`;if(t.includes(`silk/`))return`Silk`;if(mr(t))return`Blackberry`;if(hr(t))return`Webos`;if(ur(t))return`Safari`;if((t.includes(`chrome/`)||dr(t))&&!t.includes(`edge/`))return`Chrome`;if(pr(t))return`Android`;{let t=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(t?.length===2)return t[1]}return`Other`}function lr(e=y()){return/firefox\//i.test(e)}function ur(e=y()){let t=e.toLowerCase();return t.includes(`safari/`)&&!t.includes(`chrome/`)&&!t.includes(`crios/`)&&!t.includes(`android`)}function dr(e=y()){return/crios\//i.test(e)}function fr(e=y()){return/iemobile/i.test(e)}function pr(e=y()){return/android/i.test(e)}function mr(e=y()){return/blackberry/i.test(e)}function hr(e=y()){return/webos/i.test(e)}function gr(e=y()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function _r(e=y()){return gr(e)&&!!window.navigator?.standalone}function vr(){return x()&&document.documentMode===10}function yr(e=y()){return gr(e)||pr(e)||hr(e)||mr(e)||/windows phone/i.test(e)||fr(e)}function br(e,t=[]){let n;switch(e){case`Browser`:n=cr(y());break;case`Worker`:n=`${cr(y())}-${e}`;break;default:n=e}let r=t.length?t.join(`,`):`FirebaseCore-web`;return`${n}/JsCore/${P}/${r}`}var xr=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{n(e(t))}catch(e){r(e)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){t.reverse();for(let e of t)try{e()}catch{}throw this.auth._errorFactory.create(`login-blocked`,{originalMessage:e?.message})}}};async function Sr(e,t={}){return G(e,`GET`,`/v2/passwordPolicy`,W(e,t))}var Cr=6,wr=class{constructor(e){let t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??Cr,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),t.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),t.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),t.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),t.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState===`ENFORCEMENT_STATE_UNSPECIFIED`&&(this.enforcementState=`OFF`),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join(``)??``,this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&=t.meetsMinPasswordLength??!0,t.isValid&&=t.meetsMaxPasswordLength??!0,t.isValid&&=t.containsLowercaseLetter??!0,t.isValid&&=t.containsUppercaseLetter??!0,t.isValid&&=t.containsNumericCharacter??!0,t.isValid&&=t.containsNonAlphanumericCharacter??!0,t}validatePasswordLengthOptions(e,t){let n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);let n;for(let r=0;r=`a`&&n<=`z`,n>=`A`&&n<=`Z`,n>=`0`&&n<=`9`,this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||=t),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||=n),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||=r),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||=i)}},Tr=class{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Er(this),this.idTokenSubscription=new Er(this),this.beforeStateQueue=new xr(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=pn,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=J(t)),this._initializationPromise=this.queue(async()=>{if(!this._deleted&&(this.persistenceManager=await sr.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(t),this.lastNotifiedUid=this.currentUser?.uid||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{let t=await Bn(this,{idToken:e}),n=await q._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(e){console.warn(`FirebaseServerApp could not login user with provided authIdToken: `,e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(M(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let t=await this.assertedPersistence.getCurrentUser(),n=t,r=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let t=this.redirectUser?._redirectEventId,i=n?._redirectEventId,a=await this.tryRedirectSignIn(e);(!t||t===i)&&a?.user&&(n=a.user,r=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(r)try{await this.beforeStateQueue.runMiddleware(n)}catch(e){n=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return B(this._popupRedirectResolver,this,`argument-error`),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Xn(e)}catch(e){if(e?.code!==`auth/network-request-failed`)return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=wn()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(M(this.app))return Promise.reject(z(this));let t=e?T(e):null;return t&&B(t.auth.config.apiKey===this.config.apiKey,this,`invalid-user-token`),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&B(this.tenantId===e.tenantId,this,`tenant-id-mismatch`),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return M(this.app)?Promise.reject(z(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return M(this.app)?Promise.reject(z(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(J(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion===this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?t.validatePassword(e):Promise.reject(this._errorFactory.create(`unsupported-password-policy-schema-version`,{}))}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new wr(await Sr(this));this.tenantId===null?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new C(`auth`,`Firebase`,e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let n=this.onAuthStateChanged(()=>{n(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:`apple.com`,tokenType:`ACCESS_TOKEN`,token:e,idToken:await this.currentUser.getIdToken()};this.tenantId!=null&&(t.tenantId=this.tenantId),await tr(this,t)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,t){let n=await this.getOrInitRedirectPersistenceManager(t);return e===null?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&J(e)||this._popupRedirectResolver;B(t,this,`argument-error`),this.redirectPersistenceManager=await sr.create(this,[J(t._redirectPersistence)],`redirectUser`),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e?this._currentUser:this.redirectUser?._redirectEventId===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};let i=typeof t==`function`?t:t.next.bind(t),a=!1,o=this._isInitialized?Promise.resolve():this._initializationPromise;if(B(o,this,`internal-error`),o.then(()=>{a||i(this.currentUser)}),typeof t==`function`){let i=e.addObserver(t,n,r);return()=>{a=!0,i()}}{let n=e.addObserver(t);return()=>{a=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return B(this.persistenceManager,this,`internal-error`),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=br(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e[`X-Firebase-gmpid`]=this.app.options.appId);let t=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();t&&(e[`X-Firebase-Client`]=t);let n=await this._getAppCheckToken();return n&&(e[`X-Firebase-AppCheck`]=n),e}async _getAppCheckToken(){if(M(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&hn(`Error while retrieving App Check token: ${e.error}`),e?.token}};function Y(e){return T(e)}var Er=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=Se(e=>this.observer=e)}get next(){return B(this.observer,this.auth,`internal-error`),this.observer.next.bind(this.observer)}},Dr={async loadJS(){throw Error(`Unable to load external scripts`)},recaptchaV2Script:``,recaptchaEnterpriseScript:``,gapiScript:``};function Or(e){Dr=e}function kr(e){return Dr.loadJS(e)}function Ar(){return Dr.recaptchaEnterpriseScript}function jr(){return Dr.gapiScript}function Mr(e){return`__${e}${Math.floor(Math.random()*1e6)}`}var Nr=class{constructor(){this.enterprise=new Pr}ready(e){e()}execute(e,t){return Promise.resolve(`token`)}render(e,t){return``}},Pr=class{ready(e){e()}execute(e,t){return Promise.resolve(`token`)}render(e,t){return``}},Fr=`recaptcha-enterprise`,Ir=`NO_RECAPTCHA`,Lr=`onFirebaseAuthREInstanceReady`,Rr=class e{constructor(e){this.type=Fr,this.auth=Y(e)}async verify(t=`verify`,n=!1){async function r(e){if(!n){if(e.tenantId==null&&e._agentRecaptchaConfig!=null)return e._agentRecaptchaConfig.siteKey;if(e.tenantId!=null&&e._tenantRecaptchaConfigs[e.tenantId]!==void 0)return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>{Rn(e,{clientType:`CLIENT_TYPE_WEB`,version:`RECAPTCHA_ENTERPRISE`}).then(r=>{if(r.recaptchaKey===void 0)n(Error(`recaptcha Enterprise site key undefined`));else{let n=new Ln(r);return e.tenantId==null?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}}).catch(e=>{n(e)})})}function i(e,n,r){let i=window.grecaptcha;In(i)?i.enterprise.ready(()=>{i.enterprise.execute(e,{action:t}).then(e=>{n(e)}).catch(()=>{n(Ir)})}):r(Error(`No reCAPTCHA enterprise script loaded.`))}return this.auth.settings.appVerificationDisabledForTesting?new Nr().execute(`siteKey`,{action:`verify`}):new Promise((t,a)=>{r(this.auth).then(async r=>{if(!n&&In(window.grecaptcha)&&e.scriptInjectionDeferred)await e.scriptInjectionDeferred.promise,i(r,t,a);else{if(typeof window>`u`){a(Error(`RecaptchaVerifier is only supported in browser`));return}let n=Ar();n.length!==0&&(n+=r+`&onload=${Lr}`),e.scriptInjectionDeferred=new v,window[Lr]=()=>{e.scriptInjectionDeferred?.resolve()},kr(n).then(()=>e.scriptInjectionDeferred?.promise).then(()=>{i(r,t,a)}).catch(e=>{a(e)})}}).catch(e=>{a(e)})})}};Rr.scriptInjectionDeferred=null;async function zr(e,t,n,r=!1,i=!1){let a=new Rr(e),o;if(i)o=Ir;else try{o=await a.verify(n)}catch{o=await a.verify(n,!0)}let s={...t};if(n===`mfaSmsEnrollment`||n===`mfaSmsSignIn`){if(`phoneEnrollmentInfo`in s){let e=s.phoneEnrollmentInfo.phoneNumber,t=s.phoneEnrollmentInfo.recaptchaToken;Object.assign(s,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:o,clientType:`CLIENT_TYPE_WEB`,recaptchaVersion:`RECAPTCHA_ENTERPRISE`}})}else if(`phoneSignInInfo`in s){let e=s.phoneSignInInfo.recaptchaToken;Object.assign(s,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:o,clientType:`CLIENT_TYPE_WEB`,recaptchaVersion:`RECAPTCHA_ENTERPRISE`}})}return s}return r?Object.assign(s,{captchaResp:o}):Object.assign(s,{captchaResponse:o}),Object.assign(s,{clientType:`CLIENT_TYPE_WEB`}),Object.assign(s,{recaptchaVersion:`RECAPTCHA_ENTERPRISE`}),s}async function Br(e,t,n,r,i){return i===`EMAIL_PASSWORD_PROVIDER`?e._getRecaptchaConfig()?.isProviderEnabled(`EMAIL_PASSWORD_PROVIDER`)?r(e,await zr(e,t,n,n===`getOobCode`)):r(e,t).catch(async i=>i.code===`auth/missing-recaptcha-token`?(console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`),r(e,await zr(e,t,n,n===`getOobCode`))):Promise.reject(i)):i===`PHONE_PROVIDER`?e._getRecaptchaConfig()?.isProviderEnabled(`PHONE_PROVIDER`)?r(e,await zr(e,t,n)).catch(async i=>e._getRecaptchaConfig()?.getProviderEnforcementState(`PHONE_PROVIDER`)===`AUDIT`&&(i.code===`auth/missing-recaptcha-token`||i.code===`auth/invalid-app-credential`)?(console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${n} flow.`),r(e,await zr(e,t,n,!1,!0))):Promise.reject(i)):r(e,await zr(e,t,n,!1,!0)):Promise.reject(i+` provider is not supported.`)}function Vr(e,t){let n=Ut(e,`auth`);if(n.isInitialized()){let e=n.getImmediate();if(w(n.getOptions(),t??{}))return e;L(e,`already-initialized`)}return n.initialize({options:t})}function Hr(e,t){let n=t?.persistence||[],r=(Array.isArray(n)?n:[n]).map(J);t?.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t?.popupRedirectResolver)}function Ur(e,t,n){let r=Y(e);B(/^https?:\/\//.test(t),r,`invalid-emulator-scheme`);let i=!!n?.disableWarnings,a=Wr(t),{host:o,port:s}=Gr(t),c=s===null?``:`:${s}`,l={url:`${a}//${o}${c}/`},u=Object.freeze({host:o,port:s,protocol:a.replace(`:`,``),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator){B(r.config.emulator&&r.emulatorConfig,r,`emulator-config-failed`),B(w(l,r.config.emulator)&&w(u,r.emulatorConfig),r,`emulator-config-failed`);return}r.config.emulator=l,r.emulatorConfig=u,r.settings.appVerificationDisabledForTesting=!0,Ee(o)?De(`${a}//${o}${c}`):i||qr()}function Wr(e){let t=e.indexOf(`:`);return t<0?``:e.substr(0,t+1)}function Gr(e){let t=Wr(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:``,port:null};let r=n[2].split(`@`).pop()||``,i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let e=i[1];return{host:e,port:Kr(r.substr(e.length+1))}}{let[e,t]=r.split(`:`);return{host:e,port:Kr(t)}}}function Kr(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}function qr(){function e(){let e=document.createElement(`p`),t=e.style;e.innerText=`Running in emulator mode. Do not use with production credentials.`,t.position=`fixed`,t.width=`100%`,t.backgroundColor=`#ffffff`,t.border=`.1em solid #000000`,t.color=`#b50000`,t.bottom=`0px`,t.left=`0px`,t.margin=`0px`,t.zIndex=`10000`,t.textAlign=`center`,e.classList.add(`firebase-emulator-warning`),document.body.appendChild(e)}typeof console<`u`&&typeof console.info==`function`&&console.info(`WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.`),typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?window.addEventListener(`DOMContentLoaded`,e):e())}var Jr=class{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return V(`not implemented`)}_getIdTokenResponse(e){return V(`not implemented`)}_linkToIdToken(e,t){return V(`not implemented`)}_getReauthenticationResolver(e){return V(`not implemented`)}};async function Yr(e,t){return G(e,`POST`,`/v1/accounts:signUp`,t)}async function Xr(e,t){return jn(e,`POST`,`/v1/accounts:signInWithPassword`,W(e,t))}async function Zr(e,t){return G(e,`POST`,`/v1/accounts:sendOobCode`,W(e,t))}async function Qr(e,t){return Zr(e,t)}async function $r(e,t){return jn(e,`POST`,`/v1/accounts:signInWithEmailLink`,W(e,t))}async function ei(e,t){return jn(e,`POST`,`/v1/accounts:signInWithEmailLink`,W(e,t))}var ti=class e extends Jr{constructor(e,t,n,r=null){super(`password`,n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(t,n){return new e(t,n,`password`)}static _fromEmailAndCode(t,n,r=null){return new e(t,n,`emailLink`,r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t=typeof e==`string`?JSON.parse(e):e;if(t?.email&&t?.password){if(t.signInMethod===`password`)return this._fromEmailAndPassword(t.email,t.password);if(t.signInMethod===`emailLink`)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case`password`:return Br(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:`CLIENT_TYPE_WEB`},`signInWithPassword`,Xr,`EMAIL_PASSWORD_PROVIDER`);case`emailLink`:return $r(e,{email:this._email,oobCode:this._password});default:L(e,`internal-error`)}}async _linkToIdToken(e,t){switch(this.signInMethod){case`password`:return Br(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:`CLIENT_TYPE_WEB`},`signUpPassword`,Yr,`EMAIL_PASSWORD_PROVIDER`);case`emailLink`:return ei(e,{idToken:t,email:this._email,oobCode:this._password});default:L(e,`internal-error`)}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}};async function X(e,t){return jn(e,`POST`,`/v1/accounts:signInWithIdp`,W(e,t))}var ni=`http://localhost`,ri=class e extends Jr{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){let n=new e(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):L(`argument-error`),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){let{providerId:n,signInMethod:r,...i}=typeof t==`string`?JSON.parse(t):t;if(!n||!r)return null;let a=new e(n,r);return a.idToken=i.idToken||void 0,a.accessToken=i.accessToken||void 0,a.secret=i.secret,a.nonce=i.nonce,a.pendingToken=i.pendingToken||null,a}_getIdTokenResponse(e){return X(e,this.buildRequest())}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,X(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,X(e,t)}buildRequest(){let e={requestUri:ni,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=ye(t)}return e}};function ii(e){switch(e){case`recoverEmail`:return`RECOVER_EMAIL`;case`resetPassword`:return`PASSWORD_RESET`;case`signIn`:return`EMAIL_SIGNIN`;case`verifyEmail`:return`VERIFY_EMAIL`;case`verifyAndChangeEmail`:return`VERIFY_AND_CHANGE_EMAIL`;case`revertSecondFactorAddition`:return`REVERT_SECOND_FACTOR_ADDITION`;default:return null}}function ai(e){let t=be(xe(e)).link,n=t?be(xe(t)).deep_link_id:null,r=be(xe(e)).deep_link_id;return(r?be(xe(r)).link:null)||r||n||t||e}var oi=class e{constructor(e){let t=be(xe(e)),n=t.apiKey??null,r=t.oobCode??null,i=ii(t.mode??null);B(n&&r&&i,`argument-error`),this.apiKey=n,this.operation=i,this.code=r,this.continueUrl=t.continueUrl??null,this.languageCode=t.lang??null,this.tenantId=t.tenantId??null}static parseLink(t){let n=ai(t);try{return new e(n)}catch{return null}}},si=class e{constructor(){this.providerId=e.PROVIDER_ID}static credential(e,t){return ti._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=oi.parseLink(t);return B(n,`argument-error`),ti._fromEmailAndCode(e,n.code,n.tenantId)}};si.PROVIDER_ID=`password`,si.EMAIL_PASSWORD_SIGN_IN_METHOD=`password`,si.EMAIL_LINK_SIGN_IN_METHOD=`emailLink`;var ci=class{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}},li=class extends ci{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}},ui=class e extends li{constructor(){super(`facebook.com`)}static credential(t){return ri._fromParams({providerId:e.PROVIDER_ID,signInMethod:e.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return e.credentialFromTaggedObject(t)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!(`oauthAccessToken`in t)||!t.oauthAccessToken)return null;try{return e.credential(t.oauthAccessToken)}catch{return null}}};ui.FACEBOOK_SIGN_IN_METHOD=`facebook.com`,ui.PROVIDER_ID=`facebook.com`;var di=class e extends li{constructor(){super(`google.com`),this.addScope(`profile`)}static credential(t,n){return ri._fromParams({providerId:e.PROVIDER_ID,signInMethod:e.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return e.credentialFromTaggedObject(t)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;let{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return e.credential(n,r)}catch{return null}}};di.GOOGLE_SIGN_IN_METHOD=`google.com`,di.PROVIDER_ID=`google.com`;var fi=class e extends li{constructor(){super(`github.com`)}static credential(t){return ri._fromParams({providerId:e.PROVIDER_ID,signInMethod:e.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return e.credentialFromTaggedObject(t)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!(`oauthAccessToken`in t)||!t.oauthAccessToken)return null;try{return e.credential(t.oauthAccessToken)}catch{return null}}};fi.GITHUB_SIGN_IN_METHOD=`github.com`,fi.PROVIDER_ID=`github.com`;var pi=class e extends li{constructor(){super(`twitter.com`)}static credential(t,n){return ri._fromParams({providerId:e.PROVIDER_ID,signInMethod:e.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return e.credentialFromTaggedObject(t)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;let{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return e.credential(n,r)}catch{return null}}};pi.TWITTER_SIGN_IN_METHOD=`twitter.com`,pi.PROVIDER_ID=`twitter.com`;async function mi(e,t){return jn(e,`POST`,`/v1/accounts:signUp`,W(e,t))}var hi=class e{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(t,n,r,i=!1){let a=await q._fromIdTokenResponse(t,r,i),o=gi(r);return new e({user:a,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(t,n,r){await t._updateTokensIfNecessary(r,!0);let i=gi(r);return new e({user:t,providerId:i,_tokenResponse:r,operationType:n})}};function gi(e){return e.providerId?e.providerId:`phoneNumber`in e?`phone`:null}var _i=class e extends S{constructor(t,n,r,i){super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,e.prototype),this.customData={appName:t.name,tenantId:t.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(t,n,r,i){return new e(t,n,r,i)}};function vi(e,t,n,r){return(t===`reauthenticate`?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{throw n.code===`auth/multi-factor-auth-required`?_i._fromErrorAndOperation(e,n,t,r):n})}async function yi(e,t,n=!1){let r=await Kn(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return hi._forOperation(e,`link`,r)}async function bi(e,t,n=!1){let{auth:r}=e;if(M(r.app))return Promise.reject(z(r));let i=`reauthenticate`;try{let a=await Kn(e,vi(r,i,t,e),n);B(a.idToken,r,`internal-error`);let o=Wn(a.idToken);B(o,r,`internal-error`);let{sub:s}=o;return B(e.uid===s,r,`user-mismatch`),hi._forOperation(e,i,a)}catch(e){throw e?.code===`auth/user-not-found`&&L(r,`user-mismatch`),e}}async function xi(e,t,n=!1){if(M(e.app))return Promise.reject(z(e));let r=`signIn`,i=await vi(e,r,t),a=await hi._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(a.user),a}async function Si(e,t){return xi(Y(e),t)}function Ci(e,t,n){B(n.url?.length>0,e,`invalid-continue-uri`),B(n.dynamicLinkDomain===void 0||n.dynamicLinkDomain.length>0,e,`invalid-dynamic-link-domain`),B(n.linkDomain===void 0||n.linkDomain.length>0,e,`invalid-hosting-link-domain`),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.linkDomain=n.linkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(B(n.iOS.bundleId.length>0,e,`missing-ios-bundle-id`),t.iOSBundleId=n.iOS.bundleId),n.android&&(B(n.android.packageName.length>0,e,`missing-android-pkg-name`),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}async function wi(e){let t=Y(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function Ti(e,t,n){if(M(e.app))return Promise.reject(z(e));let r=Y(e),i=await Br(r,{returnSecureToken:!0,email:t,password:n,clientType:`CLIENT_TYPE_WEB`},`signUpPassword`,mi,`EMAIL_PASSWORD_PROVIDER`).catch(t=>{throw t.code===`auth/password-does-not-meet-requirements`&&wi(e),t}),a=await hi._fromIdTokenResponse(r,`signIn`,i);return await r._updateCurrentUser(a.user),a}function Ei(e,t,n){return M(e.app)?Promise.reject(z(e)):Si(T(e),si.credential(t,n)).catch(async t=>{throw t.code===`auth/password-does-not-meet-requirements`&&wi(e),t})}async function Di(e,t){let n=T(e),r={requestType:`VERIFY_EMAIL`,idToken:await e.getIdToken()};t&&Ci(n.auth,r,t);let{email:i}=await Qr(n.auth,r);i!==e.email&&await e.reload()}function Oi(e,t,n,r){return T(e).onIdTokenChanged(t,n,r)}function ki(e,t,n){return T(e).beforeAuthStateChanged(t,n)}function Ai(e,t,n,r){return T(e).onAuthStateChanged(t,n,r)}function Z(e){return T(e).signOut()}var ji=`__sak`,Mi=class{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(ji,`1`),this.storage.removeItem(ji),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}},Ni=1e3,Pi=10,Fi=class extends Mi{constructor(){super(()=>window.localStorage,`LOCAL`),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=yr(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;t?this.detachListener():this.stopPolling();let r=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},i=this.storage.getItem(n);vr()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,Pi):r()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t&&JSON.parse(t))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent(`storage`,{key:e,oldValue:t,newValue:n}),!0)})},Ni)}stopPolling(){this.pollTimer&&=(clearInterval(this.pollTimer),null)}attachListener(){window.addEventListener(`storage`,this.boundEventHandler)}detachListener(){window.removeEventListener(`storage`,this.boundEventHandler)}_addListener(e,t){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}};Fi.type=`LOCAL`;var Ii=Fi,Li=class extends Mi{constructor(){super(()=>window.sessionStorage,`SESSION`)}_addListener(e,t){}_removeListener(e,t){}};Li.type=`SESSION`;var Ri=Li;function zi(e){return Promise.all(e.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(e){return{fulfilled:!1,reason:e}}}))}var Bi=class e{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){let n=this.receivers.find(e=>e.isListeningto(t));if(n)return n;let r=new e(t);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let t=e,{eventId:n,eventType:r,data:i}=t.data,a=this.handlersMap[r];if(!a?.size)return;t.ports[0].postMessage({status:`ack`,eventId:n,eventType:r});let o=await zi(Array.from(a).map(async e=>e(t.origin,i)));t.ports[0].postMessage({status:`done`,eventId:n,eventType:r,response:o})}_subscribe(e,t){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener(`message`,this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),(!t||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener(`message`,this.boundEventHandler)}};Bi.receivers=[];function Vi(e=``,t=10){let n=``;for(let e=0;e{let c=Vi(``,20);r.port1.start();let l=setTimeout(()=>{s(Error(`unsupported_event`))},n);a={messageChannel:r,onMessage(e){let t=e;if(t.data.eventId===c)switch(t.data.status){case`ack`:clearTimeout(l),i=setTimeout(()=>{s(Error(`timeout`))},3e3);break;case`done`:clearTimeout(i),o(t.data.response);break;default:clearTimeout(l),clearTimeout(i),s(Error(`invalid_response`))}}},this.handlers.add(a),r.port1.addEventListener(`message`,a.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[r.port2])}).finally(()=>{a&&this.removeMessageHandler(a)})}};function Q(){return window}function Ui(e){Q().location.href=e}function Wi(){return Q().WorkerGlobalScope!==void 0&&typeof Q().importScripts==`function`}async function Gi(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function Ki(){return navigator?.serviceWorker?.controller||null}function qi(){return Wi()?self:null}var Ji=`firebaseLocalStorageDb`,Yi=1,Xi=`firebaseLocalStorage`,Zi=`fbase_key`,Qi=class{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener(`success`,()=>{e(this.request.result)}),this.request.addEventListener(`error`,()=>{t(this.request.error)})})}};function $i(e,t){return e.transaction([Xi],t?`readwrite`:`readonly`).objectStore(Xi)}function ea(){return new Qi(indexedDB.deleteDatabase(Ji)).toPromise()}function ta(){let e=indexedDB.open(Ji,Yi);return new Promise((t,n)=>{e.addEventListener(`error`,()=>{n(e.error)}),e.addEventListener(`upgradeneeded`,()=>{let t=e.result;try{t.createObjectStore(Xi,{keyPath:Zi})}catch(e){n(e)}}),e.addEventListener(`success`,async()=>{let n=e.result;n.objectStoreNames.contains(Xi)?t(n):(n.close(),await ea(),t(await ta()))})})}async function na(e,t,n){return new Qi($i(e,!0).put({[Zi]:t,value:n})).toPromise()}async function ra(e,t){let n=await new Qi($i(e,!1).get(t)).toPromise();return n===void 0?null:n.value}function ia(e,t){return new Qi($i(e,!0).delete(t)).toPromise()}var aa=800,oa=3,sa=class{registerLifecycleListeners(){typeof window<`u`&&typeof window.addEventListener==`function`&&(window.addEventListener(`pagehide`,this.onPageHide),window.addEventListener(`pageshow`,this.onPageShow))}unregisterLifecycleListeners(){typeof window<`u`&&typeof window.removeEventListener==`function`&&(window.removeEventListener(`pagehide`,this.onPageHide),window.removeEventListener(`pageshow`,this.onPageShow))}constructor(){this.type=`LOCAL`,this.dbPromise=null,this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.isClosing=!1,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this.onPageHide=()=>{this.isClosing=!0,this.stopPolling(),this.dbPromise&&=(this.dbPromise.then(e=>e.close()).catch(()=>{}),null)},this.onPageShow=()=>{this.isClosing&&(this.isClosing=!1,Object.keys(this.listeners).length>0&&this.startPolling())},this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){if(this.isClosing)throw Error(`Database is closing`);return this.dbPromise?this.dbPromise:(this.dbPromise=ta(),this.dbPromise.catch(()=>{this.dbPromise=null}),this.dbPromise)}async _withRetries(e){let t=0;for(;;)try{return await e(await this._openDb())}catch(e){if(this.isClosing||t++>oa)throw e;this.dbPromise&&=((await this.dbPromise).close(),null)}}async initializeServiceWorkerMessaging(){return Wi()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Bi._getInstance(qi()),this.receiver._subscribe(`keyChanged`,async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe(`ping`,async(e,t)=>[`keyChanged`])}async initializeSender(){if(this.activeServiceWorker=await Gi(),!this.activeServiceWorker)return;this.sender=new Hi(this.activeServiceWorker);let e=await this.sender._send(`ping`,{},800);e&&e[0]?.fulfilled&&e[0]?.value.includes(`keyChanged`)&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&Ki()===this.activeServiceWorker)try{await this.sender._send(`keyChanged`,{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{return indexedDB?(await this._withRetries(async e=>{await na(e,ji,`1`),await ia(e,ji)}),!0):!1}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>na(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>ra(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>ia(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){if(this.isClosing)return[];try{let e=await this._withRetries(e=>new Qi($i(e,!1).getAll()).toPromise());if(this.isClosing||!e||this.pendingWrites!==0)return[];let t=[],n=new Set;if(e.length!==0)for(let{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}catch(e){return this.isClosing||hn(`Firebase Auth cross-tab polling failed with error: ${e}`),[]}}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),aa)}stopPolling(){this.pollTimer&&=(clearInterval(this.pollTimer),null)}_addListener(e,t){Object.keys(this.listeners).length===0&&(this.startPolling(),this.registerLifecycleListeners()),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.stopPolling(),this.unregisterLifecycleListeners())}};sa.type=`LOCAL`;var ca=sa;Mr(`rcb`),new U(3e4,6e4);function la(e,t){return t?J(t):(B(e._popupRedirectResolver,e,`argument-error`),e._popupRedirectResolver)}var ua=class extends Jr{constructor(e){super(`custom`,`custom`),this.params=e}_getIdTokenResponse(e){return X(e,this._buildIdpRequest())}_linkToIdToken(e,t){return X(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return X(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}};function da(e){return xi(e.auth,new ua(e),e.bypassAuthState)}function fa(e){let{auth:t,user:n}=e;return B(n,t,`internal-error`),bi(n,new ua(e),e.bypassAuthState)}async function pa(e){let{auth:t,user:n}=e;return B(n,t,`internal-error`),yi(n,new ua(e),e.bypassAuthState)}var ma=class{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:a,type:o}=e;if(a){this.reject(a);return}let s={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(o)(s))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case`signInViaPopup`:case`signInViaRedirect`:return da;case`linkViaPopup`:case`linkViaRedirect`:return pa;case`reauthViaPopup`:case`reauthViaRedirect`:return fa;default:L(this.auth,`internal-error`)}}resolve(e){H(this.pendingPromise,`Pending promise was never set`),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){H(this.pendingPromise,`Pending promise was never set`),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}},ha=new U(2e3,1e4);async function ga(e,t,n){if(M(e.app))return Promise.reject(R(e,`operation-not-supported-in-this-environment`));let r=Y(e);return vn(e,t,ci),new _a(r,`signInViaPopup`,t,la(r,n)).executeNotNull()}var _a=class e extends ma{constructor(t,n,r,i,a){super(t,n,i,a),this.provider=r,this.authWindow=null,this.pollId=null,e.currentPopupAction&&e.currentPopupAction.cancel(),e.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return B(e,this.auth,`internal-error`),e}async onExecution(){H(this.filter.length===1,`Popup operations only handle one event`);let e=Vi();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(R(this.auth,`web-storage-unsupported`))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(R(this.auth,`cancelled-popup-request`))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,e.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(R(this.auth,`popup-closed-by-user`))},8e3);return}this.pollId=window.setTimeout(e,ha.get())};e()}};_a.currentPopupAction=null;var va=`pendingRedirect`,ya=new Map,ba=class extends ma{constructor(e,t,n=!1){super(e,[`signInViaRedirect`,`linkViaRedirect`,`reauthViaRedirect`,`unknown`],t,void 0,n),this.eventId=null}async execute(){let e=ya.get(this.auth._key());if(!e){try{let t=await xa(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}ya.set(this.auth._key(),e)}return this.bypassAuthState||ya.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type===`signInViaRedirect`)return super.onAuthEvent(e);if(e.type===`unknown`){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}};async function xa(e,t){let n=Ta(t),r=wa(e);if(!await r._isAvailable())return!1;let i=await r._get(n)===`true`;return await r._remove(n),i}async function Sa(e,t){return wa(e)._set(Ta(t),`true`)}function Ca(e,t){ya.set(e._key(),t)}function wa(e){return J(e._redirectPersistence)}function Ta(e){return or(va,e.config.apiKey,e.name)}function Ea(e,t,n){return Da(e,t,n)}async function Da(e,t,n){if(M(e.app))return Promise.reject(z(e));let r=Y(e);vn(e,t,ci),await r._initializationPromise;let i=la(r,n);return await Sa(i,r),i._openRedirect(r,t,`signInViaRedirect`)}async function Oa(e,t,n=!1){if(M(e.app))return Promise.reject(z(e));let r=Y(e),i=await new ba(r,la(r,t),n).execute();return i&&!n&&(delete i.user._redirectEventId,await r._persistUserIfCurrent(i.user),await r._setRedirectUser(null,t)),i}var ka=6e5,Aa=class{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!Na(e)?t:(this.hasHandledPotentialRedirect=!0,t||=(this.queuedRedirectEvent=e,!0),t)}sendToConsumer(e,t){if(e.error&&!Ma(e)){let n=e.error.code?.split(`auth/`)[1]||`internal-error`;t.onError(R(this.auth,n))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let n=t.eventId===null||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=ka&&this.cachedEventUids.clear(),this.cachedEventUids.has(ja(e))}saveEventToCache(e){this.cachedEventUids.add(ja(e)),this.lastProcessedEventTime=Date.now()}};function ja(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join(`-`)}function Ma({type:e,error:t}){return e===`unknown`&&t?.code===`auth/no-auth-event`}function Na(e){switch(e.type){case`signInViaRedirect`:case`linkViaRedirect`:case`reauthViaRedirect`:return!0;case`unknown`:return Ma(e);default:return!1}}async function Pa(e,t={}){return G(e,`GET`,`/v1/projects`,t)}var Fa=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Ia=/^https?/;async function La(e){if(e.config.emulator)return;let{authorizedDomains:t}=await Pa(e);for(let e of t)try{if(Ra(e))return}catch{}L(e,`unauthorized-domain`)}function Ra(e){let t=bn(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith(`chrome-extension://`)){let i=new URL(e);return i.hostname===``&&r===``?n===`chrome-extension:`&&e.replace(`chrome-extension://`,``)===t.replace(`chrome-extension://`,``):n===`chrome-extension:`&&i.hostname===r}if(!Ia.test(n))return!1;if(Fa.test(e))return r===e;let i=e.replace(/\./g,`\\.`);return RegExp(`^(.+\\.`+i+`|`+i+`)$`,`i`).test(r)}var za=new U(3e4,6e4);function Ba(){let e=Q().___jsl;if(e?.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t{function r(){Ba(),gapi.load(`gapi.iframes`,{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Ba(),n(R(e,`network-request-failed`))},timeout:za.get()})}if(Q().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(Q().gapi?.load)r();else{let t=Mr(`iframefcb`);return Q()[t]=()=>{gapi.load?r():n(R(e,`network-request-failed`))},kr(`${jr()}?onload=${t}`).catch(e=>n(e))}}).catch(e=>{throw Ha=null,e})}var Ha=null;function Ua(e){return Ha||=Va(e),Ha}var Wa=new U(5e3,15e3),Ga=`__/auth/iframe`,Ka=`emulator/auth/iframe`,qa={style:{position:`absolute`,top:`-100px`,width:`1px`,height:`1px`},"aria-hidden":`true`,tabindex:`-1`},Ja=new Map([[`identitytoolkit.googleapis.com`,`p`],[`staging-identitytoolkit.sandbox.googleapis.com`,`s`],[`test-identitytoolkit.sandbox.googleapis.com`,`t`]]);function Ya(e){let t=e.config;B(t.authDomain,e,`auth-domain-config-required`);let n=t.emulator?Tn(t,Ka):`https://${e.config.authDomain}/${Ga}`,r={apiKey:t.apiKey,appName:e.name,v:P},i=Ja.get(e.config.apiHost);i&&(r.eid=i);let a=e._getFrameworks();return a.length&&(r.fw=a.join(`,`)),`${n}?${ye(r).slice(1)}`}async function Xa(e){let t=await Ua(e),n=Q().gapi;return B(n,e,`internal-error`),t.open({where:document.body,url:Ya(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:qa,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=R(e,`network-request-failed`),a=Q().setTimeout(()=>{r(i)},Wa.get());function o(){Q().clearTimeout(a),n(t)}t.ping(o).then(o,()=>{r(i)})}))}var Za={location:`yes`,resizable:`yes`,statusbar:`yes`,toolbar:`no`},Qa=500,$a=600,eo=`_blank`,to=`http://localhost`,no=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function ro(e,t,n,r=Qa,i=$a){let a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),s=``,c={...Za,width:r.toString(),height:i.toString(),top:a,left:o},l=y().toLowerCase();n&&(s=dr(l)?eo:n),lr(l)&&(t||=to,c.scrollbars=`yes`);let u=Object.entries(c).reduce((e,[t,n])=>`${e}${t}=${n},`,``);if(_r(l)&&s!==`_self`)return io(t||``,s),new no(null);let d=window.open(t||``,s,u);B(d,e,`popup-blocked`);try{d.focus()}catch{}return new no(d)}function io(e,t){let n=document.createElement(`a`);n.href=e,n.target=t;let r=document.createEvent(`MouseEvent`);r.initMouseEvent(`click`,!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}var ao=`__/auth/handler`,oo=`emulator/auth/handler`,so=`fac`;async function co(e,t,n,r,i,a){B(e.config.authDomain,e,`auth-domain-config-required`),B(e.config.apiKey,e,`invalid-api-key`);let o={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:P,eventId:i};if(t instanceof ci){t.setDefaultLanguage(e.languageCode),o.providerId=t.providerId||``,_e(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(let[e,t]of Object.entries(a||{}))o[e]=t}if(t instanceof li){let e=t.getScopes().filter(e=>e!==``);e.length>0&&(o.scopes=e.join(`,`))}e.tenantId&&(o.tid=e.tenantId);let s=o;for(let e of Object.keys(s))s[e]===void 0&&delete s[e];let c=await e._getAppCheckToken(),l=c?`#${so}=${encodeURIComponent(c)}`:``;return`${lo(e)}?${ye(s).slice(1)}${l}`}function lo({config:e}){return e.emulator?Tn(e,oo):`https://${e.authDomain}/${ao}`}var uo=`webStorageSupport`,fo=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Ri,this._completeRedirectFn=Oa,this._overrideRedirectResult=Ca}async _openPopup(e,t,n,r){return H(this.eventManagers[e._key()]?.manager,`_initialize() not called before _openPopup()`),ro(e,await co(e,t,n,bn(),r),Vi())}async _openRedirect(e,t,n,r){return await this._originValidation(e),Ui(await co(e,t,n,bn(),r)),new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(H(n,`If manager is not set, promise should be`),n)}let n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){let t=await Xa(e),n=new Aa(e);return t.register(`authEvent`,t=>(B(t?.authEvent,e,`invalid-auth-event`),{status:n.onEvent(t.authEvent)?`ACK`:`ERROR`}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(uo,{type:uo},n=>{let r=n?.[0]?.[uo];r!==void 0&&t(!!r),L(e,`internal-error`)},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=La(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return yr()||ur()||gr()}},po=`@firebase/auth`,mo=`1.13.5`,ho=class{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e(t?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){B(this.auth._initializationPromise,`dependent-sdk-initialized-before-auth`)}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function go(e){switch(e){case`Node`:return`node`;case`ReactNative`:return`rn`;case`Worker`:return`webworker`;case`Cordova`:return`cordova`;case`WebExtension`:return`web-extension`;default:return}}function _o(e){Ht(new E(`auth`,(t,{options:n})=>{let r=t.getProvider(`app`).getImmediate(),i=t.getProvider(`heartbeat`),a=t.getProvider(`app-check-internal`),{apiKey:o,authDomain:s}=r.options;B(o&&!o.includes(`:`),`invalid-api-key`,{appName:r.name});let c=new Tr(r,i,a,{apiKey:o,authDomain:s,clientPlatform:e,apiHost:`identitytoolkit.googleapis.com`,tokenApiHost:`securetoken.googleapis.com`,apiScheme:`https`,sdkClientVersion:br(e)});return Hr(c,n),c},`PUBLIC`).setInstantiationMode(`EXPLICIT`).setInstanceCreatedCallback((e,t,n)=>{e.getProvider(`auth-internal`).initialize()})),Ht(new E(`auth-internal`,e=>(e=>new ho(e))(Y(e.getProvider(`auth`).getImmediate())),`PRIVATE`).setInstantiationMode(`EXPLICIT`)),F(po,mo,go(e)),F(po,mo,`esm2020`)}var vo=le(`authIdTokenMaxAge`)||300,yo=null,bo=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>vo)return;let i=n?.token;yo!==i&&(yo=i,await fetch(e,{method:i?`POST`:`DELETE`,headers:i?{Authorization:`Bearer ${i}`}:{}}))};function xo(e=Kt()){let t=Ut(e,`auth`);if(t.isInitialized())return t.getImmediate();let n=Vr(e,{popupRedirectResolver:fo,persistence:[ca,Ii,Ri]}),r=le(`authTokenSyncURL`);if(r&&typeof isSecureContext==`boolean`&&isSecureContext){let e=new URL(r,location.origin);if(location.origin===e.origin){let t=bo(e.toString());ki(n,t,()=>t(n.currentUser)),Oi(n,e=>t(e))}}let i=se(`auth`);return i&&Ur(n,`http://${i}`),n}function So(){return document.getElementsByTagName(`head`)?.[0]??document}Or({loadJS(e){return new Promise((t,n)=>{let r=document.createElement(`script`);r.setAttribute(`src`,e),r.onload=t,r.onerror=e=>{let t=R(`internal-error`);t.customData=e,n(t)},r.type=`text/javascript`,r.charset=`UTF-8`,So().appendChild(r)})},gapiScript:`https://apis.google.com/js/api.js`,recaptchaV2Script:`https://www.google.com/recaptcha/api.js`,recaptchaEnterpriseScript:`https://www.google.com/recaptcha/enterprise.js?render=`}),_o(`Browser`);var Co=null,wo=null,To=new di;To.setCustomParameters({prompt:`select_account`});function Eo(e){e&&e.apiKey&&e.projectId&&(Co=qt().length?Kt():Gt(e),wo=xo(Co))}var Do={apiKey:`AIzaSyAdIkWuL0yqiL1jMT7H7Eq0Tc6oyDGaIcc`,authDomain:`algospaced-dsa.firebaseapp.com`,projectId:`algospaced-dsa`,storageBucket:`algospaced-dsa.firebasestorage.app`,messagingSenderId:`1039270308844`,appId:`1:1039270308844:web:6499e8813a9f7926f7aec9`,measurementId:`G-K33PLR1N8E`};Do.apiKey&&Do.projectId&&Eo(Do);function $(){if(!wo){let e={apiKey:`AIzaSyAdIkWuL0yqiL1jMT7H7Eq0Tc6oyDGaIcc`,authDomain:`algospaced-dsa.firebaseapp.com`,projectId:`algospaced-dsa`,storageBucket:`algospaced-dsa.firebasestorage.app`,messagingSenderId:`1039270308844`,appId:`1:1039270308844:web:6499e8813a9f7926f7aec9`,measurementId:`G-K33PLR1N8E`};e.apiKey&&e.projectId&&Eo(e)}return wo}var Oo={get isSandbox(){return localStorage.getItem(`algospaced_sandbox_mode`)===`true`},async getSession(){if(this.isSandbox)return{data:{session:{access_token:`sandbox`,user:{id:`sandbox-user-id`,uid:`sandbox-user-id`,email:`sandbox@algospaced.io`,displayName:`Sandbox Guest`,emailVerified:!0}}},error:null};let e=$();return e?new Promise(t=>{let n=Ai(e,async r=>{if(n(),r){if(!r.emailVerified){await Z(e),t({data:{session:null},error:null});return}try{t({data:{session:{access_token:await r.getIdToken(),user:{id:r.uid,uid:r.uid,email:r.email,displayName:r.displayName,photoURL:r.photoURL,emailVerified:r.emailVerified}}},error:null})}catch(e){t({data:{session:null},error:e})}}else t({data:{session:null},error:null})})}):{data:{session:null},error:null}},async getToken(){let{data:{session:e}}=await this.getSession();return e?.access_token||null},onAuthStateChange(e){if(this.isSandbox){let t={access_token:`sandbox`,user:{id:`sandbox-user-id`,uid:`sandbox-user-id`,email:`sandbox@algospaced.io`,displayName:`Sandbox Guest`,emailVerified:!0}};return setTimeout(()=>e(`SIGNED_IN`,t),0),{data:{subscription:{unsubscribe:()=>{}}}}}let t=$();return t?{data:{subscription:{unsubscribe:Ai(t,async n=>{if(n){if(!n.emailVerified){await Z(t),e(`SIGNED_OUT`,null);return}try{e(`SIGNED_IN`,{access_token:await n.getIdToken(),user:{id:n.uid,uid:n.uid,email:n.email,displayName:n.displayName,photoURL:n.photoURL,emailVerified:n.emailVerified}})}catch{e(`SIGNED_OUT`,null)}}else e(`SIGNED_OUT`,null)})}}}:{data:{subscription:{unsubscribe:()=>{}}}}},async signInWithGoogle(){if(this.isSandbox)return;let e=$();if(!e)throw Error(`Firebase Auth is not initialized.`);try{return await ga(e,To)}catch(t){let n=t;if(n.code===`auth/popup-blocked`||n.code===`auth/cancelled-popup-request`)return await Ea(e,To);throw t}},async signInWithEmail(e,t){if(this.isSandbox)return;let n=$();if(!n)throw Error(`Firebase Auth is not initialized.`);let r=await Ei(n,e.trim(),t);if(!r.user.emailVerified)throw await Z(n),Object.assign(Error(`Your email address is not verified yet. Please check your inbox for the verification link.`),{code:`auth/email-not-verified`});return r},async signUpWithEmail(e,t){if(this.isSandbox)return;let n=$();if(!n)throw Error(`Firebase Auth is not initialized.`);let r=await Ti(n,e.trim(),t);return r.user&&(await Di(r.user),await Z(n)),r},async resendVerificationEmail(e,t){if(this.isSandbox)return;let n=$();if(!n)throw Error(`Firebase Auth is not initialized.`);let r=await Ei(n,e.trim(),t);if(r.user){if(r.user.emailVerified)throw Error(`This email address is already verified. You can sign in directly.`);await Di(r.user),await Z(n)}},async signOut(){if(this.isSandbox){localStorage.removeItem(`algospaced_sandbox_mode`),window.location.reload();return}let e=$();e&&await Z(e),window.location.reload()},enterSandbox(){localStorage.setItem(`algospaced_sandbox_mode`,`true`),window.location.reload()}},ko={auth:Oo},Ao=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),jo=o(((e,t)=>{t.exports=Ao()}));export{d as a,l as c,ko as i,Oo as n,o,Eo as r,s,jo as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/rotate-ccw-CucqdZpm.js b/algospaced-ui/dist/assets/rotate-ccw-CucqdZpm.js new file mode 100644 index 0000000000000000000000000000000000000000..95686ddf60981676e1626af29c9e48ed78be4742 --- /dev/null +++ b/algospaced-ui/dist/assets/rotate-ccw-CucqdZpm.js @@ -0,0 +1 @@ +import{z as e}from"./index-DUIMMmBx.js";var t=e(`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{t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/triangle-alert-BOx1I1tY.js b/algospaced-ui/dist/assets/triangle-alert-BOx1I1tY.js new file mode 100644 index 0000000000000000000000000000000000000000..f105cd241253e67330bbfbba4ffeafad4ad7759d --- /dev/null +++ b/algospaced-ui/dist/assets/triangle-alert-BOx1I1tY.js @@ -0,0 +1 @@ +import{z as e}from"./index-DUIMMmBx.js";var t=e(`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`}]]),n=e(`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 as n,n as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/favicon.svg b/algospaced-ui/dist/favicon.svg new file mode 100644 index 0000000000000000000000000000000000000000..6893eb13237060adc0c968a690149a49faa2d7d3 --- /dev/null +++ b/algospaced-ui/dist/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/algospaced-ui/dist/icons.svg b/algospaced-ui/dist/icons.svg new file mode 100644 index 0000000000000000000000000000000000000000..e9522193d9f796a9748e9ad8c952a5df73c87db9 --- /dev/null +++ b/algospaced-ui/dist/icons.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/algospaced-ui/dist/index.html b/algospaced-ui/dist/index.html new file mode 100644 index 0000000000000000000000000000000000000000..aff73565b379c4d176afa93b0e57538dd8de3f0a --- /dev/null +++ b/algospaced-ui/dist/index.html @@ -0,0 +1,71 @@ + + + + + + + + AlgoSpaced (Beta) - DSA Review + + + + + + + + + +
+ + +
+
+
+
+
Loading Workspace...
+
+
+
+ sports_esports + Start +
+
+
+
+
+
+
+
+ + +
+
+ + + \ No newline at end of file diff --git a/algospaced-ui/dist/manifest.webmanifest b/algospaced-ui/dist/manifest.webmanifest new file mode 100644 index 0000000000000000000000000000000000000000..75ef43836d30dc8d8bc1bfffb07e110f47b01318 --- /dev/null +++ b/algospaced-ui/dist/manifest.webmanifest @@ -0,0 +1 @@ +{"name":"AlgoSpaced DSA Review","short_name":"AlgoSpaced","description":"Spaced repetition for Data Structures and Algorithms","start_url":"/","display":"standalone","background_color":"#fdf8e1","theme_color":"#0ea5e9","lang":"en","scope":"/","icons":[{"src":"favicon.ico","sizes":"64x64 32x32 24x24 16x16","type":"image/x-icon"}]} diff --git a/algospaced-ui/dist/registerSW.js b/algospaced-ui/dist/registerSW.js new file mode 100644 index 0000000000000000000000000000000000000000..d42ac9ed612ba3424c87690f9b41cbf11b8f43b7 --- /dev/null +++ b/algospaced-ui/dist/registerSW.js @@ -0,0 +1 @@ +if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/sw.js', { scope: '/' })})} \ No newline at end of file diff --git a/algospaced-ui/dist/sw.js b/algospaced-ui/dist/sw.js new file mode 100644 index 0000000000000000000000000000000000000000..1152df1757bab6dc5fdc84779f722e626d14adee --- /dev/null +++ b/algospaced-ui/dist/sw.js @@ -0,0 +1 @@ +if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(n,r)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let t={};const u=s=>l(s,i),o={module:{uri:i},exports:t,require:u};e[i]=Promise.all(n.map(s=>o[s]||u(s))).then(s=>(r(...s),t))}}define(["./workbox-9c191d2f"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"765515a54192422155505b2d2d15f94c"},{url:"assets/triangle-alert-BOx1I1tY.js",revision:null},{url:"assets/TerminalEmulator-C4E1edMP.js",revision:null},{url:"assets/Settings-CiPNPtHx.js",revision:null},{url:"assets/rotate-ccw-CucqdZpm.js",revision:null},{url:"assets/ReviewQueue-DMWpFNwe.js",revision:null},{url:"assets/PythonChallenge-DW7sVm2l.js",revision:null},{url:"assets/PrincessChamber-DVAuHg4W.js",revision:null},{url:"assets/MySQLPlayground-n_MnQGWR.js",revision:null},{url:"assets/jsx-runtime-UoOgdb2P.js",revision:null},{url:"assets/JourneyPath-BQEZfHUb.js",revision:null},{url:"assets/info-P8wDUvT9.js",revision:null},{url:"assets/index-YaUnCfgP.css",revision:null},{url:"assets/index-DUIMMmBx.js",revision:null},{url:"assets/FileExplorer-BA3lbKpy.js",revision:null},{url:"assets/CreateProblemForm-tTF8KCdI.js",revision:null},{url:"assets/confetti.module-rliWwYSJ.js",revision:null},{url:"manifest.webmanifest",revision:"7c8ff056d2e188c868d851bcb349e28e"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}); diff --git a/algospaced-ui/dist/workbox-9c191d2f.js b/algospaced-ui/dist/workbox-9c191d2f.js new file mode 100644 index 0000000000000000000000000000000000000000..2ab637f97e2605446952998cf82292b0457a478d --- /dev/null +++ b/algospaced-ui/dist/workbox-9c191d2f.js @@ -0,0 +1 @@ +define(["exports"],function(t){"use strict";try{self["workbox:core:7.4.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.4.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n})),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i(({url:t})=>t.href===s.href,e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter(t=>t&&t.length>0).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.4.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(o,r)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const U=new Set;try{self["workbox:strategies:7.4.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.R=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise(t=>setTimeout(t,i)));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.q(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.R.push(t),t}async doneWaiting(){for(;this.R.length;){const t=this.R.splice(0),e=(await Promise.allSettled(t)).find(t=>"rejected"===t.status);if(e)throw e.reason}}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this._(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,e){let n;const i=e.params||{};if(!this.C)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.P(),await e.cachePut(t,n.clone()))}return n}async O(t,e){this.P();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}P(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.j=new Map,this.k=new Map,this.K=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.T||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.T=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.j.has(i)&&this.j.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.j.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.K.has(t)&&this.K.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.K.set(t,n.integrity)}if(this.j.set(i,t),this.k.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.j){const n=this.K.get(s),i=this.k.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}})}activate(t){return d(t,async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.j.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this.j}getCachedURLs(){return[...this.j.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.j.get(e.href)}getIntegrityForCacheKey(t){return this.K.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class P extends i{constructor(t,e){super(({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some(t=>t.test(s))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}},t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super(t=>this.W(t),t),this.M=e,this.S=s}W({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.S)if(t.test(s))return!1;return!!this.M.some(t=>t.test(s))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter(s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t);return await Promise.all(s.map(t=>self.caches.delete(t))),s})(e).then(t=>{}))})},t.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new P(e,t))}(e)},t.registerRoute=h}); diff --git a/algospaced-ui/eslint.config.js b/algospaced-ui/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..6a03717962caf9902d79f60ce4f5291a9ef7ad7c --- /dev/null +++ b/algospaced-ui/eslint.config.js @@ -0,0 +1,27 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' +import { defineConfig, globalIgnores } from 'eslint/config' +import eslintConfigPrettier from 'eslint-config-prettier' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + globals: globals.browser, + parserOptions: { + typescriptPackageName: '@typescript/typescript6', + }, + }, + }, + eslintConfigPrettier, +]) diff --git a/algospaced-ui/index.html b/algospaced-ui/index.html new file mode 100644 index 0000000000000000000000000000000000000000..8e1a52a8334ac9e1de572eb9c1efb3bd47fb79c6 --- /dev/null +++ b/algospaced-ui/index.html @@ -0,0 +1,69 @@ + + + + + + + + AlgoSpaced (Beta) - DSA Review + + + + + + +
+ + +
+
+
+
+
Loading Workspace...
+
+
+
+ sports_esports + Start +
+
+
+
+
+
+
+
+ + +
+
+ + + + \ No newline at end of file diff --git a/algospaced-ui/package-lock.json b/algospaced-ui/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..d8e949563fa47de305955933958e6f83841163be --- /dev/null +++ b/algospaced-ui/package-lock.json @@ -0,0 +1,9708 @@ +{ + "name": "algospaced-ui", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "algospaced-ui", + "version": "0.0.0", + "dependencies": { + "@codemirror/lang-python": "^6.2.1", + "@types/katex": "^0.16.8", + "@uiw/react-codemirror": "^4.25.11", + "canvas-confetti": "^1.9.4", + "firebase": "^12.18.0", + "katex": "^0.18.5", + "lucide-react": "^1.21.0", + "react": "^19.2.6", + "react-dom": "^19.2.6" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@tailwindcss/vite": "^4.3.1", + "@types/canvas-confetti": "^1.9.0", + "@types/node": "^24.12.3", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", + "@typescript/typescript6": "^6.0.2", + "@vitejs/plugin-react": "^6.0.1", + "autoprefixer": "^10.5.0", + "eslint": "^10.3.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.2", + "globals": "^17.6.0", + "postcss": "^8.5.15", + "prettier": "^3.9.3", + "tailwindcss": "^4.3.1", + "typescript": "~6.0.3", + "typescript-eslint": "^8.59.2", + "typescript7": "npm:typescript@^7.0.2", + "vite": "^8.2.2", + "vite-plugin-pwa": "^1.3.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", + "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@babel/types": "^7.29.8", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.29.7.tgz", + "integrity": "sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.29.7.tgz", + "integrity": "sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-member-expression-to-functions": "^7.29.7", + "@babel/helper-optimise-call-expression": "^7.29.7", + "@babel/helper-replace-supers": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7", + "@babel/traverse": "^7.29.7", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.29.7.tgz", + "integrity": "sha512-907Uymvqgg1dwUA+7IGwFAOSYzQOuzPXKNJ1yxzwPffzkYFg2q2eHi1fIOs6sXkG9NbIUMunnUlkYsfRFNvomg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "regexpu-core": "^6.3.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.8.tgz", + "integrity": "sha512-47UwBLPpQi1NoWzLuHNjRoHlYXMwIJoBf7MFou6viC/sIHWYygpvr0B6IAyh5sBdA2nr2LPIRww8lfaUVQINBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "debug": "^4.4.3", + "lodash.debounce": "^4.0.8", + "resolve": "^1.22.11" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.29.7.tgz", + "integrity": "sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.29.7.tgz", + "integrity": "sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.29.7.tgz", + "integrity": "sha512-16AMiW26DbXWBbr3B8wNozKM0ydMLB892vaOaJW/fPJdnT8vJk5sdkQcU/isqUxyCE0cEoa8wZOcbgDuC4b6Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-wrap-function": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.29.7.tgz", + "integrity": "sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.29.7", + "@babel/helper-optimise-call-expression": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.29.7.tgz", + "integrity": "sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.29.7.tgz", + "integrity": "sha512-iES0Skag9ERIF68aXadpO6dbXa03mNWK3sEqJaMnLNs/eC3l0lkImdfoy6Y09/SfkpawdAB4RjQ7PVA7TcVGdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", + "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.29.7.tgz", + "integrity": "sha512-j8SrR0zLZrRsC09DlszEx8FpMiwukKffYXMK0d5LmOglO7vGG6sz/BR/20yHqWH+Lnn31JTt2PE3hIWNgM2J6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.29.7.tgz", + "integrity": "sha512-r8j8escF+U2FUHo0KOhPUdMzUO+jp9fInva6+ACVAF3Y97Ev+5iNZwiqTghmzNeWwDkOPlYuTcfb1vDaoZKmAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.29.7.tgz", + "integrity": "sha512-GE1TFSiuFeGsCxmYXZl8HwoPrVlwe4rHPFE8weieGKZqnDORK+Ar3vgWMgW+AOxQ6/2TgLSKx9p6W7O4rC6qgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array/-/plugin-bugfix-safari-rest-destructuring-rhs-array-7.29.7.tgz", + "integrity": "sha512-oBNVCvnO5tND+xSopWvV8WNGfpTfgP4Zr/YXXSj8zfmcPktp5Ku/aZlsIowgSD4fjmgHn6sGmB9APVsU5zOdhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.29.7.tgz", + "integrity": "sha512-QQt9qKHZ2sg/kivaLr7lnQr8HVrQDdBNSfCsTjiDxRuX/K5ORyKq+Bu8Xr0cDE3Dfkv0cw28Ve0EKyKMvulkOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7", + "@babel/plugin-transform-optional-chaining": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.29.7.tgz", + "integrity": "sha512-pn6QacGLgvCcwc+syUhKE/qSjV2D1IHDB84RNxWYSt1mW3K/SCtjinZ2p0cETJxAWBjPy3K/1lHwG5BjjPxNlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.29.7.tgz", + "integrity": "sha512-/An1OCBN93thpBAGyfsK2pcf0jvju1SAtKkL2Ny++B5Sy6sqgzXDQH1cZxWbF96Wuk+bn41MDA9bLd4VVAw6rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", + "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.29.7.tgz", + "integrity": "sha512-N7zArUXWzAMzm+/N0uPBeVB3Fam5lMxtUwMmDK5f/IBBS7a7p1qeUoxd/6CckXoxUdgsntq1Dh8xNW06maZbDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.7.tgz", + "integrity": "sha512-d98gXZkgswvkyohMBABkhm3GeXhYj8psWfwQ2C7gtfrKGTykQa/iOIi+JJhwMjPlZ6Vm2XN+DCf3Es1EoG4ZLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-remap-async-to-generator": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.29.7.tgz", + "integrity": "sha512-pcUb2SS+RMo9TWVBwKGI5ShtoG7R+zBsFmCKDa6fe8c+hPr3XJlZgoE5j6i8W7gDjhyvy+85vmYexanvXh3d1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-remap-async-to-generator": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.29.7.tgz", + "integrity": "sha512-cUSmjh72N+rN4PrkFlN1dJwNCwjVp5d38/CQrEsFggkD10UiFlBFgdH3tv5dNsLuHY+3S8db2xCHjhZcv5WgvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.29.7.tgz", + "integrity": "sha512-ONyr4+AZhKh8yKWInVxU9AXA9EbsyeLcL6V0dJy6M2/62vuvpGm29zzuymbTpdc451GEpDIdAyPLP3r+P61yKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.29.7.tgz", + "integrity": "sha512-GtcpjFvanPfzNQi3eTitsCqtRRmmqzpy/A+yhTR1HaZo1Ly3EA8ZXxlPyHdR8/IuRMYc3E4wdGBewB2QKQjAaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.29.7.tgz", + "integrity": "sha512-kibJgmEdX2iMwsHY2tSZNDgj8PwIlCQz7FK9KuGKO8zsuoUwSEhoNnNVp/emKWrbY4HeO6kkXfdMqRKKKXBm2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.29.7.tgz", + "integrity": "sha512-qV0OGGBVacduzQHE649JyCneOFI/maT+YKsO+K4Yi3xv2wTPNjM/W2o2gdzMwEAZz7fXNTHAe0NcSg30bIN69g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-replace-supers": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.29.7.tgz", + "integrity": "sha512-RK7/IyU5phpuCdBAuig5VkzG/EnbDaui5SQGdU9BFrHdV+mV4cUjLMQ9lJDjLNtWHsqtiefpGZUXQP2BiTYMsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/template": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.29.7.tgz", + "integrity": "sha512-iPX8aD6H9zV5s7ZsqTdNocPN/MGQ5sSMnElKrktxjJRMnB2jN/1p2+R7GkfD6CAYoVFqy5A4XnSIUeGgJzIWpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.29.7.tgz", + "integrity": "sha512-3qc18hsD2RdZiyJNDNc7HQpv6xbncwh8FYtxNFFzclSyh/trPD9KkVR9BDECUjDLvb7yJVF15GfYUuC+LMkkiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.29.7.tgz", + "integrity": "sha512-6IvRRriEMqnBwD6chtxdLpMYCHWEzN+oL5cyQtjykya19UgzbmKhxmhZgKC/LHxS2nYr9Q/qYPZ5Lr6jOL9+yQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.29.7.tgz", + "integrity": "sha512-2wiIyo2BjtgU7HufSeDnL9L2O7zr8jmhFKuSr65VpRkUiRKRNpb0mdlk56+XPPKoIrfHqzbMuglDvZun0RISsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.29.7.tgz", + "integrity": "sha512-giOlEm/EFjfjr+te9NsdjkUo2v4f8rS/SXPumRVHAtbNcyNlvtREkU1dZzaIDclNpnaVhlCqRdFKhJBjBikzLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-explicit-resource-management": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.29.7.tgz", + "integrity": "sha512-Rstj7coNz8sE+7Ju7ihpHLI564lsK5pUpNNlvptCIC/16E/S5hbl6n3kESPKdNRmqEWlpn5xpS5Q2dvXBsySLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/plugin-transform-destructuring": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.29.7.tgz", + "integrity": "sha512-zFpMOTLZBdW5LfObqcSbL6kefg4R4eLdmvS0wbN9M6D5Mym/sKm9toOoWyVOa+xDjvCnuWcHls2YonXwHvH3CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.29.7.tgz", + "integrity": "sha512-24B2nOy2TeJSMheqwPD4DDQOV/elLSIlKxjZt4i05H5AgdPdWR3n18HnNrcJ+j76WJd9gbwb9jPjNYUy6RautA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.29.7.tgz", + "integrity": "sha512-zeSIHh0+E1Um1WJRXCFlHQYu2ieJNdivLLjlBEp+dIBu3S51n+SZZmIXjxnItw6pz56Cn+KvK68BIBVsxq2JiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.29.7.tgz", + "integrity": "sha512-otRWaHXE6fbAGkePvaj/kvs3HsqXfPhlnzwSOlnFgbqCPMd975dW+4wZ00WFBt+/YlBGcJwNrARQTOJOb4ZrIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.29.7.tgz", + "integrity": "sha512-RRnE2+eon1rJAq8MnoF1b5kTpY1vU88twHcvcKMrsqP/jxIRqDVs9iJB5fqPuqyeFAW0wJo4MlUIPpQCq/aRsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.29.7.tgz", + "integrity": "sha512-DZ/oLP21ZuWx1vKqnoNv6/tvEK48AQOBRai40CX9dTjGluvT/YZCyY3rryDtyUqCEoyNroy5KKPwX2iQCiRvyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.29.7.tgz", + "integrity": "sha512-A0H91hh6W8MFRkp5TqJmMr39jzGD1A1E1Ysiv2O06Sfbhkapm+XyIzxWCEh5kqwOZ1/8QZ0dY3SeQ7XBqfJd5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.29.7.tgz", + "integrity": "sha512-hl1kwFZCCiDyfH25Xmco9jTrkPgnS9pmOzSG7W5I4SaGbLeqKv417hcU2RKmaxoPEgsoJh7ZPOrnPGq99bHoUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.29.7.tgz", + "integrity": "sha512-fxtQoH3m5ywUSIfaH0FGCzWu4McsYon5bD3K4XnskC7f+OyQMj7rsOMi4NvvmJ83WwBAg4UCe+ov4VZlqEvyew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.29.7.tgz", + "integrity": "sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.8.tgz", + "integrity": "sha512-6iSnEK0zlkLKU4heofK/AdmRD4e2SHVpJMtrwnTCzhnaM98ria4rTrOXBBi45BTTYnJtO8txnPsX4fChYXkmeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.29.7.tgz", + "integrity": "sha512-B4UkaTK3QpgCwJnrxKfMPKdo92CN7OKXAlpAAnM3UPu0Q0lCCk57ylA9AJbRy2v8dDKOPAAWcoR6CMyeoHwRCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.7.tgz", + "integrity": "sha512-vuFoLwr4qnv2xbZ16SQd6uPcH5FNrLHhk/Jzo++0XJFcaDsr4gjJVg6j398oMHiC+83k/GiBzviwF5KBJkPUtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.29.7.tgz", + "integrity": "sha512-fEo41GmsOUhOBlw8ioo6zvjX5Xc2Lqkzlyfqbpsk3eB6TReV18uhxZ0esfEokVbY2+PVJAQHNKxER6lGrzNd3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.29.7.tgz", + "integrity": "sha512-idmp1dFaekP9GbcMvG24Kvw2BfhFZjHnNJCkV4WuIY4PskJzwI3f1N5OdgYke38T7rftO6ERulFRn2cFeZwRkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.29.7.tgz", + "integrity": "sha512-zR7fv/z14OjgHl4AgRtkDBvBMhIzCxqV/qN/2BCRC7LjFwvuzjYe7gDWxC4Wl/SNsLM6SE1IWvRPYMgSJaUvNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.29.7.tgz", + "integrity": "sha512-Ld98jn4c0smUywL57m7SgsHq3OpThOa6LqZJif3G6jYOovPleoFhVrBJ1WegRApSFB2wu4+RelAj9AC9G08Z4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/plugin-transform-destructuring": "^7.29.7", + "@babel/plugin-transform-parameters": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.29.7.tgz", + "integrity": "sha512-Ea/diGcw0twB5IlZPO5sgET6fJsLJqPABqTuFWIR+iMPGPZJkATEIWx0wa+aEQ5UY1CBQyP/gkAiLEqn1vBiQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-replace-supers": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.29.7.tgz", + "integrity": "sha512-sLsyndxK2VwX6yNUOakMb7Sh553ZTe/vVM1XJ+9Z5aW1ytsc8xOIwmyk05NNjN60vkc5/KqoTH6hB4V41LJhng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.29.7.tgz", + "integrity": "sha512-6GM1dhvK3gNODkXcEcMCOLEDCLSoZ/sBbro2Ax8HURyasQ4NshagQixkRFdh5niI6E4gmA/jYI/4aT7rRos3ZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.29.7.tgz", + "integrity": "sha512-ZDOBqV/qLYJI0YElr8DcENEyARsFQeESqWXH6gZlghYXuPPjvweuDhP4VyEi4BlUBlLRFZVjxoZDMjxhLW766g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.29.7.tgz", + "integrity": "sha512-/6Rz4DK1ETDEM/bWHsPHcaEe7ZaT1EqSXjtSP/L0DijOYuaUhiRiOKcwpZ8P7zR4xXEHc2ITdiCgBm9Tpyv9ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.29.7.tgz", + "integrity": "sha512-+BNo06dnrzdNNqCm1X6YUaVv0DKk8Q+JYcoZfOkLhYWNCXzlwTSRq8zGWayT1csjcpNXV9CQTBRRbmTLZac5cA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.29.7.tgz", + "integrity": "sha512-bOMRLQuI0A5ZqHq3OWJ89/rXpJ/NJrbVhXiP4zwPGMs6kpcVsuTUNjwoE30K0Qm3mf48a/TnRYYD6vPNqcg6jA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.8.tgz", + "integrity": "sha512-0UpIXPtdDtMXfnV2OJAVMLpj3H/92vmkA6lpSRakmycJvj3VUy6Xs1dM8tXRugupykr5WB+LpiVl0J8LMVg2mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regexp-modifiers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.29.7.tgz", + "integrity": "sha512-mB5Fs0VWrJ42ZCmc8114v60qetdaUVNkj9PmSZRmanCZM3S9hm0CFRLjRmYIsuXav14l2jvZ+4T8iiCGnhj3nQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.29.7.tgz", + "integrity": "sha512-5+YhdpVgmfSmwZyLMftfaiffLRMHjzIRHFHHLdibcSyJm2pasMrKHrO3Ptrt2DRshjvpgjEJJ1zVW14WPq/6QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.29.7.tgz", + "integrity": "sha512-I+WYbGBAiCn7nA6xBrlgPH+MB7HWb4u8pv5S0Pv7OtwNvIFvCCb24YlttKEeUFVurfBCEaOTnuhlqsb7f0Z5Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.29.8.tgz", + "integrity": "sha512-4S9ksMGVWUshvgK0mKfvZky7leuG5/uoFVwMpAomJ8bMoDJiNHRVmc1EglwW/CmGVSqqWpEbXm9FmbRit22qoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.29.7.tgz", + "integrity": "sha512-BCHzNYJGe9l7EpwwDBN/ztlL2NYFFq8hp9ddjtUEM9f2O7S7kKV/lL6Fwo7IF7NSkYhPK2vO+86nIGltA90MsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.29.7.tgz", + "integrity": "sha512-NCSEJ4sLFU2gqAub45HYh4fus2yQ36rr6ei6vpU7NdoJqCpxvEG8E6eJpscGyXP3VHD2Ny+fSXr04k1hoUrFqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.29.7.tgz", + "integrity": "sha512-223mNGoTkBiTEWFoK+Q6Go3tueMRclO8vxxxxquNCYuNI4jWOofFKJRRDu6SDrB8Sgo1UEGW9T4GAQ8ZyRso1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.29.7.tgz", + "integrity": "sha512-jCfXxSjf94lf4E0hKE0AByxF6F3/pVFqRdUUNkDJhsY0m1ZKjnN6ZYyMeHNpzflxb/0q5b7t3p+BE+SLF1WOtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.29.7.tgz", + "integrity": "sha512-OgZ+zoAJgZLUCunsTRQ5LAjOywDv5zzZ2/hQ5aMw1pGXyY2rtE8/chXYUmu3AlVHKpm10KEdG9aMwbI/K76ZGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.29.7.tgz", + "integrity": "sha512-7D/x/23/d/3VqZ0QA+LGbZMlGwZjztBygSWWWsfTPoQ1oQ6Q1P6Mr3d0kk42XabyUVw+fha3LqdRsFqeKqvCyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.29.7.tgz", + "integrity": "sha512-BLOhLht9DOJwIxlmp91wHvkXv1lguuHS3/FwUO8HL1H0u8s4hR1gASVFyilu9iGtcTRYqjTZmlsFFeQletntEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.29.7.tgz", + "integrity": "sha512-GYzX36n1nsciIb0uyH0GHwxwtNwPQIcpxSeiVLDtG/B7jB5xXgchnmL1f/jCX5o+pwnaDBtO60ONSJhEBJfxYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.29.7", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.29.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.29.7", + "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "^7.29.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.29.7", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.29.7", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-import-assertions": "^7.29.7", + "@babel/plugin-syntax-import-attributes": "^7.29.7", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.29.7", + "@babel/plugin-transform-async-generator-functions": "^7.29.7", + "@babel/plugin-transform-async-to-generator": "^7.29.7", + "@babel/plugin-transform-block-scoped-functions": "^7.29.7", + "@babel/plugin-transform-block-scoping": "^7.29.7", + "@babel/plugin-transform-class-properties": "^7.29.7", + "@babel/plugin-transform-class-static-block": "^7.29.7", + "@babel/plugin-transform-classes": "^7.29.7", + "@babel/plugin-transform-computed-properties": "^7.29.7", + "@babel/plugin-transform-destructuring": "^7.29.7", + "@babel/plugin-transform-dotall-regex": "^7.29.7", + "@babel/plugin-transform-duplicate-keys": "^7.29.7", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.29.7", + "@babel/plugin-transform-dynamic-import": "^7.29.7", + "@babel/plugin-transform-explicit-resource-management": "^7.29.7", + "@babel/plugin-transform-exponentiation-operator": "^7.29.7", + "@babel/plugin-transform-export-namespace-from": "^7.29.7", + "@babel/plugin-transform-for-of": "^7.29.7", + "@babel/plugin-transform-function-name": "^7.29.7", + "@babel/plugin-transform-json-strings": "^7.29.7", + "@babel/plugin-transform-literals": "^7.29.7", + "@babel/plugin-transform-logical-assignment-operators": "^7.29.7", + "@babel/plugin-transform-member-expression-literals": "^7.29.7", + "@babel/plugin-transform-modules-amd": "^7.29.7", + "@babel/plugin-transform-modules-commonjs": "^7.29.7", + "@babel/plugin-transform-modules-systemjs": "^7.29.7", + "@babel/plugin-transform-modules-umd": "^7.29.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.29.7", + "@babel/plugin-transform-new-target": "^7.29.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.29.7", + "@babel/plugin-transform-numeric-separator": "^7.29.7", + "@babel/plugin-transform-object-rest-spread": "^7.29.7", + "@babel/plugin-transform-object-super": "^7.29.7", + "@babel/plugin-transform-optional-catch-binding": "^7.29.7", + "@babel/plugin-transform-optional-chaining": "^7.29.7", + "@babel/plugin-transform-parameters": "^7.29.7", + "@babel/plugin-transform-private-methods": "^7.29.7", + "@babel/plugin-transform-private-property-in-object": "^7.29.7", + "@babel/plugin-transform-property-literals": "^7.29.7", + "@babel/plugin-transform-regenerator": "^7.29.7", + "@babel/plugin-transform-regexp-modifiers": "^7.29.7", + "@babel/plugin-transform-reserved-words": "^7.29.7", + "@babel/plugin-transform-shorthand-properties": "^7.29.7", + "@babel/plugin-transform-spread": "^7.29.7", + "@babel/plugin-transform-sticky-regex": "^7.29.7", + "@babel/plugin-transform-template-literals": "^7.29.7", + "@babel/plugin-transform-typeof-symbol": "^7.29.7", + "@babel/plugin-transform-unicode-escapes": "^7.29.7", + "@babel/plugin-transform-unicode-property-regex": "^7.29.7", + "@babel/plugin-transform-unicode-regex": "^7.29.7", + "@babel/plugin-transform-unicode-sets-regex": "^7.29.7", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.15", + "babel-plugin-polyfill-corejs3": "^0.14.0", + "babel-plugin-polyfill-regenerator": "^0.6.6", + "core-js-compat": "^3.48.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz", + "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.8", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.8", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.8", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@codemirror/autocomplete": { + "version": "6.20.3", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.3.tgz", + "integrity": "sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.11.0.tgz", + "integrity": "sha512-/K4Rl5BN0OtTiPWmJCdqODu38XnDMsDxKY5rgrPnCkutPTJf2wVbkoixLfealF5Kwse/s8P8M5jAiURiwSwnFA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.7.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/lang-python": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.2.1.tgz", + "integrity": "sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.3.2", + "@codemirror/language": "^6.8.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.1", + "@lezer/python": "^1.1.4" + } + }, + "node_modules/@codemirror/language": { + "version": "6.12.4", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.4.tgz", + "integrity": "sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.5.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.7.tgz", + "integrity": "sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.42.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/search": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.7.2.tgz", + "integrity": "sha512-gUYkYhT2+n/+VGZ+8EzE5WFkYZUZYm1VOKDudIsNqh42uRVQJ0a6Yss9sdKT3MeOYfuL1N6AZA57oza0Oyr0LA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.37.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.2.tgz", + "integrity": "sha512-U3RiPX62Wl/Gx4ftQ7UxLlloSfsFTQqKa+7vFBYteZGCzkp6oBqcsD7iSwniWRGobCAmDcwZSY+Six3+3ztdfg==", + "license": "MIT", + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/theme-one-dark": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.3.tgz", + "integrity": "sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/highlight": "^1.0.0" + } + }, + "node_modules/@codemirror/view": { + "version": "6.43.11", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.11.tgz", + "integrity": "sha512-2+esucbQX6wB2JYi1eDvdCPFTA31BN8oSy6xCmk3G6CloV11yOvEjYk+gH7kLrP0MuHG94E8WDhjs5oMiu3+Wg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/state": "^6.7.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", + "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@firebase/ai": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/@firebase/ai/-/ai-2.15.0.tgz", + "integrity": "sha512-Aj7TbFdAIWZdkX8JfdDStERpR35g6WNs+7XhNPtFLFOizUotj6k4N/D8HJkR45165HhnMJBe4hjOeeaxnnn56Q==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.5", + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-types": "0.x" + } + }, + "node_modules/@firebase/analytics": { + "version": "0.10.24", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.24.tgz", + "integrity": "sha512-OfIAcIIwoqXjBzS+DnUQpOZ7i3ePaNFg83KPpDWjBZUKJmqMwzzAtLJqmKZOkQnW8im6vFR6f2I3M/9hxVd+QA==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/installations": "0.6.24", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/analytics-compat": { + "version": "0.2.30", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.30.tgz", + "integrity": "sha512-uVZEKlLaW4AHAhv8zoN9cTmveX6v86AVqcJ4LCaRCMTChTH8/NsjbisTq1lpBfWCLWS1spqwSHB4vol/YSCdMA==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/analytics": "0.10.24", + "@firebase/analytics-types": "0.8.5", + "@firebase/component": "0.7.5", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/analytics-types": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.5.tgz", + "integrity": "sha512-kdnooE7Bis2jEnsqcerRwn/UQpH5D3uvHpku7OdUM9TJN3omlu6iYtbyAQ6XkAJRgJtO0aNf9OOkW8J6D59oCA==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/app": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.16.1.tgz", + "integrity": "sha512-tjUEorFyKrurH7PbLWv9zDHRuU4mLefgD/yY38D584ziorIRlQz/PVjx4c/SCGyCuUlmyzt72mK+Lh+COAywNQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-check": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.13.1.tgz", + "integrity": "sha512-l8y3dmnhodXks/APAwx4tWqRl3tk8b9874KF1FJyKg1DIU+kMD0l52iz7S9/MW+eK8k6cjJg0G0iJ5KQAsQpow==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/app-check-compat": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.4.7.tgz", + "integrity": "sha512-fBb/xSMyIKv1nDmccfzz3IAGBzx/cQOxmZai66rJzifb1hMMkztf824Xx7LhpTUe7HNUbXwY90IvJ66fi8q6yg==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check": "0.13.1", + "@firebase/app-check-types": "0.5.5", + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/app-check-interop-types": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.5.tgz", + "integrity": "sha512-qId34pVZ2CXTmtu4ofW5leiI93DvnOvIcr/5GT7MZPw5WXAi6nZoU+g9cNRgl7K90UJSbK0cXxten4meYMPyZg==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/app-check-types": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.5.tgz", + "integrity": "sha512-+DF4gzFrlwGFyky38o4T/YN/r51l70yCtJ2HTkwmRj8FCMwPjm4hLH4fQbj6BUvzkiFqliBkitFsRpf1/YZkWA==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/app-compat": { + "version": "0.5.17", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.5.17.tgz", + "integrity": "sha512-5GdJWobqs6jbNYOnaQiSa4Ng8gnFerhqr7nY+v5jlnT7o9QbEeIZRLPQpnLe0TxYSWfRV2lAMbyR0kbXeIos9Q==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/app": "0.16.1", + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/app-types": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.6.tgz", + "integrity": "sha512-yPLahy7Esfu2w/yme3msVK4xTkDXQqq6szfQn8yVOQpCKiT5GVFjqNpLbuz6NkX0WuTwUidkmPewW3r4xkvpeg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@firebase/logger": "0.5.2" + } + }, + "node_modules/@firebase/auth": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.13.5.tgz", + "integrity": "sha512-1AXoBJqBVD8WL8FZYo3S2GmJF9YUoom6Y6ngMxOSkzzhW5sT83pLchb6TGFgxes91dfXx8s/VYc5VrLDNqpLog==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@react-native-async-storage/async-storage": "^2.2.0 || ^3.0.0" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + } + } + }, + "node_modules/@firebase/auth-compat": { + "version": "0.6.10", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.6.10.tgz", + "integrity": "sha512-Bvklg2nL7BrBFCAqdsleW8fse9Jh0fARqJPlJmA40uermfWx1bJiO7dnKyZN3J39d2TFVd4VJXtg3i6Wg92/YQ==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/auth": "1.13.5", + "@firebase/auth-types": "0.13.2", + "@firebase/component": "0.7.5", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/auth-interop-types": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.6.tgz", + "integrity": "sha512-FgwZqDrBqgK0BHI70QTv1v/5wmuDF9f8fsJFvKSxoRlK2PPfSQtZAk2jhXu4pe9BZzFi/e4UYusU/bEQHdf6Qg==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/auth-types": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.13.2.tgz", + "integrity": "sha512-OU+miuoSxIWYN7GT291d2ylVJBL3k/OePo7/JDSoQtkFQoEiGBc4AHuMjj/seqFIsHrqnjrAfRCk4pfufoJolQ==", + "license": "Apache-2.0", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/component": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.7.5.tgz", + "integrity": "sha512-vuFDcL91Q+2ZuBJkyOh86T4q0B4ffNTDjc/A38tybO56odQABxRTFLTIowCWqAKeIcgo37GowWMVgFF73gD8Qw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/data-connect": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.7.4.tgz", + "integrity": "sha512-su1aGWlzhxb+xtggCUSsufJn1FDa06SBDK71y+fpQ+g2zMhMExik6FUv/odkKzOF/xfWVjabCbWBcjJY3MceDA==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/auth-interop-types": "0.2.6", + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/database": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.1.5.tgz", + "integrity": "sha512-/JGpvszLoNXNgzilRXocigGfFF4hbcPA9wN1i1kjJx6oKkXgkHteZYl3lQs1lJX3ETDf6bv7zI15lPMVUp4sAQ==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.5", + "@firebase/auth-interop-types": "0.2.6", + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "faye-websocket": "0.11.4", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/database-compat": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-2.1.7.tgz", + "integrity": "sha512-lBq9sJm8MnJINKJnkAKSOj2MbC66xGoSVCcGkPtstl+lkoKEBtD46qHLbuDgW/WbLPoKVm17RIN8BxHj+Z2F2w==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/database": "1.1.5", + "@firebase/database-types": "1.0.22", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + }, + "peerDependenciesMeta": { + "@firebase/app": { + "optional": true + }, + "@firebase/app-compat": { + "optional": true + } + } + }, + "node_modules/@firebase/database-types": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.22.tgz", + "integrity": "sha512-YAZNXsjY9EQQ+pKw/3ax8n5FgolHC7Qew7EY5RceYdl0R2ZP+kCv1O0DkKlcceue8uQCOreHCNN7PWVFpY1Nug==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-types": "0.9.6", + "@firebase/util": "1.15.3" + } + }, + "node_modules/@firebase/firestore": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.17.1.tgz", + "integrity": "sha512-8lqPNf2w10CtYG+tayVjZO1pSyQpnhztQRudeD109VtXDzNbASTaYdO43sj5PMsDcWq0aOYY3RmJOUlXu9++jw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "@firebase/webchannel-wrapper": "1.0.7", + "@grpc/grpc-js": "~1.9.0", + "@grpc/proto-loader": "^0.7.8", + "re2js": "^2.8.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/firestore-compat": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.4.13.tgz", + "integrity": "sha512-l9dCewxMzzLOIhcwTjERCKxrWOn1kZ9JvwOQq9zZNq4I/Nbvb/B9njT230V61uvQ9qZ3/qpUG758D8DDTEFXnw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/firestore": "4.17.1", + "@firebase/firestore-types": "3.0.5", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/firestore-types": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-3.0.5.tgz", + "integrity": "sha512-dbdMAQkMd5dwWc48eupz/Y6/E9ruat3+gY5lhVKscvvT/HnDBEEMzJW38zdKhgdnglZHGk2vUsJMOHAphMHGMA==", + "license": "Apache-2.0", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/functions": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.14.0.tgz", + "integrity": "sha512-DhuYFr0eMhp+s/PNEk6SiMsYkc00+XVOUeKbrl8MOzQNZI3SKQpqoDR1d+keNDAutwmHRWTUAdXBoVPD+xxVUw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.5", + "@firebase/auth-interop-types": "0.2.6", + "@firebase/component": "0.7.5", + "@firebase/messaging-interop-types": "0.2.6", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/functions-compat": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.5.0.tgz", + "integrity": "sha512-T3BDIToESZUHt7438wyKYMkRjKg3m1xAIux5fVpNvTRQlDOFLukWniQWBDhJ2znpU9kxMTR6+e31TVo8P15PZw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/functions": "0.14.0", + "@firebase/functions-types": "0.6.5", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/functions-types": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.5.tgz", + "integrity": "sha512-Zc0pURjthHXzSj54ZivCkzKDSV1r/wIpnmHdhq82q2yFFPVoncG/ZJjnVMiANvQfeww/QnElhzODpfwUucVwdA==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/installations": { + "version": "0.6.24", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.24.tgz", + "integrity": "sha512-Ui52ey8wHoWqkBbXRKJEKYWylI0JZogZmoLS+o8Anh1bxWtK27ZYjLla1UJAAdC5DCKLJ2qAp0VpJOjg8VOX1g==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/util": "1.15.3", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/installations-compat": { + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.24.tgz", + "integrity": "sha512-8M5nlcWwYt881x83COP2odq5vgf+NgwJh+RMd4LRSv8JI1pxwDfgrDJOERrjTgfC9J5Z0vnQX4b1pdN914e0Zw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/installations": "0.6.24", + "@firebase/installations-types": "0.5.5", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/installations-types": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.5.tgz", + "integrity": "sha512-e9UYcju3puDl1vdrcKIi5dExzHLameOT/Tc61Q48PYwxtsM1NzZh/ikGbdBQTsbRgg0EMZqdPr0/m5ODUBobrg==", + "license": "Apache-2.0", + "peerDependencies": { + "@firebase/app-types": "0.x" + } + }, + "node_modules/@firebase/logger": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.5.2.tgz", + "integrity": "sha512-J2VO4NFTc0xQFrxV1B/lm5balicm9cwuX2acR9Yn41fN8KgUeQFo+VJV222IqW2FPSXKDu9uo5WdQFWf9TPbYg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/messaging": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.13.2.tgz", + "integrity": "sha512-KcZoqUu2ih4sLH91dW9tmyHjCR0IQyNzSLZunX5uq7cLeImXb4uO2I0wq5FACduO2I+FoTeWa2BtUv7Jpowqdw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/installations": "0.6.24", + "@firebase/messaging-interop-types": "0.2.6", + "@firebase/util": "1.15.3", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/messaging-compat": { + "version": "0.2.29", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.29.tgz", + "integrity": "sha512-8Twe4CeYvAx8AzjBxyyQFKzinaMGGt13hPQBqaARQ2QZjagrEaqSVBe+Zy6F4L/vT8DV168yRgRu7W/RK7p+4w==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/messaging": "0.13.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/messaging-interop-types": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.6.tgz", + "integrity": "sha512-MVzvkKe2V4H2dHu5oOxRfeKQcfTwWmCgnzsC4V1q3ixun5iiL8riCZ2qI35rDhCL4glPGiu0jHxDbpVNuTKfow==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/performance": { + "version": "0.7.14", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.7.14.tgz", + "integrity": "sha512-9PH1XEZVHErxGdbXluvGz4Uyjw4W955H8v7Mv9rHIybRrg5F2Ac2tvf5+mSf5EtnxWNmxrD2WLnvMFaZP4sMrQ==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/installations": "0.6.24", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0", + "web-vitals": "^4.2.4" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/performance-compat": { + "version": "0.2.27", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.27.tgz", + "integrity": "sha512-O/ozTf/EbChN94Pk7bd1eUC0PAC36726AwsaiJyC0bZzSBWfLGSWASGPH5pebUWXQPJtGxIJYRkkbX5l0Qa+Hw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/performance": "0.7.14", + "@firebase/performance-types": "0.2.5", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/performance-types": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.5.tgz", + "integrity": "sha512-PRzOgB+/M+6AKlEkY8a9xy5Ff5SfZPIh4iShXhn2WAcL/euSbK7bdLqWysHduunNJhGFsXa22Ag3ixqL6rQtYg==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/remote-config": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.9.2.tgz", + "integrity": "sha512-Rii93DkXjM+RE/ytHdYa7EIiQLJbdBr+W8EEiqd/vbLCOC+1FdkDuRiumJBp6t3yewHGbdqbpjB3fk3z0cZ+8g==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/installations": "0.6.24", + "@firebase/logger": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/remote-config-compat": { + "version": "0.2.29", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.29.tgz", + "integrity": "sha512-mY7JtTISK6F4g4T0x3kVepr5cp0NXL7f5yjIUXXGaTrg4qUlFBWRbENaHaqZ78dwmNcLm24h/yPsOVRlDXEXhA==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/logger": "0.5.2", + "@firebase/remote-config": "0.9.2", + "@firebase/remote-config-types": "0.5.2", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/remote-config-types": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.5.2.tgz", + "integrity": "sha512-i8k1omVfoAnaT1ZPv2FFjxMZrATYsO/GnFgHEj5+7fAJLzi8wLnGGv1WK06oEAD6ltrWXSO1HzeNyajn/NjMWw==", + "license": "Apache-2.0" + }, + "node_modules/@firebase/storage": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.14.5.tgz", + "integrity": "sha512-r2tozN/BlEewLi70tJNUQPzWwbex9GM7NgXZsamHKQrjKEfcR0i4jGgHBKAKA4hbwiPE9eNMb3hcxWnDpeJZwg==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/storage-compat": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.4.5.tgz", + "integrity": "sha512-vO0tFPxXbKDKdlTu8tYT08S9t9ezUTJYEdLCULpWxWq2aq6zojwN1QmAB+1a50AI/g47GlWUJn1XPncm/PDZsw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/component": "0.7.5", + "@firebase/storage": "0.14.5", + "@firebase/storage-types": "0.8.5", + "@firebase/util": "1.15.3", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@firebase/app": "0.x", + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/storage-types": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.5.tgz", + "integrity": "sha512-GEDs5P+rNUfNcS+wxIdOLAHficife2YXtvTJnyi3ssrX11AAtBg+nDUdbYh8vuBzWehVQZPmztGUUnud4L+4yg==", + "license": "Apache-2.0", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/util": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.15.3.tgz", + "integrity": "sha512-c/z/gaIlaaLZEuGbE6sLUuJ61tskg1JghvhcNQzW948ASBinbVBBRnZTC4b4yt4LaEtJQkYlyzqLHcutFwEIvA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@firebase/webchannel-wrapper": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-1.0.7.tgz", + "integrity": "sha512-phBFwieDLvkZGYN9CE9ZFNEIoBVksprzsnCzQejCmCHtgwCXReeuRpoEGN9C4EbhONztv8NRV1tau6Rb9pONwQ==", + "license": "Apache-2.0" + }, + "node_modules/@grpc/grpc-js": { + "version": "1.9.16", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.16.tgz", + "integrity": "sha512-wE4Ut/olIzfKqp631XrG+wbF0v1vWFN4YL9FyXC2LJiG33DsV7PLzURjrCvY/6je2ntdRkeLpPDluzSRGaVltQ==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.7.8", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz", + "integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==", + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz", + "integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lezer/common": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.2.tgz", + "integrity": "sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==", + "license": "MIT" + }, + "node_modules/@lezer/highlight": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", + "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.3.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.10.tgz", + "integrity": "sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/python": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.19.tgz", + "integrity": "sha512-MhQIURHRytsNzP/YXnqpYKW6la6voAH3kyplTOOiCdjyFY6cWWGFVmYVdHIPrElqSDf4iCDktQCockB9FxuhzQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.4.tgz", + "integrity": "sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ==", + "license": "MIT" + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.148.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.148.0.tgz", + "integrity": "sha512-Nm4s/jB+4FpFsPhWGEC4h7rzksesmtnMXomo6rCMcg/b8zLQuOziRgkCS1fxDCXOlJB/6Q8oABOZ/OP6RIPj9A==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz", + "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.1.tgz", + "integrity": "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.1.tgz", + "integrity": "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==", + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.2.tgz", + "integrity": "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==", + "license": "BSD-3-Clause" + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.7.tgz", + "integrity": "sha512-EypzgnYCwyVY4NDHKzGmNJT5b+XaQEBniHxsMdeIQLB/tcCzZnhqrzHpZFbX9iaxx+5RiB8caATBtfvZP7zVxQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.7.tgz", + "integrity": "sha512-l17HE9EweWaqJZhuUuNBN/FzM62xw+DECVnJyvMsxn8vJFAGLy5QfLDoYAcronkAN8VxKZHezDpulHDPx95vFw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.7.tgz", + "integrity": "sha512-8ED8ELFvHXc6OCETIn4gXObPiaR6bckM/ipXtbzlPVDRMBfEGjCKgO90F9YtfdpDatVx/ZQw7aZ1vUMf/+T3Mw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.7.tgz", + "integrity": "sha512-/WPripjtiAIZ2tWY7ddijORT0Ujg87wxWW/qcoFVCKAWVDPhtY0xr7Dj0M3GyNGz60jGwTElhro/mkF9dT7dDQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.7.tgz", + "integrity": "sha512-14DI4NcqpvbICxSnGLx3PmtDaWqRP/KGSGb6C+JLLVPeZRl6dKdHba3pGsqT3vpdTqhEYIPG0MMQ8c0xYqoJxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.7.tgz", + "integrity": "sha512-bxrWIRvHWQvbJwi+VIie/kDJmQxcNE6xxWwZdqF/ExVAigtHkv54WTLQPb+QsZdnFy18fg7JPfWGL0RH6vwIlQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.7.tgz", + "integrity": "sha512-toOY2BChBZyuxU7OYX6Tn389di4IzAqPTycVcci0O7FSfBqzRB3RZn+K5Is6ANf4tmgRd/K1yZTsNTXbkXsnLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.7.tgz", + "integrity": "sha512-lAIXTH/aiLRLxsTgQvfhjo4K1ydWIp00+V0voOr9beb/9ZmkUFrSIb03dXNFRgMNvkE6oGsF10ioQ6UsI+vS5Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.7.tgz", + "integrity": "sha512-kdnwS28Pkenp/mZMRwjXXXwxQ7pIsm+bF919LUK93BOyhcLsrVKdP2p9fxpiPNPAbNuch8ypQt0pm2P2LYCAGg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.7.tgz", + "integrity": "sha512-516OdsyLdr5E65paF3yBF55t8mfm9+gmtCsK3xI7XKXIT7EfRlHhxL8K/NR6Hu8BWSgF5+1w74lTL0+nxcc8Qw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.7.tgz", + "integrity": "sha512-r8/z8n7GFaYRln3xmP1Cxy0HH/HLM0uBUPkEuSVEfKGDA89M0FsZRZJRSwe/tJjRx+fpH/gjorfhB8tmEbSFLA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.7.tgz", + "integrity": "sha512-pAsE8iiDxUg1xBqdhrTfg45AVDVpirjz00sblEYClGNNcMnDb+e8beQgqIAw6LvauX/APvgxUnwrgun/YYGBhw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.7.tgz", + "integrity": "sha512-lTcIYmmnQQA8Or/2DatS6oSqcdLHvendjS+zLu+FwgToynWMRSmQdpM65fTANJgIS4mjbMOo5KT2lnT9SAb96w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.7.tgz", + "integrity": "sha512-e3Gu3WxbNk/UqQhxqU7YIYO+9ZBvWNz3U+h/qRFosscMFzdRPbXYSaSWgSnklv2fz1TgzBTcti2z35c/7irsHw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.7.tgz", + "integrity": "sha512-W/jg5qoRSqjsEv0+dZi4e687mcHqmVuU0P4fK6qS/xjetW2Gmc1W8j//z5nAeNcC8Ttm0hV46IjcYeuVwYhuiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/plugin-babel": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.1.0.tgz", + "integrity": "sha512-dFZNuFD2YRcoomP4oYf+DvQNSUA9ih+A3vUqopQx5EdtPGo3WBnQcI/S8pwpz91UsGfL0HsMSOlaMld8HrbubA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@rollup/pluginutils": "^5.0.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "@types/babel__core": "^7.1.9", + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "@types/babel__core": { + "optional": true + }, + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", + "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-replace": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-6.0.3.tgz", + "integrity": "sha512-J4RZarRvQAm5IF0/LwUUg+obsm+xZhYnbMXmXROyoSE1ATJe3oXSb9L5MMppdxP2ylNSjv6zFBwKYjcKMucVfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-1.0.0.tgz", + "integrity": "sha512-FnCxhTBx6bMOYQrar6C8h3scPt8/JwIzw3+AJ2K++6guogH5fYaIFia+zZuhqv0eo1RN7W1Pz630SyvLbDjhtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "serialize-javascript": "^7.0.3", + "smob": "^1.0.0", + "terser": "^5.17.4" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.4.0.tgz", + "integrity": "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.1.tgz", + "integrity": "sha512-UZ8sUxPTiHWYX9QNdJedb1kDZSpS1t/VPWBWGSgqHNi9w3Cu6IXvu2mzbhiTiPvtrqgTQJ+zqiAq2iPIPilpaQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.1.tgz", + "integrity": "sha512-cQ4nFQABN5cDvDpbvJ7bMStCpnaVxynZrRMfUJYgxcIk9Sh54FIO1vtfkg0B69REjER77ioZ/ov+eAApx/KmLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz", + "integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.1.tgz", + "integrity": "sha512-pvD16V939D3CloK0+qikpGaxiPrDUXTe7Y5cWOMkMSy7m1cawa8EGy/kXYi/G/cKAC4HDAbSnzCIk1WmsoOKXg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.1.tgz", + "integrity": "sha512-pcFGeL2345VwdTnJhA6zLbew+YgWB0qBG2+dMtXjCicf6+rm6kO6cOoh5VnTe0ZMrMRgRyuHmCJxZWrIdzYuOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.1.tgz", + "integrity": "sha512-mRJlqSRulVzcKq/LKA6ICSIc3K/l4fzlVn/gePn2nXIHy8seRi5z/eeRE0d/XMBxcMldiXtQTSpRj0tkkC3g8Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.1.tgz", + "integrity": "sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.1.tgz", + "integrity": "sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.1.tgz", + "integrity": "sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.1.tgz", + "integrity": "sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.1.tgz", + "integrity": "sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.1.tgz", + "integrity": "sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.1.tgz", + "integrity": "sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.1.tgz", + "integrity": "sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.1.tgz", + "integrity": "sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.1.tgz", + "integrity": "sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.1.tgz", + "integrity": "sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.1.tgz", + "integrity": "sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.1.tgz", + "integrity": "sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.1.tgz", + "integrity": "sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.1.tgz", + "integrity": "sha512-cjkLbOlfcm3QGhMM1J5zaZjsw1GggbN6rw9UTSSRrPrR1KkcXnN7Uq9rPw34xImQ9VOY9GN+6u2Zj80B9ptkcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.1.tgz", + "integrity": "sha512-Li1KdUnWGE4N3e1F/B4RTB1ms+nG4WBgjByO46pkeBVX/2UBsY53xf5vK9WygVmnH3RwncIST7lkSdLSY6P9lg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.1.tgz", + "integrity": "sha512-t4ZYOSoLTgwhuFMrmTMLx/+i1DQVK7HYqMc6kY46EApwi8X0nIVphzdNoThU3xt6n+N5urG1/gxBdCaKDLavfg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.1.tgz", + "integrity": "sha512-RgroPfMmKlD1RzSDxvwgcPiy2HNQKoYV7OmwIXDsk73uKW5t6B/V8KIy27SMv/FNXFo/oSBtWc9J0X7t91ezZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.1.tgz", + "integrity": "sha512-at8QVep6S3h5Y6gSbdGU06bRY5WJkf6WUduM9YtvYMbYhB1MOFfUgc6kehitQXzOtMSaT70q7f9ydPhpqu821w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", + "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.1", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", + "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-x64": "4.3.3", + "@tailwindcss/oxide-freebsd-x64": "4.3.3", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-x64-musl": "4.3.3", + "@tailwindcss/oxide-wasm32-wasi": "4.3.3", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", + "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", + "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", + "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", + "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", + "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", + "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", + "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", + "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", + "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", + "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", + "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", + "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", + "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.3", + "@tailwindcss/oxide": "4.3.3", + "tailwindcss": "4.3.3" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@trickfilm400/rollup-plugin-off-main-thread": { + "version": "3.0.0-pre1", + "resolved": "https://registry.npmjs.org/@trickfilm400/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-3.0.0-pre1.tgz", + "integrity": "sha512-/67zpWDBLV+oYAEL682s1ktXL0HgqX76f6gaVGkGnVZlBbm1zd0v4Bz8MFF2GGhoX9rvfq3KSQHubFHwa6w6/Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "ejs": "^3.1.10", + "json5": "^2.2.3", + "magic-string": "^0.30.21", + "string.prototype.matchall": "^4.0.12" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@types/canvas-confetti": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@types/canvas-confetti/-/canvas-confetti-1.9.0.tgz", + "integrity": "sha512-aBGj/dULrimR1XDZLtG9JwxX1b4HPRF6CX9Yfwh3NvstZEm1ZL7RBnel4keCPSqs1ANRu1u2Aoz9R+VmtjYuTg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/katex": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.8.tgz", + "integrity": "sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.13.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz", + "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.18", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", + "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.7.tgz", + "integrity": "sha512-I8bPpDLcHBv1qiIiXDCy71Rt8eQDKJP0sMSWJphDdAcdqiJ1sGpZamavoEIRZmYzjia9LuEb2HlYdDpmoENpvQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.69.0.tgz", + "integrity": "sha512-ewfspqWvSxKSOaplqAUNbaSFO0eB6w1EtQ+esfYFRm3614Ty4uNtExkcbgd6nWsXphbqKyf9ZYdbZdv2xEoWEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/visitor-keys": "8.69.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.69.0.tgz", + "integrity": "sha512-K3VrubUPhlo9VDBS6QdI8YB5j7ClpqLRdefcz6PFrhnwicehBweqQ9Evhl4l+FYz0HdDmMqIiSX0aldGRYtDCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.69.0.tgz", + "integrity": "sha512-+rmdgPA+EXkNgKYvHvFfhrs35utXbwaC5PGpDquSXcoXQDKUA5UjV0LmTucG/4JXkM31BTu4TilHtrN8IVBe8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.69.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript/old": { + "name": "typescript", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript6": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript6/-/typescript6-6.0.2.tgz", + "integrity": "sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@typescript/old": "npm:typescript@^6" + }, + "bin": { + "tsc6": "bin/tsc6" + } + }, + "node_modules/@uiw/codemirror-extensions-basic-setup": { + "version": "4.25.11", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.25.11.tgz", + "integrity": "sha512-otyFa+n9IOYtEjaKOxPedHkj15fTPUF21wdR9pv0GpZPfuGl27cvmcv6+tognbRu9VvEcsHKE+ESoszeo3KfTw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + }, + "peerDependencies": { + "@codemirror/autocomplete": ">=6.0.0", + "@codemirror/commands": ">=6.0.0", + "@codemirror/language": ">=6.0.0", + "@codemirror/lint": ">=6.0.0", + "@codemirror/search": ">=6.0.0", + "@codemirror/state": ">=6.0.0", + "@codemirror/view": ">=6.0.0" + } + }, + "node_modules/@uiw/react-codemirror": { + "version": "4.25.11", + "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.25.11.tgz", + "integrity": "sha512-DYVFAKLX+F/4JS9N/7xexh+TICrlncwkX9HKKInrP1bwO0tSfc3k0GB6oawTYhelVKh20cX3TuRx+NJSkVXuMw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.6", + "@codemirror/commands": "^6.1.0", + "@codemirror/state": "^6.1.1", + "@codemirror/theme-one-dark": "^6.0.0", + "@uiw/codemirror-extensions-basic-setup": "4.25.11", + "codemirror": "^6.0.0" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + }, + "peerDependencies": { + "@babel/runtime": ">=7.11.0", + "@codemirror/state": ">=6.0.0", + "@codemirror/theme-one-dark": ">=6.0.0", + "@codemirror/view": ">=6.0.0", + "codemirror": ">=6.0.0", + "react": ">=17.0.0", + "react-dom": ">=17.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.1.tgz", + "integrity": "sha512-yxLaQV9gkhS8ezJqCM6+ndU7mDY6gqAg75NQ+0IjwEI8IYOmQCgkRwHKVSfWXW076DsqMo0Dk+0FK1U+M5RgFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", + "babel-plugin-react-compiler": "^1.0.0", + "oxc-transform-react": "^0.145.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + }, + "oxc-transform-react": { + "optional": true + } + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/autoprefixer": { + "version": "10.5.4", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.4.tgz", + "integrity": "sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.6", + "caniuse-lite": "^1.0.30001806", + "fraction.js": "^5.3.4", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", + "integrity": "sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-define-polyfill-provider": "^0.6.8", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.14.2.tgz", + "integrity": "sha512-coWpDLJ410R781Npmn/SIBZEsAetR4xVi0SxLMXPaMO4lSf1MwnkGYMtkFxew0Dn8B3/CpbpYxN0JCgg8mn67g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.8", + "core-js-compat": "^3.48.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.8.tgz", + "integrity": "sha512-M762rNHfSF1EV3SLtnCJXFoQbbIIz0OyRwnCmV0KPC7qosSfCO0QLTSuJX3ayAebubhE6oYBAYPrBA5ljowaZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.8" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz", + "integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/browserslist": { + "version": "4.28.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.8.tgz", + "integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.11.12", + "caniuse-lite": "^1.0.30001809", + "electron-to-chromium": "^1.5.402", + "node-releases": "^2.0.53", + "update-browserslist-db": "^1.3.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/call-bind": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", + "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "get-intrinsic": "^1.3.0", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001810", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz", + "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/canvas-confetti": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/canvas-confetti/-/canvas-confetti-1.9.4.tgz", + "integrity": "sha512-yxQbJkAVrFXWNbTUjPqjF7G+g6pDotOUHGbkZq2NELZUMDpiJ85rIEazVb8GTaAptNW2miJAXbs1BtioA251Pw==", + "license": "ISC", + "funding": { + "type": "donate", + "url": "https://www.paypal.me/kirilvatev" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/codemirror": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", + "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-js-compat": { + "version": "3.50.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.50.0.tgz", + "integrity": "sha512-XGpFGbMLHwSt74YLTKho7Ib242qi6O8MSX+sRokV4oz7iKXvQWGYZthjIhjRGMxjzVkAubBO512dKGYcefmX3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.7" + }, + "engines": { + "node": ">=6.4.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/crelt": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.7.tgz", + "integrity": "sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==", + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.421", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.421.tgz", + "integrity": "sha512-cUhfpHQy+PGbt+X90DMcAVazDCziIZr73hpxD4LRs4BGQoJCifPzTfQWa7S6c+uhokTOBe8tot09GBSEO6c9LA==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.24.5", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.5.tgz", + "integrity": "sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-abstract": { + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", + "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-abstract-get": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-abstract-get/-/es-abstract-get-1.0.0.tgz", + "integrity": "sha512-6PMWXpdhshVvFp+FoWYs1EvG1Nj0tvk0dZM+XcK0xMEM1czRVcP6ohqPWHy6qPagSpC8j4+p89WXlT+xXJs/fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.2", + "is-callable": "^1.2.7", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.4.tgz", + "integrity": "sha512-yPDz7wqpg1/mmHLmS3tcfTfbw5f1eryXvyghYBffGdERwe+mV7ZcWzTR8LR17Kvqt3qfPurjlonmnq3MKXIOXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-abstract-get": "^1.0.0", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "is-callable": "^1.2.7", + "is-date-object": "^1.1.0", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", + "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", + "dev": true, + "license": "MIT", + "peer": true, + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-prettier": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.1.1.tgz", + "integrity": "sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.24.4", + "@babel/parser": "^7.24.4", + "hermes-parser": "^0.25.1", + "zod": "^3.25.0 || ^4.0.0", + "zod-validation-error": "^3.5.0 || ^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.5.6.tgz", + "integrity": "sha512-uZnh24On2bk478AkaDAKcpRiYhS3qFSaSNvpXxV6/Ek/BBDICkWGG7MnBSfjnIlCVBei5vsLlIeQYxbF22+Udg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": "^9 || ^10" + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eta": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eta/-/eta-4.6.0.tgz", + "integrity": "sha512-lW6is4T1NFOYnmqGZIfvixqj7A7sSvScF+DN8EK6K58xI5MZ5UvYe0GjopxOXQtZvUn4eDdVuZ8XSoYWTMEKwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/bgub/eta?sponsor=1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.7.tgz", + "integrity": "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/filelist": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.6.tgz", + "integrity": "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", + "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/firebase": { + "version": "12.18.0", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-12.18.0.tgz", + "integrity": "sha512-XaL6tlE5Xd20ZDhckqOMIw+JJTET+wTdeZPxQ7ihc42oxRb7kWUyn/j1LO5V9dH1xq8Rv5R71Pv1fBCdIkt9Rw==", + "license": "Apache-2.0", + "dependencies": { + "@firebase/ai": "2.15.0", + "@firebase/analytics": "0.10.24", + "@firebase/analytics-compat": "0.2.30", + "@firebase/app": "0.16.1", + "@firebase/app-check": "0.13.1", + "@firebase/app-check-compat": "0.4.7", + "@firebase/app-compat": "0.5.17", + "@firebase/app-types": "0.9.6", + "@firebase/auth": "1.13.5", + "@firebase/auth-compat": "0.6.10", + "@firebase/data-connect": "0.7.4", + "@firebase/database": "1.1.5", + "@firebase/database-compat": "2.1.7", + "@firebase/firestore": "4.17.1", + "@firebase/firestore-compat": "0.4.13", + "@firebase/functions": "0.14.0", + "@firebase/functions-compat": "0.5.0", + "@firebase/installations": "0.6.24", + "@firebase/installations-compat": "0.2.24", + "@firebase/messaging": "0.13.2", + "@firebase/messaging-compat": "0.2.29", + "@firebase/performance": "0.7.14", + "@firebase/performance-compat": "0.2.27", + "@firebase/remote-config": "0.9.2", + "@firebase/remote-config-compat": "0.2.29", + "@firebase/storage": "0.14.5", + "@firebase/storage-compat": "0.4.5", + "@firebase/util": "1.15.3" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fraction.js": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", + "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.2.0.tgz", + "integrity": "sha512-jObKIik1P2QjPHP5nz5BaOtUlfgS0fWo8IUByNXkM+o+02sJOi94em77GwJKQSJ3gfPHdgzLNrHc1uokV4P/ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2", + "hasown": "^2.0.4", + "is-callable": "^1.2.7", + "is-document.all": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "dev": true, + "license": "ISC" + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "17.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.12.0.tgz", + "integrity": "sha512-cezEd/DTyyht9cvSSURyygXPfy04GtWO/5e6ZPvH7fCtjKz9PYOmuawphw1Ctd1f6C+5JypXfGD7ahNMXvevBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hermes-estree": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", + "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", + "dev": true, + "license": "MIT" + }, + "node_modules/hermes-parser": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", + "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hermes-estree": "0.25.1" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz", + "integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==", + "license": "MIT" + }, + "node_modules/idb": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==", + "license": "ISC" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-document.all": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-document.all/-/is-document.all-1.0.0.tgz", + "integrity": "sha512-+XSoyS05OdBbhFuELhgTCpFNHkpBOJqtsZfUFFpe5QTw+9Sjbh8zitxhQkYAo6wV7e1Vb8cAPvpCk9jGam/82g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz", + "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^9.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jake": { + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.6", + "filelist": "^1.0.4", + "picocolors": "^1.1.1" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/katex": { + "version": "0.18.5", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.18.5.tgz", + "integrity": "sha512-1FU5H3RjGJVj6GT9fMjf2uMIXmPQp232aXS3UEeQzf0dxefHg/CKMvNB3DuOC46LFG/E5PNxrE8dOwB782FDGg==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^15.0.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/katex/node_modules/commander": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", + "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.40.0.tgz", + "integrity": "sha512-MaG+8WnOXkDWz9XeElj7TnQ890tTZUB0a36i03aRRCKGWE6e7jJpmdCvtxxuxcjjdqyN6m4sL6qlHVuSUDtYgg==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.54", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz", + "integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/own-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.2.tgz", + "integrity": "sha512-19YVAg7T+WTrxggPukVq7DjTv6+PJ867TmhCvBsYwmbFCsZd344rq2Ld1p0wo8f8Qrrhgp82c6FJRqdXWtSEhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "get-intrinsic": "^1.3.0", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.5.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", + "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.5.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", + "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "nanoid": "^3.3.18", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-bytes": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", + "integrity": "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/protobufjs": { + "version": "7.6.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.6.tgz", + "integrity": "sha512-dYDWdjSl5RNb7SgPxGQcRU+GtvP7s2fpkrY0r432PcOIaZ0/rBcxEZnQN67iJhFuQiVw754JDoPruPCNdGsbjg==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.5", + "@protobufjs/eventemitter": "^1.1.1", + "@protobufjs/fetch": "^1.1.1", + "@protobufjs/float": "^1.0.2", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.1", + "@types/node": ">=13.7.0", + "long": "^5.3.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/re2js": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/re2js/-/re2js-2.8.6.tgz", + "integrity": "sha512-xLgQil4kIUCrAzVk9fRSkxkFNwmygLFjVxXrLc65aE1F0+Zsb8rxumFBy4XKyvgMCTL6kilDq3EZ0piE2dP/Dg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/react": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", + "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz", + "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.8" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", + "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpu-core": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", + "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.2.2", + "regjsgen": "^0.8.0", + "regjsparser": "^0.13.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.2.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/regjsparser": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.2.tgz", + "integrity": "sha512-NgRBy2Nx/bE+9F27nVHnqcN5HjyLmecqsqx2PJHu3/IEtADD4WuxuXIVExD5PoSDFVrl78dOonfcOe5O+5nbzQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~3.1.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rolldown": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.7.tgz", + "integrity": "sha512-g0EtLvBjTUB7jhyV0S/TCup3v/XSVl45vUIGbOGU4QPiyjTenCe4mKuFvW9fEgYmS2Fo42AUssRmNuMziXdrig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.148.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.7", + "@rolldown/binding-android-arm64": "1.2.7", + "@rolldown/binding-darwin-arm64": "1.2.7", + "@rolldown/binding-darwin-x64": "1.2.7", + "@rolldown/binding-freebsd-x64": "1.2.7", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.7", + "@rolldown/binding-linux-arm64-gnu": "1.2.7", + "@rolldown/binding-linux-arm64-musl": "1.2.7", + "@rolldown/binding-linux-ppc64-gnu": "1.2.7", + "@rolldown/binding-linux-s390x-gnu": "1.2.7", + "@rolldown/binding-linux-x64-gnu": "1.2.7", + "@rolldown/binding-linux-x64-musl": "1.2.7", + "@rolldown/binding-openharmony-arm64": "1.2.7", + "@rolldown/binding-win32-arm64-msvc": "1.2.7", + "@rolldown/binding-win32-x64-msvc": "1.2.7" + } + }, + "node_modules/rollup": { + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.1.tgz", + "integrity": "sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.63.1", + "@rollup/rollup-android-arm64": "4.63.1", + "@rollup/rollup-darwin-arm64": "4.63.1", + "@rollup/rollup-darwin-x64": "4.63.1", + "@rollup/rollup-freebsd-arm64": "4.63.1", + "@rollup/rollup-freebsd-x64": "4.63.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.63.1", + "@rollup/rollup-linux-arm-musleabihf": "4.63.1", + "@rollup/rollup-linux-arm64-gnu": "4.63.1", + "@rollup/rollup-linux-arm64-musl": "4.63.1", + "@rollup/rollup-linux-loong64-gnu": "4.63.1", + "@rollup/rollup-linux-loong64-musl": "4.63.1", + "@rollup/rollup-linux-ppc64-gnu": "4.63.1", + "@rollup/rollup-linux-ppc64-musl": "4.63.1", + "@rollup/rollup-linux-riscv64-gnu": "4.63.1", + "@rollup/rollup-linux-riscv64-musl": "4.63.1", + "@rollup/rollup-linux-s390x-gnu": "4.63.1", + "@rollup/rollup-linux-x64-gnu": "4.63.1", + "@rollup/rollup-linux-x64-musl": "4.63.1", + "@rollup/rollup-openbsd-x64": "4.63.1", + "@rollup/rollup-openharmony-arm64": "4.63.1", + "@rollup/rollup-win32-arm64-msvc": "4.63.1", + "@rollup/rollup-win32-ia32-msvc": "4.63.1", + "@rollup/rollup-win32-x64-gnu": "4.63.1", + "@rollup/rollup-win32-x64-msvc": "4.63.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", + "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "get-intrinsic": "^1.3.0", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.1.tgz", + "integrity": "sha512-k3CMsaIvvdSwm8oLB4MXSl0wH2/cwlH7xGcnRd2DaeRmBkbzYmyT8j0tsX60DwD1eRwHTpNpH8ljKu9oUT1MeQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4", + "side-channel-list": "^1.0.1", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/smob": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.6.2.tgz", + "integrity": "sha512-RQsvleCbF8cVHEv+xuDGaA4pOizFqJ0GgjtMSRo6oP8pnN7WsigHgVGey6aILRBKv4W2YOMHLqbKdnB6hpB9fw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0.tgz", + "integrity": "sha512-d8EqvL+k/SOXCreS/SUzg2ciyHqBBLcN/yuRjFsbvVhHTE2pgei7oAhmPM7kWFbkX6OSMQfUq4KbkF3au9lhYQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.1.0.tgz", + "integrity": "sha512-tHNHTxInrYLCga9O9YGxWA3G9/nnzQw8UGAyqGx3Ar1pSTTzIuM4woFSq4SowkXCjJIwq5sIiQvEfRI9tCH1qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.2", + "get-intrinsic": "^1.3.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.4", + "set-function-name": "^2.0.2", + "side-channel": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.11.tgz", + "integrity": "sha512-PwvK7BU+CMTJGYQCTZb5RWXIML92lftJLhQz1tBzgKiqGxJaMlBAa48POXaNAC2s4y8jr3EFqrkF9+44neS46w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.2", + "es-object-atoms": "^1.1.2", + "has-property-descriptors": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.10.tgz", + "integrity": "sha512-2+3aDAOmPTmuFwjDnmJG2ctEkQKVki7vOSqaxkv42Mowj1V6PnvuwFCRrR5lChUux1TBskPjfkeTOhqczDMxTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-2.0.1.tgz", + "integrity": "sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/style-mod": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz", + "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==", + "license": "MIT" + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", + "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tempy": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tempy/-/tempy-0.6.0.tgz", + "integrity": "sha512-G13vtMYPT/J8A4X2SjdtBTphZlrp1gKv6hZiOjw14RCWg6GbHuQBGtjlx75xLbYV/wEc0D7G5K4rxKP/cXk8Bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-stream": "^2.0.0", + "temp-dir": "^2.0.0", + "type-fest": "^0.16.0", + "unique-string": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/terser": { + "version": "5.51.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.51.2.tgz", + "integrity": "sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", + "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.8.tgz", + "integrity": "sha512-phPGCwqr2+Qo0fwniCE8e4pKnGu/yFb5nD5Y8bf0EEeiI5GklnACYA9GFy/DrAeRrKHXvHn+1SUsOWgJp6RO+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.9", + "for-each": "^0.3.5", + "gopd": "^1.2.0", + "is-typed-array": "^1.1.15", + "possible-typed-array-names": "^1.1.0", + "reflect.getprototypeof": "^1.0.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.69.0.tgz", + "integrity": "sha512-B3MltX0VqjUBNEe3b3sSuiRbfa6XrfHFtBiPamjT5AsW/dfq+y+bc0wyuS9DxAS1LyzCxRp2+rxzpLUvqM2BvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.69.0", + "@typescript-eslint/parser": "8.69.0", + "@typescript-eslint/typescript-estree": "8.69.0", + "@typescript-eslint/utils": "8.69.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.69.0.tgz", + "integrity": "sha512-t5jQTKPIgVW1PE6dR6H6Qz5gm8zjMlX5/2gRaOGd9eO6V7J+tQc6iWKukEe7dY8u9HyYasQ0yfF0/FSSTEO2gA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.69.0", + "@typescript-eslint/type-utils": "8.69.0", + "@typescript-eslint/utils": "8.69.0", + "@typescript-eslint/visitor-keys": "8.69.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.69.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.69.0.tgz", + "integrity": "sha512-ZfoJAVg3JZndQEpEl9petVlxau3lRuElc4HRMuAlLCf8to04/iHz692RUSNmXKDjEuJmIL+KZ2/BsOcBc16dsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/typescript-estree": "8.69.0", + "@typescript-eslint/utils": "8.69.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.69.0.tgz", + "integrity": "sha512-l4b0DhWioGg6Gt2ebGlvfkFMOjRsauxtsnDRwUSRX1qHq3HdTfQHV8wW9zEXeciai6HfeaKOedQn2Zoofx3WBw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.69.0", + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/typescript-estree": "8.69.0", + "@typescript-eslint/visitor-keys": "8.69.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.69.0.tgz", + "integrity": "sha512-AdFkgqck3Vudb/kWnxlyafU/4aBhHrbQ9locP2N4psXTy5mOBg0SHJumnLvx7r6g1gV4DKvUFwV2nJZBoqOD8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.69.0", + "@typescript-eslint/tsconfig-utils": "8.69.0", + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/visitor-keys": "8.69.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/project-service": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.69.0.tgz", + "integrity": "sha512-yi4obFrHMmnsesWehHbkg9zMA7Jt8cXT+mKM08G999pH1yT6nqgsHx7MYm0uY1wAj8CqiBXYRJ7WAT0QdQHQXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.69.0", + "@typescript-eslint/types": "^8.69.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.69.0.tgz", + "integrity": "sha512-xNqK7YTDZsLniQMV/4rpFR8Z5JlqeRvVjuG1YgF/mdPVH84HSD19L8CczMA0qg2RfwEV231GHH3VnToJDo4MfQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { + "version": "8.69.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.69.0.tgz", + "integrity": "sha512-tUbx60BBqQa31kXF5MCsOOLL5E/WzUuxIn7YpAvq+eaUlqvk8/NXnXMBNAdLCr0icjkzem7iUA5QqWHe/hJ1aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.69.0", + "@typescript-eslint/types": "8.69.0", + "@typescript-eslint/typescript-estree": "8.69.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/typescript-eslint/node_modules/ignore": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.8.tgz", + "integrity": "sha512-YYNsSlXBjMk92SKnkwvB5LOVSa6OznlFUGcsvrFgNJbJCd0M1XKeFVRc8ZByeCqz32FivYNHJVooLmdqrmvp/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/typescript-eslint/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typescript7": { + "name": "typescript", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "license": "MIT" + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", + "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", + "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz", + "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vite": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", + "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.26", + "rolldown": "~1.2.4", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.4.0 || ^0.5.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-pwa": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-1.3.0.tgz", + "integrity": "sha512-c5kMgN+ITrOtHXp8PAtk2uOIEea6XjP/unCGxOWWBzQ6qa65qj/awHg0wf+QF9E/2u9vh86LqxPwzEPNbM2r5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.6", + "pretty-bytes": "^6.1.1", + "tinyglobby": "^0.2.10", + "workbox-build": "^7.4.1", + "workbox-window": "^7.4.1" + }, + "engines": { + "node": ">=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vite-pwa/assets-generator": "^1.0.0", + "vite": "^3.1.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "workbox-build": "^7.4.1", + "workbox-window": "^7.4.1" + }, + "peerDependenciesMeta": { + "@vite-pwa/assets-generator": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/vite/node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + }, + "node_modules/web-vitals": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.2.4.tgz", + "integrity": "sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw==", + "license": "Apache-2.0" + }, + "node_modules/websocket-driver": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.5.tgz", + "integrity": "sha512-ZL2+3c7kMBdIRCMz6l8jQMHyGVxj+UL+xVk74Ombiciboca8rHa15L86B19E5oh1pL9Ii/uj54gtsIrZGMo6zA==", + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.22", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.22.tgz", + "integrity": "sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/workbox-background-sync": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-7.4.1.tgz", + "integrity": "sha512-HhT7KE8tOWDm02wRNshXUnUPofMlhenF2DBdUnDPOubhizzPeItkYTmAB6td1Z2cjYPa98vzEiPLEuzn5hN66g==", + "dev": true, + "license": "MIT", + "dependencies": { + "idb": "^7.0.1", + "workbox-core": "7.4.1" + } + }, + "node_modules/workbox-broadcast-update": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-7.4.1.tgz", + "integrity": "sha512-uAlgslKLvbQY+suirIdnBCSYrcgBhjp81Nj4l1lj/Jmj0MJO2CJERnCJjT0GFVwmReV0N+zs78K6gqd5gr9/+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.1" + } + }, + "node_modules/workbox-build": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-7.4.1.tgz", + "integrity": "sha512-SDhxIvEAde9Gy/5w4Yo1Jh/M49Z0qE3q0oteyE8zGq0DScxFqVBcCtIXFuLtmtxRQZCMbf0prco4VyEu3KBQuw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@apideck/better-ajv-errors": "^0.3.1", + "@babel/core": "^7.24.4", + "@babel/preset-env": "^7.11.0", + "@babel/runtime": "^7.11.2", + "@rollup/plugin-babel": "^6.1.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-replace": "^6.0.3", + "@rollup/plugin-terser": "^1.0.0", + "@trickfilm400/rollup-plugin-off-main-thread": "^3.0.0-pre1", + "ajv": "^8.6.0", + "common-tags": "^1.8.0", + "eta": "^4.5.1", + "fast-json-stable-stringify": "^2.1.0", + "fs-extra": "^9.0.1", + "glob": "^11.0.1", + "pretty-bytes": "^5.3.0", + "rollup": "^4.53.3", + "source-map": "^0.8.0-beta.0", + "stringify-object": "^3.3.0", + "strip-comments": "^2.0.1", + "tempy": "^0.6.0", + "upath": "^1.2.0", + "workbox-background-sync": "7.4.1", + "workbox-broadcast-update": "7.4.1", + "workbox-cacheable-response": "7.4.1", + "workbox-core": "7.4.1", + "workbox-expiration": "7.4.1", + "workbox-google-analytics": "7.4.1", + "workbox-navigation-preload": "7.4.1", + "workbox-precaching": "7.4.1", + "workbox-range-requests": "7.4.1", + "workbox-recipes": "7.4.1", + "workbox-routing": "7.4.1", + "workbox-strategies": "7.4.1", + "workbox-streams": "7.4.1", + "workbox-sw": "7.4.1", + "workbox-window": "7.4.1" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/workbox-build/node_modules/@apideck/better-ajv-errors": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.7.tgz", + "integrity": "sha512-TajUJwGWbDwkCx/CZi7tRE8PVB7simCvKJfHUsSdvps+aTM/PDPP4gkLmKnc+x3CE//y9i/nj74GqdL/hwk7Iw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsonpointer": "^5.0.1", + "leven": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "ajv": ">=8" + } + }, + "node_modules/workbox-build/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/workbox-build/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/workbox-build/node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/workbox-cacheable-response": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-7.4.1.tgz", + "integrity": "sha512-8xaFoJdDc2OjrlbbL3gEeBO1WKcMwRqwLRupgqahYXu75yXajPLuwrbXMrIGZuWYXrQwk0xDjOxZ/ujCy/oJYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.1" + } + }, + "node_modules/workbox-core": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-7.4.1.tgz", + "integrity": "sha512-DT+vu46eh/2vRsSHTY4Xmc32Z1rr9PRlQUXr1Dx30ZuXRWwOsvZgGgcwxcasubQLQmbTNYZjv44LkBAQ4tT5tQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/workbox-expiration": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-7.4.1.tgz", + "integrity": "sha512-lRKUF7b+OGbeXkQk1s6MHXOa3d7Xxf7Of31W6c6hCfipfIyrtdWZ89stq21AHZMaoG7VNFoHply4Ox+rU31TWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "idb": "^7.0.1", + "workbox-core": "7.4.1" + } + }, + "node_modules/workbox-google-analytics": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-7.4.1.tgz", + "integrity": "sha512-Mks1JwLEt++ZAkF6sS1OpSh9RtAMIsiDgRpK+codiHGIPXeaUOgi4cPc3GFadUl8V5QPeypEk8Oxgl3HlwVzHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-background-sync": "7.4.1", + "workbox-core": "7.4.1", + "workbox-routing": "7.4.1", + "workbox-strategies": "7.4.1" + } + }, + "node_modules/workbox-navigation-preload": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-7.4.1.tgz", + "integrity": "sha512-C4KVsjPcYKJOhr631AxR9XoG2rLF3QiTk5aMv36MXOjtWvm8axwNFAtKUPGsWUwLXXAMgYM1En7fsvndaXeXRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.1" + } + }, + "node_modules/workbox-precaching": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-7.4.1.tgz", + "integrity": "sha512-cdr/9qByww7yzEp7zg/qI4ukUrrNjQLgN+ONQRpjy/VqGQXwkgHwr00KksGJK8v0VifwDXBb8a4cWNZH71jn3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.1", + "workbox-routing": "7.4.1", + "workbox-strategies": "7.4.1" + } + }, + "node_modules/workbox-range-requests": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-7.4.1.tgz", + "integrity": "sha512-7i2oxAUE82gHdAJBCAQ04JzNOdRPqzuOzGfoUyJpFSmeqBNYGPrAH8GPoPjUQTfp+NycwrD2H68VtuF8qxv0vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.1" + } + }, + "node_modules/workbox-recipes": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-7.4.1.tgz", + "integrity": "sha512-gnbVfmV4/TtmQaM4x9AtuXhcdstJsep3XMVeztOrQVPT+R6+6DeBjGTCQ7fFCXm+4GEHUA5VEBTyi5+4gWGeog==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-cacheable-response": "7.4.1", + "workbox-core": "7.4.1", + "workbox-expiration": "7.4.1", + "workbox-precaching": "7.4.1", + "workbox-routing": "7.4.1", + "workbox-strategies": "7.4.1" + } + }, + "node_modules/workbox-routing": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-7.4.1.tgz", + "integrity": "sha512-yubJGErZOusuidAenaL5ypfhQOa7urxP/f8E0ws7FPb4039RiWXUWBAyUkmUoOL/BcQGen3h0J8872d51IYxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.1" + } + }, + "node_modules/workbox-strategies": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-7.4.1.tgz", + "integrity": "sha512-GZxpaw9NbmOelj7667uZ2kpk5BFpOGbO4X0qjwh5ls8XQ8C+Lha5LQchTiUzsTFSS+NlUpftYAyOVXvQUrcqOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.1" + } + }, + "node_modules/workbox-streams": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-7.4.1.tgz", + "integrity": "sha512-HWWtraKUbJknd9kgqGcpQ3G114HOPYvqs8HaJMDs2ebLNAimDkVDaWfAXE6Ybl+m8U6KsCE6pWyLYuigWmnAXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "workbox-core": "7.4.1", + "workbox-routing": "7.4.1" + } + }, + "node_modules/workbox-sw": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-7.4.1.tgz", + "integrity": "sha512-fez5f2DUlDJWTFYkCWQpY10N8gtztd849NswCbVFk0QlcSM4HT5A8x4g4ii650yem4I8tHY0R7JZahwp3ltIPw==", + "dev": true, + "license": "MIT" + }, + "node_modules/workbox-window": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-7.4.1.tgz", + "integrity": "sha512-notZDH2u8VXaqyuD7xaqIfEFi6SRM4SUSd7ewe9PDsVqADuepxX2ZMY3uvuZGxzY5ZOsGC/vD3A/3smFtJt4/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/trusted-types": "^2.0.2", + "workbox-core": "7.4.1" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.5.4.tgz", + "integrity": "sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-validation-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz", + "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } + } + } +} diff --git a/algospaced-ui/package.json b/algospaced-ui/package.json new file mode 100644 index 0000000000000000000000000000000000000000..861a759c6be529470123d9c792e53046cb23f4bf --- /dev/null +++ b/algospaced-ui/package.json @@ -0,0 +1,51 @@ +{ + "name": "algospaced-ui", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "node node_modules/typescript7/bin/tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "@codemirror/lang-python": "^6.2.1", + "@types/katex": "^0.16.8", + "@uiw/react-codemirror": "^4.25.11", + "canvas-confetti": "^1.9.4", + "firebase": "^12.18.0", + "katex": "^0.18.5", + "lucide-react": "^1.21.0", + "react": "^19.2.6", + "react-dom": "^19.2.6" + }, + "allowScripts": { + "@firebase/util": true, + "protobufjs": true + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@tailwindcss/vite": "^4.3.1", + "@types/canvas-confetti": "^1.9.0", + "@types/node": "^24.12.3", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", + "@typescript/typescript6": "^6.0.2", + "@vitejs/plugin-react": "^6.0.1", + "autoprefixer": "^10.5.0", + "eslint": "^10.3.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.2", + "globals": "^17.6.0", + "postcss": "^8.5.15", + "prettier": "^3.9.3", + "tailwindcss": "^4.3.1", + "typescript": "~6.0.3", + "typescript-eslint": "^8.59.2", + "typescript7": "npm:typescript@^7.0.2", + "vite": "^8.2.2", + "vite-plugin-pwa": "^1.3.0" + } +} diff --git a/algospaced-ui/public/favicon.svg b/algospaced-ui/public/favicon.svg new file mode 100644 index 0000000000000000000000000000000000000000..6893eb13237060adc0c968a690149a49faa2d7d3 --- /dev/null +++ b/algospaced-ui/public/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/algospaced-ui/public/icons.svg b/algospaced-ui/public/icons.svg new file mode 100644 index 0000000000000000000000000000000000000000..e9522193d9f796a9748e9ad8c952a5df73c87db9 --- /dev/null +++ b/algospaced-ui/public/icons.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/algospaced-ui/src/App.css b/algospaced-ui/src/App.css new file mode 100644 index 0000000000000000000000000000000000000000..f90339d8f765fa2c69d9a341959a8ddb9fff5720 --- /dev/null +++ b/algospaced-ui/src/App.css @@ -0,0 +1,184 @@ +.counter { + font-size: 16px; + padding: 5px 10px; + border-radius: 5px; + color: var(--accent); + background: var(--accent-bg); + border: 2px solid transparent; + transition: border-color 0.3s; + margin-bottom: 24px; + + &:hover { + border-color: var(--accent-border); + } + &:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; + } +} + +.hero { + position: relative; + + .base, + .framework, + .vite { + inset-inline: 0; + margin: 0 auto; + } + + .base { + width: 170px; + position: relative; + z-index: 0; + } + + .framework, + .vite { + position: absolute; + } + + .framework { + z-index: 1; + top: 34px; + height: 28px; + transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg) + scale(1.4); + } + + .vite { + z-index: 0; + top: 107px; + height: 26px; + width: auto; + transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg) + scale(0.8); + } +} + +#center { + display: flex; + flex-direction: column; + gap: 25px; + place-content: center; + place-items: center; + flex-grow: 1; + + @media (max-width: 1024px) { + padding: 32px 20px 24px; + gap: 18px; + } +} + +#next-steps { + display: flex; + border-top: 1px solid var(--border); + text-align: left; + + & > div { + flex: 1 1 0; + padding: 32px; + @media (max-width: 1024px) { + padding: 24px 20px; + } + } + + .icon { + margin-bottom: 16px; + width: 22px; + height: 22px; + } + + @media (max-width: 1024px) { + flex-direction: column; + text-align: center; + } +} + +#docs { + border-right: 1px solid var(--border); + + @media (max-width: 1024px) { + border-right: none; + border-bottom: 1px solid var(--border); + } +} + +#next-steps ul { + list-style: none; + padding: 0; + display: flex; + gap: 8px; + margin: 32px 0 0; + + .logo { + height: 18px; + } + + a { + color: var(--text-h); + font-size: 16px; + border-radius: 6px; + background: var(--social-bg); + display: flex; + padding: 6px 12px; + align-items: center; + gap: 8px; + text-decoration: none; + transition: box-shadow 0.3s; + + &:hover { + box-shadow: var(--shadow); + } + .button-icon { + height: 18px; + width: 18px; + } + } + + @media (max-width: 1024px) { + margin-top: 20px; + flex-wrap: wrap; + justify-content: center; + + li { + flex: 1 1 calc(50% - 8px); + } + + a { + width: 100%; + justify-content: center; + box-sizing: border-box; + } + } +} + +#spacer { + height: 88px; + border-top: 1px solid var(--border); + @media (max-width: 1024px) { + height: 48px; + } +} + +.ticks { + position: relative; + width: 100%; + + &::before, + &::after { + content: ''; + position: absolute; + top: -4.5px; + border: 5px solid transparent; + } + + &::before { + left: 0; + border-left-color: var(--border); + } + &::after { + right: 0; + border-right-color: var(--border); + } +} diff --git a/algospaced-ui/src/App.tsx b/algospaced-ui/src/App.tsx new file mode 100644 index 0000000000000000000000000000000000000000..b0c7691e88a80602d01db492683085f2e476f0c2 --- /dev/null +++ b/algospaced-ui/src/App.tsx @@ -0,0 +1,384 @@ +import React, { useEffect, useState, useRef, useCallback, useMemo } from 'react'; +import { supabase, type AuthUser } from './firebaseClient'; +import Auth from './components/Auth'; +import DesktopIcons, { type DesktopIconItem, type DesktopIconsRef } from './components/DesktopIcons'; +import DesktopContextMenu from './components/DesktopContextMenu'; +import PrincessToast from './features/companion/components/PrincessToast'; +import PrincessDialoguePopup from './components/PrincessDialoguePopup'; +import OnboardingModal from './components/OnboardingModal'; +import { useWindowManager } from './hooks/useWindowManager'; +import { useSystemStats } from './hooks/useSystemStats'; +import { useWallpaper } from './hooks/useWallpaper'; +import { useCompanionEvents } from './hooks/useCompanionEvents'; +import { DesktopGadget } from './components/desktop/DesktopGadget'; +import { DesktopStartMenu } from './components/desktop/DesktopStartMenu'; +import { DesktopTaskbar } from './components/desktop/DesktopTaskbar'; +import { MobileMetroScreen } from './components/desktop/MobileMetroScreen'; +import { DesktopWindowContainer } from './components/desktop/DesktopWindowContainer'; + +export default function App() { + const [user, setUser] = useState(null); + const [isLoadingAuth, setIsLoadingAuth] = useState(true); + const [isOnboardingOpen, setIsOnboardingOpen] = useState(false); + const [isStartOpen, setIsStartOpen] = useState(false); + + // Desktop icons & context menu refs + const desktopIconsRef = useRef(null); + const [contextMenu, setContextMenu] = useState<{ visible: boolean; x: number; y: number }>({ + visible: false, + x: 0, + y: 0 + }); + + // Custom Domain Hooks + const closeStartMenu = useCallback(() => setIsStartOpen(false), []); + const { + windows, + activeWindow, + setActiveWindow, + overrideProblemId, + setOverrideProblemId, + refreshExplorerTrigger, + openWindow, + closeWindow, + minimizeWindow, + toggleWindowMinimize, + handleSelectProblemForReview, + triggerRefreshExplorer, + isAnyWindowOpen + } = useWindowManager(closeStartMenu); + + const { + time, + streak, + isMobile, + isFullscreen, + toggleFullscreen, + syncing, + syncResult, + triggerSync + } = useSystemStats(user, () => openWindow('sync')); + + const { + wallpaperUrl, + setWallpaperUrl, + handleWallpaperChange + } = useWallpaper(); + + const { + companionDialogueEvent, + setCompanionDialogueEvent + } = useCompanionEvents(user, openWindow); + + // Initial session & auth listener + useEffect(() => { + supabase.auth.getSession().then(({ data: { session } }) => { + setUser(session?.user ?? null); + setIsLoadingAuth(false); + }); + + const { data: { subscription } } = supabase.auth.onAuthStateChange((_event, session) => { + setUser(session?.user ?? null); + setIsLoadingAuth(false); + }); + + return () => { + subscription.unsubscribe(); + }; + }, []); + + // Remove splash app-loader once auth resolves + useEffect(() => { + if (!isLoadingAuth) { + const loader = document.getElementById('app-loader'); + if (loader) { + loader.remove(); + } + } + }, [isLoadingAuth]); + + // Prompt onboarding for first-time session + useEffect(() => { + if (!isLoadingAuth && user) { + const rawUid = user.id; + const uid = rawUid === 'sandbox-user-id' || !rawUid ? 'sandbox' : rawUid; + const onbDone = localStorage.getItem(`algospaced_onboarding_done_${uid}`); + if (!onbDone) { + const timer = setTimeout(() => { + setIsOnboardingOpen(true); + }, 0); + return () => clearTimeout(timer); + } + } + }, [isLoadingAuth, user]); + + const handleContextMenu = (e: React.MouseEvent) => { + const target = e.target as HTMLElement; + if ( + target.closest('.window-shadow') || + target.closest('button') || + target.closest('input') || + target.closest('textarea') || + target.closest('details') || + target.closest('#start-menu') + ) { + return; + } + e.preventDefault(); + setContextMenu({ + visible: true, + x: e.clientX, + y: e.clientY + }); + }; + + const closeContextMenu = () => { + if (contextMenu.visible) { + setContextMenu(prev => ({ ...prev, visible: false })); + } + }; + + const handleToggleFullscreen = () => { + closeContextMenu(); + toggleFullscreen(); + }; + + const handleSignOut = async () => { + setIsStartOpen(false); + await supabase.auth.signOut(); + }; + + const username = user?.email ? user.email.split('@')[0] : 'Player_One'; + + const desktopIcons: DesktopIconItem[] = useMemo( + () => [ + { + id: 'queue', + label: ( + <> + DAILY
QUEUE + + ), + icon: 'view_list', + badgeShadowColor: '#fde047', + action: () => openWindow('queue') + }, + { + id: 'journey', + label: ( + <> + JOURNEY
PATH + + ), + icon: 'route', + badgeShadowColor: '#fde047', + action: () => openWindow('journey') + }, + { + id: 'sync', + label: ( + <> + DRIVE
SYNC + + ), + icon: 'cloud_sync', + badgeShadowColor: '#fde047', + action: triggerSync + }, + { + id: 'computer', + label: ( + <> + MY
COMP + + ), + iconImg: + 'https://lh3.googleusercontent.com/aida-public/AB6AXuD2tUGA2d7QiNyajDAWYK183zhNTgtAZpOXK3E9wRvHGs-t6ykWt9uPScYe_fziWzQI0pREcY_ThI341WvGMusyYmnAkagfuwx6wubIs1ES68DO8CCNAlcHcb2zOUU4MJeYuhWDy1uYRqyGYjIaDUqfgNWk2vm4WzwRqoorn2dxtZ6QdJhEKbXjG8fG9chkkvr68qJf0fLUL6bIqBXZg2FJ30S7zS3oZ4IZsug-wLyRYuJ4Gu_86snNUo1whNrBdZm5OMREfc9sLbwJ', + badgeShadowColor: '#fde047', + action: () => openWindow('computer') + }, + { + id: 'terminal', + label: 'TERMINAL', + iconImg: + 'https://lh3.googleusercontent.com/aida-public/AB6AXuA2AvcQ2oKWP8AJ8yR5nF82LLDEH1FKySUK-npnqEjvJ6Cs9xp8joCwH7x43oTCAC5xhO2rQdYzka3B6u72FNbdxMnsv3WJLye3bKochu8AnnRlS3szfYSaj724sYsiZo4n8G-oWqvl7C0rOGaDaU2nRH1xXmW2PBi6L2NryTsUaTCVZQKTKBBNNEOig5kh7B52e-iIuj2PTzaSjF9ebp6gMuCnBtJT8Sxo5Qsmvfm-t2U5r_qQpRiYj--Ut41T7NTh-tHgs4S4kBvz', + badgeShadowColor: '#fde047', + action: () => openWindow('terminal') + }, + { + id: 'python', + label: ( + <> + PYTHON
CHALLENGE + + ), + icon: 'sports_esports', + badgeShadowColor: '#4cc9f0', + action: () => openWindow('python') + }, + { + id: 'mysql', + label: ( + <> + MYSQL
PLAYGROUND + + ), + icon: 'database', + badgeShadowColor: '#f72585', + action: () => openWindow('mysql') + }, + { + id: 'companion', + label: ( + <> + PRINCESS
TOWER + + ), + iconImg: '/sprites/princess/smiling_warmly.png', + badgeShadowColor: '#fde047', + action: () => openWindow('companion') + }, + { + id: 'settings', + label: <>API CONFIG, + icon: 'key', + badgeShadowColor: '#10b981', + action: () => openWindow('settings') + } + ], + [openWindow, triggerSync] + ); + + if (isLoadingAuth) { + return null; + } + + if (!user) { + return ; + } + + return ( +
+ {/* Background Wallpaper image */} +
+ + {/* Desktop Draggable Icons */} + {!isMobile && ( + + )} + + {/* System Gadget Widget (Top Right) & Beta Watermark */} + + + {/* Windows Phone Metro Start Screen (Mobile Home View) */} + + + {/* Floating Windows Shell Containers */} + + + {/* Start Menu Popup */} + { + setIsStartOpen(false); + setIsOnboardingOpen(true); + }} + onTriggerSync={triggerSync} + onSignOut={handleSignOut} + /> + + {/* Taskbar Bottom */} + setIsStartOpen(prev => !prev)} + onCloseStart={() => setIsStartOpen(false)} + isMobile={isMobile} + windows={windows} + activeWindow={activeWindow} + onToggleWindow={toggleWindowMinimize} + time={time} + /> + + {/* Princess RPG Dialogue Popup Overlay */} + setCompanionDialogueEvent(null)} + onOpenCompanionWindow={() => openWindow('companion')} + /> + + {/* Reactive Princess Toast HUD */} + openWindow('companion')} /> + + {/* Expedition Onboarding & Fast-Track Checklist Modal */} + setIsOnboardingOpen(false)} + onCompleted={triggerRefreshExplorer} + userId={user?.id || 'sandbox'} + /> + + {/* Retro Desktop Context Menu */} + desktopIconsRef.current?.autoArrange()} + onResetLayout={() => desktopIconsRef.current?.resetLayout()} + onChangeWallpaper={() => document.getElementById('wallpaper-input')?.click()} + onOpenWindow={openWindow} + onTriggerSync={triggerSync} + onToggleFullscreen={handleToggleFullscreen} + isFullscreen={isFullscreen} + /> + + {/* Hidden Wallpaper File Input Selector */} + handleWallpaperChange(e, closeContextMenu)} + className="hidden" + /> +
+ ); +} diff --git a/algospaced-ui/src/assets/react.svg b/algospaced-ui/src/assets/react.svg new file mode 100644 index 0000000000000000000000000000000000000000..6c87de9bb3358469122cc991d5cf578927246184 --- /dev/null +++ b/algospaced-ui/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/algospaced-ui/src/assets/vite.svg b/algospaced-ui/src/assets/vite.svg new file mode 100644 index 0000000000000000000000000000000000000000..5101b674df391399da71c767aa5c976426c9dc7a --- /dev/null +++ b/algospaced-ui/src/assets/vite.svg @@ -0,0 +1 @@ +Vite diff --git a/algospaced-ui/src/components/Auth.tsx b/algospaced-ui/src/components/Auth.tsx new file mode 100644 index 0000000000000000000000000000000000000000..0b2e1b62b97ec3f8e257516d28d721332f5383ed --- /dev/null +++ b/algospaced-ui/src/components/Auth.tsx @@ -0,0 +1,390 @@ +import { useState } from 'react'; +import { authService } from '../firebaseClient'; +import { Mail, Lock, ShieldCheck, ArrowRight, KeyRound, Check, X, RefreshCw } from 'lucide-react'; + +export default function Auth() { + const [isSignUp, setIsSignUp] = useState(false); + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + const [confirmPassword, setConfirmPassword] = useState(''); + const [loading, setLoading] = useState(false); + const [resendingVerification, setResendingVerification] = useState(false); + const [message, setMessage] = useState<{ type: 'error' | 'success' | 'unverified'; text: string } | null>(null); + + // Password validation rules + const hasMinLength = password.length >= 8; + const hasUpperCase = /[A-Z]/.test(password); + const hasLowerCase = /[a-z]/.test(password); + const hasNumber = /[0-9]/.test(password); + const hasSpecialChar = /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~`]/.test(password); + const passwordsMatch = password.length > 0 && password === confirmPassword; + + const isPasswordValid = + hasMinLength && + hasUpperCase && + hasLowerCase && + hasNumber && + hasSpecialChar; + + const handleAuth = async (e: React.FormEvent) => { + e.preventDefault(); + setLoading(true); + setMessage(null); + + const trimmedEmail = email.trim(); + + // Frontend validation + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(trimmedEmail)) { + setMessage({ type: 'error', text: 'Please enter a valid email address.' }); + setLoading(false); + return; + } + + if (isSignUp) { + if (!isPasswordValid) { + setMessage({ + type: 'error', + text: 'Password does not meet the security criteria. Please check the requirements below.', + }); + setLoading(false); + return; + } + + if (password !== confirmPassword) { + setMessage({ type: 'error', text: 'Passwords do not match. Please re-enter.' }); + setLoading(false); + return; + } + + try { + await authService.signUpWithEmail(trimmedEmail, password); + setMessage({ + type: 'success', + text: 'Registration successful! A verification link has been sent to your email. Please verify your email before logging in.', + }); + setIsSignUp(false); + setPassword(''); + setConfirmPassword(''); + } catch (err: any) { + let errMsg = err.message || 'An error occurred during registration.'; + if (err.code === 'auth/email-already-in-use') { + errMsg = 'This email address is already registered. Please sign in instead.'; + } else if (err.code === 'auth/invalid-email') { + errMsg = 'The email address format is invalid.'; + } else if (err.code === 'auth/weak-password') { + errMsg = 'Firebase requires a stronger password.'; + } + setMessage({ type: 'error', text: errMsg }); + } finally { + setLoading(false); + } + } else { + // Sign In + try { + await authService.signInWithEmail(trimmedEmail, password); + } catch (err: any) { + if (err.code === 'auth/email-not-verified') { + setMessage({ + type: 'unverified', + text: 'Your email address is not verified yet. Please check your inbox for the activation link.', + }); + } else { + let errMsg = err.message || 'An error occurred during sign in.'; + if (err.code === 'auth/invalid-credential' || err.code === 'auth/user-not-found' || err.code === 'auth/wrong-password') { + errMsg = 'Invalid email or password. Please check your credentials.'; + } else if (err.code === 'auth/too-many-requests') { + errMsg = 'Access temporarily locked due to many failed attempts. Try again later or reset password.'; + } + setMessage({ type: 'error', text: errMsg }); + } + } finally { + setLoading(false); + } + } + }; + + const handleResendVerification = async () => { + if (!email.trim() || !password) { + setMessage({ + type: 'error', + text: 'Please enter your email and password above to resend the verification link.', + }); + return; + } + + try { + setResendingVerification(true); + await authService.resendVerificationEmail(email.trim(), password); + setMessage({ + type: 'success', + text: `Verification email resent to ${email.trim()}! Please check your inbox and spam folder.`, + }); + } catch (err: any) { + setMessage({ + type: 'error', + text: err.message || 'Failed to resend verification email. Check your credentials.', + }); + } finally { + setResendingVerification(false); + } + }; + + const handleGoogleSignIn = async () => { + try { + setLoading(true); + setMessage(null); + await authService.signInWithGoogle(); + } catch (err: any) { + setMessage({ type: 'error', text: err.message || 'Google Sign-In failed to initialize' }); + setLoading(false); + } + }; + + const handleSandboxEntrance = () => { + authService.enterSandbox(); + }; + + return ( +
+ {/* Background Wallpaper image */} +
+ + {/* OS System Setup Dialog Box */} +
+ {/* Title Bar */} +
+
+ + sports_esports + + System_Setup.exe +
+
+ + {/* Content Box */} +
+ {typeof window !== 'undefined' && window.self !== window.top && ( +
+ ⚠️ RUNNING INSIDE IFRAME +

+ If Google Sign-In popup is restricted inside Hugging Face wrapper, open the standalone link below: +

+ + OPEN FULLSCREEN / DIRECT SITE + +
+ )} + +
+
+ +
+
+

AlgoSpaced

+ BETA +
+

Spaced Repetition for DSA

+
+ + {/* Form Tabs */} +
+ + +
+ + {/* Alert Message Box */} + {message && ( +
+

{message.text}

+ {message.type === 'unverified' && ( + + )} +
+ )} + +
+
+ +
+ + setEmail(e.target.value)} + placeholder="name@arcade.com" + className="w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]" + /> +
+
+ +
+ +
+ + setPassword(e.target.value)} + placeholder="••••••••" + className="w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]" + /> +
+
+ + {isSignUp && ( + <> +
+ +
+ + setConfirmPassword(e.target.value)} + placeholder="••••••••" + className="w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]" + /> +
+
+ + {/* Password Criteria Checklist */} +
+
Password Security Requirements:
+
+ {hasMinLength ? : } + Minimum 8 characters +
+
+ {hasUpperCase && hasLowerCase ? : } + Uppercase & lowercase letters (A-Z, a-z) +
+
+ {hasNumber ? : } + At least 1 number (0-9) +
+
+ {hasSpecialChar ? : } + At least 1 special character (!@#$%^&*...) +
+ {confirmPassword.length > 0 && ( +
+ {passwordsMatch ? : } + {passwordsMatch ? 'Passwords match' : 'Passwords do not match'} +
+ )} +
+ + )} + + +
+ +
+
+
+
+
+ OR LOAD ALTERNATE +
+
+ + + + +
+
+
+ ); +} diff --git a/algospaced-ui/src/components/CreateProblemForm.tsx b/algospaced-ui/src/components/CreateProblemForm.tsx new file mode 100644 index 0000000000000000000000000000000000000000..4ee4d59be3b8c253dde54348cbb87777976f5dc0 --- /dev/null +++ b/algospaced-ui/src/components/CreateProblemForm.tsx @@ -0,0 +1,771 @@ +import React, { useState } from 'react'; +import { supabase } from '../firebaseClient'; + +interface CreateProblemFormProps { + onClose: () => void; + onSuccess: () => void; +} + +interface ExampleItem { + input: string; + output: string; + explanation?: string; +} + +const COMMON_PATTERNS = [ + 'Arrays & Hashing', + 'Two Pointers', + 'Sliding Window', + 'Stack', + 'Binary Search', + 'Linked List', + 'Trees', + 'Tries', + 'Heap / Priority Queue', + 'Backtracking', + 'Graphs', + 'Advanced Graphs', + '1-D Dynamic Programming', + '2-D Dynamic Programming', + 'Greedy', + 'Intervals', + 'Math & Geometry', + 'Bit Manipulation' +]; + +export default function CreateProblemForm({ onClose, onSuccess }: CreateProblemFormProps) { + // Navigation / Tab + const [activeTab, setActiveTab] = useState<'form' | 'preview'>('form'); + + // URL / Quick import + const [urlQuery, setUrlQuery] = useState(''); + const [fetchingUrl, setFetchingUrl] = useState(false); + + // Form Fields + const [newFileName, setNewFileName] = useState(() => { + try { + const draft = localStorage.getItem('algospaced_prefill_draft'); + if (draft) return JSON.parse(draft).name || ''; + } catch {} + return ''; + }); + const [newFileProblemNumber, setNewFileProblemNumber] = useState(''); + const [newFilePattern, setNewFilePattern] = useState(() => { + try { + const draft = localStorage.getItem('algospaced_prefill_draft'); + if (draft) return JSON.parse(draft).pattern || ''; + } catch {} + return 'Arrays & Hashing'; + }); + const [newFileDifficulty, setNewFileDifficulty] = useState<'Easy' | 'Medium' | 'Hard'>('Medium'); + const [newFileOptimalTime, setNewFileOptimalTime] = useState('O(N)'); + const [newFileOptimalSpace, setNewFileOptimalSpace] = useState('O(N)'); + const [newFileDescription, setNewFileDescription] = useState(''); + const [newFileExamples, setNewFileExamples] = useState([ + { input: '', output: '', explanation: '' } + ]); + const [newFileConstraints, setNewFileConstraints] = useState(''); + const [newFileHowToSolve, setNewFileHowToSolve] = useState(''); + const [newFileCode, setNewFileCode] = useState(() => { + try { + const draft = localStorage.getItem('algospaced_prefill_draft'); + if (draft) return JSON.parse(draft).code || ''; + } catch {} + return ''; + }); + + // Dual-write & Status + const [syncToGDoc, setSyncToGDoc] = useState(true); + const [createError, setCreateError] = useState(''); + const [createSuccess, setCreateSuccess] = useState(''); + const [creating, setCreating] = useState(false); + + // AI loading flags + const [loadingIntuition, setLoadingIntuition] = useState(false); + const [loadingComments, setLoadingComments] = useState(false); + const [prefilling, setPrefilling] = useState(false); + + React.useEffect(() => { + localStorage.removeItem('algospaced_prefill_draft'); + }, []); + + const getHeaders = async () => { + const { data: { session } } = await supabase.auth.getSession(); + const token = session ? session.access_token : 'sandbox'; + const customKey = localStorage.getItem('algospaced_custom_api_key') || localStorage.getItem('sandbox_gemini_api_key') || ''; + const customProvider = localStorage.getItem('algospaced_custom_ai_provider') || 'default'; + const headers: Record = { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${token}` + }; + if (customProvider && customProvider !== 'default' && customKey && customKey.trim()) { + headers['x-custom-api-key'] = customKey.trim(); + headers['x-gemini-api-key'] = customKey.trim(); + headers['x-ai-provider'] = customProvider; + } + return headers; + }; + + // 1. Fetch LeetCode Details via URL or Title + const handleFetchLeetCode = async () => { + if (!urlQuery.trim()) return; + setFetchingUrl(true); + setCreateError(''); + try { + const headers = await getHeaders(); + const res = await fetch(`${import.meta.env.VITE_API_BASE_URL}/api/explorer/problems/fetch-leetcode`, { + method: 'POST', + headers, + body: JSON.stringify({ query: urlQuery.trim() }) + }); + + if (res.ok) { + const data = await res.json(); + if (data.problem_number !== undefined && data.problem_number !== null) { + setNewFileProblemNumber(data.problem_number); + } + if (data.title) setNewFileName(data.title); + if (data.difficulty) setNewFileDifficulty(data.difficulty as any); + if (data.pattern) setNewFilePattern(data.pattern); + if (data.optimal_time) setNewFileOptimalTime(data.optimal_time); + if (data.optimal_space) setNewFileOptimalSpace(data.optimal_space); + if (data.description) setNewFileDescription(data.description); + if (data.how_to_solve) setNewFileHowToSolve(data.how_to_solve); + if (data.starter_code && !newFileCode.trim()) setNewFileCode(data.starter_code); + + if (Array.isArray(data.examples) && data.examples.length > 0) { + setNewFileExamples(data.examples); + } + if (Array.isArray(data.constraints)) { + setNewFileConstraints(data.constraints.join('\n')); + } else if (typeof data.constraints === 'string') { + setNewFileConstraints(data.constraints); + } + } else { + const errData = await res.json(); + setCreateError(errData.detail || 'Failed to fetch LeetCode problem data.'); + } + } catch { + setCreateError('Fetch request failed due to connection error.'); + } finally { + setFetchingUrl(false); + } + }; + + // 1b. AI Prefill based on Problem Title / Code + const handlePrefill = async () => { + if (!newFileName.trim() && !newFileCode.trim()) return; + setPrefilling(true); + setCreateError(''); + try { + const headers = await getHeaders(); + const res = await fetch(`${import.meta.env.VITE_API_BASE_URL}/api/explorer/problems/prefill`, { + method: 'POST', + headers, + body: JSON.stringify({ name: newFileName, code: newFileCode }) + }); + if (res.ok) { + const data = await res.json(); + if (data.problem_number !== undefined && data.problem_number !== null) { + setNewFileProblemNumber(data.problem_number); + } + if (data.title && !newFileName) setNewFileName(data.title); + if (data.pattern) setNewFilePattern(data.pattern); + if (data.difficulty) setNewFileDifficulty(data.difficulty as any); + if (data.optimal_time) setNewFileOptimalTime(data.optimal_time); + if (data.optimal_space) setNewFileOptimalSpace(data.optimal_space); + if (data.description) setNewFileDescription(data.description); + if (data.reference_code && !newFileCode.trim()) setNewFileCode(data.reference_code); + } else { + const errData = await res.json(); + setCreateError(errData.detail || 'Prefill failed.'); + } + } catch { + setCreateError('Prefill request failed due to connection error.'); + } finally { + setPrefilling(false); + } + }; + + // 2. AI Assist: Generate "How to solve?" Intuition + const handleGenerateIntuition = async () => { + if (!newFileName.trim() && !newFileCode.trim()) { + setCreateError('Please enter a problem name or code first.'); + return; + } + setLoadingIntuition(true); + setCreateError(''); + try { + const headers = await getHeaders(); + const res = await fetch(`${import.meta.env.VITE_API_BASE_URL}/api/explorer/problems/assist-field`, { + method: 'POST', + headers, + body: JSON.stringify({ + field: 'intuition', + title: newFileName, + code: newFileCode, + description: newFileDescription + }) + }); + + if (res.ok) { + const data = await res.json(); + if (data.how_to_solve) { + setNewFileHowToSolve(data.how_to_solve); + } + } else { + const errData = await res.json(); + setCreateError(errData.detail || 'Failed to generate intuition.'); + } + } catch { + setCreateError('Intuition generator failed due to connection error.'); + } finally { + setLoadingIntuition(false); + } + }; + + // 3. AI Assist: Format Code with Step-by-Step Comments + const handleFormatCode = async () => { + if (!newFileCode.trim()) { + setCreateError('Please enter some Python code to format.'); + return; + } + setLoadingComments(true); + setCreateError(''); + try { + const headers = await getHeaders(); + const res = await fetch(`${import.meta.env.VITE_API_BASE_URL}/api/explorer/problems/assist-field`, { + method: 'POST', + headers, + body: JSON.stringify({ + field: 'comments', + title: newFileName, + code: newFileCode + }) + }); + + if (res.ok) { + const data = await res.json(); + if (data.formatted_code) { + setNewFileCode(data.formatted_code); + } + } else { + const errData = await res.json(); + setCreateError(errData.detail || 'Failed to format code.'); + } + } catch { + setCreateError('Code formatter failed due to connection error.'); + } finally { + setLoadingComments(false); + } + }; + + // 4. Submit Problem (Dual-write to Database & Google Docs) + const handleCreateProblem = async (e: React.FormEvent) => { + e.preventDefault(); + if (!newFileName.trim()) { + setCreateError('Problem name cannot be empty'); + return; + } + setCreating(true); + setCreateError(''); + setCreateSuccess(''); + + try { + const headers = await getHeaders(); + const constraintsList = newFileConstraints + .split('\n') + .map(c => c.trim()) + .filter(Boolean); + + const res = await fetch(`${import.meta.env.VITE_API_BASE_URL}/api/explorer/problems/create`, { + method: 'POST', + headers, + body: JSON.stringify({ + name: newFileName.trim(), + pattern: newFilePattern.trim() || 'General', + difficulty: newFileDifficulty, + reference_code: newFileCode, + description: newFileDescription, + problem_number: newFileProblemNumber === '' ? null : Number(newFileProblemNumber), + optimal_time: newFileOptimalTime, + optimal_space: newFileOptimalSpace, + examples: newFileExamples.filter(ex => ex.input.trim() || ex.output.trim()), + constraints: constraintsList, + how_to_solve: newFileHowToSolve, + sync_to_gdoc: syncToGDoc + }) + }); + + const data = await res.json(); + if (res.ok && data.success) { + setCreateSuccess('Problem saved and synced successfully!'); + setTimeout(() => { + onSuccess(); + onClose(); + }, 1000); + } else { + setCreateError(data.detail || 'Failed to create problem.'); + } + } catch { + setCreateError('Connection timed out.'); + } finally { + setCreating(false); + } + }; + + const addExample = () => { + setNewFileExamples([...newFileExamples, { input: '', output: '', explanation: '' }]); + }; + + const removeExample = (idx: number) => { + if (newFileExamples.length <= 1) return; + setNewFileExamples(newFileExamples.filter((_, i) => i !== idx)); + }; + + const updateExample = (idx: number, field: keyof ExampleItem, val: string) => { + const next = [...newFileExamples]; + next[idx] = { ...next[idx], [field]: val }; + setNewFileExamples(next); + }; + + return ( +
+ {/* Top Header & Tab Bar */} +
+
+
+ ✦ +

Problem & Note Studio

+
+ {/* Tab Switcher */} +
+ + +
+
+ + {/* Quick LeetCode Fetch Bar */} +
+ setUrlQuery(e.target.value)} + onKeyDown={(e) => { if (e.key === 'Enter') { e.preventDefault(); handleFetchLeetCode(); } }} + placeholder="Paste LeetCode URL (e.g. https://leetcode.com/problems/two-sum/) or Title..." + className="flex-1 bg-white border-2 border-ink-black px-2 py-1 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-medium" + /> + +
+
+ + {/* Messages */} + {createError && ( +
+ ⚠️ {createError} +
+ )} + {createSuccess && ( +
+ ✅ {createSuccess} +
+ )} + + {/* Main Body */} +
+ {activeTab === 'form' ? ( + <> + {/* Row 1: Problem #, Title, Difficulty */} +
+
+ + setNewFileProblemNumber(e.target.value === '' ? '' : Number(e.target.value))} + placeholder="e.g. 1" + className="bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-bold" + /> +
+
+
+ + +
+ setNewFileName(e.target.value)} + placeholder="e.g. Two Sum" + className="bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-bold" + /> +
+
+ + +
+
+ + {/* Row 2: Pattern & Complexities */} +
+
+ + setNewFilePattern(e.target.value)} + placeholder="e.g. Arrays & Hashing" + className="bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-medium" + /> + + {COMMON_PATTERNS.map(p => ( + +
+
+ + setNewFileOptimalTime(e.target.value)} + placeholder="e.g. O(N)" + className="bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-semibold" + /> +
+
+ + setNewFileOptimalSpace(e.target.value)} + placeholder="e.g. O(1)" + className="bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-semibold" + /> +
+
+ + {/* Row 3: Problem Description */} +
+ +