diff --git a/Formula/omlx.rb b/Formula/omlx.rb index 45d48e6f2..38099af38 100644 --- a/Formula/omlx.rb +++ b/Formula/omlx.rb @@ -1,8 +1,8 @@ class Omlx < Formula desc "LLM inference server optimized for Apple Silicon" homepage "https://github.com/jundot/omlx" - url "https://github.com/jundot/omlx/archive/refs/tags/v0.3.5.tar.gz" - sha256 "d40f7b13a35e944f0c00fd9005e6667bd2b8be083f6cce3396f97a733fe22876" + url "https://github.com/jundot/omlx/archive/refs/tags/v0.3.6.tar.gz" + sha256 "61135fcc60ca7f9b2a9da3d6c06646963a374f9173918d484916933636ab058b" license "Apache-2.0" head "https://github.com/jundot/omlx.git", branch: "main" diff --git a/conftest.py b/conftest.py new file mode 100644 index 000000000..82f0b5ab8 --- /dev/null +++ b/conftest.py @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: Apache-2.0 +""" +Root conftest.py — mock Apple-Silicon-only dependencies so that unit tests +for pure-Python modules (e.g. omlx.mcp.*) can run on Linux CI runners. +""" + +import sys +import types +from unittest.mock import MagicMock + + +def _mock_mlx() -> None: + """Insert MagicMock stubs for mlx and mlx_lm before any imports occur.""" + if "mlx.core" in sys.modules: + # Already importable (macOS with MLX installed) — nothing to do. + try: + import mlx.core # noqa: F401 + return + except ImportError: + pass + + # Build a minimal package tree that satisfies all sub-module imports + # encountered in omlx/scheduler.py and friends. + for pkg_name in ("mlx", "mlx_lm", "mlx_embeddings", "mlx_vlm"): + pkg = types.ModuleType(pkg_name) + pkg.__path__ = [] # mark as package + sys.modules[pkg_name] = pkg + + # Attach commonly referenced sub-modules + _submodules = [ + "mlx.core", + "mlx.nn", + "mlx.nn.layers", + "mlx.optimizers", + "mlx.utils", + "mlx_lm.generate", + "mlx_lm.utils", + "mlx_lm.models", + "mlx_lm.models.base", + "mlx_lm.models.cache", + "mlx_lm.sample_utils", + "mlx_lm.tokenizer_utils", + "mlx_embeddings.core", + "mlx_vlm.utils", + ] + for name in _submodules: + if name not in sys.modules: + sys.modules[name] = MagicMock() + + # Make mlx.core attributes look real enough for isinstance checks + mx = sys.modules["mlx.core"] + mx.array = MagicMock # type: ignore[attr-defined] + + +_mock_mlx() diff --git a/mcp.example.json b/mcp.example.json index 76c326ef5..f6731cfef 100644 --- a/mcp.example.json +++ b/mcp.example.json @@ -19,6 +19,30 @@ "url": "http://localhost:3001/sse", "enabled": false, "timeout": 60 + }, + "notion": { + "_comment": "Notion remote MCP — uses OAuth 2.1 with Dynamic Client Registration (no client_id needed). Run: omlx mcp login notion", + "transport": "streamable-http", + "url": "https://mcp.notion.com/mcp", + "enabled": false, + "timeout": 60, + "auth": { + "type": "oauth2" + } + }, + "notion-oauth-app": { + "_comment": "Notion public OAuth app — for developers with a registered OAuth application (client_id required)", + "transport": "streamable-http", + "url": "https://mcp.notion.com/mcp", + "enabled": false, + "timeout": 60, + "auth": { + "type": "oauth2", + "client_id": "YOUR_NOTION_OAUTH_CLIENT_ID", + "auth_url": "https://api.notion.com/v1/oauth/authorize", + "token_url": "https://api.notion.com/v1/oauth/token", + "scopes": ["read_content", "update_content"] + } } }, "max_tool_calls": 10, diff --git a/omlx/_version.py b/omlx/_version.py index a8d4557d2..d7b30e121 100644 --- a/omlx/_version.py +++ b/omlx/_version.py @@ -1 +1 @@ -__version__ = "0.3.5" +__version__ = "0.3.6" diff --git a/omlx/adapter/gemma4.py b/omlx/adapter/gemma4.py index 17c173332..aa2faee96 100644 --- a/omlx/adapter/gemma4.py +++ b/omlx/adapter/gemma4.py @@ -205,14 +205,15 @@ def extract_gemma4_messages( i += 1 if tool_responses: - processed.append( - { - "role": "assistant", - "content": "", - "tool_responses": tool_responses, - _PRESERVE_BOUNDARY_KEY: True, - } - ) + # Attach tool_responses to the SAME assistant message that + # has tool_calls. The Gemma 4 chat template checks for + # tool_responses on the current message (lines 261-267) + # BEFORE falling back to a forward-scan for role='tool' + # messages (lines 268-302). Putting them on a separate + # assistant message causes both paths to miss, producing a + # corrupt bare <|tool_response> tag and making the model + # loop on the same tool call. + out_msg["tool_responses"] = tool_responses continue # All other roles (user, system) diff --git a/omlx/admin/accuracy_benchmark.py b/omlx/admin/accuracy_benchmark.py index 755fca07e..74eb7fcd2 100644 --- a/omlx/admin/accuracy_benchmark.py +++ b/omlx/admin/accuracy_benchmark.py @@ -33,9 +33,10 @@ _engine_pool_ref: Any = None VALID_BENCHMARKS = [ - "mmlu", "kmmlu", "cmmlu", "jmmlu", + "mmlu", "mmlu_pro", "kmmlu", "cmmlu", "jmmlu", "hellaswag", "truthfulqa", "arc_challenge", "winogrande", - "gsm8k", "humaneval", "mbpp", "livecodebench", + "gsm8k", "mathqa", "humaneval", "mbpp", "livecodebench", + "bbq", "safetybench", ] @@ -440,6 +441,7 @@ async def on_progress(current: int, total: int) -> None: "predicted": qr.predicted, "question": qr.question_text, "raw_response": qr.raw_response, + "category": qr.category, "time_s": round(qr.time_seconds, 3), } for qr in result.question_results diff --git a/omlx/admin/i18n/en.json b/omlx/admin/i18n/en.json index 8b3b79a53..ec91f89e1 100644 --- a/omlx/admin/i18n/en.json +++ b/omlx/admin/i18n/en.json @@ -196,6 +196,8 @@ "models.oq.cancel_tooltip": "Cancel quantization", "models.oq.remove_tooltip": "Remove from list", "models.oq.advanced_settings": "Advanced Settings", + "models.oq.dtype_label": "Non-quant weight dtype", + "models.oq.dtype_help": "float16 gives ~20% faster prefill on M1/M2 Apple Silicon (native fp16). bfloat16 is safer on M3/M4 and for numerical stability. Output name appends '-fp16' when float16 is selected.", "models.uploader.section_label": "Hub Upload", "models.uploader.heading": "Upload oQ Models", "models.uploader.description": "Upload your locally quantized oQ models to HuggingFace Hub.", @@ -428,6 +430,26 @@ "modal.model_settings.cancel": "Cancel", "modal.model_settings.save": "Save", "modal.model_settings.saving": "Saving...", + "modal.model_settings.profiles.section_label": "Profiles", + "modal.model_settings.profiles.templates_row": "Templates (global)", + "modal.model_settings.profiles.profiles_row": "Profiles (this model)", + "modal.model_settings.profiles.new_template": "+ New template", + "modal.model_settings.profiles.new_profile": "+ New profile", + "modal.model_settings.profiles.name_label": "Name", + "modal.model_settings.profiles.name_placeholder": "ID e.g. coding-v1", + "modal.model_settings.profiles.display_name_label": "Display name", + "modal.model_settings.profiles.description_label": "Description (optional)", + "modal.model_settings.profiles.also_as_template": "Also save as global template", + "modal.model_settings.profiles.save": "Save", + "modal.model_settings.profiles.cancel": "Cancel", + "modal.model_settings.profiles.update_from_form": "Update to current form values", + "modal.model_settings.profiles.resync_template": "Re-sync from template", + "modal.model_settings.profiles.delete": "Delete", + "modal.model_settings.profiles.delete_confirm": "Delete this profile?", + "modal.model_settings.profiles.drift_hint": "Form has unsaved changes vs. profile", + "modal.model_settings.profiles.custom_label": "custom", + "modal.model_settings.profiles.invalid_name": "Name must be lowercase letters, digits, underscore, or dash (1-32 chars)", + "models.list.profile_chip": "Profile", "logs.section_label": "Logs", "logs.heading": "Server Logs", "logs.description": "View real-time server logs with auto-refresh.", @@ -589,6 +611,8 @@ "chat.error.invalid_image_type": "Please select an image file", "chat.error.image_too_large": "Image size must be less than 10MB", "chat.error.image_load_failed": "Failed to load image. Please try again.", + "chat.tools_enabled": "Tools enabled", + "chat.tools_disabled": "Tools disabled", "js.error.required_fields": "Required fields cannot be empty: {fields}", "js.error.api_key_min_length": "API key must be at least 4 characters", "js.error.api_key_no_whitespace": "API key must not contain whitespace", diff --git a/omlx/admin/i18n/ja.json b/omlx/admin/i18n/ja.json index d2f10f22c..ead13beea 100644 --- a/omlx/admin/i18n/ja.json +++ b/omlx/admin/i18n/ja.json @@ -196,6 +196,8 @@ "models.oq.cancel_tooltip": "量子化をキャンセル", "models.oq.remove_tooltip": "リストから削除", "models.oq.advanced_settings": "詳細設定", + "models.oq.dtype_label": "Non-quant weight dtype", + "models.oq.dtype_help": "float16 gives ~20% faster prefill on M1/M2 Apple Silicon (native fp16). bfloat16 is safer on M3/M4 and for numerical stability. Output name appends '-fp16' when float16 is selected.", "models.uploader.section_label": "Hub Upload", "models.uploader.heading": "Upload oQ Models", "models.uploader.description": "Upload your locally quantized oQ models to HuggingFace Hub.", @@ -428,6 +430,26 @@ "modal.model_settings.cancel": "キャンセル", "modal.model_settings.save": "保存", "modal.model_settings.saving": "保存中...", + "modal.model_settings.profiles.section_label": "プロファイル", + "modal.model_settings.profiles.templates_row": "テンプレート(グローバル)", + "modal.model_settings.profiles.profiles_row": "プロファイル(このモデル)", + "modal.model_settings.profiles.new_template": "+ 新規テンプレート", + "modal.model_settings.profiles.new_profile": "+ 新規プロファイル", + "modal.model_settings.profiles.name_label": "名前", + "modal.model_settings.profiles.name_placeholder": "ID 例: coding-v1", + "modal.model_settings.profiles.display_name_label": "表示名", + "modal.model_settings.profiles.description_label": "説明(任意)", + "modal.model_settings.profiles.also_as_template": "グローバルテンプレートとしても保存", + "modal.model_settings.profiles.save": "保存", + "modal.model_settings.profiles.cancel": "キャンセル", + "modal.model_settings.profiles.update_from_form": "現在のフォーム値で更新", + "modal.model_settings.profiles.resync_template": "テンプレートから再同期", + "modal.model_settings.profiles.delete": "削除", + "modal.model_settings.profiles.delete_confirm": "このプロファイルを削除しますか?", + "modal.model_settings.profiles.drift_hint": "フォームにプロファイルと異なる未保存の変更があります", + "modal.model_settings.profiles.custom_label": "カスタム", + "modal.model_settings.profiles.invalid_name": "名前は小文字・数字・アンダースコア・ハイフンのみ(1-32 文字)", + "models.list.profile_chip": "プロファイル", "logs.section_label": "ログ", "logs.heading": "サーバーログ", "logs.description": "自動更新でリアルタイムのサーバーログを確認します。", diff --git a/omlx/admin/i18n/ko.json b/omlx/admin/i18n/ko.json index f4326ee5f..26265e415 100644 --- a/omlx/admin/i18n/ko.json +++ b/omlx/admin/i18n/ko.json @@ -196,6 +196,8 @@ "models.oq.cancel_tooltip": "양자화 취소", "models.oq.remove_tooltip": "목록에서 제거", "models.oq.advanced_settings": "고급 설정", + "models.oq.dtype_label": "Non-quant weight dtype", + "models.oq.dtype_help": "float16 gives ~20% faster prefill on M1/M2 Apple Silicon (native fp16). bfloat16 is safer on M3/M4 and for numerical stability. Output name appends '-fp16' when float16 is selected.", "models.uploader.section_label": "Hub Upload", "models.uploader.heading": "Upload oQ Models", "models.uploader.description": "Upload your locally quantized oQ models to HuggingFace Hub.", @@ -428,6 +430,26 @@ "modal.model_settings.cancel": "취소", "modal.model_settings.save": "저장", "modal.model_settings.saving": "저장 중...", + "modal.model_settings.profiles.section_label": "프로필", + "modal.model_settings.profiles.templates_row": "템플릿 (전역)", + "modal.model_settings.profiles.profiles_row": "프로필 (이 모델)", + "modal.model_settings.profiles.new_template": "+ 새 템플릿", + "modal.model_settings.profiles.new_profile": "+ 새 프로필", + "modal.model_settings.profiles.name_label": "이름", + "modal.model_settings.profiles.name_placeholder": "ID 예: coding-v1", + "modal.model_settings.profiles.display_name_label": "표시 이름", + "modal.model_settings.profiles.description_label": "설명 (선택)", + "modal.model_settings.profiles.also_as_template": "전역 템플릿으로도 저장", + "modal.model_settings.profiles.save": "저장", + "modal.model_settings.profiles.cancel": "취소", + "modal.model_settings.profiles.update_from_form": "현재 폼 값으로 업데이트", + "modal.model_settings.profiles.resync_template": "템플릿에서 다시 동기화", + "modal.model_settings.profiles.delete": "삭제", + "modal.model_settings.profiles.delete_confirm": "이 프로필을 삭제하시겠습니까?", + "modal.model_settings.profiles.drift_hint": "폼에 프로필과 다른 저장되지 않은 변경사항이 있습니다", + "modal.model_settings.profiles.custom_label": "사용자 지정", + "modal.model_settings.profiles.invalid_name": "이름은 소문자, 숫자, 밑줄, 하이픈만 허용 (1-32자)", + "models.list.profile_chip": "프로필", "logs.section_label": "로그", "logs.heading": "서버 로그", "logs.description": "실시간 서버 로그를 자동 새로고침으로 확인합니다.", diff --git a/omlx/admin/i18n/zh-TW.json b/omlx/admin/i18n/zh-TW.json index 7911283f3..bc1494091 100644 --- a/omlx/admin/i18n/zh-TW.json +++ b/omlx/admin/i18n/zh-TW.json @@ -196,6 +196,8 @@ "models.oq.cancel_tooltip": "取消量化", "models.oq.remove_tooltip": "從列表中移除", "models.oq.advanced_settings": "進階設定", + "models.oq.dtype_label": "Non-quant weight dtype", + "models.oq.dtype_help": "float16 gives ~20% faster prefill on M1/M2 Apple Silicon (native fp16). bfloat16 is safer on M3/M4 and for numerical stability. Output name appends '-fp16' when float16 is selected.", "models.uploader.section_label": "Hub Upload", "models.uploader.heading": "Upload oQ Models", "models.uploader.description": "Upload your locally quantized oQ models to HuggingFace Hub.", @@ -428,6 +430,26 @@ "modal.model_settings.cancel": "取消", "modal.model_settings.save": "儲存", "modal.model_settings.saving": "儲存中...", + "modal.model_settings.profiles.section_label": "設定檔", + "modal.model_settings.profiles.templates_row": "範本(全域)", + "modal.model_settings.profiles.profiles_row": "設定檔(目前模型)", + "modal.model_settings.profiles.new_template": "+ 新增範本", + "modal.model_settings.profiles.new_profile": "+ 新增設定檔", + "modal.model_settings.profiles.name_label": "名稱", + "modal.model_settings.profiles.name_placeholder": "ID,例如 coding-v1", + "modal.model_settings.profiles.display_name_label": "顯示名稱", + "modal.model_settings.profiles.description_label": "說明(選填)", + "modal.model_settings.profiles.also_as_template": "同時儲存為全域範本", + "modal.model_settings.profiles.save": "儲存", + "modal.model_settings.profiles.cancel": "取消", + "modal.model_settings.profiles.update_from_form": "更新為目前表單值", + "modal.model_settings.profiles.resync_template": "從範本重新同步", + "modal.model_settings.profiles.delete": "刪除", + "modal.model_settings.profiles.delete_confirm": "刪除此設定檔?", + "modal.model_settings.profiles.drift_hint": "表單相對設定檔有未儲存的變動", + "modal.model_settings.profiles.custom_label": "自訂", + "modal.model_settings.profiles.invalid_name": "名稱僅允許小寫字母、數字、底線、連字號(1-32 字元)", + "models.list.profile_chip": "設定檔", "logs.section_label": "日誌", "logs.heading": "伺服器 Logs", "logs.description": "檢視即時伺服器 Logs,支援自動重新整理。", diff --git a/omlx/admin/i18n/zh.json b/omlx/admin/i18n/zh.json index 66356782e..748cb0956 100644 --- a/omlx/admin/i18n/zh.json +++ b/omlx/admin/i18n/zh.json @@ -196,6 +196,8 @@ "models.oq.cancel_tooltip": "取消量化", "models.oq.remove_tooltip": "从列表中移除", "models.oq.advanced_settings": "高级设置", + "models.oq.dtype_label": "Non-quant weight dtype", + "models.oq.dtype_help": "float16 gives ~20% faster prefill on M1/M2 Apple Silicon (native fp16). bfloat16 is safer on M3/M4 and for numerical stability. Output name appends '-fp16' when float16 is selected.", "models.uploader.section_label": "Hub Upload", "models.uploader.heading": "Upload oQ Models", "models.uploader.description": "Upload your locally quantized oQ models to HuggingFace Hub.", @@ -428,6 +430,26 @@ "modal.model_settings.cancel": "取消", "modal.model_settings.save": "保存", "modal.model_settings.saving": "保存中...", + "modal.model_settings.profiles.section_label": "配置档", + "modal.model_settings.profiles.templates_row": "模板(全局)", + "modal.model_settings.profiles.profiles_row": "配置档(当前模型)", + "modal.model_settings.profiles.new_template": "+ 新建模板", + "modal.model_settings.profiles.new_profile": "+ 新建配置档", + "modal.model_settings.profiles.name_label": "名称", + "modal.model_settings.profiles.name_placeholder": "ID,例如 coding-v1", + "modal.model_settings.profiles.display_name_label": "显示名", + "modal.model_settings.profiles.description_label": "描述(可选)", + "modal.model_settings.profiles.also_as_template": "同时保存为全局模板", + "modal.model_settings.profiles.save": "保存", + "modal.model_settings.profiles.cancel": "取消", + "modal.model_settings.profiles.update_from_form": "更新为当前表单值", + "modal.model_settings.profiles.resync_template": "从模板重新同步", + "modal.model_settings.profiles.delete": "删除", + "modal.model_settings.profiles.delete_confirm": "删除此配置档?", + "modal.model_settings.profiles.drift_hint": "表单相对配置档有未保存的改动", + "modal.model_settings.profiles.custom_label": "自定义", + "modal.model_settings.profiles.invalid_name": "名称仅允许小写字母、数字、下划线、短横线(1-32 字符)", + "models.list.profile_chip": "配置档", "logs.section_label": "日志", "logs.heading": "服务器日志", "logs.description": "查看实时服务器日志,支持自动刷新。", diff --git a/omlx/admin/oq_manager.py b/omlx/admin/oq_manager.py index 355e02573..fcf6ebfc9 100644 --- a/omlx/admin/oq_manager.py +++ b/omlx/admin/oq_manager.py @@ -73,6 +73,7 @@ class QuantTask: group_size: int = 64 sensitivity_model_path: str = "" text_only: bool = False + dtype: str = "bfloat16" def to_dict(self) -> dict: """Serialize task to JSON-compatible dict.""" @@ -92,6 +93,7 @@ def to_dict(self) -> dict: "completed_at": self.completed_at, "source_size": self.source_size, "output_size": self.output_size, + "dtype": self.dtype, } @@ -219,12 +221,15 @@ async def start_quantization( group_size: int = 64, sensitivity_model_path: str = "", text_only: bool = False, + dtype: str = "bfloat16", ) -> QuantTask: """Start a quantization job. Args: model_path: Path to source model directory. oq_level: oQ level (2, 3, 4, 6, or 8). + dtype: Target fp dtype for non-quantized weights and quant + scales/biases. "bfloat16" (default) or "float16". Returns: The created QuantTask. @@ -232,19 +237,23 @@ async def start_quantization( Raises: ValueError: On invalid inputs or output conflict. """ - from ..oq import OQ_LEVELS, resolve_output_name + from ..oq import OQ_DTYPES, OQ_LEVELS, resolve_output_name if oq_level not in OQ_LEVELS: raise ValueError( f"Invalid oQ level {oq_level}. Must be one of {sorted(OQ_LEVELS)}" ) + if dtype not in OQ_DTYPES: + raise ValueError( + f"Invalid dtype {dtype!r}. Must be one of {OQ_DTYPES}" + ) source = Path(model_path) if not source.exists() or not (source / "config.json").exists(): raise ValueError(f"Model not found: {model_path}") model_name = source.name - output_name = resolve_output_name(model_name, oq_level) + output_name = resolve_output_name(model_name, oq_level, dtype) output_path = self._output_dir / output_name if output_path.exists(): @@ -253,16 +262,17 @@ async def start_quantization( "Delete it first via the Manager tab." ) - # Check for duplicate active tasks + # Check for duplicate active tasks (same level + dtype combo) for task in self._tasks.values(): if ( task.model_path == model_path and task.oq_level == oq_level + and task.dtype == dtype and task.status in _ACTIVE_STATUSES ): raise ValueError( f"Quantization for '{model_name}' at oQ{oq_level:g} " - "is already in progress" + f"({dtype}) is already in progress" ) source_size = sum( @@ -283,6 +293,7 @@ async def start_quantization( group_size=group_size, sensitivity_model_path=sensitivity_model_path, text_only=text_only, + dtype=dtype, ) self._tasks[task_id] = task @@ -438,6 +449,7 @@ def _progress_cb(phase: str, pct: float) -> None: None, # target_bpw None, # hard_cap_bpw task.sensitivity_model_path, + task.dtype, ) if task_id in self._cancelled: diff --git a/omlx/admin/routes.py b/omlx/admin/routes.py index e697c3aa0..374a7b005 100644 --- a/omlx/admin/routes.py +++ b/omlx/admin/routes.py @@ -25,7 +25,7 @@ from fastapi import APIRouter, Depends, HTTPException, Request, Response from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, RedirectResponse from fastapi.templating import Jinja2Templates -from pydantic import BaseModel +from pydantic import BaseModel, Field from .auth import ( REMEMBER_ME_MAX_AGE, @@ -127,6 +127,42 @@ class ModelSettingsRequest(BaseModel): is_default: Optional[bool] = None +class CreateProfileRequest(BaseModel): + """Request body for creating a per-model profile.""" + name: str + display_name: str + description: Optional[str] = None + settings: Dict[str, Any] = Field(default_factory=dict) + also_save_as_template: bool = False + source_template: Optional[str] = None + + +class UpdateProfileRequest(BaseModel): + """Request body for updating/renaming a per-model profile.""" + new_name: Optional[str] = None + display_name: Optional[str] = None + description: Optional[str] = None + settings: Optional[Dict[str, Any]] = None + source_template: Optional[str] = None + also_save_as_template: bool = False + + +class CreateTemplateRequest(BaseModel): + """Request body for creating a global template.""" + name: str + display_name: str + description: Optional[str] = None + settings: Dict[str, Any] = Field(default_factory=dict) + + +class UpdateTemplateRequest(BaseModel): + """Request body for updating/renaming a global template.""" + new_name: Optional[str] = None + display_name: Optional[str] = None + description: Optional[str] = None + settings: Optional[Dict[str, Any]] = None + + class GlobalSettingsRequest(BaseModel): """Request model for updating global server settings.""" @@ -236,6 +272,7 @@ class OQStartRequest(BaseModel): group_size: int = 64 sensitivity_model_path: str = "" text_only: bool = False + dtype: str = "bfloat16" class HFUploadRequest(BaseModel): @@ -1347,6 +1384,7 @@ async def list_models(is_admin: bool = Depends(require_admin)): "model_type": model_info.get("model_type", "llm"), "config_model_type": model_info.get("config_model_type", ""), "thinking_default": model_info.get("thinking_default"), + "preserve_thinking_default": model_info.get("preserve_thinking_default"), "last_access": model_info.get("last_access"), } @@ -1386,6 +1424,7 @@ async def list_models(is_admin: bool = Depends(require_admin)): "is_default": settings.is_default, "display_name": settings.display_name, "description": settings.description, + "active_profile_name": settings.active_profile_name, } models.append(model_data) @@ -1621,6 +1660,22 @@ async def update_model_settings( if request.is_default and server_state: server_state.default_model = model_id + # If an active profile was set, clear it when the user's save diverges + # from the profile's stored values. + if current_settings.active_profile_name: + profile = settings_manager.get_profile( + model_id, current_settings.active_profile_name + ) + if profile is None: + current_settings.active_profile_name = None + else: + profile_settings = profile.get("settings", {}) or {} + candidate = current_settings.to_dict() + for key, expected in profile_settings.items(): + if candidate.get(key) != expected: + current_settings.active_profile_name = None + break + # Persist settings settings_manager.set_settings(model_id, current_settings) @@ -1650,6 +1705,221 @@ async def update_model_settings( } +# ============================================================================= +# Profile & Template endpoints +# ============================================================================= + + +def _require_settings_manager(): + mgr = _get_settings_manager() + if mgr is None: + raise HTTPException(status_code=503, detail="Server not initialized") + return mgr + + +def _require_model(model_id: str): + pool = _get_engine_pool() + if pool is None: + raise HTTPException(status_code=503, detail="Engine pool not initialized") + entry = pool.get_entry(model_id) + if entry is None: + raise HTTPException(status_code=404, detail=f"Model not found: {model_id}") + return entry + + +@router.get("/api/models/{model_id}/profiles") +async def list_model_profiles( + model_id: str, + is_admin: bool = Depends(require_admin), +): + mgr = _require_settings_manager() + _require_model(model_id) + return {"profiles": mgr.list_profiles(model_id)} + + +@router.post("/api/models/{model_id}/profiles") +async def create_model_profile( + model_id: str, + request: CreateProfileRequest, + is_admin: bool = Depends(require_admin), +): + from ..model_profiles import InvalidProfileNameError, filter_universal_fields + + mgr = _require_settings_manager() + _require_model(model_id) + try: + profile = mgr.save_profile( + model_id=model_id, + name=request.name, + display_name=request.display_name, + description=request.description, + settings=request.settings or {}, + source_template=request.source_template, + ) + except InvalidProfileNameError as e: + raise HTTPException(status_code=400, detail=str(e)) + except ValueError as e: + raise HTTPException(status_code=409, detail=str(e)) + + if request.also_save_as_template: + try: + mgr.upsert_template( + name=request.name, + display_name=request.display_name, + description=request.description, + settings=filter_universal_fields(request.settings or {}), + ) + except InvalidProfileNameError as e: + raise HTTPException(status_code=400, detail=str(e)) + return {"profile": profile} + + +@router.put("/api/models/{model_id}/profiles/{name}") +async def update_model_profile( + model_id: str, + name: str, + request: UpdateProfileRequest, + is_admin: bool = Depends(require_admin), +): + from ..model_profiles import InvalidProfileNameError, filter_universal_fields + + mgr = _require_settings_manager() + _require_model(model_id) + try: + updated = mgr.update_profile( + model_id=model_id, + name=name, + new_name=request.new_name, + display_name=request.display_name, + description=request.description, + settings=request.settings, + source_template=request.source_template, + ) + except InvalidProfileNameError as e: + raise HTTPException(status_code=400, detail=str(e)) + except ValueError as e: + raise HTTPException(status_code=409, detail=str(e)) + if updated is None: + raise HTTPException(status_code=404, detail=f"Profile not found: {name}") + + if request.also_save_as_template and request.settings is not None: + try: + mgr.upsert_template( + name=updated["name"], + display_name=updated["display_name"], + description=updated.get("description"), + settings=filter_universal_fields(request.settings), + ) + except InvalidProfileNameError as e: + raise HTTPException(status_code=400, detail=str(e)) + return {"profile": updated} + + +@router.delete("/api/models/{model_id}/profiles/{name}") +async def delete_model_profile( + model_id: str, + name: str, + is_admin: bool = Depends(require_admin), +): + mgr = _require_settings_manager() + _require_model(model_id) + if not mgr.delete_profile(model_id, name): + raise HTTPException(status_code=404, detail=f"Profile not found: {name}") + return {"deleted": True, "name": name} + + +@router.post("/api/models/{model_id}/profiles/{name}/apply") +async def apply_model_profile( + model_id: str, + name: str, + is_admin: bool = Depends(require_admin), +): + mgr = _require_settings_manager() + _require_model(model_id) + applied = mgr.apply_profile(model_id, name) + if applied is None: + raise HTTPException(status_code=404, detail=f"Profile not found: {name}") + return {"model_id": model_id, "settings": applied.to_dict()} + + +@router.get("/api/profile-fields") +async def get_profile_fields(is_admin: bool = Depends(require_admin)): + from ..model_profiles import ( + UNIVERSAL_PROFILE_FIELDS, + MODEL_SPECIFIC_PROFILE_FIELDS, + ) + + return { + "universal": list(UNIVERSAL_PROFILE_FIELDS), + "model_specific": list(MODEL_SPECIFIC_PROFILE_FIELDS), + } + + +@router.get("/api/profile-templates") +async def list_templates(is_admin: bool = Depends(require_admin)): + mgr = _require_settings_manager() + return {"templates": mgr.list_templates()} + + +@router.post("/api/profile-templates") +async def create_template( + request: CreateTemplateRequest, + is_admin: bool = Depends(require_admin), +): + from ..model_profiles import InvalidProfileNameError + + mgr = _require_settings_manager() + try: + tmpl = mgr.save_template( + name=request.name, + display_name=request.display_name, + description=request.description, + settings=request.settings or {}, + ) + except InvalidProfileNameError as e: + raise HTTPException(status_code=400, detail=str(e)) + except ValueError as e: + raise HTTPException(status_code=409, detail=str(e)) + return {"template": tmpl} + + +@router.put("/api/profile-templates/{name}") +async def update_template( + name: str, + request: UpdateTemplateRequest, + is_admin: bool = Depends(require_admin), +): + from ..model_profiles import InvalidProfileNameError + + mgr = _require_settings_manager() + try: + updated = mgr.update_template( + name=name, + new_name=request.new_name, + display_name=request.display_name, + description=request.description, + settings=request.settings, + ) + except InvalidProfileNameError as e: + raise HTTPException(status_code=400, detail=str(e)) + except ValueError as e: + raise HTTPException(status_code=409, detail=str(e)) + if updated is None: + raise HTTPException(status_code=404, detail=f"Template not found: {name}") + return {"template": updated} + + +@router.delete("/api/profile-templates/{name}") +async def delete_template( + name: str, + is_admin: bool = Depends(require_admin), +): + mgr = _require_settings_manager() + if not mgr.delete_template(name): + raise HTTPException(status_code=404, detail=f"Template not found: {name}") + return {"deleted": True, "name": name} + + @router.get("/api/models/{model_id}/generation_config") async def get_generation_config( model_id: str, @@ -4130,6 +4400,11 @@ async def start_oq_quantization( status_code=400, detail="Invalid oQ level. Must be 2, 3, 4, 5, 6, or 8", ) + if request.dtype not in ("bfloat16", "float16"): + raise HTTPException( + status_code=400, + detail="Invalid dtype. Must be 'bfloat16' or 'float16'", + ) try: task = await _oq_manager.start_quantization( model_path=request.model_path, @@ -4137,6 +4412,7 @@ async def start_oq_quantization( group_size=request.group_size, sensitivity_model_path=request.sensitivity_model_path, text_only=request.text_only, + dtype=request.dtype, ) return {"success": True, "task": task.to_dict()} except ValueError as e: @@ -4288,3 +4564,389 @@ async def remove_upload_task( status_code=404, detail="Task not found or still active" ) return {"success": True} + + +# ============================================================================= +# MCP Server Management Routes +# ============================================================================= + +# In-memory store for pending OAuth PKCE sessions, keyed by state parameter +_mcp_oauth_sessions: Dict[str, Dict] = {} + + +def _get_mcp_config_path() -> Optional[Path]: + """Return the MCP config file path currently in use (or None).""" + from ..mcp.config import _find_config_file + try: + return _find_config_file() + except Exception: + return None + + +def _read_mcp_config_file() -> Optional[Dict]: + """Read and parse the MCP config JSON file.""" + path = _get_mcp_config_path() + if path is None: + return None + try: + return json.loads(Path(path).read_text()) + except Exception: + return None + + +def _write_mcp_config_file(config_data: Dict) -> Path: + """Write config_data to the MCP config file, creating it if needed.""" + path = _get_mcp_config_path() + if path is None: + path = Path("./mcp.json") + Path(path).write_text(json.dumps(config_data, indent=2)) + return path + + +def _mcp_oauth_result_html(success: bool, message: str) -> str: + icon = "✓" if success else "✗" + color = "#16a34a" if success else "#dc2626" + bg = "#f0fdf4" if success else "#fef2f2" + js_success = "true" if success else "false" + return f""" + + +oMLX – MCP Authentication + + + +
+
{icon}
+

{'Authentication Complete' if success else 'Authentication Failed'}

+

{message}

+
+ + +""" + + +@router.get("/api/mcp/servers") +async def get_mcp_servers(is_admin: bool = Depends(require_admin)): + """List all configured MCP servers with connection status and auth info.""" + from ..server import _server_state + from ..mcp.oauth import MCPOAuthManager + + if _server_state.mcp_manager is None: + return {"servers": [], "config_path": None, "available": False} + + oauth_manager = MCPOAuthManager() + statuses = _server_state.mcp_manager.get_server_status() + + result = [] + for status in statuses: + info = status.to_dict() + cfg = _server_state.mcp_manager.config.servers.get(status.name) + if cfg: + info["enabled"] = cfg.enabled + info["has_auth"] = cfg.auth is not None + if cfg.auth: + info["auth_info"] = oauth_manager.get_token_info(status.name) + # Include tool list for connected servers + client = _server_state.mcp_manager._clients.get(status.name) + if client and client.tools: + info["tools"] = [ + { + "name": t.name, + "description": t.description, + "param_count": len((t.input_schema or {}).get("properties", {})), + } + for t in client.tools + ] + else: + info["tools"] = [] + result.append(info) + + config_path = _get_mcp_config_path() + return { + "servers": result, + "config_path": str(config_path) if config_path else None, + "available": True, + "max_tool_calls": _server_state.mcp_manager.config.max_tool_calls, + } + + +@router.post("/api/mcp/servers/{name}/reconnect") +async def reconnect_mcp_server(name: str, is_admin: bool = Depends(require_admin)): + """Reconnect a specific MCP server.""" + from ..server import _server_state + if _server_state.mcp_manager is None: + raise HTTPException(status_code=503, detail="MCP not initialized") + await _server_state.mcp_manager.reconnect(name) + return {"success": True} + + +@router.post("/api/mcp/servers/{name}/authenticate") +async def start_mcp_authenticate(name: str, request: Request, is_admin: bool = Depends(require_admin)): + """Start an OAuth PKCE flow for the given MCP server. + + Returns ``{auth_url}`` that the client should open in a new browser window. + When the OAuth provider redirects back to the callback URL the token is + stored and the popup notifies the opener via postMessage. + """ + from ..server import _server_state + from ..mcp.oauth import ( + _discover_oauth_metadata, + _generate_code_challenge, + _generate_code_verifier, + _register_dynamic_client, + ) + from urllib.parse import urlencode + + if _server_state.mcp_manager is None: + raise HTTPException(status_code=503, detail="MCP not initialized") + + cfg = _server_state.mcp_manager.config.servers.get(name) + if cfg is None: + raise HTTPException(status_code=404, detail=f"Server '{name}' not found") + if cfg.auth is None: + raise HTTPException(status_code=400, detail=f"Server '{name}' has no OAuth configuration") + + auth_config = cfg.auth + auth_url = auth_config.auth_url + token_url = auth_config.token_url + client_id = auth_config.client_id + registered_client_id: Optional[str] = None + + base_url = str(request.base_url).rstrip("/") + redirect_uri = f"{base_url}/admin/api/mcp/oauth/callback" + + if not auth_url or not token_url or not client_id: + if not cfg.url: + raise HTTPException( + status_code=400, + detail="Server has no URL for OAuth metadata discovery. " + "Set auth_url, token_url, and client_id explicitly.", + ) + try: + metadata = await _discover_oauth_metadata(cfg.url) + except Exception as exc: + raise HTTPException(status_code=502, detail=f"OAuth discovery failed: {exc}") + if not auth_url: + auth_url = metadata.get("authorization_endpoint", "") + if not token_url: + token_url = metadata.get("token_endpoint", "") + if not client_id: + # Reuse a previously registered client_id if available (avoid redundant DCR) + from ..mcp.token_store import TokenStore + existing_token = TokenStore(cfg.auth.token_store if cfg.auth else None).load(name) + if existing_token and existing_token.registered_client_id: + client_id = existing_token.registered_client_id + registered_client_id = client_id + else: + reg_endpoint = metadata.get("registration_endpoint") + if not reg_endpoint: + raise HTTPException( + status_code=400, + detail="OAuth server does not advertise a registration_endpoint. " + "Set client_id explicitly in the server auth config.", + ) + try: + client_id = await _register_dynamic_client(reg_endpoint, redirect_uri) + registered_client_id = client_id + except Exception as exc: + raise HTTPException(status_code=502, detail=f"Dynamic Client Registration failed: {exc}") + + code_verifier = _generate_code_verifier() + code_challenge = _generate_code_challenge(code_verifier) + state = secrets.token_urlsafe(16) + + params: Dict[str, str] = { + "response_type": "code", + "client_id": client_id, + "redirect_uri": redirect_uri, + "code_challenge": code_challenge, + "code_challenge_method": "S256", + "state": state, + } + if auth_config.scopes: + params["scope"] = " ".join(auth_config.scopes) + if auth_config.audience: + params["audience"] = auth_config.audience + + _mcp_oauth_sessions[state] = { + "server_name": name, + "code_verifier": code_verifier, + "redirect_uri": redirect_uri, + "token_url": token_url, + "client_id": client_id, + "registered_client_id": registered_client_id, + "created_at": time.time(), + } + + return {"auth_url": f"{auth_url}?{urlencode(params)}"} + + +@router.get("/api/mcp/oauth/callback", response_class=HTMLResponse) +async def mcp_oauth_callback( + request: Request, + code: Optional[str] = None, + state: Optional[str] = None, + error: Optional[str] = None, + error_description: Optional[str] = None, +): + """Public OAuth callback endpoint — no session auth required. + + The OAuth provider redirects the user's browser here after authorization. + """ + import httpx + from ..mcp.token_store import TokenData, TokenStore + + if error: + desc = f" — {error_description}" if error_description else "" + return HTMLResponse(_mcp_oauth_result_html(False, f"OAuth error: {error}{desc}")) + + if not code or not state: + return HTMLResponse(_mcp_oauth_result_html(False, "Missing authorization code or state parameter.")) + + session = _mcp_oauth_sessions.pop(state, None) + if session is None: + return HTMLResponse(_mcp_oauth_result_html(False, "Invalid or expired OAuth session. Please try again.")) + + if time.time() - session["created_at"] > 600: + return HTMLResponse(_mcp_oauth_result_html(False, "OAuth session expired (>10 min). Please try again.")) + + try: + payload = { + "grant_type": "authorization_code", + "client_id": session["client_id"], + "code": code, + "redirect_uri": session["redirect_uri"], + "code_verifier": session["code_verifier"], + } + async with httpx.AsyncClient() as client: + resp = await client.post( + session["token_url"], + data=payload, + headers={"Content-Type": "application/x-www-form-urlencoded"}, + timeout=30.0, + ) + resp.raise_for_status() + token_resp = resp.json() + + expires_in = token_resp.get("expires_in") + token = TokenData( + access_token=token_resp["access_token"], + token_type=token_resp.get("token_type", "Bearer"), + refresh_token=token_resp.get("refresh_token"), + expires_at=(time.time() + expires_in) if expires_in is not None else None, + scope=token_resp.get("scope"), + ) + if session.get("registered_client_id"): + token.registered_client_id = session["registered_client_id"] + if session.get("token_url"): + token.token_url = session["token_url"] + + TokenStore().save(session["server_name"], token) + logger.info("MCP OAuth complete for server '%s'", session["server_name"]) + + from ..server import _server_state + if _server_state.mcp_manager is not None: + asyncio.create_task(_server_state.mcp_manager.reconnect(session["server_name"])) + + return HTMLResponse(_mcp_oauth_result_html(True, "Authenticated successfully. You may close this window.")) + except Exception as exc: + logger.error("MCP OAuth token exchange failed: %s", exc) + return HTMLResponse(_mcp_oauth_result_html(False, f"Token exchange failed: {exc}")) + + +@router.post("/api/mcp/servers/{name}/logout") +async def logout_mcp_server(name: str, is_admin: bool = Depends(require_admin)): + """Remove stored OAuth tokens for the given MCP server.""" + from ..mcp.token_store import TokenStore + TokenStore().delete(name) + return {"success": True} + + +@router.get("/api/mcp/config") +async def get_mcp_config_route(is_admin: bool = Depends(require_admin)): + """Return the raw MCP config JSON and its file path.""" + config_data = _read_mcp_config_file() + path = _get_mcp_config_path() + if config_data is None: + config_data = {"servers": {}, "max_tool_calls": 10, "default_timeout": 30.0} + return {"config": config_data, "path": str(path) if path else None} + + +@router.post("/api/mcp/config") +async def save_mcp_config_route(request: Request, is_admin: bool = Depends(require_admin)): + """Validate and persist the MCP config JSON to disk.""" + from ..mcp.config import validate_config + body = await request.json() + config_data = body.get("config") + if config_data is None: + raise HTTPException(status_code=400, detail="Missing 'config' field") + try: + validate_config(config_data) + except Exception as exc: + raise HTTPException(status_code=400, detail=f"Invalid config: {exc}") + try: + path = _write_mcp_config_file(config_data) + except Exception as exc: + raise HTTPException(status_code=500, detail=f"Could not write config: {exc}") + return {"success": True, "path": str(path)} + + +@router.post("/api/mcp/reload") +async def reload_mcp_config(is_admin: bool = Depends(require_admin)): + """Stop the current MCP manager, reload config from disk, and restart. + + This lets config changes (new servers, edited URLs, etc.) take effect + without restarting the whole server process. + """ + from ..server import _server_state + from ..mcp import MCPClientManager, ToolExecutor, load_mcp_config + + config_path = _get_mcp_config_path() + if config_path is None: + raise HTTPException(status_code=404, detail="No MCP config file found") + + try: + new_config = load_mcp_config(config_path) + except Exception as exc: + raise HTTPException(status_code=400, detail=f"Invalid config: {exc}") + + # Stop old manager gracefully + if _server_state.mcp_manager is not None: + try: + await _server_state.mcp_manager.stop() + except Exception: + pass + _server_state.mcp_manager = None + _server_state.mcp_executor = None + + # Start fresh + try: + _server_state.mcp_manager = MCPClientManager(new_config) + await _server_state.mcp_manager.start() + _server_state.mcp_executor = ToolExecutor(_server_state.mcp_manager) + except Exception as exc: + logger.error("MCP reload failed: %s", exc) + raise HTTPException(status_code=500, detail=f"Failed to start MCP: {exc}") + + tool_count = len(_server_state.mcp_manager.get_all_tools()) + server_count = len(new_config.servers) + logger.info("MCP config reloaded: %d servers, %d tools", server_count, tool_count) + return {"success": True, "servers": server_count, "tools": tool_count} diff --git a/omlx/admin/static/css/dashboard.css b/omlx/admin/static/css/dashboard.css index 2737c8bda..7ba06cc3b 100644 --- a/omlx/admin/static/css/dashboard.css +++ b/omlx/admin/static/css/dashboard.css @@ -230,3 +230,19 @@ .model-card-content hr { border: none; border-top: 1px solid #e5e5e5; margin: 0.75rem 0; } .model-card-content img { max-width: 100%; border-radius: 0.5rem; margin: 0.5rem 0; } .model-card-content h1:first-child { margin-top: 0; } + + /* === MCP tool description markdown === */ + .mcp-tool-desc { font-size: 0.6875rem; line-height: 1.55; color: #737373; } + .mcp-tool-desc p { margin: 0.2rem 0; } + .mcp-tool-desc p:first-child { margin-top: 0; } + .mcp-tool-desc p:last-child { margin-bottom: 0; } + .mcp-tool-desc ul, .mcp-tool-desc ol { padding-left: 1rem; margin: 0.2rem 0; } + .mcp-tool-desc li { margin: 0.1rem 0; } + .mcp-tool-desc code { font-size: 0.6875rem; background: #f5f5f5; padding: 0.1rem 0.3rem; border-radius: 0.2rem; color: #404040; } + .mcp-tool-desc pre { background: #f5f5f5; border-radius: 0.375rem; padding: 0.4rem 0.6rem; overflow-x: auto; margin: 0.25rem 0; } + .mcp-tool-desc pre code { background: none; padding: 0; } + .mcp-tool-desc strong { color: #525252; font-weight: 600; } + .mcp-tool-desc a { color: #2563eb; text-decoration: none; } + .mcp-tool-desc a:hover { text-decoration: underline; } + .mcp-tool-desc h1, .mcp-tool-desc h2, .mcp-tool-desc h3 { font-size: 0.75rem; font-weight: 600; color: #404040; margin: 0.3rem 0 0.15rem; } + .mcp-tool-desc-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } diff --git a/omlx/admin/static/css/tailwind.css b/omlx/admin/static/css/tailwind.css index 63fa78d17..9e354e37e 100644 --- a/omlx/admin/static/css/tailwind.css +++ b/omlx/admin/static/css/tailwind.css @@ -1 +1 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-0\.5{top:-.125rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1\/2{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-3{right:.75rem}.right-full{right:100%}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-1\/4{top:25%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-full{top:100%}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\[1000\]{z-index:1000}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.m-1{margin:.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.-ml-1{margin-left:-.25rem}.-mt-2{margin-top:-.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-11{margin-left:2.75rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-1{height:.25rem;width:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[300px\]{height:300px}.h-\[30px\]{height:30px}.h-\[400px\]{height:400px}.h-\[60px\]{height:60px}.h-full{height:100%}.max-h-32{max-height:8rem}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-\[28rem\]{max-height:28rem}.min-h-0{min-height:0}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[28rem\]{width:28rem}.w-\[30px\]{width:30px}.w-\[600px\]{width:600px}.w-\[60px\]{width:60px}.w-\[800px\]{width:800px}.w-\[90\%\]{width:90%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[360px\]{min-width:360px}.min-w-full{min-width:100%}.max-w-48{max-width:12rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\[120px\]{max-width:120px}.max-w-\[400px\]{max-width:400px}.max-w-\[500px\]{max-width:500px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-2{--tw-translate-y:-0.5rem}.-translate-y-2,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-x-4{--tw-translate-x:1rem}.translate-x-4,.translate-x-5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x:1.25rem}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1{--tw-translate-y:0.25rem}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.animate-fade-in-up{animation:fadeInUp .5s ease-out forwards}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse));margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-neutral-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(245 245 245/var(--tw-divide-opacity,1))}.divide-neutral-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 229 229/var(--tw-divide-opacity,1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity,1))}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.border-line{border-color:var(--border-faint)}.border-line-strong{border-color:var(--border-normal)}.border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.border-white\/30{border-color:hsla(0,0%,100%,.3)}.border-t-neutral-600{--tw-border-opacity:1;border-top-color:rgb(82 82 82/var(--tw-border-opacity,1))}.border-t-neutral-900{--tw-border-opacity:1;border-top-color:rgb(23 23 23/var(--tw-border-opacity,1))}.bg-accent{background-color:var(--btn-primary)}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.bg-amber-400\/20{background-color:rgba(251,191,36,.2)}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-neutral-50\/50{background-color:hsla(0,0%,98%,.5)}.bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.bg-surface{background-color:var(--bg-primary)}.bg-surface-alt{background-color:var(--bg-secondary)}.bg-surface-muted{background-color:var(--bg-tertiary)}.bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/20{background-color:hsla(0,0%,100%,.2)}.bg-white\/80{background-color:hsla(0,0%,100%,.8)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-neutral-100{--tw-gradient-from:#f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,96%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-neutral-50{--tw-gradient-from:#fafafa var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,98%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-1{padding-left:.25rem}.pl-4{padding-left:1rem}.pr-1{padding-right:.25rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Inter,system-ui,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-accent-fg{color:var(--btn-primary-text)}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-danger{color:var(--text-danger)}.text-fg-muted{color:var(--text-muted)}.text-fg-secondary{color:var(--text-secondary)}.text-fg-tertiary{color:var(--text-tertiary)}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-neutral-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(163 163 163/var(--tw-placeholder-opacity,1))}.placeholder-neutral-400::placeholder{--tw-placeholder-opacity:1;color:rgb(163 163 163/var(--tw-placeholder-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur-3xl{--tw-blur:blur(64px)}.blur-3xl,.grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale:grayscale(100%)}.\!invert{--tw-invert:invert(100%)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-md,.backdrop-blur-sm{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.selection\:bg-neutral-900 ::-moz-selection{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.selection\:bg-neutral-900 ::selection{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.selection\:text-white ::-moz-selection{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.selection\:text-white ::selection{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.selection\:bg-neutral-900::-moz-selection{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.selection\:bg-neutral-900::selection{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.selection\:text-white::-moz-selection{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.selection\:text-white::selection{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.last\:border-0:last-child{border-width:0}.last\:border-b-0:last-child{border-bottom-width:0}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.hover\:scale-105:hover,.hover\:scale-\[1\.02\]:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.02\]:hover{--tw-scale-x:1.02;--tw-scale-y:1.02}.hover\:border-neutral-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.hover\:border-neutral-400:hover{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.hover\:bg-accent-hover:hover{background-color:var(--btn-primary-hover)}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.hover\:bg-danger-bg:hover{background-color:var(--bg-danger-hover)}.hover\:bg-neutral-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.hover\:bg-neutral-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-neutral-700:hover{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.hover\:bg-neutral-800:hover{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.hover\:bg-neutral-900:hover{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.hover\:bg-surface-alt:hover{background-color:var(--bg-secondary)}.hover\:bg-surface-muted:hover{background-color:var(--bg-tertiary)}.hover\:text-amber-600:hover{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.hover\:text-amber-700:hover{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-fg:hover{color:var(--text-primary)}.hover\:text-fg-secondary:hover{color:var(--text-secondary)}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-neutral-600:hover{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.hover\:text-neutral-700:hover{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.hover\:text-neutral-800:hover{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.hover\:text-neutral-900:hover{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-line-strong:focus{border-color:var(--border-normal)}.focus\:border-neutral-400:focus{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.focus\:border-neutral-900:focus{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-1:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-black:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity,1))}.focus\:ring-neutral-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(163 163 163/var(--tw-ring-opacity,1))}.focus\:ring-neutral-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(115 115 115/var(--tw-ring-opacity,1))}.focus\:ring-neutral-900:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(23 23 23/var(--tw-ring-opacity,1))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95}.active\:scale-95:active,.active\:scale-\[0\.98\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.98\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98}.disabled\:transform-none:disabled{transform:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-surface-muted:disabled{background-color:var(--bg-tertiary)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width:640px){.sm\:block{display:block}.sm\:flex{display:flex}.sm\:h-\[600px\]{height:600px}.sm\:w-1\/3{width:33.333333%}.sm\:w-36{width:9rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-64{width:16rem}.sm\:flex-shrink-0{flex-shrink:0}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}.sm\:gap-6{gap:1.5rem}.sm\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:rounded-3xl{border-radius:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-10{padding-bottom:2.5rem;padding-top:2.5rem}}@media (min-width:768px){.md\:block{display:block}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:px-12{padding-left:3rem;padding-right:3rem}}@media (min-width:1024px){.lg\:mt-0{margin-top:0}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-2\/5{width:40%}.lg\:w-3\/5{width:60%}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:border-r{border-right-width:1px}.lg\:border-t-0{border-top-width:0}.lg\:pl-6{padding-left:1.5rem}.lg\:pr-6{padding-right:1.5rem}.lg\:pt-0{padding-top:0}}@media (prefers-color-scheme:dark){.dark\:text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.dark\:hover\:text-neutral-300:hover{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}}.\[\&\:\:-webkit-slider-thumb\]\:h-3::-webkit-slider-thumb{height:.75rem}.\[\&\:\:-webkit-slider-thumb\]\:w-3::-webkit-slider-thumb{width:.75rem}.\[\&\:\:-webkit-slider-thumb\]\:cursor-not-allowed::-webkit-slider-thumb{cursor:not-allowed}.\[\&\:\:-webkit-slider-thumb\]\:cursor-pointer::-webkit-slider-thumb{cursor:pointer}.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{-webkit-appearance:none;appearance:none}.\[\&\:\:-webkit-slider-thumb\]\:rounded-full::-webkit-slider-thumb{border-radius:9999px}.\[\&\:\:-webkit-slider-thumb\]\:bg-black::-webkit-slider-thumb{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.\[\&\:\:-webkit-slider-thumb\]\:bg-neutral-300::-webkit-slider-thumb{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.\[\&\:\:-webkit-slider-thumb\]\:shadow-sm::-webkit-slider-thumb{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\[\&\>option\]\:text-neutral-900>option{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))} \ No newline at end of file +*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-0\.5{top:-.125rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1\/2{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-3{right:.75rem}.right-full{right:100%}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-1\/4{top:25%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-full{top:100%}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\[1000\]{z-index:1000}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.m-1{margin:.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-1{margin-left:-.25rem}.-mt-2{margin-top:-.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-11{margin-left:2.75rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-1{width:.25rem;height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[300px\]{height:300px}.h-\[30px\]{height:30px}.h-\[400px\]{height:400px}.h-\[60px\]{height:60px}.h-full{height:100%}.max-h-32{max-height:8rem}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-\[28rem\]{max-height:28rem}.min-h-0{min-height:0}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[28rem\]{width:28rem}.w-\[30px\]{width:30px}.w-\[600px\]{width:600px}.w-\[60px\]{width:60px}.w-\[800px\]{width:800px}.w-\[90\%\]{width:90%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[360px\]{min-width:360px}.min-w-full{min-width:100%}.max-w-48{max-width:12rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\[120px\]{max-width:120px}.max-w-\[400px\]{max-width:400px}.max-w-\[500px\]{max-width:500px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-2{--tw-translate-y:-0.5rem}.-translate-y-2,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-x-4{--tw-translate-x:1rem}.translate-x-4,.translate-x-5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x:1.25rem}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1{--tw-translate-y:0.25rem}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.animate-fade-in-up{animation:fadeInUp .5s ease-out forwards}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-neutral-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(245 245 245/var(--tw-divide-opacity,1))}.divide-neutral-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 229 229/var(--tw-divide-opacity,1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-2xl{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity,1))}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-line{border-color:var(--border-faint)}.border-line-strong{border-color:var(--border-normal)}.border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-white\/30{border-color:hsla(0,0%,100%,.3)}.border-t-neutral-600{--tw-border-opacity:1;border-top-color:rgb(82 82 82/var(--tw-border-opacity,1))}.border-t-neutral-900{--tw-border-opacity:1;border-top-color:rgb(23 23 23/var(--tw-border-opacity,1))}.bg-accent{background-color:var(--btn-primary)}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.bg-amber-400\/20{background-color:rgba(251,191,36,.2)}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-neutral-50\/50{background-color:hsla(0,0%,98%,.5)}.bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-surface{background-color:var(--bg-primary)}.bg-surface-alt{background-color:var(--bg-secondary)}.bg-surface-muted{background-color:var(--bg-tertiary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/20{background-color:hsla(0,0%,100%,.2)}.bg-white\/80{background-color:hsla(0,0%,100%,.8)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-neutral-100{--tw-gradient-from:#f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,96%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-neutral-50{--tw-gradient-from:#fafafa var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,98%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-1{padding-left:.25rem}.pl-4{padding-left:1rem}.pr-1{padding-right:.25rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Inter,system-ui,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-accent-fg{color:var(--btn-primary-text)}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-danger{color:var(--text-danger)}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-fg-muted{color:var(--text-muted)}.text-fg-secondary{color:var(--text-secondary)}.text-fg-tertiary{color:var(--text-tertiary)}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-neutral-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(163 163 163/var(--tw-placeholder-opacity,1))}.placeholder-neutral-400::placeholder{--tw-placeholder-opacity:1;color:rgb(163 163 163/var(--tw-placeholder-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur-3xl{--tw-blur:blur(64px)}.blur-3xl,.grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale:grayscale(100%)}.\!invert{--tw-invert:invert(100%)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-md,.backdrop-blur-sm{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.selection\:bg-neutral-900 ::-moz-selection{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.selection\:bg-neutral-900 ::selection{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.selection\:text-white ::-moz-selection{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.selection\:text-white ::selection{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.selection\:bg-neutral-900::-moz-selection{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.selection\:bg-neutral-900::selection{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.selection\:text-white::-moz-selection{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.selection\:text-white::selection{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.last\:border-0:last-child{border-width:0}.last\:border-b-0:last-child{border-bottom-width:0}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.hover\:scale-105:hover,.hover\:scale-\[1\.02\]:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.02\]:hover{--tw-scale-x:1.02;--tw-scale-y:1.02}.hover\:border-neutral-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.hover\:border-neutral-400:hover{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.hover\:border-neutral-500:hover{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.hover\:bg-accent-hover:hover{background-color:var(--btn-primary-hover)}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.hover\:bg-danger-bg:hover{background-color:var(--bg-danger-hover)}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-neutral-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.hover\:bg-neutral-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-neutral-700:hover{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.hover\:bg-neutral-800:hover{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.hover\:bg-neutral-900:hover{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.hover\:bg-surface-alt:hover{background-color:var(--bg-secondary)}.hover\:bg-surface-muted:hover{background-color:var(--bg-tertiary)}.hover\:text-amber-600:hover{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.hover\:text-amber-700:hover{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-fg:hover{color:var(--text-primary)}.hover\:text-fg-secondary:hover{color:var(--text-secondary)}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-neutral-600:hover{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.hover\:text-neutral-700:hover{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.hover\:text-neutral-800:hover{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.hover\:text-neutral-900:hover{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-line-strong:focus{border-color:var(--border-normal)}.focus\:border-neutral-400:focus{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.focus\:border-neutral-900:focus{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-1:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-black:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity,1))}.focus\:ring-neutral-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(163 163 163/var(--tw-ring-opacity,1))}.focus\:ring-neutral-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(115 115 115/var(--tw-ring-opacity,1))}.focus\:ring-neutral-900:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(23 23 23/var(--tw-ring-opacity,1))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95}.active\:scale-95:active,.active\:scale-\[0\.98\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.98\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98}.disabled\:transform-none:disabled{transform:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-surface-muted:disabled{background-color:var(--bg-tertiary)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width:640px){.sm\:block{display:block}.sm\:flex{display:flex}.sm\:h-\[600px\]{height:600px}.sm\:w-1\/3{width:33.333333%}.sm\:w-36{width:9rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-64{width:16rem}.sm\:flex-shrink-0{flex-shrink:0}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}.sm\:gap-6{gap:1.5rem}.sm\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)))}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:rounded-3xl{border-radius:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}}@media (min-width:768px){.md\:block{display:block}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:px-12{padding-left:3rem;padding-right:3rem}}@media (min-width:1024px){.lg\:mt-0{margin-top:0}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-2\/5{width:40%}.lg\:w-3\/5{width:60%}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:border-r{border-right-width:1px}.lg\:border-t-0{border-top-width:0}.lg\:pl-6{padding-left:1.5rem}.lg\:pr-6{padding-right:1.5rem}.lg\:pt-0{padding-top:0}}@media (prefers-color-scheme:dark){.dark\:text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.dark\:hover\:text-neutral-300:hover{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}}.\[\&\:\:-webkit-slider-thumb\]\:h-3::-webkit-slider-thumb{height:.75rem}.\[\&\:\:-webkit-slider-thumb\]\:w-3::-webkit-slider-thumb{width:.75rem}.\[\&\:\:-webkit-slider-thumb\]\:cursor-not-allowed::-webkit-slider-thumb{cursor:not-allowed}.\[\&\:\:-webkit-slider-thumb\]\:cursor-pointer::-webkit-slider-thumb{cursor:pointer}.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{-webkit-appearance:none;appearance:none}.\[\&\:\:-webkit-slider-thumb\]\:rounded-full::-webkit-slider-thumb{border-radius:9999px}.\[\&\:\:-webkit-slider-thumb\]\:bg-black::-webkit-slider-thumb{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.\[\&\:\:-webkit-slider-thumb\]\:bg-neutral-300::-webkit-slider-thumb{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.\[\&\:\:-webkit-slider-thumb\]\:shadow-sm::-webkit-slider-thumb{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\[\&\>option\]\:text-neutral-900>option{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))} \ No newline at end of file diff --git a/omlx/admin/static/js/dashboard.js b/omlx/admin/static/js/dashboard.js index 956927e95..bc14b2b68 100644 --- a/omlx/admin/static/js/dashboard.js +++ b/omlx/admin/static/js/dashboard.js @@ -5,7 +5,7 @@ const DSA_MODEL_TYPES = new Set([ 'deepseek_v32', 'glm_moe_dsa', ]); - const DASHBOARD_MAIN_TABS = new Set(['status', 'settings', 'models', 'logs', 'bench']); + const DASHBOARD_MAIN_TABS = new Set(['status', 'settings', 'models', 'logs', 'bench', 'mcp']); const DASHBOARD_SETTINGS_TABS = new Set(['global', 'models']); const DASHBOARD_MODELS_TABS = new Set(['manager', 'downloader', 'quantizer', 'uploader']); const DASHBOARD_BENCH_TABS = new Set(['throughput', 'accuracy']); @@ -108,6 +108,23 @@ loadingGenDefaults: false, reasoningParsers: [], + // Profile / template state + profiles: [], // per-model profiles for selectedModel + templates: [], // global templates + profileFields: { universal: [], model_specific: [] }, // loaded from /api/profile-fields + activeProfileName: null, // currently-active profile for the form + profilesDrift: false, // true if form values differ from active profile + _applySeq: 0, // monotonic counter for apply race guard + profileError: '', + showNewProfileForm: false, + newProfile: { name: '', display_name: '', description: '', also_as_template: false }, + showNewTemplateForm: false, + newTemplate: { name: '', display_name: '', description: '' }, + editingProfile: null, // profile name being edited inline + editingTemplate: null, // template name being edited inline + profileDeleteConfirm: null, + templateDeleteConfirm: null, + // Status tab state stats: { total_prompt_tokens: 0, @@ -276,6 +293,7 @@ // oQ Advanced Settings oqAdvancedOpen: false, oqTextOnly: false, + oqDtype: 'bfloat16', oqSensitivityModelPath: '', // oQ Uploader state @@ -328,21 +346,50 @@ // Accuracy benchmark state accModelId: '', - accBenchmarks: { mmlu: true, kmmlu: false, cmmlu: false, jmmlu: false, hellaswag: false, truthfulqa: true, arc_challenge: false, winogrande: false, gsm8k: false, humaneval: true, mbpp: false, livecodebench: false }, - accSampleSizes: { mmlu: 1000, kmmlu: 300, cmmlu: 300, jmmlu: 300, hellaswag: 200, truthfulqa: 0, arc_challenge: 300, winogrande: 300, gsm8k: 100, humaneval: 0, mbpp: 200, livecodebench: 100 }, - accBenchmarkList: [ - { key: 'mmlu', label: 'MMLU', desc: 'Knowledge · 57 subjects', fullSize: 14042, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, - { key: 'kmmlu', label: 'KMMLU', desc: '한국어 지식 · 45 과목', fullSize: 35030, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, - { key: 'cmmlu', label: 'CMMLU', desc: '中文知识 · 67 科目', fullSize: 11582, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, - { key: 'jmmlu', label: 'JMMLU', desc: '日本語知識 · 112 科目', fullSize: 7536, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, - { key: 'hellaswag', label: 'HellaSwag', desc: 'Commonsense reasoning', fullSize: 10042, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, - { key: 'truthfulqa', label: 'TruthfulQA', desc: 'Truthfulness', fullSize: 817, sizes: [30, 50, 100, 200, 300] }, - { key: 'arc_challenge', label: 'ARC-C', desc: 'Science reasoning', fullSize: 1172, sizes: [30, 50, 100, 200, 300] }, - { key: 'winogrande', label: 'Winogrande', desc: 'Coreference resolution', fullSize: 1267, sizes: [30, 50, 100, 200, 300] }, - { key: 'gsm8k', label: 'GSM8K', desc: 'Math reasoning', fullSize: 1319, sizes: [30, 50, 100, 200, 300] }, - { key: 'humaneval', label: 'HumanEval', desc: 'Function completion', fullSize: 164, sizes: [30, 50, 100] }, - { key: 'mbpp', label: 'MBPP', desc: 'Python problems', fullSize: 500, sizes: [30, 50, 100, 200, 300] }, - { key: 'livecodebench', label: 'LiveCodeBench', desc: 'Code generation', fullSize: 1055, sizes: [30, 50, 100, 200, 300] }, + accBenchmarks: { mmlu: true, mmlu_pro: false, kmmlu: false, cmmlu: false, jmmlu: false, hellaswag: false, truthfulqa: true, arc_challenge: false, winogrande: false, gsm8k: false, mathqa: false, humaneval: true, mbpp: false, livecodebench: false, bbq: false, safetybench: false }, + accSampleSizes: { mmlu: 1000, mmlu_pro: 300, kmmlu: 300, cmmlu: 300, jmmlu: 300, hellaswag: 200, truthfulqa: 0, arc_challenge: 300, winogrande: 300, gsm8k: 100, mathqa: 300, humaneval: 0, mbpp: 200, livecodebench: 100, bbq: 300, safetybench: 300 }, + accBenchmarkGroups: [ + { + name: 'Knowledge', + benchmarks: [ + { key: 'mmlu', label: 'MMLU', desc: 'Knowledge · 57 subjects', fullSize: 14042, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, + { key: 'mmlu_pro', label: 'MMLU-Pro', desc: 'Hard knowledge · 14 subjects (10-way)', fullSize: 12032, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, + { key: 'kmmlu', label: 'KMMLU', desc: '한국어 지식 · 45 과목', fullSize: 35030, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, + { key: 'cmmlu', label: 'CMMLU', desc: '中文知识 · 67 科目', fullSize: 11582, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, + { key: 'jmmlu', label: 'JMMLU', desc: '日本語知識 · 112 科目', fullSize: 7536, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, + ], + }, + { + name: 'Commonsense & Reasoning', + benchmarks: [ + { key: 'hellaswag', label: 'HellaSwag', desc: 'Commonsense reasoning', fullSize: 10042, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, + { key: 'arc_challenge', label: 'ARC-C', desc: 'Science reasoning', fullSize: 1172, sizes: [30, 50, 100, 200, 300] }, + { key: 'winogrande', label: 'Winogrande', desc: 'Coreference resolution', fullSize: 1267, sizes: [30, 50, 100, 200, 300] }, + { key: 'truthfulqa', label: 'TruthfulQA', desc: 'Truthfulness', fullSize: 817, sizes: [30, 50, 100, 200, 300] }, + ], + }, + { + name: 'Math', + benchmarks: [ + { key: 'gsm8k', label: 'GSM8K', desc: 'Math reasoning', fullSize: 1319, sizes: [30, 50, 100, 200, 300] }, + { key: 'mathqa', label: 'MathQA', desc: 'Quantitative reasoning · 5-way', fullSize: 2985, sizes: [30, 50, 100, 200, 300, 500, 1000] }, + ], + }, + { + name: 'Coding', + benchmarks: [ + { key: 'humaneval', label: 'HumanEval', desc: 'Function completion', fullSize: 164, sizes: [30, 50, 100] }, + { key: 'mbpp', label: 'MBPP', desc: 'Python problems', fullSize: 500, sizes: [30, 50, 100, 200, 300] }, + { key: 'livecodebench', label: 'LiveCodeBench', desc: 'Code generation', fullSize: 1055, sizes: [30, 50, 100, 200, 300] }, + ], + }, + { + name: 'Safety & Alignment', + benchmarks: [ + { key: 'bbq', label: 'BBQ', desc: 'Social bias · 11 categories', fullSize: 10864, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, + { key: 'safetybench', label: 'SafetyBench', desc: 'Safety · 7 categories', fullSize: 11435, sizes: [30, 50, 100, 200, 300, 500, 1000, 2000] }, + ], + }, ], accBatchSize: 1, accEnableThinking: false, @@ -357,6 +404,24 @@ accShowText: false, accCopied: false, + // MCP server management + mcpServers: [], + mcpAvailable: false, + mcpLoading: false, + mcpConfigPath: null, + mcpMaxToolCalls: 10, + mcpActionLoading: {}, // { serverName: 'reconnect'|'auth'|'logout' } + mcpMessages: {}, // { serverName: { type: 'error'|'ok', text: '...' } } + mcpExpandedServer: null, + mcpToolModal: null, + mcpReloading: false, + mcpReloadMessage: null, + mcpShowConfigEditor: false, + mcpConfigJson: '', + mcpConfigSaving: false, + mcpConfigSaved: false, + mcpConfigError: '', + async init() { // Apply theme this.applyTheme(); @@ -366,6 +431,7 @@ this.loadGlobalSettings(), this.loadModels(), this.loadServerInfo(), + this.loadProfileFields(), this.checkForUpdate() ]); @@ -416,6 +482,9 @@ }, async handleMainTabChange(value) { + if (value === 'mcp') { + await this.loadMcpServers(); + } if (value === 'status') { await this.loadStats(); this.startStatsRefresh(); @@ -526,6 +595,199 @@ } }, + // ------------------------------------------------------------------ + // MCP server management + // ------------------------------------------------------------------ + + mcpMd(text) { + if (!text) return ''; + try { + return DOMPurify.sanitize(marked.parse(text)); + } catch(e) { + return text.replace(//g, '>'); + } + }, + + async mcpReloadConfig() { + this.mcpReloading = true; + this.mcpReloadMessage = null; + try { + const resp = await fetch('/admin/api/mcp/reload', { method: 'POST' }); + const data = await resp.json(); + if (!resp.ok) throw new Error(data.detail || 'Reload failed'); + this.mcpReloadMessage = { + type: 'ok', + text: `Config reloaded — ${data.servers} server(s), ${data.tools} tool(s)`, + }; + await this.loadMcpServers(); + } catch (e) { + this.mcpReloadMessage = { type: 'error', text: e.message }; + } finally { + this.mcpReloading = false; + setTimeout(() => { this.mcpReloadMessage = null; }, 5000); + } + }, + + async loadMcpServers() { + this.mcpLoading = true; + try { + const resp = await fetch('/admin/api/mcp/servers'); + if (!resp.ok) throw new Error(await resp.text()); + const data = await resp.json(); + this.mcpServers = data.servers || []; + this.mcpAvailable = data.available || false; + this.mcpConfigPath = data.config_path || null; + this.mcpMaxToolCalls = data.max_tool_calls || 10; + } catch (e) { + console.error('Failed to load MCP servers:', e); + } finally { + this.mcpLoading = false; + } + }, + + async loadMcpConfig() { + try { + const resp = await fetch('/admin/api/mcp/config'); + if (!resp.ok) return; + const data = await resp.json(); + this.mcpConfigJson = JSON.stringify(data.config, null, 2); + if (data.path) this.mcpConfigPath = data.path; + } catch (e) { + console.error('Failed to load MCP config:', e); + } + }, + + async mcpSaveConfig() { + this.mcpConfigError = ''; + this.mcpConfigSaved = false; + let parsed; + try { + parsed = JSON.parse(this.mcpConfigJson); + } catch (e) { + this.mcpConfigError = 'Invalid JSON: ' + e.message; + return; + } + this.mcpConfigSaving = true; + try { + const resp = await fetch('/admin/api/mcp/config', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ config: parsed }), + }); + const data = await resp.json(); + if (!resp.ok) { + this.mcpConfigError = data.detail || 'Save failed'; + } else { + this.mcpConfigSaved = true; + if (data.path) this.mcpConfigPath = data.path; + setTimeout(() => { this.mcpConfigSaved = false; }, 4000); + } + } catch (e) { + this.mcpConfigError = e.message; + } finally { + this.mcpConfigSaving = false; + } + }, + + mcpFormatConfig() { + try { + this.mcpConfigJson = JSON.stringify(JSON.parse(this.mcpConfigJson), null, 2); + this.mcpConfigError = ''; + } catch (e) { + this.mcpConfigError = 'Invalid JSON: ' + e.message; + } + }, + + async mcpReconnect(name) { + this.mcpActionLoading = { ...this.mcpActionLoading, [name]: 'reconnect' }; + this.mcpMessages = { ...this.mcpMessages, [name]: null }; + try { + const resp = await fetch(`/admin/api/mcp/servers/${encodeURIComponent(name)}/reconnect`, { method: 'POST' }); + if (!resp.ok) throw new Error((await resp.json()).detail || 'Reconnect failed'); + await this.loadMcpServers(); + } catch (e) { + this.mcpMessages = { ...this.mcpMessages, [name]: { type: 'error', text: e.message } }; + } finally { + this.mcpActionLoading = { ...this.mcpActionLoading, [name]: null }; + } + }, + + async mcpAuthenticate(name) { + this.mcpActionLoading = { ...this.mcpActionLoading, [name]: 'auth' }; + this.mcpMessages = { ...this.mcpMessages, [name]: null }; + try { + const resp = await fetch(`/admin/api/mcp/servers/${encodeURIComponent(name)}/authenticate`, { method: 'POST' }); + const data = await resp.json(); + if (!resp.ok) throw new Error(data.detail || 'Authentication failed'); + + const popup = window.open(data.auth_url, '_blank', + 'width=520,height=680,left=' + (screen.width/2 - 260) + ',top=' + (screen.height/2 - 340)); + + // Poll server status until the server settles out of 'connecting' + // (the reconnect is an asyncio.create_task, so it takes time) + const pollUntilSettled = async () => { + for (let i = 0; i < 12; i++) { + await new Promise(r => setTimeout(r, 1500)); + await this.loadMcpServers(); + const s = this.mcpServers.find(s => s.name === name); + if (!s || s.state !== 'connecting') break; + } + }; + + // Listen for completion via postMessage from the callback page + const handler = async (event) => { + try { + const msg = JSON.parse(event.data); + if (msg.type !== 'mcp_oauth_complete') return; + } catch(e) { return; } + window.removeEventListener('message', handler); + clearInterval(popupPoller); + if (popup && !popup.closed) popup.close(); + if (msg.success) { + this.mcpMessages = { ...this.mcpMessages, [name]: { type: 'ok', text: 'Authenticated — connecting…' } }; + await pollUntilSettled(); + const s = this.mcpServers.find(s => s.name === name); + const text = s?.state === 'connected' ? 'Connected successfully' : 'Authenticated'; + this.mcpMessages = { ...this.mcpMessages, [name]: { type: 'ok', text } }; + setTimeout(() => { this.mcpMessages = { ...this.mcpMessages, [name]: null }; }, 4000); + } else { + this.mcpMessages = { ...this.mcpMessages, [name]: { type: 'error', text: 'Authentication failed' } }; + } + this.mcpActionLoading = { ...this.mcpActionLoading, [name]: null }; + }; + window.addEventListener('message', handler); + + // Fallback: if popup closes without a message, still refresh + const popupPoller = setInterval(() => { + if (popup && popup.closed) { + clearInterval(popupPoller); + window.removeEventListener('message', handler); + this.mcpActionLoading = { ...this.mcpActionLoading, [name]: null }; + this.loadMcpServers(); + } + }, 1000); + } catch (e) { + this.mcpMessages = { ...this.mcpMessages, [name]: { type: 'error', text: e.message } }; + this.mcpActionLoading = { ...this.mcpActionLoading, [name]: null }; + } + }, + + async mcpLogout(name) { + this.mcpActionLoading = { ...this.mcpActionLoading, [name]: 'logout' }; + this.mcpMessages = { ...this.mcpMessages, [name]: null }; + try { + const resp = await fetch(`/admin/api/mcp/servers/${encodeURIComponent(name)}/logout`, { method: 'POST' }); + if (!resp.ok) throw new Error((await resp.json()).detail || 'Logout failed'); + await this.loadMcpServers(); + } catch (e) { + this.mcpMessages = { ...this.mcpMessages, [name]: { type: 'error', text: e.message } }; + } finally { + this.mcpActionLoading = { ...this.mcpActionLoading, [name]: null }; + } + }, + + // ------------------------------------------------------------------ + async checkForUpdate() { try { const resp = await fetch('/admin/api/update-check'); @@ -896,7 +1158,372 @@ } }, + // ===== Profiles / Templates ===== + formValuesForProfile() { + const ms = this.modelSettings; + const out = {}; + + for (const k of this.profileFields.universal.concat(this.profileFields.model_specific)) { + if (k === 'chat_template_kwargs' || k === 'forced_ct_kwargs') continue; // handle below + if (k === 'thinking_budget_enabled') { + if (ms.enableThinkingBudget) out.thinking_budget_tokens = ms.thinking_budget_tokens ?? null; + continue; + } + if (k === 'index_cache_freq') { + if (ms.enableIndexCache) out.index_cache_freq = ms.index_cache_freq || 4; + continue; + } + if (k === 'max_tool_result_tokens') { + if (ms.enableToolResultLimit) out.max_tool_result_tokens = ms.max_tool_result_tokens || null; + continue; + } + // Standard field: apply nullish coalescing; coerce string numerics + let v = ms[k] ?? null; + if (typeof v === 'string' && v !== '' && !isNaN(Number(v))) v = Number(v); + out[k] = v; + } + + // Build chat_template_kwargs and forced_ct_kwargs from ctKwargEntries + const ctk = {}; + const forced = []; + for (const e of (ms.ctKwargEntries || [])) { + if (e.type === 'enable_thinking') { + ctk.enable_thinking = e.value === 'true'; + if (e.force) forced.push('enable_thinking'); + } else if (e.type === 'reasoning_effort') { + ctk.reasoning_effort = e.value; + if (e.force) forced.push('reasoning_effort'); + } else if (e.type === 'custom' && e.key && e.key.trim()) { + let v = e.value; + if (v === 'true') v = true; + else if (v === 'false') v = false; + else if (!isNaN(Number(v)) && String(v).trim() !== '') v = Number(v); + ctk[e.key.trim()] = v; + if (e.force) forced.push(e.key.trim()); + } + } + if (Object.keys(ctk).length > 0) out.chat_template_kwargs = ctk; + if (forced.length > 0) out.forced_ct_kwargs = forced; + + return out; + }, + formValuesForTemplate() { + const full = this.formValuesForProfile(); + const out = {}; + for (const k of this.profileFields.universal) { + if (k in full) out[k] = full[k]; + } + return out; + }, + computeDrift() { + if (!this.activeProfileName) { this.profilesDrift = false; return; } + const active = this.profiles.find(p => p.name === this.activeProfileName); + if (!active) { this.profilesDrift = false; return; } + const form = this.formValuesForProfile(); + for (const [k, v] of Object.entries(active.settings || {})) { + if (JSON.stringify(form[k]) !== JSON.stringify(v)) { + this.profilesDrift = true; + return; + } + } + this.profilesDrift = false; + }, + async loadProfilesForModel(modelId) { + this.profiles = []; + try { + const r = await fetch(`/admin/api/models/${encodeURIComponent(modelId)}/profiles`); + if (r.ok) { + const data = await r.json(); + this.profiles = data.profiles || []; + } else if (r.status === 401) { + window.location.href = '/admin'; + } + } catch (e) { + console.error('Failed to load profiles:', e); + } + }, + async loadTemplates() { + try { + const r = await fetch('/admin/api/profile-templates'); + if (r.ok) { + const data = await r.json(); + this.templates = data.templates || []; + } else if (r.status === 401) { + window.location.href = '/admin'; + } + } catch (e) { + console.error('Failed to load templates:', e); + } + }, + async loadProfileFields() { + try { + const r = await fetch('/admin/api/profile-fields'); + if (r.ok) { + const data = await r.json(); + this.profileFields = { + universal: data.universal || [], + model_specific: data.model_specific || [], + }; + } else if (r.status === 401) { + window.location.href = '/admin'; + } + } catch (e) { + console.error('Failed to load profile field definitions:', e); + } + }, + + async createProfile() { + if (!this.selectedModel) return; + this.profileError = ''; + const body = { + name: this.newProfile.name.trim(), + display_name: this.newProfile.display_name.trim() || this.newProfile.name.trim(), + description: this.newProfile.description.trim() || null, + settings: this.formValuesForProfile(), + also_save_as_template: !!this.newProfile.also_as_template, + }; + try { + const r = await fetch( + `/admin/api/models/${encodeURIComponent(this.selectedModel.id)}/profiles`, + { method: 'POST', headers: {'Content-Type': 'application/json'}, + body: JSON.stringify(body) } + ); + if (r.ok) { + await this.loadProfilesForModel(this.selectedModel.id); + if (body.also_save_as_template) await this.loadTemplates(); + this.showNewProfileForm = false; + this.newProfile = { name: '', display_name: '', description: '', also_as_template: false }; + } else if (r.status === 401) { + window.location.href = '/admin'; + } else { + const data = await r.json().catch(() => ({})); + this.profileError = data.detail || 'Failed to save profile'; + } + } catch (e) { + this.profileError = String(e); + } + }, + async applyProfileToForm(profile) { + // Merge all profile fields into the form (no server call — user clicks Save to persist). + const s = profile.settings || {}; + const ms = this.modelSettings; + for (const k of this.profileFields.universal.concat(this.profileFields.model_specific)) { + if (!(k in s)) continue; + if (k === 'thinking_budget_enabled') { + ms.enableThinkingBudget = !!s[k]; + } else if (k === 'index_cache_freq') { + ms.enableIndexCache = !!s[k]; + ms.index_cache_freq = s[k] || null; + } else if (k === 'max_tool_result_tokens') { + ms.enableToolResultLimit = !!s[k]; + ms.max_tool_result_tokens = s[k] || null; + } else if (k === 'chat_template_kwargs' || k === 'forced_ct_kwargs') { + // Rebuild ctKwargEntries + const ctk = s.chat_template_kwargs || {}; + const forced = new Set(s.forced_ct_kwargs || []); + const entries = []; + for (const [key, value] of Object.entries(ctk)) { + if (key === 'enable_thinking') { + entries.push({type:'enable_thinking', value:String(value), force:forced.has('enable_thinking')}); + } else if (key === 'reasoning_effort') { + entries.push({type:'reasoning_effort', value:String(value), force:forced.has('reasoning_effort')}); + } else { + entries.push({type:'custom', key, value:String(value), force:forced.has(key)}); + } + } + ms.ctKwargEntries = entries; + } else { + ms[k] = s[k]; + } + } + // Persist active_profile_name to backend before updating UI state + const seq = ++this._applySeq; + try { + const r = await fetch( + `/admin/api/models/${encodeURIComponent(this.selectedModel.id)}/profiles/${encodeURIComponent(profile.name)}/apply`, + { method: 'POST' } + ); + if (seq !== this._applySeq) return; // superseded by a newer click + if (r.ok) { + this.activeProfileName = profile.name; + this.profilesDrift = false; + // Update the models list so the profile badge reflects the change + const m = this.models.find(m => m.id === this.selectedModel.id); + if (m) m.settings = { ...m.settings, active_profile_name: profile.name }; + } else if (r.status === 401) { + window.location.href = '/admin'; + } + } catch (e) { + console.error('Failed to apply profile:', e); + } + }, + async applyTemplateToForm(template) { + // Check if a profile with this template's name already exists + const existingProfile = this.profiles.find(p => p.name === template.name); + + if (existingProfile) { + // Profile exists, just apply it (preserve user customizations) + await this.applyProfileToForm(existingProfile); + } else { + // Create a new profile from the template + const body = { + name: template.name, + display_name: template.display_name, + description: template.description || null, + settings: template.settings, + source_template: template.name, + }; + + try { + const r = await fetch( + `/admin/api/models/${encodeURIComponent(this.selectedModel.id)}/profiles`, + { method: 'POST', headers: {'Content-Type': 'application/json'}, + body: JSON.stringify(body) } + ); + if (r.ok) { + // Reload profiles first to include the new one + await this.loadProfilesForModel(this.selectedModel.id); + // Find the newly created profile in the refreshed list + const newProfile = this.profiles.find(p => p.name === template.name); + if (newProfile) { + await this.applyProfileToForm(newProfile); + } + } + } catch (e) { + console.error('Failed to create profile from template:', e); + } + } + }, + async deleteProfile(name) { + if (!this.selectedModel) return; + try { + const r = await fetch( + `/admin/api/models/${encodeURIComponent(this.selectedModel.id)}/profiles/${encodeURIComponent(name)}`, + { method: 'DELETE' } + ); + if (r.ok) { + if (this.activeProfileName === name) this.activeProfileName = null; + await this.loadProfilesForModel(this.selectedModel.id); + } else if (r.status === 401) { + window.location.href = '/admin'; + } + } catch (e) { + console.error('Delete profile failed:', e); + } finally { + this.profileDeleteConfirm = null; + } + }, + async updateProfile(name, patch) { + // patch: { new_name?, display_name?, description?, settings?, also_save_as_template? } + if (!this.selectedModel) return; + this.profileError = ''; + try { + const r = await fetch( + `/admin/api/models/${encodeURIComponent(this.selectedModel.id)}/profiles/${encodeURIComponent(name)}`, + { method: 'PUT', headers: {'Content-Type':'application/json'}, + body: JSON.stringify(patch) } + ); + if (r.ok) { + const data = await r.json(); + if (this.activeProfileName === name && patch.new_name) { + this.activeProfileName = patch.new_name; + } + await this.loadProfilesForModel(this.selectedModel.id); + if (patch.also_save_as_template) await this.loadTemplates(); + this.editingProfile = null; + return data.profile; + } else if (r.status === 401) { + window.location.href = '/admin'; + } else { + const data = await r.json().catch(() => ({})); + this.profileError = data.detail || 'Failed to update profile'; + } + } catch (e) { + this.profileError = String(e); + } + }, + async createTemplate() { + this.profileError = ''; + const body = { + name: this.newTemplate.name.trim(), + display_name: this.newTemplate.display_name.trim() || this.newTemplate.name.trim(), + description: this.newTemplate.description.trim() || null, + // Only universal fields — server will filter again defensively. + settings: this.formValuesForTemplate(), + }; + try { + const r = await fetch('/admin/api/profile-templates', { + method: 'POST', + headers: {'Content-Type': 'application/json'}, + body: JSON.stringify(body), + }); + if (r.ok) { + await this.loadTemplates(); + this.showNewTemplateForm = false; + this.newTemplate = { name: '', display_name: '', description: '' }; + } else if (r.status === 401) { + window.location.href = '/admin'; + } else { + const data = await r.json().catch(() => ({})); + this.profileError = data.detail || 'Failed to save template'; + } + } catch (e) { + this.profileError = String(e); + } + }, + async updateTemplate(name, patch) { + this.profileError = ''; + try { + const r = await fetch( + `/admin/api/profile-templates/${encodeURIComponent(name)}`, + { method: 'PUT', headers: {'Content-Type':'application/json'}, + body: JSON.stringify(patch) } + ); + if (r.ok) { + await this.loadTemplates(); + this.editingTemplate = null; + } else if (r.status === 401) { + window.location.href = '/admin'; + } else { + const data = await r.json().catch(() => ({})); + this.profileError = data.detail || 'Failed to update template'; + } + } catch (e) { + this.profileError = String(e); + } + }, + async deleteTemplate(name) { + try { + const r = await fetch( + `/admin/api/profile-templates/${encodeURIComponent(name)}`, + { method: 'DELETE' } + ); + if (r.ok) { + await this.loadTemplates(); + } else if (r.status === 401) { + window.location.href = '/admin'; + } + } catch (e) { + console.error('Delete template failed:', e); + } finally { + this.templateDeleteConfirm = null; + } + }, + async openModelSettings(model) { + this.profileError = ''; + this.showNewProfileForm = false; + this.showNewTemplateForm = false; + this.editingProfile = null; + this.editingTemplate = null; + this.profileDeleteConfirm = null; + this.templateDeleteConfirm = null; + this.activeProfileName = (model.settings && model.settings.active_profile_name) || null; + await Promise.all([ + this.loadProfilesForModel(model.id), + this.loadTemplates(), + ]); + this.computeDrift(); if (this.reasoningParsers.length === 0) { try { const resp = await fetch('/admin/api/grammar/parsers'); @@ -1037,19 +1664,9 @@ }); if (response.ok) { - // Update local model data from server response + // Refresh the model list to update badges + await this.loadModels(); const data = await response.json(); - const model = this.models.find(m => m.id === this.selectedModel.id); - if (model) { - model.settings = data.settings || {}; - // Update effective model_type/engine_type from server - if (data.model_type) { - model.model_type = data.model_type; - } - if (data.engine_type) { - model.engine_type = data.engine_type; - } - } this.showModelSettingsModal = false; if (data.requires_reload) { alert(window.t('js.info.model_type_reload_required')); @@ -1081,6 +1698,29 @@ this.modelSettings.top_p = data.top_p ?? null; this.modelSettings.top_k = data.top_k ?? null; this.modelSettings.repetition_penalty = data.repetition_penalty ?? null; + this.modelSettings.max_tokens = null; + this.modelSettings.min_p = null; + this.modelSettings.presence_penalty = null; + this.modelSettings.force_sampling = false; + this.modelSettings.reasoning_parser = null; + this.modelSettings.ttl_seconds = null; + this.modelSettings.enableIndexCache = false; + this.modelSettings.index_cache_freq = 0; + this.modelSettings.enable_thinking = false; + this.modelSettings.enableThinkingBudget = false; + this.modelSettings.thinking_budget_tokens = 0; + this.modelSettings.enableToolResultLimit = false; + this.modelSettings.max_tool_result_tokens = 0; + this.modelSettings.ctKwargEntries = []; + this.modelSettings.turboquant_kv_enabled = false; + this.modelSettings.turboquant_kv_bits = 4; + this.modelSettings.specprefill_enabled = false; + this.modelSettings.specprefill_draft_model = null; + this.modelSettings.specprefill_keep_pct = 0.2; + this.modelSettings.specprefill_threshold = null; + this.modelSettings.dflash_enabled = false; + this.modelSettings.dflash_draft_model = null; + this.modelSettings.dflash_draft_quant_bits = null; } else if (response.status === 404) { alert(window.t('js.error.no_config_defaults')); } else if (response.status === 401) { @@ -1095,6 +1735,8 @@ } finally { this.loadingGenDefaults = false; } + this.activeProfileName = null; + this.profilesDrift = false; }, // Status tab functions @@ -1939,7 +2581,9 @@ // Full sizes lookup const fullSizes = {}; - for (const bl of this.accBenchmarkList) fullSizes[bl.key] = bl.fullSize; + for (const grp of this.accBenchmarkGroups) { + for (const bl of grp.benchmarks) fullSizes[bl.key] = bl.fullSize; + } // Determine column widths const modelWidth = Math.max(12, ...models.map(m => m.length + 2)); @@ -2035,9 +2679,9 @@ mime = 'application/json'; } else if (format === 'csv') { const esc = s => '"' + (s || '').replace(/"/g, '""') + '"'; - const lines = ['id,correct,expected,predicted,question,raw_response,time_s']; + const lines = ['id,category,correct,expected,predicted,question,raw_response,time_s']; for (const q of qr) { - lines.push([q.id, q.correct, esc(q.expected), esc(q.predicted), esc(q.question), esc(q.raw_response), q.time_s].join(',')); + lines.push([q.id, esc(q.category || ''), q.correct, esc(q.expected), esc(q.predicted), esc(q.question), esc(q.raw_response), q.time_s].join(',')); } content = lines.join('\n'); mime = 'text/csv'; @@ -2051,6 +2695,7 @@ ]; for (const q of qr) { lines.push(`--- Q${q.id} [${q.correct ? 'CORRECT' : 'WRONG'}] ---`); + if (q.category) lines.push(`Category: ${q.category}`); lines.push(`Question: ${q.question || ''}`); lines.push(`Expected: ${q.expected}`); lines.push(`Predicted: ${q.predicted}`); @@ -2799,6 +3444,7 @@ group_size: 64, sensitivity_model_path: this.oqSensitivityModelPath, text_only: this.oqTextOnly, + dtype: this.oqDtype, }), }); const data = await response.json().catch(() => ({})); diff --git a/omlx/admin/tailwind.config.js b/omlx/admin/tailwind.config.js index 22610e7b1..bd4d596aa 100644 --- a/omlx/admin/tailwind.config.js +++ b/omlx/admin/tailwind.config.js @@ -6,6 +6,8 @@ module.exports = { ], safelist: [ "sm:grid-cols-2", // dynamic :class in _modal_model_settings.html + "bg-emerald-500", "text-white", "border-emerald-500", + "bg-emerald-50", "text-emerald-700", "border-emerald-200", "hover:bg-emerald-100", ], theme: { extend: { diff --git a/omlx/admin/templates/base.html b/omlx/admin/templates/base.html index 66c955509..1e84fdf5a 100644 --- a/omlx/admin/templates/base.html +++ b/omlx/admin/templates/base.html @@ -135,7 +135,11 @@ if (!def) return; var svg = lucide.createElement(def); Array.from(el.attributes).forEach(function(a) { - if (a.name !== 'data-lucide') svg.setAttribute(a.name, a.value); + // Skip data-lucide and Alpine.js binding attributes (@, :, x-) + // to avoid InvalidCharacterError on invalid SVG attribute names. + if (a.name === 'data-lucide') return; + if (a.name.startsWith('@') || a.name.startsWith('x-')) return; + try { svg.setAttribute(a.name, a.value); } catch(e) {} }); svg.classList.add('lucide', 'lucide-' + name); if (el.parentNode) el.parentNode.replaceChild(svg, el); diff --git a/omlx/admin/templates/chat.html b/omlx/admin/templates/chat.html index 1e79a259c..3967bc268 100644 --- a/omlx/admin/templates/chat.html +++ b/omlx/admin/templates/chat.html @@ -251,6 +251,63 @@ .thinking-markdown pre { font-size: 0.75rem; } .thinking-content.collapsed { display: none; } + /* Tool use container */ + .tooluse-container { + background: var(--bg-secondary); + border: 1px solid var(--border-faint); + border-radius: 0.75rem; + margin: 0.5em 0; + overflow: hidden; + } + .tooluse-header { + display: flex; + align-items: center; + padding: 0.5rem 0.75rem; + cursor: pointer; + font-size: 0.75rem; + color: var(--text-tertiary); + gap: 0.5rem; + background: var(--bg-secondary); + border-bottom: 1px solid var(--border-faint); + } + .tooluse-header:hover { background: var(--bg-tertiary); } + .tooluse-icon { width: 14px; height: 14px; flex-shrink: 0; } + .tooluse-name { flex: 1; font-weight: 500; font-family: monospace; font-size: 0.75rem; } + .tooluse-toggle { + width: 14px; + height: 14px; + transition: transform 0.2s ease; + transform: rotate(180deg); + } + .tooluse-toggle.collapsed { transform: rotate(0deg); } + .tooluse-body { + padding: 0.75rem 1rem; + font-size: 0.8rem; + background: var(--bg-secondary); + } + .tooluse-body.collapsed { display: none; } + .tooluse-section { margin-bottom: 0.5rem; } + .tooluse-section:last-child { margin-bottom: 0; } + .tooluse-section-label { + font-size: 0.7rem; + text-transform: uppercase; + letter-spacing: 0.05em; + color: var(--text-muted); + margin-bottom: 0.25rem; + } + .tooluse-code { + background: var(--bg-tertiary); + border-radius: 0.375rem; + padding: 0.5rem; + font-family: monospace; + font-size: 0.75rem; + color: var(--text-secondary); + white-space: pre-wrap; + word-break: break-all; + max-height: 200px; + overflow-y: auto; + } + /* Input area */ .input-container { border: 1px solid var(--border-normal); @@ -497,6 +554,18 @@

{{ t('login.login.label_api_key') }}

+ + +