From d35af02e47c2c291dbb357791c068dbe4a84767a Mon Sep 17 00:00:00 2001 From: Jonathan Singer Date: Wed, 22 Jul 2026 16:03:24 -0400 Subject: [PATCH] feat(auth): sign in with a ChatGPT subscription for inference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an OAuth-based path to run Strix on a user's ChatGPT Plus/Pro subscription instead of a metered API key, modeled on OpenAI's Codex CLI. Auth: - strix/auth: Codex OAuth login (authorization-code + PKCE), a 0600 token store, refresh-on-expiry, and an AsyncOpenAI client that routes inference through the ChatGPT backend (chatgpt.com/backend-api/codex) with a per-request auth hook so long scans survive token expiry. - `strix auth login|logout|status` CLI (browser loopback on :1455 with a manual-paste fallback); STRIX_AUTH_MODE=subscription persisted to config. Inference wiring: - Subscription branch in configure_sdk_model_defaults installs the Codex client and the Responses API. - _CodexResponsesModel always streams (the backend rejects non-streamed requests) and aggregates back for the non-streaming get_response path. - store=false + encrypted reasoning for the stateless backend; models coerced to plan-available names (default gpt-5.4 — 5.5+ apply stricter content moderation that interferes with security testing). UX / reporting: - Track tokens but report $0.00 in the TUI, completion panel, and web viewer run details; record auth_mode in run.json and PostHog/Scarf. - Graceful, actionable errors for unavailable models and expired sign-in. - Restyled OAuth callback page (Strix branding + link to strix.ai). Tests: PKCE/URL/redirect parsing, token refresh + account-id, streaming aggregation, cost zeroing, CLI routing/provider aliasing. Co-Authored-By: Claude Fable 5 --- README.md | 17 + pyproject.toml | 4 + strix/auth/__init__.py | 12 + strix/auth/codex.py | 412 ++++++++++++++++ strix/auth/store.py | 71 +++ strix/config/models.py | 75 ++- strix/config/settings.py | 5 + strix/core/inputs.py | 34 +- strix/core/runner.py | 8 + strix/interface/auth_cli.py | 466 ++++++++++++++++++ strix/interface/main.py | 178 ++++++- strix/interface/utils.py | 42 +- strix/report/state.py | 6 + strix/report/usage.py | 7 +- strix/telemetry/posthog.py | 3 + strix/telemetry/scarf.py | 3 + .../frontend/src/components/RunDetails.tsx | 19 +- .../{index-BU_tk5L-.js => index-Bv6n0dcC.js} | 112 ++--- ...{index-C0NveaV7.css => index-Cu_Cf9io.css} | 2 +- strix/viewer/static/index.html | 4 +- tests/test_auth_cli.py | 69 +++ tests/test_codex_auth.py | 189 +++++++ tests/test_codex_streaming.py | 138 ++++++ tests/test_runner_rate_limit.py | 1 + tests/test_runner_root_prompt.py | 4 +- tests/test_usage_subscription.py | 46 ++ 26 files changed, 1839 insertions(+), 88 deletions(-) create mode 100644 strix/auth/__init__.py create mode 100644 strix/auth/codex.py create mode 100644 strix/auth/store.py create mode 100644 strix/interface/auth_cli.py rename strix/viewer/static/assets/{index-BU_tk5L-.js => index-Bv6n0dcC.js} (81%) rename strix/viewer/static/assets/{index-C0NveaV7.css => index-Cu_Cf9io.css} (53%) create mode 100644 tests/test_auth_cli.py create mode 100644 tests/test_codex_auth.py create mode 100644 tests/test_codex_streaming.py create mode 100644 tests/test_usage_subscription.py diff --git a/README.md b/README.md index 2122d04b..e97722e9 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,23 @@ export STRIX_REASONING_EFFORT="high" # control thinking effort (default: high, > [!NOTE] > Strix automatically saves your configuration to `~/.strix/cli-config.json`, so you don't have to re-enter it on every run. +#### Sign in with a ChatGPT subscription + +Instead of a metered API key, you can run Strix on your ChatGPT Plus/Pro subscription: + +```bash +strix auth login chatgpt # opens your browser to sign in with ChatGPT +strix --target ./app-directory + +strix auth status # show the active sign-in +strix auth logout # revert to API-key billing +``` + +This uses OpenAI's Codex OAuth flow: inference is billed to your ChatGPT plan rather than per token. Strix defaults to `gpt-5.4` here — newer models apply stricter content moderation that interferes with security-testing prompts, so `gpt-5.4` is recommended for scans. You can override the model with `strix auth login chatgpt --model `. Note that the models a ChatGPT plan exposes are a narrower set than the OpenAI API. If the browser can't open, the command falls back to pasting the redirect URL by hand. Tokens are stored in `~/.strix/subscription-auth.json` (`0600`) and refreshed automatically. + +> [!NOTE] +> Using a ChatGPT subscription outside OpenAI's own products is not officially supported by OpenAI and may be subject to its terms of use. For unattended/CI runs, prefer an API key. + **Recommended models for best results:** - [OpenAI GPT-5.4](https://openai.com/api/) - `openai/gpt-5.4` diff --git a/pyproject.toml b/pyproject.toml index fb0257dd..5c595f07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -213,6 +213,7 @@ ignore = [ # Test doubles use fixture tokens/passwords and match a callee signature whose # args they intentionally ignore. "tests/test_viewer_auth.py" = ["S105", "S106", "ARG001"] +"tests/test_codex_auth.py" = ["S105", "S106", "SLF001"] "tests/test_report_pdf.py" = ["S105", "S106"] # Stdlib HTTP handler overrides (do_GET/do_POST) and lazy imports that avoid a # circular dependency with strix.telemetry / strix.viewer.report_pdf. @@ -254,6 +255,9 @@ ignore = [ "strix/report/state.py" = ["TC003", "PLR0912", "PLR0915", "E501", "PERF401"] "strix/report/usage.py" = ["PLC0415"] "strix/config/models.py" = ["PLC0415"] +# Heavy inference deps (httpx, openai) imported lazily so auth-status checks +# don't pull them in. +"strix/auth/codex.py" = ["PLC0415"] # Interface utility branches per scope-mode / target-type combination; # splitting would obscure the decision tree without simplifying it. "strix/interface/utils.py" = ["PLR0912", "BLE001", "PLC0415"] diff --git a/strix/auth/__init__.py b/strix/auth/__init__.py new file mode 100644 index 00000000..a27bae8d --- /dev/null +++ b/strix/auth/__init__.py @@ -0,0 +1,12 @@ +"""Subscription-based model authentication. + +Strix normally authenticates to a model provider with an API key. This package +adds a second path: signing in with a model *subscription* (currently ChatGPT +Plus/Pro, via the OpenAI Codex OAuth flow) and using that for inference instead +of metered API billing. + +- :mod:`strix.auth.store` — the on-disk credential store + (``~/.strix/subscription-auth.json``, ``0600``), one record per provider. +- :mod:`strix.auth.codex` — the ChatGPT (Codex) OAuth flow, token refresh, and + the OpenAI client that routes inference through the ChatGPT backend. +""" diff --git a/strix/auth/codex.py b/strix/auth/codex.py new file mode 100644 index 00000000..986c6503 --- /dev/null +++ b/strix/auth/codex.py @@ -0,0 +1,412 @@ +"""ChatGPT (Codex) subscription OAuth: login, token refresh, and the OpenAI +client that routes inference through the ChatGPT backend. + +This lets a user run Strix on their ChatGPT Plus/Pro subscription instead of a +metered OpenAI API key. The mechanism mirrors OpenAI's own Codex CLI: an OAuth +2.0 authorization-code flow with PKCE against ``auth.openai.com``, whose access +token is then sent as a ``Bearer`` token to ``chatgpt.com/backend-api/codex`` +(the subscription endpoint) rather than to the metered ``api.openai.com``. + +Terms of service: using a ChatGPT subscription outside OpenAI's own products is +not officially supported by OpenAI and may be against its terms. Strix identifies +as the Codex client (``originator: codex_cli_rs``) because the backend requires +it. This path exists as an option; the user chooses it knowingly. + +The OAuth constants (client id, endpoints, headers, model names) are copied from +OpenAI's Codex CLI and must be kept in step with it if OpenAI changes them. +""" + +from __future__ import annotations + +import base64 +import contextlib +import hashlib +import json +import secrets +import threading +import time +import urllib.error +import urllib.parse +import urllib.request +from typing import TYPE_CHECKING, Any + + +if TYPE_CHECKING: + from openai import AsyncOpenAI + + +from strix.auth import store + + +PROVIDER = "codex" + +# --- OAuth client (from openai/codex) -------------------------------------- +CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann" +AUTHORIZE_URL = "https://auth.openai.com/oauth/authorize" +TOKEN_URL = "https://auth.openai.com/oauth/token" # noqa: S105 - URL, not a secret +CALLBACK_HOST = "localhost" +CALLBACK_PORT = 1455 +CALLBACK_PATH = "/auth/callback" +REDIRECT_URI = f"http://{CALLBACK_HOST}:{CALLBACK_PORT}{CALLBACK_PATH}" +SCOPE = "openid profile email offline_access" + +# --- inference (ChatGPT subscription backend) ------------------------------ +CODEX_BASE_URL = "https://chatgpt.com/backend-api/codex" +ORIGINATOR = "codex_cli_rs" +_ACCOUNT_CLAIM = "https://api.openai.com/auth" + +# Models the ChatGPT Codex backend serves to subscription accounts (bare names, +# no provider prefix). Note this set is NARROWER than the OpenAI API and is +# account-specific: the ``*-codex`` variants are API-only and are rejected for a +# ChatGPT account ("model is not supported when using Codex with a ChatGPT +# account"). These are the general GPT-5.x models a Plus/Pro plan exposes. +# +# Default is gpt-5.4: gpt-5.5 and newer apply stricter content moderation that +# interferes with security-testing prompts, so we prefer 5.4 for scans. +DEFAULT_CODEX_MODEL = "gpt-5.4" +CODEX_MODELS: tuple[str, ...] = ( + "gpt-5.4", + "gpt-5.5", +) + +_TOKEN_TIMEOUT = 30 +# Refresh a little before the token actually expires so a request never goes out +# with a token that lapses in flight. +_EXPIRY_SKEW_S = 300 + +_refresh_lock = threading.Lock() + + +class CodexAuthError(Exception): + """A Codex auth step failed. ``code`` is a stable, machine-readable reason.""" + + def __init__(self, code: str, message: str | None = None) -> None: + self.code = code + super().__init__(message or code) + + +# --- PKCE + authorization --------------------------------------------------- + + +def _b64url(raw: bytes) -> str: + """Unpadded base64url (RFC 7636). Padding here breaks the challenge check.""" + return base64.urlsafe_b64encode(raw).rstrip(b"=").decode("ascii") + + +def generate_pkce() -> tuple[str, str]: + """Return ``(verifier, challenge)`` for a fresh PKCE exchange.""" + verifier = _b64url(secrets.token_bytes(64)) + challenge = _b64url(hashlib.sha256(verifier.encode("ascii")).digest()) + return verifier, challenge + + +def create_state() -> str: + """Return a random ``state`` value for CSRF protection on the callback.""" + return secrets.token_hex(16) + + +def build_authorize_url(challenge: str, state: str) -> str: + """Build the browser URL the user visits to approve the sign-in.""" + params = { + "response_type": "code", + "client_id": CLIENT_ID, + "redirect_uri": REDIRECT_URI, + "scope": SCOPE, + "code_challenge": challenge, + "code_challenge_method": "S256", + "state": state, + "id_token_add_organizations": "true", + "codex_cli_simplified_flow": "true", + "originator": ORIGINATOR, + } + return f"{AUTHORIZE_URL}?{urllib.parse.urlencode(params)}" + + +def parse_redirect_input(value: str) -> tuple[str | None, str | None]: + """Extract ``(code, state)`` from whatever the user pastes back. + + Accepts a full redirect URL, a ``code#state`` fragment, a bare query string, + or just the code — so the manual-paste fallback is forgiving. + """ + value = (value or "").strip() + if not value: + return None, None + with contextlib.suppress(ValueError): + parsed = urllib.parse.urlparse(value) + if parsed.scheme and parsed.query: + query = urllib.parse.parse_qs(parsed.query) + return _first(query, "code"), _first(query, "state") + if "#" in value: + code, _, state = value.partition("#") + return code or None, state or None + if "code=" in value: + query = urllib.parse.parse_qs(value) + return _first(query, "code"), _first(query, "state") + return value, None + + +def _first(query: dict[str, list[str]], key: str) -> str | None: + values = query.get(key) + return values[0] if values else None + + +# --- token exchange / refresh ---------------------------------------------- + + +def _post_form(payload: dict[str, str]) -> dict[str, Any]: + body = urllib.parse.urlencode(payload).encode("ascii") + request = urllib.request.Request( # noqa: S310 - fixed https OAuth endpoint + TOKEN_URL, + data=body, + headers={ + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "application/json", + }, + method="POST", + ) + try: + with urllib.request.urlopen(request, timeout=_TOKEN_TIMEOUT) as response: # noqa: S310 + data = json.loads(response.read() or b"{}") + except urllib.error.HTTPError as exc: + detail = exc.read().decode("utf-8", "replace")[:300] + raise CodexAuthError("token_http_error", f"HTTP {exc.code}: {detail}") from exc + except (urllib.error.URLError, TimeoutError, OSError) as exc: + raise CodexAuthError("unavailable", str(exc)) from exc + if not isinstance(data, dict): + raise CodexAuthError("bad_response", "token endpoint returned non-object") + return data + + +def _record_from_token_response( + data: dict[str, Any], refresh_fallback: str | None = None +) -> dict[str, Any]: + access = data.get("access_token") + # A refresh response may omit refresh_token when it isn't rotated; keep the old one. + refresh = data.get("refresh_token") or refresh_fallback + expires_in = data.get("expires_in") + if not isinstance(access, str) or not access: + raise CodexAuthError("bad_response", "token response missing access_token") + if not isinstance(refresh, str) or not refresh: + raise CodexAuthError("bad_response", "token response missing refresh_token") + account_id = _account_id_from_jwt(access) or _account_id_from_jwt( + data.get("id_token") if isinstance(data.get("id_token"), str) else "" + ) + if not account_id: + raise CodexAuthError("no_account_id", "could not read chatgpt_account_id from token") + ttl = expires_in if isinstance(expires_in, (int, float)) else 3600 + return { + "type": "oauth", + "provider": PROVIDER, + "access": access, + "refresh": refresh, + "account_id": account_id, + "expires_at": time.time() + ttl, + } + + +def exchange_code(code: str, verifier: str) -> dict[str, Any]: + """Exchange an authorization code + PKCE verifier for a token record.""" + data = _post_form( + { + "grant_type": "authorization_code", + "client_id": CLIENT_ID, + "code": code, + "code_verifier": verifier, + "redirect_uri": REDIRECT_URI, + } + ) + return _record_from_token_response(data) + + +def refresh_tokens(refresh_token: str) -> dict[str, Any]: + """Exchange a refresh token for a new token record.""" + data = _post_form( + { + "grant_type": "refresh_token", + "client_id": CLIENT_ID, + "refresh_token": refresh_token, + } + ) + return _record_from_token_response(data, refresh_fallback=refresh_token) + + +def _account_id_from_jwt(token: str | None) -> str | None: + """Read the ChatGPT account id out of a JWT payload without verifying it. + + The token's authenticity is enforced by the server on use; here we only need + to read the account id claim so we can send the ``chatgpt-account-id`` header. + """ + if not token or token.count(".") != 2: + return None + payload_b64 = token.split(".")[1] + padding = "=" * (-len(payload_b64) % 4) + try: + payload = json.loads(base64.urlsafe_b64decode(payload_b64 + padding)) + except (ValueError, json.JSONDecodeError): + return None + if not isinstance(payload, dict): + return None + auth = payload.get(_ACCOUNT_CLAIM) + if isinstance(auth, dict): + account_id = auth.get("chatgpt_account_id") + if isinstance(account_id, str) and account_id: + return account_id + organizations = payload.get("organizations") + if isinstance(organizations, list) and organizations and isinstance(organizations[0], dict): + org_id = organizations[0].get("id") + if isinstance(org_id, str) and org_id: + return org_id + return None + + +# --- stored credential access ---------------------------------------------- + + +def read_record() -> dict[str, Any] | None: + """Return the stored Codex token record if it is complete, else None.""" + record = store.read_provider(PROVIDER) + if not record or record.get("type") != "oauth": + return None + if not (record.get("access") and record.get("refresh") and record.get("account_id")): + return None + return record + + +def is_authenticated() -> bool: + """True when a usable Codex token record exists on disk.""" + return read_record() is not None + + +def save_record(record: dict[str, Any]) -> None: + store.write_provider(PROVIDER, record) + + +def logout() -> None: + store.forget(PROVIDER) + + +def _near_expiry(record: dict[str, Any]) -> bool: + expires_at = record.get("expires_at") + if not isinstance(expires_at, (int, float)): + return True + return expires_at - _EXPIRY_SKEW_S <= time.time() + + +def get_valid_token() -> tuple[str, str]: + """Return ``(access_token, account_id)``, refreshing if near expiry. + + Refreshes under a lock and re-reads the store after acquiring it, so that + when many agents fire at once only one refresh happens — OpenAI invalidates a + refresh token as soon as it is used, so a concurrent stampede would fail. + """ + record = read_record() + if record is None: + raise CodexAuthError("not_authenticated", "not signed in; run: strix auth login") + if not _near_expiry(record): + return record["access"], record["account_id"] + with _refresh_lock: + record = read_record() + if record is None: + raise CodexAuthError("not_authenticated", "not signed in; run: strix auth login") + if not _near_expiry(record): + return record["access"], record["account_id"] + refreshed = refresh_tokens(record["refresh"]) + save_record(refreshed) + return refreshed["access"], refreshed["account_id"] + + +# --- inference client ------------------------------------------------------- + + +def build_openai_client() -> AsyncOpenAI: + """Build an ``AsyncOpenAI`` that routes inference through the ChatGPT backend. + + A per-request hook refreshes the token if needed and stamps the auth headers, + so a long scan that outlives a single access token keeps working. The + ``api_key`` passed to the SDK is a placeholder — the hook always overwrites + the ``Authorization`` header with the current token. + """ + import asyncio + + import httpx + from openai import AsyncOpenAI + + # Validate up front so sign-in problems surface at configure time, not + # mid-scan, and to fail fast if the stored refresh token is dead. + _access, account_id = get_valid_token() + + async def _auth_hook(request: httpx.Request) -> None: + access, acct = await asyncio.to_thread(get_valid_token) + request.headers["Authorization"] = f"Bearer {access}" + request.headers["chatgpt-account-id"] = acct + + http_client = httpx.AsyncClient( + timeout=httpx.Timeout(600.0, connect=30.0), + event_hooks={"request": [_auth_hook]}, + ) + return AsyncOpenAI( + api_key="strix-codex-oauth", + base_url=CODEX_BASE_URL, + http_client=http_client, + default_headers={ + "chatgpt-account-id": account_id, + "OpenAI-Beta": "responses=experimental", + "originator": ORIGINATOR, + }, + ) + + +def is_backend_compatible(model_name: str | None) -> bool: + """True if ``model_name`` could be served by the ChatGPT subscription backend. + + A bare name or an ``openai/`` prefix is plausible (the backend validates the + exact name against the account). Any other provider prefix — ``anthropic/``, + ``deepseek/``, ``vertex_ai/``, … — never can be, so it's treated as + incompatible. + """ + name = (model_name or "").strip() + if not name: + return False + if "/" not in name: + return True + return name.split("/", 1)[0].lower() == "openai" + + +def normalize_model(model_name: str | None) -> str: + """Return the bare model name to send to the ChatGPT backend. + + ``openai/gpt-5.4`` → ``gpt-5.4``. A configured-but-unlisted OpenAI/bare name + is passed through as-is (availability is account-specific and the backend is + the authority). An empty value, or a model from another provider that a + ChatGPT subscription can't serve, falls back to the default so a stray + ``STRIX_LLM`` never sends an impossible name to the backend. See + ``is_backend_compatible``. + """ + name = (model_name or "").strip() + if not is_backend_compatible(name): + return DEFAULT_CODEX_MODEL + if "/" in name: + name = name.rsplit("/", 1)[-1] + return name + + +__all__ = [ + "CODEX_MODELS", + "DEFAULT_CODEX_MODEL", + "PROVIDER", + "CodexAuthError", + "build_authorize_url", + "build_openai_client", + "create_state", + "exchange_code", + "generate_pkce", + "get_valid_token", + "is_authenticated", + "is_backend_compatible", + "logout", + "normalize_model", + "parse_redirect_input", + "read_record", + "refresh_tokens", + "save_record", +] diff --git a/strix/auth/store.py b/strix/auth/store.py new file mode 100644 index 00000000..5b976ab1 --- /dev/null +++ b/strix/auth/store.py @@ -0,0 +1,71 @@ +"""Local credential store for subscription-based model auth. + +Mirrors the viewer-auth store (see ``strix/viewer/auth.py``): a single JSON file +under ``~/.strix`` written ``0600``, holding one record per provider. It is kept +deliberately separate from ``cli-config.json`` — that file only ever holds env +vars, so OAuth tokens never leak into the env-var config that gets echoed back +to the user or copied into CI secrets. +""" + +from __future__ import annotations + +import contextlib +import json +from pathlib import Path +from typing import Any + + +AUTH_PATH = Path.home() / ".strix" / "subscription-auth.json" + + +def read_all() -> dict[str, Any]: + """Return the full provider→record mapping, or ``{}`` if absent/unreadable.""" + try: + data = json.loads(AUTH_PATH.read_text(encoding="utf-8")) + except (OSError, json.JSONDecodeError): + return {} + return data if isinstance(data, dict) else {} + + +def read_provider(provider: str) -> dict[str, Any] | None: + """Return the stored record for ``provider``, or None.""" + record = read_all().get(provider) + return record if isinstance(record, dict) else None + + +def write_provider(provider: str, record: dict[str, Any]) -> None: + """Persist ``record`` for ``provider``, preserving other providers' records.""" + data = read_all() + data[provider] = record + _atomic_write(data) + + +def forget(provider: str) -> None: + """Delete the stored record for ``provider``. No-op if it is absent. + + Removes the file entirely once the last record is gone, so ``logout`` leaves + nothing behind. + """ + data = read_all() + if provider not in data: + return + del data[provider] + if data: + _atomic_write(data) + return + with contextlib.suppress(OSError): + AUTH_PATH.unlink() + + +def _atomic_write(data: dict[str, Any]) -> None: + AUTH_PATH.parent.mkdir(parents=True, exist_ok=True) + tmp = AUTH_PATH.with_suffix(".json.tmp") + tmp.write_text(json.dumps(data, indent=2), encoding="utf-8") + with contextlib.suppress(OSError): + tmp.chmod(0o600) + tmp.replace(AUTH_PATH) + with contextlib.suppress(OSError): + AUTH_PATH.chmod(0o600) + + +__all__ = ["AUTH_PATH", "forget", "read_all", "read_provider", "write_provider"] diff --git a/strix/config/models.py b/strix/config/models.py index 0ce107f5..f38d0e82 100644 --- a/strix/config/models.py +++ b/strix/config/models.py @@ -3,10 +3,16 @@ from __future__ import annotations import os -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any -from agents import set_default_openai_api, set_default_openai_key, set_tracing_disabled +from agents import ( + set_default_openai_api, + set_default_openai_client, + set_default_openai_key, + set_tracing_disabled, +) from agents.models.multi_provider import MultiProvider +from agents.models.openai_responses import OpenAIResponsesModel from agents.retry import ( ModelRetryBackoffSettings, ModelRetrySettings, @@ -16,7 +22,7 @@ from agents.retry import ( if TYPE_CHECKING: - from agents.models.interface import ModelProvider + from agents.models.interface import Model, ModelProvider from strix.config.settings import Settings @@ -36,6 +42,33 @@ def _retry_statusless_provider_errors(context: RetryPolicyContext) -> bool: return normalized.status_code is None +class _CodexResponsesModel(OpenAIResponsesModel): + """Responses model for the ChatGPT Codex backend, which rejects non-streamed + requests with ``{"detail": "Stream must be set to true"}``. + + It always calls the API in streaming mode. The natively-streamed run path + (``Runner.run_streamed`` → ``stream_response``) is forwarded unchanged; the + non-streaming ``get_response`` path (warm-up, dedupe) transparently issues a + streamed request and aggregates the events back into a single ``Response``, + so those callers don't need to know the backend only speaks SSE. + """ + + async def _fetch_response(self, *args: Any, stream: bool = False, **kwargs: Any) -> Any: + # Always call the backend streamed (it rejects non-streamed requests). + events = await super()._fetch_response(*args, stream=True, **kwargs) # type: ignore[call-overload] + if stream: + return events + # Non-streaming caller: aggregate the SSE events into a single Response. + final_response = None + async for event in events: # iterate to exhaustion so the stream cleans up + if getattr(event, "type", None) == "response.completed": + final_response = event.response + if final_response is None: + msg = "ChatGPT backend stream ended without a completed response" + raise RuntimeError(msg) + return final_response + + class StrixProvider(MultiProvider): """Route any non-OpenAI prefix through LiteLLM with the prefix preserved, so users type ``deepseek/deepseek-chat`` rather than @@ -59,6 +92,18 @@ class StrixProvider(MultiProvider): return self._get_fallback_provider("litellm"), f"ollama_chat/{stripped_model_name}" return self._get_fallback_provider("litellm"), original_model_name + def get_model(self, model_name: str | None) -> Model: + model = super().get_model(model_name) + # In subscription mode the OpenAI route talks to the ChatGPT Codex + # backend, which requires streamed requests. Promote the responses model + # to the streaming-aware subclass (no added state, so the in-place class + # swap is safe) rather than duplicating the SDK's provider wiring. + from strix.config.loader import load_settings + + if load_settings().llm.auth_mode == "subscription" and type(model) is OpenAIResponsesModel: + model.__class__ = _CodexResponsesModel + return model + DEFAULT_MODEL_RETRY = ModelRetrySettings( max_retries=5, @@ -117,6 +162,9 @@ def configure_sdk_model_defaults(settings: Settings) -> None: """Apply Strix config to SDK-native defaults.""" llm = settings.llm set_tracing_disabled(True) + if llm.auth_mode == "subscription": + _configure_subscription_defaults() + return _configure_litellm_compatibility() _configure_openrouter_attribution(llm.model) if llm.api_key: @@ -131,6 +179,23 @@ def configure_sdk_model_defaults(settings: Settings) -> None: set_default_openai_api("responses") +def _configure_subscription_defaults() -> None: + """Route inference through a model subscription instead of an API key. + + Builds the subscription-backed OpenAI client (currently ChatGPT/Codex) and + installs it as the SDK default, so ``StrixProvider`` uses it for the OpenAI + route. The client carries the OAuth bearer token and refreshes it per + request; the Codex backend speaks the Responses API. Statelessness + (``store=false`` and encrypted reasoning) is applied per call in + ``make_model_settings``. + """ + from strix.auth import codex + + client = codex.build_openai_client() + set_default_openai_client(client, use_for_tracing=False) + set_default_openai_api("responses") + + def _mirror_api_key_to_provider_env(model_name: str | None, api_key: str) -> None: if not model_name: return @@ -211,6 +276,10 @@ def _configure_litellm_default(name: str, value: str) -> None: def uses_chat_completions_tool_schema(model_name: str, settings: Settings) -> bool: """Return whether the resolved SDK route can only receive JSON function tools.""" + # Subscription mode (ChatGPT/Codex) speaks the Responses API, so it takes the + # native reasoning-model tool schema regardless of the model name's shape. + if settings.llm.auth_mode == "subscription": + return False model = model_name.strip().lower() if "/" in model and not model.startswith("openai/"): return True diff --git a/strix/config/settings.py b/strix/config/settings.py index 8e480cb1..2ca67eb2 100644 --- a/strix/config/settings.py +++ b/strix/config/settings.py @@ -9,6 +9,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict ReasoningEffort = Literal["none", "minimal", "low", "medium", "high", "xhigh"] +AuthMode = Literal["api_key", "subscription"] _BASE_CONFIG = SettingsConfigDict( case_sensitive=False, @@ -21,6 +22,10 @@ class LlmSettings(BaseSettings): model_config = _BASE_CONFIG model: str | None = Field(default=None, alias="STRIX_LLM") + # "api_key" (default) reads a provider API key from ``api_key`` below. + # "subscription" ignores the API key and authenticates with a model + # subscription instead (see ``strix/auth``); set by ``strix auth login``. + auth_mode: AuthMode = Field(default="api_key", alias="STRIX_AUTH_MODE") api_key: str | None = Field( default=None, validation_alias=AliasChoices("LLM_API_KEY", "OPENAI_API_KEY"), diff --git a/strix/core/inputs.py b/strix/core/inputs.py index de922d07..a95cc62a 100644 --- a/strix/core/inputs.py +++ b/strix/core/inputs.py @@ -128,6 +128,7 @@ def make_model_settings( model_name: str, force_required_tool_choice: bool = False, request_timeout: float | None = None, + codex_subscription: bool = False, ) -> ModelSettings: model_settings = ModelSettings( parallel_tool_calls=False, @@ -135,10 +136,16 @@ def make_model_settings( include_usage=True, extra_args=request_timeout_extra_args(request_timeout), ) - if ( - reasoning_effort is not None - and reasoning_effort != "none" - and model_supports_reasoning(model_name) + if codex_subscription: + # The ChatGPT Codex backend is stateless: it requires store=false and + # carries reasoning context forward via encrypted reasoning content + # replayed in the input rather than server-side state. + model_settings = model_settings.resolve( + ModelSettings(store=False, response_include=["reasoning.encrypted_content"]), + ) + reasoning_effort = _resolve_reasoning_effort(reasoning_effort, codex_subscription) + if reasoning_effort is not None and ( + codex_subscription or model_supports_reasoning(model_name) ): model_settings = model_settings.resolve( ModelSettings(reasoning=Reasoning(effort=reasoning_effort)), @@ -148,6 +155,25 @@ def make_model_settings( return model_settings +def _resolve_reasoning_effort( + reasoning_effort: ReasoningEffort | None, codex_subscription: bool +) -> ReasoningEffort | None: + """Normalize the configured effort, clamping to what the Codex backend accepts. + + The ChatGPT Codex backend rejects ``minimal`` and only some models accept + ``xhigh``; both are clamped rather than passed through, so a valid Strix + config doesn't fail at the provider. + """ + if reasoning_effort is None or reasoning_effort == "none": + return None + if codex_subscription: + if reasoning_effort == "minimal": + return "low" + if reasoning_effort == "xhigh": + return "high" + return reasoning_effort + + def child_initial_input( *, name: str, diff --git a/strix/core/runner.py b/strix/core/runner.py index 153d16dd..701ead00 100644 --- a/strix/core/runner.py +++ b/strix/core/runner.py @@ -148,7 +148,14 @@ async def run_strix_scan( settings = load_settings() configure_sdk_model_defaults(settings) + codex_subscription = settings.llm.auth_mode == "subscription" resolved_model = (model or settings.llm.model or "").strip() + if codex_subscription: + # Map whatever is configured to a name the ChatGPT Codex backend accepts, + # so a stray STRIX_LLM value can't send an unsupported model. + from strix.auth import codex + + resolved_model = codex.normalize_model(resolved_model) if not resolved_model: raise RuntimeError( "No LLM model configured. Set STRIX_LLM env or pass model= to run_strix_scan().", @@ -216,6 +223,7 @@ async def run_strix_scan( model_name=resolved_model, force_required_tool_choice=settings.llm.force_required_tool_choice, request_timeout=settings.llm.timeout, + codex_subscription=codex_subscription, ) run_config = RunConfig( model=resolved_model, diff --git a/strix/interface/auth_cli.py b/strix/interface/auth_cli.py new file mode 100644 index 00000000..312fc3f0 --- /dev/null +++ b/strix/interface/auth_cli.py @@ -0,0 +1,466 @@ +"""`strix auth` — manage model-subscription sign-in. + +Subcommands: + +- ``strix auth login chatgpt [--model NAME] [--manual]`` — OAuth sign-in with a + ChatGPT Plus/Pro subscription. Opens a browser and catches the redirect on a + local server; ``--manual`` (or a failure to open the browser / bind the port) + falls back to pasting the redirect URL by hand. +- ``strix auth status`` — show whether a subscription sign-in is active. +- ``strix auth logout`` — forget the stored sign-in. + +Signing in persists ``STRIX_AUTH_MODE=subscription`` and a Codex model to +``~/.strix/cli-config.json`` so subsequent ``strix`` runs use the subscription. +Tokens live separately in ``~/.strix/subscription-auth.json`` (see +``strix/auth/store.py``); they are never written to the env-var config. +""" + +from __future__ import annotations + +import argparse +import base64 +import logging +import os +import threading +import webbrowser +from http.server import BaseHTTPRequestHandler, HTTPServer +from pathlib import Path +from typing import Any +from urllib.parse import parse_qs, urlparse + +from rich.console import Console +from rich.panel import Panel +from rich.text import Text + +from strix.auth import codex +from strix.config import load_settings, persist_current + + +logger = logging.getLogger(__name__) + +_CALLBACK_TIMEOUT_S = 300 + +# CLI-facing name for the login provider. Internally this is the Codex OAuth +# flow (``codex.PROVIDER``), but users know it as ChatGPT, so that's what the +# command and messaging say. ``codex`` is accepted as an alias. +LOGIN_PROVIDER = "chatgpt" +_ACCEPTED_PROVIDERS = frozenset({LOGIN_PROVIDER, codex.PROVIDER}) + +_USAGE = ( + "Usage:\n" + " strix auth login chatgpt [--model NAME] [--manual]\n" + " strix auth status\n" + " strix auth logout" +) + + +def run_auth(argv: list[str]) -> int: + """Entry point for ``strix auth …``. Returns a process exit code.""" + console = Console() + subcommand = argv[0] if argv else "login" + rest = argv[1:] + + if subcommand in ("-h", "--help", "help"): + console.print(_USAGE) + return 0 + if subcommand == "login": + return _login(console, rest) + if subcommand == "status": + return _status(console) + if subcommand == "logout": + return _logout(console) + + # Bare `strix auth` (no subcommand) defaults to login; anything else is an error. + if not argv: + return _login(console, []) + console.print(f"[red]Unknown auth command:[/] {subcommand}\n") + console.print(_USAGE) + return 2 + + +def _login(console: Console, argv: list[str]) -> int: + parser = argparse.ArgumentParser(prog="strix auth login", add_help=True) + parser.add_argument( + "provider", + nargs="?", + default=LOGIN_PROVIDER, + help="Model provider to sign in with (default: chatgpt).", + ) + parser.add_argument( + "--model", + default=codex.DEFAULT_CODEX_MODEL, + help=f"ChatGPT model to use (default: {codex.DEFAULT_CODEX_MODEL}).", + ) + parser.add_argument( + "--manual", + action="store_true", + help="Skip the local callback server and paste the redirect URL by hand.", + ) + try: + args = parser.parse_args(argv) + except SystemExit as exc: # argparse already printed the message + return int(exc.code or 2) + + if args.provider.lower() not in _ACCEPTED_PROVIDERS: + console.print( + f"[red]Unsupported provider:[/] {args.provider}. " + f"Only '{LOGIN_PROVIDER}' (ChatGPT subscription) is supported." + ) + return 2 + + # Capture any shell-exported STRIX_LLM before we persist our own, so we can + # warn if it would override the model chosen here (env wins over the config + # file we write). This must be read before _persist_subscription_config sets it. + preexisting_llm = os.environ.get("STRIX_LLM") + + verifier, challenge = codex.generate_pkce() + state = codex.create_state() + authorize_url = codex.build_authorize_url(challenge, state) + + console.print() + console.print("[bold]Signing in with ChatGPT[/] [dim](provider: chatgpt)[/]") + console.print( + "[dim]This uses your ChatGPT Plus/Pro plan for inference instead of a metered API key.[/]" + ) + console.print() + + try: + record = _run_oauth_flow(console, authorize_url, verifier, state, manual=args.manual) + except codex.CodexAuthError as exc: + return _fail(console, exc) + except KeyboardInterrupt: + console.print("\n[yellow]Sign-in cancelled.[/]") + return 130 + + codex.save_record(record) + _persist_subscription_config(args.model) + _warn_if_env_overrides_model(console, preexisting_llm, args.model) + + stored_model = load_settings().llm.model or f"openai/{codex.normalize_model(args.model)}" + _print_success(console, stored_model) + return 0 + + +def _warn_if_env_overrides_model(console: Console, preexisting: str | None, chosen: str) -> None: + """Warn when a shell-exported STRIX_LLM will override the model just saved. + + The config file we write loses to an environment variable at load time, so a + lingering ``export STRIX_LLM=…`` would silently win. Only warn when it + resolves to a different model than the one chosen here (same value, or an + incompatible one that coerces to the same default, is not a real conflict). + """ + if not preexisting or not preexisting.strip(): + return + if codex.normalize_model(preexisting) == codex.normalize_model(chosen): + return + console.print( + f"[yellow]Note:[/] STRIX_LLM is set in your shell to " + f"[bold]{preexisting.strip()}[/], which overrides the model just saved. " + f"Run [bold cyan]unset STRIX_LLM[/] so the subscription model is used." + ) + + +def _run_oauth_flow( + console: Console, + authorize_url: str, + verifier: str, + state: str, + *, + manual: bool, +) -> dict[str, Any]: + """Drive the browser (or manual) OAuth flow and return a token record.""" + server = None if manual else _try_start_callback_server() + + console.print("Open this URL in your browser to authorize:") + console.print(f"[cyan]{authorize_url}[/]") + console.print() + if not manual: + try: + webbrowser.open(authorize_url) + except Exception: # noqa: BLE001 - opening a browser is best-effort + logger.debug("could not open browser", exc_info=True) + + if server is not None: + console.print("[dim]Waiting for you to finish signing in…[/]") + result = server.wait(_CALLBACK_TIMEOUT_S) + server.shutdown() + if result is not None: + code, returned_state, error = result + if error: + raise codex.CodexAuthError("oauth_error", error) + return _finish(code, returned_state, verifier, state) + console.print("[yellow]Timed out waiting for the browser. Falling back to manual paste.[/]") + + # Manual fallback: the user completes sign-in and pastes the redirect URL + # (the browser lands on a localhost page that won't load if no server is up; + # the address bar still holds the code+state). + console.print() + try: + pasted = console.input("Paste the full redirect URL (or code#state): ").strip() + except EOFError as exc: + raise codex.CodexAuthError("no_input", "no redirect URL provided") from exc + code, returned_state = codex.parse_redirect_input(pasted) + return _finish(code, returned_state, verifier, state) + + +def _finish( + code: str | None, returned_state: str | None, verifier: str, expected_state: str +) -> dict[str, Any]: + if not code: + raise codex.CodexAuthError("no_code", "no authorization code found in the redirect") + if returned_state is not None and returned_state != expected_state: + raise codex.CodexAuthError("state_mismatch", "state did not match; possible CSRF") + return codex.exchange_code(code, verifier) + + +class _CallbackServer: + """A one-shot local HTTP server that catches the OAuth redirect.""" + + def __init__(self, httpd: HTTPServer, event: threading.Event, holder: dict[str, Any]) -> None: + self._httpd = httpd + self._event = event + self._holder = holder + self._thread = threading.Thread(target=httpd.serve_forever, daemon=True) + self._thread.start() + + def wait(self, timeout: float) -> tuple[str | None, str | None, str | None] | None: + if not self._event.wait(timeout): + return None + return ( + self._holder.get("code"), + self._holder.get("state"), + self._holder.get("error"), + ) + + def shutdown(self) -> None: + self._httpd.shutdown() + self._httpd.server_close() + + +def _try_start_callback_server() -> _CallbackServer | None: + event = threading.Event() + holder: dict[str, Any] = {} + + class Handler(BaseHTTPRequestHandler): + def log_message(self, *args: Any) -> None: # silence default stderr logging + pass + + def do_GET(self) -> None: + parsed = urlparse(self.path) + if parsed.path != codex.CALLBACK_PATH: + self.send_response(404) + self.end_headers() + return + query = parse_qs(parsed.query) + holder["code"] = _first(query, "code") + holder["state"] = _first(query, "state") + holder["error"] = _first(query, "error_description") or _first(query, "error") + body = _render_callback_html().encode("utf-8") + self.send_response(200) + self.send_header("Content-Type", "text/html; charset=utf-8") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + event.set() + + try: + httpd = HTTPServer(("127.0.0.1", codex.CALLBACK_PORT), Handler) + except OSError: + logger.debug("could not bind callback port %d", codex.CALLBACK_PORT, exc_info=True) + return None + return _CallbackServer(httpd, event, holder) + + +def _first(query: dict[str, list[str]], key: str) -> str | None: + values = query.get(key) + return values[0] if values else None + + +def _persist_subscription_config(model: str) -> None: + """Persist subscription mode + model to cli-config.json for later runs.""" + normalized = codex.normalize_model(model) + os.environ["STRIX_AUTH_MODE"] = "subscription" + os.environ["STRIX_LLM"] = f"openai/{normalized}" + persist_current() + + +def _status(console: Console) -> int: + record = codex.read_record() + if record is None: + console.print("[yellow]Not signed in.[/] Run [cyan]strix auth login[/] to sign in.") + return 1 + settings = load_settings() + console.print("[green]Signed in[/] with a ChatGPT subscription (Codex).") + console.print(f" Account: [bold]{record.get('account_id')}[/]") + console.print(f" Model: [bold]{settings.llm.model or codex.DEFAULT_CODEX_MODEL}[/]") + if settings.llm.auth_mode != "subscription": + console.print( + " [yellow]Note:[/] STRIX_AUTH_MODE is not 'subscription'; " + "runs will use API-key billing until you re-run [cyan]strix auth login[/]." + ) + return 0 + + +def _logout(console: Console) -> int: + codex.logout() + console.print("[green]Signed out.[/] Stored subscription credentials removed.") + console.print( + "[dim]Runs still set to subscription mode will ask you to sign in again. " + "Set STRIX_AUTH_MODE=api_key (and LLM_API_KEY) to use metered billing.[/]" + ) + return 0 + + +def _fail(console: Console, exc: codex.CodexAuthError) -> int: + error_text = Text() + error_text.append("SIGN-IN FAILED", style="bold red") + error_text.append("\n\n", style="white") + error_text.append(f"{exc}", style="white") + console.print() + console.print( + Panel( + error_text, + title="[bold white]STRIX", + title_align="left", + border_style="red", + padding=(1, 2), + ) + ) + return 1 + + +def _print_success(console: Console, model: str) -> None: + text = Text() + text.append("Signed in with your ChatGPT subscription", style="bold #22c55e") + text.append("\n\n", style="white") + text.append("Model", style="dim") + text.append(" ") + text.append(model, style="bold white") + text.append("\n") + text.append("Billing", style="dim") + text.append(" ") + text.append("your ChatGPT plan (no per-token API charges)", style="white") + text.append("\n\n", style="white") + text.append("Run a scan as usual, e.g. ", style="white") + text.append("strix --target https://example.com", style="bold cyan") + text.append("\nChange model with ", style="dim") + text.append("strix auth login chatgpt --model ", style="cyan") + console.print() + console.print( + Panel( + text, + title="[bold white]STRIX", + title_align="left", + border_style="#22c55e", + padding=(1, 2), + ) + ) + console.print() + + +_LOGO_PATH = Path(__file__).resolve().parent.parent / "viewer" / "static" / "logo.png" + + +def _logo_img_tag() -> str: + """Return an ```` for the Strix logo as an inline data URI, or "". + + The callback page is served offline by the local OAuth server, so the logo + is embedded rather than linked. Missing/unreadable file degrades to just the + "Strix" wordmark. + """ + try: + data = _LOGO_PATH.read_bytes() + except OSError: + return "" + encoded = base64.b64encode(data).decode("ascii") + return f'' + + +def _render_callback_html() -> str: + return _CALLBACK_HTML.replace("", _logo_img_tag()) + + +_CALLBACK_HTML = """ + + +Strix — signed in + + + + + Strix + +
Strix
+

You're signed in

+
+
+

Strix is connected to your ChatGPT subscription. Head back to your + terminal — your security test runs there.

+
+

Autonomous AI hackers that find and fix your app's + vulnerabilities.

+ +
+

You can close this tab.

+""" + + +__all__ = ["run_auth"] diff --git a/strix/interface/main.py b/strix/interface/main.py index e307d61c..b06d3e89 100644 --- a/strix/interface/main.py +++ b/strix/interface/main.py @@ -85,6 +85,10 @@ def validate_environment() -> None: settings = load_settings() + if settings.llm.auth_mode == "subscription": + _validate_subscription_environment(console) + return + if not settings.llm.model: missing_required_vars.append("STRIX_LLM") @@ -203,6 +207,86 @@ def validate_environment() -> None: ) +def _validate_subscription_environment(console: Console) -> None: + """Gate a subscription-mode run on being signed in. + + In subscription mode there is no API key to check; instead we require a + stored sign-in. The model name is optional here — the runner falls back to a + default model the subscription backend accepts. + """ + from strix.auth import codex + + if codex.is_authenticated(): + _warn_if_incompatible_subscription_model(console) + logger.info("Environment OK (subscription mode, signed in)") + return + + logger.error("Subscription mode but not signed in") + error_text = Text() + error_text.append("NOT SIGNED IN", style="bold red") + error_text.append("\n\n", style="white") + error_text.append( + "Strix is set to use a model subscription, but no sign-in was found.\n", + style="white", + ) + error_text.append("Sign in with:\n\n", style="white") + error_text.append("strix auth login", style="bold cyan") + error_text.append("\n\nOr switch back to API-key billing with:\n", style="white") + error_text.append("export STRIX_AUTH_MODE=api_key", style="bold cyan") + error_text.append(" # and set LLM_API_KEY\n", style="dim white") + + console.print("\n") + console.print( + Panel( + error_text, + title="[bold white]STRIX", + title_align="left", + border_style="red", + padding=(1, 2), + ) + ) + console.print() + sys.exit(1) + + +def _warn_if_incompatible_subscription_model(console: Console) -> None: + """Warn (once, at startup) when the configured model can't run on the plan. + + In subscription mode a model from another provider (e.g. ``anthropic/…``) is + coerced to the default Codex model so the run still works; surface that so the + override isn't silent. A bare/``openai/`` name is left alone — the backend + validates it. + """ + from strix.auth import codex + + configured = (load_settings().llm.model or "").strip() + if not configured or codex.is_backend_compatible(configured): + return + + effective = codex.normalize_model(configured) + warn_text = Text() + warn_text.append("MODEL NOT AVAILABLE ON SUBSCRIPTION", style="bold yellow") + warn_text.append("\n\n", style="white") + warn_text.append("STRIX_LLM is set to ", style="white") + warn_text.append(f"'{configured}'", style="bold cyan") + warn_text.append(", which a ChatGPT subscription can't serve.\n", style="white") + warn_text.append("Using ", style="white") + warn_text.append(f"'{effective}'", style="bold cyan") + warn_text.append(" instead.\n\n", style="white") + warn_text.append("Pick a supported model with: ", style="white") + warn_text.append("strix auth login chatgpt --model gpt-5.4", style="bold cyan") + + console.print( + Panel( + warn_text, + title="[bold white]STRIX", + title_align="left", + border_style="yellow", + padding=(1, 2), + ) + ) + + def check_docker_installed() -> None: if shutil.which("docker") is None: logger.error("Docker CLI not found in PATH") @@ -267,6 +351,35 @@ def _provider_import_hint(exc: BaseException, model: str) -> str | None: return None +def _subscription_error_hint(exc: BaseException) -> str | None: + """Return an actionable hint for a known ChatGPT-subscription error, or None. + + The ChatGPT Codex backend rejects a model the account can't use, and a few + other conditions, with clear 400s. In subscription mode we translate those + into a fix rather than surfacing a raw provider traceback. + """ + if load_settings().llm.auth_mode != "subscription": + return None + joined = " ".join(_exception_messages(exc)).lower() + if "not supported when using codex with a chatgpt account" in joined: + return ( + "The selected model isn't available on your ChatGPT subscription.\n" + "Sign in again with a supported model, for example:\n" + " strix auth login chatgpt --model gpt-5.4" + ) + if "stream must be set to true" in joined: + return ( + "The ChatGPT backend requires streamed requests, but this call wasn't " + "streamed. This is an internal Strix issue on this path — please report it." + ) + if "401" in joined or "unauthorized" in joined or "invalid_grant" in joined: + return ( + "Your ChatGPT sign-in has expired or was revoked. Sign in again:\n" + " strix auth login chatgpt" + ) + return None + + async def warm_up_llm(show_model_warning: bool = True) -> None: console = Console() logger.info("Warming up LLM connection") @@ -276,10 +389,22 @@ async def warm_up_llm(show_model_warning: bool = True) -> None: settings = load_settings() configure_sdk_model_defaults(settings) llm = settings.llm + subscription = llm.auth_mode == "subscription" + + warm_model_settings = ModelSettings() + if subscription: + from strix.auth import codex + + raw_model = codex.normalize_model(llm.model) + warm_model_settings = ModelSettings( + store=False, response_include=["reasoning.encrypted_content"] + ) + else: + raw_model = (llm.model or "").strip() - raw_model = (llm.model or "").strip() if ( - raw_model + not subscription + and raw_model and "/" not in raw_model and not is_known_openai_bare_model(raw_model) and not llm.api_base @@ -309,7 +434,12 @@ async def warm_up_llm(show_model_warning: bool = True) -> None: ) sys.exit(1) - if show_model_warning and raw_model and not is_recommended_or_frontier_model(raw_model): + if ( + show_model_warning + and not subscription + and raw_model + and not is_recommended_or_frontier_model(raw_model) + ): warn_text = Text() warn_text.append("MODEL QUALITY WARNING", style="bold yellow") warn_text.append("\n\n", style="white") @@ -340,7 +470,7 @@ async def warm_up_llm(show_model_warning: bool = True) -> None: model.get_response( system_instructions="You are a helpful assistant.", input="Reply with just 'OK'.", - model_settings=ModelSettings(), + model_settings=warm_model_settings, tools=[], output_schema=None, handoffs=[], @@ -356,20 +486,33 @@ async def warm_up_llm(show_model_warning: bool = True) -> None: except Exception as e: logger.exception("LLM warm-up failed") error_text = Text() - error_text.append("LLM CONNECTION FAILED", style="bold red") - error_text.append("\n\n", style="white") - error_text.append("Could not establish connection to the language model.\n", style="white") - error_text.append("Please check your configuration and try again.\n", style="white") - hint = _provider_import_hint(e, raw_model) - if hint is not None: - error_text.append(f"\n{hint}\n", style="bold yellow") - error_text.append(f"\nError: {e}", style="dim white") + sub_hint = _subscription_error_hint(e) + if sub_hint is not None: + # The model/backend answered with a clear, actionable rejection — + # show that instead of a generic "connection failed". + border_style = "yellow" + error_text.append("MODEL NOT AVAILABLE ON SUBSCRIPTION", style="bold yellow") + error_text.append("\n\n", style="white") + error_text.append(f"{sub_hint}\n", style="white") + error_text.append(f"\nDetails: {e}", style="dim white") + else: + border_style = "red" + error_text.append("LLM CONNECTION FAILED", style="bold red") + error_text.append("\n\n", style="white") + error_text.append( + "Could not establish connection to the language model.\n", style="white" + ) + error_text.append("Please check your configuration and try again.\n", style="white") + hint = _provider_import_hint(e, raw_model) + if hint is not None: + error_text.append(f"\n{hint}\n", style="bold yellow") + error_text.append(f"\nError: {e}", style="dim white") panel = Panel( error_text, title="[bold white]STRIX", title_align="left", - border_style="red", + border_style=border_style, padding=(1, 2), ) @@ -664,6 +807,7 @@ def _persist_run_record(args: argparse.Namespace) -> None: "status": "running", "start_time": datetime.now(UTC).isoformat(), "end_time": None, + "auth_mode": load_settings().llm.auth_mode, "targets_info": args.targets_info, "scan_mode": args.scan_mode, "instruction": args.instruction, @@ -880,6 +1024,13 @@ def main() -> None: run_view(sys.argv[2:]) return + # `strix auth …` manages model-subscription sign-in and exits; it needs no + # target, Docker, or scan setup. + if len(sys.argv) > 1 and sys.argv[1] == "auth": + from strix.interface.auth_cli import run_auth + + sys.exit(run_auth(sys.argv[2:])) + args = parse_arguments() if args.config: @@ -941,6 +1092,7 @@ def main() -> None: _telemetry_start_kwargs = { "model": load_settings().llm.model, + "auth_mode": load_settings().llm.auth_mode, "scan_mode": args.scan_mode, "is_whitebox": is_whitebox_scan(args.targets_info), "interactive": not args.non_interactive, diff --git a/strix/interface/utils.py b/strix/interface/utils.py index 27c10a46..dde0571b 100644 --- a/strix/interface/utils.py +++ b/strix/interface/utils.py @@ -253,6 +253,18 @@ def _llm_usage(report_state: Any) -> dict[str, Any]: return usage if isinstance(usage, dict) else {} +def _is_subscription(report_state: Any) -> bool: + """Whether this run uses a model subscription (no metered cost). + + Prefers the run record so it's correct for hydrated/resumed runs; falls back + to current settings. + """ + record = getattr(report_state, "run_record", None) + if isinstance(record, dict) and record.get("auth_mode"): + return record.get("auth_mode") == "subscription" + return load_settings().llm.auth_mode == "subscription" + + def _int_stat(usage: dict[str, Any], key: str) -> int: try: return max(0, int(usage.get(key) or 0)) @@ -283,11 +295,16 @@ def _build_llm_usage_stats( *, live: bool = False, ) -> None: + subscription = _is_subscription(report_state) usage = _llm_usage(report_state) if not usage or _int_stat(usage, "requests") <= 0: stats_text.append("\n") stats_text.append("Cost ", style="dim") - stats_text.append("$0.0000 ", style="#fbbf24") + if subscription: + stats_text.append("$0.00 ", style="#22c55e") + stats_text.append("(subscription) ", style="dim") + else: + stats_text.append("$0.0000 ", style="#fbbf24") stats_text.append("· ", style="dim white") stats_text.append("Tokens ", style="dim") stats_text.append("0", style="white") @@ -312,7 +329,12 @@ def _build_llm_usage_stats( stats_text.append("Output Tokens ", style="dim") stats_text.append(format_token_count(output_tokens), style="white") - if live or cost > 0: + if subscription: + stats_text.append(" · ", style="dim white") + stats_text.append("Cost ", style="dim") + stats_text.append("$0.00", style="#22c55e") + stats_text.append(" (subscription)", style="dim") + elif live or cost > 0: stats_text.append(" · ", style="dim white") stats_text.append("Cost ", style="dim") stats_text.append(f"${cost:.4f}", style="#fbbf24") @@ -337,6 +359,9 @@ def build_live_stats_text(report_state: Any) -> Text: model = load_settings().llm.model or "unknown" stats_text.append("Model ", style="dim") stats_text.append(str(model), style="white") + if _is_subscription(report_state): + stats_text.append(" · ", style="dim white") + stats_text.append("ChatGPT subscription", style="#22c55e") stats_text.append("\n") vuln_count = len(report_state.vulnerability_reports) @@ -379,6 +404,10 @@ def build_tui_stats_text(report_state: Any) -> Text: model = load_settings().llm.model or "unknown" stats_text.append(str(model), style="white") + subscription = _is_subscription(report_state) + if subscription: + stats_text.append("\n") + stats_text.append("ChatGPT subscription", style="#22c55e") usage = _llm_usage(report_state) if usage and _int_stat(usage, "total_tokens") > 0: @@ -388,7 +417,10 @@ def build_tui_stats_text(report_state: Any) -> Text: style="white", ) cost = _float_stat(usage, "cost") - if cost > 0: + if subscription: + stats_text.append(" · ", style="white") + stats_text.append("$0.00", style="white") + elif cost > 0: stats_text.append(" · ", style="white") stats_text.append(f"${cost:.2f}", style="white") @@ -1147,9 +1179,7 @@ def read_target_list_file(path_str: str) -> list[str]: if (target := line.strip()) and not target.startswith("#") ] except UnicodeDecodeError as e: - raise ValueError( - f"Target list file '{path_str}' must be valid UTF-8 text: {e!s}" - ) from e + raise ValueError(f"Target list file '{path_str}' must be valid UTF-8 text: {e!s}") from e except OSError as e: raise ValueError(f"Failed to read target list file '{path_str}': {e!s}") from e diff --git a/strix/report/state.py b/strix/report/state.py index 217b266d..aab298a6 100644 --- a/strix/report/state.py +++ b/strix/report/state.py @@ -10,6 +10,7 @@ from uuid import uuid4 from agents.usage import Usage +from strix.config.loader import load_settings from strix.core.paths import run_dir_for from strix.report.sarif import write_sarif from strix.report.usage import LLMUsageLedger @@ -117,12 +118,17 @@ class ReportState: self.scan_results: dict[str, Any] | None = None self.scan_config: dict[str, Any] | None = None self._llm_usage = LLMUsageLedger() + # In subscription mode inference is covered by the user's plan, so there + # is no metered cost — track tokens but report $0. + auth_mode = load_settings().llm.auth_mode + self._llm_usage.zero_cost = auth_mode == "subscription" self.run_record: dict[str, Any] = { "run_id": self.run_id, "run_name": self.run_name, "start_time": self.start_time, "end_time": None, "status": "running", + "auth_mode": auth_mode, "targets_info": [], "llm_usage": self._build_llm_usage_record(), } diff --git a/strix/report/usage.py b/strix/report/usage.py index b4f2b786..e3ddf494 100644 --- a/strix/report/usage.py +++ b/strix/report/usage.py @@ -19,6 +19,9 @@ class LLMUsageLedger: self._agent_usage: dict[str, Usage] = {} self._agent_metadata: dict[str, dict[str, str]] = {} self._total_cost = 0.0 + # When True, tokens are still tracked but cost stays $0 — the run is on a + # model subscription, so there is no metered per-token charge to report. + self.zero_cost = False def record( self, @@ -41,7 +44,7 @@ class LLMUsageLedger: if model: metadata["model"] = model - if not _is_litellm_routed(model): + if not self.zero_cost and not _is_litellm_routed(model): estimated = _estimate_litellm_cost(usage, model) if estimated: self._total_cost += estimated @@ -49,6 +52,8 @@ class LLMUsageLedger: return True def record_observed_cost(self, cost: float) -> None: + if self.zero_cost: + return if isinstance(cost, int | float) and cost > 0: self._total_cost += float(cost) diff --git a/strix/telemetry/posthog.py b/strix/telemetry/posthog.py index ef3c8d4f..48eb9936 100644 --- a/strix/telemetry/posthog.py +++ b/strix/telemetry/posthog.py @@ -58,12 +58,14 @@ def start( is_whitebox: bool, interactive: bool, has_instructions: bool, + auth_mode: str | None = None, ) -> None: _send( "scan_started", { **base_props(), "model": model or "unknown", + "auth_mode": auth_mode or "api_key", "scan_mode": scan_mode or "unknown", "scan_type": "whitebox" if is_whitebox else "blackbox", "interactive": interactive, @@ -133,6 +135,7 @@ def end(report_state: "ReportState", exit_reason: str = "completed") -> None: "scan_ended", { **base_props(), + "auth_mode": report_state.run_record.get("auth_mode") or "api_key", "exit_reason": report_state.scan_ended_exit_reason, "duration_seconds": round(duration), "vulnerabilities_total": len(report_state.vulnerability_reports), diff --git a/strix/telemetry/scarf.py b/strix/telemetry/scarf.py index c0c62964..3fd9b1be 100644 --- a/strix/telemetry/scarf.py +++ b/strix/telemetry/scarf.py @@ -59,6 +59,7 @@ def start( is_whitebox: bool, interactive: bool, has_instructions: bool, + auth_mode: str | None = None, ) -> None: _send( "scan_started", @@ -66,6 +67,7 @@ def start( **base_props(), "session": SESSION_ID, "model": model or "unknown", + "auth_mode": auth_mode or "api_key", "scan_mode": scan_mode or "unknown", "scan_type": "whitebox" if is_whitebox else "blackbox", "interactive": interactive, @@ -140,6 +142,7 @@ def end(report_state: ReportState, exit_reason: str = "completed") -> None: { **base_props(), "session": SESSION_ID, + "auth_mode": report_state.run_record.get("auth_mode") or "api_key", "exit_reason": report_state.scan_ended_exit_reason, "duration_seconds": round(duration), "vulnerabilities_total": len(report_state.vulnerability_reports), diff --git a/strix/viewer/frontend/src/components/RunDetails.tsx b/strix/viewer/frontend/src/components/RunDetails.tsx index a387950b..f9926b11 100644 --- a/strix/viewer/frontend/src/components/RunDetails.tsx +++ b/strix/viewer/frontend/src/components/RunDetails.tsx @@ -94,6 +94,7 @@ export function RunDetails({ const reasoning = num(rec(arr(usage.output_tokens_details)[0]).reasoning_tokens); const totalTokens = num(usage.total_tokens); const cost = num(usage.cost); + const subscription = str(raw.auth_mode) === "subscription"; const sub = (n: number, word: string) => ( ({formatNumber(n)} {word}) @@ -169,6 +170,15 @@ export function RunDetails({ {hasUsage ? (
{models.length ? models.join(", ") : "n/a"} + {subscription && ( + + + + ChatGPT subscription + + + + )} {fmtDuration(durationSeconds)} {requests != null && {formatNumber(requests)}} {inputTokens != null && ( @@ -184,7 +194,14 @@ export function RunDetails({ )} {totalTokens != null && {formatNumber(totalTokens)}} - {cost != null && ${cost.toFixed(2)}} + {subscription ? ( + + $0.00 + (subscription) + + ) : ( + cost != null && ${cost.toFixed(2)} + )} {agents.length > 0 && {formatNumber(agents.length)}}
) : ( diff --git a/strix/viewer/static/assets/index-BU_tk5L-.js b/strix/viewer/static/assets/index-Bv6n0dcC.js similarity index 81% rename from strix/viewer/static/assets/index-BU_tk5L-.js rename to strix/viewer/static/assets/index-Bv6n0dcC.js index 85e64afa..0cd8d2f8 100644 --- a/strix/viewer/static/assets/index-BU_tk5L-.js +++ b/strix/viewer/static/assets/index-Bv6n0dcC.js @@ -14,7 +14,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var P0;function f2(){if(P0)return Ve;P0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function w(L,Y,D){this.props=L,this.context=Y,this.refs=S,this.updater=D||_}w.prototype.isReactComponent={},w.prototype.setState=function(L,Y){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,Y,"setState")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function k(){}k.prototype=w.prototype;function E(L,Y,D){this.props=L,this.context=Y,this.refs=S,this.updater=D||_}var M=E.prototype=new k;M.constructor=E,N(M,w.prototype),M.isPureReactComponent=!0;var U=Array.isArray;function R(){}var B={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function Z(L,Y,D){var F=D.ref;return{$$typeof:e,type:L,key:Y,ref:F!==void 0?F:null,props:D}}function j(L,Y){return Z(L.type,Y,L.props)}function z(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function V(L){var Y={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(D){return Y[D]})}var G=/\/+/g;function A(L,Y){return typeof L=="object"&&L!==null&&L.key!=null?V(""+L.key):Y.toString(36)}function q(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(R,R):(L.status="pending",L.then(function(Y){L.status==="pending"&&(L.status="fulfilled",L.value=Y)},function(Y){L.status==="pending"&&(L.status="rejected",L.reason=Y)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function O(L,Y,D,F,$){var Q=typeof L;(Q==="undefined"||Q==="boolean")&&(L=null);var J=!1;if(L===null)J=!0;else switch(Q){case"bigint":case"string":case"number":J=!0;break;case"object":switch(L.$$typeof){case e:case t:J=!0;break;case m:return J=L._init,O(J(L._payload),Y,D,F,$)}}if(J)return $=$(L),J=F===""?"."+A(L,0):F,U($)?(D="",J!=null&&(D=J.replace(G,"$&/")+"/"),O($,Y,D,"",function(oe){return oe})):$!=null&&(z($)&&($=j($,D+($.key==null||L&&L.key===$.key?"":(""+$.key).replace(G,"$&/")+"/")+J)),Y.push($)),1;J=0;var W=F===""?".":F+":";if(U(L))for(var te=0;te>>1,C=O[X];if(0>>1;Xs(D,K))Fs($,D)?(O[X]=$,O[F]=K,X=F):(O[X]=D,O[Y]=K,X=Y);else if(Fs($,K))O[X]=$,O[F]=K,X=F;else break e}}return H}function s(O,H){var K=O.sortIndex-H.sortIndex;return K!==0?K:O.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],m=1,p=null,y=3,x=!1,_=!1,N=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function M(O){for(var H=i(h);H!==null;){if(H.callback===null)a(h);else if(H.startTime<=O)a(h),H.sortIndex=H.expirationTime,t(f,H);else break;H=i(h)}}function U(O){if(N=!1,M(O),!_)if(i(f)!==null)_=!0,R||(R=!0,V());else{var H=i(h);H!==null&&q(U,H.startTime-O)}}var R=!1,B=-1,I=5,Z=-1;function j(){return S?!0:!(e.unstable_now()-ZO&&j());){var X=p.callback;if(typeof X=="function"){p.callback=null,y=p.priorityLevel;var C=X(p.expirationTime<=O);if(O=e.unstable_now(),typeof C=="function"){p.callback=C,M(O),H=!0;break t}p===i(f)&&a(f),M(O)}else a(f);p=i(f)}if(p!==null)H=!0;else{var L=i(h);L!==null&&q(U,L.startTime-O),H=!1}}break e}finally{p=null,y=K,x=!1}H=void 0}}finally{H?V():R=!1}}}var V;if(typeof E=="function")V=function(){E(z)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,A=G.port2;G.port1.onmessage=z,V=function(){A.postMessage(null)}}else V=function(){w(z,0)};function q(O,H){B=w(function(){O(e.unstable_now())},H)}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(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125X?(O.sortIndex=K,t(h,O),i(f)===null&&O===i(h)&&(N?(k(B),B=-1):N=!0,q(U,K-X))):(O.sortIndex=C,t(f,O),_||x||(_=!0,R||(R=!0,V()))),O},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(O){var H=y;return function(){var K=y;y=H;try{return O.apply(this,arguments)}finally{y=K}}}})(dh)),dh}var V0;function p2(){return V0||(V0=1,uh.exports=m2()),uh.exports}var fh={exports:{}},kn={};/** + */var G0;function m2(){return G0||(G0=1,(function(e){function t(M,H){var X=M.length;M.push(H);e:for(;0>>1,A=M[Y];if(0>>1;Ys(D,X))Gs($,D)?(M[Y]=$,M[G]=X,Y=G):(M[Y]=D,M[V]=X,Y=V);else if(Gs($,X))M[Y]=$,M[G]=X,Y=G;else break e}}return H}function s(M,H){var X=M.sortIndex-H.sortIndex;return X!==0?X:M.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],h=[],m=1,p=null,y=3,x=!1,_=!1,N=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function O(M){for(var H=i(h);H!==null;){if(H.callback===null)a(h);else if(H.startTime<=M)a(h),H.sortIndex=H.expirationTime,t(f,H);else break;H=i(h)}}function U(M){if(N=!1,O(M),!_)if(i(f)!==null)_=!0,R||(R=!0,K());else{var H=i(h);H!==null&&q(U,H.startTime-M)}}var R=!1,B=-1,I=5,Z=-1;function j(){return S?!0:!(e.unstable_now()-ZM&&j());){var Y=p.callback;if(typeof Y=="function"){p.callback=null,y=p.priorityLevel;var A=Y(p.expirationTime<=M);if(M=e.unstable_now(),typeof A=="function"){p.callback=A,O(M),H=!0;break t}p===i(f)&&a(f),O(M)}else a(f);p=i(f)}if(p!==null)H=!0;else{var L=i(h);L!==null&&q(U,L.startTime-M),H=!1}}break e}finally{p=null,y=X,x=!1}H=void 0}}finally{H?K():R=!1}}}var K;if(typeof E=="function")K=function(){E(z)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,T=F.port2;F.port1.onmessage=z,K=function(){T.postMessage(null)}}else K=function(){w(z,0)};function q(M,H){B=w(function(){M(e.unstable_now())},H)}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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125Y?(M.sortIndex=X,t(h,M),i(f)===null&&M===i(h)&&(N?(k(B),B=-1):N=!0,q(U,X-Y))):(M.sortIndex=A,t(f,M),_||x||(_=!0,R||(R=!0,K()))),M},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(M){var H=y;return function(){var X=y;y=H;try{return M.apply(this,arguments)}finally{y=X}}}})(dh)),dh}var V0;function p2(){return V0||(V0=1,uh.exports=m2()),uh.exports}var fh={exports:{}},Tn={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Y0;function g2(){if(Y0)return kn;Y0=1;var e=To();function t(f){var h="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fh.exports=g2(),fh.exports}/** + */var Y0;function g2(){if(Y0)return Tn;Y0=1;var e=To();function t(f){var h="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fh.exports=g2(),fh.exports}/** * @license React * react-dom-client.production.js * @@ -38,15 +38,15 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var K0;function b2(){if(K0)return Vl;K0=1;var e=p2(),t=To(),i=x_();function a(n){var r="https://react.dev/errors/"+n;if(1C||(n.current=X[C],X[C]=null,C--)}function D(n,r){C++,X[C]=n.current,n.current=r}var F=L(null),$=L(null),Q=L(null),J=L(null);function W(n,r){switch(D(Q,r),D($,n),D(F,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?u0(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=u0(r),n=d0(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Y(F),D(F,n)}function te(){Y(F),Y($),Y(Q)}function oe(n){n.memoizedState!==null&&D(J,n);var r=F.current,l=d0(r,n.type);r!==l&&(D($,n),D(F,l))}function fe(n){$.current===n&&(Y(F),Y($)),J.current===n&&(Y(J),$l._currentValue=K)}var be,we;function Ne(n){if(be===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);be=r&&r[1]||"",we=-1A||(n.current=Y[A],Y[A]=null,A--)}function D(n,r){A++,Y[A]=n.current,n.current=r}var G=L(null),$=L(null),Q=L(null),J=L(null);function W(n,r){switch(D(Q,r),D($,n),D(G,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?u0(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=u0(r),n=d0(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}V(G),D(G,n)}function te(){V(G),V($),V(Q)}function oe(n){n.memoizedState!==null&&D(J,n);var r=G.current,l=d0(r,n.type);r!==l&&(D($,n),D(G,l))}function fe(n){$.current===n&&(V(G),V($)),J.current===n&&(V(J),$l._currentValue=X)}var be,we;function Ne(n){if(be===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);be=r&&r[1]||"",we=-1)":-1b||ne[u]!==le[b]){var he=` `+ne[u].replace(" at new "," at ");return n.displayName&&he.includes("")&&(he=he.replace("",n.displayName)),he}while(1<=u&&0<=b);break}}}finally{je=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?Ne(l):""}function st(n,r){switch(n.tag){case 26:case 27:case 5:return Ne(n.type);case 16:return Ne("Lazy");case 13:return n.child!==r&&r!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return $e(n.type,!1);case 11:return $e(n.type.render,!1);case 1:return $e(n.type,!0);case 31:return Ne("Activity");default:return""}}function Rt(n){try{var r="",l=null;do r+=st(n,l),l=n,n=n.return;while(n);return r}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var Yt=Object.prototype.hasOwnProperty,Pt=e.unstable_scheduleCallback,Xt=e.unstable_cancelCallback,Yn=e.unstable_shouldYield,wn=e.unstable_requestPaint,ct=e.unstable_now,It=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Fe=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,on=e.log,En=e.unstable_setDisableYieldValue,Kt=null,Ct=null;function Wt(n){if(typeof on=="function"&&En(n),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Kt,n)}catch{}}var ut=Math.clz32?Math.clz32:wr,zn=Math.log,cn=Math.LN2;function wr(n){return n>>>=0,n===0?32:31-(zn(n)/cn|0)|0}var nt=256,Xn=262144,Cn=4194304;function hn(n){var r=n&42;if(r!==0)return r;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function ie(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var b=0,v=n.suspendedLanes,T=n.pingedLanes;n=n.warmLanes;var P=u&134217727;return P!==0?(u=P&~v,u!==0?b=hn(u):(T&=P,T!==0?b=hn(T):l||(l=P&~n,l!==0&&(b=hn(l))))):(P=u&~v,P!==0?b=hn(P):T!==0?b=hn(T):l||(l=u&~n,l!==0&&(b=hn(l)))),b===0?0:r!==0&&r!==b&&(r&v)===0&&(v=b&-b,l=r&-r,v>=l||v===32&&(l&4194048)!==0)?r:b}function me(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Ee(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Pe(){var n=Cn;return Cn<<=1,(Cn&62914560)===0&&(Cn=4194304),n}function St(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function gt(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Me(n,r,l,u,b,v){var T=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var P=n.entanglements,ne=n.expirationTimes,le=n.hiddenUpdates;for(l=T&~l;0"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var es=/[\n"\\]/g;function Sn(n){return n.replace(es,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function ma(n,r,l,u,b,v,T,P){n.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.type=T:n.removeAttribute("type"),r!=null?T==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+_t(r)):n.value!==""+_t(r)&&(n.value=""+_t(r)):T!=="submit"&&T!=="reset"||n.removeAttribute("value"),r!=null?Cr(n,T,_t(r)):l!=null?Cr(n,T,_t(l)):u!=null&&n.removeAttribute("value"),b==null&&v!=null&&(n.defaultChecked=!!v),b!=null&&(n.checked=b&&typeof b!="function"&&typeof b!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?n.name=""+_t(P):n.removeAttribute("name")}function wi(n,r,l,u,b,v,T,P){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.type=v),r!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||r!=null)){Tr(n);return}l=l!=null?""+_t(l):"",r=r!=null?""+_t(r):l,P||r===n.value||(n.value=r),n.defaultValue=r}u=u??b,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=P?n.checked:!!u,n.defaultChecked=!!u,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(n.name=T),Tr(n)}function Cr(n,r,l){r==="number"&&Ar(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function un(n,r,l,u){if(n=n.options,r){r={};for(var b=0;b"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sd=!1;if(er)try{var al={};Object.defineProperty(al,"passive",{get:function(){sd=!0}}),window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{sd=!1}var Rr=null,ld=null,qo=null;function dg(){if(qo)return qo;var n,r=ld,l=r.length,u,b="value"in Rr?Rr.value:Rr.textContent,v=b.length;for(n=0;n=ol),bg=" ",xg=!1;function yg(n,r){switch(n){case"keyup":return RS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ns=!1;function jS(n,r){switch(n){case"compositionend":return vg(r);case"keypress":return r.which!==32?null:(xg=!0,bg);case"textInput":return n=r.data,n===bg&&xg?null:n;default:return null}}function LS(n,r){if(ns)return n==="compositionend"||!fd&&yg(n,r)?(n=dg(),qo=ld=Rr=null,ns=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:l,offset:r-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ag(l)}}function Mg(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Mg(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Og(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Ar(n.document);r instanceof n.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)n=r.contentWindow;else break;r=Ar(n.document)}return r}function pd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var PS=er&&"documentMode"in document&&11>=document.documentMode,is=null,gd=null,fl=null,bd=!1;function Rg(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;bd||is==null||is!==Ar(u)||(u=is,"selectionStart"in u&&pd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),fl&&dl(fl,u)||(fl=u,u=Lc(gd,"onSelect"),0>=T,b-=T,Bi=1<<32-ut(r)+b|l<Ke?(at=De,De=null):at=De.sibling;var mt=ce(ae,De,se[Ke],pe);if(mt===null){De===null&&(De=at);break}n&&De&&mt.alternate===null&&r(ae,De),re=v(mt,re,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt,De=at}if(Ke===se.length)return l(ae,De),lt&&nr(ae,Ke),Ie;if(De===null){for(;KeKe?(at=De,De=null):at=De.sibling;var ea=ce(ae,De,mt.value,pe);if(ea===null){De===null&&(De=at);break}n&&De&&ea.alternate===null&&r(ae,De),re=v(ea,re,Ke),ht===null?Ie=ea:ht.sibling=ea,ht=ea,De=at}if(mt.done)return l(ae,De),lt&&nr(ae,Ke),Ie;if(De===null){for(;!mt.done;Ke++,mt=se.next())mt=ge(ae,mt.value,pe),mt!==null&&(re=v(mt,re,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return lt&&nr(ae,Ke),Ie}for(De=u(De);!mt.done;Ke++,mt=se.next())mt=de(De,ae,Ke,mt.value,pe),mt!==null&&(n&&mt.alternate!==null&&De.delete(mt.key===null?Ke:mt.key),re=v(mt,re,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return n&&De.forEach(function(c2){return r(ae,c2)}),lt&&nr(ae,Ke),Ie}function Nt(ae,re,se,pe){if(typeof se=="object"&&se!==null&&se.type===N&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case x:e:{for(var Ie=se.key;re!==null;){if(re.key===Ie){if(Ie=se.type,Ie===N){if(re.tag===7){l(ae,re.sibling),pe=b(re,se.props.children),pe.return=ae,ae=pe;break e}}else if(re.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===I&&Sa(Ie)===re.type){l(ae,re.sibling),pe=b(re,se.props),xl(pe,se),pe.return=ae,ae=pe;break e}l(ae,re);break}else r(ae,re);re=re.sibling}se.type===N?(pe=va(se.props.children,ae.mode,pe,se.key),pe.return=ae,ae=pe):(pe=Wo(se.type,se.key,se.props,null,ae.mode,pe),xl(pe,se),pe.return=ae,ae=pe)}return T(ae);case _:e:{for(Ie=se.key;re!==null;){if(re.key===Ie)if(re.tag===4&&re.stateNode.containerInfo===se.containerInfo&&re.stateNode.implementation===se.implementation){l(ae,re.sibling),pe=b(re,se.children||[]),pe.return=ae,ae=pe;break e}else{l(ae,re);break}else r(ae,re);re=re.sibling}pe=Nd(se,ae.mode,pe),pe.return=ae,ae=pe}return T(ae);case I:return se=Sa(se),Nt(ae,re,se,pe)}if(q(se))return Ce(ae,re,se,pe);if(V(se)){if(Ie=V(se),typeof Ie!="function")throw Error(a(150));return se=Ie.call(se),He(ae,re,se,pe)}if(typeof se.then=="function")return Nt(ae,re,ac(se),pe);if(se.$$typeof===E)return Nt(ae,re,tc(ae,se),pe);sc(ae,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,re!==null&&re.tag===6?(l(ae,re.sibling),pe=b(re,se),pe.return=ae,ae=pe):(l(ae,re),pe=Ed(se,ae.mode,pe),pe.return=ae,ae=pe),T(ae)):l(ae,re)}return function(ae,re,se,pe){try{bl=0;var Ie=Nt(ae,re,se,pe);return ms=null,Ie}catch(De){if(De===hs||De===ic)throw De;var ht=Zn(29,De,null,ae.mode);return ht.lanes=pe,ht.return=ae,ht}finally{}}}var Ta=tb(!0),nb=tb(!1),Ir=!1;function zd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Id(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Br(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ur(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(pt&2)!==0){var b=u.pending;return b===null?r.next=r:(r.next=b.next,b.next=r),u.pending=r,r=Qo(n),Ug(n,null,l),r}return Zo(n,u,r,l),Qo(n)}function yl(n,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,Ue(n,l)}}function Bd(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var b=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var T={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?b=v=T:v=v.next=T,l=l.next}while(l!==null);v===null?b=v=r:v=v.next=r}else b=v=r;l={baseState:u.baseState,firstBaseUpdate:b,lastBaseUpdate:v,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=r:n.next=r,l.lastBaseUpdate=r}var Ud=!1;function vl(){if(Ud){var n=fs;if(n!==null)throw n}}function _l(n,r,l,u){Ud=!1;var b=n.updateQueue;Ir=!1;var v=b.firstBaseUpdate,T=b.lastBaseUpdate,P=b.shared.pending;if(P!==null){b.shared.pending=null;var ne=P,le=ne.next;ne.next=null,T===null?v=le:T.next=le,T=ne;var he=n.alternate;he!==null&&(he=he.updateQueue,P=he.lastBaseUpdate,P!==T&&(P===null?he.firstBaseUpdate=le:P.next=le,he.lastBaseUpdate=ne))}if(v!==null){var ge=b.baseState;T=0,he=le=ne=null,P=v;do{var ce=P.lane&-536870913,de=ce!==P.lane;if(de?(rt&ce)===ce:(u&ce)===ce){ce!==0&&ce===ds&&(Ud=!0),he!==null&&(he=he.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ce=n,He=P;ce=r;var Nt=l;switch(He.tag){case 1:if(Ce=He.payload,typeof Ce=="function"){ge=Ce.call(Nt,ge,ce);break e}ge=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=He.payload,ce=typeof Ce=="function"?Ce.call(Nt,ge,ce):Ce,ce==null)break e;ge=p({},ge,ce);break e;case 2:Ir=!0}}ce=P.callback,ce!==null&&(n.flags|=64,de&&(n.flags|=8192),de=b.callbacks,de===null?b.callbacks=[ce]:de.push(ce))}else de={lane:ce,tag:P.tag,payload:P.payload,callback:P.callback,next:null},he===null?(le=he=de,ne=ge):he=he.next=de,T|=ce;if(P=P.next,P===null){if(P=b.shared.pending,P===null)break;de=P,P=de.next,de.next=null,b.lastBaseUpdate=de,b.shared.pending=null}}while(!0);he===null&&(ne=ge),b.baseState=ne,b.firstBaseUpdate=le,b.lastBaseUpdate=he,v===null&&(b.shared.lanes=0),Fr|=T,n.lanes=T,n.memoizedState=ge}}function ib(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function rb(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;nv?v:8;var T=O.T,P={};O.T=P,af(n,!1,r,l);try{var ne=b(),le=O.S;if(le!==null&&le(P,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var he=WS(ne,u);Nl(n,r,he,ti(n))}else Nl(n,r,u,ti(n))}catch(ge){Nl(n,r,{then:function(){},status:"rejected",reason:ge},ti())}finally{H.p=v,T!==null&&P.types!==null&&(T.types=P.types),O.T=T}}function rk(){}function nf(n,r,l,u){if(n.tag!==5)throw Error(a(476));var b=zb(n).queue;Lb(n,b,r,K,l===null?rk:function(){return Ib(n),l(u)})}function zb(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:K},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Ib(n){var r=zb(n);r.next===null&&(r=n.alternate.memoizedState),Nl(n,r.next.queue,{},ti())}function rf(){return yn($l)}function Bb(){return Qt().memoizedState}function Ub(){return Qt().memoizedState}function ak(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=ti();n=Br(l);var u=Ur(r,n,l);u!==null&&(qn(u,r,l),yl(u,r,l)),r={cache:Rd()},n.payload=r;return}r=r.return}}function sk(n,r,l){var u=ti();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},gc(n)?$b(r,l):(l=_d(n,r,l,u),l!==null&&(qn(l,n,u),qb(l,r,u)))}function Hb(n,r,l){var u=ti();Nl(n,r,l,u)}function Nl(n,r,l,u){var b={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(gc(n))$b(r,b);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=r.lastRenderedReducer,v!==null))try{var T=r.lastRenderedState,P=v(T,l);if(b.hasEagerState=!0,b.eagerState=P,Kn(P,T))return Zo(n,r,b,0),kt===null&&Ko(),!1}catch{}finally{}if(l=_d(n,r,b,u),l!==null)return qn(l,n,u),qb(l,r,u),!0}return!1}function af(n,r,l,u){if(u={lane:2,revertLane:If(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},gc(n)){if(r)throw Error(a(479))}else r=_d(n,l,u,2),r!==null&&qn(r,n,2)}function gc(n){var r=n.alternate;return n===Xe||r!==null&&r===Xe}function $b(n,r){gs=cc=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function qb(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,Ue(n,l)}}var Sl={readContext:yn,use:fc,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};Sl.useEffectEvent=Gt;var Pb={readContext:yn,use:fc,useCallback:function(n,r){return Rn().memoizedState=[n,r===void 0?null:r],n},useContext:yn,useEffect:kb,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,mc(4194308,4,Mb.bind(null,r,n),l)},useLayoutEffect:function(n,r){return mc(4194308,4,n,r)},useInsertionEffect:function(n,r){mc(4,2,n,r)},useMemo:function(n,r){var l=Rn();r=r===void 0?null:r;var u=n();if(Aa){Wt(!0);try{n()}finally{Wt(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Rn();if(l!==void 0){var b=l(r);if(Aa){Wt(!0);try{l(r)}finally{Wt(!1)}}}else b=r;return u.memoizedState=u.baseState=b,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:b},u.queue=n,n=n.dispatch=sk.bind(null,Xe,n),[u.memoizedState,n]},useRef:function(n){var r=Rn();return n={current:n},r.memoizedState=n},useState:function(n){n=Qd(n);var r=n.queue,l=Hb.bind(null,Xe,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:ef,useDeferredValue:function(n,r){var l=Rn();return tf(l,n,r)},useTransition:function(){var n=Qd(!1);return n=Lb.bind(null,Xe,n.queue,!0,!1),Rn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=Xe,b=Rn();if(lt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),kt===null)throw Error(a(349));(rt&127)!==0||ub(u,r,l)}b.memoizedState=l;var v={value:l,getSnapshot:r};return b.queue=v,kb(fb.bind(null,u,v,n),[n]),u.flags|=2048,xs(9,{destroy:void 0},db.bind(null,u,v,l,r),null),l},useId:function(){var n=Rn(),r=kt.identifierPrefix;if(lt){var l=Ui,u=Bi;l=(u&~(1<<32-ut(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=uc++,0<\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof u.is=="string"?T.createElement("select",{is:u.is}):T.createElement("select"),u.multiple?v.multiple=!0:u.size&&(v.size=u.size);break;default:v=typeof u.is=="string"?T.createElement(b,{is:u.is}):T.createElement(b)}}v[Ut]=r,v[mn]=u;e:for(T=r.child;T!==null;){if(T.tag===5||T.tag===6)v.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===r)break e;for(;T.sibling===null;){if(T.return===null||T.return===r)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}r.stateNode=v;e:switch(_n(v,b,u),b){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&or(r)}}return jt(r),yf(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&or(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=Q.current,cs(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,b=xn,b!==null)switch(b.tag){case 27:case 5:u=b.memoizedProps}n[Ut]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||o0(n.nodeValue,l)),n||Lr(r,!0)}else n=zc(n).createTextNode(u),n[Ut]=r,r.stateNode=n}return jt(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=cs(r),l!==null){if(n===null){if(!u)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Ut]=r}else _a(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;jt(r),n=!1}else l=Ad(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(Wn(r),r):(Wn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return jt(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(b=cs(r),u!==null&&u.dehydrated!==null){if(n===null){if(!b)throw Error(a(318));if(b=r.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(a(317));b[Ut]=r}else _a(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;jt(r),b=!1}else b=Ad(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=b),b=!0;if(!b)return r.flags&256?(Wn(r),r):(Wn(r),null)}return Wn(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,b=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(b=u.alternate.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==b&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),_c(r,r.updateQueue),jt(r),null);case 4:return te(),n===null&&$f(r.stateNode.containerInfo),jt(r),null;case 10:return rr(r.type),jt(r),null;case 19:if(Y(Zt),u=r.memoizedState,u===null)return jt(r),null;if(b=(r.flags&128)!==0,v=u.rendering,v===null)if(b)Tl(u,!1);else{if(Vt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(v=oc(n),v!==null){for(r.flags|=128,Tl(u,!1),n=v.updateQueue,r.updateQueue=n,_c(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)Hg(l,n),l=l.sibling;return D(Zt,Zt.current&1|2),lt&&nr(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&ct()>kc&&(r.flags|=128,b=!0,Tl(u,!1),r.lanes=4194304)}else{if(!b)if(n=oc(v),n!==null){if(r.flags|=128,b=!0,n=n.updateQueue,r.updateQueue=n,_c(r,n),Tl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!v.alternate&&!lt)return jt(r),null}else 2*ct()-u.renderingStartTime>kc&&l!==536870912&&(r.flags|=128,b=!0,Tl(u,!1),r.lanes=4194304);u.isBackwards?(v.sibling=r.child,r.child=v):(n=u.last,n!==null?n.sibling=v:r.child=v,u.last=v)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=ct(),n.sibling=null,l=Zt.current,D(Zt,b?l&1|2:l&1),lt&&nr(r,u.treeForkCount),n):(jt(r),null);case 22:case 23:return Wn(r),$d(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(jt(r),r.subtreeFlags&6&&(r.flags|=8192)):jt(r),l=r.updateQueue,l!==null&&_c(r,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),n!==null&&Y(Na),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),rr(en),jt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function dk(n,r){switch(kd(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return rr(en),te(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return fe(r),null;case 31:if(r.memoizedState!==null){if(Wn(r),r.alternate===null)throw Error(a(340));_a()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Wn(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));_a()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return Y(Zt),null;case 4:return te(),null;case 10:return rr(r.type),null;case 22:case 23:return Wn(r),$d(),n!==null&&Y(Na),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return rr(en),null;case 25:return null;default:return null}}function hx(n,r){switch(kd(r),r.tag){case 3:rr(en),te();break;case 26:case 27:case 5:fe(r);break;case 4:te();break;case 31:r.memoizedState!==null&&Wn(r);break;case 13:Wn(r);break;case 19:Y(Zt);break;case 10:rr(r.type);break;case 22:case 23:Wn(r),$d(),n!==null&&Y(Na);break;case 24:rr(en)}}function Al(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var b=u.next;l=b;do{if((l.tag&n)===n){u=void 0;var v=l.create,T=l.inst;u=v(),T.destroy=u}l=l.next}while(l!==b)}}catch(P){yt(r,r.return,P)}}function qr(n,r,l){try{var u=r.updateQueue,b=u!==null?u.lastEffect:null;if(b!==null){var v=b.next;u=v;do{if((u.tag&n)===n){var T=u.inst,P=T.destroy;if(P!==void 0){T.destroy=void 0,b=r;var ne=l,le=P;try{le()}catch(he){yt(b,ne,he)}}}u=u.next}while(u!==v)}}catch(he){yt(r,r.return,he)}}function mx(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{rb(r,l)}catch(u){yt(n,n.return,u)}}}function px(n,r,l){l.props=Ca(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){yt(n,r,u)}}function Cl(n,r){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(b){yt(n,r,b)}}function Hi(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(b){yt(n,r,b)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(b){yt(n,r,b)}else l.current=null}function gx(n){var r=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(b){yt(n,n.return,b)}}function vf(n,r,l){try{var u=n.stateNode;Dk(u,n.type,l,r),u[mn]=r}catch(b){yt(n,n.return,b)}}function bx(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Kr(n.type)||n.tag===4}function _f(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||bx(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Kr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function wf(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(n),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=_e));else if(u!==4&&(u===27&&Kr(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(wf(n,r,l),n=n.sibling;n!==null;)wf(n,r,l),n=n.sibling}function wc(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?l.insertBefore(n,r):l.appendChild(n);else if(u!==4&&(u===27&&Kr(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(wc(n,r,l),n=n.sibling;n!==null;)wc(n,r,l),n=n.sibling}function xx(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,b=r.attributes;b.length;)r.removeAttributeNode(b[0]);_n(r,u,l),r[Ut]=n,r[mn]=l}catch(v){yt(n,n.return,v)}}var cr=!1,rn=!1,Ef=!1,yx=typeof WeakSet=="function"?WeakSet:Set,gn=null;function fk(n,r){if(n=n.containerInfo,Ff=Pc,n=Og(n),pd(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var b=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var T=0,P=-1,ne=-1,le=0,he=0,ge=n,ce=null;t:for(;;){for(var de;ge!==l||b!==0&&ge.nodeType!==3||(P=T+b),ge!==v||u!==0&&ge.nodeType!==3||(ne=T+u),ge.nodeType===3&&(T+=ge.nodeValue.length),(de=ge.firstChild)!==null;)ce=ge,ge=de;for(;;){if(ge===n)break t;if(ce===l&&++le===b&&(P=T),ce===v&&++he===u&&(ne=T),(de=ge.nextSibling)!==null)break;ge=ce,ce=ge.parentNode}ge=de}l=P===-1||ne===-1?null:{start:P,end:ne}}else l=null}l=l||{start:0,end:0}}else l=null;for(Gf={focusedElem:n,selectionRange:l},Pc=!1,gn=r;gn!==null;)if(r=gn,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,gn=n;else for(;gn!==null;){switch(r=gn,v=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l title"))),_n(v,u,l),v[Ut]=n,Ft(v),u=v;break e;case"link":var T=S0("link","href",b).get(u+(l.href||""));if(T){for(var P=0;PNt&&(T=Nt,Nt=He,He=T);var ae=Cg(P,He),re=Cg(P,Nt);if(ae&&re&&(de.rangeCount!==1||de.anchorNode!==ae.node||de.anchorOffset!==ae.offset||de.focusNode!==re.node||de.focusOffset!==re.offset)){var se=ge.createRange();se.setStart(ae.node,ae.offset),de.removeAllRanges(),He>Nt?(de.addRange(se),de.extend(re.node,re.offset)):(se.setEnd(re.node,re.offset),de.addRange(se))}}}}for(ge=[],de=P;de=de.parentNode;)de.nodeType===1&&ge.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;Pl?32:l,O.T=null,l=Mf,Mf=null;var v=Vr,T=mr;if(dn=0,Es=Vr=null,mr=0,(pt&6)!==0)throw Error(a(331));var P=pt;if(pt|=4,Mx(v.current),Tx(v,v.current,T,l),pt=P,Ll(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Kt,v)}catch{}return!0}finally{H.p=b,O.T=u,Xx(n,r)}}function Zx(n,r,l){r=ci(l,r),r=cf(n.stateNode,r,2),n=Ur(n,r,2),n!==null&&(gt(n,2),$i(n))}function yt(n,r,l){if(n.tag===3)Zx(n,n,l);else for(;r!==null;){if(r.tag===3){Zx(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Gr===null||!Gr.has(u))){n=ci(l,n),l=Qb(2),u=Ur(r,l,2),u!==null&&(Wb(l,u,r,n),gt(u,2),$i(u));break}}r=r.return}}function jf(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new pk;var b=new Set;u.set(r,b)}else b=u.get(r),b===void 0&&(b=new Set,u.set(r,b));b.has(l)||(kf=!0,b.add(l),n=vk.bind(null,n,r,l),r.then(n,n))}function vk(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,kt===n&&(rt&l)===l&&(Vt===4||Vt===3&&(rt&62914560)===rt&&300>ct()-Sc?(pt&2)===0&&Ns(n,0):Tf|=l,ws===rt&&(ws=0)),$i(n)}function Qx(n,r){r===0&&(r=Pe()),n=ya(n,r),n!==null&&(gt(n,r),$i(n))}function _k(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),Qx(n,l)}function wk(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,b=n.memoizedState;b!==null&&(l=b.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),Qx(n,l)}function Ek(n,r){return Pt(n,r)}var Rc=null,ks=null,Lf=!1,Dc=!1,zf=!1,Xr=0;function $i(n){n!==ks&&n.next===null&&(ks===null?Rc=ks=n:ks=ks.next=n),Dc=!0,Lf||(Lf=!0,Sk())}function Ll(n,r){if(!zf&&Dc){zf=!0;do for(var l=!1,u=Rc;u!==null;){if(n!==0){var b=u.pendingLanes;if(b===0)var v=0;else{var T=u.suspendedLanes,P=u.pingedLanes;v=(1<<31-ut(42|n)+1)-1,v&=b&~(T&~P),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,t0(u,v))}else v=rt,v=ie(u,u===kt?v:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(v&3)===0||me(u,v)||(l=!0,t0(u,v));u=u.next}while(l);zf=!1}}function Nk(){Wx()}function Wx(){Dc=Lf=!1;var n=0;Xr!==0&&Lk()&&(n=Xr);for(var r=ct(),l=null,u=Rc;u!==null;){var b=u.next,v=Jx(u,r);v===0?(u.next=null,l===null?Rc=b:l.next=b,b===null&&(ks=l)):(l=u,(n!==0||(v&3)!==0)&&(Dc=!0)),u=b}dn!==0&&dn!==5||Ll(n),Xr!==0&&(Xr=0)}function Jx(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,b=n.expirationTimes,v=n.pendingLanes&-62914561;0P)break;var he=ne.transferSize,ge=ne.initiatorType;he&&c0(ge)&&(ne=ne.responseEnd,T+=he*(ne"u"?null:document;function _0(n,r,l){var u=Ts;if(u&&typeof r=="string"&&r){var b=Sn(r);b='link[rel="'+n+'"][href="'+b+'"]',typeof l=="string"&&(b+='[crossorigin="'+l+'"]'),v0.has(b)||(v0.add(b),n={rel:n,crossOrigin:l,href:r},u.querySelector(b)===null&&(r=u.createElement("link"),_n(r,"link",n),Ft(r),u.head.appendChild(r)))}}function Fk(n){pr.D(n),_0("dns-prefetch",n,null)}function Gk(n,r){pr.C(n,r),_0("preconnect",n,r)}function Vk(n,r,l){pr.L(n,r,l);var u=Ts;if(u&&n&&r){var b='link[rel="preload"][as="'+Sn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(b+='[imagesrcset="'+Sn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(b+='[imagesizes="'+Sn(l.imageSizes)+'"]')):b+='[href="'+Sn(n)+'"]';var v=b;switch(r){case"style":v=As(n);break;case"script":v=Cs(n)}pi.has(v)||(n=p({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),pi.set(v,n),u.querySelector(b)!==null||r==="style"&&u.querySelector(Ul(v))||r==="script"&&u.querySelector(Hl(v))||(r=u.createElement("link"),_n(r,"link",n),Ft(r),u.head.appendChild(r)))}}function Yk(n,r){pr.m(n,r);var l=Ts;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",b='link[rel="modulepreload"][as="'+Sn(u)+'"][href="'+Sn(n)+'"]',v=b;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Cs(n)}if(!pi.has(v)&&(n=p({rel:"modulepreload",href:n},r),pi.set(v,n),l.querySelector(b)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Hl(v)))return}u=l.createElement("link"),_n(u,"link",n),Ft(u),l.head.appendChild(u)}}}function Xk(n,r,l){pr.S(n,r,l);var u=Ts;if(u&&n){var b=zi(u).hoistableStyles,v=As(n);r=r||"default";var T=b.get(v);if(!T){var P={loading:0,preload:null};if(T=u.querySelector(Ul(v)))P.loading=5;else{n=p({rel:"stylesheet",href:n,"data-precedence":r},l),(l=pi.get(v))&&Wf(n,l);var ne=T=u.createElement("link");Ft(ne),_n(ne,"link",n),ne._p=new Promise(function(le,he){ne.onload=le,ne.onerror=he}),ne.addEventListener("load",function(){P.loading|=1}),ne.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Bc(T,r,u)}T={type:"stylesheet",instance:T,count:1,state:P},b.set(v,T)}}}function Kk(n,r){pr.X(n,r);var l=Ts;if(l&&n){var u=zi(l).hoistableScripts,b=Cs(n),v=u.get(b);v||(v=l.querySelector(Hl(b)),v||(n=p({src:n,async:!0},r),(r=pi.get(b))&&Jf(n,r),v=l.createElement("script"),Ft(v),_n(v,"link",n),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(b,v))}}function Zk(n,r){pr.M(n,r);var l=Ts;if(l&&n){var u=zi(l).hoistableScripts,b=Cs(n),v=u.get(b);v||(v=l.querySelector(Hl(b)),v||(n=p({src:n,async:!0,type:"module"},r),(r=pi.get(b))&&Jf(n,r),v=l.createElement("script"),Ft(v),_n(v,"link",n),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(b,v))}}function w0(n,r,l,u){var b=(b=Q.current)?Ic(b):null;if(!b)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=As(l.href),l=zi(b).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=As(l.href);var v=zi(b).hoistableStyles,T=v.get(n);if(T||(b=b.ownerDocument||b,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(n,T),(v=b.querySelector(Ul(n)))&&!v._p&&(T.instance=v,T.state.loading=5),pi.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},pi.set(n,l),v||Qk(b,n,l,T.state))),r&&u===null)throw Error(a(528,""));return T}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Cs(l),l=zi(b).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function As(n){return'href="'+Sn(n)+'"'}function Ul(n){return'link[rel="stylesheet"]['+n+"]"}function E0(n){return p({},n,{"data-precedence":n.precedence,precedence:null})}function Qk(n,r,l,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),_n(r,"link",l),Ft(r),n.head.appendChild(r))}function Cs(n){return'[src="'+Sn(n)+'"]'}function Hl(n){return"script[async]"+n}function N0(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+Sn(l.href)+'"]');if(u)return r.instance=u,Ft(u),u;var b=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ft(u),_n(u,"style",b),Bc(u,l.precedence,n),r.instance=u;case"stylesheet":b=As(l.href);var v=n.querySelector(Ul(b));if(v)return r.state.loading|=4,r.instance=v,Ft(v),v;u=E0(l),(b=pi.get(b))&&Wf(u,b),v=(n.ownerDocument||n).createElement("link"),Ft(v);var T=v;return T._p=new Promise(function(P,ne){T.onload=P,T.onerror=ne}),_n(v,"link",u),r.state.loading|=4,Bc(v,l.precedence,n),r.instance=v;case"script":return v=Cs(l.src),(b=n.querySelector(Hl(v)))?(r.instance=b,Ft(b),b):(u=l,(b=pi.get(v))&&(u=p({},l),Jf(u,b)),n=n.ownerDocument||n,b=n.createElement("script"),Ft(b),_n(b,"link",u),n.head.appendChild(b),r.instance=b);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Bc(u,l.precedence,n));return r.instance}function Bc(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=u.length?u[u.length-1]:null,v=b,T=0;T title"):null)}function Wk(n,r,l){if(l===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return n=r.disabled,typeof r.precedence=="string"&&n==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function T0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Jk(n,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var b=As(u.href),v=r.querySelector(Ul(b));if(v){r=v._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Hc.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=v,Ft(v);return}v=r.ownerDocument||r,u=E0(u),(b=pi.get(b))&&Wf(u,b),v=v.createElement("link"),Ft(v);var T=v;T._p=new Promise(function(P,ne){T.onload=P,T.onerror=ne}),_n(v,"link",u),l.instance=v}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Hc.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var eh=0;function e2(n,r){return n.stylesheets&&n.count===0&&qc(n,n.stylesheets),0eh?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(b)}}:null}function Hc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var $c=null;function qc(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,$c=new Map,r.forEach(t2,n),$c=null,Hc.call(n))}function t2(n,r){if(!(r.state.loading&4)){var l=$c.get(n);if(l)var u=l.get(null);else{l=new Map,$c.set(n,l);for(var b=n.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ch.exports=b2(),ch.exports}var y2=x2();/** +`+u.stack}}var Yt=Object.prototype.hasOwnProperty,Pt=e.unstable_scheduleCallback,Xt=e.unstable_cancelCallback,Yn=e.unstable_shouldYield,En=e.unstable_requestPaint,ct=e.unstable_now,It=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,Fe=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,on=e.log,Nn=e.unstable_setDisableYieldValue,Kt=null,At=null;function Wt(n){if(typeof on=="function"&&Nn(n),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(Kt,n)}catch{}}var ut=Math.clz32?Math.clz32:wr,zn=Math.log,cn=Math.LN2;function wr(n){return n>>>=0,n===0?32:31-(zn(n)/cn|0)|0}var nt=256,Xn=262144,Mn=4194304;function hn(n){var r=n&42;if(r!==0)return r;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function ie(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var b=0,v=n.suspendedLanes,C=n.pingedLanes;n=n.warmLanes;var P=u&134217727;return P!==0?(u=P&~v,u!==0?b=hn(u):(C&=P,C!==0?b=hn(C):l||(l=P&~n,l!==0&&(b=hn(l))))):(P=u&~v,P!==0?b=hn(P):C!==0?b=hn(C):l||(l=u&~n,l!==0&&(b=hn(l)))),b===0?0:r!==0&&r!==b&&(r&v)===0&&(v=b&-b,l=r&-r,v>=l||v===32&&(l&4194048)!==0)?r:b}function me(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Ee(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Pe(){var n=Mn;return Mn<<=1,(Mn&62914560)===0&&(Mn=4194304),n}function St(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function gt(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Me(n,r,l,u,b,v){var C=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var P=n.entanglements,ne=n.expirationTimes,le=n.hiddenUpdates;for(l=C&~l;0"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var es=/[\n"\\]/g;function kn(n){return n.replace(es,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function ma(n,r,l,u,b,v,C,P){n.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?n.type=C:n.removeAttribute("type"),r!=null?C==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+_t(r)):n.value!==""+_t(r)&&(n.value=""+_t(r)):C!=="submit"&&C!=="reset"||n.removeAttribute("value"),r!=null?Ar(n,C,_t(r)):l!=null?Ar(n,C,_t(l)):u!=null&&n.removeAttribute("value"),b==null&&v!=null&&(n.defaultChecked=!!v),b!=null&&(n.checked=b&&typeof b!="function"&&typeof b!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?n.name=""+_t(P):n.removeAttribute("name")}function wi(n,r,l,u,b,v,C,P){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.type=v),r!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||r!=null)){Tr(n);return}l=l!=null?""+_t(l):"",r=r!=null?""+_t(r):l,P||r===n.value||(n.value=r),n.defaultValue=r}u=u??b,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=P?n.checked:!!u,n.defaultChecked=!!u,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(n.name=C),Tr(n)}function Ar(n,r,l){r==="number"&&Cr(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function un(n,r,l,u){if(n=n.options,r){r={};for(var b=0;b"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sd=!1;if(er)try{var al={};Object.defineProperty(al,"passive",{get:function(){sd=!0}}),window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{sd=!1}var Rr=null,ld=null,qo=null;function dg(){if(qo)return qo;var n,r=ld,l=r.length,u,b="value"in Rr?Rr.value:Rr.textContent,v=b.length;for(n=0;n=ol),bg=" ",xg=!1;function yg(n,r){switch(n){case"keyup":return RS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ns=!1;function jS(n,r){switch(n){case"compositionend":return vg(r);case"keypress":return r.which!==32?null:(xg=!0,bg);case"textInput":return n=r.data,n===bg&&xg?null:n;default:return null}}function LS(n,r){if(ns)return n==="compositionend"||!fd&&yg(n,r)?(n=dg(),qo=ld=Rr=null,ns=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:l,offset:r-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Cg(l)}}function Mg(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Mg(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Og(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Cr(n.document);r instanceof n.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)n=r.contentWindow;else break;r=Cr(n.document)}return r}function pd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var PS=er&&"documentMode"in document&&11>=document.documentMode,is=null,gd=null,fl=null,bd=!1;function Rg(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;bd||is==null||is!==Cr(u)||(u=is,"selectionStart"in u&&pd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),fl&&dl(fl,u)||(fl=u,u=Lc(gd,"onSelect"),0>=C,b-=C,Ui=1<<32-ut(r)+b|l<Ke?(at=De,De=null):at=De.sibling;var mt=ce(ae,De,se[Ke],pe);if(mt===null){De===null&&(De=at);break}n&&De&&mt.alternate===null&&r(ae,De),re=v(mt,re,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt,De=at}if(Ke===se.length)return l(ae,De),lt&&nr(ae,Ke),Ie;if(De===null){for(;KeKe?(at=De,De=null):at=De.sibling;var ea=ce(ae,De,mt.value,pe);if(ea===null){De===null&&(De=at);break}n&&De&&ea.alternate===null&&r(ae,De),re=v(ea,re,Ke),ht===null?Ie=ea:ht.sibling=ea,ht=ea,De=at}if(mt.done)return l(ae,De),lt&&nr(ae,Ke),Ie;if(De===null){for(;!mt.done;Ke++,mt=se.next())mt=ge(ae,mt.value,pe),mt!==null&&(re=v(mt,re,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return lt&&nr(ae,Ke),Ie}for(De=u(De);!mt.done;Ke++,mt=se.next())mt=de(De,ae,Ke,mt.value,pe),mt!==null&&(n&&mt.alternate!==null&&De.delete(mt.key===null?Ke:mt.key),re=v(mt,re,Ke),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return n&&De.forEach(function(c2){return r(ae,c2)}),lt&&nr(ae,Ke),Ie}function Nt(ae,re,se,pe){if(typeof se=="object"&&se!==null&&se.type===N&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case x:e:{for(var Ie=se.key;re!==null;){if(re.key===Ie){if(Ie=se.type,Ie===N){if(re.tag===7){l(ae,re.sibling),pe=b(re,se.props.children),pe.return=ae,ae=pe;break e}}else if(re.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===I&&Sa(Ie)===re.type){l(ae,re.sibling),pe=b(re,se.props),xl(pe,se),pe.return=ae,ae=pe;break e}l(ae,re);break}else r(ae,re);re=re.sibling}se.type===N?(pe=va(se.props.children,ae.mode,pe,se.key),pe.return=ae,ae=pe):(pe=Wo(se.type,se.key,se.props,null,ae.mode,pe),xl(pe,se),pe.return=ae,ae=pe)}return C(ae);case _:e:{for(Ie=se.key;re!==null;){if(re.key===Ie)if(re.tag===4&&re.stateNode.containerInfo===se.containerInfo&&re.stateNode.implementation===se.implementation){l(ae,re.sibling),pe=b(re,se.children||[]),pe.return=ae,ae=pe;break e}else{l(ae,re);break}else r(ae,re);re=re.sibling}pe=Nd(se,ae.mode,pe),pe.return=ae,ae=pe}return C(ae);case I:return se=Sa(se),Nt(ae,re,se,pe)}if(q(se))return Ae(ae,re,se,pe);if(K(se)){if(Ie=K(se),typeof Ie!="function")throw Error(a(150));return se=Ie.call(se),He(ae,re,se,pe)}if(typeof se.then=="function")return Nt(ae,re,ac(se),pe);if(se.$$typeof===E)return Nt(ae,re,tc(ae,se),pe);sc(ae,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,re!==null&&re.tag===6?(l(ae,re.sibling),pe=b(re,se),pe.return=ae,ae=pe):(l(ae,re),pe=Ed(se,ae.mode,pe),pe.return=ae,ae=pe),C(ae)):l(ae,re)}return function(ae,re,se,pe){try{bl=0;var Ie=Nt(ae,re,se,pe);return ms=null,Ie}catch(De){if(De===hs||De===ic)throw De;var ht=Zn(29,De,null,ae.mode);return ht.lanes=pe,ht.return=ae,ht}finally{}}}var Ta=tb(!0),nb=tb(!1),Ir=!1;function zd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Id(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Br(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ur(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(pt&2)!==0){var b=u.pending;return b===null?r.next=r:(r.next=b.next,b.next=r),u.pending=r,r=Qo(n),Ug(n,null,l),r}return Zo(n,u,r,l),Qo(n)}function yl(n,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,Ue(n,l)}}function Bd(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var b=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var C={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?b=v=C:v=v.next=C,l=l.next}while(l!==null);v===null?b=v=r:v=v.next=r}else b=v=r;l={baseState:u.baseState,firstBaseUpdate:b,lastBaseUpdate:v,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=r:n.next=r,l.lastBaseUpdate=r}var Ud=!1;function vl(){if(Ud){var n=fs;if(n!==null)throw n}}function _l(n,r,l,u){Ud=!1;var b=n.updateQueue;Ir=!1;var v=b.firstBaseUpdate,C=b.lastBaseUpdate,P=b.shared.pending;if(P!==null){b.shared.pending=null;var ne=P,le=ne.next;ne.next=null,C===null?v=le:C.next=le,C=ne;var he=n.alternate;he!==null&&(he=he.updateQueue,P=he.lastBaseUpdate,P!==C&&(P===null?he.firstBaseUpdate=le:P.next=le,he.lastBaseUpdate=ne))}if(v!==null){var ge=b.baseState;C=0,he=le=ne=null,P=v;do{var ce=P.lane&-536870913,de=ce!==P.lane;if(de?(rt&ce)===ce:(u&ce)===ce){ce!==0&&ce===ds&&(Ud=!0),he!==null&&(he=he.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ae=n,He=P;ce=r;var Nt=l;switch(He.tag){case 1:if(Ae=He.payload,typeof Ae=="function"){ge=Ae.call(Nt,ge,ce);break e}ge=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=He.payload,ce=typeof Ae=="function"?Ae.call(Nt,ge,ce):Ae,ce==null)break e;ge=p({},ge,ce);break e;case 2:Ir=!0}}ce=P.callback,ce!==null&&(n.flags|=64,de&&(n.flags|=8192),de=b.callbacks,de===null?b.callbacks=[ce]:de.push(ce))}else de={lane:ce,tag:P.tag,payload:P.payload,callback:P.callback,next:null},he===null?(le=he=de,ne=ge):he=he.next=de,C|=ce;if(P=P.next,P===null){if(P=b.shared.pending,P===null)break;de=P,P=de.next,de.next=null,b.lastBaseUpdate=de,b.shared.pending=null}}while(!0);he===null&&(ne=ge),b.baseState=ne,b.firstBaseUpdate=le,b.lastBaseUpdate=he,v===null&&(b.shared.lanes=0),Fr|=C,n.lanes=C,n.memoizedState=ge}}function ib(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function rb(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;nv?v:8;var C=M.T,P={};M.T=P,af(n,!1,r,l);try{var ne=b(),le=M.S;if(le!==null&&le(P,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var he=WS(ne,u);Nl(n,r,he,ti(n))}else Nl(n,r,u,ti(n))}catch(ge){Nl(n,r,{then:function(){},status:"rejected",reason:ge},ti())}finally{H.p=v,C!==null&&P.types!==null&&(C.types=P.types),M.T=C}}function rk(){}function nf(n,r,l,u){if(n.tag!==5)throw Error(a(476));var b=zb(n).queue;Lb(n,b,r,X,l===null?rk:function(){return Ib(n),l(u)})}function zb(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:X},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sr,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Ib(n){var r=zb(n);r.next===null&&(r=n.alternate.memoizedState),Nl(n,r.next.queue,{},ti())}function rf(){return yn($l)}function Bb(){return Qt().memoizedState}function Ub(){return Qt().memoizedState}function ak(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=ti();n=Br(l);var u=Ur(r,n,l);u!==null&&(qn(u,r,l),yl(u,r,l)),r={cache:Rd()},n.payload=r;return}r=r.return}}function sk(n,r,l){var u=ti();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},gc(n)?$b(r,l):(l=_d(n,r,l,u),l!==null&&(qn(l,n,u),qb(l,r,u)))}function Hb(n,r,l){var u=ti();Nl(n,r,l,u)}function Nl(n,r,l,u){var b={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(gc(n))$b(r,b);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=r.lastRenderedReducer,v!==null))try{var C=r.lastRenderedState,P=v(C,l);if(b.hasEagerState=!0,b.eagerState=P,Kn(P,C))return Zo(n,r,b,0),kt===null&&Ko(),!1}catch{}finally{}if(l=_d(n,r,b,u),l!==null)return qn(l,n,u),qb(l,r,u),!0}return!1}function af(n,r,l,u){if(u={lane:2,revertLane:If(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},gc(n)){if(r)throw Error(a(479))}else r=_d(n,l,u,2),r!==null&&qn(r,n,2)}function gc(n){var r=n.alternate;return n===Xe||r!==null&&r===Xe}function $b(n,r){gs=cc=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function qb(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,Ue(n,l)}}var Sl={readContext:yn,use:fc,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};Sl.useEffectEvent=Gt;var Pb={readContext:yn,use:fc,useCallback:function(n,r){return Dn().memoizedState=[n,r===void 0?null:r],n},useContext:yn,useEffect:kb,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,mc(4194308,4,Mb.bind(null,r,n),l)},useLayoutEffect:function(n,r){return mc(4194308,4,n,r)},useInsertionEffect:function(n,r){mc(4,2,n,r)},useMemo:function(n,r){var l=Dn();r=r===void 0?null:r;var u=n();if(Ca){Wt(!0);try{n()}finally{Wt(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Dn();if(l!==void 0){var b=l(r);if(Ca){Wt(!0);try{l(r)}finally{Wt(!1)}}}else b=r;return u.memoizedState=u.baseState=b,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:b},u.queue=n,n=n.dispatch=sk.bind(null,Xe,n),[u.memoizedState,n]},useRef:function(n){var r=Dn();return n={current:n},r.memoizedState=n},useState:function(n){n=Qd(n);var r=n.queue,l=Hb.bind(null,Xe,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:ef,useDeferredValue:function(n,r){var l=Dn();return tf(l,n,r)},useTransition:function(){var n=Qd(!1);return n=Lb.bind(null,Xe,n.queue,!0,!1),Dn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=Xe,b=Dn();if(lt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),kt===null)throw Error(a(349));(rt&127)!==0||ub(u,r,l)}b.memoizedState=l;var v={value:l,getSnapshot:r};return b.queue=v,kb(fb.bind(null,u,v,n),[n]),u.flags|=2048,xs(9,{destroy:void 0},db.bind(null,u,v,l,r),null),l},useId:function(){var n=Dn(),r=kt.identifierPrefix;if(lt){var l=Hi,u=Ui;l=(u&~(1<<32-ut(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=uc++,0<\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof u.is=="string"?C.createElement("select",{is:u.is}):C.createElement("select"),u.multiple?v.multiple=!0:u.size&&(v.size=u.size);break;default:v=typeof u.is=="string"?C.createElement(b,{is:u.is}):C.createElement(b)}}v[Ut]=r,v[mn]=u;e:for(C=r.child;C!==null;){if(C.tag===5||C.tag===6)v.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===r)break e;for(;C.sibling===null;){if(C.return===null||C.return===r)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}r.stateNode=v;e:switch(_n(v,b,u),b){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&or(r)}}return jt(r),yf(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&or(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(n=Q.current,cs(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,b=xn,b!==null)switch(b.tag){case 27:case 5:u=b.memoizedProps}n[Ut]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||o0(n.nodeValue,l)),n||Lr(r,!0)}else n=zc(n).createTextNode(u),n[Ut]=r,r.stateNode=n}return jt(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=cs(r),l!==null){if(n===null){if(!u)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Ut]=r}else _a(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;jt(r),n=!1}else l=Cd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(Wn(r),r):(Wn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return jt(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(b=cs(r),u!==null&&u.dehydrated!==null){if(n===null){if(!b)throw Error(a(318));if(b=r.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(a(317));b[Ut]=r}else _a(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;jt(r),b=!1}else b=Cd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=b),b=!0;if(!b)return r.flags&256?(Wn(r),r):(Wn(r),null)}return Wn(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,b=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(b=u.alternate.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==b&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),_c(r,r.updateQueue),jt(r),null);case 4:return te(),n===null&&$f(r.stateNode.containerInfo),jt(r),null;case 10:return rr(r.type),jt(r),null;case 19:if(V(Zt),u=r.memoizedState,u===null)return jt(r),null;if(b=(r.flags&128)!==0,v=u.rendering,v===null)if(b)Tl(u,!1);else{if(Vt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(v=oc(n),v!==null){for(r.flags|=128,Tl(u,!1),n=v.updateQueue,r.updateQueue=n,_c(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)Hg(l,n),l=l.sibling;return D(Zt,Zt.current&1|2),lt&&nr(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&ct()>kc&&(r.flags|=128,b=!0,Tl(u,!1),r.lanes=4194304)}else{if(!b)if(n=oc(v),n!==null){if(r.flags|=128,b=!0,n=n.updateQueue,r.updateQueue=n,_c(r,n),Tl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!v.alternate&&!lt)return jt(r),null}else 2*ct()-u.renderingStartTime>kc&&l!==536870912&&(r.flags|=128,b=!0,Tl(u,!1),r.lanes=4194304);u.isBackwards?(v.sibling=r.child,r.child=v):(n=u.last,n!==null?n.sibling=v:r.child=v,u.last=v)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=ct(),n.sibling=null,l=Zt.current,D(Zt,b?l&1|2:l&1),lt&&nr(r,u.treeForkCount),n):(jt(r),null);case 22:case 23:return Wn(r),$d(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(jt(r),r.subtreeFlags&6&&(r.flags|=8192)):jt(r),l=r.updateQueue,l!==null&&_c(r,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),n!==null&&V(Na),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),rr(en),jt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function dk(n,r){switch(kd(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return rr(en),te(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return fe(r),null;case 31:if(r.memoizedState!==null){if(Wn(r),r.alternate===null)throw Error(a(340));_a()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Wn(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));_a()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return V(Zt),null;case 4:return te(),null;case 10:return rr(r.type),null;case 22:case 23:return Wn(r),$d(),n!==null&&V(Na),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return rr(en),null;case 25:return null;default:return null}}function hx(n,r){switch(kd(r),r.tag){case 3:rr(en),te();break;case 26:case 27:case 5:fe(r);break;case 4:te();break;case 31:r.memoizedState!==null&&Wn(r);break;case 13:Wn(r);break;case 19:V(Zt);break;case 10:rr(r.type);break;case 22:case 23:Wn(r),$d(),n!==null&&V(Na);break;case 24:rr(en)}}function Cl(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var b=u.next;l=b;do{if((l.tag&n)===n){u=void 0;var v=l.create,C=l.inst;u=v(),C.destroy=u}l=l.next}while(l!==b)}}catch(P){yt(r,r.return,P)}}function qr(n,r,l){try{var u=r.updateQueue,b=u!==null?u.lastEffect:null;if(b!==null){var v=b.next;u=v;do{if((u.tag&n)===n){var C=u.inst,P=C.destroy;if(P!==void 0){C.destroy=void 0,b=r;var ne=l,le=P;try{le()}catch(he){yt(b,ne,he)}}}u=u.next}while(u!==v)}}catch(he){yt(r,r.return,he)}}function mx(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{rb(r,l)}catch(u){yt(n,n.return,u)}}}function px(n,r,l){l.props=Aa(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){yt(n,r,u)}}function Al(n,r){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(b){yt(n,r,b)}}function $i(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(b){yt(n,r,b)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(b){yt(n,r,b)}else l.current=null}function gx(n){var r=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(b){yt(n,n.return,b)}}function vf(n,r,l){try{var u=n.stateNode;Dk(u,n.type,l,r),u[mn]=r}catch(b){yt(n,n.return,b)}}function bx(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Kr(n.type)||n.tag===4}function _f(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||bx(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Kr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function wf(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(n),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=_e));else if(u!==4&&(u===27&&Kr(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(wf(n,r,l),n=n.sibling;n!==null;)wf(n,r,l),n=n.sibling}function wc(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?l.insertBefore(n,r):l.appendChild(n);else if(u!==4&&(u===27&&Kr(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(wc(n,r,l),n=n.sibling;n!==null;)wc(n,r,l),n=n.sibling}function xx(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,b=r.attributes;b.length;)r.removeAttributeNode(b[0]);_n(r,u,l),r[Ut]=n,r[mn]=l}catch(v){yt(n,n.return,v)}}var cr=!1,rn=!1,Ef=!1,yx=typeof WeakSet=="function"?WeakSet:Set,gn=null;function fk(n,r){if(n=n.containerInfo,Ff=Pc,n=Og(n),pd(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var b=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var C=0,P=-1,ne=-1,le=0,he=0,ge=n,ce=null;t:for(;;){for(var de;ge!==l||b!==0&&ge.nodeType!==3||(P=C+b),ge!==v||u!==0&&ge.nodeType!==3||(ne=C+u),ge.nodeType===3&&(C+=ge.nodeValue.length),(de=ge.firstChild)!==null;)ce=ge,ge=de;for(;;){if(ge===n)break t;if(ce===l&&++le===b&&(P=C),ce===v&&++he===u&&(ne=C),(de=ge.nextSibling)!==null)break;ge=ce,ce=ge.parentNode}ge=de}l=P===-1||ne===-1?null:{start:P,end:ne}}else l=null}l=l||{start:0,end:0}}else l=null;for(Gf={focusedElem:n,selectionRange:l},Pc=!1,gn=r;gn!==null;)if(r=gn,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,gn=n;else for(;gn!==null;){switch(r=gn,v=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l title"))),_n(v,u,l),v[Ut]=n,Ft(v),u=v;break e;case"link":var C=S0("link","href",b).get(u+(l.href||""));if(C){for(var P=0;PNt&&(C=Nt,Nt=He,He=C);var ae=Ag(P,He),re=Ag(P,Nt);if(ae&&re&&(de.rangeCount!==1||de.anchorNode!==ae.node||de.anchorOffset!==ae.offset||de.focusNode!==re.node||de.focusOffset!==re.offset)){var se=ge.createRange();se.setStart(ae.node,ae.offset),de.removeAllRanges(),He>Nt?(de.addRange(se),de.extend(re.node,re.offset)):(se.setEnd(re.node,re.offset),de.addRange(se))}}}}for(ge=[],de=P;de=de.parentNode;)de.nodeType===1&&ge.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;Pl?32:l,M.T=null,l=Mf,Mf=null;var v=Vr,C=mr;if(dn=0,Es=Vr=null,mr=0,(pt&6)!==0)throw Error(a(331));var P=pt;if(pt|=4,Mx(v.current),Tx(v,v.current,C,l),pt=P,Ll(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Kt,v)}catch{}return!0}finally{H.p=b,M.T=u,Xx(n,r)}}function Zx(n,r,l){r=ci(l,r),r=cf(n.stateNode,r,2),n=Ur(n,r,2),n!==null&&(gt(n,2),qi(n))}function yt(n,r,l){if(n.tag===3)Zx(n,n,l);else for(;r!==null;){if(r.tag===3){Zx(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Gr===null||!Gr.has(u))){n=ci(l,n),l=Qb(2),u=Ur(r,l,2),u!==null&&(Wb(l,u,r,n),gt(u,2),qi(u));break}}r=r.return}}function jf(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new pk;var b=new Set;u.set(r,b)}else b=u.get(r),b===void 0&&(b=new Set,u.set(r,b));b.has(l)||(kf=!0,b.add(l),n=vk.bind(null,n,r,l),r.then(n,n))}function vk(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,kt===n&&(rt&l)===l&&(Vt===4||Vt===3&&(rt&62914560)===rt&&300>ct()-Sc?(pt&2)===0&&Ns(n,0):Tf|=l,ws===rt&&(ws=0)),qi(n)}function Qx(n,r){r===0&&(r=Pe()),n=ya(n,r),n!==null&&(gt(n,r),qi(n))}function _k(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),Qx(n,l)}function wk(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,b=n.memoizedState;b!==null&&(l=b.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),Qx(n,l)}function Ek(n,r){return Pt(n,r)}var Rc=null,ks=null,Lf=!1,Dc=!1,zf=!1,Xr=0;function qi(n){n!==ks&&n.next===null&&(ks===null?Rc=ks=n:ks=ks.next=n),Dc=!0,Lf||(Lf=!0,Sk())}function Ll(n,r){if(!zf&&Dc){zf=!0;do for(var l=!1,u=Rc;u!==null;){if(n!==0){var b=u.pendingLanes;if(b===0)var v=0;else{var C=u.suspendedLanes,P=u.pingedLanes;v=(1<<31-ut(42|n)+1)-1,v&=b&~(C&~P),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,t0(u,v))}else v=rt,v=ie(u,u===kt?v:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(v&3)===0||me(u,v)||(l=!0,t0(u,v));u=u.next}while(l);zf=!1}}function Nk(){Wx()}function Wx(){Dc=Lf=!1;var n=0;Xr!==0&&Lk()&&(n=Xr);for(var r=ct(),l=null,u=Rc;u!==null;){var b=u.next,v=Jx(u,r);v===0?(u.next=null,l===null?Rc=b:l.next=b,b===null&&(ks=l)):(l=u,(n!==0||(v&3)!==0)&&(Dc=!0)),u=b}dn!==0&&dn!==5||Ll(n),Xr!==0&&(Xr=0)}function Jx(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,b=n.expirationTimes,v=n.pendingLanes&-62914561;0P)break;var he=ne.transferSize,ge=ne.initiatorType;he&&c0(ge)&&(ne=ne.responseEnd,C+=he*(ne"u"?null:document;function _0(n,r,l){var u=Ts;if(u&&typeof r=="string"&&r){var b=kn(r);b='link[rel="'+n+'"][href="'+b+'"]',typeof l=="string"&&(b+='[crossorigin="'+l+'"]'),v0.has(b)||(v0.add(b),n={rel:n,crossOrigin:l,href:r},u.querySelector(b)===null&&(r=u.createElement("link"),_n(r,"link",n),Ft(r),u.head.appendChild(r)))}}function Fk(n){pr.D(n),_0("dns-prefetch",n,null)}function Gk(n,r){pr.C(n,r),_0("preconnect",n,r)}function Vk(n,r,l){pr.L(n,r,l);var u=Ts;if(u&&n&&r){var b='link[rel="preload"][as="'+kn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(b+='[imagesrcset="'+kn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(b+='[imagesizes="'+kn(l.imageSizes)+'"]')):b+='[href="'+kn(n)+'"]';var v=b;switch(r){case"style":v=Cs(n);break;case"script":v=As(n)}pi.has(v)||(n=p({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),pi.set(v,n),u.querySelector(b)!==null||r==="style"&&u.querySelector(Ul(v))||r==="script"&&u.querySelector(Hl(v))||(r=u.createElement("link"),_n(r,"link",n),Ft(r),u.head.appendChild(r)))}}function Yk(n,r){pr.m(n,r);var l=Ts;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",b='link[rel="modulepreload"][as="'+kn(u)+'"][href="'+kn(n)+'"]',v=b;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=As(n)}if(!pi.has(v)&&(n=p({rel:"modulepreload",href:n},r),pi.set(v,n),l.querySelector(b)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Hl(v)))return}u=l.createElement("link"),_n(u,"link",n),Ft(u),l.head.appendChild(u)}}}function Xk(n,r,l){pr.S(n,r,l);var u=Ts;if(u&&n){var b=Ii(u).hoistableStyles,v=Cs(n);r=r||"default";var C=b.get(v);if(!C){var P={loading:0,preload:null};if(C=u.querySelector(Ul(v)))P.loading=5;else{n=p({rel:"stylesheet",href:n,"data-precedence":r},l),(l=pi.get(v))&&Wf(n,l);var ne=C=u.createElement("link");Ft(ne),_n(ne,"link",n),ne._p=new Promise(function(le,he){ne.onload=le,ne.onerror=he}),ne.addEventListener("load",function(){P.loading|=1}),ne.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Bc(C,r,u)}C={type:"stylesheet",instance:C,count:1,state:P},b.set(v,C)}}}function Kk(n,r){pr.X(n,r);var l=Ts;if(l&&n){var u=Ii(l).hoistableScripts,b=As(n),v=u.get(b);v||(v=l.querySelector(Hl(b)),v||(n=p({src:n,async:!0},r),(r=pi.get(b))&&Jf(n,r),v=l.createElement("script"),Ft(v),_n(v,"link",n),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(b,v))}}function Zk(n,r){pr.M(n,r);var l=Ts;if(l&&n){var u=Ii(l).hoistableScripts,b=As(n),v=u.get(b);v||(v=l.querySelector(Hl(b)),v||(n=p({src:n,async:!0,type:"module"},r),(r=pi.get(b))&&Jf(n,r),v=l.createElement("script"),Ft(v),_n(v,"link",n),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(b,v))}}function w0(n,r,l,u){var b=(b=Q.current)?Ic(b):null;if(!b)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Cs(l.href),l=Ii(b).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=Cs(l.href);var v=Ii(b).hoistableStyles,C=v.get(n);if(C||(b=b.ownerDocument||b,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(n,C),(v=b.querySelector(Ul(n)))&&!v._p&&(C.instance=v,C.state.loading=5),pi.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},pi.set(n,l),v||Qk(b,n,l,C.state))),r&&u===null)throw Error(a(528,""));return C}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=As(l),l=Ii(b).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Cs(n){return'href="'+kn(n)+'"'}function Ul(n){return'link[rel="stylesheet"]['+n+"]"}function E0(n){return p({},n,{"data-precedence":n.precedence,precedence:null})}function Qk(n,r,l,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),_n(r,"link",l),Ft(r),n.head.appendChild(r))}function As(n){return'[src="'+kn(n)+'"]'}function Hl(n){return"script[async]"+n}function N0(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+kn(l.href)+'"]');if(u)return r.instance=u,Ft(u),u;var b=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ft(u),_n(u,"style",b),Bc(u,l.precedence,n),r.instance=u;case"stylesheet":b=Cs(l.href);var v=n.querySelector(Ul(b));if(v)return r.state.loading|=4,r.instance=v,Ft(v),v;u=E0(l),(b=pi.get(b))&&Wf(u,b),v=(n.ownerDocument||n).createElement("link"),Ft(v);var C=v;return C._p=new Promise(function(P,ne){C.onload=P,C.onerror=ne}),_n(v,"link",u),r.state.loading|=4,Bc(v,l.precedence,n),r.instance=v;case"script":return v=As(l.src),(b=n.querySelector(Hl(v)))?(r.instance=b,Ft(b),b):(u=l,(b=pi.get(v))&&(u=p({},l),Jf(u,b)),n=n.ownerDocument||n,b=n.createElement("script"),Ft(b),_n(b,"link",u),n.head.appendChild(b),r.instance=b);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Bc(u,l.precedence,n));return r.instance}function Bc(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=u.length?u[u.length-1]:null,v=b,C=0;C title"):null)}function Wk(n,r,l){if(l===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return n=r.disabled,typeof r.precedence=="string"&&n==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function T0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Jk(n,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var b=Cs(u.href),v=r.querySelector(Ul(b));if(v){r=v._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Hc.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=v,Ft(v);return}v=r.ownerDocument||r,u=E0(u),(b=pi.get(b))&&Wf(u,b),v=v.createElement("link"),Ft(v);var C=v;C._p=new Promise(function(P,ne){C.onload=P,C.onerror=ne}),_n(v,"link",u),l.instance=v}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=Hc.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var eh=0;function e2(n,r){return n.stylesheets&&n.count===0&&qc(n,n.stylesheets),0eh?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(b)}}:null}function Hc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var $c=null;function qc(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,$c=new Map,r.forEach(t2,n),$c=null,Hc.call(n))}function t2(n,r){if(!(r.state.loading&4)){var l=$c.get(n);if(l)var u=l.get(null);else{l=new Map,$c.set(n,l);for(var b=n.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ch.exports=b2(),ch.exports}var y2=x2();/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -101,12 +101,12 @@ Error generating stack: `+u.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const T2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],A2=ke("arrow-up",T2);/** + */const T2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],C2=ke("arrow-up",T2);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const C2=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],__=ke("ban",C2);/** + */const A2=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],__=ke("ban",A2);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -226,7 +226,7 @@ Error generating stack: `+u.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dT=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],A_=ke("flag",dT);/** + */const dT=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],C_=ke("flag",dT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -276,12 +276,12 @@ Error generating stack: `+u.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TT=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],AT=ke("layout-dashboard",TT);/** + */const TT=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],CT=ke("layout-dashboard",TT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CT=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],MT=ke("list-todo",CT);/** + */const AT=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],MT=ke("list-todo",AT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -341,7 +341,7 @@ Error generating stack: `+u.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZT=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],C_=ke("puzzle",ZT);/** + */const ZT=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],A_=ke("puzzle",ZT);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. @@ -356,119 +356,119 @@ Error generating stack: `+u.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eA=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],tA=ke("rocket",eA);/** + */const eC=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],tC=ke("rocket",eC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nA=[["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"}]],iA=ke("rotate-ccw",nA);/** + */const nC=[["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"}]],iC=ke("rotate-ccw",nC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],O_=ke("search",rA);/** + */const rC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],O_=ke("search",rC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aA=[["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"}]],sA=ke("shield-alert",aA);/** + */const aC=[["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"}]],sC=ke("shield-alert",aC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lA=[["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"}]],vu=ke("shield-check",lA);/** + */const lC=[["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"}]],vu=ke("shield-check",lC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oA=[["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"}]],J0=ke("sparkles",oA);/** + */const oC=[["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"}]],J0=ke("sparkles",oC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cA=[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]],uA=ke("sticky-note",cA);/** + */const cC=[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]],uC=ke("sticky-note",cC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dA=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],R_=ke("terminal",dA);/** + */const dC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],R_=ke("terminal",dC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fA=[["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"}]],hA=ke("trash-2",fA);/** + */const fC=[["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"}]],hC=ke("trash-2",fC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mA=[["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"}]],pA=ke("triangle-alert",mA);/** + */const mC=[["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"}]],pC=ke("triangle-alert",mC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],D_=ke("users",gA);/** + */const gC=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],D_=ke("users",gC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bA=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],xA=ke("wand-sparkles",bA);/** + */const bC=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],xC=ke("wand-sparkles",bC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yA=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],j_=ke("waypoints",yA);/** + */const yC=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],j_=ke("waypoints",yC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vA=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],_u=ke("wrench",vA);/** + */const vC=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],_u=ke("wrench",vC);/** * @license lucide-react v0.563.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _A=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],L_=ke("x",_A),wA={open:{label:"Open",color:"bg-red-500/10 text-red-400 border-red-500/20",dotColor:"bg-red-500",description:"Newly discovered, awaiting triage"},in_progress:{label:"In Progress",color:"bg-blue-500/10 text-blue-400 border-blue-500/20",dotColor:"bg-blue-500",description:"Someone is working on this"},snoozed:{label:"Snoozed",color:"bg-purple-500/10 text-purple-400 border-purple-500/20",dotColor:"bg-purple-500",description:"Temporarily hidden until a follow-up date"},fixed:{label:"Fixed",color:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",dotColor:"bg-emerald-500",description:"This vulnerability has been fixed"},ignored:{label:"Ignored",color:"bg-gray-500/10 text-gray-400 border-gray-500/20",dotColor:"bg-gray-500",description:"Acknowledged but accepted"}},EA={trivial:{label:"Trivial",color:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"},low:{label:"Low",color:"bg-blue-500/10 text-blue-400 border-blue-500/20"},medium:{label:"Medium",color:"bg-yellow-500/10 text-yellow-400 border-yellow-500/20"},high:{label:"High",color:"bg-orange-500/10 text-orange-400 border-orange-500/20"}},z_={critical:"bg-red-500/20 text-red-500 border-red-500/30",high:"bg-orange-500/20 text-orange-500 border-orange-500/30",medium:"bg-yellow-500/20 text-yellow-500 border-yellow-500/30",low:"bg-blue-500/20 text-blue-500 border-blue-500/30"};function Zc(e){return e.original_severity!=null&&e.original_severity!==e.severity}const NA={js:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",php:"php",cs:"csharp",cpp:"cpp",c:"c",sh:"bash",bash:"bash",sql:"sql",html:"html",css:"css",json:"json",yaml:"yaml",yml:"yaml",xml:"xml"};function SA(e){var i;if(!e)return null;const t=(i=e.split(".").pop())==null?void 0:i.toLowerCase();return t&&NA[t]||null}function bp(e){switch(e){case"critical":return"bg-red-500";case"high":return"bg-orange-500";case"medium":return"bg-yellow-500";default:return"bg-blue-500"}}async function xp(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}const Ao="https://app.strix.ai/api/auth/signup",kA="https://strix.ai/pricing",TA="ref=oss_viewer&utm_source=oss_viewer&utm_medium=local_viewer&utm_campaign=oss_viewer";function ca(e,t){const i=e.includes("?")?"&":"?";return`${e}${i}${TA}&utm_content=${encodeURIComponent(t)}`}function Ti(e,t={}){try{const i={event:e};for(const[s,o]of Object.entries(t))o!==void 0&&(i[s]=o);const a=JSON.stringify(i);typeof navigator<"u"&&navigator.sendBeacon?navigator.sendBeacon("/api/event",a):fetch("/api/event",{method:"POST",body:a,keepalive:!0})}catch{}}function Ci(e,t){Ti("cta_clicked",{cta:e,surface:t})}function Hu({label:e="Pro",className:t=""}){return g.jsx("span",{className:`inline-flex items-center rounded-full px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[#aaa] ${t}`,style:{border:"1px solid #2a2a2a",background:"rgba(255,255,255,0.04)"},children:e})}function AA({text:e,children:t,className:i=""}){const[a,s]=ee.useState(!1);return g.jsxs("span",{className:`relative inline-flex ${i}`,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),children:[t,a&&g.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-2 w-max max-w-[240px] -translate-x-1/2 rounded-md px-2.5 py-1.5 text-xs text-[#ddd] shadow-lg",style:{border:"1px solid #2a2a2a",background:"#0a0a0a"},children:e})]})}function ey({item:e,surface:t}){const i=e.icon;return g.jsxs("a",{href:ca(Ao,e.slug),target:"_blank",rel:"noopener noreferrer",onClick:()=>Ci(e.slug,t),title:e.desc,className:"group block cursor-pointer rounded-xl border border-[#222] bg-[rgba(255,255,255,0.02)] p-4 text-left transition-colors hover:border-[#444]",children:[g.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[g.jsx(i,{className:"h-4 w-4 text-[#888] transition-colors group-hover:text-white","aria-hidden":"true"}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(Hu,{}),g.jsx(Ps,{className:"h-3.5 w-3.5 text-[#555] transition-colors group-hover:text-[#aaa]","aria-hidden":"true"})]})]}),g.jsx("p",{className:"text-sm font-medium text-white",children:e.title}),g.jsx("p",{className:"mt-0.5 text-xs text-[#666]",children:e.desc})]})}function CA({feature:e,active:t,onClick:i,collapsed:a=!1}){const s=e.icon;return a?g.jsx("button",{onClick:i,title:`${e.title} (${e.tier})`,className:`group flex w-full cursor-pointer items-center justify-center rounded-md px-2.5 py-2 transition-colors ${t?"text-white":"text-[#888] hover:bg-[rgba(255,255,255,0.06)] hover:text-white"}`,style:t?{background:"rgba(255,255,255,0.12)"}:void 0,children:g.jsx(s,{className:"h-4 w-4 flex-shrink-0","aria-hidden":"true"})}):g.jsxs("button",{onClick:i,className:`group flex w-full cursor-pointer items-start gap-2.5 rounded-md px-2.5 py-1.5 text-left transition-colors ${t?"text-white":"text-[#888] hover:bg-[rgba(255,255,255,0.06)] hover:text-white"}`,style:t?{background:"rgba(255,255,255,0.12)"}:void 0,children:[g.jsx(s,{className:"mt-0.5 h-4 w-4 flex-shrink-0","aria-hidden":"true"}),g.jsxs("span",{className:"min-w-0 flex-1",children:[g.jsxs("span",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"flex-1 truncate text-sm",children:e.title}),g.jsx(Hu,{label:e.tier})]}),g.jsx("span",{className:"mt-0.5 block text-[11px] leading-snug text-[#666]",children:e.navDesc})]})]})}function ao({label:e,desc:t,slug:i,icon:a,surface:s}){return g.jsx(AA,{text:t,children:g.jsxs("a",{href:ca(Ao,i),target:"_blank",rel:"noopener noreferrer",onClick:()=>Ci(i,s),className:"group inline-flex items-center gap-2 rounded-lg border border-[#222] bg-[rgba(255,255,255,0.02)] px-3 py-2 text-sm text-[#aaa] transition-colors hover:border-[#444] hover:text-white",children:[g.jsx(a,{className:"h-4 w-4 text-[#888] transition-colors group-hover:text-white","aria-hidden":"true"}),g.jsx("span",{children:e}),g.jsx(Hu,{className:"ml-0.5"})]})})}function I_(e){var t,i,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t{const i=new Array(e.length+t.length);for(let a=0;a({classGroupId:e,validator:t}),B_=(e=new Map,t=null,i)=>({nextPart:e,validators:t,classGroupId:i}),wu="-",ty=[],DA="arbitrary..",jA=e=>{const t=zA(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return LA(c);const d=c.split(wu),f=d[0]===""&&d.length>1?1:0;return U_(d,f,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const f=a[c],h=i[c];return f?h?OA(h,f):f:h||ty}return i[c]||ty}}},U_=(e,t,i)=>{if(e.length-t===0)return i.classGroupId;const s=e[t],o=i.nextPart.get(s);if(o){const h=U_(e,t+1,o);if(h)return h}const c=i.validators;if(c===null)return;const d=t===0?e.join(wu):e.slice(t).join(wu),f=c.length;for(let h=0;he.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),i=t.indexOf(":"),a=t.slice(0,i);return a?DA+a:void 0})(),zA=e=>{const{theme:t,classGroups:i}=e;return IA(i,t)},IA=(e,t)=>{const i=B_();for(const a in e){const s=e[a];yp(s,i,a,t)}return i},yp=(e,t,i,a)=>{const s=e.length;for(let o=0;o{if(typeof e=="string"){UA(e,t,i);return}if(typeof e=="function"){HA(e,t,i,a);return}$A(e,t,i,a)},UA=(e,t,i)=>{const a=e===""?t:H_(t,e);a.classGroupId=i},HA=(e,t,i,a)=>{if(qA(e)){yp(e(a),t,i,a);return}t.validators===null&&(t.validators=[]),t.validators.push(RA(i,e))},$A=(e,t,i,a)=>{const s=Object.entries(e),o=s.length;for(let c=0;c{let i=e;const a=t.split(wu),s=a.length;for(let o=0;o"isThemeGetter"in e&&e.isThemeGetter===!0,PA=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,i=Object.create(null),a=Object.create(null);const s=(o,c)=>{i[o]=c,t++,t>e&&(t=0,a=i,i=Object.create(null))};return{get(o){let c=i[o];if(c!==void 0)return c;if((c=a[o])!==void 0)return s(o,c),c},set(o,c){o in i?i[o]=c:s(o,c)}}},jm="!",ny=":",FA=[],iy=(e,t,i,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:i,maybePostfixModifierPosition:a,isExternal:s}),GA=e=>{const{prefix:t,experimentalParseClassName:i}=e;let a=s=>{const o=[];let c=0,d=0,f=0,h;const m=s.length;for(let N=0;Nf?h-f:void 0;return iy(o,x,y,_)};if(t){const s=t+ny,o=a;a=c=>c.startsWith(s)?o(c.slice(s.length)):iy(FA,!1,c,void 0,!0)}if(i){const s=a;a=o=>i({className:o,parseClassName:s})}return a},VA=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((i,a)=>{t.set(i,1e6+a)}),i=>{const a=[];let s=[];for(let o=0;o0&&(s.sort(),a.push(...s),s=[]),a.push(c)):s.push(c)}return s.length>0&&(s.sort(),a.push(...s)),a}},YA=e=>({cache:PA(e.cacheSize),parseClassName:GA(e),sortModifiers:VA(e),postfixLookupClassGroupIds:XA(e),...jA(e)}),XA=e=>{const t=Object.create(null),i=e.postfixLookupClassGroups;if(i)for(let a=0;a{const{parseClassName:i,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:o,postfixLookupClassGroupIds:c}=t,d=[],f=e.trim().split(KA);let h="";for(let m=f.length-1;m>=0;m-=1){const p=f[m],{isExternal:y,modifiers:x,hasImportantModifier:_,baseClassName:N,maybePostfixModifierPosition:S}=i(p);if(y){h=p+(h.length>0?" "+h:h);continue}let w=!!S,k;if(w){const B=N.substring(0,S);k=a(B);const I=k&&c[k]?a(N):void 0;I&&I!==k&&(k=I,w=!1)}else k=a(N);if(!k){if(!w){h=p+(h.length>0?" "+h:h);continue}if(k=a(N),!k){h=p+(h.length>0?" "+h:h);continue}w=!1}const E=x.length===0?"":x.length===1?x[0]:o(x).join(":"),M=_?E+jm:E,U=M+k;if(d.indexOf(U)>-1)continue;d.push(U);const R=s(k,w);for(let B=0;B0?" "+h:h)}return h},QA=(...e)=>{let t=0,i,a,s="";for(;t{if(typeof e=="string")return e;let t,i="";for(let a=0;a{let i,a,s,o;const c=f=>{const h=t.reduce((m,p)=>p(m),e());return i=YA(h),a=i.cache.get,s=i.cache.set,o=d,d(f)},d=f=>{const h=a(f);if(h)return h;const m=ZA(f,i);return s(f,m),m};return o=c,(...f)=>o(QA(...f))},JA=[],fn=e=>{const t=i=>i[e]||JA;return t.isThemeGetter=!0,t},q_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,P_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ta=e=>eC.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),qi=e=>!!e&&Number.isInteger(Number(e)),hh=e=>e.endsWith("%")&&We(e.slice(0,-1)),gr=e=>tC.test(e),F_=()=>!0,sC=e=>nC.test(e)&&!iC.test(e),vp=()=>!1,lC=e=>rC.test(e),oC=e=>aC.test(e),cC=e=>!Te(e)&&!Ae(e),uC=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),dC=e=>ua(e,Y_,vp),Te=e=>q_.test(e),Ra=e=>ua(e,X_,sC),ry=e=>ua(e,yC,We),fC=e=>ua(e,Z_,F_),hC=e=>ua(e,K_,vp),ay=e=>ua(e,G_,vp),mC=e=>ua(e,V_,oC),Qc=e=>ua(e,Q_,lC),Ae=e=>P_.test(e),Yl=e=>Xa(e,X_),pC=e=>Xa(e,K_),sy=e=>Xa(e,G_),gC=e=>Xa(e,Y_),bC=e=>Xa(e,V_),Wc=e=>Xa(e,Q_,!0),xC=e=>Xa(e,Z_,!0),ua=(e,t,i)=>{const a=q_.exec(e);return a?a[1]?t(a[1]):i(a[2]):!1},Xa=(e,t,i=!1)=>{const a=P_.exec(e);return a?a[1]?t(a[1]):i:!1},G_=e=>e==="position"||e==="percentage",V_=e=>e==="image"||e==="url",Y_=e=>e==="length"||e==="size"||e==="bg-size",X_=e=>e==="length",yC=e=>e==="number",K_=e=>e==="family-name",Z_=e=>e==="number"||e==="weight",Q_=e=>e==="shadow",vC=()=>{const e=fn("color"),t=fn("font"),i=fn("text"),a=fn("font-weight"),s=fn("tracking"),o=fn("leading"),c=fn("breakpoint"),d=fn("container"),f=fn("spacing"),h=fn("radius"),m=fn("shadow"),p=fn("inset-shadow"),y=fn("text-shadow"),x=fn("drop-shadow"),_=fn("blur"),N=fn("perspective"),S=fn("aspect"),w=fn("ease"),k=fn("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...M(),Ae,Te],R=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],I=()=>[Ae,Te,f],Z=()=>[ta,"full","auto",...I()],j=()=>[qi,"none","subgrid",Ae,Te],z=()=>["auto",{span:["full",qi,Ae,Te]},qi,Ae,Te],V=()=>[qi,"auto",Ae,Te],G=()=>["auto","min","max","fr",Ae,Te],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...I()],H=()=>[ta,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],K=()=>[ta,"screen","full","dvw","lvw","svw","min","max","fit",...I()],X=()=>[ta,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],C=()=>[e,Ae,Te],L=()=>[...M(),sy,ay,{position:[Ae,Te]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",gC,dC,{size:[Ae,Te]}],F=()=>[hh,Yl,Ra],$=()=>["","none","full",h,Ae,Te],Q=()=>["",We,Yl,Ra],J=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[We,hh,sy,ay],oe=()=>["","none",_,Ae,Te],fe=()=>["none",We,Ae,Te],be=()=>["none",We,Ae,Te],we=()=>[We,Ae,Te],Ne=()=>[ta,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gr],breakpoint:[gr],color:[F_],container:[gr],"drop-shadow":[gr],ease:["in","out","in-out"],font:[cC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gr],shadow:[gr],spacing:["px",We],text:[gr],"text-shadow":[gr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ta,Te,Ae,S]}],container:["container"],"container-type":[{"@container":["","normal","size",Ae,Te]}],"container-named":[uC],columns:[{columns:[We,Te,Ae,d]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:U()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[qi,"auto",Ae,Te]}],basis:[{basis:[ta,"full","auto",d,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,ta,"auto","initial","none",Te]}],grow:[{grow:["",We,Ae,Te]}],shrink:[{shrink:["",We,Ae,Te]}],order:[{order:[qi,"first","last","none",Ae,Te]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...X()]}],"min-block-size":[{"min-block":["auto",...X()]}],"max-block-size":[{"max-block":["none",...X()]}],w:[{w:[d,"screen",...H()]}],"min-w":[{"min-w":[d,"screen","none",...H()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",i,Yl,Ra]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,xC,fC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hh,Te]}],"font-family":[{font:[pC,hC,t]}],"font-features":[{"font-features":[Te]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Ae,Te]}],"line-clamp":[{"line-clamp":[We,"none",Ae,ry]}],leading:[{leading:[o,...I()]}],"list-image":[{"list-image":["none",Ae,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ae,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Ae,Ra]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[We,"auto",Ae,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"tab-size":[{tab:[qi,Ae,Te]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae,Te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ae,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qi,Ae,Te],radial:["",Ae,Te],conic:[qi,Ae,Te]},bC,mC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Ae,Te]}],"outline-w":[{outline:["",We,Yl,Ra]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",m,Wc,Qc]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",p,Wc,Qc]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[We,Ra]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",y,Wc,Qc]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[We,Ae,Te]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Ae,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ae,Te]}],filter:[{filter:["","none",Ae,Te]}],blur:[{blur:oe()}],brightness:[{brightness:[We,Ae,Te]}],contrast:[{contrast:[We,Ae,Te]}],"drop-shadow":[{"drop-shadow":["","none",x,Wc,Qc]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",We,Ae,Te]}],"hue-rotate":[{"hue-rotate":[We,Ae,Te]}],invert:[{invert:["",We,Ae,Te]}],saturate:[{saturate:[We,Ae,Te]}],sepia:[{sepia:["",We,Ae,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Ae,Te]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[We,Ae,Te]}],"backdrop-contrast":[{"backdrop-contrast":[We,Ae,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Ae,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Ae,Te]}],"backdrop-invert":[{"backdrop-invert":["",We,Ae,Te]}],"backdrop-opacity":[{"backdrop-opacity":[We,Ae,Te]}],"backdrop-saturate":[{"backdrop-saturate":[We,Ae,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Ae,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ae,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Ae,Te]}],ease:[{ease:["linear","initial",w,Ae,Te]}],delay:[{delay:[We,Ae,Te]}],animate:[{animate:["none",k,Ae,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,Ae,Te]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[Ae,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ne()}],"translate-x":[{"translate-x":Ne()}],"translate-y":[{"translate-y":Ne()}],"translate-z":[{"translate-z":Ne()}],"translate-none":["translate-none"],zoom:[{zoom:[qi,Ae,Te]}],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae,Te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":C()}],"scrollbar-track-color":[{"scrollbar-track":C()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae,Te]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[We,Yl,Ra,ry]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_C=WA(vC);function la(...e){return _C(MA(e))}function wC(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Lm(e){const t=new Date(e),a=Math.floor((new Date().getTime()-t.getTime())/1e3);return a<60?"just now":a<3600?`${Math.floor(a/60)}m ago`:a<86400?`${Math.floor(a/3600)}h ago`:a<604800?`${Math.floor(a/86400)}d ago`:wC(e)}function EC(e){return`STRIX-${e}`}function Os(e){return new Intl.NumberFormat("en-US").format(e)}function NC(e,t){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const SC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TC={};function ly(e,t){return(TC.jsx?kC:SC).test(e)}const AC=/[ \t\n\f\r]/g;function CC(e){return typeof e=="object"?e.type==="text"?oy(e.value):!1:oy(e)}function oy(e){return e.replace(AC,"")===""}class Co{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}Co.prototype.normal={};Co.prototype.property={};Co.prototype.space=void 0;function W_(e,t){const i={},a={};for(const s of e)Object.assign(i,s.property),Object.assign(a,s.normal);return new Co(i,a,t)}function zm(e){return e.toLowerCase()}class Vn{constructor(t,i){this.attribute=i,this.property=t}}Vn.prototype.attribute="";Vn.prototype.booleanish=!1;Vn.prototype.boolean=!1;Vn.prototype.commaOrSpaceSeparated=!1;Vn.prototype.commaSeparated=!1;Vn.prototype.defined=!1;Vn.prototype.mustUseProperty=!1;Vn.prototype.number=!1;Vn.prototype.overloadedBoolean=!1;Vn.prototype.property="";Vn.prototype.spaceSeparated=!1;Vn.prototype.space=void 0;let MC=0;const Ge=Ka(),an=Ka(),Im=Ka(),ve=Ka(),Tt=Ka(),Ua=Ka(),ni=Ka();function Ka(){return 2**++MC}const Bm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:an,commaOrSpaceSeparated:ni,commaSeparated:Ua,number:ve,overloadedBoolean:Im,spaceSeparated:Tt},Symbol.toStringTag,{value:"Module"})),mh=Object.keys(Bm);class _p extends Vn{constructor(t,i,a,s){let o=-1;if(super(t,i),cy(this,"space",s),typeof a=="number")for(;++o4&&i.slice(0,4)==="data"&&LC.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(uy,BC);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!uy.test(o)){let c=o.replace(jC,IC);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=_p}return new s(a,t)}function IC(e){return"-"+e.toLowerCase()}function BC(e){return e.charAt(1).toUpperCase()}const UC=W_([J_,OC,nw,iw,rw],"html"),wp=W_([J_,RC,nw,iw,rw],"svg");function HC(e){return e.join(" ").trim()}var Rs={},ph,dy;function $C(){if(dy)return ph;dy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=` -`,h="/",m="*",p="",y="comment",x="declaration";function _(S,w){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];w=w||{};var k=1,E=1;function M(A){var q=A.match(t);q&&(k+=q.length);var O=A.lastIndexOf(f);E=~O?A.length-O:E+A.length}function U(){var A={line:k,column:E};return function(q){return q.position=new R(A),Z(),q}}function R(A){this.start=A,this.end={line:k,column:E},this.source=w.source}R.prototype.content=S;function B(A){var q=new Error(w.source+":"+k+":"+E+": "+A);if(q.reason=A,q.filename=w.source,q.line=k,q.column=E,q.source=S,!w.silent)throw q}function I(A){var q=A.exec(S);if(q){var O=q[0];return M(O),S=S.slice(O.length),q}}function Z(){I(i)}function j(A){var q;for(A=A||[];q=z();)q!==!1&&A.push(q);return A}function z(){var A=U();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var q=2;p!=S.charAt(q)&&(m!=S.charAt(q)||h!=S.charAt(q+1));)++q;if(q+=2,p===S.charAt(q-1))return B("End of comment missing");var O=S.slice(2,q-2);return E+=2,M(O),S=S.slice(q),E+=2,A({type:y,comment:O})}}function V(){var A=U(),q=I(a);if(q){if(z(),!I(s))return B("property missing ':'");var O=I(o),H=A({type:x,property:N(q[0].replace(e,p)),value:O?N(O[0].replace(e,p)):p});return I(c),H}}function G(){var A=[];j(A);for(var q;q=V();)q!==!1&&(A.push(q),j(A));return A}return Z(),G()}function N(S){return S?S.replace(d,p):p}return ph=_,ph}var fy;function qC(){if(fy)return Rs;fy=1;var e=Rs&&Rs.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=i;const t=e($C());function i(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),d=typeof s=="function";return c.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:m}=f;d?s(h,m,f):m&&(o=o||{},o[h]=m)}),o}return Rs}var Xl={},hy;function PC(){if(hy)return Xl;hy=1,Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||i.test(h)||e.test(h)},c=function(h,m){return m.toUpperCase()},d=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),o(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,d):h=h.replace(a,d),h.replace(t,c))};return Xl.camelCase=f,Xl}var Kl,my;function FC(){if(my)return Kl;my=1;var e=Kl&&Kl.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(qC()),i=PC();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,f){d&&f&&(c[(0,i.camelCase)(d,o)]=f)}),c}return a.default=a,Kl=a,Kl}var GC=FC();const VC=ko(GC),aw=sw("end"),Ep=sw("start");function sw(e){return t;function t(i){const a=i&&i.position&&i.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function YC(e){const t=Ep(e),i=aw(e);if(t&&i)return{start:t,end:i}}function so(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?py(e.position):"start"in e||"end"in e?py(e):"line"in e||"column"in e?Um(e):""}function Um(e){return gy(e&&e.line)+":"+gy(e&&e.column)}function py(e){return Um(e&&e.start)+"-"+Um(e&&e.end)}function gy(e){return e&&typeof e=="number"?e:1}class An extends Error{constructor(t,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let s="",o={},c=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o={...i}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const f=a.indexOf(":");f===-1?o.ruleId=a:(o.source=a.slice(0,f),o.ruleId=a.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=so(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}An.prototype.file="";An.prototype.name="";An.prototype.reason="";An.prototype.message="";An.prototype.stack="";An.prototype.column=void 0;An.prototype.line=void 0;An.prototype.ancestors=void 0;An.prototype.cause=void 0;An.prototype.fatal=void 0;An.prototype.place=void 0;An.prototype.ruleId=void 0;An.prototype.source=void 0;const Np={}.hasOwnProperty,XC=new Map,KC=/[A-Z]/g,ZC=new Set(["table","tbody","thead","tfoot","tr"]),QC=new Set(["td","th"]),lw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function WC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=sM(i,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=aM(i,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?wp:UC,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=ow(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function ow(e,t,i){if(t.type==="element")return JC(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return eM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nM(e,t,i);if(t.type==="mdxjsEsm")return tM(e,t);if(t.type==="root")return iM(e,t,i);if(t.type==="text")return rM(e,t)}function JC(e,t,i){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=wp,e.schema=s),e.ancestors.push(t);const o=uw(e,t.tagName,!1),c=lM(e,t);let d=kp(e,t);return ZC.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!CC(f):!0})),cw(e,c,o,t),Sp(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,i)}function eM(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}mo(e,t.position)}function tM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mo(e,t.position)}function nM(e,t,i){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=wp,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:uw(e,t.name,!0),c=oM(e,t),d=kp(e,t);return cw(e,c,o,t),Sp(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,i)}function iM(e,t,i){const a={};return Sp(a,kp(e,t)),e.create(t,e.Fragment,a,i)}function rM(e,t){return t.value}function cw(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function Sp(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function aM(e,t,i){return a;function a(s,o,c,d){const h=Array.isArray(c.children)?i:t;return d?h(o,c,d):h(o,c)}}function sM(e,t){return i;function i(a,s,o,c){const d=Array.isArray(o.children),f=Ep(a);return t(s,o,c,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function lM(e,t){const i={};let a,s;for(s in t.properties)if(s!=="children"&&Np.call(t.properties,s)){const o=cM(e,s,t.properties[s]);if(o){const[c,d]=o;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&QC.has(t.tagName)?a=d:i[c]=d}}if(a){const o=i.style||(i.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function oM(e,t){const i={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(i,e.evaluater.evaluateExpression(d.argument))}else mo(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else mo(e,t.position);else o=a.value===null?!0:a.value;i[s]=o}return i}function kp(e,t){const i=[];let a=-1;const s=e.passKeys?new Map:XC;for(;++as?0:s+t:t=t>s?s:t,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(t,i),e.splice(...c);else for(i&&e.splice(t,i);o0?(ri(e,e.length,0,t),e):t}const yy={}.hasOwnProperty;function fw(e){const t={};let i=-1;for(;++i13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Ri(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jn=da(/[A-Za-z]/),Tn=da(/[\dA-Za-z]/),xM=da(/[#-'*+\--9=?A-Z^-~]/);function Eu(e){return e!==null&&(e<32||e===127)}const Hm=da(/\d/),yM=da(/[\dA-Fa-f]/),vM=da(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function At(e){return e!==null&&(e<0||e===32)}function tt(e){return e===-2||e===-1||e===32}const $u=da(new RegExp("\\p{P}|\\p{S}","u")),qa=da(/\s/);function da(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function tl(e){const t=[];let i=-1,a=0,s=0;for(;++i55295&&o<57344){const d=e.charCodeAt(i+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,i),encodeURIComponent(c)),a=i+s+1,c=""),s&&(i+=s,s=0)}return t.join("")+e.slice(a)}function ot(e,t,i,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(f){return tt(f)?(e.enter(i),d(f)):t(f)}function d(f){return tt(f)&&o++c))return;const B=t.events.length;let I=B,Z,j;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(Z){j=t.events[I][1].end;break}Z=!0}for(w(a),R=B;RE;){const U=i[M];t.containerState=U[1],U[0].exit.call(t,e)}i.length=E}function k(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function SM(e,t,i){return ot(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vs(e){if(e===null||At(e)||qa(e))return 1;if($u(e))return 2}function qu(e,t,i){const a=[];let s=-1;for(;++s1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const p={...e[a][1].end},y={...e[i][1].start};_y(p,-f),_y(y,f),c={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:y},o={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},s={type:f>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[i][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=gi(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=gi(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),h=gi(h,qu(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),h=gi(h,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[i][1].end.offset-e[i][1].start.offset?(m=2,h=gi(h,[["enter",e[i][1],t],["exit",e[i][1],t]])):m=0,ri(e,a-1,i-a+3,h),i=a+h.length-m-2;break}}for(i=-1;++i0&&tt(R)?ot(e,k,"linePrefix",o+1)(R):k(R)}function k(R){return R===null||Be(R)?e.check(wy,N,M)(R):(e.enter("codeFlowValue"),E(R))}function E(R){return R===null||Be(R)?(e.exit("codeFlowValue"),k(R)):(e.consume(R),E)}function M(R){return e.exit("codeFenced"),t(R)}function U(R,B,I){let Z=0;return j;function j(q){return R.enter("lineEnding"),R.consume(q),R.exit("lineEnding"),z}function z(q){return R.enter("codeFencedFence"),tt(q)?ot(R,V,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):V(q)}function V(q){return q===d?(R.enter("codeFencedFenceSequence"),G(q)):I(q)}function G(q){return q===d?(Z++,R.consume(q),G):Z>=c?(R.exit("codeFencedFenceSequence"),tt(q)?ot(R,A,"whitespace")(q):A(q)):I(q)}function A(q){return q===null||Be(q)?(R.exit("codeFencedFence"),B(q)):I(q)}}}function IM(e,t,i){const a=this;return s;function s(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}const bh={name:"codeIndented",tokenize:UM},BM={partial:!0,tokenize:HM};function UM(e,t,i){const a=this;return s;function s(h){return e.enter("codeIndented"),ot(e,o,"linePrefix",5)(h)}function o(h){const m=a.events[a.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?f(h):Be(h)?e.attempt(BM,c,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Be(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function HM(e,t,i){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?i(c):Be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):ot(e,o,"linePrefix",5)(c)}function o(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Be(c)?s(c):i(c)}}const $M={name:"codeText",previous:PM,resolve:qM,tokenize:FM};function qM(e){let t=e.length-4,i=3,a,s;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=i;++a=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,i,a){const s=i||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Zl(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Zl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(c):e.interrupt(a.parser.constructs.flow,i,t)(c)}}function xw(e,t,i,a,s,o,c,d,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return p;function p(w){return w===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(w),e.exit(o),y):w===null||w===32||w===41||Eu(w)?i(w):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),N(w))}function y(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===62?(e.exit("chunkString"),e.exit(d),y(w)):w===null||w===60||Be(w)?i(w):(e.consume(w),w===92?_:x)}function _(w){return w===60||w===62||w===92?(e.consume(w),x):x(w)}function N(w){return!m&&(w===null||w===41||At(w))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(w)):m999||x===null||x===91||x===93&&!f||x===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(x):x===93?(e.exit(o),e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):Be(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||Be(x)||d++>999?(e.exit("chunkString"),m(x)):(e.consume(x),f||(f=!tt(x)),x===92?y:p)}function y(x){return x===91||x===92||x===93?(e.consume(x),d++,p):p(x)}}function vw(e,t,i,a,s,o){let c;return d;function d(y){return y===34||y===39||y===40?(e.enter(a),e.enter(s),e.consume(y),e.exit(s),c=y===40?41:y,f):i(y)}function f(y){return y===c?(e.enter(s),e.consume(y),e.exit(s),e.exit(a),t):(e.enter(o),h(y))}function h(y){return y===c?(e.exit(o),f(c)):y===null?i(y):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ot(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===c||y===null||Be(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?p:m)}function p(y){return y===c||y===92?(e.consume(y),m):m(y)}}function lo(e,t){let i;return a;function a(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i=!0,a):tt(s)?ot(e,a,i?"linePrefix":"lineSuffix")(s):t(s)}}const WM={name:"definition",tokenize:eO},JM={partial:!0,tokenize:tO};function eO(e,t,i){const a=this;let s;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return yw.call(a,e,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return s=Ri(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):i(x)}function f(x){return At(x)?lo(e,h)(x):h(x)}function h(x){return xw(e,m,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(JM,p,p)(x)}function p(x){return tt(x)?ot(e,y,"whitespace")(x):y(x)}function y(x){return x===null||Be(x)?(e.exit("definition"),a.parser.defined.push(s),t(x)):i(x)}}function tO(e,t,i){return a;function a(d){return At(d)?lo(e,s)(d):i(d)}function s(d){return vw(e,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return tt(d)?ot(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Be(d)?t(d):i(d)}}const nO={name:"hardBreakEscape",tokenize:iO};function iO(e,t,i){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Be(o)?(e.exit("hardBreakEscape"),t(o)):i(o)}}const rO={name:"headingAtx",resolve:aO,tokenize:sO};function aO(e,t){let i=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),i-2>a&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&e[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},o={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},ri(e,a,i-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function sO(e,t,i){let a=0;return s;function s(m){return e.enter("atxHeading"),o(m)}function o(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&a++<6?(e.consume(m),c):m===null||At(m)?(e.exit("atxHeadingSequence"),d(m)):i(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Be(m)?(e.exit("atxHeading"),t(m)):tt(m)?ot(e,d,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),d(m))}function h(m){return m===null||m===35||At(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const lO=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ny=["pre","script","style","textarea"],oO={concrete:!0,name:"htmlFlow",resolveTo:dO,tokenize:fO},cO={partial:!0,tokenize:mO},uO={partial:!0,tokenize:hO};function dO(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function fO(e,t,i){const a=this;let s,o,c,d,f;return h;function h(D){return m(D)}function m(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),p}function p(D){return D===33?(e.consume(D),y):D===47?(e.consume(D),o=!0,N):D===63?(e.consume(D),s=3,a.interrupt?t:C):jn(D)?(e.consume(D),c=String.fromCharCode(D),S):i(D)}function y(D){return D===45?(e.consume(D),s=2,x):D===91?(e.consume(D),s=5,d=0,_):jn(D)?(e.consume(D),s=4,a.interrupt?t:C):i(D)}function x(D){return D===45?(e.consume(D),a.interrupt?t:C):i(D)}function _(D){const F="CDATA[";return D===F.charCodeAt(d++)?(e.consume(D),d===F.length?a.interrupt?t:V:_):i(D)}function N(D){return jn(D)?(e.consume(D),c=String.fromCharCode(D),S):i(D)}function S(D){if(D===null||D===47||D===62||At(D)){const F=D===47,$=c.toLowerCase();return!F&&!o&&Ny.includes($)?(s=1,a.interrupt?t(D):V(D)):lO.includes(c.toLowerCase())?(s=6,F?(e.consume(D),w):a.interrupt?t(D):V(D)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(D):o?k(D):E(D))}return D===45||Tn(D)?(e.consume(D),c+=String.fromCharCode(D),S):i(D)}function w(D){return D===62?(e.consume(D),a.interrupt?t:V):i(D)}function k(D){return tt(D)?(e.consume(D),k):j(D)}function E(D){return D===47?(e.consume(D),j):D===58||D===95||jn(D)?(e.consume(D),M):tt(D)?(e.consume(D),E):j(D)}function M(D){return D===45||D===46||D===58||D===95||Tn(D)?(e.consume(D),M):U(D)}function U(D){return D===61?(e.consume(D),R):tt(D)?(e.consume(D),U):E(D)}function R(D){return D===null||D===60||D===61||D===62||D===96?i(D):D===34||D===39?(e.consume(D),f=D,B):tt(D)?(e.consume(D),R):I(D)}function B(D){return D===f?(e.consume(D),f=null,Z):D===null||Be(D)?i(D):(e.consume(D),B)}function I(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||At(D)?U(D):(e.consume(D),I)}function Z(D){return D===47||D===62||tt(D)?E(D):i(D)}function j(D){return D===62?(e.consume(D),z):i(D)}function z(D){return D===null||Be(D)?V(D):tt(D)?(e.consume(D),z):i(D)}function V(D){return D===45&&s===2?(e.consume(D),O):D===60&&s===1?(e.consume(D),H):D===62&&s===4?(e.consume(D),L):D===63&&s===3?(e.consume(D),C):D===93&&s===5?(e.consume(D),X):Be(D)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(cO,Y,G)(D)):D===null||Be(D)?(e.exit("htmlFlowData"),G(D)):(e.consume(D),V)}function G(D){return e.check(uO,A,Y)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),q}function q(D){return D===null||Be(D)?G(D):(e.enter("htmlFlowData"),V(D))}function O(D){return D===45?(e.consume(D),C):V(D)}function H(D){return D===47?(e.consume(D),c="",K):V(D)}function K(D){if(D===62){const F=c.toLowerCase();return Ny.includes(F)?(e.consume(D),L):V(D)}return jn(D)&&c.length<8?(e.consume(D),c+=String.fromCharCode(D),K):V(D)}function X(D){return D===93?(e.consume(D),C):V(D)}function C(D){return D===62?(e.consume(D),L):D===45&&s===2?(e.consume(D),C):V(D)}function L(D){return D===null||Be(D)?(e.exit("htmlFlowData"),Y(D)):(e.consume(D),L)}function Y(D){return e.exit("htmlFlow"),t(D)}}function hO(e,t,i){const a=this;return s;function s(c){return Be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):i(c)}function o(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}function mO(e,t,i){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Mo,t,i)}}const pO={name:"htmlText",tokenize:gO};function gO(e,t,i){const a=this;let s,o,c;return d;function d(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),f}function f(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),U):C===63?(e.consume(C),E):jn(C)?(e.consume(C),I):i(C)}function h(C){return C===45?(e.consume(C),m):C===91?(e.consume(C),o=0,_):jn(C)?(e.consume(C),k):i(C)}function m(C){return C===45?(e.consume(C),x):i(C)}function p(C){return C===null?i(C):C===45?(e.consume(C),y):Be(C)?(c=p,H(C)):(e.consume(C),p)}function y(C){return C===45?(e.consume(C),x):p(C)}function x(C){return C===62?O(C):C===45?y(C):p(C)}function _(C){const L="CDATA[";return C===L.charCodeAt(o++)?(e.consume(C),o===L.length?N:_):i(C)}function N(C){return C===null?i(C):C===93?(e.consume(C),S):Be(C)?(c=N,H(C)):(e.consume(C),N)}function S(C){return C===93?(e.consume(C),w):N(C)}function w(C){return C===62?O(C):C===93?(e.consume(C),w):N(C)}function k(C){return C===null||C===62?O(C):Be(C)?(c=k,H(C)):(e.consume(C),k)}function E(C){return C===null?i(C):C===63?(e.consume(C),M):Be(C)?(c=E,H(C)):(e.consume(C),E)}function M(C){return C===62?O(C):E(C)}function U(C){return jn(C)?(e.consume(C),R):i(C)}function R(C){return C===45||Tn(C)?(e.consume(C),R):B(C)}function B(C){return Be(C)?(c=B,H(C)):tt(C)?(e.consume(C),B):O(C)}function I(C){return C===45||Tn(C)?(e.consume(C),I):C===47||C===62||At(C)?Z(C):i(C)}function Z(C){return C===47?(e.consume(C),O):C===58||C===95||jn(C)?(e.consume(C),j):Be(C)?(c=Z,H(C)):tt(C)?(e.consume(C),Z):O(C)}function j(C){return C===45||C===46||C===58||C===95||Tn(C)?(e.consume(C),j):z(C)}function z(C){return C===61?(e.consume(C),V):Be(C)?(c=z,H(C)):tt(C)?(e.consume(C),z):Z(C)}function V(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(e.consume(C),s=C,G):Be(C)?(c=V,H(C)):tt(C)?(e.consume(C),V):(e.consume(C),A)}function G(C){return C===s?(e.consume(C),s=void 0,q):C===null?i(C):Be(C)?(c=G,H(C)):(e.consume(C),G)}function A(C){return C===null||C===34||C===39||C===60||C===61||C===96?i(C):C===47||C===62||At(C)?Z(C):(e.consume(C),A)}function q(C){return C===47||C===62||At(C)?Z(C):i(C)}function O(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):i(C)}function H(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),K}function K(C){return tt(C)?ot(e,X,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):X(C)}function X(C){return e.enter("htmlTextData"),c(C)}}const Cp={name:"labelEnd",resolveAll:vO,resolveTo:_O,tokenize:wO},bO={tokenize:EO},xO={tokenize:NO},yO={tokenize:SO};function vO(e){let t=-1;const i=[];for(;++t=3&&(h===null||Be(h))?(e.exit("thematicBreak"),t(h)):i(h)}function f(h){return h===s?(e.consume(h),a++,f):(e.exit("thematicBreakSequence"),tt(h)?ot(e,d,"whitespace")(h):d(h))}}const Pn={continuation:{tokenize:LO},exit:IO,name:"list",tokenize:jO},RO={partial:!0,tokenize:BO},DO={partial:!0,tokenize:zO};function jO(e,t,i){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(x){const _=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Hm(x)){if(a.containerState.type||(a.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(mu,i,h)(x):h(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return i(x)}function f(x){return Hm(x)&&++c<10?(e.consume(x),f):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):i(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Mo,a.interrupt?i:m,e.attempt(RO,y,p))}function m(x){return a.containerState.initialBlankLine=!0,o++,y(x)}function p(x){return tt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),y):i(x)}function y(x){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function LO(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(Mo,s,o);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,ot(e,t,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!tt(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(DO,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,ot(e,e.attempt(Pn,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function zO(e,t,i){const a=this;return ot(e,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):i(o)}}function IO(e){e.exit(this.containerState.type)}function BO(e,t,i){const a=this;return ot(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!tt(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):i(o)}}const Sy={name:"setextUnderline",resolveTo:UO,tokenize:HO};function UO(e,t){let i=e.length,a,s,o;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){a=i;break}e[i][1].type==="paragraph"&&(s=i)}else e[i][1].type==="content"&&e.splice(i,1),!o&&e[i][1].type==="definition"&&(o=i);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function HO(e,t,i){const a=this;let s;return o;function o(h){let m=a.events.length,p;for(;m--;)if(a.events[m][1].type!=="lineEnding"&&a.events[m][1].type!=="linePrefix"&&a.events[m][1].type!=="content"){p=a.events[m][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||p)?(e.enter("setextHeadingLine"),s=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===s?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),tt(h)?ot(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Be(h)?(e.exit("setextHeadingLine"),t(h)):i(h)}}const $O={tokenize:qO};function qO(e){const t=this,i=e.attempt(Mo,a,e.attempt(this.parser.constructs.flowInitial,s,ot(e,e.attempt(this.parser.constructs.flow,s,e.attempt(YM,s)),"linePrefix")));return i;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const PO={resolveAll:ww()},FO=_w("string"),GO=_w("text");function _w(e){return{resolveAll:ww(e==="text"?VO:void 0),tokenize:t};function t(i){const a=this,s=this.parser.constructs[e],o=i.attempt(s,c,d);return c;function c(m){return h(m)?o(m):d(m)}function d(m){if(m===null){i.consume(m);return}return i.enter("data"),i.consume(m),f}function f(m){return h(m)?(i.exit("data"),o(m)):(i.consume(m),f)}function h(m){if(m===null)return!0;const p=s[m];let y=-1;if(p)for(;++y-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function a5(e,t){let i=-1;const a=[];let s;for(;++i