diff --git a/stacks/portal/clawbot.py b/stacks/portal/clawbot.py new file mode 100644 index 0000000..135e96c --- /dev/null +++ b/stacks/portal/clawbot.py @@ -0,0 +1,599 @@ +#!/usr/bin/env python3 +# ============================================================================== +# HomeLab WeChat ClawBot Engine (Tencent iLink Bot Protocol v2.4.10) +# 100% 兼容 @tencent-weixin/openclaw-weixin 官方协议 (ilinkai.weixin.qq.com) +# 支持: +# 1. 生成微信 ClawBot 绑定二维码 & 轮询扫码状态 (支持 IDC 重定向与配对验证码) +# 2. 7x24h 长轮询接收微信消息 (getupdates) + "正在输入..." 状态推送 (sendtyping) +# 3. 微信内直接查询 Mac mini / 极空间状态、触发备份、执行终端指令、与 AGY AI 对话 +# ============================================================================== +import base64 +import json +import os +import random +import re +import subprocess +import threading +import time +import urllib.error +import urllib.parse +import urllib.request +import uuid +from pathlib import Path + +FIXED_BASE_URL = "https://ilinkai.weixin.qq.com" +DEFAULT_BOT_TYPE = "3" +CHANNEL_VERSION = "2.4.10" +# (2 << 16) | (4 << 8) | 10 = 132106 +ILINK_CLIENT_VERSION = str((2 << 16) | (4 << 8) | 10) +ILINK_APP_ID = "bot" + +STATE_DIR = Path("/Users/ixvii0iv/homelab/stacks/wechat-bot") +SESSION_FILE = STATE_DIR / "clawbot_session.json" +SYNC_BUF_FILE = STATE_DIR / "clawbot_sync_buf.txt" + + +def _random_wechat_uin() -> str: + uint32 = random.randint(10000000, 0xFFFFFFFF) + return base64.b64encode(str(uint32).encode("utf-8")).decode("utf-8") + + +def _common_headers() -> dict: + return { + "iLink-App-Id": ILINK_APP_ID, + "iLink-App-ClientVersion": ILINK_CLIENT_VERSION, + } + + +def _post_headers(token: str = "") -> dict: + h = { + "Content-Type": "application/json", + "AuthorizationType": "ilink_bot_token", + "X-WECHAT-UIN": _random_wechat_uin(), + **_common_headers(), + } + if token.strip(): + h["Authorization"] = f"Bearer {token.strip()}" + return h + + +def _base_info() -> dict: + return { + "channel_version": CHANNEL_VERSION, + "bot_agent": "OpenClaw", + } + + +def _parse_lossless_json(raw_text: str) -> dict: + # Quote uint64 message_id / msg_id / svr_id fields so JS/Python keeps exact strings + patched = re.sub( + r'("(?:message_id|msg_id|svr_id)"\s*:\s*)(-?\d+)', + r'\1"\2"', + raw_text, + ) + return json.loads(patched) + + +def _api_get(base_url: str, endpoint: str, timeout: float = 36.0) -> dict: + url = base_url.rstrip("/") + "/" + endpoint.lstrip("/") + req = urllib.request.Request(url, headers=_common_headers(), method="GET") + with urllib.request.urlopen(req, timeout=timeout) as resp: + raw = resp.read().decode("utf-8") + return _parse_lossless_json(raw) + + +def _api_post(base_url: str, endpoint: str, payload: dict, token: str = "", timeout: float = 20.0) -> dict: + url = base_url.rstrip("/") + "/" + endpoint.lstrip("/") + data = json.dumps(payload, ensure_ascii=False).encode("utf-8") + req = urllib.request.Request(url, data=data, headers=_post_headers(token), method="POST") + with urllib.request.urlopen(req, timeout=timeout) as resp: + raw = resp.read().decode("utf-8") + return _parse_lossless_json(raw) + + +class ClawBotManager: + def __init__(self, telemetry_fn=None, action_runner_fn=None): + STATE_DIR.mkdir(parents=True, exist_ok=True) + self.telemetry_fn = telemetry_fn + self.action_runner_fn = action_runner_fn + self._lock = threading.Lock() + + # Saved session credentials + self.session = self._load_session() + + # Active QR login state + self.login_state = { + "active": False, + "qrcode": "", + "qrcode_url": "", + "status": "idle", # idle | wait | scaned | need_verifycode | confirmed | expired | error + "message": "尚未发起扫码登录", + "api_base_url": FIXED_BASE_URL, + "pending_verify_code": "", + "started_at": 0.0, + } + + # Runtime monitor stats + self.last_event_ts = 0.0 + self.last_inbound_text = "" + self.last_reply_text = "" + self.msg_count = 0 + self._stop_event = threading.Event() + self._monitor_thread = None + + if self.is_connected(): + self._start_monitor_thread() + + def _load_session(self) -> dict: + if SESSION_FILE.exists(): + try: + return json.loads(SESSION_FILE.read_text(encoding="utf-8")) + except Exception: + pass + return {} + + def _save_session(self, data: dict): + self.session = data + SESSION_FILE.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8") + + def is_connected(self) -> bool: + return bool(self.session.get("bot_token") and self.session.get("ilink_bot_id")) + + def get_public_status(self) -> dict: + return { + "connected": self.is_connected(), + "bot_id": self.session.get("ilink_bot_id", ""), + "user_id": self.session.get("ilink_user_id", ""), + "base_url": self.session.get("baseurl", FIXED_BASE_URL), + "connected_at": self.session.get("connected_at", ""), + "msg_count": self.msg_count, + "last_inbound_text": self.last_inbound_text, + "last_reply_text": self.last_reply_text, + "login": { + "active": self.login_state["active"], + "qrcode_url": self.login_state["qrcode_url"], + "status": self.login_state["status"], + "message": self.login_state["message"], + }, + } + + # ------------------------------------------------------------------ + # 1. QR Code Login Flow + # ------------------------------------------------------------------ + def start_qr_login(self) -> dict: + try: + local_tokens = [self.session["bot_token"]] if self.session.get("bot_token") else [] + resp = _api_post( + FIXED_BASE_URL, + f"ilink/bot/get_bot_qrcode?bot_type={DEFAULT_BOT_TYPE}", + {"local_token_list": local_tokens}, + timeout=12.0, + ) + qrcode = resp.get("qrcode", "") + qrcode_url = resp.get("qrcode_img_content", "") + if not qrcode or not qrcode_url: + raise RuntimeError(f"未获取到二维码: {resp}") + + with self._lock: + self.login_state = { + "active": True, + "qrcode": qrcode, + "qrcode_url": qrcode_url, + "status": "wait", + "message": "请使用手机微信扫描二维码(或在微信 ClawBot 页面点击「开始扫一扫」)", + "api_base_url": FIXED_BASE_URL, + "pending_verify_code": "", + "started_at": time.time(), + } + + t = threading.Thread(target=self._poll_qr_worker, args=(qrcode,), daemon=True) + t.start() + return {"ok": True, **self.get_public_status()} + except Exception as e: + with self._lock: + self.login_state["status"] = "error" + self.login_state["message"] = f"获取二维码失败: {e}" + return {"ok": False, "message": str(e)} + + def submit_verify_code(self, code: str) -> dict: + clean = code.strip() + if not clean: + return {"ok": False, "message": "请输入有效的数字配对码"} + with self._lock: + self.login_state["pending_verify_code"] = clean + self.login_state["message"] = f"已提交配对码 {clean},正在向微信服务器验证..." + return {"ok": True, **self.get_public_status()} + + def disconnect(self) -> dict: + self._stop_event.set() + if SESSION_FILE.exists(): + SESSION_FILE.unlink() + if SYNC_BUF_FILE.exists(): + SYNC_BUF_FILE.unlink() + self.session = {} + with self._lock: + self.login_state["active"] = False + self.login_state["status"] = "idle" + self.login_state["message"] = "已断开微信 ClawBot 连接" + return {"ok": True, **self.get_public_status()} + + def _poll_qr_worker(self, initial_qrcode: str): + deadline = time.time() + 300.0 # 5 minutes + while time.time() < deadline: + with self._lock: + if not self.login_state["active"] or self.login_state["qrcode"] != initial_qrcode: + return + base_url = self.login_state["api_base_url"] + qrcode = self.login_state["qrcode"] + verify_code = self.login_state["pending_verify_code"] + + endpoint = f"ilink/bot/get_qrcode_status?qrcode={urllib.parse.quote(qrcode)}" + if verify_code: + endpoint += f"&verify_code={urllib.parse.quote(verify_code)}" + + try: + resp = _api_get(base_url, endpoint, timeout=35.0) + except Exception: + resp = {"status": "wait"} + + st = resp.get("status", "wait") + with self._lock: + if self.login_state["qrcode"] != initial_qrcode: + return + self.login_state["status"] = st + + if st == "wait": + pass + elif st == "scaned": + self.login_state["pending_verify_code"] = "" + self.login_state["message"] = "📱 已扫码!请在手机微信上点击确认授权..." + elif st == "scaned_but_redirect": + r_host = resp.get("redirect_host", "") + if r_host: + self.login_state["api_base_url"] = f"https://{r_host}" + self.login_state["message"] = "📱 已扫码,正在切换微信数据中心节点..." + elif st == "need_verifycode": + if self.login_state["pending_verify_code"]: + self.login_state["message"] = "❌ 配对码不匹配,请重新输入手机微信上显示的数字:" + self.login_state["pending_verify_code"] = "" + else: + self.login_state["message"] = "🔢 请输入手机微信屏幕上显示的配对数字:" + elif st == "binded_redirect": + self.login_state["active"] = False + self.login_state["message"] = "✅ 此微信已绑定过当前节点!" + return + elif st in ("expired", "verify_code_blocked"): + self.login_state["active"] = False + self.login_state["message"] = "⏳ 二维码已过期,请点击「刷新二维码」重新扫描" + return + elif st == "confirmed": + bot_token = resp.get("bot_token", "") + bot_id = resp.get("ilink_bot_id", "") + baseurl = resp.get("baseurl") or FIXED_BASE_URL + user_id = resp.get("ilink_user_id", "") + self._save_session( + { + "bot_token": bot_token, + "ilink_bot_id": bot_id, + "baseurl": baseurl, + "ilink_user_id": user_id, + "connected_at": time.strftime("%Y-%m-%d %H:%M:%S"), + } + ) + self.login_state["active"] = False + self.login_state["message"] = "🎉 微信 ClawBot 绑定成功!现在可以直接在微信里收发消息了" + self._start_monitor_thread() + # Send immediate welcome message to the user on WeChat! + if user_id: + threading.Thread( + target=self.send_text_message, + args=( + user_id, + "✅ M6 Mac mini (HomeLab & AGY AI) 已成功连接微信 ClawBot!\n\n" + "你可以直接发送以下内容与我交互:\n" + "• 发送「状态」:查看 M6 Mac mini 与极空间 Z4 实时遥测\n" + "• 发送「备份」:立即打包备份核心数据至极空间 20TB\n" + "• 发送「屏幕」:查看 AGY 云端终端当前实时画面\n" + "• 发送「$ 命令」:在 Mac mini 上执行终端命令 (如 $ df -h)\n" + "• 直接发任何问题:直接转发给 Mac mini 上的 AI 助手回答", + ), + daemon=True, + ).start() + return + + time.sleep(1.0) + + # ------------------------------------------------------------------ + # 2. Long-Poll Monitor & Outbound Messaging + # ------------------------------------------------------------------ + def _start_monitor_thread(self): + if self._monitor_thread and self._monitor_thread.is_alive(): + return + self._stop_event.clear() + self._monitor_thread = threading.Thread(target=self._monitor_loop, daemon=True) + self._monitor_thread.start() + + def send_text_message(self, to_user_id: str, text: str, context_token: str = "", run_id: str = ""): + if not self.is_connected() or not to_user_id or not text: + return + base_url = self.session.get("baseurl") or FIXED_BASE_URL + token = self.session.get("bot_token", "") + client_id = f"openclaw-weixin-{uuid.uuid4().hex[:12]}" + msg_obj = { + "from_user_id": "", + "to_user_id": to_user_id, + "client_id": client_id, + "message_type": 2, # BOT + "message_state": 2, # FINISH + "item_list": [{"type": 1, "text_item": {"text": text}}], + } + if context_token: + msg_obj["context_token"] = context_token + if run_id: + msg_obj["run_id"] = run_id + + payload = { + "msg": msg_obj, + "base_info": _base_info(), + } + try: + _api_post(base_url, "ilink/bot/sendmessage", payload, token=token, timeout=15.0) + self.last_reply_text = text[:120] + except Exception as e: + print(f"[ClawBot] send_text_message error: {e}") + + def _send_typing(self, to_user_id: str, context_token: str = ""): + if not self.is_connected() or not to_user_id: + return + base_url = self.session.get("baseurl") or FIXED_BASE_URL + token = self.session.get("bot_token", "") + try: + cfg = _api_post( + base_url, + "ilink/bot/getconfig", + { + "ilink_user_id": to_user_id, + "context_token": context_token, + "base_info": _base_info(), + }, + token=token, + timeout=8.0, + ) + ticket = cfg.get("typing_ticket", "") + if ticket: + _api_post( + base_url, + "ilink/bot/sendtyping", + { + "ilink_user_id": to_user_id, + "typing_ticket": ticket, + "status": 1, + "base_info": _base_info(), + }, + token=token, + timeout=8.0, + ) + except Exception: + pass + + def _monitor_loop(self): + base_url = self.session.get("baseurl") or FIXED_BASE_URL + token = self.session.get("bot_token", "") + try: + _api_post( + base_url, + "ilink/bot/msg/notifystart", + {"base_info": _base_info()}, + token=token, + timeout=10.0, + ) + except Exception: + pass + + sync_buf = "" + if SYNC_BUF_FILE.exists(): + try: + sync_buf = SYNC_BUF_FILE.read_text(encoding="utf-8").strip() + except Exception: + pass + + while not self._stop_event.is_set() and self.is_connected(): + base_url = self.session.get("baseurl") or FIXED_BASE_URL + token = self.session.get("bot_token", "") + try: + resp = _api_post( + base_url, + "ilink/bot/getupdates", + {"get_updates_buf": sync_buf, "base_info": _base_info()}, + token=token, + timeout=38.0, + ) + new_buf = resp.get("get_updates_buf") + if new_buf: + sync_buf = new_buf + SYNC_BUF_FILE.write_text(sync_buf, encoding="utf-8") + + msgs = resp.get("msgs") or [] + for m in msgs: + # Only handle USER messages (message_type == 1) + if m.get("message_type") == 2: + continue + from_user = m.get("from_user_id", "") + ctx_token = m.get("context_token", "") + run_id = m.get("run_id", "") + items = m.get("item_list") or [] + text_parts = [] + for it in items: + t_type = it.get("type") + if t_type == 1 and it.get("text_item", {}).get("text"): + text_parts.append(it["text_item"]["text"]) + elif t_type == 3 and it.get("voice_item", {}).get("text"): + text_parts.append(it["voice_item"]["text"]) + user_text = "\n".join(text_parts).strip() + if from_user and user_text: + self.msg_count += 1 + self.last_inbound_text = user_text + self.last_event_ts = time.time() + threading.Thread( + target=self._handle_inbound_message, + args=(from_user, user_text, ctx_token, run_id), + daemon=True, + ).start() + except urllib.error.URLError as e: + # Normal long-poll timeout + if "timed out" in str(e).lower(): + continue + time.sleep(2.0) + except TimeoutError: + continue + except Exception as e: + if "timed out" in str(e).lower(): + continue + print(f"[ClawBot] getupdates error: {e}") + time.sleep(3.0) + + # ------------------------------------------------------------------ + # 3. Intelligent Command & AI Router for WeChat Messages + # ------------------------------------------------------------------ + def _handle_inbound_message(self, from_user: str, text: str, ctx_token: str, run_id: str): + self._send_typing(from_user, ctx_token) + cmd = text.strip() + low = cmd.lower() + + # 1. Help + if low in ("帮助", "help", "/help", "?"): + reply = ( + "🍎 HomeLab & AGY 微信中控台指令清单:\n" + "━━━━━━━━━━━━━━\n" + "1️⃣ 发送「状态」或 /status\n" + " 查看 M6 Mac mini、极空间 20TB、联通公网 IP 与狮城专线实时指标\n" + "2️⃣ 发送「备份」或 /backup\n" + " 立即将 Vaultwarden 与核心配置打包灾备至极空间 Z4\n" + "3️⃣ 发送「刷新」或 /ddns\n" + " 立即刷新 Cloudflare 泛域名 DDNS 解析\n" + "4️⃣ 发送「屏幕」或 /screen\n" + " 抓取 Mac mini 上 tmux (agy) 终端的实时画面\n" + "5️⃣ 发送「$ <终端命令>」\n" + " 在 Mac mini 上直接运行 Shell 命令并返回结果 (如: $ df -h)\n" + "6️⃣ 发送「> <按键内容>」\n" + " 直接向 Mac mini 的 tmux (agy) 终端输入文字并回车\n" + "7️⃣ 直接发送任意问题\n" + " 自动调用 Mac mini AI 助手为你解答或执行任务" + ) + self.send_text_message(from_user, reply, ctx_token, run_id) + return + + # 2. Telemetry Status + if low in ("状态", "status", "/status", "监控"): + if self.telemetry_fn: + t = self.telemetry_fn() + mini = t["mini"] + nas = t["nas"] + net = t["network"] + reply = ( + f"🍏 HomeLab 实时状态 ({t['timestamp']})\n" + f"━━━━━━━━━━━━━━\n" + f"🖥 M6 Mac mini ({mini['ip']})\n" + f"• CPU 负载: {mini['cpu_pct']}% (1m: {mini['load_1m']})\n" + f"• 内存占用: {mini['mem_used_gb']} / {mini['mem_total_gb']} GB ({mini['mem_pct']}%)\n" + f"• SSD 占用: {mini['disk_used_gb']} / {mini['disk_total_gb']} GB ({mini['disk_pct']}%)\n" + f"• 在线时长: {mini['uptime']}\n" + f"• AGY 终端: {'🟢 常驻运行中' if mini['agy_tmux'] else '⚪ 待机'}\n\n" + f"💾 极空间 Z4 ({nas['ip']})\n" + f"• 可用余量: {nas['free_tb']} TB / {nas['total_tb']} TB\n" + f"• 最近灾备: {nas['latest_backup']}\n\n" + f"🌐 网络与 AI 算力专线\n" + f"• 家庭公网 IP: {net['home_wan_ip']}\n" + f"• AI 分流策略: {net['ai_policy']}\n" + f"• 狮城节点延迟: {net['sg_delay_ms']} ms\n" + f"• 免端口中控台: https://nav.961504.xyz" + ) + else: + reply = "状态采集接口未就绪" + self.send_text_message(from_user, reply, ctx_token, run_id) + return + + # 3. Backup to ZSpace NAS + if low in ("备份", "backup", "/backup"): + out = self._exec_shell("/Users/ixvii0iv/homelab/scripts/backup-to-nas.sh", timeout=20.0) + self.send_text_message(from_user, f"✅ 极空间 Z4 灾备执行完毕:\n{out or '已完成备份'}", ctx_token, run_id) + return + + # 4. Refresh DDNS + if low in ("刷新", "ddns", "/ddns"): + out = self._exec_shell("/Users/ixvii0iv/homelab/scripts/cloudflare-ddns.sh", timeout=15.0) + self.send_text_message(from_user, f"✅ Cloudflare DDNS 刷新结果:\n{out or '已同步最新公网 IP'}", ctx_token, run_id) + return + + # 5. Capture tmux screen + if low in ("屏幕", "screen", "/screen", "tmux"): + out = self._exec_shell("/opt/homebrew/bin/tmux capture-pane -t agy -p | tail -n 25", timeout=5.0) + self.send_text_message( + from_user, + f"🖥 AGY 终端 (tmux: agy) 最新画面:\n━━━━━━━━━━━━━━\n{out or '(空)'}", + ctx_token, + run_id, + ) + return + + # 6. Direct Shell Command ($ ...) + if cmd.startswith("$"): + shell_cmd = cmd[1:].strip() + if not shell_cmd: + self.send_text_message(from_user, "请在 $ 后输入要执行的命令,例如:$ df -h", ctx_token, run_id) + return + out = self._exec_shell(shell_cmd, timeout=25.0) + if len(out) > 3500: + out = out[-3500:] + "\n...(已截断)" + self.send_text_message(from_user, f"💻 终端执行结果 ($ {shell_cmd}):\n━━━━━━━━━━━━━━\n{out or '(无输出)'}", ctx_token, run_id) + return + + # 7. Inject keys into tmux agy session (> ...) + if cmd.startswith(">"): + keys = cmd[1:].strip() + safe_keys = keys.replace('"', '\\"') + self._exec_shell(f'/opt/homebrew/bin/tmux send-keys -t agy "{safe_keys}" C-m', timeout=5.0) + time.sleep(2.5) + out = self._exec_shell("/opt/homebrew/bin/tmux capture-pane -t agy -p | tail -n 25", timeout=5.0) + self.send_text_message( + from_user, + f"⌨️ 已向 AGY 终端发送指令并捕获最新画面:\n━━━━━━━━━━━━━━\n{out or '(已发送)'}", + ctx_token, + run_id, + ) + return + + # 8. Natural language -> Try agy -p on Mac mini, or inject into tmux agy session! + agy_out = self._exec_shell( + f'cd /Users/ixvii0iv/homelab && /Users/ixvii0iv/.local/bin/agy -c --dangerously-skip-permissions -p {json.dumps(cmd)}', + timeout=90.0, + ) + if agy_out and "authentication required" not in agy_out.lower(): + if len(agy_out) > 3800: + agy_out = agy_out[:3800] + "\n...(内容较长,完整输出请查看 https://agy.961504.xyz)" + self.send_text_message(from_user, agy_out, ctx_token, run_id) + else: + # Fallback: send into tmux agy session and return terminal capture + quick guide + self.send_text_message( + from_user, + f"🤖 收到你的消息:「{cmd}」\n\n" + "💡 提示:检测到 Mac mini 上的 `agy` 终端首次启动需要完成一次 Google 账号登录授权。你可以:\n" + "1. 打开 https://agy.961504.xyz 完成一次扫码/授权码粘贴,之后微信即可直接与 AGY 自由对话!\n" + "2. 现在你已可以直接在微信发送「状态」「备份」「屏幕」或「$ 命令」(如 `$ docker ps`)直接操控 Mac mini!", + ctx_token, + run_id, + ) + + def _exec_shell(self, cmd: str, timeout: float = 15.0) -> str: + try: + env = os.environ.copy() + env["PATH"] = "/Users/ixvii0iv/.local/bin:/Users/ixvii0iv/.orbstack/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" + env["HOME"] = "/Users/ixvii0iv" + env["LANG"] = "en_US.UTF-8" + res = subprocess.run( + cmd, shell=True, capture_output=True, text=True, timeout=timeout, env=env + ) + out = (res.stdout or "") + ("\n" + res.stderr if res.stderr else "") + return out.strip() + except Exception as e: + return f"执行超时或异常: {e}" diff --git a/stacks/portal/dist/assets/index-CYjCaNsV.css b/stacks/portal/dist/assets/index-CYjCaNsV.css deleted file mode 100644 index 58fc9d2..0000000 --- a/stacks/portal/dist/assets/index-CYjCaNsV.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.top-\[22\%\]{top:22%}.top-\[50\%\]{top:50%}.right-5{right:calc(var(--spacing) * 5)}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-\[50\%\]{left:50%}.z-30{z-index:30}.z-50{z-index:50}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-14{height:calc(var(--spacing) * 14)}.h-\[88vh\]{height:88vh}.h-full{height:100%}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-screen{min-height:100vh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-\[1px\]{width:1px}.w-\[95vw\]{width:95vw}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[260px\]{max-width:260px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 10) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 10) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\[var\(--accent\)\]{border-color:var(--accent)}.bg-\[var\(--accent-soft\)\]{background-color:var(--accent-soft)}.bg-\[var\(--bg-card\)\]{background-color:var(--bg-card)}.bg-\[var\(--primary\)\]{background-color:var(--primary)}.bg-\[var\(--success-soft\)\]{background-color:var(--success-soft)}.bg-black{background-color:var(--color-black)}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-black\/75{background-color:#000000bf}@supports (color:color-mix(in lab,red,red)){.bg-black\/75{background-color:color-mix(in oklab,var(--color-black) 75%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0{padding-top:0}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.text-\[var\(--accent\)\]{color:var(--accent)}.text-\[var\(--primary-fg\)\]{color:var(--primary-fg)}.text-\[var\(--success\)\]{color:var(--success)}.text-\[var\(--text-main\)\]{color:var(--text-main)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.uppercase{text-transform:uppercase}.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, )}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){:is(:where(.group):hover .group-hover\:underline){text-decoration-line:underline}}.placeholder\:text-\[var\(--text-subtle\)\]::placeholder{color:var(--text-subtle)}@media(hover:hover){.hover\:bg-\[var\(--bg-muted\)\]:hover{background-color:var(--bg-muted)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=true\]\:bg-\[var\(--bg-muted\)\][data-selected=true]{background-color:var(--bg-muted)}.data-\[selected\=true\]\:text-\[var\(--text-main\)\][data-selected=true]{color:var(--text-main)}.data-\[state\=active\]\:bg-\[var\(--bg-card\)\][data-state=active]{background-color:var(--bg-card)}.data-\[state\=active\]\:text-\[var\(--text-main\)\][data-state=active]{color:var(--text-main)}.data-\[state\=active\]\:shadow-xs[data-state=active]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-\[var\(--accent\)\][data-state=checked]{border-color:var(--accent)}.data-\[state\=checked\]\:bg-\[var\(--accent\)\][data-state=checked]{background-color:var(--accent)}.data-\[state\=unchecked\]\:translate-x-0\.5[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:border-\[var\(--border-color\)\][data-state=unchecked]{border-color:var(--border-color)}.data-\[state\=unchecked\]\:bg-\[var\(--bg-muted\)\][data-state=unchecked]{background-color:var(--bg-muted)}@media(min-width:40rem){.sm\:inline{display:inline}.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\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-8{padding:calc(var(--spacing) * 8)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media(min-width:48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:64rem){.lg\:sticky{position:sticky}.lg\:top-20{top:calc(var(--spacing) * 20)}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-inline:calc(var(--spacing) * 8)}}.\[\&_\[cmdk-group-heading\]\]\:px-2\.5 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-\[10px\] [cmdk-group-heading]{font-size:10px}.\[\&_\[cmdk-group-heading\]\]\:font-semibold [cmdk-group-heading]{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\[cmdk-group-heading\]\]\:tracking-wider [cmdk-group-heading]{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\[\&_\[cmdk-group-heading\]\]\:text-\[var\(--text-subtle\)\] [cmdk-group-heading]{color:var(--text-subtle)}.\[\&_\[cmdk-group-heading\]\]\:uppercase [cmdk-group-heading]{text-transform:uppercase}}:root,[data-theme=dark]{--bg-page:#09090b;--bg-card:#121215;--bg-widget:#16161a;--bg-muted:#18181b;--bg-hover:#1c1c21;--text-main:#f4f4f5;--text-muted:#a1a1aa;--text-subtle:#71717a;--border-color:#27272a;--border-subtle:#ffffff0f;--border-hover:#3f3f46;--primary:#fafafa;--primary-fg:#09090b;--accent:#3b82f6;--accent-soft:#3b82f629;--success:#10b981;--success-soft:#10b98124;--card-shadow:0 4px 16px -4px #0000008c}[data-theme=light]{--bg-page:#f8fafc;--bg-card:#fff;--bg-widget:#f8fafc;--bg-muted:#f1f5f9;--bg-hover:#fff;--text-main:#0f172a;--text-muted:#64748b;--text-subtle:#94a3b8;--border-color:#e2e8f0;--border-subtle:#f1f5f9;--border-hover:#cbd5e1;--primary:#0f172a;--primary-fg:#fff;--accent:#2563eb;--accent-soft:#2563eb1f;--success:#10b981;--success-soft:#10b9811a;--card-shadow:0 1px 3px 0 #0f172a0a, 0 1px 2px -1px #0f172a08}body{background-color:var(--bg-page);color:var(--text-main);-webkit-font-smoothing:antialiased;font-family:Inter,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei,sans-serif;transition:background-color .2s,color .2s}input,textarea,select,button{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;font-family:inherit}input:-webkit-autofill{transition:background-color 5000s ease-in-out;-webkit-text-fill-color:var(--text-main)!important;-webkit-box-shadow:0 0 0px 1000px var(--bg-muted) inset!important}input:-webkit-autofill:hover{transition:background-color 5000s ease-in-out;-webkit-text-fill-color:var(--text-main)!important;-webkit-box-shadow:0 0 0px 1000px var(--bg-muted) inset!important}input:-webkit-autofill:focus{transition:background-color 5000s ease-in-out;-webkit-text-fill-color:var(--text-main)!important;-webkit-box-shadow:0 0 0px 1000px var(--bg-muted) inset!important}textarea:-webkit-autofill{transition:background-color 5000s ease-in-out;-webkit-text-fill-color:var(--text-main)!important;-webkit-box-shadow:0 0 0px 1000px var(--bg-muted) inset!important}.hl-input{background-color:var(--bg-muted);width:100%;color:var(--text-main);border:1px solid var(--border-color);border-radius:.625rem;padding:.55rem .75rem;font-size:.8125rem;line-height:1.25rem;transition:border-color .15s,box-shadow .15s,background-color .15s}.hl-input::placeholder{color:var(--text-subtle)}.hl-input:hover{border-color:var(--border-hover)}.hl-input:focus,.hl-input:focus-visible{background-color:var(--bg-card);border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.hl-input-group{background-color:var(--bg-muted);width:100%;color:var(--text-main);border:1px solid var(--border-color);border-radius:.625rem;align-items:center;gap:.5rem;height:2.375rem;padding:0 .75rem;transition:border-color .15s,box-shadow .15s,background-color .15s;display:flex}.hl-input-group:hover{border-color:var(--border-hover)}.hl-input-group:focus-within{background-color:var(--bg-card);border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.hl-input-group input{min-width:0;height:100%;color:var(--text-main);background:0 0;border:0;flex:1;font-size:.8125rem}.hl-input-group input::placeholder{color:var(--text-subtle)}.font-mono-num{font-variant-numeric:tabular-nums;font-family:JetBrains Mono,SF Mono,Menlo,monospace}.hl-card{background-color:var(--bg-card);border:1px solid var(--border-color);box-shadow:var(--card-shadow);border-radius:.75rem;transition:border-color .16s,transform .16s,box-shadow .16s}.hl-card-interactive:hover{border-color:var(--border-hover);background-color:var(--bg-hover);transform:translateY(-1px)}.hl-widget-footer{background-color:var(--bg-widget);border-top:1px solid var(--border-color)}.hl-pill{background-color:var(--bg-card);border:1px solid var(--border-color);border-radius:.5rem}.hl-muted{background-color:var(--bg-muted)}.hl-border{border-color:var(--border-color)}.hl-btn-primary{background-color:var(--primary);color:var(--primary-fg);border-radius:.5rem;font-weight:500;transition:opacity .15s,transform .1s}.hl-btn-primary:hover{opacity:.9}.hl-btn-primary:active{transform:scale(.99)}.hl-btn-outline{background-color:var(--bg-card);color:var(--text-main);border:1px solid var(--border-color);border-radius:.5rem;transition:background-color .15s,border-color .15s}.hl-btn-outline:hover{background-color:var(--bg-muted);border-color:var(--border-hover)}.hl-bar-fill{background-color:var(--accent);transition:width .5s cubic-bezier(.22,1,.36,1)}.hl-bar-fill-green{background-color:var(--success);transition:width .5s cubic-bezier(.22,1,.36,1)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false} diff --git a/stacks/portal/dist/assets/index-DE2eKnU3.js b/stacks/portal/dist/assets/index-DE2eKnU3.js deleted file mode 100644 index 90b0d57..0000000 --- a/stacks/portal/dist/assets/index-DE2eKnU3.js +++ /dev/null @@ -1,194 +0,0 @@ -var Ry=i=>{throw TypeError(i)};var jy=(i,c,r)=>c.has(i)||Ry("Cannot "+r);var pt=(i,c,r)=>(jy(i,c,"read from private field"),r?r.call(i):c.get(i)),Dy=(i,c,r)=>c.has(i)?Ry("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(i):c.set(i,r),Is=(i,c,r,o)=>(jy(i,c,"write to private field"),o?o.call(i,r):c.set(i,r),r);function Nx(i,c){for(var r=0;ro[f]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const v of m.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).observe(document,{childList:!0,subtree:!0});function r(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(f){if(f.ep)return;f.ep=!0;const m=r(f);fetch(f.href,m)}})();function pg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Fs={exports:{}},ii={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var My;function Cx(){if(My)return ii;My=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function r(o,f,m){var v=null;if(m!==void 0&&(v=""+m),f.key!==void 0&&(v=""+f.key),"key"in f){m={};for(var p in f)p!=="key"&&(m[p]=f[p])}else m=f;return f=m.ref,{$$typeof:i,type:o,key:v,ref:f!==void 0?f:null,props:m}}return ii.Fragment=c,ii.jsx=r,ii.jsxs=r,ii}var Uy;function Tx(){return Uy||(Uy=1,Fs.exports=Cx()),Fs.exports}var d=Tx(),$s={exports:{}},ve={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Hy;function _x(){if(Hy)return ve;Hy=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),v=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),T=Symbol.for("react.view_transition"),B=Symbol.iterator;function D(S){return S===null||typeof S!="object"?null:(S=B&&S[B]||S["@@iterator"],typeof S=="function"?S:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,Z={};function Q(S,z,J){this.props=S,this.context=z,this.refs=Z,this.updater=J||M}Q.prototype.isReactComponent={},Q.prototype.setState=function(S,z){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,z,"setState")},Q.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function V(){}V.prototype=Q.prototype;function P(S,z,J){this.props=S,this.context=z,this.refs=Z,this.updater=J||M}var F=P.prototype=new V;F.constructor=P,H(F,Q.prototype),F.isPureReactComponent=!0;var G=Array.isArray;function U(){}var k={H:null,A:null,T:null,S:null},ce=Object.prototype.hasOwnProperty;function xe(S,z,J){var I=J.ref;return{$$typeof:i,type:S,key:z,ref:I!==void 0?I:null,props:J}}function he(S,z){return xe(S.type,z,S.props)}function se(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function je(S){var z={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(J){return z[J]})}var ze=/\/+/g;function ye(S,z){return typeof S=="object"&&S!==null&&S.key!=null?je(""+S.key):z.toString(36)}function K(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(U,U):(S.status="pending",S.then(function(z){S.status==="pending"&&(S.status="fulfilled",S.value=z)},function(z){S.status==="pending"&&(S.status="rejected",S.reason=z)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function W(S,z,J,I,de){var te=typeof S;(te==="undefined"||te==="boolean")&&(S=null);var Se=!1;if(S===null)Se=!0;else switch(te){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(S.$$typeof){case i:case c:Se=!0;break;case N:return Se=S._init,W(Se(S._payload),z,J,I,de)}}if(Se)return de=de(S),Se=I===""?"."+ye(S,0):I,G(de)?(J="",Se!=null&&(J=Se.replace(ze,"$&/")+"/"),W(de,z,J,"",function(Mt){return Mt})):de!=null&&(se(de)&&(de=he(de,J+(de.key==null||S&&S.key===de.key?"":(""+de.key).replace(ze,"$&/")+"/")+Se)),z.push(de)),1;Se=0;var ae=I===""?".":I+":";if(G(S))for(var fe=0;fe>>1,q=K[ge];if(0>>1;gef(re,ie))Sf(z,re)?(K[ge]=z,K[S]=ie,ge=S):(K[ge]=re,K[X]=ie,ge=X);else if(Sf(z,ie))K[ge]=z,K[S]=ie,ge=S;else break e}}return W}function f(K,W){var ie=K.sortIndex-W.sortIndex;return ie!==0?ie:K.id-W.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var v=Date,p=v.now();i.unstable_now=function(){return v.now()-p}}var E=[],b=[],N=1,y=null,T=3,B=!1,D=!1,M=!1,H=!1,Z=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function P(K){for(var W=r(b);W!==null;){if(W.callback===null)o(b);else if(W.startTime<=K)o(b),W.sortIndex=W.expirationTime,c(E,W);else break;W=r(b)}}function F(K){if(M=!1,P(K),!D)if(r(E)!==null)D=!0,G||(G=!0,se());else{var W=r(b);W!==null&&ye(F,W.startTime-K)}}var G=!1,U=-1,k=5,ce=-1;function xe(){return H?!0:!(i.unstable_now()-ceK&&xe());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,T=y.priorityLevel;var q=ge(y.expirationTime<=K);if(K=i.unstable_now(),typeof q=="function"){y.callback=q,P(K),W=!0;break t}y===r(E)&&o(E),P(K)}else o(E);y=r(E)}if(y!==null)W=!0;else{var Ce=r(b);Ce!==null&&ye(F,Ce.startTime-K),W=!1}}break e}finally{y=null,T=ie,B=!1}W=void 0}}finally{W?se():G=!1}}}var se;if(typeof V=="function")se=function(){V(he)};else if(typeof MessageChannel<"u"){var je=new MessageChannel,ze=je.port2;je.port1.onmessage=he,se=function(){ze.postMessage(null)}}else se=function(){Z(he,0)};function ye(K,W){U=Z(function(){K(i.unstable_now())},W)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(K){K.callback=null},i.unstable_forceFrameRate=function(K){0>K||125ge?(K.sortIndex=ie,c(b,K),r(E)===null&&K===r(b)&&(M?(Q(U),U=-1):M=!0,ye(F,ie-ge))):(K.sortIndex=q,c(E,K),D||B||(D=!0,G||(G=!0,se()))),K},i.unstable_shouldYield=xe,i.unstable_wrapCallback=function(K){var W=T;return function(){var ie=T;T=W;try{return K.apply(this,arguments)}finally{T=ie}}}})(ef)),ef}var Ly;function Ox(){return Ly||(Ly=1,Ws.exports=wx()),Ws.exports}var tf={exports:{}},bt={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Gy;function Ax(){if(Gy)return bt;Gy=1;var i=zf();function c(N){var y="https://react.dev/errors/"+N;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),tf.exports=Ax(),tf.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var qy;function zx(){if(qy)return ci;qy=1;var i=Ox(),c=zf(),r=bg();function o(e){var t="https://react.dev/errors/"+e;if(1da||(e.current=Il[da],Il[da]=null,da--)}function Ge(e,t){da++,Il[da]=e.current,e.current=t}var vl=hl(null),du=hl(null),Fl=hl(null),vi=hl(null);function yi(e,t){switch(Ge(Fl,t),Ge(du,e),Ge(vl,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gv(t),e=Yv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ft(vl),Ge(vl,e)}function ma(){ft(vl),ft(du),ft(Fl)}function hr(e){var t=e.memoizedState;t!==null&&(eu._currentValue=t.memoizedState,Ge(vi,e)),t=vl.current;var l=Yv(t,e.type);t!==l&&(Ge(du,e),Ge(vl,l))}function gi(e){du.current===e&&(ft(vl),ft(du)),vi.current===e&&(ft(vi),eu._currentValue=Mt)}var vr,cd;function $l(e){if(vr===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);vr=t&&t[1]||"",cd=-1)":-1a||x[n]!==O[a]){var j=` -`+x[n].replace(" at new "," at ");return e.displayName&&j.includes("")&&(j=j.replace("",e.displayName)),j}while(1<=n&&0<=a);break}}}finally{yr=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?$l(l):""}function w0(e,t){switch(e.tag){case 26:case 27:case 5:return $l(e.type);case 16:return $l("Lazy");case 13:return e.child!==t&&t!==null?$l("Suspense Fallback"):$l("Suspense");case 19:return $l("SuspenseList");case 0:case 15:return gr(e.type,!1);case 11:return gr(e.type.render,!1);case 1:return gr(e.type,!0);case 31:return $l("Activity");case 30:return $l("ViewTransition");default:return""}}function rd(e){try{var t="",l=null;do t+=w0(e,l),l=e,e=e.return;while(e);return t}catch(n){return` -Error generating stack: `+n.message+` -`+n.stack}}var pr=Object.prototype.hasOwnProperty,br=i.unstable_scheduleCallback,xr=i.unstable_cancelCallback,O0=i.unstable_shouldYield,A0=i.unstable_requestPaint,Ut=i.unstable_now,z0=i.unstable_getCurrentPriorityLevel,od=i.unstable_ImmediatePriority,sd=i.unstable_UserBlockingPriority,pi=i.unstable_NormalPriority,R0=i.unstable_LowPriority,fd=i.unstable_IdlePriority,j0=i.log,D0=i.unstable_setDisableYieldValue,mu=null,Ht=null;function Pl(e){if(typeof j0=="function"&&D0(e),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(mu,e)}catch{}}var Bt=Math.clz32?Math.clz32:H0,M0=Math.log,U0=Math.LN2;function H0(e){return e>>>=0,e===0?32:31-(M0(e)/U0|0)|0}var bi=256,xi=262144,Si=4194304;function Mn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ei(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var a=0,u=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var h=n&134217727;return h!==0?(n=h&~u,n!==0?a=Mn(n):(s&=h,s!==0?a=Mn(s):l||(l=h&~e,l!==0&&(a=Mn(l))))):(h=n&~u,h!==0?a=Mn(h):s!==0?a=Mn(s):l||(l=n&~e,l!==0&&(a=Mn(l)))),a===0?0:t!==0&&t!==a&&(t&u)===0&&(u=a&-a,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:a}function hu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dd(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0l;l++)t.push(e);return t}function vu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function k0(e,t,l,n,a,u){var s=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,x=e.expirationTimes,O=e.hiddenUpdates;for(l=s&~l;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rr=!1;if(jl)try{var bu={};Object.defineProperty(bu,"passive",{get:function(){Rr=!0}}),window.addEventListener("test",bu,bu),window.removeEventListener("test",bu,bu)}catch{Rr=!1}var Wl=null,jr=null,Oi=null;function Hd(){if(Oi)return Oi;var e,t=jr,l=t.length,n,a="value"in Wl?Wl.value:Wl.textContent,u=a.length;for(e=0;e=Eu),qd=" ",Vd=!1;function Xd(e,t){switch(e){case"keyup":return xb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ea=!1;function Eb(e,t){switch(e){case"compositionend":return Qd(t);case"keypress":return t.which!==32?null:(Vd=!0,qd);case"textInput":return e=t.data,e===qd&&Vd?null:e;default:return null}}function Nb(e,t){if(Ea)return e==="compositionend"||!Br&&Xd(e,t)?(e=Hd(),Oi=jr=Wl=null,Ea=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function em(e,t){var l=Wd(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wd(l)}}function tm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Gr(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Rb=jl&&"documentMode"in document&&11>=document.documentMode,Na=null,qr=null,_u=null,Vr=!1;function nm(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Vr||Na==null||Na!==Gr(n)||(n=Na,"selectionStart"in n&&Yr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),_u&&Tu(_u,n)||(_u=n,n=Dc(qr,"onSelect"),0>=s,a-=s,gl=1<<32-Bt(t)+a|l<me?(et=oe,oe=null):et=oe.sibling;var Ae=_(w,oe,A[me],L);if(Ae===null){oe===null&&(oe=et);break}e&&oe&&Ae.alternate===null&&t(w,oe),C=u(Ae,C,me),Oe===null?ee=Ae:Oe.sibling=Ae,Oe=Ae,oe=et}if(me===A.length)return l(w,oe),Ee&&Hl(w,me),ee;if(oe===null){for(;meme?(et=oe,oe=null):et=oe.sibling;var Tn=_(w,oe,Ae.value,L);if(Tn===null){oe===null&&(oe=et);break}e&&oe&&Tn.alternate===null&&t(w,oe),C=u(Tn,C,me),Oe===null?ee=Tn:Oe.sibling=Tn,Oe=Tn,oe=et}if(Ae.done)return l(w,oe),Ee&&Hl(w,me),ee;if(oe===null){for(;!Ae.done;me++,Ae=A.next())Ae=Y(w,Ae.value,L),Ae!==null&&(C=u(Ae,C,me),Oe===null?ee=Ae:Oe.sibling=Ae,Oe=Ae);return Ee&&Hl(w,me),ee}for(oe=n(oe);!Ae.done;me++,Ae=A.next())Ae=R(oe,w,me,Ae.value,L),Ae!==null&&(e&&(et=Ae.alternate,et!==null&&oe.delete(et.key===null?me:et.key)),C=u(Ae,C,me),Oe===null?ee=Ae:Oe.sibling=Ae,Oe=Ae);return e&&oe.forEach(function(Ex){return t(w,Ex)}),Ee&&Hl(w,me),ee}function be(w,C,A,L){if(typeof A=="object"&&A!==null&&A.type===he&&A.key===null&&A.props.ref===void 0&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case ce:e:{for(var ee=A.key;C!==null;){if(C.key===ee){if(ee=A.type,ee===he){if(C.tag===7){l(w,C.sibling),L=a(C,A.props.children),un(L,A),L.return=w,w=L;break e}}else if(C.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===q&&Kn(ee)===C.type){l(w,C.sibling),L=a(C,A.props),un(L,A),L.return=w,w=L;break e}l(w,C);break}else t(w,C);C=C.sibling}A.type===he?(L=Gn(A.props.children,w.mode,L,A.key),un(L,A),L.return=w,w=L):(L=ki(A.type,A.key,A.props,null,w.mode,L),un(L,A),L.return=w,w=L)}return s(w);case xe:e:{for(ee=A.key;C!==null;){if(C.key===ee)if(C.tag===4&&C.stateNode.containerInfo===A.containerInfo&&C.stateNode.implementation===A.implementation){l(w,C.sibling),L=a(C,A.children||[]),L.return=w,w=L;break e}else{l(w,C);break}else t(w,C);C=C.sibling}L=Fr(A,w.mode,L),L.return=w,w=L}return s(w);case q:return A=Kn(A),be(w,C,A,L)}if(Se(A))return $(w,C,A,L);if(I(A)){if(ee=I(A),typeof ee!="function")throw Error(o(150));return A=ee.call(A),ue(w,C,A,L)}if(typeof A.then=="function")return be(w,C,Ji(A),L);if(A.$$typeof===ye)return be(w,C,Xi(w,A),L);Ii(w,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,C!==null&&C.tag===6?(l(w,C.sibling),L=a(C,A),L.return=w,w=L):(l(w,C),L=Ir(A,w.mode,L),L.return=w,w=L),s(w)):l(w,C)}return function(w,C,A,L){try{ju=0;var ee=be(w,C,A,L);return ja=null,ee}catch(oe){if(oe===Ra||oe===Zi)throw oe;var Oe=wt(29,oe,null,w.mode);return Oe.lanes=L,Oe.return=w,Oe}finally{}}}var In=wm(!0),Om=wm(!1),cn=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function co(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function rn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function on(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(De&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=Bi(e),fm(e,null,l),t}return Hi(e,n,t,l),Bi(e)}function Du(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,vd(e,l)}}function ro(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var s={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?a=u=s:u=u.next=s,l=l.next}while(l!==null);u===null?a=u=t:u=u.next=t}else a=u=t;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var oo=!1;function Mu(){if(oo){var e=za;if(e!==null)throw e}}function Uu(e,t,l,n){oo=!1;var a=e.updateQueue;cn=!1;var u=a.firstBaseUpdate,s=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var x=h,O=x.next;x.next=null,s===null?u=O:s.next=O,s=x;var j=e.alternate;j!==null&&(j=j.updateQueue,h=j.lastBaseUpdate,h!==s&&(h===null?j.firstBaseUpdate=O:h.next=O,j.lastBaseUpdate=x))}if(u!==null){var Y=a.baseState;s=0,j=O=x=null,h=u;do{var _=h.lane&-536870913,R=_!==h.lane;if(R?(we&_)===_:(n&_)===_){_!==0&&_===Qn&&(oo=!0),j!==null&&(j=j.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var $=e,ue=h;_=t;var be=l;switch(ue.tag){case 1:if($=ue.payload,typeof $=="function"){Y=$.call(be,Y,_);break e}Y=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=ue.payload,_=typeof $=="function"?$.call(be,Y,_):$,_==null)break e;Y=U({},Y,_);break e;case 2:cn=!0}}_=h.callback,_!==null&&(e.flags|=64,R&&(e.flags|=8192),R=a.callbacks,R===null?a.callbacks=[_]:R.push(_))}else R={lane:_,tag:h.tag,payload:h.payload,callback:h.callback,next:null},j===null?(O=j=R,x=Y):j=j.next=R,s|=_;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;R=h,h=R.next,R.next=null,a.lastBaseUpdate=R,a.shared.pending=null}}while(!0);j===null&&(x=Y),a.baseState=x,a.firstBaseUpdate=O,a.lastBaseUpdate=j,u===null&&(a.shared.lanes=0),yn|=s,e.lanes=s,e.memoizedState=Y}}function Am(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function zm(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eu?u:8;var s=ae.T,h={};h.types=s!==null?s.types:null,ae.T=h,zo(e,!1,t,l);try{var x=a(),O=ae.S;if(O!==null&&O(h,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var j=qb(x,n);Lu(e,t,j,Xt(e))}else Lu(e,t,n,Xt(e))}catch(Y){Lu(e,t,{then:function(){},status:"rejected",reason:Y},Xt())}finally{fe.p=u,s!==null&&h.types!==null&&(s.types=h.types),ae.T=s}}function Jb(){}function Oo(e,t,l,n){if(e.tag!==5)throw Error(o(476));var a=rh(e).queue;ch(e,a,t,Mt,l===null?Jb:function(){return oh(e),l(n)})}function rh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Mt,baseState:Mt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gl,lastRenderedState:Mt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function oh(e){var t=rh(e);t.next===null&&(t=e.alternate.memoizedState),Lu(e,t.next.queue,{},Xt())}function Ao(){return mt(eu)}function sh(){return Ie().memoizedState}function fh(){return Ie().memoizedState}function Ib(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Xt();e=rn(l);var n=on(t,e,l);n!==null&&(Rt(n,t,l),Du(n,t,l)),t={cache:lo()},e.payload=t;return}t=t.return}}function Fb(e,t,l){var n=Xt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},uc(e)?mh(t,l):(l=Kr(e,t,l,n),l!==null&&(Rt(l,e,n),hh(l,t,n)))}function dh(e,t,l){var n=Xt();Lu(e,t,l,n)}function Lu(e,t,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(uc(e))mh(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var s=t.lastRenderedState,h=u(s,l);if(a.hasEagerState=!0,a.eagerState=h,Lt(h,s))return Hi(e,t,a,0),Le===null&&Ui(),!1}catch{}finally{}if(l=Kr(e,t,a,n),l!==null)return Rt(l,e,n),hh(l,t,n),!0}return!1}function zo(e,t,l,n){if(n={lane:2,revertLane:xs(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},uc(e)){if(t)throw Error(o(479))}else t=Kr(e,l,n,2),t!==null&&Rt(t,e,2)}function uc(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function mh(e,t){Da=Pi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function hh(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,vd(e,l)}}var ic={readContext:mt,use:tc,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useInsertionEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useSyncExternalStore:Ke,useId:Ke,useHostTransitionStatus:Ke,useFormState:Ke,useActionState:Ke,useOptimistic:Ke,useMemoCache:Ke,useCacheRefresh:Ke,useEffectEvent:Ke},vh={readContext:mt,use:tc,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:Pm,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,nc(4194308,4,lh.bind(null,t,e),l)},useLayoutEffect:function(e,t){return nc(4194308,4,e,t)},useInsertionEffect:function(e,t){nc(4,2,e,t)},useMemo:function(e,t){var l=Nt();t=t===void 0?null:t;var n=e();if(Fn){Pl(!0);try{e()}finally{Pl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Nt();if(l!==void 0){var a=l(t);if(Fn){Pl(!0);try{l(t)}finally{Pl(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=Fb.bind(null,pe,e),[n.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:function(e){e=No(e);var t=e.queue,l=dh.bind(null,pe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:_o,useDeferredValue:function(e,t){var l=Nt();return wo(l,e,t)},useTransition:function(){var e=No(!1);return e=ch.bind(null,pe,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=pe,a=Nt();if(Ee){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Le===null)throw Error(o(349));(we&127)!==0||Hm(n,t,l)}a.memoizedState=l;var u={value:l,getSnapshot:t};return a.queue=u,Pm(km.bind(null,n,u,e),[e]),n.flags|=2048,Ua(9,{destroy:void 0},Bm.bind(null,n,u,l,t),null),l},useId:function(){var e=Nt(),t=Le.identifierPrefix;if(Ee){var l=pl,n=gl;l=(n&~(1<<32-Bt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Wi++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?s.createElement(a,{is:n.is}):s.createElement(a)}}u[dt]=t,u[_t]=n;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)u.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=u;e:switch(gt(u,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&ql(t)}}return qe(t),t.subtreeFlags&=-33554433,Vo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ql(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=Fl.current,Aa(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,a=it,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||kv(e.nodeValue,l)),e||nn(t,!0)}else e=Pu(e).createTextNode(n),e[dt]=t,t.stateNode=e}return qe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=Aa(t),l!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[dt]=t}else Yn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else l=Wr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Gt(t),t):(Gt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Aa(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(o(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));a[dt]=t}else Yn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),a=!1}else a=Wr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Gt(t),t):(Gt(t),null)}return Gt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),dc(t,t.updateQueue),qe(t),null);case 4:return ma(),e===null&&Cs(t.stateNode.containerInfo),t.flags|=67108864,qe(t),null;case 10:return kl(t.type),qe(t),null;case 19:if(ho(t),n=t.memoizedState,n===null)return qe(t),null;if(a=(t.flags&128)!==0,u=n.rendering,u===null)if(a)Yu(n,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=$i(e),u!==null){for(t.flags|=128,Yu(n,!1),e=u.updateQueue,t.updateQueue=e,dc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)dm(l,e),l=l.sibling;return Hu(t,vt.current&1|2),Ee&&Hl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ut()>Cc&&(t.flags|=128,a=!0,Yu(n,!1),t.lanes=4194304)}else{if(!a)if(e=$i(u),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,dc(t,e),Yu(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!u.alternate&&!Ee)return qe(t),null}else 2*Ut()-n.renderingStartTime>Cc&&l!==536870912&&(t.flags|=128,a=!0,Yu(n,!1),t.lanes=4194304);n.isBackwards?(u.sibling=t.child,t.child=u):(e=n.last,e!==null?e.sibling=u:t.child=u,n.last=u)}if(n.tail!==null){e=n.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ut(),e.sibling=null,u=vt.current,u=a?u&1|2:u&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||Ee?Hu(t,u):(l=u,Ge(ht,t),Ge(vt,l),St===null&&(St=t)),Ee&&Hl(t,n.treeForkCount),e}return qe(t),null;case 22:case 23:return Gt(t),fo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),l=t.updateQueue,l!==null&&dc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&ft(Zn),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),kl($e),qe(t),null;case 25:return null;case 30:return t.flags|=33554432,qe(t),null}throw Error(o(156,t.tag))}function n1(e,t){switch($r(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kl($e),ma(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return gi(t),null;case 31:if(t.memoizedState!==null){if(Gt(t),t.alternate===null)throw Error(o(340));Yn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Gt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Yn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ho(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ma(),null;case 10:return kl(t.type),null;case 22:case 23:return Gt(t),fo(),e!==null&&ft(Zn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return kl($e),null;case 25:return null;default:return null}}function Gh(e,t){switch($r(t),t.tag){case 3:kl($e),ma();break;case 26:case 27:case 5:gi(t);break;case 4:ma();break;case 31:t.memoizedState!==null&&Gt(t);break;case 13:Gt(t);break;case 19:ho(t);break;case 10:kl(t.type);break;case 22:case 23:Gt(t),fo(),e!==null&&ft(Zn);break;case 24:kl($e)}}function qu(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&e)===e){n=void 0;var u=l.create,s=l.inst;n=u(),s.destroy=n}l=l.next}while(l!==a)}}catch(h){He(t,t.return,h)}}function mn(e,t,l){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var u=a.next;n=u;do{if((n.tag&e)===e){var s=n.inst,h=s.destroy;if(h!==void 0){s.destroy=void 0,a=t;var x=l,O=h;try{O()}catch(j){He(a,x,j)}}}n=n.next}while(n!==u)}}catch(j){He(t,t.return,j)}}function Yh(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{zm(t,l)}catch(n){He(e,e.return,n)}}}function qh(e,t,l){l.props=$n(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){He(e,t,n)}}function bl(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:var a=e.stateNode,u=Dl(e.memoizedProps,a);(a.ref===null||a.ref.name!==u)&&(a.ref=Iv(u)),n=a.ref;break;case 7:if(e.stateNode===null){var s=new Qt(e);y(e.child,!1,K1,s,void 0,void 0),e.stateNode=s}n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(h){He(e,t,h)}}function yt(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){He(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){He(e,t,a)}else l.current=null}function mc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l title"))),gt(n,t,l),n[dt]=e,ut(n),t=n;break e;case"link":if(u=dy("link","href",a).get(t+(l.href||""))){for(s=0;sbe&&(s=be,be=ue,ue=s);var w=em(h,ue),C=em(h,be);if(w&&C&&(R.rangeCount!==1||R.anchorNode!==w.node||R.anchorOffset!==w.offset||R.focusNode!==C.node||R.focusOffset!==C.offset)){var A=Y.createRange();A.setStart(w.node,w.offset),R.removeAllRanges(),ue>be?(R.addRange(A),R.extend(C.node,C.offset)):(A.setEnd(C.node,C.offset),R.addRange(A))}}}}for(Y=[],R=h;R=R.parentNode;)R.nodeType===1&&Y.push({element:R,left:R.scrollLeft,top:R.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;hl?32:l,ae.T=null,l=ss,ss=null;var u=dl,s=Tl;if(Qe=0,ta=dl=null,Tl=0,(De&6)!==0)throw Error(o(331));var h=De;if(De|=4,fv(u.current),rv(u,u.current,s,l),De=h,Iu(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(mu,u)}catch{}return!0}finally{fe.p=a,ae.T=n,_v(e,t)}}function wv(e,t,l){t=Ft(l,t),t=Do(e.stateNode,t,2),e=on(e,t,2),e!==null&&(vu(e,2),_l(e))}function He(e,t,l){if(e.tag===3)wv(e,e,l);else for(;t!==null;){if(t.tag===3){wv(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(gn===null||!gn.has(n))){e=Ft(l,e),l=Nh(2),n=on(t,l,2),n!==null&&(Ch(l,n,t,e),vu(n,2),_l(n));break}}t=t.return}}function gs(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new c1;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(l)||(cs=!0,a.add(l),e=v1.bind(null,e,t,l),t.then(e,e))}function v1(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Le===e&&(we&l)===l&&((Je===4||Je===3&&(we&62914560)===we&&300>Ut()-Nc)&&(De&2)===0?Za(e,0):Ec|=l,Ya===we&&(Ya=0)),_l(e)}function Ov(e,t){t===0&&(t=md()),e=Ln(e,t),e!==null&&(vu(e,t),_l(e))}function y1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Ov(e,l)}function g1(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),Ov(e,l)}function p1(e,t){return br(e,t)}var Ja=null,Ia=null,ps=!1,Rc=!1,bs=!1,bn=0;function _l(e){e!==Ia&&e.next===null&&(Ia===null?Ja=Ia=e:Ia=Ia.next=e),Rc=!0,ps||(ps=!0,x1())}function Iu(e,t){if(!bs&&Rc){bs=!0;do for(var l=!1,n=Ja;n!==null;){if(e!==0){var a=n.pendingLanes;if(a===0)var u=0;else{var s=n.suspendedLanes,h=n.pingedLanes;u=(1<<31-Bt(42|e)+1)-1,u&=a&~(s&~h),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,jv(n,u))}else u=we,u=Ei(n,n===Le?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||hu(n,u)||(l=!0,jv(n,u));n=n.next}while(l);bs=!1}}function b1(){Av()}function Av(){Rc=ps=!1;var e=0;bn!==0&&R1()&&(e=bn);for(var t=Ut(),l=null,n=Ja;n!==null;){var a=n.next,u=zv(n,t);u===0?(n.next=null,l===null?Ja=a:l.next=a,a===null&&(Ia=l)):(l=n,(e!==0||(u&3)!==0)&&(Rc=!0)),n=a}Qe!==0&&Qe!==5||Iu(e),bn!==0&&(bn=0)}function zv(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes&-62914561;0h)break;var j=x.transferSize,Y=x.initiatorType;j&&Lv(Y)&&(x=x.responseEnd,s+=j*(xHc){ue.length=$;break}A=new Promise(B1.bind(A)),ue.push(A)}}}if(0"u"?null:document;function ry(e,t,l){var n=$a;if(n&&typeof t=="string"&&t){var a=Jt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),cy.has(a)||(cy.add(a),e={rel:e,crossOrigin:l,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),gt(t,"link",e),ut(t),n.head.appendChild(t)))}}function lx(e){Xl.D(e),ry("dns-prefetch",e,null)}function nx(e,t){Xl.C(e,t),ry("preconnect",e,t)}function ax(e,t,l){Xl.L(e,t,l);var n=$a;if(n&&e&&t){var a='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Jt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Jt(l.imageSizes)+'"]')):a+='[href="'+Jt(e)+'"]';var u=a;switch(t){case"style":u=Pa(e);break;case"script":u=Wa(e)}if(!(ll.has(u)||(e=U({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),ll.set(u,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(ei(u))||t==="script"&&n.querySelector(ti(u))))){var s=n.createElement("link");gt(s,"link",e),t==="style"&&(s[Ni]=!0,s.onload=s.onerror=function(){Sd(s)}),ut(s),n.head.appendChild(s)}}}function ux(e,t){Xl.m(e,t);var l=$a;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Jt(n)+'"][href="'+Jt(e)+'"]',u=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Wa(e)}if(!ll.has(u)&&(e=U({rel:"modulepreload",href:e},t),ll.set(u,e),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ti(u)))return}n=l.createElement("link"),gt(n,"link",e),ut(n),l.head.appendChild(n)}}}function ix(e,t,l){Xl.S(e,t,l);var n=$a;if(n&&e){var a=ya(n).hoistableStyles,u=Pa(e);t=t||"default";var s=a.get(u);if(!s){var h={loading:0,preload:null};if(s=n.querySelector(ei(u)))h.loading=5;else{e=U({rel:"stylesheet",href:e,"data-precedence":t},l),(l=ll.get(u))&&Gs(e,l);var x=s=n.createElement("link");ut(x),gt(x,"link",e),x._p=new Promise(function(O,j){x.onload=O,x.onerror=j}),x.addEventListener("load",function(){h.loading|=1}),x.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Mc(s,t,n)}s={type:"stylesheet",instance:s,count:1,state:h},a.set(u,s)}}}function cx(e,t){Xl.X(e,t);var l=$a;if(l&&e){var n=ya(l).hoistableScripts,a=Wa(e),u=n.get(a);u||(u=l.querySelector(ti(a)),u||(e=U({src:e,async:!0},t),(t=ll.get(a))&&Ys(e,t),u=l.createElement("script"),ut(u),gt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function rx(e,t){Xl.M(e,t);var l=$a;if(l&&e){var n=ya(l).hoistableScripts,a=Wa(e),u=n.get(a);u||(u=l.querySelector(ti(a)),u||(e=U({src:e,async:!0,type:"module"},t),(t=ll.get(a))&&Ys(e,t),u=l.createElement("script"),ut(u),gt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function oy(e,t,l,n){var a=(a=Fl.current)?Wu(a):null;if(!a)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Pa(l.href),t=ya(a).hoistableStyles,n=t.get(l),n||(n={type:"style",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Pa(l.href);var u=ya(a).hoistableStyles,s=u.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,s),(u=a.querySelector(ei(e)))?u._p||(s.instance=u,s.state.loading=5):(u=ll.get(e),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ll.set(e,u)),ox(a,e,u,s.state))),t&&n===null)throw Error(o(528,""));return s}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Wa(l),t=ya(a).hoistableScripts,n=t.get(l),n||(n={type:"script",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Pa(e){return'href="'+Jt(e)+'"'}function ei(e){return'link[rel="stylesheet"]['+e+"]"}function sy(e){return U({},e,{"data-precedence":e.precedence,precedence:null})}function ox(e,t,l,n){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Ni]!==!0){n.loading=1;return}}else t=e.createElement("link"),t[Ni]=!0,t.onload=t.onerror=Sd.bind(null,t),gt(t,"link",l),ut(t),e.head.appendChild(t);n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2})}function Wa(e){return'[src="'+Jt(e)+'"]'}function ti(e){return"script[async]"+e}function fy(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Jt(l.href)+'"]');if(n)return t.instance=n,ut(n),n;var a=U({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),ut(n),gt(n,"style",a),Mc(n,l.precedence,e),t.instance=n;case"stylesheet":a=Pa(l.href);var u=e.querySelector(ei(a));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;n=sy(l),(a=ll.get(a))&&Gs(n,a),u=(e.ownerDocument||e).createElement("link"),ut(u);var s=u;return s._p=new Promise(function(h,x){s.onload=h,s.onerror=x}),gt(u,"link",n),t.state.loading|=4,Mc(u,l.precedence,e),t.instance=u;case"script":return u=Wa(l.src),(a=e.querySelector(ti(u)))?(t.instance=a,ut(a),a):(n=l,(a=ll.get(u))&&(n=U({},l),Ys(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),ut(a),gt(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Mc(n,l.precedence,e));return t.instance}function Mc(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,u=a,s=0;s title"):null)}function sx(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function my(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function hy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function vy(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function yy(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=vy(t),e.suspenseyImages.push(t)),e=mx.bind(e),t.decode().then(e,e))}function fx(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Pa(n.href),u=t.querySelector(ei(a));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=li.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,ut(u);return}u=t.ownerDocument||t,n=sy(n),(a=ll.get(a))&&Gs(n,a),u=u.createElement("link"),ut(u);var s=u;s._p=new Promise(function(h,x){s.onload=h,s.onerror=x}),gt(u,"link",n),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=li.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Hc=0;function dx(e,t){return e.stylesheets&&e.count===0&&kc(e,e.stylesheets),0Hc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function gy(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)kc(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function li(){this.count--,gy(this)}function mx(){this.imgCount--,gy(this)}var Bc=null;function kc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bc=new Map,t.forEach(hx,e),Bc=null,li.call(e))}function hx(e,t){if(!(t.state.loading&4)){var l=Bc.get(e);if(l)var n=l.get(null);else{l=new Map,Bc.set(e,l);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),Ps.exports=zx(),Ps.exports}var jx=Rx();const Dx=pg(jx),Xy=i=>{let c;const r=new Set,o=(b,N)=>{const y=typeof b=="function"?b(c):b;if(!Object.is(y,c)){const T=c;c=N??(typeof y!="object"||y===null)?y:Object.assign({},c,y),r.forEach(B=>B(c,T))}},f=()=>c,p={setState:o,getState:f,getInitialState:()=>E,subscribe:b=>(r.add(b),()=>r.delete(b))},E=c=i(o,f,p);return p},Mx=(i=>i?Xy(i):Xy),Ux=i=>i;function Hx(i,c=Ux){const r=si.useSyncExternalStore(i.subscribe,si.useCallback(()=>c(i.getState()),[i,c]),()=>c(i.getInitialState()));return si.useDebugValue(r),r}const Qy=i=>{const c=Mx(i),r=o=>Hx(c,o);return Object.assign(r,c),r},Bx=(i=>i?Qy(i):Qy),kx=()=>typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,xg=i=>{const c=i==="system"?kx():i==="dark",r=c?"catppuccin":"zinc-light";return typeof document<"u"&&document.documentElement.setAttribute("data-theme",r),c?"dark":"light"},Qc=localStorage.getItem("hl_theme_v2"),Sg=Qc==="light"||Qc==="dark"||Qc==="system"?Qc:"system",Lx=xg(Sg),Gx=localStorage.getItem("hl_route_mode")||"auto",Yx=localStorage.getItem("hl_layout_preset")||"homepage-3col",qx=typeof window<"u"&&window.location.pathname.startsWith("/storybook")?"storybook":"dashboard",jn=Bx((i,c)=>({theme:Sg,resolvedTheme:Lx,routeMode:Gx,layoutPreset:Yx,viewMode:qx,showAgyModal:!1,showCmdPalette:!1,toast:"",actionLoading:!1,telemetry:{mini:{chip:"Apple M6 (12核)",ip:"192.168.31.164",tailscale_ip:"100.108.205.40",cpu_pct:6.5,load_1m:.85,mem_used_gb:11.8,mem_total_gb:24,mem_pct:49.2,disk_used_gb:59.9,disk_total_gb:460.4,disk_pct:13,uptime:"运行中",agy_tmux:!0},nas:{ip:"192.168.31.185",online:!0,mounted:!0,total_tb:19.94,used_tb:3.36,free_tb:16.58,pct:16.8,latest_backup:"11-06 23:17"},network:{home_wan_ip:"124.90.142.21",ai_policy:"Ai平台 → 狮城节点",sg_node:"233boy-sea",sg_egress_ip:"104.43.105.243",sg_delay_ms:68},services:{agy:!0,vaultwarden:!0,nas:!0,clash:!0,router:!0,uptime:!0}},setTheme:r=>{localStorage.setItem("hl_theme_v2",r);const o=xg(r);i({theme:r,resolvedTheme:o})},toggleTheme:()=>{const{resolvedTheme:r,setTheme:o}=c();o(r==="dark"?"light":"dark")},setRouteMode:r=>{localStorage.setItem("hl_route_mode",r),i({routeMode:r})},setLayoutPreset:r=>{localStorage.setItem("hl_layout_preset",r),i({layoutPreset:r})},setViewMode:r=>{if(typeof window<"u"){const o=r==="storybook"?"/storybook":"/";window.history.pushState({},"",o)}i({viewMode:r})},setShowAgyModal:r=>i({showAgyModal:r}),setShowCmdPalette:r=>i({showCmdPalette:r}),showToast:r=>{i({toast:r}),setTimeout(()=>{c().toast===r&&i({toast:""})},3e3)},fetchTelemetry:async()=>{try{const r=await fetch("/api/telemetry");if(r.ok){const o=await r.json();i({telemetry:o})}}catch{}},triggerAction:async(r,o)=>{const{showToast:f,fetchTelemetry:m}=c();i({actionLoading:!0}),f(o);try{const p=await(await fetch(`/api/action/${r}`,{method:"POST"})).json();f(p.message||"操作已完成"),await m()}catch{f("请求失败,请稍后重试")}finally{i({actionLoading:!1})}},copyCmd:async(r,o)=>{const{showToast:f}=c();try{await navigator.clipboard.writeText(r),f(`已复制「${o}」: ${r}`)}catch{f(r)}},getEffectiveMode:()=>{const{routeMode:r}=c();if(r!=="auto")return r;const o=window.location.hostname;return o.startsWith("192.168.")||o.startsWith("100.")||o==="localhost"?"lan":o.includes(".home.961504.xyz")||window.location.port==="10443"?"home10443":"edge443"}}));typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{const i=jn.getState();i.theme==="system"&&i.setTheme("system")});/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vx=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Eg=(...i)=>i.filter((c,r,o)=>!!c&&c.trim()!==""&&o.indexOf(c)===r).join(" ").trim();/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var Xx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qx=g.forwardRef(({color:i="currentColor",size:c=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:f="",children:m,iconNode:v,...p},E)=>g.createElement("svg",{ref:E,...Xx,width:c,height:c,stroke:i,strokeWidth:o?Number(r)*24/Number(c):r,className:Eg("lucide",f),...p},[...v.map(([b,N])=>g.createElement(b,N)),...Array.isArray(m)?m:[m]]));/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xt=(i,c)=>{const r=g.forwardRef(({className:o,...f},m)=>g.createElement(Qx,{ref:m,iconNode:c,className:Eg(`lucide-${Vx(i)}`,o),...f}));return r.displayName=`${i}`,r};/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zx=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Ng=xt("BookOpen",Zx);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jx=xt("Check",Kx);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ix=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Fx=xt("EyeOff",Ix);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $x=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Px=xt("Eye",$x);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wx=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Zy=xt("KeyRound",Wx);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eS=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],tS=xt("Layers",eS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lS=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],nS=xt("LayoutGrid",lS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aS=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],uS=xt("Lock",aS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iS=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],cS=xt("Moon",iS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rS=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],oS=xt("Palette",rS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],fS=xt("PanelsTopLeft",sS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dS=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Rf=xt("Search",dS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mS=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],hS=xt("ShieldCheck",mS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vS=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],yS=xt("Sparkles",vS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gS=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pS=xt("Sun",gS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bS=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],jf=xt("Terminal",bS);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xS=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],SS=xt("User",xS);var ES=Object.defineProperty,Df=(i,c)=>ES(i,"name",{value:c,configurable:!0});function vf(i,c){if(typeof i=="function")return i(c);i!=null&&(i.current=c)}Df(vf,"setRef");function ua(...i){return c=>{let r=!1;const o=i.map(f=>{const m=vf(f,c);return!r&&typeof m=="function"&&(r=!0),m});if(r)return()=>{for(let f=0;fNS(i,"name",{value:c,configurable:!0});function An(i){const c=g.forwardRef((r,o)=>{let{children:f,...m}=r,v=null,p=!1;const E=[];f=Ag(f),g.Children.forEach(f,T=>{var B;if(wg(T)){p=!0;const D=T;let M="child"in D.props?D.props.child:D.props.children;for(;Mf(M)&&typeof ar=="function";)M=ar(M._payload);v=_S(D,M),E.push((B=v==null?void 0:v.props)==null?void 0:B.children)}else E.push(T)}),v?v=g.cloneElement(v,void 0,E):!p&&g.Children.count(f)===1&&g.isValidElement(f)&&(v=f);const b=v?_g(v):void 0,N=Dt(o,b);if(!v){if(f||f===0)throw new Error(p?AS(i):OS(i));return f}const y=Tg(m,v.props??{});return v.type!==g.Fragment&&(y.ref=o?N:b),g.cloneElement(v,y)});return c.displayName=`${i}.Slot`,c}Kt(An,"createSlot");var CS=An("Slot"),Cg=Symbol.for("radix.slottable");function TS(i){const c=Kt(r=>"child"in r?r.children(r.child):r.children,"Slottable");return c.displayName=`${i}.Slottable`,c.__radixId=Cg,c}Kt(TS,"createSlottable");var _S=Kt((i,c)=>"child"in i.props?g.isValidElement(c)?g.cloneElement(c,void 0,i.props.children(c.props.children)):null:g.isValidElement(c)?c:null,"getSlottableElementFromSlottable");function Tg(i,c){const r={...c};for(const o in c){const f=i[o],m=c[o];/^on[A-Z]/.test(o)?f&&m?r[o]=(...p)=>{const E=m(...p);return f(...p),E}:f&&(r[o]=f):o==="style"?r[o]={...f,...m}:o==="className"?r[o]=[f,m].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=zg(m,f))}return{...i,...r}}Kt(Tg,"mergeProps");function _g(i){var o,f;let c=(o=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:o.get,r=c&&"isReactWarning"in c&&c.isReactWarning;return r?i.ref:(c=(f=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:f.get,r=c&&"isReactWarning"in c&&c.isReactWarning,r?i.props.ref:i.props.ref||i.ref)}Kt(_g,"getElementRef");function wg(i){return g.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===Cg}Kt(wg,"isSlottable");var wS=Symbol.for("react.lazy");function Mf(i){return i!=null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===wS&&"_payload"in i&&Og(i._payload)}Kt(Mf,"isLazyComponent");function Og(i){return typeof i=="object"&&i!==null&&"then"in i}Kt(Og,"isPromiseLike");function Ag(i){let c=i;for(;Mf(c)&&typeof ar=="function";)c=ar(c._payload);return c}Kt(Ag,"useUnwrappedLazy");function zg(...i){const c=new Set;for(const r of i)if(typeof r=="string")for(const o of String(r).trim().split(/\s+/))o&&c.add(o);return c.size>0?Array.from(c).join(" "):void 0}Kt(zg,"concatAriaDescribedby");var OS=Kt(i=>`${i} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),AS=Kt(i=>`${i} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ar=ra[" use ".trim().toString()];function Rg(i){var c,r,o="";if(typeof i=="string"||typeof i=="number")o+=i;else if(typeof i=="object")if(Array.isArray(i)){var f=i.length;for(c=0;ctypeof i=="boolean"?`${i}`:i===0?"0":i,Jy=jg,Dg=(i,c)=>r=>{var o;if((c==null?void 0:c.variants)==null)return Jy(i,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:f,defaultVariants:m}=c,v=Object.keys(f).map(b=>{const N=r==null?void 0:r[b],y=m==null?void 0:m[b];if(N===null)return null;const T=Ky(N)||Ky(y);return f[b][T]}),p=r&&Object.entries(r).reduce((b,N)=>{let[y,T]=N;return T===void 0||(b[y]=T),b},{}),E=c==null||(o=c.compoundVariants)===null||o===void 0?void 0:o.reduce((b,N)=>{let{class:y,className:T,...B}=N;return Object.entries(B).every(D=>{let[M,H]=D;return Array.isArray(H)?H.includes({...m,...p}[M]):{...m,...p}[M]===H})?[...b,y,T]:b},[]);return Jy(i,v,E,r==null?void 0:r.class,r==null?void 0:r.className)},zS=(i,c)=>{const r=new Array(i.length+c.length);for(let o=0;o({classGroupId:i,validator:c}),Mg=(i=new Map,c=null,r)=>({nextPart:i,validators:c,classGroupId:r}),ur="-",Iy=[],jS="arbitrary..",DS=i=>{const c=US(i),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=i;return{getClassGroupId:v=>{if(v.startsWith("[")&&v.endsWith("]"))return MS(v);const p=v.split(ur),E=p[0]===""&&p.length>1?1:0;return Ug(p,E,c)},getConflictingClassGroupIds:(v,p)=>{if(p){const E=o[v],b=r[v];return E?b?zS(b,E):E:b||Iy}return r[v]||Iy}}},Ug=(i,c,r)=>{if(i.length-c===0)return r.classGroupId;const f=i[c],m=r.nextPart.get(f);if(m){const b=Ug(i,c+1,m);if(b)return b}const v=r.validators;if(v===null)return;const p=c===0?i.join(ur):i.slice(c).join(ur),E=v.length;for(let b=0;bi.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const c=i.slice(1,-1),r=c.indexOf(":"),o=c.slice(0,r);return o?jS+o:void 0})(),US=i=>{const{theme:c,classGroups:r}=i;return HS(r,c)},HS=(i,c)=>{const r=Mg();for(const o in i){const f=i[o];Uf(f,r,o,c)}return r},Uf=(i,c,r,o)=>{const f=i.length;for(let m=0;m{if(typeof i=="string"){kS(i,c,r);return}if(typeof i=="function"){LS(i,c,r,o);return}GS(i,c,r,o)},kS=(i,c,r)=>{const o=i===""?c:Hg(c,i);o.classGroupId=r},LS=(i,c,r,o)=>{if(YS(i)){Uf(i(o),c,r,o);return}c.validators===null&&(c.validators=[]),c.validators.push(RS(r,i))},GS=(i,c,r,o)=>{const f=Object.entries(i),m=f.length;for(let v=0;v{let r=i;const o=c.split(ur),f=o.length;for(let m=0;m"isThemeGetter"in i&&i.isThemeGetter===!0,qS=i=>{if(i<1)return{get:()=>{},set:()=>{}};let c=0,r=Object.create(null),o=Object.create(null);const f=(m,v)=>{r[m]=v,c++,c>i&&(c=0,o=r,r=Object.create(null))};return{get(m){let v=r[m];if(v!==void 0)return v;if((v=o[m])!==void 0)return f(m,v),v},set(m,v){m in r?r[m]=v:f(m,v)}}},yf="!",Fy=":",VS=[],$y=(i,c,r,o,f)=>({modifiers:i,hasImportantModifier:c,baseClassName:r,maybePostfixModifierPosition:o,isExternal:f}),XS=i=>{const{prefix:c,experimentalParseClassName:r}=i;let o=f=>{const m=[];let v=0,p=0,E=0,b;const N=f.length;for(let M=0;ME?b-E:void 0;return $y(m,B,T,D)};if(c){const f=c+Fy,m=o;o=v=>v.startsWith(f)?m(v.slice(f.length)):$y(VS,!1,v,void 0,!0)}if(r){const f=o;o=m=>r({className:m,parseClassName:f})}return o},QS=i=>{const c=new Map;return i.orderSensitiveModifiers.forEach((r,o)=>{c.set(r,1e6+o)}),r=>{const o=[];let f=[];for(let m=0;m0&&(f.sort(),o.push(...f),f=[]),o.push(v)):f.push(v)}return f.length>0&&(f.sort(),o.push(...f)),o}},ZS=i=>({cache:qS(i.cacheSize),parseClassName:XS(i),sortModifiers:QS(i),postfixLookupClassGroupIds:KS(i),...DS(i)}),KS=i=>{const c=Object.create(null),r=i.postfixLookupClassGroups;if(r)for(let o=0;o{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:f,sortModifiers:m,postfixLookupClassGroupIds:v}=c,p=[],E=i.trim().split(JS);let b="";for(let N=E.length-1;N>=0;N-=1){const y=E[N],{isExternal:T,modifiers:B,hasImportantModifier:D,baseClassName:M,maybePostfixModifierPosition:H}=r(y);if(T){b=y+(b.length>0?" "+b:b);continue}let Z=!!H,Q;if(Z){const U=M.substring(0,H);Q=o(U);const k=Q&&v[Q]?o(M):void 0;k&&k!==Q&&(Q=k,Z=!1)}else Q=o(M);if(!Q){if(!Z){b=y+(b.length>0?" "+b:b);continue}if(Q=o(M),!Q){b=y+(b.length>0?" "+b:b);continue}Z=!1}const V=B.length===0?"":B.length===1?B[0]:m(B).join(":"),P=D?V+yf:V,F=P+Q;if(p.indexOf(F)>-1)continue;p.push(F);const G=f(Q,Z);for(let U=0;U0?" "+b:b)}return b},FS=(...i)=>{let c=0,r,o,f="";for(;c{if(typeof i=="string")return i;let c,r="";for(let o=0;o{let r,o,f,m;const v=E=>{const b=c.reduce((N,y)=>y(N),i());return r=ZS(b),o=r.cache.get,f=r.cache.set,m=p,p(E)},p=E=>{const b=o(E);if(b)return b;const N=IS(E,r);return f(E,N),N};return m=v,(...E)=>m(FS(...E))},PS=[],nt=i=>{const c=r=>r[i]||PS;return c.isThemeGetter=!0,c.themeKey=i,c},kg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,WS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,l2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,n2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_n=i=>WS.test(i),Ne=i=>!!i&&!Number.isNaN(Number(i)),wl=i=>!!i&&Number.isInteger(Number(i)),lf=i=>i.endsWith("%")&&Ne(i.slice(0,-1)),Ql=i=>e2.test(i),Gg=()=>!0,u2=i=>t2.test(i)&&!l2.test(i),Hf=()=>!1,i2=i=>n2.test(i),c2=i=>a2.test(i),r2=i=>!le(i)&&!ne(i),o2=i=>i.startsWith("@container")&&(i[10]==="/"&&i[11]!==void 0||i[11]==="s"&&i[16]!==void 0&&i.startsWith("-size/",10)||i[11]==="n"&&i[18]!==void 0&&i.startsWith("-normal/",10)),s2=i=>Dn(i,Vg,Hf),le=i=>kg.test(i),na=i=>Dn(i,Xg,u2),Py=i=>Dn(i,p2,Ne),f2=i=>Dn(i,Zg,Gg),d2=i=>Dn(i,Qg,Hf),Wy=i=>Dn(i,Yg,Hf),m2=i=>Dn(i,qg,c2),Zc=i=>Dn(i,Kg,i2),ne=i=>Lg.test(i),ri=i=>oa(i,Xg),h2=i=>oa(i,Qg),eg=i=>oa(i,Yg),v2=i=>oa(i,Vg),y2=i=>oa(i,qg),Kc=i=>oa(i,Kg,!0),g2=i=>oa(i,Zg,!0),Dn=(i,c,r)=>{const o=kg.exec(i);return o?o[1]?c(o[1]):r(o[2]):!1},oa=(i,c,r=!1)=>{const o=Lg.exec(i);return o?o[1]?c(o[1]):r:!1},Yg=i=>i==="position"||i==="percentage",qg=i=>i==="image"||i==="url",Vg=i=>i==="length"||i==="size"||i==="bg-size",Xg=i=>i==="length",p2=i=>i==="number",Qg=i=>i==="family-name",Zg=i=>i==="number"||i==="weight",Kg=i=>i==="shadow",b2=()=>{const i=nt("color"),c=nt("font"),r=nt("text"),o=nt("font-weight"),f=nt("tracking"),m=nt("leading"),v=nt("breakpoint"),p=nt("container"),E=nt("spacing"),b=nt("radius"),N=nt("shadow"),y=nt("inset-shadow"),T=nt("text-shadow"),B=nt("drop-shadow"),D=nt("blur"),M=nt("perspective"),H=nt("aspect"),Z=nt("ease"),Q=nt("animate"),V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...P(),ne,le],G=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],k=()=>[ne,le,E],ce=()=>[_n,"full","auto",...k()],xe=()=>[wl,"none","subgrid",ne,le],he=()=>["auto",{span:["full",wl,ne,le]},wl,ne,le],se=()=>[wl,"auto",ne,le],je=()=>["auto","min","max","fr",ne,le],ze=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ye=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...k()],W=()=>[_n,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],ie=()=>[p,_n,"screen","full","dvw","lvw","svw","min","max","fit",...k()],ge=()=>[_n,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],q=()=>[i,ne,le],Ce=()=>[...P(),eg,Wy,{position:[ne,le]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],re=()=>["auto","cover","contain",v2,s2,{size:[ne,le]}],S=()=>[lf,ri,na],z=()=>["","none","full",b,ne,le],J=()=>["",Ne,ri,na],I=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Ne,lf,eg,Wy],Se=()=>["","none",D,ne,le],ae=()=>["none",Ne,ne,le],fe=()=>["none",Ne,ne,le],Mt=()=>[Ne,ne,le],Il=()=>[_n,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ql],breakpoint:[Ql],color:[Gg],container:[Ql],"drop-shadow":[Ql],ease:["in","out","in-out"],font:[r2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ql],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ql],shadow:[Ql],spacing:["px",Ne],text:[Ql],"text-shadow":[Ql],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_n,le,ne,H]}],container:["container"],"container-type":[{"@container":["","normal","size",ne,le]}],"container-named":[o2],columns:[{columns:[Ne,"auto",le,ne,p]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ce()}],"inset-x":[{"inset-x":ce()}],"inset-y":[{"inset-y":ce()}],start:[{"inset-s":ce(),start:ce()}],end:[{"inset-e":ce(),end:ce()}],"inset-bs":[{"inset-bs":ce()}],"inset-be":[{"inset-be":ce()}],top:[{top:ce()}],right:[{right:ce()}],bottom:[{bottom:ce()}],left:[{left:ce()}],visibility:["visible","invisible","collapse"],z:[{z:[wl,"auto",ne,le]}],basis:[{basis:[_n,"full","auto",p,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,_n,"auto","initial","none",le]}],grow:[{grow:["",Ne,ne,le]}],shrink:[{shrink:["",Ne,ne,le]}],order:[{order:[wl,"first","last","none",ne,le]}],"grid-cols":[{"grid-cols":xe()}],"col-start-end":[{col:he()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":xe()}],"row-start-end":[{row:he()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":je()}],"auto-rows":[{"auto-rows":je()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...ye(),"normal"]}],"justify-self":[{"justify-self":["auto",...ye()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...ye(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ye(),{baseline:["","last"]}]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...ye(),"baseline"]}],"place-self":[{"place-self":["auto",...ye()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...ge()]}],"min-block-size":[{"min-block":["auto",...ge()]}],"max-block-size":[{"max-block":["none",...ge()]}],w:[{w:[p,"screen",...W()]}],"min-w":[{"min-w":[p,"screen","none",...W()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[v]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh","none",...W()]}],"font-size":[{text:["base",r,ri,na]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,g2,f2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",lf,le]}],"font-family":[{font:[h2,d2,c]}],"font-features":[{"font-features":[le]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[f,ne,le]}],"line-clamp":[{"line-clamp":[Ne,"none",ne,Py]}],leading:[{leading:["none",m,...k()]}],"list-image":[{"list-image":["none",ne,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",ne,na]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Ne,"auto",ne,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[wl,ne,le]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ce()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wl,ne,le],radial:["",ne,le],conic:["",wl,ne,le]},y2,m2]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:S()}],"gradient-via-pos":[{via:S()}],"gradient-to-pos":[{to:S()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...I(),"hidden","none"]}],"divide-style":[{divide:[...I(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-bs":[{"border-bs":q()}],"border-color-be":[{"border-be":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...I(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,ne,le]}],"outline-w":[{outline:["",Ne,ri,na]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","inner","none",N,Kc,Zc]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",y,Kc,Zc]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Ne,na]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",T,Kc,Zc]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Ne,ne,le]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[ne,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ce()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,le]}],filter:[{filter:["","none",ne,le]}],blur:[{blur:Se()}],brightness:[{brightness:[Ne,ne,le]}],contrast:[{contrast:[Ne,ne,le]}],"drop-shadow":[{"drop-shadow":["","none",B,Kc,Zc]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Ne,ne,le]}],"hue-rotate":[{"hue-rotate":[Ne,ne,le]}],invert:[{invert:["",Ne,ne,le]}],saturate:[{saturate:[Ne,ne,le]}],sepia:[{sepia:["",Ne,ne,le]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,le]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,ne,le]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,ne,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,ne,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,ne,le]}],"backdrop-invert":[{"backdrop-invert":["",Ne,ne,le]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,ne,le]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,ne,le]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,ne,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",ne,le]}],ease:[{ease:["linear","initial",Z,ne,le]}],delay:[{delay:[Ne,ne,le]}],animate:[{animate:["none",Q,ne,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,ne,le]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":["scale-3d"],skew:[{skew:Mt()}],"skew-x":[{"skew-x":Mt()}],"skew-y":[{"skew-y":Mt()}],transform:[{transform:[ne,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Il()}],"translate-x":[{"translate-x":Il()}],"translate-y":[{"translate-y":Il()}],"translate-z":[{"translate-z":Il()}],"translate-none":["translate-none"],zoom:[{zoom:[wl,ne,le]}],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":q()}],"scrollbar-track-color":[{"scrollbar-track":q()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne,le]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Ne,ri,na,Py]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},x2=$S(b2);function Xe(...i){return x2(jg(i))}const S2=Dg("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-lg text-xs font-medium transition-all cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50 shrink-0",{variants:{variant:{default:"hl-btn-primary shadow-xs",outline:"hl-btn-outline",secondary:"hl-muted border hl-border hover:opacity-90",ghost:"hover:bg-[var(--bg-muted)]",accent:"border border-[var(--accent)] bg-[var(--accent-soft)] text-[var(--accent)] font-semibold hover:opacity-90"},size:{default:"h-8 px-3 py-1.5",sm:"h-7 px-2.5 text-[11px] rounded-md",lg:"h-9 px-4 text-xs",icon:"h-8 w-8 p-0"}},defaultVariants:{variant:"default",size:"default"}}),jt=g.forwardRef(({className:i,variant:c,size:r,asChild:o=!1,...f},m)=>{const v=o?CS:"button";return d.jsx(v,{className:Xe(S2({variant:c,size:r,className:i})),ref:m,...f})});jt.displayName="Button";var E2=Object.defineProperty,su=(i,c)=>E2(i,"name",{value:c,configurable:!0}),Jg=!!(typeof window<"u"&&window.document&&window.document.createElement);function st(i,c,{checkForDefaultPrevented:r=!0}={}){return su(function(f){if(i==null||i(f),r===!1||!f||!f.defaultPrevented)return c==null?void 0:c(f)},"handleEvent")}su(st,"composeEventHandlers");function N2(i){var c;if(!Jg)throw new Error("Cannot access window outside of the DOM");return((c=i==null?void 0:i.ownerDocument)==null?void 0:c.defaultView)??window}su(N2,"getOwnerWindow");function gf(i){if(!Jg)throw new Error("Cannot access document outside of the DOM");return(i==null?void 0:i.ownerDocument)??document}su(gf,"getOwnerDocument");function Ig(i,c=!1){const{activeElement:r}=gf(i);if(!(r!=null&&r.nodeName))return null;if(Fg(r)&&r.contentDocument)return Ig(r.contentDocument.body,c);if(c){const o=r.getAttribute("aria-activedescendant");if(o){const f=gf(r).getElementById(o);if(f)return f}}return r}su(Ig,"getActiveElement");function Fg(i){return i.tagName==="IFRAME"}su(Fg,"isFrame");var C2=Object.defineProperty,nl=(i,c)=>C2(i,"name",{value:c,configurable:!0});function T2(i,c){const r=g.createContext(c);r.displayName=i+"Context";const o=nl(m=>{const{children:v,...p}=m,E=g.useMemo(()=>p,Object.values(p));return d.jsx(r.Provider,{value:E,children:v})},"Provider");o.displayName=i+"Provider";function f(m,v={}){const{optional:p=!1}=v,E=g.useContext(r);if(E)return E;if(c!==void 0)return c;if(!p)throw new Error(`\`${m}\` must be used within \`${i}\``)}return nl(f,"useContext"),[o,f]}nl(T2,"createContext");function sa(i,c=[]){let r=[];function o(m,v){const p=g.createContext(v);p.displayName=m+"Context";const E=r.length;r=[...r,v];const b=nl(y=>{var Z;const{scope:T,children:B,...D}=y,M=((Z=T==null?void 0:T[i])==null?void 0:Z[E])||p,H=g.useMemo(()=>D,Object.values(D));return d.jsx(M.Provider,{value:H,children:B})},"Provider");b.displayName=m+"Provider";function N(y,T,B={}){var Z;const{optional:D=!1}=B,M=((Z=T==null?void 0:T[i])==null?void 0:Z[E])||p,H=g.useContext(M);if(H)return H;if(v!==void 0)return v;if(!D)throw new Error(`\`${y}\` must be used within \`${m}\``)}return nl(N,"useContext"),[b,N]}nl(o,"createContext");const f=nl(()=>{const m=r.map(v=>g.createContext(v));return nl(function(p){const E=(p==null?void 0:p[i])||m;return g.useMemo(()=>({[`__scope${i}`]:{...p,[i]:E}}),[p,E])},"useScope")},"createScope");return f.scopeName=i,[o,$g(f,...c)]}nl(sa,"createContextScope");function $g(...i){const c=i[0];if(i.length===1)return c;const r=nl(()=>{const o=i.map(f=>({useScope:f(),scopeName:f.scopeName}));return nl(function(m){const v=o.reduce((p,{useScope:E,scopeName:b})=>{const y=E(m)[`__scope${b}`];return{...p,...y}},{});return g.useMemo(()=>({[`__scope${c.scopeName}`]:v}),[v])},"useComposedScopes")},"createScope");return r.scopeName=c.scopeName,r}nl($g,"composeContextScopes");var ul=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},_2=Object.defineProperty,at=(i,c)=>_2(i,"name",{value:c,configurable:!0});function Pg(i){const c=i+"CollectionProvider",[r,o]=sa(c),[f,m]=r(c,{collectionRef:{current:null},itemMap:new Map}),v=at(M=>{const{scope:H,children:Z}=M,Q=g.useRef(null),V=g.useRef(new Map).current;return d.jsx(f,{scope:H,itemMap:V,collectionRef:Q,children:Z})},"CollectionProvider");v.displayName=c;const p=i+"CollectionSlot",E=An(p),b=g.forwardRef((M,H)=>{const{scope:Z,children:Q}=M,V=m(p,Z),P=Dt(H,V.collectionRef);return d.jsx(E,{ref:P,children:Q})});b.displayName=p;const N=i+"CollectionItemSlot",y="data-radix-collection-item",T=An(N),B=g.forwardRef((M,H)=>{const{scope:Z,children:Q,...V}=M,P=g.useRef(null),F=Dt(H,P),G=m(N,Z);return g.useEffect(()=>(G.itemMap.set(P,{ref:P,...V}),()=>void G.itemMap.delete(P))),d.jsx(T,{[y]:"",ref:F,children:Q})});B.displayName=N;function D(M){const H=m(i+"CollectionConsumer",M);return g.useCallback(()=>{const Q=H.collectionRef.current;if(!Q)return[];const V=Array.from(Q.querySelectorAll(`[${y}]`));return Array.from(H.itemMap.values()).sort((G,U)=>V.indexOf(G.ref.current)-V.indexOf(U.ref.current))},[H.collectionRef,H.itemMap])}return at(D,"useCollection"),[{Provider:v,Slot:b,ItemSlot:B},D,o]}at(Pg,"createCollection");var tg=new WeakMap,Fe,Zt,Jc=(Zt=class extends Map{constructor(r){super(r);Dy(this,Fe);Is(this,Fe,[...super.keys()]),tg.set(this,!0)}set(r,o){return tg.get(this)&&!this.has(r)&&pt(this,Fe).push(r),super.set(r,o),this}insert(r,o,f){const m=this.has(o),v=m?this.size:this.size+1,p=Bf(r),E=p>=0?Math.min(p,v-1):Math.max(v+p,0);if(m?pt(this,Fe).indexOf(o)===E:E===this.size)return this.set(o,f),this;const b=pt(this,Fe).filter(y=>y!==o);b.splice(E,0,o);const N=b.map(y=>[y,y===o?f:this.get(y)]);this.clear();for(const[y,T]of N)this.set(y,T);return this}with(r,o,f){const m=new Zt(this);return m.insert(r,o,f),m}before(r){const o=pt(this,Fe).indexOf(r)-1;if(!(o<0))return this.entryAt(o)}setBefore(r,o,f){const m=pt(this,Fe).indexOf(r);if(m===-1)return this;const v=pt(this,Fe).indexOf(o),p=v!==-1&&v=this.size&&(m=this.size-1),this.at(m)}keyFrom(r,o){const f=this.indexOf(r);if(f===-1)return;let m=f+o;return m<0&&(m=0),m>=this.size&&(m=this.size-1),this.keyAt(m)}find(r,o){let f=0;for(const m of this){if(Reflect.apply(r,o,[m,f,this]))return m;f++}}findIndex(r,o){let f=0;for(const m of this){if(Reflect.apply(r,o,[m,f,this]))return f;f++}return-1}filter(r,o){const f=[];let m=0;for(const v of this)Reflect.apply(r,o,[v,m,this])&&f.push(v),m++;return new Zt(f)}map(r,o){const f=[];let m=0;for(const v of this)f.push([v[0],Reflect.apply(r,o,[v,m,this])]),m++;return new Zt(f)}reduce(...r){const[o,f]=r,m=r.length>1;if(!m&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let v=0,p=f;for(const E of this)v===0&&!m?p=E:p=Reflect.apply(o,this,[p,E,v,this]),v++;return p}reduceRight(...r){const[o,f]=r,m=r.length>1;if(!m&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let v=f;for(let p=this.size-1;p>=0;p--){const E=this.entryAt(p);p===this.size-1&&!m?v=E:v=Reflect.apply(o,this,[v,E,p,this])}return v}sort(r){if(typeof r!="function")throw new TypeError("OrderedDict.sort requires a compare function");const o=[...this.entries()].sort(r);this.clear();for(const[f,m]of o)this.set(f,m);return this}toSorted(r){if(typeof r!="function")throw new TypeError("OrderedDict.toSorted requires a compare function");const o=[...this.entries()].sort(r);return new Zt(o)}toReversed(){const r=new Zt;for(let o=this.size-1;o>=0;o--){const f=this.keyAt(o),m=this.get(f);r.set(f,m)}return r}toSpliced(...r){const o=[...this.entries()];return o.splice(...r),new Zt(o)}slice(r,o){const f=new Zt;for(const m of pt(this,Fe).slice(r,o))f.set(m,this.get(m));return f}every(r,o){let f=0;for(const m of this){if(!Reflect.apply(r,o,[m,f,this]))return!1;f++}return!0}some(r,o){let f=0;for(const m of this){if(Reflect.apply(r,o,[m,f,this]))return!0;f++}return!1}},Fe=new WeakMap,at(Zt,"OrderedDict"),Zt);function er(i,c){if("at"in Array.prototype)return Array.prototype.at.call(i,c);const r=Wg(i,c);return r===-1?void 0:i[r]}at(er,"at");function Wg(i,c){const r=i.length,o=Bf(c),f=o>=0?o:r+o;return f<0||f>=r?-1:f}at(Wg,"toSafeIndex");function Bf(i){return i!==i||i===0?0:Math.trunc(i)}at(Bf,"toSafeInteger");function w2(i){const c=i+"CollectionProvider",[r,o]=sa(c),[f,m]=r(c);f.displayName=i+"CollectionStableContextProvider";const[v,p]=r(c);v.displayName=i+"CollectionStatefulContextProvider";const E=at(({state:G,...U})=>G?d.jsx(N,{...U,state:G}):d.jsx(b,{...U}),"CollectionProvider");E.displayName=c;const b=at(G=>{const U=Q();return d.jsx(N,{...G,state:U})},"CollectionInit");b.displayName=i+"CollectionInit";const N=at(G=>{const{scope:U,children:k,state:ce}=G,xe=g.useRef(null),[he,se]=g.useState(null),je=Dt(xe,se),[ze,ye]=ce,K=g.useRef(new Jc),W=g.useCallback(()=>{const ie=K.current;return lp(ie)||ie.sort(tr),ie},[]);return g.useEffect(()=>{if(!he)return;const ie=np(()=>{ye(ge=>{const q=ge.toSorted(tr);return q.some(([X],re)=>ge.keyAt(re)!==X)?q:ge})});return ie.observe(he,{childList:!0,subtree:!0}),()=>{ie.disconnect()}},[he,ye]),d.jsx(f,{scope:U,collectionElementRef:je,collectionElementRefObject:xe,getCollection:W,setCollection:ye,registryRef:K,children:d.jsx(v,{scope:U,collectionElement:he,collection:ze,children:k})})},"CollectionProviderImpl");N.displayName=i+"CollectionProviderImpl";const y=i+"CollectionSlot",T=An(y),B=g.forwardRef((G,U)=>{const{scope:k,children:ce}=G,xe=m(y,k),he=Dt(U,xe.collectionElementRef);return d.jsx(T,{ref:he,children:ce})});B.displayName=y;const D=i+"CollectionItemSlot",M="data-radix-collection-item",H=An(D),Z=g.forwardRef((G,U)=>{const{scope:k,children:ce,...xe}=G,he=g.useRef(null),se=m(D,k),{setCollection:je,registryRef:ze}=se,ye=g.useRef(xe);ep(ye.current,xe)||(ye.current=xe);const K=ye.current,W=g.useCallback(q=>{const Ce=ze.current;q?Ce.set(q,{...ye.current,element:q}):he.current&&Ce.delete(he.current)},[ze]),ie=Dt(U,W,he);ul(()=>{const q=he.current,Ce=ze.current;q&&Ce.has(q)&&Ce.set(q,{...K,element:q})},[K,ze]);const ge=g.useRef(null);return g.useEffect(()=>{const q=he.current,Ce=ge.current;((Ce==null?void 0:Ce.element)??null)===q&&(!q||(Ce==null?void 0:Ce.itemData)===K)||(ge.current=q?{element:q,itemData:K}:null,je(X=>{const re=new Jc(X);return Ce&&Ce.element!==q&&re.delete(Ce.element),q&&re.set(q,{...K,element:q}),re.sort(tr)}))}),g.useEffect(()=>()=>{const q=ge.current;ge.current=null,q&&je(Ce=>{if(!Ce.has(q.element))return Ce;const X=new Jc(Ce);return X.delete(q.element),X})},[je]),d.jsx(H,{[M]:"",ref:ie,children:ce})});Z.displayName=D;function Q(){return g.useState(new Jc)}at(Q,"useInitCollection");function V(G){const{collection:U}=p(i+"CollectionConsumer",G);return U}at(V,"useCollection");function P(G){const{getCollection:U}=m(i+"CollectionConsumer",G);return U}return at(P,"useGetCollection"),[{Provider:E,Slot:B,ItemSlot:Z},{createCollectionScope:o,useCollection:V,useGetCollection:P,useInitCollection:Q}]}at(w2,"createCollection");function ep(i,c){if(i===c)return!0;if(typeof i!="object"||typeof c!="object"||i==null||c==null)return!1;const r=Object.keys(i),o=Object.keys(c);if(r.length!==o.length)return!1;for(const f of r)if(!Object.prototype.hasOwnProperty.call(c,f)||i[f]!==c[f])return!1;return!0}at(ep,"shallowEqual");function tp(i,c){return!!(c.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)}at(tp,"isElementPreceding");function lp(i){let c;for(const r of i.keys()){if(c){const o=c.compareDocumentPosition(r);if(!(o&Node.DOCUMENT_POSITION_DISCONNECTED)&&o&Node.DOCUMENT_POSITION_PRECEDING)return!1}c=r}return!0}at(lp,"isInDocumentOrder");function tr(i,c){return!i[1].element||!c[1].element?0:tp(i[1].element,c[1].element)?-1:1}at(tr,"sortByDocumentPosition");function np(i){return new MutationObserver(r=>{for(const o of r)if(o.type==="childList"){i();return}})}at(np,"getChildListObserver");var O2=Object.defineProperty,A2=(i,c)=>O2(i,"name",{value:c,configurable:!0}),z2=ra[" useId ".trim().toString()]||(()=>{}),R2=0;function al(i){const[c,r]=g.useState(z2());return ul(()=>{i||r(o=>o??String(R2++))},[i]),i||(c?`radix-${c}`:"")}A2(al,"useId");var ap=bg(),j2=Object.defineProperty,D2=(i,c)=>j2(i,"name",{value:c,configurable:!0}),M2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=M2.reduce((i,c)=>{const r=An(`Primitive.${c}`),o=g.forwardRef((f,m)=>{const{asChild:v,...p}=f,E=v?r:c;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(E,{...p,ref:m})});return o.displayName=`Primitive.${c}`,{...i,[c]:o}},{});function up(i,c){i&&ap.flushSync(()=>i.dispatchEvent(c))}D2(up,"dispatchDiscreteCustomEvent");var U2=Object.defineProperty,H2=(i,c)=>U2(i,"name",{value:c,configurable:!0}),lg=ra[" useInsertionEffect ".trim().toString()];function ia(i){const c=g.useRef(i);return typeof lg=="function"?lg(()=>{c.current=i}):ul(()=>{c.current=i}),g.useMemo(()=>((...r)=>{var o;return(o=c.current)==null?void 0:o.call(c,...r)}),[])}H2(ia,"useCallbackRef");var B2=Object.defineProperty,k2=(i,c)=>B2(i,"name",{value:c,configurable:!0}),ng=ra[" useEffectEvent ".trim().toString()],ag=ra[" useInsertionEffect ".trim().toString()];function ip(i){if(typeof ng=="function")return ng(i);const c=g.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof ag=="function"?ag(()=>{c.current=i}):ul(()=>{c.current=i}),g.useMemo(()=>((...r)=>{var o;return(o=c.current)==null?void 0:o.call(c,...r)}),[])}k2(ip,"useEffectEvent");var L2=Object.defineProperty,di=(i,c)=>L2(i,"name",{value:c,configurable:!0}),G2=ra[" useInsertionEffect ".trim().toString()]||ul;function mi({prop:i,defaultProp:c,onChange:r=di(()=>{},"onChange"),caller:o}){const[f,m,v]=cp({defaultProp:c,onChange:r}),p=i!==void 0,E=p?i:f,b=g.useCallback(N=>{var y;if(p){const T=rp(N)?N(i):N;T!==i&&((y=v.current)==null||y.call(v,T))}else m(N)},[p,i,m,v]);return[E,b]}di(mi,"useControllableState");function cp({defaultProp:i,onChange:c}){const[r,o]=g.useState(i),f=g.useRef(r),m=g.useRef(c);return G2(()=>{m.current=c},[c]),g.useEffect(()=>{var v;f.current!==r&&((v=m.current)==null||v.call(m,r),f.current=r)},[r,f]),[r,o,m]}di(cp,"useUncontrolledState");function rp(i){return typeof i=="function"}di(rp,"isFunction");var ug=Symbol("RADIX:SYNC_STATE");function Y2(i,c,r,o){const{prop:f,defaultProp:m,onChange:v,caller:p}=c,E=f!==void 0,b=ip(v),N=[{...r,state:m}];o&&N.push(o);const[y,T]=g.useReducer((H,Z)=>{if(Z.type===ug)return{...H,state:Z.state};const Q=i(H,Z);return E&&!Object.is(Q.state,H.state)&&b(Q.state),Q},...N),B=y.state,D=g.useRef(B);g.useEffect(()=>{D.current!==B&&(D.current=B,E||b(B))},[B,D,E]);const M=g.useMemo(()=>f!==void 0?{...y,state:f}:y,[y,f]);return g.useEffect(()=>{E&&!Object.is(f,y.state)&&T({type:ug,state:f})},[f,y.state,E]),[M,T]}di(Y2,"useControllableStateReducer");var q2=Object.defineProperty,V2=(i,c)=>q2(i,"name",{value:c,configurable:!0}),X2={LTR:"ltr"},Q2=g.createContext(void 0);function kf(i){const c=g.useContext(Q2);return i||c||X2.LTR}V2(kf,"useDirection");var Z2=Object.defineProperty,Lf=(i,c)=>Z2(i,"name",{value:c,configurable:!0}),nf=!1;function op(){const[i,c]=g.useState(nf);return g.useEffect(()=>{nf||(nf=!0,c(!0))},[]),i}Lf(op,"useIsHydrated");var sp=ra[" useSyncExternalStore ".trim().toString()];function fp(){return()=>{}}Lf(fp,"subscribe");function dp(){return sp(fp,()=>!0,()=>!1)}Lf(dp,"useIsHydratedModern");var K2=typeof sp=="function"?dp:op,J2=Object.defineProperty,fa=(i,c)=>J2(i,"name",{value:c,configurable:!0}),af="rovingFocusGroup.onEntryFocus",I2={bubbles:!1,cancelable:!0},sr="RovingFocusGroup",[pf,mp,F2]=Pg(sr),[$2,hp]=sa(sr,[F2]),ig={Vertical:"vertical",Horizontal:"horizontal"},P2={RTL:"rtl"},[W2,eE]=$2(sr),tE=g.forwardRef(fa(function(c,r){return d.jsx(pf.Provider,{scope:c.__scopeRovingFocusGroup,children:d.jsx(pf.Slot,{scope:c.__scopeRovingFocusGroup,children:d.jsx(lE,{...c,ref:r})})})},"RovingFocusGroup")),lE=g.forwardRef(fa(function(c,r){const{__scopeRovingFocusGroup:o,orientation:f,loop:m=!1,dir:v,currentTabStopId:p,defaultCurrentTabStopId:E,onCurrentTabStopIdChange:b,onEntryFocus:N,preventScrollOnEntryFocus:y=!1,...T}=c,B=g.useRef(null),D=Dt(r,B),M=kf(v),[H,Z]=mi({prop:p,defaultProp:E??null,onChange:b,caller:sr}),[Q,V]=g.useState(!1),P=ia(N),F=mp(o),G=g.useRef(!1),[U,k]=g.useState(0);return g.useEffect(()=>{const ce=B.current;if(ce)return ce.addEventListener(af,P),()=>ce.removeEventListener(af,P)},[P]),d.jsx(W2,{scope:o,orientation:f,dir:M,loop:m,currentTabStopId:H,onItemFocus:g.useCallback(ce=>Z(ce),[Z]),onItemShiftTab:g.useCallback(()=>V(!0),[]),onFocusableItemAdd:g.useCallback(()=>k(ce=>ce+1),[]),onFocusableItemRemove:g.useCallback(()=>k(ce=>ce-1),[]),children:d.jsx(Ze.div,{tabIndex:Q||U===0?-1:0,"data-orientation":f,...T,ref:D,style:{outline:"none",...c.style},onMouseDown:st(c.onMouseDown,()=>{G.current=!0}),onFocus:st(c.onFocus,ce=>{const xe=!G.current;if(ce.target===ce.currentTarget&&xe&&!Q){const he=new CustomEvent(af,I2);if(ce.currentTarget.dispatchEvent(he),!he.defaultPrevented){const se=F().filter(W=>W.focusable),je=se.find(W=>W.active),ze=se.find(W=>W.id===H),K=[je,ze,...se].filter(Boolean).map(W=>W.ref.current);Gf(K,y)}}G.current=!1}),onBlur:st(c.onBlur,()=>V(!1))})})},"RovingFocusGroupImpl")),nE="RovingFocusGroupItem",aE=g.forwardRef(fa(function(c,r){const{__scopeRovingFocusGroup:o,focusable:f=!0,active:m=!1,tabStopId:v,children:p,...E}=c,b=al(),N=v||b,y=eE(nE,o),T=y.currentTabStopId===N,B=mp(o),{onFocusableItemAdd:D,onFocusableItemRemove:M,currentTabStopId:H}=y,Z=K2();return ul(()=>{if(!(!Z||!f))return D(),()=>M()},[Z,f,D,M]),g.useEffect(()=>{if(!(Z||!f))return D(),()=>M()},[Z,f,D,M]),d.jsx(pf.ItemSlot,{scope:o,id:N,focusable:f,active:m,children:d.jsx(Ze.span,{tabIndex:T?0:-1,"data-orientation":y.orientation,...E,ref:r,onMouseDown:st(c.onMouseDown,Q=>{f?y.onItemFocus(N):Q.preventDefault()}),onFocus:st(c.onFocus,()=>y.onItemFocus(N)),onKeyDown:st(c.onKeyDown,Q=>{if(Q.key==="Tab"&&Q.shiftKey){y.onItemShiftTab();return}if(Q.target!==Q.currentTarget)return;const V=yp(Q,y.orientation,y.dir);if(V!==void 0){if(Q.metaKey||Q.ctrlKey||Q.altKey||Q.shiftKey)return;Q.preventDefault();let F=B().filter(G=>G.focusable).map(G=>G.ref.current);if(V==="last")F.reverse();else if(V==="prev"||V==="next"){V==="prev"&&F.reverse();const G=F.indexOf(Q.currentTarget);F=y.loop?gp(F,G+1):F.slice(G+1)}setTimeout(()=>Gf(F))}}),children:typeof p=="function"?p({isCurrentTabStop:T,hasTabStop:H!=null}):p})})},"RovingFocusGroupItem")),uE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vp(i,c){return c!==P2.RTL?i:i==="ArrowLeft"?"ArrowRight":i==="ArrowRight"?"ArrowLeft":i}fa(vp,"getDirectionAwareKey");function yp(i,c,r){const o=vp(i.key,r);if(!(c===ig.Vertical&&["ArrowLeft","ArrowRight"].includes(o))&&!(c===ig.Horizontal&&["ArrowUp","ArrowDown"].includes(o)))return uE[o]}fa(yp,"getFocusIntent");function Gf(i,c=!1){const r=document.activeElement;for(const o of i)if(o===r||(o.focus({preventScroll:c}),document.activeElement!==r))return}fa(Gf,"focusFirst");function gp(i,c){return i.map((r,o)=>i[(c+o)%i.length])}fa(gp,"wrapArray");var iE=Object.defineProperty,Kl=(i,c)=>iE(i,"name",{value:c,configurable:!0});function pp(i,c){return g.useReducer((r,o)=>c[r][o]??r,i)}Kl(pp,"useStateMachine");var fr=Kl(i=>{const{present:c,children:r}=i,o=bp(c),f=typeof r=="function"?r({present:o.isPresent}):g.Children.only(r),m=xp(o.ref,Sp(f));return typeof r=="function"||o.isPresent?g.cloneElement(f,{ref:m}):null},"Presence");function bp(i){const[c,r]=g.useState(),o=g.useRef(null),f=g.useRef(i),m=g.useRef("none"),v=g.useRef(void 0),p=i?"mounted":"unmounted",[E,b]=pp(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{E==="mounted"?(m.current=v.current??iu(o.current),v.current=void 0):m.current="none"},[E]),ul(()=>{const N=o.current,y=f.current;if(y!==i){const B=m.current,D=iu(N);i?(v.current=D,b("MOUNT")):D==="none"||(N==null?void 0:N.display)==="none"?b("UNMOUNT"):b(y&&B!==D?"ANIMATION_OUT":"UNMOUNT"),f.current=i}},[i,b]),ul(()=>{if(c){let N;const y=c.ownerDocument.defaultView??window,T=Kl(D=>{const H=iu(o.current).includes(CSS.escape(D.animationName));if(D.target===c&&H&&(b("ANIMATION_END"),!f.current)){const Z=c.style.animationFillMode;c.style.animationFillMode="forwards",N=y.setTimeout(()=>{c.style.animationFillMode==="forwards"&&(c.style.animationFillMode=Z)})}},"handleAnimationEnd"),B=Kl(D=>{D.target===c&&(m.current=iu(o.current))},"handleAnimationStart");return c.addEventListener("animationstart",B),c.addEventListener("animationcancel",T),c.addEventListener("animationend",T),()=>{y.clearTimeout(N),c.removeEventListener("animationstart",B),c.removeEventListener("animationcancel",T),c.removeEventListener("animationend",T)}}else b("ANIMATION_END")},[c,b]),{isPresent:["mounted","unmountSuspended"].includes(E),ref:g.useCallback(N=>{if(N){const y=getComputedStyle(N);o.current=y,v.current=iu(y)}else o.current=null;r(N)},[])}}Kl(bp,"usePresence");function bf(i,c){if(typeof i=="function")return i(c);i!=null&&(i.current=c)}Kl(bf,"setRef");function xp(...i){const c=g.useRef(i);return c.current=i,g.useCallback(r=>{const o=c.current;let f=!1;const m=o.map(v=>{const p=bf(v,r);return!f&&typeof p=="function"&&(f=!0),p});if(f)return()=>{for(let v=0;vcE(i,"name",{value:c,configurable:!0}),Ep={Automatic:"automatic",Manual:"manual"},Yf="Tabs",[rE,bC]=sa(Yf,[hp]),Np=hp(),[oE,qf]=rE(Yf),sE=g.forwardRef(fu(function(c,r){const{__scopeTabs:o,value:f,onValueChange:m,defaultValue:v,orientation:p="horizontal",dir:E,activationMode:b=Ep.Automatic,...N}=c,y=kf(E),[T,B]=mi({prop:f,onChange:m,defaultProp:v??"",caller:Yf});return d.jsx(oE,{scope:o,baseId:al(),value:T,onValueChange:B,orientation:p,dir:y,activationMode:b,children:d.jsx(Ze.div,{dir:y,"data-orientation":p,...N,ref:r})})},"Tabs")),fE="TabsList",Cp=g.forwardRef(fu(function(c,r){const{__scopeTabs:o,loop:f=!0,...m}=c,v=qf(fE,o),p=Np(o);return d.jsx(tE,{asChild:!0,...p,orientation:v.orientation,dir:v.dir,loop:f,children:d.jsx(Ze.div,{role:"tablist","aria-orientation":v.orientation,...m,ref:r})})},"TabsList")),dE="TabsTrigger",Tp=g.forwardRef(fu(function(c,r){const{__scopeTabs:o,value:f,disabled:m=!1,...v}=c,p=qf(dE,o),E=Np(o),b=Vf(p.baseId,f),N=Xf(p.baseId,f),y=f===p.value;return d.jsx(aE,{asChild:!0,...E,focusable:!m,active:y,children:d.jsx(Ze.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":N,"data-state":y?"active":"inactive","data-disabled":m?"":void 0,disabled:m,id:b,...v,ref:r,onMouseDown:st(c.onMouseDown,T=>{!m&&T.button===0&&T.ctrlKey===!1?(T.currentTarget.focus(),p.onValueChange(f)):T.preventDefault()}),onKeyDown:st(c.onKeyDown,T=>{m||T.target!==T.currentTarget||[" ","Enter"].includes(T.key)&&p.onValueChange(f)}),onFocus:st(c.onFocus,()=>{const T=p.activationMode!==Ep.Manual;!y&&!m&&T&&p.onValueChange(f)})})})},"TabsTrigger")),mE="TabsContent",_p=g.forwardRef(fu(function(c,r){const{__scopeTabs:o,value:f,forceMount:m,children:v,...p}=c,E=qf(mE,o),b=Vf(E.baseId,f),N=Xf(E.baseId,f),y=f===E.value,T=g.useRef(y);return g.useEffect(()=>{const B=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(B)},[]),d.jsx(fr,{present:m||y,children:({present:B})=>d.jsx(Ze.div,{"data-state":y?"active":"inactive","data-orientation":E.orientation,role:"tabpanel","aria-labelledby":b,hidden:!B,id:N,tabIndex:0,...p,ref:r,style:{...c.style,animationDuration:T.current?"0s":void 0},children:B&&v})})},"TabsContent"));function Vf(i,c){return`${i}-trigger-${c}`}fu(Vf,"makeTriggerId");function Xf(i,c){return`${i}-content-${c}`}fu(Xf,"makeContentId");const xf=sE,ir=g.forwardRef(({className:i,...c},r)=>d.jsx(Cp,{ref:r,className:Xe("inline-flex items-center justify-center rounded-lg hl-muted p-1 border hl-border text-[var(--text-muted)]",i),...c}));ir.displayName=Cp.displayName;const aa=g.forwardRef(({className:i,...c},r)=>d.jsx(Tp,{ref:r,className:Xe("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2.5 py-1 text-xs font-medium transition-all cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-[var(--bg-card)] data-[state=active]:text-[var(--text-main)] data-[state=active]:shadow-xs",i),...c}));aa.displayName=Tp.displayName;const hE=g.forwardRef(({className:i,...c},r)=>d.jsx(_p,{ref:r,className:Xe("mt-2 outline-none",i),...c}));hE.displayName=_p.displayName;const vE=[{id:"auto",label:"智能路由"},{id:"edge443",label:"443 免端口"},{id:"home10443",label:"10443 家宽"},{id:"lan",label:"LAN 局域网"}],yE=()=>{const{theme:i,resolvedTheme:c,routeMode:r,viewMode:o,telemetry:f,setTheme:m,toggleTheme:v,setRouteMode:p,setViewMode:E,setShowAgyModal:b,setShowCmdPalette:N}=jn();return d.jsxs(d.Fragment,{children:[d.jsx("header",{className:"border-b hl-border sticky top-0 z-30 backdrop-blur-md",style:{backgroundColor:"color-mix(in srgb, var(--bg-card) 88%, transparent)"},children:d.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-14 flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[d.jsxs("div",{onClick:()=>E("dashboard"),className:"flex items-center gap-2.5 cursor-pointer",children:[d.jsx("img",{src:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/apple.png",alt:"Mac mini",className:"w-6 h-6 rounded"}),d.jsx("span",{className:"font-semibold text-sm tracking-tight",children:"HomeLab"}),d.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--success)"},title:"全屋 4 节点在线"})]}),d.jsx("div",{className:"h-4 w-[1px] hl-muted"}),d.jsx(xf,{value:o,onValueChange:y=>E(y),children:d.jsxs(ir,{children:[d.jsxs(aa,{value:"dashboard",children:[d.jsx(nS,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"中控台"})]}),d.jsxs(aa,{value:"storybook",children:[d.jsx(Ng,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"Storybook 设计规范"})]})]})})]}),d.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 ml-auto",children:[d.jsxs(jt,{variant:"outline",onClick:()=>N(!0),className:"gap-3",title:"按 Cmd+K 唤起全局命令面板",children:[d.jsxs("span",{className:"flex items-center gap-1.5",style:{color:"var(--text-muted)"},children:[d.jsx(Rf,{className:"w-3.5 h-3.5"}),d.jsx("span",{className:"hidden sm:inline",children:"搜索服务或指令..."})]}),d.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-muted",style:{color:"var(--text-muted)"},children:"⌘K"})]}),d.jsxs(jt,{onClick:()=>b(!0),children:[d.jsx(jf,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"AGY 终端"})]}),d.jsxs("div",{className:"flex items-center p-0.5 rounded-lg hl-muted border hl-border text-xs",children:[d.jsx("button",{onClick:v,className:"px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 cursor-pointer",style:{backgroundColor:"var(--bg-card)",color:"var(--text-main)",boxShadow:"0 1px 2px rgba(0,0,0,0.08)"},title:"点击切换深色 / 浅色主题(默认跟随系统)",children:c==="dark"?d.jsxs(d.Fragment,{children:[d.jsx(cS,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"深色"})]}):d.jsxs(d.Fragment,{children:[d.jsx(pS,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"浅色"})]})}),i!=="system"&&d.jsx("button",{onClick:()=>m("system"),className:"px-2 py-1 rounded-md text-[11px] transition-all cursor-pointer",style:{color:"var(--text-muted)"},title:"恢复跟随设备系统深浅色自动切换",children:"自动"})]})]})]})}),o==="dashboard"&&d.jsx("div",{className:"border-b hl-border",style:{backgroundColor:"var(--bg-card)"},children:d.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-2.5 flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs font-mono-num",children:[d.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[d.jsx("span",{style:{color:"var(--text-muted)"},children:"M6 CPU"}),d.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:d.jsx("div",{className:"h-full hl-bar-fill",style:{width:`${Math.max(5,f.mini.cpu_pct)}%`}})}),d.jsxs("span",{className:"font-medium",children:[f.mini.cpu_pct,"%"]})]}),d.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[d.jsx("span",{style:{color:"var(--text-muted)"},children:"RAM"}),d.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:d.jsx("div",{className:"h-full hl-bar-fill",style:{width:`${Math.max(5,f.mini.mem_pct)}%`}})}),d.jsxs("span",{className:"font-medium",children:[f.mini.mem_used_gb,"G"]})]}),d.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[d.jsx("span",{style:{color:"var(--text-muted)"},children:"NAS 余量"}),d.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:d.jsx("div",{className:"h-full hl-bar-fill-green",style:{width:`${Math.max(5,f.nas.pct)}%`}})}),d.jsxs("span",{className:"font-medium",style:{color:"var(--success)"},children:[f.nas.free_tb," TB"]})]}),d.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-1.5",children:[d.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:"var(--success)"}}),d.jsx("span",{style:{color:"var(--text-muted)"},children:"SG 专线"}),d.jsx("span",{className:"font-medium",children:f.network.sg_delay_ms>0?`${f.network.sg_delay_ms}ms`:"直连"})]})]}),d.jsx(xf,{value:r,onValueChange:y=>p(y),className:"ml-auto",children:d.jsx(ir,{children:vE.map(y=>d.jsx(aa,{value:y.id,children:y.label},y.id))})})]})})]})},wp=({card:i})=>{const{getEffectiveMode:c,setShowAgyModal:r,triggerAction:o}=jn(),f=c(),m=f==="lan"?i.lanUrl:f==="home10443"?i.homeUrl:i.edgeUrl,v=f==="lan"?"LAN 直连":f==="home10443"?"10443":"443 免端口";return d.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"hl-card hl-card-interactive flex flex-col justify-between overflow-hidden group cursor-pointer",children:[d.jsxs("div",{className:"p-4 sm:p-5 space-y-3",children:[d.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"flex items-center gap-3.5 min-w-0",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl hl-muted border hl-border p-1.5 flex items-center justify-center shrink-0",children:d.jsx("img",{src:i.iconUrl,alt:i.title,className:"w-full h-full object-contain"})}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"text-sm font-semibold truncate group-hover:underline",children:i.title}),d.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:i.online!==!1?"var(--success)":"#ef4444"}})]}),d.jsx("p",{className:"text-[11px] font-mono-num truncate mt-0.5",style:{color:"var(--text-muted)"},children:i.subtitle})]})]}),i.actionType==="drawer"?d.jsx("button",{onClick:p=>{p.preventDefault(),r(!0)},className:"px-2 py-1 rounded-md text-[11px] font-medium shrink-0 transition-opacity hover:opacity-80 cursor-pointer",style:{backgroundColor:"var(--accent-soft)",color:"var(--accent)"},children:"页内终端"}):i.actionType==="backup"?d.jsx("button",{onClick:p=>{p.preventDefault(),o("backup_nas","正在打包备份至极空间 Z4...")},className:"px-2 py-1 rounded-md text-[11px] font-medium shrink-0 transition-opacity hover:opacity-80 cursor-pointer",style:{backgroundColor:"var(--success-soft)",color:"var(--success)"},children:"立即备份"}):d.jsx("span",{className:"text-xs font-mono-num px-2 py-0.5 rounded hl-muted shrink-0",style:{color:"var(--text-muted)"},children:v})]}),d.jsx("p",{className:"text-xs leading-relaxed line-clamp-2",style:{color:"var(--text-muted)"},children:i.desc})]}),d.jsx("div",{className:"hl-widget-footer grid grid-cols-3 divide-x hl-border text-center",children:i.stats.map((p,E)=>d.jsxs("div",{className:"py-2.5 px-2 flex flex-col items-center justify-center",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wider truncate max-w-full",style:{color:"var(--text-subtle)"},children:p.label}),d.jsx("span",{className:"text-xs font-semibold font-mono-num mt-0.5 truncate max-w-full",style:{color:p.highlight?"var(--success)":"var(--text-main)"},children:p.value})]},E))})]})},gE=[{label:"SSH 连接 Mac mini",cmd:"ssh mini"},{label:"终端接力 AGY 会话",cmd:'ssh mini -t "tmux attach -t agy"'},{label:"SSH 连接新加坡 Azure",cmd:"ssh azure"},{label:"SSH 连接小米主路由",cmd:"ssh root@192.168.31.1"}],Op=()=>{const{copyCmd:i,triggerAction:c}=jn();return d.jsxs("section",{className:"space-y-3 pt-1",children:[d.jsxs("div",{className:"flex items-center justify-between px-0.5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"终端快捷指令与备用直连书签"}),d.jsx("span",{className:"text-[11px] font-mono-num",style:{color:"var(--text-subtle)"},children:"· 点击指令即复制"})]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[d.jsx("button",{onClick:()=>c("refresh_ddns","正在同步 Cloudflare DDNS..."),className:"hover:underline font-medium cursor-pointer",style:{color:"var(--accent)"},children:"刷新 DDNS 解析"}),d.jsx("button",{onClick:()=>c("mount_nas","正在巡检极空间 20TB SMB 挂载..."),className:"hover:underline font-medium cursor-pointer",style:{color:"var(--accent)"},children:"巡检极空间挂载"})]})]}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:gE.map(r=>d.jsxs("button",{onClick:()=>i(r.cmd,r.label),className:"hl-card hl-card-interactive px-4 py-3 text-left flex items-center justify-between gap-2 cursor-pointer",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"text-xs font-semibold",children:r.label}),d.jsx("div",{className:"text-[11px] font-mono-num truncate mt-0.5",style:{color:"var(--accent)"},children:r.cmd})]}),d.jsx("span",{className:"text-[10px] font-mono-num px-1.5 py-0.5 rounded hl-muted shrink-0",style:{color:"var(--text-muted)"},children:"COPY"})]},r.cmd))})]})},pE=Dg("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-mono-num font-medium transition-colors shrink-0",{variants:{variant:{default:"bg-[var(--primary)] text-[var(--primary-fg)]",secondary:"hl-muted text-[var(--text-muted)] border hl-border",outline:"border hl-border text-[var(--text-muted)] bg-[var(--bg-card)]",accent:"bg-[var(--accent-soft)] text-[var(--accent)] font-semibold",success:"bg-[var(--success-soft)] text-[var(--success)] font-semibold"}},defaultVariants:{variant:"secondary"}});function wn({className:i,variant:c,...r}){return d.jsx("div",{className:Xe(pE({variant:c}),i),...r})}var cg=1,bE=.9,xE=.8,SE=.17,uf=.1,cf=.999,EE=.9999,NE=.99,CE=/[\\\/_+.#"@\[\(\{&]/,TE=/[\\\/_+.#"@\[\(\{&]/g,_E=/[\s-]/,Ap=/[\s-]/g;function Sf(i,c,r,o,f,m,v){if(m===c.length)return f===i.length?cg:NE;var p=`${f},${m}`;if(v[p]!==void 0)return v[p];for(var E=o.charAt(m),b=r.indexOf(E,f),N=0,y,T,B,D;b>=0;)y=Sf(i,c,r,o,b+1,m+1,v),y>N&&(b===f?y*=cg:CE.test(i.charAt(b-1))?(y*=xE,B=i.slice(f,b-1).match(TE),B&&f>0&&(y*=Math.pow(cf,B.length))):_E.test(i.charAt(b-1))?(y*=bE,D=i.slice(f,b-1).match(Ap),D&&f>0&&(y*=Math.pow(cf,D.length))):(y*=SE,f>0&&(y*=Math.pow(cf,b-f))),i.charAt(b)!==c.charAt(m)&&(y*=EE)),(yy&&(y=T*uf)),y>N&&(N=y),b=r.indexOf(E,b+1);return v[p]=N,N}function rg(i){return i.toLowerCase().replace(Ap," ")}function wE(i,c,r){return i=r&&r.length>0?`${i+" "+r.join(" ")}`:i,Sf(i,c,rg(i),rg(c),0,0,{})}var OE=Object.defineProperty,ot=(i,c)=>OE(i,"name",{value:c,configurable:!0}),Ef="dismissableLayer.update",AE="dismissableLayer.pointerDownOutside",zE="dismissableLayer.focusOutside",og,zp=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),RE=g.forwardRef(ot(function(c,r){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:f=!1,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:p,onInteractOutside:E,onDismiss:b,...N}=c,y=g.useContext(zp),[T,B]=g.useState(null),D=(T==null?void 0:T.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,M]=g.useState({}),H=Dt(r,B),Z=Array.from(y.layers),[Q]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),V=Q?Z.indexOf(Q):-1,P=T?Z.indexOf(T):-1,F=y.layersWithOutsidePointerEventsDisabled.size>0,G=P>=V,U=g.useRef(!1),k=jp(se=>{v==null||v(se),E==null||E(se),se.defaultPrevented||b==null||b()},{ownerDocument:D,deferPointerDownOutside:f,isDeferredPointerDownOutsideRef:U,dismissableSurfaces:y.dismissableSurfaces,shouldHandlePointerDownOutside:g.useCallback(se=>{if(!(se instanceof Node))return!1;const je=[...y.branches].some(ze=>ze.contains(se));return G&&!je},[y.branches,G])}),ce=Dp(se=>{if(f&&U.current)return;const je=se.target;[...y.branches].some(ye=>ye.contains(je))||(p==null||p(se),E==null||E(se),se.defaultPrevented||b==null||b())},D),xe=T?P===Z.length-1:!1,he=ia(se=>{se.key==="Escape"&&(m==null||m(se),!se.defaultPrevented&&b&&(se.preventDefault(),b()))});return g.useEffect(()=>{if(xe)return D.addEventListener("keydown",he,{capture:!0}),()=>D.removeEventListener("keydown",he,{capture:!0})},[D,xe,he]),g.useEffect(()=>{if(T)return o&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(og=D.body.style.pointerEvents,D.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(T)),y.layers.add(T),Nf(),()=>{o&&(y.layersWithOutsidePointerEventsDisabled.delete(T),y.layersWithOutsidePointerEventsDisabled.size===0&&(D.body.style.pointerEvents=og))}},[T,D,o,y]),g.useEffect(()=>()=>{T&&(y.layers.delete(T),y.layersWithOutsidePointerEventsDisabled.delete(T),Nf())},[T,y]),g.useEffect(()=>{const se=ot(()=>M({}),"handleUpdate");return document.addEventListener(Ef,se),()=>document.removeEventListener(Ef,se)},[]),d.jsx(Ze.div,{...N,ref:H,style:{pointerEvents:F?G?"auto":"none":void 0,...c.style},onFocusCapture:st(c.onFocusCapture,ce.onFocusCapture),onBlurCapture:st(c.onBlurCapture,ce.onBlurCapture),onPointerDownCapture:st(c.onPointerDownCapture,k.onPointerDownCapture)})},"DismissableLayer"));function Rp(){const i=g.useContext(zp),[c,r]=g.useState(null);return g.useEffect(()=>{if(c)return i.dismissableSurfaces.add(c),()=>{i.dismissableSurfaces.delete(c)}},[c,i.dismissableSurfaces]),r}ot(Rp,"useDismissableLayerSurface");var jE=ot(()=>!0,"IS_TRUE");function jp(i,c){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:f,dismissableSurfaces:m,shouldHandlePointerDownOutside:v=jE}=c,p=ia(i),E=g.useRef(!1),b=g.useRef(!1),N=g.useRef(new Map),y=g.useRef(()=>{});return g.useEffect(()=>{function T(){b.current=!1,f.current=!1,N.current.clear()}ot(T,"resetOutsideInteraction");function B(){return Array.from(N.current.values()).some(Boolean)}ot(B,"isOutsideInteractionIntercepted");function D(V){if(!b.current)return;const P=V.target;P instanceof Node&&[...m].some(G=>G.contains(P))||N.current.set(V.type,!0),V.type==="click"&&window.setTimeout(()=>{b.current&&y.current()},0)}ot(D,"handleInteractionCapture");function M(V){b.current&&N.current.set(V.type,!1)}ot(M,"handleInteractionBubble");const H=ot(V=>{if(V.target&&!E.current){let P=function(){r.removeEventListener("click",y.current);const G=B();T(),G||Qf(AE,p,F,{discrete:!0})};if(ot(P,"handleAndDispatchPointerDownOutsideEvent"),!v(V.target)){r.removeEventListener("click",y.current),T(),E.current=!1;return}const F={originalEvent:V};b.current=!0,f.current=o&&V.button===0,N.current.clear(),!o||V.button!==0?P():(r.removeEventListener("click",y.current),y.current=P,r.addEventListener("click",y.current,{once:!0}))}else r.removeEventListener("click",y.current),T();E.current=!1},"handlePointerDown"),Z=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const V of Z)r.addEventListener(V,D,!0),r.addEventListener(V,M);const Q=window.setTimeout(()=>{r.addEventListener("pointerdown",H)},0);return()=>{window.clearTimeout(Q),r.removeEventListener("pointerdown",H),r.removeEventListener("click",y.current);for(const V of Z)r.removeEventListener(V,D,!0),r.removeEventListener(V,M)}},[r,p,o,f,m,v]),{onPointerDownCapture:ot(()=>E.current=!0,"onPointerDownCapture")}}ot(jp,"usePointerDownOutside");function Dp(i,c=globalThis==null?void 0:globalThis.document){const r=ia(i),o=g.useRef(!1);return g.useEffect(()=>{const f=ot(m=>{m.target&&!o.current&&Qf(zE,r,{originalEvent:m},{discrete:!1})},"handleFocus");return c.addEventListener("focusin",f),()=>c.removeEventListener("focusin",f)},[c,r]),{onFocusCapture:ot(()=>o.current=!0,"onFocusCapture"),onBlurCapture:ot(()=>o.current=!1,"onBlurCapture")}}ot(Dp,"useFocusOutside");function Nf(){const i=new CustomEvent(Ef);document.dispatchEvent(i)}ot(Nf,"dispatchUpdate");function Qf(i,c,r,{discrete:o}){const f=r.originalEvent.target,m=new CustomEvent(i,{bubbles:!1,cancelable:!0,detail:r});c&&f.addEventListener(i,c,{once:!0}),o?up(f,m):f.dispatchEvent(m)}ot(Qf,"handleAndDispatchCustomEvent");var DE=Object.defineProperty,tt=(i,c)=>DE(i,"name",{value:c,configurable:!0}),rf="focusScope.autoFocusOnMount",of="focusScope.autoFocusOnUnmount",sg={bubbles:!1,cancelable:!0},ME=g.forwardRef(tt(function(c,r){const{loop:o=!1,trapped:f=!1,branches:m,onMountAutoFocus:v,onUnmountAutoFocus:p,...E}=c,[b,N]=g.useState(null),y=ia(v),T=ia(p),B=g.useRef(null),D=Dt(r,N),M=g.useRef(m);g.useEffect(()=>{M.current=m});const H=g.useCallback(V=>{var P;return V?b!=null&&b.contains(V)?!0:!!((P=M.current)!=null&&P.some(F=>F.contains(V))):!1},[b]),Z=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(f){let V=function(U){if(Z.paused||!b)return;const k=U.target;H(k)?B.current=k:Zl(B.current,{select:!0})},P=function(U){if(Z.paused||!b)return;const k=U.relatedTarget;k!==null&&(H(k)||Zl(B.current,{select:!0}))},F=function(U){if(document.activeElement===document.body)for(const ce of U)ce.removedNodes.length>0&&Zl(b)};tt(V,"handleFocusIn"),tt(P,"handleFocusOut"),tt(F,"handleMutations"),document.addEventListener("focusin",V),document.addEventListener("focusout",P);const G=new MutationObserver(F);return b&&G.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",V),document.removeEventListener("focusout",P),G.disconnect()}}},[f,b,Z.paused,H]),g.useEffect(()=>{if(b){fg.add(Z);const V=document.activeElement;if(!b.contains(V)){const F=new CustomEvent(rf,sg);b.addEventListener(rf,y),b.dispatchEvent(F),F.defaultPrevented||(Bp(qp(Zf(b)),{select:!0}),document.activeElement===V&&Zl(b))}return()=>{b.removeEventListener(rf,y);const F=b.ownerDocument,G=CustomEvent;setTimeout(()=>{const U=new G(of,sg);b.addEventListener(of,T),b.dispatchEvent(U),U.defaultPrevented||Zl(V??F.body,{select:!0}),b.removeEventListener(of,T),fg.remove(Z)},0)}}},[b,y,T,Z]);const Q=g.useCallback(V=>{if(!o&&!f||Z.paused)return;const P=V.key==="Tab"&&!V.altKey&&!V.ctrlKey&&!V.metaKey,F=document.activeElement;if(P&&F){const G=V.currentTarget,[U,k]=kp(G);U&&k?!V.shiftKey&&F===k?(V.preventDefault(),o&&Zl(U,{select:!0})):V.shiftKey&&F===U&&(V.preventDefault(),o&&Zl(k,{select:!0})):F===G&&V.preventDefault()}},[o,f,Z.paused]);return d.jsx(Ze.div,{tabIndex:-1,...E,ref:D,onKeyDown:Q})},"FocusScope")),Mp=g.createContext(null);function Up({registry:i,children:c}){return i?d.jsx(Mp.Provider,{value:i,children:c}):c}tt(Up,"FocusScopeBranchProvider");function Hp(){const[i,c]=g.useState([]),r=g.useMemo(()=>({add:tt(o=>c(f=>f.includes(o)?f:[...f,o]),"add"),remove:tt(o=>c(f=>f.filter(m=>m!==o)),"remove")}),[]);return{nodes:i,registry:r}}tt(Hp,"useFocusScopeBranchRegistry");function UE(i){const c=g.useContext(Mp);g.useEffect(()=>{if(!(!i||!c))return c.add(i),()=>c.remove(i)},[i,c])}tt(UE,"useFocusScopeBranch");function Bp(i,{select:c=!1}={}){const r=document.activeElement;for(const o of i)if(Zl(o,{select:c}),document.activeElement!==r)return}tt(Bp,"focusFirst");function kp(i){const c=Zf(i),r=Cf(c,i),o=Cf(c.reverse(),i);return[r,o]}tt(kp,"getTabbableEdges");function Zf(i){const c=[],o=i.ownerDocument.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:tt(f=>{const m=f.tagName==="INPUT"&&f.type==="hidden";return f.disabled||f.hidden||m?NodeFilter.FILTER_SKIP:f.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)c.push(o.currentNode);return c}tt(Zf,"getTabbableCandidates");function Cf(i,c){const r=typeof c.checkVisibility=="function"&&c.checkVisibility({checkVisibilityCSS:!0});for(const o of i)if(!(r?!o.checkVisibility({checkVisibilityCSS:!0}):Lp(o,{upTo:c})))return o}tt(Cf,"findVisible");function Lp(i,{upTo:c}){if(getComputedStyle(i).visibility==="hidden")return!0;for(;i;){if(c!==void 0&&i===c)return!1;if(getComputedStyle(i).display==="none")return!0;i=i.parentElement}return!1}tt(Lp,"isHidden");function Gp(i){return i.tagName==="INPUT"&&typeof i.select=="function"}tt(Gp,"isSelectableInput");function Zl(i,{select:c=!1}={}){if(i&&i.focus){const o=(i.ownerDocument??document).activeElement;i.focus({preventScroll:!0}),i!==o&&Gp(i)&&c&&i.select()}}tt(Zl,"focus");var fg=Yp();function Yp(){let i=[];return{add(c){const r=i[0];c!==r&&(r==null||r.pause()),i=Tf(i,c),i.unshift(c)},remove(c){var r;i=Tf(i,c),(r=i[0])==null||r.resume()}}}tt(Yp,"createFocusScopesStack");function Tf(i,c){const r=[...i],o=r.indexOf(c);return o!==-1&&r.splice(o,1),r}tt(Tf,"arrayRemove");function qp(i){return i.filter(c=>c.tagName!=="A")}tt(qp,"removeLinks");var HE=Object.defineProperty,BE=(i,c)=>HE(i,"name",{value:c,configurable:!0}),kE=g.forwardRef(BE(function(c,r){var E;const{container:o,...f}=c,[m,v]=g.useState(!1);ul(()=>v(!0),[]);const p=o||m&&((E=globalThis==null?void 0:globalThis.document)==null?void 0:E.body);return p?ap.createPortal(d.jsx(Ze.div,{...f,ref:r}),p):null},"Portal")),LE=Object.defineProperty,Kf=(i,c)=>LE(i,"name",{value:c,configurable:!0}),Ic=0,Ol=null;function GE(i){return Jf(),i.children}Kf(GE,"FocusGuards");function Jf(){g.useEffect(()=>{Ol||(Ol={start:_f(),end:_f()});const{start:i,end:c}=Ol;return document.body.firstElementChild!==i&&document.body.insertAdjacentElement("afterbegin",i),document.body.lastElementChild!==c&&document.body.insertAdjacentElement("beforeend",c),Ic++,()=>{Ic===1&&(Ol==null||Ol.start.remove(),Ol==null||Ol.end.remove(),Ol=null),Ic=Math.max(0,Ic-1)}},[])}Kf(Jf,"useFocusGuards");function _f(){const i=document.createElement("span");return i.setAttribute("data-radix-focus-guard",""),i.tabIndex=0,i.style.outline="none",i.style.opacity="0",i.style.position="fixed",i.style.pointerEvents="none",i}Kf(_f,"createFocusGuard");var Al=function(){return Al=Object.assign||function(c){for(var r,o=1,f=arguments.length;o"u")return nN;var c=aN(i),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:c[0],top:c[1],right:c[2],gap:Math.max(0,o-r+c[2]-c[0])}},iN=Zp(),ou="data-scroll-locked",cN=function(i,c,r,o){var f=i.left,m=i.top,v=i.right,p=i.gap;return r===void 0&&(r="margin"),` - .`.concat(qE,` { - overflow: hidden `).concat(o,`; - padding-right: `).concat(p,"px ").concat(o,`; - } - body[`).concat(ou,`] { - overflow: hidden `).concat(o,`; - overscroll-behavior: contain; - `).concat([c&&"position: relative ".concat(o,";"),r==="margin"&&` - padding-left: `.concat(f,`px; - padding-top: `).concat(m,`px; - padding-right: `).concat(v,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(p,"px ").concat(o,`; - `),r==="padding"&&"padding-right: ".concat(p,"px ").concat(o,";")].filter(Boolean).join(""),` - } - - .`).concat(lr,` { - right: `).concat(p,"px ").concat(o,`; - } - - .`).concat(nr,` { - margin-right: `).concat(p,"px ").concat(o,`; - } - - .`).concat(lr," .").concat(lr,` { - right: 0 `).concat(o,`; - } - - .`).concat(nr," .").concat(nr,` { - margin-right: 0 `).concat(o,`; - } - - body[`).concat(ou,`] { - `).concat(VE,": ").concat(p,`px; - } -`)},mg=function(){var i=parseInt(document.body.getAttribute(ou)||"0",10);return isFinite(i)?i:0},rN=function(){g.useEffect(function(){return document.body.setAttribute(ou,(mg()+1).toString()),function(){var i=mg()-1;i<=0?document.body.removeAttribute(ou):document.body.setAttribute(ou,i.toString())}},[])},oN=function(i){var c=i.noRelative,r=i.noImportant,o=i.gapMode,f=o===void 0?"margin":o;rN();var m=g.useMemo(function(){return uN(f)},[f]);return g.createElement(iN,{styles:cN(m,!c,f,r?"":"!important")})},wf=!1;if(typeof window<"u")try{var Fc=Object.defineProperty({},"passive",{get:function(){return wf=!0,!0}});window.addEventListener("test",Fc,Fc),window.removeEventListener("test",Fc,Fc)}catch{wf=!1}var nu=wf?{passive:!1}:!1,sN=function(i){return i.tagName==="TEXTAREA"},Kp=function(i,c){if(!(i instanceof Element))return!1;var r=window.getComputedStyle(i);return r[c]!=="hidden"&&!(r.overflowY===r.overflowX&&!sN(i)&&r[c]==="visible")},fN=function(i){return Kp(i,"overflowY")},dN=function(i){return Kp(i,"overflowX")},hg=function(i,c){var r=c.ownerDocument,o=c;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var f=Jp(i,o);if(f){var m=Ip(i,o),v=m[1],p=m[2];if(v>p)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},mN=function(i){var c=i.scrollTop,r=i.scrollHeight,o=i.clientHeight;return[c,r,o]},hN=function(i){var c=i.scrollLeft,r=i.scrollWidth,o=i.clientWidth;return[c,r,o]},Jp=function(i,c){return i==="v"?fN(c):dN(c)},Ip=function(i,c){return i==="v"?mN(c):hN(c)},vN=function(i,c){return i==="h"&&c==="rtl"?-1:1},yN=function(i,c,r,o,f){var m=vN(i,window.getComputedStyle(c).direction),v=m*o,p=r.target,E=c.contains(p),b=!1,N=v>0,y=0,T=0;do{if(!p)break;var B=Ip(i,p),D=B[0],M=B[1],H=B[2],Z=M-H-m*D;(D||Z)&&Jp(i,p)&&(y+=Z,T+=D);var Q=p.parentNode;p=Q&&Q.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Q.host:Q}while(!E&&p!==document.body||E&&(c.contains(p)||c===p));return(N&&Math.abs(y)<1||!N&&Math.abs(T)<1)&&(b=!0),b},$c=function(i){return"changedTouches"in i?[i.changedTouches[0].clientX,i.changedTouches[0].clientY]:[0,0]},vg=function(i){return[i.deltaX,i.deltaY]},yg=function(i){return i&&"current"in i?i.current:i},gN=function(i,c){return i[0]===c[0]&&i[1]===c[1]},pN=function(i){return` - .block-interactivity-`.concat(i,` {pointer-events: none;} - .allow-interactivity-`).concat(i,` {pointer-events: all;} -`)},bN=0,au=[];function xN(i){var c=g.useRef([]),r=g.useRef([0,0]),o=g.useRef(),f=g.useState(bN++)[0],m=g.useState(Zp)[0],v=g.useRef(i);g.useEffect(function(){v.current=i},[i]),g.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(f));var M=YE([i.lockRef.current],(i.shards||[]).map(yg),!0).filter(Boolean);return M.forEach(function(H){return H.classList.add("allow-interactivity-".concat(f))}),function(){document.body.classList.remove("block-interactivity-".concat(f)),M.forEach(function(H){return H.classList.remove("allow-interactivity-".concat(f))})}}},[i.inert,i.lockRef.current,i.shards]);var p=g.useCallback(function(M,H){if("touches"in M&&M.touches.length===2||M.type==="wheel"&&M.ctrlKey)return!v.current.allowPinchZoom;var Z=$c(M),Q=r.current,V="deltaX"in M?M.deltaX:Q[0]-Z[0],P="deltaY"in M?M.deltaY:Q[1]-Z[1],F,G=M.target,U=Math.abs(V)>Math.abs(P)?"h":"v";if("touches"in M&&U==="h"&&G.type==="range")return!1;var k=window.getSelection(),ce=k&&k.anchorNode,xe=ce?ce===G||ce.contains(G):!1;if(xe)return!1;var he=hg(U,G);if(!he)return!0;if(he?F=U:(F=U==="v"?"h":"v",he=hg(U,G)),!he)return!1;if(!o.current&&"changedTouches"in M&&(V||P)&&(o.current=F),!F)return!0;var se=o.current||F;return yN(se,H,M,se==="h"?V:P)},[]),E=g.useCallback(function(M){var H=M;if(!(!au.length||au[au.length-1]!==m)){var Z="deltaY"in H?vg(H):$c(H),Q=c.current.filter(function(F){return F.name===H.type&&(F.target===H.target||H.target===F.shadowParent)&&gN(F.delta,Z)})[0];if(Q&&Q.should){H.cancelable&&H.preventDefault();return}if(!Q){var V=(v.current.shards||[]).map(yg).filter(Boolean).filter(function(F){return F.contains(H.target)}),P=V.length>0?p(H,V[0]):!v.current.noIsolation;P&&H.cancelable&&H.preventDefault()}}},[]),b=g.useCallback(function(M,H,Z,Q){var V={name:M,delta:H,target:Z,should:Q,shadowParent:SN(Z)};c.current.push(V),setTimeout(function(){c.current=c.current.filter(function(P){return P!==V})},1)},[]),N=g.useCallback(function(M){r.current=$c(M),o.current=void 0},[]),y=g.useCallback(function(M){b(M.type,vg(M),M.target,p(M,i.lockRef.current))},[]),T=g.useCallback(function(M){b(M.type,$c(M),M.target,p(M,i.lockRef.current))},[]);g.useEffect(function(){return au.push(m),i.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:T}),document.addEventListener("wheel",E,nu),document.addEventListener("touchmove",E,nu),document.addEventListener("touchstart",N,nu),function(){au=au.filter(function(M){return M!==m}),document.removeEventListener("wheel",E,nu),document.removeEventListener("touchmove",E,nu),document.removeEventListener("touchstart",N,nu)}},[]);var B=i.removeScrollBar,D=i.inert;return g.createElement(g.Fragment,null,D?g.createElement(m,{styles:pN(f)}):null,B?g.createElement(oN,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function SN(i){for(var c=null;i!==null;)i instanceof ShadowRoot&&(c=i.host,i=i.host),i=i.parentNode;return c}const EN=FE(Qp,xN);var Fp=g.forwardRef(function(i,c){return g.createElement(dr,Al({},i,{ref:c,sideCar:EN}))});Fp.classNames=dr.classNames;var NN=function(i){if(typeof document>"u")return null;var c=Array.isArray(i)?i[0]:i;return c.ownerDocument.body},uu=new WeakMap,Pc=new WeakMap,Wc={},mf=0,$p=function(i){return i&&(i.host||$p(i.parentNode))},CN=function(i,c){return c.map(function(r){if(i.contains(r))return r;var o=$p(r);return o&&i.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",i,". Doing nothing"),null)}).filter(function(r){return!!r})},TN=function(i,c,r,o){var f=CN(c,Array.isArray(i)?i:[i]);Wc[r]||(Wc[r]=new WeakMap);var m=Wc[r],v=[],p=new Set,E=new Set(f),b=function(y){!y||p.has(y)||(p.add(y),b(y.parentNode))};f.forEach(b);var N=function(y){!y||E.has(y)||Array.prototype.forEach.call(y.children,function(T){if(p.has(T))N(T);else try{var B=T.getAttribute(o),D=B!==null&&B!=="false",M=(uu.get(T)||0)+1,H=(m.get(T)||0)+1;uu.set(T,M),m.set(T,H),v.push(T),M===1&&D&&Pc.set(T,!0),H===1&&T.setAttribute(r,"true"),D||T.setAttribute(o,"true")}catch(Z){console.error("aria-hidden: cannot operate on ",T,Z)}})};return N(c),p.clear(),mf++,function(){v.forEach(function(y){var T=uu.get(y)-1,B=m.get(y)-1;uu.set(y,T),m.set(y,B),T||(Pc.has(y)||y.removeAttribute(o),Pc.delete(y)),B||y.removeAttribute(r)}),mf--,mf||(uu=new WeakMap,uu=new WeakMap,Pc=new WeakMap,Wc={})}},_N=function(i,c,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(i)?i:[i]),f=NN(i);return f?(o.push.apply(o,Array.from(f.querySelectorAll("[aria-live], script"))),TN(o,f,r,"aria-hidden")):function(){return null}},wN=Object.defineProperty,il=(i,c)=>wN(i,"name",{value:c,configurable:!0}),If="Dialog",[Pp,xC]=sa(If),[ON,Jl]=Pp(If),Wp=il(i=>{const{__scopeDialog:c,children:r,open:o,defaultOpen:f,onOpenChange:m,modal:v=!0}=i,p=g.useRef(null),E=g.useRef(null),{nodes:b,registry:N}=Hp(),[y,T]=mi({prop:o,defaultProp:f??!1,onChange:m,caller:If}),[B,D]=g.useState(0),[M,H]=g.useState(0);return d.jsx(ON,{scope:c,triggerRef:p,contentRef:E,contentId:al(),titleId:al(),descriptionId:al(),titlePresent:B>0,descriptionPresent:M>0,setTitleCount:D,setDescriptionCount:H,open:y,onOpenChange:T,onOpenToggle:g.useCallback(()=>T(Z=>!Z),[T]),modal:v,branchNodes:b,branchRegistry:N,children:r})},"Dialog"),e0="DialogPortal",[AN,t0]=Pp(e0,{forceMount:void 0}),l0=il(i=>{const{__scopeDialog:c,forceMount:r,children:o,container:f}=i,m=Jl(e0,c);return d.jsx(AN,{scope:c,forceMount:r,children:g.Children.map(o,v=>d.jsx(fr,{present:r||m.open,children:d.jsx(kE,{asChild:!0,container:f,children:v})}))})},"DialogPortal"),Of="DialogOverlay",Ff=g.forwardRef(il(function(c,r){const o=t0(Of,c.__scopeDialog),{forceMount:f=o.forceMount,...m}=c,v=Jl(Of,c.__scopeDialog);return v.modal?d.jsx(fr,{present:f||v.open,children:d.jsx(RN,{...m,ref:r})}):null},"DialogOverlay")),zN=An("DialogOverlay.RemoveScroll"),RN=g.forwardRef(il(function(c,r){const{__scopeDialog:o,...f}=c,m=Jl(Of,o),v=Rp(),p=Dt(r,v);return d.jsx(Fp,{as:zN,allowPinchZoom:!0,shards:g.useMemo(()=>[m.contentRef,...m.branchNodes.map(E=>({current:E}))],[m.contentRef,m.branchNodes]),children:d.jsx(Ze.div,{"data-state":Pf(m.open),...f,ref:p,style:{pointerEvents:"auto",...f.style}})})},"DialogOverlayImpl")),fi="DialogContent",$f=g.forwardRef(il(function(c,r){const o=t0(fi,c.__scopeDialog),{forceMount:f=o.forceMount,...m}=c,v=Jl(fi,c.__scopeDialog);return d.jsx(fr,{present:f||v.open,children:v.modal?d.jsx(jN,{...m,ref:r}):d.jsx(DN,{...m,ref:r})})},"DialogContent")),jN=g.forwardRef(il(function(c,r){const o=Jl(fi,c.__scopeDialog),f=g.useRef(null),m=Dt(r,o.contentRef,f);return g.useEffect(()=>{const v=f.current;if(v)return _N(v)},[]),d.jsx(n0,{...c,ref:m,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:st(c.onCloseAutoFocus,v=>{var p;v.preventDefault(),(p=o.triggerRef.current)==null||p.focus()}),onPointerDownOutside:st(c.onPointerDownOutside,v=>{const p=v.detail.originalEvent,E=p.button===0&&p.ctrlKey===!0;(p.button===2||E)&&v.preventDefault()}),onFocusOutside:st(c.onFocusOutside,v=>v.preventDefault())})},"DialogContentModal")),DN=g.forwardRef(il(function(c,r){const o=Jl(fi,c.__scopeDialog),f=g.useRef(!1),m=g.useRef(!1);return d.jsx(n0,{...c,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:v=>{var p,E;(p=c.onCloseAutoFocus)==null||p.call(c,v),v.defaultPrevented||(f.current||(E=o.triggerRef.current)==null||E.focus(),v.preventDefault()),f.current=!1,m.current=!1},onInteractOutside:v=>{var b,N;(b=c.onInteractOutside)==null||b.call(c,v),v.defaultPrevented||(f.current=!0,v.detail.originalEvent.type==="pointerdown"&&(m.current=!0));const p=v.target;((N=o.triggerRef.current)==null?void 0:N.contains(p))&&v.preventDefault(),v.detail.originalEvent.type==="focusin"&&m.current&&v.preventDefault()}})},"DialogContentNonModal")),n0=g.forwardRef(il(function(c,r){const{__scopeDialog:o,trapFocus:f,onOpenAutoFocus:m,onCloseAutoFocus:v,"aria-describedby":p,children:E,...b}=c,N=Jl(fi,o);return Jf(),d.jsx(Up,{registry:N.branchRegistry,children:d.jsx(ME,{asChild:!0,loop:!0,trapped:f,branches:N.branchNodes,onMountAutoFocus:m,onUnmountAutoFocus:v,children:d.jsx(RE,{role:"dialog",id:N.contentId,"aria-labelledby":N.titlePresent?N.titleId:void 0,"aria-describedby":N.descriptionPresent?i0(p,N.descriptionId):p,"data-state":Pf(N.open),...b,ref:r,deferPointerDownOutside:!0,onDismiss:()=>N.onOpenChange(!1),children:E})})})},"DialogContentImpl")),a0=g.forwardRef(il(function(c,r){const{__scopeDialog:o,...f}=c,m=Jl("DialogTitle",o),{setTitleCount:v}=m;return ul(()=>(v(p=>p+1),()=>v(p=>p-1)),[v]),d.jsx(Ze.h2,{id:m.titleId,...f,ref:r})},"DialogTitle")),u0=g.forwardRef(il(function(c,r){const{__scopeDialog:o,...f}=c,m=Jl("DialogDescription",o),{setDescriptionCount:v}=m;return ul(()=>(v(p=>p+1),()=>v(p=>p-1)),[v]),d.jsx(Ze.p,{id:m.descriptionId,...f,ref:r})},"DialogDescription"));function i0(...i){const c=new Set;for(const r of i)if(typeof r=="string")for(const o of String(r).trim().split(/\s+/))o&&c.add(o);return c.size>0?Array.from(c).join(" "):void 0}il(i0,"concatAriaDescribedby");function Pf(i){return i?"open":"closed"}il(Pf,"getState");var oi='[cmdk-group=""]',hf='[cmdk-group-items=""]',MN='[cmdk-group-heading=""]',c0='[cmdk-item=""]',gg=`${c0}:not([aria-disabled="true"])`,Af="cmdk-item-select",cu="data-value",UN=(i,c,r)=>wE(i,c,r),r0=g.createContext(void 0),hi=()=>g.useContext(r0),o0=g.createContext(void 0),Wf=()=>g.useContext(o0),s0=g.createContext(void 0),f0=g.forwardRef((i,c)=>{let r=ru(()=>{var X,re;return{search:"",value:(re=(X=i.value)!=null?X:i.defaultValue)!=null?re:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=ru(()=>new Set),f=ru(()=>new Map),m=ru(()=>new Map),v=ru(()=>new Set),p=d0(i),{label:E,children:b,value:N,onValueChange:y,filter:T,shouldFilter:B,loop:D,disablePointerSelection:M=!1,vimBindings:H=!0,...Z}=i,Q=al(),V=al(),P=al(),F=g.useRef(null),G=ZN();ca(()=>{if(N!==void 0){let X=N.trim();r.current.value=X,U.emit()}},[N]),ca(()=>{G(6,je)},[]);let U=g.useMemo(()=>({subscribe:X=>(v.current.add(X),()=>v.current.delete(X)),snapshot:()=>r.current,setState:(X,re,S)=>{var z,J,I,de;if(!Object.is(r.current[X],re)){if(r.current[X]=re,X==="search")se(),xe(),G(1,he);else if(X==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(P);te?te.focus():(z=document.getElementById(Q))==null||z.focus()}if(G(7,()=>{var te;r.current.selectedItemId=(te=ze())==null?void 0:te.id,U.emit()}),S||G(5,je),((J=p.current)==null?void 0:J.value)!==void 0){let te=re??"";(de=(I=p.current).onValueChange)==null||de.call(I,te);return}}U.emit()}},emit:()=>{v.current.forEach(X=>X())}}),[]),k=g.useMemo(()=>({value:(X,re,S)=>{var z;re!==((z=m.current.get(X))==null?void 0:z.value)&&(m.current.set(X,{value:re,keywords:S}),r.current.filtered.items.set(X,ce(re,S)),G(2,()=>{xe(),U.emit()}))},item:(X,re)=>(o.current.add(X),re&&(f.current.has(re)?f.current.get(re).add(X):f.current.set(re,new Set([X]))),G(3,()=>{se(),xe(),r.current.value||he(),U.emit()}),()=>{m.current.delete(X),o.current.delete(X),r.current.filtered.items.delete(X);let S=ze();G(4,()=>{se(),(S==null?void 0:S.getAttribute("id"))===X&&he(),U.emit()})}),group:X=>(f.current.has(X)||f.current.set(X,new Set),()=>{m.current.delete(X),f.current.delete(X)}),filter:()=>p.current.shouldFilter,label:E||i["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:Q,inputId:P,labelId:V,listInnerRef:F}),[]);function ce(X,re){var S,z;let J=(z=(S=p.current)==null?void 0:S.filter)!=null?z:UN;return X?J(X,r.current.search,re):0}function xe(){if(!r.current.search||p.current.shouldFilter===!1)return;let X=r.current.filtered.items,re=[];r.current.filtered.groups.forEach(z=>{let J=f.current.get(z),I=0;J.forEach(de=>{let te=X.get(de);I=Math.max(te,I)}),re.push([z,I])});let S=F.current;ye().sort((z,J)=>{var I,de;let te=z.getAttribute("id"),Se=J.getAttribute("id");return((I=X.get(Se))!=null?I:0)-((de=X.get(te))!=null?de:0)}).forEach(z=>{let J=z.closest(hf);J?J.appendChild(z.parentElement===J?z:z.closest(`${hf} > *`)):S.appendChild(z.parentElement===S?z:z.closest(`${hf} > *`))}),re.sort((z,J)=>J[1]-z[1]).forEach(z=>{var J;let I=(J=F.current)==null?void 0:J.querySelector(`${oi}[${cu}="${encodeURIComponent(z[0])}"]`);I==null||I.parentElement.appendChild(I)})}function he(){let X=ye().find(S=>S.getAttribute("aria-disabled")!=="true"),re=X==null?void 0:X.getAttribute(cu);U.setState("value",re||void 0)}function se(){var X,re,S,z;if(!r.current.search||p.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let J=0;for(let I of o.current){let de=(re=(X=m.current.get(I))==null?void 0:X.value)!=null?re:"",te=(z=(S=m.current.get(I))==null?void 0:S.keywords)!=null?z:[],Se=ce(de,te);r.current.filtered.items.set(I,Se),Se>0&&J++}for(let[I,de]of f.current)for(let te of de)if(r.current.filtered.items.get(te)>0){r.current.filtered.groups.add(I);break}r.current.filtered.count=J}function je(){var X,re,S;let z=ze();z&&(((X=z.parentElement)==null?void 0:X.firstChild)===z&&((S=(re=z.closest(oi))==null?void 0:re.querySelector(MN))==null||S.scrollIntoView({block:"nearest"})),z.scrollIntoView({block:"nearest"}))}function ze(){var X;return(X=F.current)==null?void 0:X.querySelector(`${c0}[aria-selected="true"]`)}function ye(){var X;return Array.from(((X=F.current)==null?void 0:X.querySelectorAll(gg))||[])}function K(X){let re=ye()[X];re&&U.setState("value",re.getAttribute(cu))}function W(X){var re;let S=ze(),z=ye(),J=z.findIndex(de=>de===S),I=z[J+X];(re=p.current)!=null&&re.loop&&(I=J+X<0?z[z.length-1]:J+X===z.length?z[0]:z[J+X]),I&&U.setState("value",I.getAttribute(cu))}function ie(X){let re=ze(),S=re==null?void 0:re.closest(oi),z;for(;S&&!z;)S=X>0?XN(S,oi):QN(S,oi),z=S==null?void 0:S.querySelector(gg);z?U.setState("value",z.getAttribute(cu)):W(X)}let ge=()=>K(ye().length-1),q=X=>{X.preventDefault(),X.metaKey?ge():X.altKey?ie(1):W(1)},Ce=X=>{X.preventDefault(),X.metaKey?K(0):X.altKey?ie(-1):W(-1)};return g.createElement(Ze.div,{ref:c,tabIndex:-1,...Z,"cmdk-root":"",onKeyDown:X=>{var re;(re=Z.onKeyDown)==null||re.call(Z,X);let S=X.nativeEvent.isComposing||X.keyCode===229;if(!(X.defaultPrevented||S))switch(X.key){case"n":case"j":{H&&X.ctrlKey&&q(X);break}case"ArrowDown":{q(X);break}case"p":case"k":{H&&X.ctrlKey&&Ce(X);break}case"ArrowUp":{Ce(X);break}case"Home":{X.preventDefault(),K(0);break}case"End":{X.preventDefault(),ge();break}case"Enter":{X.preventDefault();let z=ze();if(z){let J=new Event(Af);z.dispatchEvent(J)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:JN},E),mr(i,X=>g.createElement(o0.Provider,{value:U},g.createElement(r0.Provider,{value:k},X))))}),HN=g.forwardRef((i,c)=>{var r,o;let f=al(),m=g.useRef(null),v=g.useContext(s0),p=hi(),E=d0(i),b=(o=(r=E.current)==null?void 0:r.forceMount)!=null?o:v==null?void 0:v.forceMount;ca(()=>{if(!b)return p.item(f,v==null?void 0:v.id)},[b]);let N=m0(f,m,[i.value,i.children,m],i.keywords),y=Wf(),T=zn(G=>G.value&&G.value===N.current),B=zn(G=>b||p.filter()===!1?!0:G.search?G.filtered.items.get(f)>0:!0);g.useEffect(()=>{let G=m.current;if(!(!G||i.disabled))return G.addEventListener(Af,D),()=>G.removeEventListener(Af,D)},[B,i.onSelect,i.disabled]);function D(){var G,U;M(),(U=(G=E.current).onSelect)==null||U.call(G,N.current)}function M(){y.setState("value",N.current,!0)}if(!B)return null;let{disabled:H,value:Z,onSelect:Q,forceMount:V,keywords:P,...F}=i;return g.createElement(Ze.div,{ref:ua(m,c),...F,id:f,"cmdk-item":"",role:"option","aria-disabled":!!H,"aria-selected":!!T,"data-disabled":!!H,"data-selected":!!T,onPointerMove:H||p.getDisablePointerSelection()?void 0:M,onClick:H?void 0:D},i.children)}),BN=g.forwardRef((i,c)=>{let{heading:r,children:o,forceMount:f,...m}=i,v=al(),p=g.useRef(null),E=g.useRef(null),b=al(),N=hi(),y=zn(B=>f||N.filter()===!1?!0:B.search?B.filtered.groups.has(v):!0);ca(()=>N.group(v),[]),m0(v,p,[i.value,i.heading,E]);let T=g.useMemo(()=>({id:v,forceMount:f}),[f]);return g.createElement(Ze.div,{ref:ua(p,c),...m,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},r&&g.createElement("div",{ref:E,"cmdk-group-heading":"","aria-hidden":!0,id:b},r),mr(i,B=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?b:void 0},g.createElement(s0.Provider,{value:T},B))))}),kN=g.forwardRef((i,c)=>{let{alwaysRender:r,...o}=i,f=g.useRef(null),m=zn(v=>!v.search);return!r&&!m?null:g.createElement(Ze.div,{ref:ua(f,c),...o,"cmdk-separator":"",role:"separator"})}),LN=g.forwardRef((i,c)=>{let{onValueChange:r,...o}=i,f=i.value!=null,m=Wf(),v=zn(b=>b.search),p=zn(b=>b.selectedItemId),E=hi();return g.useEffect(()=>{i.value!=null&&m.setState("search",i.value)},[i.value]),g.createElement(Ze.input,{ref:c,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":E.listId,"aria-labelledby":E.labelId,"aria-activedescendant":p,id:E.inputId,type:"text",value:f?i.value:v,onChange:b=>{f||m.setState("search",b.target.value),r==null||r(b.target.value)}})}),GN=g.forwardRef((i,c)=>{let{children:r,label:o="Suggestions",...f}=i,m=g.useRef(null),v=g.useRef(null),p=zn(b=>b.selectedItemId),E=hi();return g.useEffect(()=>{if(v.current&&m.current){let b=v.current,N=m.current,y,T=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let B=b.offsetHeight;N.style.setProperty("--cmdk-list-height",B.toFixed(1)+"px")})});return T.observe(b),()=>{cancelAnimationFrame(y),T.unobserve(b)}}},[]),g.createElement(Ze.div,{ref:ua(m,c),...f,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":o,id:E.listId},mr(i,b=>g.createElement("div",{ref:ua(v,E.listInnerRef),"cmdk-list-sizer":""},b)))}),YN=g.forwardRef((i,c)=>{let{open:r,onOpenChange:o,overlayClassName:f,contentClassName:m,container:v,...p}=i;return g.createElement(Wp,{open:r,onOpenChange:o},g.createElement(l0,{container:v},g.createElement(Ff,{"cmdk-overlay":"",className:f}),g.createElement($f,{"aria-label":i.label,"cmdk-dialog":"",className:m},g.createElement(f0,{ref:c,...p}))))}),qN=g.forwardRef((i,c)=>zn(r=>r.filtered.count===0)?g.createElement(Ze.div,{ref:c,...i,"cmdk-empty":"",role:"presentation"}):null),VN=g.forwardRef((i,c)=>{let{progress:r,children:o,label:f="Loading...",...m}=i;return g.createElement(Ze.div,{ref:c,...m,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":f},mr(i,v=>g.createElement("div",{"aria-hidden":!0},v)))}),cl=Object.assign(f0,{List:GN,Item:HN,Input:LN,Group:BN,Separator:kN,Dialog:YN,Empty:qN,Loading:VN});function XN(i,c){let r=i.nextElementSibling;for(;r;){if(r.matches(c))return r;r=r.nextElementSibling}}function QN(i,c){let r=i.previousElementSibling;for(;r;){if(r.matches(c))return r;r=r.previousElementSibling}}function d0(i){let c=g.useRef(i);return ca(()=>{c.current=i}),c}var ca=typeof window>"u"?g.useEffect:g.useLayoutEffect;function ru(i){let c=g.useRef();return c.current===void 0&&(c.current=i()),c}function zn(i){let c=Wf(),r=()=>i(c.snapshot());return g.useSyncExternalStore(c.subscribe,r,r)}function m0(i,c,r,o=[]){let f=g.useRef(),m=hi();return ca(()=>{var v;let p=(()=>{var b;for(let N of r){if(typeof N=="string")return N.trim();if(typeof N=="object"&&"current"in N)return N.current?(b=N.current.textContent)==null?void 0:b.trim():f.current}})(),E=o.map(b=>b.trim());m.value(i,p,E),(v=c.current)==null||v.setAttribute(cu,p),f.current=p}),f}var ZN=()=>{let[i,c]=g.useState(),r=ru(()=>new Map);return ca(()=>{r.current.forEach(o=>o()),r.current=new Map},[i]),(o,f)=>{r.current.set(o,f),c({})}};function KN(i){let c=i.type;return typeof c=="function"?c(i.props):"render"in c?c.render(i.props):i}function mr({asChild:i,children:c},r){return i&&g.isValidElement(c)?g.cloneElement(KN(c),{ref:c.ref},r(c.props.children)):r(c)}var JN={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const h0=Wp,IN=l0,v0=g.forwardRef(({className:i,...c},r)=>d.jsx(Ff,{ref:r,className:Xe("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm transition-opacity",i),...c}));v0.displayName=Ff.displayName;const ed=g.forwardRef(({className:i,children:c,...r},o)=>d.jsxs(IN,{children:[d.jsx(v0,{}),d.jsx($f,{ref:o,className:Xe("fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] hl-card shadow-2xl duration-200 outline-none",i),...r,children:c})]}));ed.displayName=$f.displayName;const td=g.forwardRef(({className:i,...c},r)=>d.jsx(a0,{ref:r,className:Xe("text-sm font-bold leading-none tracking-tight",i),...c}));td.displayName=a0.displayName;const ld=g.forwardRef(({className:i,...c},r)=>d.jsx(u0,{ref:r,className:Xe("text-xs text-[var(--text-muted)]",i),...c}));ld.displayName=u0.displayName;const y0=g.forwardRef(({className:i,...c},r)=>d.jsx(cl,{ref:r,className:Xe("flex h-full w-full flex-col overflow-hidden rounded-xl bg-[var(--bg-card)] text-[var(--text-main)]",i),...c}));y0.displayName=cl.displayName;const FN=({children:i,...c})=>d.jsx(h0,{...c,children:d.jsxs(ed,{className:"max-w-xl overflow-hidden p-0 shadow-2xl top-[22%] translate-y-0",children:[d.jsx(td,{className:"sr-only",children:"全局命令与服务搜索面板"}),d.jsx(ld,{className:"sr-only",children:"使用键盘上下方向键选择服务或操作,回车立即执行"}),d.jsx(y0,{children:i})]})}),g0=g.forwardRef(({className:i,...c},r)=>d.jsxs("div",{className:"flex items-center border-b hl-border px-4 py-3 gap-3","cmdk-input-wrapper":"",children:[d.jsx(Rf,{className:"h-4 w-4 shrink-0 text-[var(--text-muted)]"}),d.jsx(cl.Input,{ref:r,className:Xe("flex w-full bg-transparent text-sm outline-none placeholder:text-[var(--text-subtle)] disabled:cursor-not-allowed disabled:opacity-50",i),...c}),d.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-muted text-[var(--text-muted)] shrink-0",children:"ESC"})]}));g0.displayName=cl.Input.displayName;const p0=g.forwardRef(({className:i,...c},r)=>d.jsx(cl.List,{ref:r,className:Xe("max-h-80 overflow-y-auto overflow-x-hidden p-2",i),...c}));p0.displayName=cl.List.displayName;const b0=g.forwardRef((i,c)=>d.jsx(cl.Empty,{ref:c,className:"py-6 text-center text-xs text-[var(--text-muted)]",...i}));b0.displayName=cl.Empty.displayName;const x0=g.forwardRef(({className:i,...c},r)=>d.jsx(cl.Group,{ref:r,className:Xe("overflow-hidden p-1 text-[var(--text-main)] [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[10px] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider [&_[cmdk-group-heading]]:text-[var(--text-subtle)]",i),...c}));x0.displayName=cl.Group.displayName;const S0=g.forwardRef(({className:i,...c},r)=>d.jsx(cl.Item,{ref:r,className:Xe("relative flex cursor-pointer select-none items-center justify-between rounded-lg px-3 py-2 text-xs outline-none transition-colors data-[selected=true]:bg-[var(--bg-muted)] data-[selected=true]:text-[var(--text-main)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",i),...c}));S0.displayName=cl.Item.displayName;const $N=()=>{const{showCmdPalette:i,setShowCmdPalette:c,setShowAgyModal:r,setTheme:o,triggerAction:f,copyCmd:m,getEffectiveMode:v}=jn(),p=g.useMemo(()=>{const E=v(),b=(N,y,T)=>E==="lan"?T:E==="home10443"?y:N;return[{id:"open-agy-drawer",title:"在页内唤起 AGY 云端终端",hint:"tmux attach -t agy",type:"终端",run:()=>r(!0)},{id:"open-agy",title:"新窗口打开 AGY 云端工作台",hint:"https://agy.961504.xyz",type:"跳转",run:()=>window.open(b("https://agy.961504.xyz","https://agy.home.961504.xyz:10443","http://192.168.31.164:7681"),"_blank")},{id:"open-z4",title:"打开 极空间 Z4 私有云 (20TB)",hint:"192.168.31.185:5055",type:"跳转",run:()=>window.open(b("https://z4.home.961504.xyz:10443","https://z4.home.961504.xyz:10443","http://192.168.31.185:5055"),"_blank")},{id:"open-vw",title:"打开 Vaultwarden 密码保险箱",hint:"https://vw.961504.xyz",type:"跳转",run:()=>window.open(b("https://vw.961504.xyz","https://vw.home.961504.xyz:10443","http://192.168.31.164:8222"),"_blank")},{id:"open-clash",title:"打开 Mihomo 路由分流面板",hint:"192.168.31.1:9999",type:"跳转",run:()=>window.open(b("https://clash.home.961504.xyz:10443/ui/","https://clash.home.961504.xyz:10443/ui/","http://192.168.31.1:9999/ui/"),"_blank")},{id:"act-backup",title:"立即打包备份核心数据至极空间 Z4",hint:"backup-to-nas.sh",type:"运维",run:()=>f("backup_nas","正在打包备份至极空间 Z4...")},{id:"act-ddns",title:"立即刷新 Cloudflare DDNS 解析",hint:"cloudflare-ddns.sh",type:"运维",run:()=>f("refresh_ddns","正在同步 Cloudflare DDNS...")},{id:"ssh-mini",title:"复制 SSH 连接 Mac mini 指令",hint:"ssh mini",type:"SSH",run:()=>m("ssh mini","SSH Mac mini")},{id:"ssh-agy",title:"复制 终端接力 AGY 会话指令",hint:'ssh mini -t "tmux attach -t agy"',type:"SSH",run:()=>m('ssh mini -t "tmux attach -t agy"',"接力 AGY")},{id:"theme-system",title:"主题模式: 跟随设备系统深浅色自动切换",hint:"system",type:"主题",run:()=>o("system")},{id:"theme-light",title:"切换主题: 浅色纯净 (Light)",hint:"light",type:"主题",run:()=>o("light")},{id:"theme-dark",title:"切换主题: 深色极客 (Dark)",hint:"dark",type:"主题",run:()=>o("dark")}]},[v,r,o,f,m]);return d.jsxs(FN,{open:i,onOpenChange:c,children:[d.jsx(g0,{placeholder:"输入服务名称、SSH 指令、路由模式或主题..."}),d.jsxs(p0,{children:[d.jsx(b0,{children:"未找到匹配的指令或服务"}),d.jsx(x0,{heading:"快速操作与服务直达 (cmdk + Radix Dialog)",children:p.map(E=>d.jsxs(S0,{value:`${E.title} ${E.hint} ${E.type}`,onSelect:()=>{c(!1),E.run()},children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("span",{className:"font-medium",children:E.title}),d.jsx("span",{className:"font-mono-num text-[11px] text-[var(--text-muted)]",children:E.hint})]}),d.jsx(wn,{variant:"secondary",children:E.type})]},E.id))})]})]})},On=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("hl-card",i),...c}));On.displayName="Card";const PN=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("flex flex-col space-y-1.5 p-5",i),...c}));PN.displayName="CardHeader";const WN=g.forwardRef(({className:i,...c},r)=>d.jsx("h3",{ref:r,className:Xe("text-sm font-bold leading-none tracking-tight",i),...c}));WN.displayName="CardTitle";const eC=g.forwardRef(({className:i,...c},r)=>d.jsx("p",{ref:r,className:Xe("text-xs text-[var(--text-muted)]",i),...c}));eC.displayName="CardDescription";const tC=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("p-5 pt-0",i),...c}));tC.displayName="CardContent";const lC=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("flex items-center p-5 pt-0",i),...c}));lC.displayName="CardFooter";const E0=g.forwardRef(({className:i,type:c,...r},o)=>d.jsx("input",{type:c,className:Xe("hl-input",i),ref:o,...r}));E0.displayName="Input";const cr=g.forwardRef(({className:i,...c},r)=>d.jsx("div",{ref:r,className:Xe("hl-input-group",i),...c}));cr.displayName="InputGroup";var nC=Object.defineProperty,aC=(i,c)=>nC(i,"name",{value:c,configurable:!0});function N0(i){const[c,r]=g.useState(void 0);return ul(()=>{if(i){r({width:i.offsetWidth,height:i.offsetHeight});let o=0;const f=new ResizeObserver(m=>{if(!Array.isArray(m)||!m.length)return;const v=m[0];window.cancelAnimationFrame(o),o=window.requestAnimationFrame(()=>{let p,E;if("borderBoxSize"in v){const b=v.borderBoxSize,N=Array.isArray(b)?b[0]:b;p=N.inlineSize,E=N.blockSize}else p=i.offsetWidth,E=i.offsetHeight;r({width:p,height:E})})});return f.observe(i,{box:"border-box"}),()=>{window.cancelAnimationFrame(o),f.unobserve(i)}}else r(void 0)},[i]),c}aC(N0,"useSize");var uC=Object.defineProperty,Rn=(i,c)=>uC(i,"name",{value:c,configurable:!0}),nd="Switch",[iC,SC]=sa(nd),[cC,ad]=iC(nd);function C0(i){const{__scopeSwitch:c,checked:r,children:o,defaultChecked:f,disabled:m,form:v,name:p,onCheckedChange:E,required:b,value:N="on",internal_do_not_use_render:y}=i,[T,B]=mi({prop:r,defaultProp:f??!1,onChange:E,caller:nd}),[D,M]=g.useState(null),[H,Z]=g.useState(null),[Q,V]=g.useState(null),P=D?!!v||!!D.closest("form"):!0,F={checked:T,setChecked:B,disabled:m,control:D,setControl:M,name:p,form:v,value:N,userClick:Q,onUserClick:V,required:b,defaultChecked:f,isFormControl:P,bubbleInput:H,setBubbleInput:Z};return d.jsx(cC,{scope:c,...F,children:_0(y)?y(F):o})}Rn(C0,"SwitchProvider");var rC="SwitchTrigger",oC=g.forwardRef(Rn(function({__scopeSwitch:c,onClick:r,...o},f){const{control:m,form:v,value:p,disabled:E,checked:b,required:N,setControl:y,setChecked:T,onUserClick:B,isFormControl:D,bubbleInput:M}=ad(rC,c),H=Dt(f,y),Z=g.useRef(b);return g.useEffect(()=>{const Q=v?m==null?void 0:m.ownerDocument.getElementById(v):m==null?void 0:m.form;if(Q instanceof HTMLFormElement){const V=Rn(()=>T(Z.current),"reset");return Q.addEventListener("reset",V),()=>Q.removeEventListener("reset",V)}},[m,v,T]),d.jsx(Ze.button,{type:"button",role:"switch","aria-checked":b,"aria-required":N,"data-state":ud(b),"data-disabled":E?"":void 0,disabled:E,value:p,...o,ref:H,onClick:st(r,Q=>{const V=Q.isPropagationStopped();B({requestedChecked:!b,hasConsumerStoppedPropagation:V}),T(P=>!P),M&&D&&(V||Q.stopPropagation())})})},"SwitchTrigger")),T0=g.forwardRef(Rn(function(c,r){const{__scopeSwitch:o,name:f,checked:m,defaultChecked:v,required:p,disabled:E,value:b,onCheckedChange:N,form:y,...T}=c;return d.jsx(C0,{__scopeSwitch:o,checked:m,defaultChecked:v,disabled:E,required:p,onCheckedChange:N,name:f,form:y,value:b,internal_do_not_use_render:({isFormControl:B})=>d.jsxs(d.Fragment,{children:[d.jsx(oC,{...T,ref:r,__scopeSwitch:o}),B&&d.jsx(mC,{__scopeSwitch:o})]})})},"Switch")),sC="SwitchThumb",fC=g.forwardRef(Rn(function(c,r){const{__scopeSwitch:o,...f}=c,m=ad(sC,o);return d.jsx(Ze.span,{"data-state":ud(m.checked),"data-disabled":m.disabled?"":void 0,...f,ref:r})},"SwitchThumb")),dC="SwitchBubbleInput",mC=g.forwardRef(Rn(function({__scopeSwitch:c,onClick:r,...o},f){const{control:m,userClick:v,checked:p,defaultChecked:E,required:b,disabled:N,name:y,value:T,form:B,bubbleInput:D,setBubbleInput:M}=ad(dC,c),H=Dt(f,M),Z=N0(m),Q=g.useRef(!1),V=g.useRef(p),P=g.useRef(v),F=g.useRef(null);g.useEffect(()=>{const U=D;if(!U)return;const k=window.HTMLInputElement.prototype,xe=Object.getOwnPropertyDescriptor(k,"checked").set;if(!xe)return;const he=V.current!==p;V.current=p;const se=v!==null&&v!==P.current;if(P.current=v,se)F.current=he?null:v,he&&xe.call(U,p),U.dispatchEvent(new Event("click",{bubbles:!v.hasConsumerStoppedPropagation}));else if(he){const je=F.current;F.current=null;const ze=(je==null?void 0:je.requestedChecked)===p;Q.current=!0,xe.call(U,p),U.dispatchEvent(new Event("click",{bubbles:!(ze&&je.hasConsumerStoppedPropagation)})),Q.current=!1}},[D,p,v]);const G=g.useRef(p);return d.jsx(Ze.input,{type:"checkbox","aria-hidden":!0,defaultChecked:E??G.current,required:b,disabled:N,name:y,value:T,form:B,...o,tabIndex:-1,ref:H,onClick:st(r,U=>{Q.current&&U.stopPropagation()}),style:{...o.style,...Z,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function _0(i){return typeof i=="function"}Rn(_0,"isFunction");function ud(i){return i?"checked":"unchecked"}Rn(ud,"getState");const rr=g.forwardRef(({className:i,...c},r)=>d.jsx(T0,{className:Xe("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[var(--accent)] data-[state=checked]:border-[var(--accent)] data-[state=unchecked]:bg-[var(--bg-muted)] data-[state=unchecked]:border-[var(--border-color)]",i),...c,ref:r,children:d.jsx(fC,{className:Xe("pointer-events-none block h-3.5 w-3.5 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5")})}));rr.displayName=T0.displayName;const id=({targetUrl:i="https://agy.961504.xyz",onSuccess:c,onCancel:r,embedded:o=!1})=>{const[f,m]=g.useState("ixvii0iv"),[v,p]=g.useState(""),[E,b]=g.useState(!1),[N,y]=g.useState(!0),[T,B]=g.useState(!1),[D,M]=g.useState(null),H=async Z=>{if(Z.preventDefault(),!f.trim()||!v){M("请输入用户名与访问密钥");return}B(!0),M(null);try{const Q=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:f.trim(),password:v,remember:N})}),V=await Q.json();Q.ok&&V.ok?c==null||c():M(V.message||"认证未通过,请检查密码")}catch{M("网络请求异常,请稍后重试")}finally{B(!1)}};return d.jsxs(On,{className:`w-full max-w-md p-6 space-y-5 ${o?"":"shadow-2xl"}`,children:[d.jsx("div",{className:"flex items-start justify-between gap-3 border-b hl-border pb-4",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center border hl-border shrink-0",style:{backgroundColor:"var(--accent-soft)",color:"var(--accent)"},children:d.jsx(hS,{className:"w-5 h-5"})}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"text-sm font-bold tracking-tight",children:"HomeLab 统一安全通行证"}),d.jsx(wn,{variant:"success",children:"SSO 2.0"})]}),d.jsx("p",{className:"text-xs font-mono-num mt-0.5 truncate max-w-[260px]",style:{color:"var(--text-muted)"},children:i})]})]})}),d.jsxs("form",{onSubmit:H,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-semibold",style:{color:"var(--text-muted)"},children:"管理员账号 (Username)"}),d.jsxs(cr,{children:[d.jsx(SS,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),d.jsx("input",{type:"text",autoComplete:"username",value:f,onChange:Z=>m(Z.target.value),placeholder:"输入管理员账号 (如 ixvii0iv)",className:"font-mono-num"})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("label",{className:"block text-xs font-semibold",style:{color:"var(--text-muted)"},children:"访问通行密钥 (Access Key)"}),d.jsx("span",{className:"text-[10px] font-mono-num",style:{color:"var(--text-subtle)"},children:"与 Mac mini 密码一致"})]}),d.jsxs(cr,{children:[d.jsx(uS,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),d.jsx("input",{type:E?"text":"password",autoComplete:"current-password",autoFocus:!0,value:v,onChange:Z=>p(Z.target.value),placeholder:"输入访问密钥...",className:"font-mono-num"}),d.jsx("button",{type:"button",onClick:()=>b(!E),className:"p-1 rounded hover:opacity-80 cursor-pointer",style:{color:"var(--text-muted)"},title:E?"隐藏密码":"显示密码",children:E?d.jsx(Fx,{className:"w-3.5 h-3.5"}):d.jsx(Px,{className:"w-3.5 h-3.5"})})]})]}),d.jsxs("div",{className:"flex items-center justify-between pt-1",children:[d.jsx("span",{className:"text-xs select-none",style:{color:"var(--text-muted)"},children:"在此设备保持 30 天免密通行 (*.961504.xyz)"}),d.jsx(rr,{checked:N,onCheckedChange:y})]}),D&&d.jsx("div",{className:"px-3 py-2 rounded-lg text-xs font-medium border",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",borderColor:"rgba(239, 68, 68, 0.3)",color:"#ef4444"},children:D}),d.jsxs("div",{className:"flex items-center justify-end gap-2.5 pt-2",children:[r&&d.jsx(jt,{type:"button",variant:"outline",onClick:r,children:"取消"}),d.jsxs(jt,{type:"submit",disabled:T,className:"px-4",children:[d.jsx(jf,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:T?"正在验证签名...":"解锁并进入工作台"})]})]})]})]})},hC=()=>{const{showAgyModal:i,setShowAgyModal:c,getEffectiveMode:r}=jn(),[o,f]=g.useState(!1),[m,v]=g.useState(!1),p=r(),E=p==="lan"?"http://192.168.31.164:7681":p==="home10443"?"https://agy.home.961504.xyz:10443":"https://agy.961504.xyz";return g.useEffect(()=>{if(i){if(p==="lan"){v(!0),f(!0);return}f(!1),fetch("/api/auth/status",{credentials:"include"}).then(b=>b.json()).then(b=>{v(!!b.authenticated),f(!0)}).catch(()=>{v(!1),f(!0)})}},[i,p]),d.jsx(h0,{open:i,onOpenChange:c,children:d.jsxs(ed,{className:"w-[95vw] max-w-6xl h-[88vh] flex flex-col overflow-hidden p-0",children:[d.jsx(td,{className:"sr-only",children:"AGY 云端工作台"}),d.jsx(ld,{className:"sr-only",children:"M6 Mac mini 上的 24 小时 tmux 常驻 AI 编程终端"}),d.jsxs("div",{className:"px-4 py-2.5 border-b hl-border flex items-center justify-between hl-muted shrink-0",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("img",{src:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",alt:"AGY",className:"w-4 h-4"}),d.jsx("span",{className:"text-xs font-mono-num font-medium",children:"AGY 云端工作台 · tmux 持久会话 (关窗不断连)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(jt,{variant:"outline",size:"sm",asChild:!0,children:d.jsx("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"font-mono-num",children:"新标签页全屏 ↗"})}),d.jsx(jt,{size:"sm",onClick:()=>c(!1),children:"收起终端"})]})]}),o?m?d.jsx("iframe",{src:E,title:"AGY Cloud Workbench",className:"w-full flex-1 bg-black border-0"}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-4",style:{backgroundColor:"var(--bg-page)"},children:d.jsx(id,{targetUrl:E,onSuccess:()=>v(!0),onCancel:()=>c(!1)})}):d.jsx("div",{className:"flex-1 flex items-center justify-center text-xs font-mono-num",style:{color:"var(--text-muted)"},children:"正在校验 HomeLab SSO 通行证..."})]})})},vC={light:{id:"light",name:"Shadcn Clean Light (浅色纯净)",description:"对标 Apple / Stripe / Linear 浅色日光模式,高对比深灰文字配纯净白卡片与冷灰微边框。",tokens:{"--bg-page":"#f8fafc","--bg-card":"#ffffff","--bg-widget":"#f8fafc","--bg-muted":"#f1f5f9","--bg-hover":"#ffffff","--text-main":"#0f172a","--text-muted":"#64748b","--text-subtle":"#94a3b8","--border-color":"#e2e8f0","--border-hover":"#cbd5e1","--primary":"#0f172a","--primary-fg":"#ffffff","--accent":"#2563eb","--accent-soft":"rgba(37, 99, 235, 0.08)","--success":"#10b981","--success-soft":"rgba(16, 185, 129, 0.10)"}},dark:{id:"dark",name:"Catppuccin / Linear Dark (深色极客)",description:"融合 Catppuccin Mocha 与 Linear 暗黑规范,柔和护眼的深邃蓝黑基底配高辨识度状态色。",tokens:{"--bg-page":"#11111b","--bg-card":"#1e1e2e","--bg-widget":"#181825","--bg-muted":"#313244","--bg-hover":"#242438","--text-main":"#cdd6f4","--text-muted":"#a6adc8","--text-subtle":"#6c7086","--border-color":"#313244","--border-hover":"#45475a","--primary":"#cba6f7","--primary-fg":"#11111b","--accent":"#89b4fa","--accent-soft":"rgba(137, 180, 250, 0.15)","--success":"#a6e3a1","--success-soft":"rgba(166, 227, 161, 0.15)"}}},or={"homepage-3col":{id:"homepage-3col",name:"Homepage 经典三列矩阵 (3-Column Grid)",description:"gethomepage.dev 标志性对称 3 列分组卡片,底部内嵌 3 格实时遥测单元。",gridClass:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},"bento-split":{id:"bento-split",name:"Shadcn 双列宽屏卡片 (2-Column Wide Bento)",description:"适合大字号阅读的 2 列宽体卡片布局,留白更充裕。",gridClass:"grid-cols-1 lg:grid-cols-2 gap-5"},"compact-2col":{id:"compact-2col",name:"高密度四列紧凑矩阵 (4-Column Dense)",description:"适合超宽显示器的一屏高密度 4 列布局。",gridClass:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3.5"}},yC=()=>{const[i,c]=g.useState("form-inputs"),{theme:r,resolvedTheme:o,layoutPreset:f,setTheme:m,setLayoutPreset:v,setViewMode:p,setShowCmdPalette:E,telemetry:b,showToast:N}=jn(),[y,T]=g.useState(!0),[B,D]=g.useState("drawer"),[M,H]=g.useState(""),[Z,Q]=g.useState("192.168.31.164"),[V,P]=g.useState(!0),F=[{id:"layout-architecture",group:"FOUNDATIONS / 架构与布局",title:"01. AppShell 双层顶栏与网格布局",icon:d.jsx(fS,{className:"w-3.5 h-3.5"})},{id:"theme-tokens",group:"FOUNDATIONS / 架构与布局",title:"02. 双主题色板与自动切换规范",icon:d.jsx(oS,{className:"w-3.5 h-3.5"})},{id:"form-inputs",group:"SHADCN / RADIX UI 组件",title:"03. shadcn/ui + Radix 原语与认证弹窗",icon:d.jsx(Zy,{className:"w-3.5 h-3.5"})},{id:"service-card",group:"SHADCN / RADIX UI 组件",title:"04. ServiceCard 内联遥测卡片",icon:d.jsx(tS,{className:"w-3.5 h-3.5"})},{id:"ssh-shelf",group:"SHADCN / RADIX UI 组件",title:"05. SshShelf 快捷指令栏",icon:d.jsx(jf,{className:"w-3.5 h-3.5"})}];return d.jsx("div",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6",children:d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 items-start",children:[d.jsxs(On,{className:"p-4 space-y-4 lg:sticky lg:top-20",children:[d.jsxs("div",{className:"flex items-center justify-between border-b hl-border pb-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ng,{className:"w-4 h-4",style:{color:"var(--accent)"}}),d.jsx("span",{className:"text-xs font-bold uppercase tracking-wider",children:"shadcn/ui 组件库"})]}),d.jsx(wn,{variant:"accent",children:"Radix + cmdk"})]}),d.jsx("div",{className:"space-y-1",children:F.map(G=>d.jsxs("button",{onClick:()=>c(G.id),className:"w-full px-3 py-2 rounded-lg text-left text-xs font-medium flex items-center gap-2.5 transition-all cursor-pointer",style:i===G.id?{backgroundColor:"var(--accent-soft)",color:"var(--accent)"}:{color:"var(--text-muted)"},children:[G.icon,d.jsx("span",{className:"truncate",children:G.title})]},G.id))}),d.jsxs("div",{className:"pt-3 border-t hl-border space-y-2 text-xs",children:[d.jsx("div",{className:"text-[11px] font-semibold",style:{color:"var(--text-muted)"},children:"全局外观状态预览 (@radix-ui/react-tabs)"}),d.jsx(xf,{value:r,onValueChange:G=>m(G),children:d.jsxs(ir,{className:"w-full grid grid-cols-3",children:[d.jsx(aa,{value:"system",children:"自动"}),d.jsx(aa,{value:"light",children:"浅色"}),d.jsx(aa,{value:"dark",children:"深色"})]})}),d.jsx(jt,{onClick:()=>p("dashboard"),className:"w-full mt-2",children:"返回中控台主页"})]})]}),d.jsxs("div",{className:"lg:col-span-3 space-y-6",children:[i==="layout-architecture"&&d.jsx("div",{className:"space-y-6",children:d.jsxs(On,{className:"p-6 space-y-4",children:[d.jsx("div",{className:"flex items-center justify-between border-b hl-border pb-4",children:d.jsxs("div",{children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Foundations / AppShell Layout"}),d.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"标准双层顶栏架构 (Two-Tier AppShell) & 响应式网格切换"})]})}),d.jsxs("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-muted)"},children:["参考 ",d.jsx("strong",{children:"Vercel Geist / shadcn/ui Dashboard-01 / GitHub AppShell"})," ","标准规范,将原本容易挤压折行的单层顶栏拆分为职责清晰的双层结构:"]}),d.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border space-y-2.5 font-mono-num text-xs",children:[d.jsxs("div",{className:"p-3 rounded-lg hl-card flex items-center justify-between",children:[d.jsx("span",{children:"[左] 🍎 HomeLab · Radix Tabs 切换 (中控台 / Storybook)"}),d.jsx("span",{style:{color:"var(--accent)"},children:"[最右固定] 🔍 搜索 ⌘K · >_ AGY 终端 · ☀️/🌙 主题切换"})]}),d.jsxs("div",{className:"p-3 rounded-lg hl-card flex items-center justify-between",children:[d.jsx("span",{style:{color:"var(--success)"},children:"[左] 实时硬件遥测条 (M6 CPU · RAM · Z4 20TB · SG 专线)"}),d.jsx("span",{children:"[右对齐] Radix Tabs 路由切换器 (智能路由 / 443 / 10443 / LAN)"})]})]}),d.jsxs("div",{className:"pt-2 space-y-3",children:[d.jsx("div",{className:"text-xs font-semibold",children:"选择主页卡片网格布局预设(点击立即应用到主页):"}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3.5",children:Object.keys(or).map(G=>{const U=or[G],k=f===G;return d.jsxs("div",{onClick:()=>v(G),className:"hl-card hl-card-interactive p-4 cursor-pointer space-y-2",style:k?{borderColor:"var(--accent)"}:{},children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-bold",children:U.name}),k&&d.jsx("span",{className:"w-4 h-4 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--accent)",color:"#fff"},children:d.jsx(Jx,{className:"w-2.5 h-2.5"})})]}),d.jsx("p",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:U.description}),d.jsx("code",{className:"text-[10px] font-mono-num block pt-1",style:{color:"var(--accent)"},children:U.gridClass})]},G)})})]})]})}),i==="theme-tokens"&&d.jsxs(On,{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Foundations / Color System"}),d.jsxs("h2",{className:"text-lg font-bold mt-0.5",children:["主流双主题色板规范(当前生效:",o==="dark"?"深色极客":"浅色纯净",")"]})]}),d.jsxs(wn,{variant:"secondary",children:["模式: ",r==="system"?"跟随设备自动切换":"手动锁定"]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:["light","dark"].map(G=>{const U=vC[G];return d.jsxs("div",{className:"rounded-xl p-5 space-y-4 border",style:{backgroundColor:U.tokens["--bg-page"],color:U.tokens["--text-main"],borderColor:U.tokens["--border-color"]},children:[d.jsxs("div",{className:"flex items-center justify-between border-b pb-3",style:{borderColor:U.tokens["--border-color"]},children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold",children:U.name}),d.jsx("div",{className:"text-xs mt-0.5",style:{color:U.tokens["--text-muted"]},children:U.description})]}),d.jsx("button",{onClick:()=>m(G),className:"px-2.5 py-1 rounded-md text-xs font-mono-num font-semibold cursor-pointer",style:{backgroundColor:U.tokens["--primary"],color:U.tokens["--primary-fg"]},children:"预览此主题"})]}),d.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(U.tokens).map(([k,ce])=>d.jsxs("div",{className:"p-2 rounded-lg border flex items-center gap-2",style:{backgroundColor:U.tokens["--bg-card"],borderColor:U.tokens["--border-color"]},children:[d.jsx("span",{className:"w-5 h-5 rounded border shrink-0",style:{backgroundColor:ce,borderColor:U.tokens["--border-hover"]}}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"text-[10px] font-mono-num font-semibold truncate",children:k}),d.jsx("div",{className:"text-[10px] font-mono-num truncate",style:{color:U.tokens["--text-muted"]},children:ce})]})]},k))})]},U.id)})})]}),i==="form-inputs"&&d.jsxs(On,{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"src/components/ui/* · Official shadcn/ui + Radix Primitives + cmdk"}),d.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"开源 `shadcn/ui` 组件库(`Input` / `Button` / `Switch` / `Badge` / `CommandDialog` / `AuthGateCard`)"})]}),d.jsx(Zy,{className:"w-4 h-4",style:{color:"var(--accent)"}})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 items-start",children:[d.jsxs("div",{className:"p-5 rounded-xl hl-muted border hl-border space-y-4",children:[d.jsx("div",{className:"text-xs font-bold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"1. `src/components/ui/*` 标准原语展示"}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"Button 变体 (`cva` + `@radix-ui/react-slot`)"}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(jt,{variant:"default",children:"Primary 主按钮"}),d.jsx(jt,{variant:"outline",children:"Outline 描边"}),d.jsx(jt,{variant:"secondary",children:"Secondary 次级"}),d.jsx(jt,{variant:"accent",children:"Accent 高亮"}),d.jsx(jt,{variant:"ghost",onClick:()=>E(!0),children:"唤起 cmdk 面板 ⌘K"})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"Badge 标签与 `@radix-ui/react-switch` 开关"}),d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 p-2.5 rounded-lg hl-card",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(wn,{variant:"default",children:"Default"}),d.jsx(wn,{variant:"accent",children:"Radix UI"}),d.jsx(wn,{variant:"success",children:"Online"}),d.jsx(wn,{variant:"outline",children:"v3.2"})]}),d.jsx(rr,{checked:V,onCheckedChange:P})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"`InputGroup` 组合输入框"}),d.jsxs(cr,{children:[d.jsx(Rf,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),d.jsx("input",{type:"text",value:M,onChange:G=>H(G.target.value),placeholder:"搜索服务、SSH 指令或节点..."}),d.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-card border hl-border",style:{color:"var(--text-muted)"},children:"⌘K"})]})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"`Input` 等宽字体输入框"}),d.jsx(E0,{type:"text",value:Z,onChange:G=>Q(G.target.value),className:"font-mono-num",placeholder:"192.168.31.164"})]})]}),d.jsx("div",{className:"flex flex-col items-center",children:d.jsx(id,{embedded:!0,targetUrl:"https://agy.961504.xyz",onSuccess:()=>N("SSO 认证成功!已签发 30 天全域名通行 Cookie")})})]})]}),i==="service-card"&&d.jsxs(On,{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Components / ServiceCard"}),d.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"三段式内联遥测卡片 (ServiceCard Interactive Story)"})]}),d.jsx(yS,{className:"w-4 h-4",style:{color:"var(--accent)"}})]}),d.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border flex flex-wrap items-center gap-6 text-xs",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("span",{className:"font-semibold",children:"在线状态 (online):"}),d.jsx(rr,{checked:y,onCheckedChange:T}),d.jsx("span",{className:"font-mono-num",children:y?"true":"false"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-semibold",children:"右上角动作按钮 (actionType):"}),["drawer","backup",void 0].map((G,U)=>d.jsx(jt,{variant:B===G?"accent":"outline",size:"sm",onClick:()=>D(G),className:"font-mono-num",children:G||"route-badge"},U))]})]}),d.jsx("div",{className:"max-w-md mx-auto py-4",children:d.jsx(wp,{card:{id:"agy",title:"AGY 云端工作台",subtitle:"agy.961504.xyz · ttyd + tmux",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",online:y,actionType:B,desc:"M6 Mac mini 上的 24 小时常驻 AI 编程终端,已同步 Google 登录态并锁定新加坡出口,关掉网页后台继续运行。",edgeUrl:"https://agy.961504.xyz",homeUrl:"https://agy.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:7681",stats:[{label:"M6 CPU 负载",value:`${b.mini.cpu_pct}%`},{label:"已用内存",value:`${b.mini.mem_used_gb} / 24 GB`},{label:"tmux 会话",value:"常驻运行中",highlight:!0}]}})})]}),i==="ssh-shelf"&&d.jsxs(On,{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"border-b hl-border pb-4",children:[d.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Components / SshShelf"}),d.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"底部 SSH 快捷复制与运维操作栏"})]}),d.jsx(Op,{})]})]})]})})},gC=()=>{var B;const{telemetry:i,toast:c,viewMode:r,layoutPreset:o,fetchTelemetry:f,setShowCmdPalette:m,getEffectiveMode:v,routeMode:p}=jn(),[E,b]=g.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("auth_redirect"));g.useEffect(()=>{f();const D=setInterval(f,3e3),M=H=>{(H.metaKey||H.ctrlKey)&&H.key.toLowerCase()==="k"&&(H.preventDefault(),m(!0))};return window.addEventListener("keydown",M),()=>{clearInterval(D),window.removeEventListener("keydown",M)}},[f,m]);const N=g.useMemo(()=>{const D=v();return D==="lan"?"LAN 局域网极速直连 (192.168.31.x)":D==="home10443"?"10443 家宽公网 HTTPS 直连":"443 免端口 HTTPS 直达 (*.961504.xyz)"},[v,p]),y=((B=or[o])==null?void 0:B.gridClass)||or["homepage-3col"].gridClass,T=g.useMemo(()=>{const D=i;return[{title:"核心工作台与私有云存储",subtitle:"Core Workbench & Storage",showRouteHint:!0,items:[{id:"agy",title:"AGY 云端工作台",subtitle:"agy.961504.xyz · ttyd + tmux",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",online:D.services.agy,actionType:"drawer",desc:"M6 Mac mini 上的 24 小时常驻 AI 编程终端,已同步 Google 登录态并锁定新加坡出口,关掉网页后台继续运行。",edgeUrl:"https://agy.961504.xyz",homeUrl:"https://agy.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:7681",stats:[{label:"M6 CPU 负载",value:`${D.mini.cpu_pct}%`},{label:"已用内存",value:`${D.mini.mem_used_gb} / 24 GB`},{label:"tmux 会话",value:D.mini.agy_tmux?"常驻运行中":"待机",highlight:!0}]},{id:"zspace",title:"极空间 Z4 私有云",subtitle:"192.168.31.185 · 20TB RAID 存储池",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/synology-drive.png",online:D.services.nas,desc:"家庭 20TB 大容量存储中心、极影视蓝光影院与手机相册备份,已自动 SMB 挂载至 Mac mini ~/nas。",edgeUrl:"https://z4.home.961504.xyz:10443",homeUrl:"https://z4.home.961504.xyz:10443",lanUrl:"http://192.168.31.185:5055",stats:[{label:"剩余可用",value:`${D.nas.free_tb} TB`,highlight:!0},{label:"已用容量",value:`${D.nas.used_tb} TB (${D.nas.pct}%)`},{label:"SMB 挂载",value:D.nas.mounted?"~/nas 已挂载":"重连中"}]},{id:"vaultwarden",title:"Vaultwarden 密码保险箱",subtitle:"vw.961504.xyz · Bitwarden 兼容",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/vaultwarden.png",online:D.services.vaultwarden,actionType:"backup",desc:"自托管全平台加密密码库,支持 iOS / Android / 浏览器插件自动填充,每天凌晨 03:30 自动打包灾备至极空间。",edgeUrl:"https://vw.961504.xyz",homeUrl:"https://vw.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:8222",stats:[{label:"容器状态",value:"Healthy",highlight:!0},{label:"最近极空间灾备",value:D.nas.latest_backup},{label:"Mac SSD 占用",value:`${D.mini.disk_pct}%`}]}]},{title:"网络网关、AI 专线与外部哨兵",subtitle:"Network Gateway & Cloud Edge",showRouteHint:!1,items:[{id:"clash",title:"Mihomo 路由分流面板",subtitle:"192.168.31.1:9999 · ShellCrash",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/clash.png",online:D.services.clash,desc:"小米主路由器透明网关控制台,实时监控全屋设备流量、分流规则与狮城 AI 算力专线锁定状态。",edgeUrl:"https://clash.home.961504.xyz:10443/ui/",homeUrl:"https://clash.home.961504.xyz:10443/ui/",lanUrl:"http://192.168.31.1:9999/ui/",stats:[{label:"AI 锁定策略",value:"狮城节点",highlight:!0},{label:"新加坡延迟",value:D.network.sg_delay_ms>0?`${D.network.sg_delay_ms} ms`:"直连"},{label:"固定出口 IP",value:D.network.sg_egress_ip}]},{id:"router",title:"小米主路由器后台",subtitle:"192.168.31.1 · PPPoE 公网网关",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/openwrt.png",online:D.services.router,desc:"管理家庭联通公网宽带拨号、DHCP 静态 IP 绑定、10443 与 41641 端口转发及全屋内网 Split-DNS。",edgeUrl:"https://router.home.961504.xyz:10443",homeUrl:"https://router.home.961504.xyz:10443",lanUrl:"http://192.168.31.1",stats:[{label:"联通公网 IPv4",value:D.network.home_wan_ip,highlight:!0},{label:"泛域名 DDNS",value:"*.home.961504.xyz"},{label:"内网网关",value:"192.168.31.1"}]},{id:"uptime",title:"Uptime Kuma 外部哨兵",subtitle:"status.961504.xyz · SG Azure",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/uptime-kuma.png",online:D.services.uptime,desc:"独立部署在新加坡 Azure 公有云上的 24 小时外部监控哨兵,通过 Tailscale P2P 专线实时探测家庭服务。",edgeUrl:"https://status.961504.xyz",homeUrl:"https://status.961504.xyz",lanUrl:"https://status.961504.xyz",stats:[{label:"云端公网 IP",value:"104.43.105.243"},{label:"Tailscale 专线",value:"100.115.204.51"},{label:"外部探测状态",value:"100% 在线",highlight:!0}]}]}]},[i]);return d.jsxs("div",{className:"min-h-screen flex flex-col",children:[c&&d.jsxs("div",{className:"fixed bottom-5 right-5 z-50 hl-card px-4 py-3 flex items-center gap-2.5 shadow-2xl",children:[d.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--success)"}}),d.jsx("span",{className:"text-xs font-medium",children:c})]}),d.jsx(yE,{}),r==="storybook"?d.jsx(yC,{}):d.jsxs("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-7",children:[T.map(D=>d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between px-0.5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:D.title}),d.jsxs("span",{className:"text-[11px] font-mono-num",style:{color:"var(--text-subtle)"},children:["· ",D.subtitle]})]}),D.showRouteHint&&d.jsxs("span",{className:"text-[11px] font-mono-num hidden sm:inline",style:{color:"var(--text-subtle)"},children:["当前路由模式: ",N]})]}),d.jsx("div",{className:`grid ${y}`,children:D.items.map(M=>d.jsx(wp,{card:M},M.id))})]},D.title)),d.jsx(Op,{})]}),d.jsx($N,{}),d.jsx(hC,{}),E&&d.jsx("div",{className:"fixed inset-0 z-50 bg-black/75 backdrop-blur-sm flex items-center justify-center p-4",children:d.jsx(id,{targetUrl:E,onSuccess:()=>{window.location.href=E},onCancel:()=>{b(null),window.history.replaceState({},"","/")}})})]})};Dx.createRoot(document.getElementById("root")).render(d.jsx(si.StrictMode,{children:d.jsx(gC,{})})); diff --git a/stacks/portal/dist/assets/index-DiTh48KJ.js b/stacks/portal/dist/assets/index-DiTh48KJ.js new file mode 100644 index 0000000..08ef41b --- /dev/null +++ b/stacks/portal/dist/assets/index-DiTh48KJ.js @@ -0,0 +1,236 @@ +var d0=i=>{throw TypeError(i)};var m0=(i,r,c)=>r.has(i)||d0("Cannot "+c);var xt=(i,r,c)=>(m0(i,r,"read from private field"),c?c.call(i):r.get(i)),h0=(i,r,c)=>r.has(i)?d0("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,c),uf=(i,r,c,o)=>(m0(i,r,"write to private field"),o?o.call(i,c):r.set(i,c),c);function DS(i,r){for(var c=0;co[s]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const f of s)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function c(s){const f={};return s.integrity&&(f.integrity=s.integrity),s.referrerPolicy&&(f.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?f.credentials="include":s.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(s){if(s.ep)return;s.ep=!0;const f=c(s);fetch(s.href,f)}})();function sd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var rf={exports:{}},fu={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var v0;function US(){if(v0)return fu;v0=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,s,f){var m=null;if(f!==void 0&&(m=""+f),s.key!==void 0&&(m=""+s.key),"key"in s){f={};for(var v in s)v!=="key"&&(f[v]=s[v])}else f=s;return s=f.ref,{$$typeof:i,type:o,key:m,ref:s!==void 0?s:null,props:f}}return fu.Fragment=r,fu.jsx=c,fu.jsxs=c,fu}var g0;function BS(){return g0||(g0=1,rf.exports=US()),rf.exports}var h=BS(),of={exports:{}},be={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var y0;function kS(){if(y0)return be;y0=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),E=Symbol.for("react.view_transition"),A=Symbol.iterator;function j(N){return N===null||typeof N!="object"?null:(N=A&&N[A]||N["@@iterator"],typeof N=="function"?N:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,Y={};function G(N,U,$){this.props=N,this.context=U,this.refs=Y,this.updater=$||D}G.prototype.isReactComponent={},G.prototype.setState=function(N,U){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,U,"setState")},G.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function k(){}k.prototype=G.prototype;function V(N,U,$){this.props=N,this.context=U,this.refs=Y,this.updater=$||D}var I=V.prototype=new k;I.constructor=V,L(I,G.prototype),I.isPureReactComponent=!0;var R=Array.isArray;function T(){}var z={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function te(N,U,$){var ee=$.ref;return{$$typeof:i,type:N,key:U,ref:ee!==void 0?ee:null,props:$}}function W(N,U){return te(N.type,U,N.props)}function P(N){return typeof N=="object"&&N!==null&&N.$$typeof===i}function ne(N){var U={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function($){return U[$]})}var ue=/\/+/g;function ge(N,U){return typeof N=="object"&&N!==null&&N.key!=null?ne(""+N.key):U.toString(36)}function F(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(T,T):(N.status="pending",N.then(function(U){N.status==="pending"&&(N.status="fulfilled",N.value=U)},function(U){N.status==="pending"&&(N.status="rejected",N.reason=U)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function ae(N,U,$,ee,he){var ie=typeof N;(ie==="undefined"||ie==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(ie){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case i:case r:Ee=!0;break;case S:return Ee=N._init,ae(Ee(N._payload),U,$,ee,he)}}if(Ee)return he=he(N),Ee=ee===""?"."+ge(N,0):ee,R(he)?($="",Ee!=null&&($=Ee.replace(ue,"$&/")+"/"),ae(he,U,$,"",function(Dt){return Dt})):he!=null&&(P(he)&&(he=W(he,$+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(ue,"$&/")+"/")+Ee)),U.push(he)),1;Ee=0;var fe=ee===""?".":ee+":";if(R(N))for(var ye=0;ye>>1,K=F[xe];if(0>>1;xes(me,ce))Ns(U,me)?(F[xe]=U,F[N]=ce,xe=N):(F[xe]=me,F[J]=ce,xe=J);else if(Ns(U,ce))F[xe]=U,F[N]=ce,xe=N;else break e}}return ae}function s(F,ae){var ce=F.sortIndex-ae.sortIndex;return ce!==0?ce:F.id-ae.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var m=Date,v=m.now();i.unstable_now=function(){return m.now()-v}}var p=[],b=[],S=1,y=null,E=3,A=!1,j=!1,D=!1,L=!1,Y=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function V(F){for(var ae=c(b);ae!==null;){if(ae.callback===null)o(b);else if(ae.startTime<=F)o(b),ae.sortIndex=ae.expirationTime,r(p,ae);else break;ae=c(b)}}function I(F){if(D=!1,V(F),!j)if(c(p)!==null)j=!0,R||(R=!0,P());else{var ae=c(b);ae!==null&&ge(I,ae.startTime-F)}}var R=!1,T=-1,z=5,Z=-1;function te(){return L?!0:!(i.unstable_now()-ZF&&te());){var xe=y.callback;if(typeof xe=="function"){y.callback=null,E=y.priorityLevel;var K=xe(y.expirationTime<=F);if(F=i.unstable_now(),typeof K=="function"){y.callback=K,V(F),ae=!0;break t}y===c(p)&&o(p),V(F)}else o(p);y=c(p)}if(y!==null)ae=!0;else{var Se=c(b);Se!==null&&ge(I,Se.startTime-F),ae=!1}}break e}finally{y=null,E=ce,A=!1}ae=void 0}}finally{ae?P():R=!1}}}var P;if(typeof k=="function")P=function(){k(W)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,ue=ne.port2;ne.port1.onmessage=W,P=function(){ue.postMessage(null)}}else P=function(){Y(W,0)};function ge(F,ae){T=Y(function(){F(i.unstable_now())},ae)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(F){F.callback=null},i.unstable_forceFrameRate=function(F){0>F||125xe?(F.sortIndex=ce,r(b,F),c(p)===null&&F===c(b)&&(D?(G(T),T=-1):D=!0,ge(I,ce-xe))):(F.sortIndex=K,r(p,F),j||A||(j=!0,R||(R=!0,P()))),F},i.unstable_shouldYield=te,i.unstable_wrapCallback=function(F){var ae=E;return function(){var ce=E;E=ae;try{return F.apply(this,arguments)}finally{E=ce}}}})(ff)),ff}var x0;function LS(){return x0||(x0=1,sf.exports=HS()),sf.exports}var df={exports:{}},St={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var S0;function qS(){if(S0)return St;S0=1;var i=fd();function r(S){var y="https://react.dev/errors/"+S;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),df.exports=qS(),df.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var C0;function GS(){if(C0)return du;C0=1;var i=LS(),r=fd(),c=_y();function o(e){var t="https://react.dev/errors/"+e;if(1ga||(e.current=Wn[ga],Wn[ga]=null,ga--)}function qe(e,t){ga++,Wn[ga]=e.current,e.current=t}var gn=vn(null),yi=vn(null),el=vn(null),Su=vn(null);function Eu(e,t){switch(qe(el,t),qe(yi,e),qe(gn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sg(t),e=Eg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}mt(gn),qe(gn,e)}function ya(){mt(gn),mt(yi),mt(el)}function wo(e){var t=e.memoizedState;t!==null&&(ai._currentValue=t.memoizedState,qe(Su,e)),t=gn.current;var n=Eg(t,e.type);t!==n&&(qe(yi,e),qe(gn,n))}function Cu(e){yi.current===e&&(mt(gn),mt(yi)),Su.current===e&&(mt(Su),ai._currentValue=Dt)}var To,Yd;function tl(e){if(To===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);To=t&&t[1]||"",Yd=-1)":-1a||C[l]!==M[a]){var q=` +`+C[l].replace(" at new "," at ");return e.displayName&&q.includes("")&&(q=q.replace("",e.displayName)),q}while(1<=l&&0<=a);break}}}finally{_o=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?tl(n):""}function Hp(e,t){switch(e.tag){case 26:case 27:case 5:return tl(e.type);case 16:return tl("Lazy");case 13:return e.child!==t&&t!==null?tl("Suspense Fallback"):tl("Suspense");case 19:return tl("SuspenseList");case 0:case 15:return Ao(e.type,!1);case 11:return Ao(e.type.render,!1);case 1:return Ao(e.type,!0);case 31:return tl("Activity");case 30:return tl("ViewTransition");default:return""}}function Vd(e){try{var t="",n=null;do t+=Hp(e,n),n=e,e=e.return;while(e);return t}catch(l){return` +Error generating stack: `+l.message+` +`+l.stack}}var Ro=Object.prototype.hasOwnProperty,jo=i.unstable_scheduleCallback,Oo=i.unstable_cancelCallback,Lp=i.unstable_shouldYield,qp=i.unstable_requestPaint,Ut=i.unstable_now,Gp=i.unstable_getCurrentPriorityLevel,Qd=i.unstable_ImmediatePriority,Xd=i.unstable_UserBlockingPriority,Nu=i.unstable_NormalPriority,Yp=i.unstable_LowPriority,Zd=i.unstable_IdlePriority,Vp=i.log,Qp=i.unstable_setDisableYieldValue,pi=null,Bt=null;function nl(e){if(typeof Vp=="function"&&Qp(e),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(pi,e)}catch{}}var kt=Math.clz32?Math.clz32:Kp,Xp=Math.log,Zp=Math.LN2;function Kp(e){return e>>>=0,e===0?32:31-(Xp(e)/Zp|0)|0}var wu=256,Tu=262144,_u=4194304;function Bl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Au(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var g=l&134217727;return g!==0?(l=g&~u,l!==0?a=Bl(l):(d&=g,d!==0?a=Bl(d):n||(n=g&~e,n!==0&&(a=Bl(n))))):(g=l&~u,g!==0?a=Bl(g):d!==0?a=Bl(d):n||(n=l&~e,n!==0&&(a=Bl(n)))),a===0?0:t!==0&&t!==a&&(t&u)===0&&(u=a&-a,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:a}function bi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Kd(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function xi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jp(e,t,n,l,a,u){var d=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var g=e.entanglements,C=e.expirationTimes,M=e.hiddenUpdates;for(n=d&~n;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yo=!1;if(Dn)try{var Ni={};Object.defineProperty(Ni,"passive",{get:function(){Yo=!0}}),window.addEventListener("test",Ni,Ni),window.removeEventListener("test",Ni,Ni)}catch{Yo=!1}var ll=null,Vo=null,Du=null;function ym(){if(Du)return Du;var e,t=Vo,n=t.length,l,a="value"in ll?ll.value:ll.textContent,u=a.length;for(e=0;e=_i),Cm=" ",Nm=!1;function wm(e,t){switch(e){case"keyup":return Ob.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ta=!1;function zb(e,t){switch(e){case"compositionend":return Tm(t);case"keypress":return t.which!==32?null:(Nm=!0,Cm);case"textInput":return e=t.data,e===Cm&&Nm?null:e;default:return null}}function Db(e,t){if(Ta)return e==="compositionend"||!Io&&wm(e,t)?(e=ym(),Du=Vo=ll=null,Ta=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Dm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Um(e,t){var n=Dm(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Dm(n)}}function Bm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function km(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Po(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Po(e.document)}return t}function $o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Yb=Dn&&"documentMode"in document&&11>=document.documentMode,_a=null,Wo=null,Oi=null,ec=!1;function Hm(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ec||_a==null||_a!==Po(l)||(l=_a,"selectionStart"in l&&$o(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Oi&&ji(Oi,l)||(Oi=l,l=Lr(Wo,"onSelect"),0>=d,a-=d,pn=1<<32-kt(t)+a|n<pe?(tt=ve,ve=null):tt=ve.sibling;var Oe=_(O,ve,B[pe],Q);if(Oe===null){ve===null&&(ve=tt);break}e&&ve&&Oe.alternate===null&&t(O,ve),w=u(Oe,w,pe),je===null?re=Oe:je.sibling=Oe,je=Oe,ve=tt}if(pe===B.length)return n(O,ve),we&&Hn(O,pe),re;if(ve===null){for(;pepe?(tt=ve,ve=null):tt=ve.sibling;var Al=_(O,ve,Oe.value,Q);if(Al===null){ve===null&&(ve=tt);break}e&&ve&&Al.alternate===null&&t(O,ve),w=u(Al,w,pe),je===null?re=Al:je.sibling=Al,je=Al,ve=tt}if(Oe.done)return n(O,ve),we&&Hn(O,pe),re;if(ve===null){for(;!Oe.done;pe++,Oe=B.next())Oe=X(O,Oe.value,Q),Oe!==null&&(w=u(Oe,w,pe),je===null?re=Oe:je.sibling=Oe,je=Oe);return we&&Hn(O,pe),re}for(ve=l(ve);!Oe.done;pe++,Oe=B.next())Oe=H(ve,O,pe,Oe.value,Q),Oe!==null&&(e&&(tt=Oe.alternate,tt!==null&&ve.delete(tt.key===null?pe:tt.key)),w=u(Oe,w,pe),je===null?re=Oe:je.sibling=Oe,je=Oe);return e&&ve.forEach(function(zS){return t(O,zS)}),we&&Hn(O,pe),re}function Ne(O,w,B,Q){if(typeof B=="object"&&B!==null&&B.type===W&&B.key===null&&B.props.ref===void 0&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case Z:e:{for(var re=B.key;w!==null;){if(w.key===re){if(re=B.type,re===W){if(w.tag===7){n(O,w.sibling),Q=a(w,B.props.children),cl(Q,B),Q.return=O,O=Q;break e}}else if(w.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===K&&Jl(re)===w.type){n(O,w.sibling),Q=a(w,B.props),cl(Q,B),Q.return=O,O=Q;break e}n(O,w);break}else t(O,w);w=w.sibling}B.type===W?(Q=Yl(B.props.children,O.mode,Q,B.key),cl(Q,B),Q.return=O,O=Q):(Q=Qu(B.type,B.key,B.props,null,O.mode,Q),cl(Q,B),Q.return=O,O=Q)}return d(O);case te:e:{for(re=B.key;w!==null;){if(w.key===re)if(w.tag===4&&w.stateNode.containerInfo===B.containerInfo&&w.stateNode.implementation===B.implementation){n(O,w.sibling),Q=a(w,B.children||[]),Q.return=O,O=Q;break e}else{n(O,w);break}else t(O,w);w=w.sibling}Q=rc(B,O.mode,Q),Q.return=O,O=Q}return d(O);case K:return B=Jl(B),Ne(O,w,B,Q)}if(Ee(B))return le(O,w,B,Q);if(ee(B)){if(re=ee(B),typeof re!="function")throw Error(o(150));return B=re.call(B),de(O,w,B,Q)}if(typeof B.then=="function")return Ne(O,w,er(B),Q);if(B.$$typeof===ge)return Ne(O,w,Fu(O,B),Q);tr(O,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,w!==null&&w.tag===6?(n(O,w.sibling),Q=a(w,B),Q.return=O,O=Q):(n(O,w),Q=uc(B,O.mode,Q),Q.return=O,O=Q),d(O)):n(O,w)}return function(O,w,B,Q){try{ki=0;var re=Ne(O,w,B,Q);return Ba=null,re}catch(ve){if(ve===Ua||ve===$u)throw ve;var je=At(29,ve,null,O.mode);return je.lanes=Q,je.return=O,je}finally{}}}var Pl=oh(!0),ch=oh(!1),sl=!1;function yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function dl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ze&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=Vu(e),Zm(e,null,n),t}return Yu(e,l,t,n),Vu(e)}function Hi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Fd(e,n)}}function bc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?a=u=d:u=u.next=d,n=n.next}while(n!==null);u===null?a=u=t:u=u.next=t}else a=u=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var xc=!1;function Li(){if(xc){var e=Da;if(e!==null)throw e}}function qi(e,t,n,l){xc=!1;var a=e.updateQueue;sl=!1;var u=a.firstBaseUpdate,d=a.lastBaseUpdate,g=a.shared.pending;if(g!==null){a.shared.pending=null;var C=g,M=C.next;C.next=null,d===null?u=M:d.next=M,d=C;var q=e.alternate;q!==null&&(q=q.updateQueue,g=q.lastBaseUpdate,g!==d&&(g===null?q.firstBaseUpdate=M:g.next=M,q.lastBaseUpdate=C))}if(u!==null){var X=a.baseState;d=0,q=M=C=null,g=u;do{var _=g.lane&-536870913,H=_!==g.lane;if(H?(Re&_)===_:(l&_)===_){_!==0&&_===Kl&&(xc=!0),q!==null&&(q=q.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var le=e,de=g;_=t;var Ne=n;switch(de.tag){case 1:if(le=de.payload,typeof le=="function"){X=le.call(Ne,X,_);break e}X=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=de.payload,_=typeof le=="function"?le.call(Ne,X,_):le,_==null)break e;X=T({},X,_);break e;case 2:sl=!0}}_=g.callback,_!==null&&(e.flags|=64,H&&(e.flags|=8192),H=a.callbacks,H===null?a.callbacks=[_]:H.push(_))}else H={lane:_,tag:g.tag,payload:g.payload,callback:g.callback,next:null},q===null?(M=q=H,C=X):q=q.next=H,d|=_;if(g=g.next,g===null){if(g=a.shared.pending,g===null)break;H=g,g=H.next,H.next=null,a.lastBaseUpdate=H,a.shared.pending=null}}while(!0);q===null&&(C=X),a.baseState=C,a.firstBaseUpdate=M,a.lastBaseUpdate=q,u===null&&(a.shared.lanes=0),bl|=d,e.lanes=d,e.memoizedState=X}}function sh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function fh(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;eu?u:8;var d=fe.T,g={};g.types=d!==null?d.types:null,fe.T=g,qc(e,!1,t,n);try{var C=a(),M=fe.S;if(M!==null&&M(g,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var q=Wb(C,l);Qi(e,t,q,Qt(e))}else Qi(e,t,l,Qt(e))}catch(X){Qi(e,t,{then:function(){},status:"rejected",reason:X},Qt())}finally{ye.p=u,d!==null&&g.types!==null&&(d.types=g.types),fe.T=d}}function ix(){}function Hc(e,t,n,l){if(e.tag!==5)throw Error(o(476));var a=Vh(e).queue;Yh(e,a,t,Dt,n===null?ix:function(){return Qh(e),n(l)})}function Vh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Dt,baseState:Dt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:Dt},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Qh(e){var t=Vh(e);t.next===null&&(t=e.alternate.memoizedState),Qi(e,t.next.queue,{},Qt())}function Lc(){return vt(ai)}function Xh(){return Fe().memoizedState}function Zh(){return Fe().memoizedState}function ux(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Qt();e=fl(n);var l=dl(t,e,n);l!==null&&(Mt(l,t,n),Hi(l,t,n)),t={cache:mc()},e.payload=t;return}t=t.return}}function rx(e,t,n){var l=Qt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fr(e)?Ih(t,n):(n=ac(e,t,n,l),n!==null&&(Mt(n,e,l),Jh(n,t,l)))}function Kh(e,t,n){var l=Qt();Qi(e,t,n,l)}function Qi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fr(e))Ih(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,g=u(d,n);if(a.hasEagerState=!0,a.eagerState=g,Lt(g,d))return Yu(e,t,a,0),Le===null&&Gu(),!1}catch{}finally{}if(n=ac(e,t,a,l),n!==null)return Mt(n,e,l),Jh(n,t,l),!0}return!1}function qc(e,t,n,l){if(l={lane:2,revertLane:js(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fr(e)){if(t)throw Error(o(479))}else t=ac(e,n,l,2),t!==null&&Mt(t,e,2)}function fr(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function Ih(e,t){ka=ar=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Jh(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Fd(e,n)}}var dr={readContext:vt,use:rr,useCallback:Ie,useContext:Ie,useEffect:Ie,useImperativeHandle:Ie,useLayoutEffect:Ie,useInsertionEffect:Ie,useMemo:Ie,useReducer:Ie,useRef:Ie,useState:Ie,useDebugValue:Ie,useDeferredValue:Ie,useTransition:Ie,useSyncExternalStore:Ie,useId:Ie,useHostTransitionStatus:Ie,useFormState:Ie,useActionState:Ie,useOptimistic:Ie,useMemoCache:Ie,useCacheRefresh:Ie,useEffectEvent:Ie},Fh={readContext:vt,use:rr,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:zh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,cr(4194308,4,kh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cr(4194308,4,e,t)},useInsertionEffect:function(e,t){cr(4,2,e,t)},useMemo:function(e,t){var n=Nt();t=t===void 0?null:t;var l=e();if($l){nl(!0);try{e()}finally{nl(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Nt();if(n!==void 0){var a=n(t);if($l){nl(!0);try{n(t)}finally{nl(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=rx.bind(null,Ce,e),[l.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:function(e){e=zc(e);var t=e.queue,n=Kh.bind(null,Ce,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Bc,useDeferredValue:function(e,t){var n=Nt();return kc(n,e,t)},useTransition:function(){var e=zc(!1);return e=Yh.bind(null,Ce,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Ce,a=Nt();if(we){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Le===null)throw Error(o(349));(Re&127)!==0||yh(l,t,n)}a.memoizedState=n;var u={value:n,getSnapshot:t};return a.queue=u,zh(bh.bind(null,l,u,e),[e]),l.flags|=2048,La(9,{destroy:void 0},ph.bind(null,l,u,n,t),null),n},useId:function(){var e=Nt(),t=Le.identifierPrefix;if(we){var n=bn,l=pn;n=(l&~(1<<32-kt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ir++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?d.createElement("select",{is:l.is}):d.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?d.createElement(a,{is:l.is}):d.createElement(a)}}u[ht]=t,u[_t]=l;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)u.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=u;e:switch(bt(u,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Qn(t)}}return Ye(t),t.subtreeFlags&=-33554433,Wc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=el.current,za(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=ot,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[ht]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||bg(e.nodeValue,n)),e||rl(t,!0)}else e=lu(e).createTextNode(l),e[ht]=t,t.stateNode=e}return Ye(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=za(t),n!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[ht]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else n=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(qt(t),t):(qt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ye(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=za(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(o(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));a[ht]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),a=!1}else a=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(qt(t),t):(qt(t),null)}return qt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),pr(t,t.updateQueue),Ye(t),null);case 4:return ya(),e===null&&Ds(t.stateNode.containerInfo),t.flags|=67108864,Ye(t),null;case 10:return qn(t.type),Ye(t),null;case 19:if(Nc(t),l=t.memoizedState,l===null)return Ye(t),null;if(a=(t.flags&128)!==0,u=l.rendering,u===null)if(a)Zi(l,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=lr(e),u!==null){for(t.flags|=128,Zi(l,!1),e=u.updateQueue,t.updateQueue=e,pr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Km(n,e),n=n.sibling;return Gi(t,yt.current&1|2),we&&Hn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ut()>jr&&(t.flags|=128,a=!0,Zi(l,!1),t.lanes=4194304)}else{if(!a)if(e=lr(u),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,pr(t,e),Zi(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!u.alternate&&!we)return Ye(t),null}else 2*Ut()-l.renderingStartTime>jr&&n!==536870912&&(t.flags|=128,a=!0,Zi(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}if(l.tail!==null){e=l.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ut(),e.sibling=null,u=yt.current,u=a?u&1|2:u&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!n||we?Gi(t,u):(n=u,qe(gt,t),qe(yt,n),Et===null&&(Et=t)),we&&Hn(t,l.treeForkCount),e}return Ye(t),null;case 22:case 23:return qt(t),Ec(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),n=t.updateQueue,n!==null&&pr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&mt(Il),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qn($e),Ye(t),null;case 25:return null;case 30:return t.flags|=33554432,Ye(t),null}throw Error(o(156,t.tag))}function hx(e,t){switch(oc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qn($e),ya(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Cu(t),null;case 31:if(t.memoizedState!==null){if(qt(t),t.alternate===null)throw Error(o(340));Vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ya(),null;case 10:return qn(t.type),null;case 22:case 23:return qt(t),Ec(),e!==null&&mt(Il),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qn($e),null;case 25:return null;default:return null}}function Sv(e,t){switch(oc(t),t.tag){case 3:qn($e),ya();break;case 26:case 27:case 5:Cu(t);break;case 4:ya();break;case 31:t.memoizedState!==null&&qt(t);break;case 13:qt(t);break;case 19:Nc(t);break;case 10:qn(t.type);break;case 22:case 23:qt(t),Ec(),e!==null&&mt(Il);break;case 24:qn($e)}}function Ki(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var u=n.create,d=n.inst;l=u(),d.destroy=l}n=n.next}while(n!==a)}}catch(g){Be(t,t.return,g)}}function gl(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var u=a.next;l=u;do{if((l.tag&e)===e){var d=l.inst,g=d.destroy;if(g!==void 0){d.destroy=void 0,a=t;var C=n,M=g;try{M()}catch(q){Be(a,C,q)}}}l=l.next}while(l!==u)}}catch(q){Be(t,t.return,q)}}function Ev(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{fh(t,n)}catch(l){Be(e,e.return,l)}}}function Cv(e,t,n){n.props=Wl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Be(e,t,l)}}function xn(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:var a=e.stateNode,u=Un(e.memoizedProps,a);(a.ref===null||a.ref.name!==u)&&(a.ref=jg(u)),l=a.ref;break;case 7:if(e.stateNode===null){var d=new Xt(e);y(e.child,!1,aS,d,void 0,void 0),e.stateNode=d}l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(g){Be(e,t,g)}}function pt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Be(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Be(e,t,a)}else n.current=null}function br(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title"))),bt(l,t,n),l[ht]=e,rt(l),t=l;break e;case"link":if(u=Kg("link","href",a).get(t+(n.href||""))){for(d=0;dNe&&(d=Ne,Ne=de,de=d);var O=Um(g,de),w=Um(g,Ne);if(O&&w&&(H.rangeCount!==1||H.anchorNode!==O.node||H.anchorOffset!==O.offset||H.focusNode!==w.node||H.focusOffset!==w.offset)){var B=X.createRange();B.setStart(O.node,O.offset),H.removeAllRanges(),de>Ne?(H.addRange(B),H.extend(w.node,w.offset)):(B.setEnd(w.node,w.offset),H.addRange(B))}}}}for(X=[],H=g;H=H.parentNode;)H.nodeType===1&&X.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;gn?32:n,fe.T=null,n=xs,xs=null;var u=mn,d=Tn;if(Ze=0,la=mn=null,Tn=0,(ze&6)!==0)throw Error(o(331));var g=ze;if(ze|=4,Zv(u.current),Vv(u,u.current,d,n),ze=g,eu(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(pi,u)}catch{}return!0}finally{ye.p=a,fe.T=l,rg(e,t)}}function og(e,t,n){t=Ft(n,t),t=Vc(e.stateNode,t,2),e=dl(e,t,2),e!==null&&(xi(e,2),_n(e))}function Be(e,t,n){if(e.tag===3)og(e,e,n);else for(;t!==null;){if(t.tag===3){og(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(xl===null||!xl.has(l))){e=Ft(n,e),n=av(2),l=dl(t,n,2),l!==null&&(iv(n,l,t,e),xi(l,2),_n(l));break}}t=t.return}}function _s(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new px;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(ys=!0,a.add(n),e=Tx.bind(null,e,t,n),t.then(e,e))}function Tx(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Le===e&&(Re&n)===n&&((Je===4||Je===3&&(Re&62914560)===Re&&300>Ut()-Rr)&&(ze&2)===0?Fa(e,0):Ar|=n,Xa===Re&&(Xa=0)),_n(e)}function cg(e,t){t===0&&(t=Id()),e=Gl(e,t),e!==null&&(xi(e,t),_n(e))}function _x(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cg(e,n)}function Ax(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),cg(e,n)}function Rx(e,t){return jo(e,t)}var $a=null,Wa=null,As=!1,kr=!1,Rs=!1,El=0;function _n(e){e!==Wa&&e.next===null&&(Wa===null?$a=Wa=e:Wa=Wa.next=e),kr=!0,As||(As=!0,Ox())}function eu(e,t){if(!Rs&&kr){Rs=!0;do for(var n=!1,l=$a;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var u=0;else{var d=l.suspendedLanes,g=l.pingedLanes;u=(1<<31-kt(42|e)+1)-1,u&=a&~(d&~g),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,mg(l,u))}else u=Re,u=Au(l,l===Le?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||bi(l,u)||(n=!0,mg(l,u));l=l.next}while(n);Rs=!1}}function jx(){sg()}function sg(){kr=As=!1;var e=0;El!==0&&Yx()&&(e=El);for(var t=Ut(),n=null,l=$a;l!==null;){var a=l.next,u=fg(l,t);u===0?(l.next=null,n===null?$a=a:n.next=a,a===null&&(Wa=n)):(n=l,(e!==0||(u&3)!==0)&&(kr=!0)),l=a}Ze!==0&&Ze!==5||eu(e),El!==0&&(El=0)}function fg(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes&-62914561;0g)break;var q=C.transferSize,X=C.initiatorType;q&&xg(X)&&(C=C.responseEnd,d+=q*(CYr){de.length=le;break}B=new Promise(Ix.bind(B)),de.push(B)}}}if(0"u"?null:document;function Vg(e,t,n){var l=ti;if(l&&typeof t=="string"&&t){var a=It(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Yg.has(a)||(Yg.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),bt(t,"link",e),rt(t),l.head.appendChild(t)))}}function mS(e){Zn.D(e),Vg("dns-prefetch",e,null)}function hS(e,t){Zn.C(e,t),Vg("preconnect",e,t)}function vS(e,t,n){Zn.L(e,t,n);var l=ti;if(l&&e&&t){var a='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+It(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+It(n.imageSizes)+'"]')):a+='[href="'+It(e)+'"]';var u=a;switch(t){case"style":u=ni(e);break;case"script":u=li(e)}if(!(nn.has(u)||(e=T({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),nn.set(u,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(iu(u))||t==="script"&&l.querySelector(uu(u))))){var d=l.createElement("link");bt(d,"link",e),t==="style"&&(d[Ru]=!0,d.onload=d.onerror=function(){nm(d)}),rt(d),l.head.appendChild(d)}}}function gS(e,t){Zn.m(e,t);var n=ti;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+It(l)+'"][href="'+It(e)+'"]',u=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=li(e)}if(!nn.has(u)&&(e=T({rel:"modulepreload",href:e},t),nn.set(u,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(uu(u)))return}l=n.createElement("link"),bt(l,"link",e),rt(l),n.head.appendChild(l)}}}function yS(e,t,n){Zn.S(e,t,n);var l=ti;if(l&&e){var a=xa(l).hoistableStyles,u=ni(e);t=t||"default";var d=a.get(u);if(!d){var g={loading:0,preload:null};if(d=l.querySelector(iu(u)))g.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},n),(n=nn.get(u))&&Fs(e,n);var C=d=l.createElement("link");rt(C),bt(C,"link",e),C._p=new Promise(function(M,q){C.onload=M,C.onerror=q}),C.addEventListener("load",function(){g.loading|=1}),C.addEventListener("error",function(){g.loading|=2}),g.loading|=4,qr(d,t,l)}d={type:"stylesheet",instance:d,count:1,state:g},a.set(u,d)}}}function pS(e,t){Zn.X(e,t);var n=ti;if(n&&e){var l=xa(n).hoistableScripts,a=li(e),u=l.get(a);u||(u=n.querySelector(uu(a)),u||(e=T({src:e,async:!0},t),(t=nn.get(a))&&Ps(e,t),u=n.createElement("script"),rt(u),bt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(a,u))}}function bS(e,t){Zn.M(e,t);var n=ti;if(n&&e){var l=xa(n).hoistableScripts,a=li(e),u=l.get(a);u||(u=n.querySelector(uu(a)),u||(e=T({src:e,async:!0,type:"module"},t),(t=nn.get(a))&&Ps(e,t),u=n.createElement("script"),rt(u),bt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(a,u))}}function Qg(e,t,n,l){var a=(a=el.current)?au(a):null;if(!a)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=ni(n.href),t=xa(a).hoistableStyles,l=t.get(n),l||(l={type:"style",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ni(n.href);var u=xa(a).hoistableStyles,d=u.get(e);if(d||(a=a.ownerDocument||a,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=a.querySelector(iu(e)))?u._p||(d.instance=u,d.state.loading=5):(u=nn.get(e),u||(u={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},nn.set(e,u)),xS(a,e,u,d.state))),t&&l===null)throw Error(o(528,""));return d}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=li(n),t=xa(a).hoistableScripts,l=t.get(n),l||(l={type:"script",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ni(e){return'href="'+It(e)+'"'}function iu(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function xS(e,t,n,l){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Ru]!==!0){l.loading=1;return}}else t=e.createElement("link"),t[Ru]=!0,t.onload=t.onerror=nm.bind(null,t),bt(t,"link",n),rt(t),e.head.appendChild(t);l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2})}function li(e){return'[src="'+It(e)+'"]'}function uu(e){return"script[async]"+e}function Zg(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+It(n.href)+'"]');if(l)return t.instance=l,rt(l),l;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),rt(l),bt(l,"style",a),qr(l,n.precedence,e),t.instance=l;case"stylesheet":a=ni(n.href);var u=e.querySelector(iu(a));if(u)return t.state.loading|=4,t.instance=u,rt(u),u;l=Xg(n),(a=nn.get(a))&&Fs(l,a),u=(e.ownerDocument||e).createElement("link"),rt(u);var d=u;return d._p=new Promise(function(g,C){d.onload=g,d.onerror=C}),bt(u,"link",l),t.state.loading|=4,qr(u,n.precedence,e),t.instance=u;case"script":return u=li(n.src),(a=e.querySelector(uu(u)))?(t.instance=a,rt(a),a):(l=n,(a=nn.get(u))&&(l=T({},n),Ps(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),rt(a),bt(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,qr(l,n.precedence,e));return t.instance}function qr(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,u=a,d=0;d title"):null)}function SS(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ig(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Jg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Fg(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Pg(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Fg(t),e.suspenseyImages.push(t)),e=NS.bind(e),t.decode().then(e,e))}function ES(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=ni(l.href),u=t.querySelector(iu(a));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ru.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,rt(u);return}u=t.ownerDocument||t,l=Xg(l),(a=nn.get(a))&&Fs(l,a),u=u.createElement("link"),rt(u);var d=u;d._p=new Promise(function(g,C){d.onload=g,d.onerror=C}),bt(u,"link",l),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ru.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Yr=0;function CS(e,t){return e.stylesheets&&e.count===0&&Qr(e,e.stylesheets),0Yr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function $g(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Qr(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ru(){this.count--,$g(this)}function NS(){this.imgCount--,$g(this)}var Vr=null;function Qr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vr=new Map,t.forEach(wS,e),Vr=null,ru.call(e))}function wS(e,t){if(!(t.state.loading&4)){var n=Vr.get(e);if(n)var l=n.get(null);else{n=new Map,Vr.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),cf.exports=GS(),cf.exports}var VS=YS();const QS=sd(VS),w0=i=>{let r;const c=new Set,o=(b,S)=>{const y=typeof b=="function"?b(r):b;if(!Object.is(y,r)){const E=r;r=S??(typeof y!="object"||y===null)?y:Object.assign({},r,y),c.forEach(A=>A(r,E))}},s=()=>r,v={setState:o,getState:s,getInitialState:()=>p,subscribe:b=>(c.add(b),()=>c.delete(b))},p=r=i(o,s,v);return v},XS=(i=>i?w0(i):w0),ZS=i=>i;function KS(i,r=ZS){const c=gu.useSyncExternalStore(i.subscribe,gu.useCallback(()=>r(i.getState()),[i,r]),()=>r(i.getInitialState()));return gu.useDebugValue(c),c}const T0=i=>{const r=XS(i),c=o=>KS(r,o);return Object.assign(c,r),c},IS=(i=>i?T0(i):T0),JS=()=>typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,Ay=i=>{const c=(i==="system"?JS():i==="dark")?"dark":"light";return typeof document<"u"&&document.documentElement.setAttribute("data-theme",c),c},Pr=localStorage.getItem("hl_theme_v2"),Ry=Pr==="light"||Pr==="dark"||Pr==="system"?Pr:"system",FS=Ay(Ry),PS=localStorage.getItem("hl_route_mode")||"auto",$S=localStorage.getItem("hl_layout_preset")||"homepage-3col",WS=typeof window<"u"&&window.location.pathname.startsWith("/storybook")?"storybook":"dashboard",Pn=IS((i,r)=>({theme:Ry,resolvedTheme:FS,routeMode:PS,layoutPreset:$S,viewMode:WS,showAgyModal:!1,showWechatModal:!1,showCmdPalette:!1,toast:"",actionLoading:!1,telemetry:{mini:{chip:"Apple M6 (12核)",ip:"192.168.31.164",tailscale_ip:"100.108.205.40",cpu_pct:6.5,load_1m:.85,mem_used_gb:11.8,mem_total_gb:24,mem_pct:49.2,disk_used_gb:59.9,disk_total_gb:460.4,disk_pct:13,uptime:"运行中",agy_tmux:!0},nas:{ip:"192.168.31.185",online:!0,mounted:!0,total_tb:19.94,used_tb:3.36,free_tb:16.58,pct:16.8,latest_backup:"11-06 23:17"},network:{home_wan_ip:"124.90.142.21",ai_policy:"Ai平台 → 狮城节点",sg_node:"233boy-sea",sg_egress_ip:"104.43.105.243",sg_delay_ms:68},services:{agy:!0,vaultwarden:!0,nas:!0,clash:!0,router:!0,uptime:!0,clawbot:!1}},setTheme:c=>{localStorage.setItem("hl_theme_v2",c);const o=Ay(c);i({theme:c,resolvedTheme:o})},toggleTheme:()=>{const{resolvedTheme:c,setTheme:o}=r();o(c==="dark"?"light":"dark")},setRouteMode:c=>{localStorage.setItem("hl_route_mode",c),i({routeMode:c})},setLayoutPreset:c=>{localStorage.setItem("hl_layout_preset",c),i({layoutPreset:c})},setViewMode:c=>{if(typeof window<"u"){const o=c==="storybook"?"/storybook":"/";window.history.pushState({},"",o)}i({viewMode:c})},setShowAgyModal:c=>i({showAgyModal:c}),setShowWechatModal:c=>i({showWechatModal:c}),setShowCmdPalette:c=>i({showCmdPalette:c}),showToast:c=>{i({toast:c}),setTimeout(()=>{r().toast===c&&i({toast:""})},3e3)},fetchTelemetry:async()=>{try{const c=await fetch("/api/telemetry");if(c.ok){const o=await c.json();i({telemetry:o})}}catch{}},triggerAction:async(c,o)=>{const{showToast:s,fetchTelemetry:f}=r();i({actionLoading:!0}),s(o);try{const v=await(await fetch(`/api/action/${c}`,{method:"POST"})).json();s(v.message||"操作已完成"),await f()}catch{s("请求失败,请稍后重试")}finally{i({actionLoading:!1})}},copyCmd:async(c,o)=>{const{showToast:s}=r();try{await navigator.clipboard.writeText(c),s(`已复制「${o}」: ${c}`)}catch{s(c)}},getEffectiveMode:()=>{const{routeMode:c}=r();if(c!=="auto")return c;const o=window.location.hostname;return o.startsWith("192.168.")||o.startsWith("100.")||o==="localhost"?"lan":o.includes(".home.961504.xyz")||window.location.port==="10443"?"home10443":"edge443"}}));typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{const i=Pn.getState();i.theme==="system"&&i.setTheme("system")});/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e2=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jy=(...i)=>i.filter((r,c,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===c).join(" ").trim();/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var t2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n2=x.forwardRef(({color:i="currentColor",size:r=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:s="",children:f,iconNode:m,...v},p)=>x.createElement("svg",{ref:p,...t2,width:r,height:r,stroke:i,strokeWidth:o?Number(c)*24/Number(r):c,className:jy("lucide",s),...v},[...m.map(([b,S])=>x.createElement(b,S)),...Array.isArray(f)?f:[f]]));/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xe=(i,r)=>{const c=x.forwardRef(({className:o,...s},f)=>x.createElement(n2,{ref:f,iconNode:r,className:jy(`lucide-${e2(i)}`,o),...s}));return c.displayName=`${i}`,c};/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l2=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Oy=Xe("BookOpen",l2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],i2=Xe("Check",a2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const u2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],r2=Xe("CircleCheck",u2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o2=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],c2=Xe("EyeOff",o2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const s2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],f2=Xe("Eye",s2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d2=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],_0=Xe("KeyRound",d2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m2=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],h2=Xe("Layers",m2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const v2=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],g2=Xe("LayoutGrid",v2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y2=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],p2=Xe("Lock",y2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b2=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],My=Xe("MessageSquare",b2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x2=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],S2=Xe("Moon",x2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E2=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],C2=Xe("Palette",E2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],w2=Xe("PanelsTopLeft",N2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T2=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],_2=Xe("QrCode",T2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],R2=Xe("RefreshCw",A2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j2=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],dd=Xe("Search",j2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O2=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],M2=Xe("Send",O2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],D2=Xe("ShieldCheck",z2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U2=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],B2=Xe("Smartphone",U2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k2=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],H2=Xe("Sparkles",k2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],q2=Xe("Sun",L2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G2=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],md=Xe("Terminal",G2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Y2=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],V2=Xe("Unplug",Y2);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q2=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],X2=Xe("User",Q2);var Z2=Object.defineProperty,hd=(i,r)=>Z2(i,"name",{value:r,configurable:!0});function Jf(i,r){if(typeof i=="function")return i(r);i!=null&&(i.current=r)}hd(Jf,"setRef");function ra(...i){return r=>{let c=!1;const o=i.map(s=>{const f=Jf(s,r);return!c&&typeof f=="function"&&(c=!0),f});if(c)return()=>{for(let s=0;sK2(i,"name",{value:r,configurable:!0});function Ml(i){const r=x.forwardRef((c,o)=>{let{children:s,...f}=c,m=null,v=!1;const p=[];s=Hy(s),x.Children.forEach(s,E=>{var A;if(By(E)){v=!0;const j=E;let D="child"in j.props?j.props.child:j.props.children;for(;vd(D)&&typeof fo=="function";)D=fo(D._payload);m=F2(j,D),p.push((A=m==null?void 0:m.props)==null?void 0:A.children)}else p.push(E)}),m?m=x.cloneElement(m,void 0,p):!v&&x.Children.count(s)===1&&x.isValidElement(s)&&(m=s);const b=m?Uy(m):void 0,S=zt(o,b);if(!m){if(s||s===0)throw new Error(v?W2(i):$2(i));return s}const y=Dy(f,m.props??{});return m.type!==x.Fragment&&(y.ref=o?S:b),x.cloneElement(m,y)});return r.displayName=`${i}.Slot`,r}Kt(Ml,"createSlot");var I2=Ml("Slot"),zy=Symbol.for("radix.slottable");function J2(i){const r=Kt(c=>"child"in c?c.children(c.child):c.children,"Slottable");return r.displayName=`${i}.Slottable`,r.__radixId=zy,r}Kt(J2,"createSlottable");var F2=Kt((i,r)=>"child"in i.props?x.isValidElement(r)?x.cloneElement(r,void 0,i.props.children(r.props.children)):null:x.isValidElement(r)?r:null,"getSlottableElementFromSlottable");function Dy(i,r){const c={...r};for(const o in r){const s=i[o],f=r[o];/^on[A-Z]/.test(o)?s&&f?c[o]=(...v)=>{const p=f(...v);return s(...v),p}:s&&(c[o]=s):o==="style"?c[o]={...s,...f}:o==="className"?c[o]=[s,f].filter(Boolean).join(" "):o==="aria-describedby"&&(c[o]=Ly(f,s))}return{...i,...c}}Kt(Dy,"mergeProps");function Uy(i){var o,s;let r=(o=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:o.get,c=r&&"isReactWarning"in r&&r.isReactWarning;return c?i.ref:(r=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,c=r&&"isReactWarning"in r&&r.isReactWarning,c?i.props.ref:i.props.ref||i.ref)}Kt(Uy,"getElementRef");function By(i){return x.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===zy}Kt(By,"isSlottable");var P2=Symbol.for("react.lazy");function vd(i){return i!=null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===P2&&"_payload"in i&&ky(i._payload)}Kt(vd,"isLazyComponent");function ky(i){return typeof i=="object"&&i!==null&&"then"in i}Kt(ky,"isPromiseLike");function Hy(i){let r=i;for(;vd(r)&&typeof fo=="function";)r=fo(r._payload);return r}Kt(Hy,"useUnwrappedLazy");function Ly(...i){const r=new Set;for(const c of i)if(typeof c=="string")for(const o of String(c).trim().split(/\s+/))o&&r.add(o);return r.size>0?Array.from(r).join(" "):void 0}Kt(Ly,"concatAriaDescribedby");var $2=Kt(i=>`${i} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),W2=Kt(i=>`${i} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),fo=sa[" use ".trim().toString()];function qy(i){var r,c,o="";if(typeof i=="string"||typeof i=="number")o+=i;else if(typeof i=="object")if(Array.isArray(i)){var s=i.length;for(r=0;rtypeof i=="boolean"?`${i}`:i===0?"0":i,R0=Gy,Yy=(i,r)=>c=>{var o;if((r==null?void 0:r.variants)==null)return R0(i,c==null?void 0:c.class,c==null?void 0:c.className);const{variants:s,defaultVariants:f}=r,m=Object.keys(s).map(b=>{const S=c==null?void 0:c[b],y=f==null?void 0:f[b];if(S===null)return null;const E=A0(S)||A0(y);return s[b][E]}),v=c&&Object.entries(c).reduce((b,S)=>{let[y,E]=S;return E===void 0||(b[y]=E),b},{}),p=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((b,S)=>{let{class:y,className:E,...A}=S;return Object.entries(A).every(j=>{let[D,L]=j;return Array.isArray(L)?L.includes({...f,...v}[D]):{...f,...v}[D]===L})?[...b,y,E]:b},[]);return R0(i,m,p,c==null?void 0:c.class,c==null?void 0:c.className)},eE=(i,r)=>{const c=new Array(i.length+r.length);for(let o=0;o({classGroupId:i,validator:r}),Vy=(i=new Map,r=null,c)=>({nextPart:i,validators:r,classGroupId:c}),mo="-",j0=[],nE="arbitrary..",lE=i=>{const r=iE(i),{conflictingClassGroups:c,conflictingClassGroupModifiers:o}=i;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return aE(m);const v=m.split(mo),p=v[0]===""&&v.length>1?1:0;return Qy(v,p,r)},getConflictingClassGroupIds:(m,v)=>{if(v){const p=o[m],b=c[m];return p?b?eE(b,p):p:b||j0}return c[m]||j0}}},Qy=(i,r,c)=>{if(i.length-r===0)return c.classGroupId;const s=i[r],f=c.nextPart.get(s);if(f){const b=Qy(i,r+1,f);if(b)return b}const m=c.validators;if(m===null)return;const v=r===0?i.join(mo):i.slice(r).join(mo),p=m.length;for(let b=0;bi.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=i.slice(1,-1),c=r.indexOf(":"),o=r.slice(0,c);return o?nE+o:void 0})(),iE=i=>{const{theme:r,classGroups:c}=i;return uE(c,r)},uE=(i,r)=>{const c=Vy();for(const o in i){const s=i[o];gd(s,c,o,r)}return c},gd=(i,r,c,o)=>{const s=i.length;for(let f=0;f{if(typeof i=="string"){oE(i,r,c);return}if(typeof i=="function"){cE(i,r,c,o);return}sE(i,r,c,o)},oE=(i,r,c)=>{const o=i===""?r:Xy(r,i);o.classGroupId=c},cE=(i,r,c,o)=>{if(fE(i)){gd(i(o),r,c,o);return}r.validators===null&&(r.validators=[]),r.validators.push(tE(c,i))},sE=(i,r,c,o)=>{const s=Object.entries(i),f=s.length;for(let m=0;m{let c=i;const o=r.split(mo),s=o.length;for(let f=0;f"isThemeGetter"in i&&i.isThemeGetter===!0,dE=i=>{if(i<1)return{get:()=>{},set:()=>{}};let r=0,c=Object.create(null),o=Object.create(null);const s=(f,m)=>{c[f]=m,r++,r>i&&(r=0,o=c,c=Object.create(null))};return{get(f){let m=c[f];if(m!==void 0)return m;if((m=o[f])!==void 0)return s(f,m),m},set(f,m){f in c?c[f]=m:s(f,m)}}},Ff="!",O0=":",mE=[],M0=(i,r,c,o,s)=>({modifiers:i,hasImportantModifier:r,baseClassName:c,maybePostfixModifierPosition:o,isExternal:s}),hE=i=>{const{prefix:r,experimentalParseClassName:c}=i;let o=s=>{const f=[];let m=0,v=0,p=0,b;const S=s.length;for(let D=0;Dp?b-p:void 0;return M0(f,A,E,j)};if(r){const s=r+O0,f=o;o=m=>m.startsWith(s)?f(m.slice(s.length)):M0(mE,!1,m,void 0,!0)}if(c){const s=o;o=f=>c({className:f,parseClassName:s})}return o},vE=i=>{const r=new Map;return i.orderSensitiveModifiers.forEach((c,o)=>{r.set(c,1e6+o)}),c=>{const o=[];let s=[];for(let f=0;f0&&(s.sort(),o.push(...s),s=[]),o.push(m)):s.push(m)}return s.length>0&&(s.sort(),o.push(...s)),o}},gE=i=>({cache:dE(i.cacheSize),parseClassName:hE(i),sortModifiers:vE(i),postfixLookupClassGroupIds:yE(i),...lE(i)}),yE=i=>{const r=Object.create(null),c=i.postfixLookupClassGroups;if(c)for(let o=0;o{const{parseClassName:c,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:f,postfixLookupClassGroupIds:m}=r,v=[],p=i.trim().split(pE);let b="";for(let S=p.length-1;S>=0;S-=1){const y=p[S],{isExternal:E,modifiers:A,hasImportantModifier:j,baseClassName:D,maybePostfixModifierPosition:L}=c(y);if(E){b=y+(b.length>0?" "+b:b);continue}let Y=!!L,G;if(Y){const T=D.substring(0,L);G=o(T);const z=G&&m[G]?o(D):void 0;z&&z!==G&&(G=z,Y=!1)}else G=o(D);if(!G){if(!Y){b=y+(b.length>0?" "+b:b);continue}if(G=o(D),!G){b=y+(b.length>0?" "+b:b);continue}Y=!1}const k=A.length===0?"":A.length===1?A[0]:f(A).join(":"),V=j?k+Ff:k,I=V+G;if(v.indexOf(I)>-1)continue;v.push(I);const R=s(G,Y);for(let T=0;T0?" "+b:b)}return b},xE=(...i)=>{let r=0,c,o,s="";for(;r{if(typeof i=="string")return i;let r,c="";for(let o=0;o{let c,o,s,f;const m=p=>{const b=r.reduce((S,y)=>y(S),i());return c=gE(b),o=c.cache.get,s=c.cache.set,f=v,v(p)},v=p=>{const b=o(p);if(b)return b;const S=bE(p,c);return s(p,S),S};return f=m,(...p)=>f(xE(...p))},EE=[],it=i=>{const r=c=>c[i]||EE;return r.isThemeGetter=!0,r.themeKey=i,r},Ky=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Iy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,CE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,NE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,TE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,_E=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rl=i=>CE.test(i),Te=i=>!!i&&!Number.isNaN(Number(i)),An=i=>!!i&&Number.isInteger(Number(i)),mf=i=>i.endsWith("%")&&Te(i.slice(0,-1)),Kn=i=>NE.test(i),Jy=()=>!0,RE=i=>wE.test(i)&&!TE.test(i),yd=()=>!1,jE=i=>_E.test(i),OE=i=>AE.test(i),ME=i=>!oe(i)&&!se(i),zE=i=>i.startsWith("@container")&&(i[10]==="/"&&i[11]!==void 0||i[11]==="s"&&i[16]!==void 0&&i.startsWith("-size/",10)||i[11]==="n"&&i[18]!==void 0&&i.startsWith("-normal/",10)),DE=i=>Ul(i,$y,yd),oe=i=>Ky.test(i),ia=i=>Ul(i,Wy,RE),z0=i=>Ul(i,YE,Te),UE=i=>Ul(i,t1,Jy),BE=i=>Ul(i,e1,yd),D0=i=>Ul(i,Fy,yd),kE=i=>Ul(i,Py,OE),$r=i=>Ul(i,n1,jE),se=i=>Iy.test(i),mu=i=>fa(i,Wy),HE=i=>fa(i,e1),U0=i=>fa(i,Fy),LE=i=>fa(i,$y),qE=i=>fa(i,Py),Wr=i=>fa(i,n1,!0),GE=i=>fa(i,t1,!0),Ul=(i,r,c)=>{const o=Ky.exec(i);return o?o[1]?r(o[1]):c(o[2]):!1},fa=(i,r,c=!1)=>{const o=Iy.exec(i);return o?o[1]?r(o[1]):c:!1},Fy=i=>i==="position"||i==="percentage",Py=i=>i==="image"||i==="url",$y=i=>i==="length"||i==="size"||i==="bg-size",Wy=i=>i==="length",YE=i=>i==="number",e1=i=>i==="family-name",t1=i=>i==="number"||i==="weight",n1=i=>i==="shadow",VE=()=>{const i=it("color"),r=it("font"),c=it("text"),o=it("font-weight"),s=it("tracking"),f=it("leading"),m=it("breakpoint"),v=it("container"),p=it("spacing"),b=it("radius"),S=it("shadow"),y=it("inset-shadow"),E=it("text-shadow"),A=it("drop-shadow"),j=it("blur"),D=it("perspective"),L=it("aspect"),Y=it("ease"),G=it("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...V(),se,oe],R=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],z=()=>[se,oe,p],Z=()=>[Rl,"full","auto",...z()],te=()=>[An,"none","subgrid",se,oe],W=()=>["auto",{span:["full",An,se,oe]},An,se,oe],P=()=>[An,"auto",se,oe],ne=()=>["auto","min","max","fr",se,oe],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ge=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...z()],ae=()=>[Rl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],ce=()=>[v,Rl,"screen","full","dvw","lvw","svw","min","max","fit",...z()],xe=()=>[Rl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],K=()=>[i,se,oe],Se=()=>[...V(),U0,D0,{position:[se,oe]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],me=()=>["auto","cover","contain",LE,DE,{size:[se,oe]}],N=()=>[mf,mu,ia],U=()=>["","none","full",b,se,oe],$=()=>["",Te,mu,ia],ee=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[Te,mf,U0,D0],Ee=()=>["","none",j,se,oe],fe=()=>["none",Te,se,oe],ye=()=>["none",Te,se,oe],Dt=()=>[Te,se,oe],Wn=()=>[Rl,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kn],breakpoint:[Kn],color:[Jy],container:[Kn],"drop-shadow":[Kn],ease:["in","out","in-out"],font:[ME],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kn],shadow:[Kn],spacing:["px",Te],text:[Kn],"text-shadow":[Kn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Rl,oe,se,L]}],container:["container"],"container-type":[{"@container":["","normal","size",se,oe]}],"container-named":[zE],columns:[{columns:[Te,"auto",oe,se,v]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[An,"auto",se,oe]}],basis:[{basis:[Rl,"full","auto",v,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,Rl,"auto","initial","none",oe]}],grow:[{grow:["",Te,se,oe]}],shrink:[{shrink:["",Te,se,oe]}],order:[{order:[An,"first","last","none",se,oe]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...ge(),"normal"]}],"justify-self":[{"justify-self":["auto",...ge()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...ge(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ge(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...ge(),"baseline"]}],"place-self":[{"place-self":["auto",...ge()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:ae()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...xe()]}],"min-block-size":[{"min-block":["auto",...xe()]}],"max-block-size":[{"max-block":["none",...xe()]}],w:[{w:[v,"screen",...ae()]}],"min-w":[{"min-w":[v,"screen","none",...ae()]}],"max-w":[{"max-w":[v,"screen","none","prose",{screen:[m]},...ae()]}],h:[{h:["screen","lh",...ae()]}],"min-h":[{"min-h":["screen","lh","none",...ae()]}],"max-h":[{"max-h":["screen","lh","none",...ae()]}],"font-size":[{text:["base",c,mu,ia]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,GE,UE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mf,oe]}],"font-family":[{font:[HE,BE,r]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,se,oe]}],"line-clamp":[{"line-clamp":[Te,"none",se,z0]}],leading:[{leading:["none",f,...z()]}],"list-image":[{"list-image":["none",se,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",se,ia]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Te,"auto",se,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[An,se,oe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Se()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},An,se,oe],radial:["",se,oe],conic:["",An,se,oe]},qE,kE]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-bs":[{"border-bs":$()}],"border-w-be":[{"border-be":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,se,oe]}],"outline-w":[{outline:["",Te,mu,ia]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","inner","none",S,Wr,$r]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",y,Wr,$r]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Te,ia]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",E,Wr,$r]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Te,se,oe]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[se,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Se()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,oe]}],filter:[{filter:["","none",se,oe]}],blur:[{blur:Ee()}],brightness:[{brightness:[Te,se,oe]}],contrast:[{contrast:[Te,se,oe]}],"drop-shadow":[{"drop-shadow":["","none",A,Wr,$r]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Te,se,oe]}],"hue-rotate":[{"hue-rotate":[Te,se,oe]}],invert:[{invert:["",Te,se,oe]}],saturate:[{saturate:[Te,se,oe]}],sepia:[{sepia:["",Te,se,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",se,oe]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Te,se,oe]}],"backdrop-contrast":[{"backdrop-contrast":[Te,se,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,se,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,se,oe]}],"backdrop-invert":[{"backdrop-invert":["",Te,se,oe]}],"backdrop-opacity":[{"backdrop-opacity":[Te,se,oe]}],"backdrop-saturate":[{"backdrop-saturate":[Te,se,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,se,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",se,oe]}],ease:[{ease:["linear","initial",Y,se,oe]}],delay:[{delay:[Te,se,oe]}],animate:[{animate:["none",G,se,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[D,se,oe]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":["scale-3d"],skew:[{skew:Dt()}],"skew-x":[{"skew-x":Dt()}],"skew-y":[{"skew-y":Dt()}],transform:[{transform:[se,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Wn()}],"translate-x":[{"translate-x":Wn()}],"translate-y":[{"translate-y":Wn()}],"translate-z":[{"translate-z":Wn()}],"translate-none":["translate-none"],zoom:[{zoom:[An,se,oe]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,oe]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Te,mu,ia,z0]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},QE=SE(VE);function Qe(...i){return QE(Gy(i))}const XE=Yy("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-lg text-xs font-medium transition-all cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50 shrink-0",{variants:{variant:{default:"hl-btn-primary shadow-xs",outline:"hl-btn-outline",secondary:"hl-muted border hl-border hover:opacity-90",ghost:"hover:bg-[var(--bg-muted)]",accent:"border border-[var(--accent)] bg-[var(--accent-soft)] text-[var(--accent)] font-semibold hover:opacity-90"},size:{default:"h-8 px-3 py-1.5",sm:"h-7 px-2.5 text-[11px] rounded-md",lg:"h-9 px-4 text-xs",icon:"h-8 w-8 p-0"}},defaultVariants:{variant:"default",size:"default"}}),nt=x.forwardRef(({className:i,variant:r,size:c,asChild:o=!1,...s},f)=>{const m=o?I2:"button";return h.jsx(m,{className:Qe(XE({variant:r,size:c,className:i})),ref:f,...s})});nt.displayName="Button";var ZE=Object.defineProperty,vi=(i,r)=>ZE(i,"name",{value:r,configurable:!0}),l1=!!(typeof window<"u"&&window.document&&window.document.createElement);function dt(i,r,{checkForDefaultPrevented:c=!0}={}){return vi(function(s){if(i==null||i(s),c===!1||!s||!s.defaultPrevented)return r==null?void 0:r(s)},"handleEvent")}vi(dt,"composeEventHandlers");function KE(i){var r;if(!l1)throw new Error("Cannot access window outside of the DOM");return((r=i==null?void 0:i.ownerDocument)==null?void 0:r.defaultView)??window}vi(KE,"getOwnerWindow");function Pf(i){if(!l1)throw new Error("Cannot access document outside of the DOM");return(i==null?void 0:i.ownerDocument)??document}vi(Pf,"getOwnerDocument");function a1(i,r=!1){const{activeElement:c}=Pf(i);if(!(c!=null&&c.nodeName))return null;if(i1(c)&&c.contentDocument)return a1(c.contentDocument.body,r);if(r){const o=c.getAttribute("aria-activedescendant");if(o){const s=Pf(c).getElementById(o);if(s)return s}}return c}vi(a1,"getActiveElement");function i1(i){return i.tagName==="IFRAME"}vi(i1,"isFrame");var IE=Object.defineProperty,ln=(i,r)=>IE(i,"name",{value:r,configurable:!0});function JE(i,r){const c=x.createContext(r);c.displayName=i+"Context";const o=ln(f=>{const{children:m,...v}=f,p=x.useMemo(()=>v,Object.values(v));return h.jsx(c.Provider,{value:p,children:m})},"Provider");o.displayName=i+"Provider";function s(f,m={}){const{optional:v=!1}=m,p=x.useContext(c);if(p)return p;if(r!==void 0)return r;if(!v)throw new Error(`\`${f}\` must be used within \`${i}\``)}return ln(s,"useContext"),[o,s]}ln(JE,"createContext");function da(i,r=[]){let c=[];function o(f,m){const v=x.createContext(m);v.displayName=f+"Context";const p=c.length;c=[...c,m];const b=ln(y=>{var Y;const{scope:E,children:A,...j}=y,D=((Y=E==null?void 0:E[i])==null?void 0:Y[p])||v,L=x.useMemo(()=>j,Object.values(j));return h.jsx(D.Provider,{value:L,children:A})},"Provider");b.displayName=f+"Provider";function S(y,E,A={}){var Y;const{optional:j=!1}=A,D=((Y=E==null?void 0:E[i])==null?void 0:Y[p])||v,L=x.useContext(D);if(L)return L;if(m!==void 0)return m;if(!j)throw new Error(`\`${y}\` must be used within \`${f}\``)}return ln(S,"useContext"),[b,S]}ln(o,"createContext");const s=ln(()=>{const f=c.map(m=>x.createContext(m));return ln(function(v){const p=(v==null?void 0:v[i])||f;return x.useMemo(()=>({[`__scope${i}`]:{...v,[i]:p}}),[v,p])},"useScope")},"createScope");return s.scopeName=i,[o,u1(s,...r)]}ln(da,"createContextScope");function u1(...i){const r=i[0];if(i.length===1)return r;const c=ln(()=>{const o=i.map(s=>({useScope:s(),scopeName:s.scopeName}));return ln(function(f){const m=o.reduce((v,{useScope:p,scopeName:b})=>{const y=p(f)[`__scope${b}`];return{...v,...y}},{});return x.useMemo(()=>({[`__scope${r.scopeName}`]:m}),[m])},"useComposedScopes")},"createScope");return c.scopeName=r.scopeName,c}ln(u1,"composeContextScopes");var un=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},FE=Object.defineProperty,ut=(i,r)=>FE(i,"name",{value:r,configurable:!0});function r1(i){const r=i+"CollectionProvider",[c,o]=da(r),[s,f]=c(r,{collectionRef:{current:null},itemMap:new Map}),m=ut(D=>{const{scope:L,children:Y}=D,G=x.useRef(null),k=x.useRef(new Map).current;return h.jsx(s,{scope:L,itemMap:k,collectionRef:G,children:Y})},"CollectionProvider");m.displayName=r;const v=i+"CollectionSlot",p=Ml(v),b=x.forwardRef((D,L)=>{const{scope:Y,children:G}=D,k=f(v,Y),V=zt(L,k.collectionRef);return h.jsx(p,{ref:V,children:G})});b.displayName=v;const S=i+"CollectionItemSlot",y="data-radix-collection-item",E=Ml(S),A=x.forwardRef((D,L)=>{const{scope:Y,children:G,...k}=D,V=x.useRef(null),I=zt(L,V),R=f(S,Y);return x.useEffect(()=>(R.itemMap.set(V,{ref:V,...k}),()=>void R.itemMap.delete(V))),h.jsx(E,{[y]:"",ref:I,children:G})});A.displayName=S;function j(D){const L=f(i+"CollectionConsumer",D);return x.useCallback(()=>{const G=L.collectionRef.current;if(!G)return[];const k=Array.from(G.querySelectorAll(`[${y}]`));return Array.from(L.itemMap.values()).sort((R,T)=>k.indexOf(R.ref.current)-k.indexOf(T.ref.current))},[L.collectionRef,L.itemMap])}return ut(j,"useCollection"),[{Provider:m,Slot:b,ItemSlot:A},j,o]}ut(r1,"createCollection");var B0=new WeakMap,Pe,Zt,eo=(Zt=class extends Map{constructor(c){super(c);h0(this,Pe);uf(this,Pe,[...super.keys()]),B0.set(this,!0)}set(c,o){return B0.get(this)&&!this.has(c)&&xt(this,Pe).push(c),super.set(c,o),this}insert(c,o,s){const f=this.has(o),m=f?this.size:this.size+1,v=pd(c),p=v>=0?Math.min(v,m-1):Math.max(m+v,0);if(f?xt(this,Pe).indexOf(o)===p:p===this.size)return this.set(o,s),this;const b=xt(this,Pe).filter(y=>y!==o);b.splice(p,0,o);const S=b.map(y=>[y,y===o?s:this.get(y)]);this.clear();for(const[y,E]of S)this.set(y,E);return this}with(c,o,s){const f=new Zt(this);return f.insert(c,o,s),f}before(c){const o=xt(this,Pe).indexOf(c)-1;if(!(o<0))return this.entryAt(o)}setBefore(c,o,s){const f=xt(this,Pe).indexOf(c);if(f===-1)return this;const m=xt(this,Pe).indexOf(o),v=m!==-1&&m=this.size&&(f=this.size-1),this.at(f)}keyFrom(c,o){const s=this.indexOf(c);if(s===-1)return;let f=s+o;return f<0&&(f=0),f>=this.size&&(f=this.size-1),this.keyAt(f)}find(c,o){let s=0;for(const f of this){if(Reflect.apply(c,o,[f,s,this]))return f;s++}}findIndex(c,o){let s=0;for(const f of this){if(Reflect.apply(c,o,[f,s,this]))return s;s++}return-1}filter(c,o){const s=[];let f=0;for(const m of this)Reflect.apply(c,o,[m,f,this])&&s.push(m),f++;return new Zt(s)}map(c,o){const s=[];let f=0;for(const m of this)s.push([m[0],Reflect.apply(c,o,[m,f,this])]),f++;return new Zt(s)}reduce(...c){const[o,s]=c,f=c.length>1;if(!f&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let m=0,v=s;for(const p of this)m===0&&!f?v=p:v=Reflect.apply(o,this,[v,p,m,this]),m++;return v}reduceRight(...c){const[o,s]=c,f=c.length>1;if(!f&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let m=s;for(let v=this.size-1;v>=0;v--){const p=this.entryAt(v);v===this.size-1&&!f?m=p:m=Reflect.apply(o,this,[m,p,v,this])}return m}sort(c){if(typeof c!="function")throw new TypeError("OrderedDict.sort requires a compare function");const o=[...this.entries()].sort(c);this.clear();for(const[s,f]of o)this.set(s,f);return this}toSorted(c){if(typeof c!="function")throw new TypeError("OrderedDict.toSorted requires a compare function");const o=[...this.entries()].sort(c);return new Zt(o)}toReversed(){const c=new Zt;for(let o=this.size-1;o>=0;o--){const s=this.keyAt(o),f=this.get(s);c.set(s,f)}return c}toSpliced(...c){const o=[...this.entries()];return o.splice(...c),new Zt(o)}slice(c,o){const s=new Zt;for(const f of xt(this,Pe).slice(c,o))s.set(f,this.get(f));return s}every(c,o){let s=0;for(const f of this){if(!Reflect.apply(c,o,[f,s,this]))return!1;s++}return!0}some(c,o){let s=0;for(const f of this){if(Reflect.apply(c,o,[f,s,this]))return!0;s++}return!1}},Pe=new WeakMap,ut(Zt,"OrderedDict"),Zt);function ro(i,r){if("at"in Array.prototype)return Array.prototype.at.call(i,r);const c=o1(i,r);return c===-1?void 0:i[c]}ut(ro,"at");function o1(i,r){const c=i.length,o=pd(r),s=o>=0?o:c+o;return s<0||s>=c?-1:s}ut(o1,"toSafeIndex");function pd(i){return i!==i||i===0?0:Math.trunc(i)}ut(pd,"toSafeInteger");function PE(i){const r=i+"CollectionProvider",[c,o]=da(r),[s,f]=c(r);s.displayName=i+"CollectionStableContextProvider";const[m,v]=c(r);m.displayName=i+"CollectionStatefulContextProvider";const p=ut(({state:R,...T})=>R?h.jsx(S,{...T,state:R}):h.jsx(b,{...T}),"CollectionProvider");p.displayName=r;const b=ut(R=>{const T=G();return h.jsx(S,{...R,state:T})},"CollectionInit");b.displayName=i+"CollectionInit";const S=ut(R=>{const{scope:T,children:z,state:Z}=R,te=x.useRef(null),[W,P]=x.useState(null),ne=zt(te,P),[ue,ge]=Z,F=x.useRef(new eo),ae=x.useCallback(()=>{const ce=F.current;return f1(ce)||ce.sort(oo),ce},[]);return x.useEffect(()=>{if(!W)return;const ce=d1(()=>{ge(xe=>{const K=xe.toSorted(oo);return K.some(([J],me)=>xe.keyAt(me)!==J)?K:xe})});return ce.observe(W,{childList:!0,subtree:!0}),()=>{ce.disconnect()}},[W,ge]),h.jsx(s,{scope:T,collectionElementRef:ne,collectionElementRefObject:te,getCollection:ae,setCollection:ge,registryRef:F,children:h.jsx(m,{scope:T,collectionElement:W,collection:ue,children:z})})},"CollectionProviderImpl");S.displayName=i+"CollectionProviderImpl";const y=i+"CollectionSlot",E=Ml(y),A=x.forwardRef((R,T)=>{const{scope:z,children:Z}=R,te=f(y,z),W=zt(T,te.collectionElementRef);return h.jsx(E,{ref:W,children:Z})});A.displayName=y;const j=i+"CollectionItemSlot",D="data-radix-collection-item",L=Ml(j),Y=x.forwardRef((R,T)=>{const{scope:z,children:Z,...te}=R,W=x.useRef(null),P=f(j,z),{setCollection:ne,registryRef:ue}=P,ge=x.useRef(te);c1(ge.current,te)||(ge.current=te);const F=ge.current,ae=x.useCallback(K=>{const Se=ue.current;K?Se.set(K,{...ge.current,element:K}):W.current&&Se.delete(W.current)},[ue]),ce=zt(T,ae,W);un(()=>{const K=W.current,Se=ue.current;K&&Se.has(K)&&Se.set(K,{...F,element:K})},[F,ue]);const xe=x.useRef(null);return x.useEffect(()=>{const K=W.current,Se=xe.current;((Se==null?void 0:Se.element)??null)===K&&(!K||(Se==null?void 0:Se.itemData)===F)||(xe.current=K?{element:K,itemData:F}:null,ne(J=>{const me=new eo(J);return Se&&Se.element!==K&&me.delete(Se.element),K&&me.set(K,{...F,element:K}),me.sort(oo)}))}),x.useEffect(()=>()=>{const K=xe.current;xe.current=null,K&&ne(Se=>{if(!Se.has(K.element))return Se;const J=new eo(Se);return J.delete(K.element),J})},[ne]),h.jsx(L,{[D]:"",ref:ce,children:Z})});Y.displayName=j;function G(){return x.useState(new eo)}ut(G,"useInitCollection");function k(R){const{collection:T}=v(i+"CollectionConsumer",R);return T}ut(k,"useCollection");function V(R){const{getCollection:T}=f(i+"CollectionConsumer",R);return T}return ut(V,"useGetCollection"),[{Provider:p,Slot:A,ItemSlot:Y},{createCollectionScope:o,useCollection:k,useGetCollection:V,useInitCollection:G}]}ut(PE,"createCollection");function c1(i,r){if(i===r)return!0;if(typeof i!="object"||typeof r!="object"||i==null||r==null)return!1;const c=Object.keys(i),o=Object.keys(r);if(c.length!==o.length)return!1;for(const s of c)if(!Object.prototype.hasOwnProperty.call(r,s)||i[s]!==r[s])return!1;return!0}ut(c1,"shallowEqual");function s1(i,r){return!!(r.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING)}ut(s1,"isElementPreceding");function f1(i){let r;for(const c of i.keys()){if(r){const o=r.compareDocumentPosition(c);if(!(o&Node.DOCUMENT_POSITION_DISCONNECTED)&&o&Node.DOCUMENT_POSITION_PRECEDING)return!1}r=c}return!0}ut(f1,"isInDocumentOrder");function oo(i,r){return!i[1].element||!r[1].element?0:s1(i[1].element,r[1].element)?-1:1}ut(oo,"sortByDocumentPosition");function d1(i){return new MutationObserver(c=>{for(const o of c)if(o.type==="childList"){i();return}})}ut(d1,"getChildListObserver");var $E=Object.defineProperty,WE=(i,r)=>$E(i,"name",{value:r,configurable:!0}),eC=sa[" useId ".trim().toString()]||(()=>{}),tC=0;function an(i){const[r,c]=x.useState(eC());return un(()=>{i||c(o=>o??String(tC++))},[i]),i||(r?`radix-${r}`:"")}WE(an,"useId");var m1=_y(),nC=Object.defineProperty,lC=(i,r)=>nC(i,"name",{value:r,configurable:!0}),aC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ke=aC.reduce((i,r)=>{const c=Ml(`Primitive.${r}`),o=x.forwardRef((s,f)=>{const{asChild:m,...v}=s,p=m?c:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(p,{...v,ref:f})});return o.displayName=`Primitive.${r}`,{...i,[r]:o}},{});function h1(i,r){i&&m1.flushSync(()=>i.dispatchEvent(r))}lC(h1,"dispatchDiscreteCustomEvent");var iC=Object.defineProperty,uC=(i,r)=>iC(i,"name",{value:r,configurable:!0}),k0=sa[" useInsertionEffect ".trim().toString()];function oa(i){const r=x.useRef(i);return typeof k0=="function"?k0(()=>{r.current=i}):un(()=>{r.current=i}),x.useMemo(()=>((...c)=>{var o;return(o=r.current)==null?void 0:o.call(r,...c)}),[])}uC(oa,"useCallbackRef");var rC=Object.defineProperty,oC=(i,r)=>rC(i,"name",{value:r,configurable:!0}),H0=sa[" useEffectEvent ".trim().toString()],L0=sa[" useInsertionEffect ".trim().toString()];function v1(i){if(typeof H0=="function")return H0(i);const r=x.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof L0=="function"?L0(()=>{r.current=i}):un(()=>{r.current=i}),x.useMemo(()=>((...c)=>{var o;return(o=r.current)==null?void 0:o.call(r,...c)}),[])}oC(v1,"useEffectEvent");var cC=Object.defineProperty,pu=(i,r)=>cC(i,"name",{value:r,configurable:!0}),sC=sa[" useInsertionEffect ".trim().toString()]||un;function bu({prop:i,defaultProp:r,onChange:c=pu(()=>{},"onChange"),caller:o}){const[s,f,m]=g1({defaultProp:r,onChange:c}),v=i!==void 0,p=v?i:s,b=x.useCallback(S=>{var y;if(v){const E=y1(S)?S(i):S;E!==i&&((y=m.current)==null||y.call(m,E))}else f(S)},[v,i,f,m]);return[p,b]}pu(bu,"useControllableState");function g1({defaultProp:i,onChange:r}){const[c,o]=x.useState(i),s=x.useRef(c),f=x.useRef(r);return sC(()=>{f.current=r},[r]),x.useEffect(()=>{var m;s.current!==c&&((m=f.current)==null||m.call(f,c),s.current=c)},[c,s]),[c,o,f]}pu(g1,"useUncontrolledState");function y1(i){return typeof i=="function"}pu(y1,"isFunction");var q0=Symbol("RADIX:SYNC_STATE");function fC(i,r,c,o){const{prop:s,defaultProp:f,onChange:m,caller:v}=r,p=s!==void 0,b=v1(m),S=[{...c,state:f}];o&&S.push(o);const[y,E]=x.useReducer((L,Y)=>{if(Y.type===q0)return{...L,state:Y.state};const G=i(L,Y);return p&&!Object.is(G.state,L.state)&&b(G.state),G},...S),A=y.state,j=x.useRef(A);x.useEffect(()=>{j.current!==A&&(j.current=A,p||b(A))},[A,j,p]);const D=x.useMemo(()=>s!==void 0?{...y,state:s}:y,[y,s]);return x.useEffect(()=>{p&&!Object.is(s,y.state)&&E({type:q0,state:s})},[s,y.state,p]),[D,E]}pu(fC,"useControllableStateReducer");var dC=Object.defineProperty,mC=(i,r)=>dC(i,"name",{value:r,configurable:!0}),hC={LTR:"ltr"},vC=x.createContext(void 0);function bd(i){const r=x.useContext(vC);return i||r||hC.LTR}mC(bd,"useDirection");var gC=Object.defineProperty,xd=(i,r)=>gC(i,"name",{value:r,configurable:!0}),hf=!1;function p1(){const[i,r]=x.useState(hf);return x.useEffect(()=>{hf||(hf=!0,r(!0))},[]),i}xd(p1,"useIsHydrated");var b1=sa[" useSyncExternalStore ".trim().toString()];function x1(){return()=>{}}xd(x1,"subscribe");function S1(){return b1(x1,()=>!0,()=>!1)}xd(S1,"useIsHydratedModern");var yC=typeof b1=="function"?S1:p1,pC=Object.defineProperty,ma=(i,r)=>pC(i,"name",{value:r,configurable:!0}),vf="rovingFocusGroup.onEntryFocus",bC={bubbles:!1,cancelable:!0},po="RovingFocusGroup",[$f,E1,xC]=r1(po),[SC,C1]=da(po,[xC]),G0={Vertical:"vertical",Horizontal:"horizontal"},EC={RTL:"rtl"},[CC,NC]=SC(po),wC=x.forwardRef(ma(function(r,c){return h.jsx($f.Provider,{scope:r.__scopeRovingFocusGroup,children:h.jsx($f.Slot,{scope:r.__scopeRovingFocusGroup,children:h.jsx(TC,{...r,ref:c})})})},"RovingFocusGroup")),TC=x.forwardRef(ma(function(r,c){const{__scopeRovingFocusGroup:o,orientation:s,loop:f=!1,dir:m,currentTabStopId:v,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:b,onEntryFocus:S,preventScrollOnEntryFocus:y=!1,...E}=r,A=x.useRef(null),j=zt(c,A),D=bd(m),[L,Y]=bu({prop:v,defaultProp:p??null,onChange:b,caller:po}),[G,k]=x.useState(!1),V=oa(S),I=E1(o),R=x.useRef(!1),[T,z]=x.useState(0);return x.useEffect(()=>{const Z=A.current;if(Z)return Z.addEventListener(vf,V),()=>Z.removeEventListener(vf,V)},[V]),h.jsx(CC,{scope:o,orientation:s,dir:D,loop:f,currentTabStopId:L,onItemFocus:x.useCallback(Z=>Y(Z),[Y]),onItemShiftTab:x.useCallback(()=>k(!0),[]),onFocusableItemAdd:x.useCallback(()=>z(Z=>Z+1),[]),onFocusableItemRemove:x.useCallback(()=>z(Z=>Z-1),[]),children:h.jsx(Ke.div,{tabIndex:G||T===0?-1:0,"data-orientation":s,...E,ref:j,style:{outline:"none",...r.style},onMouseDown:dt(r.onMouseDown,()=>{R.current=!0}),onFocus:dt(r.onFocus,Z=>{const te=!R.current;if(Z.target===Z.currentTarget&&te&&!G){const W=new CustomEvent(vf,bC);if(Z.currentTarget.dispatchEvent(W),!W.defaultPrevented){const P=I().filter(ae=>ae.focusable),ne=P.find(ae=>ae.active),ue=P.find(ae=>ae.id===L),F=[ne,ue,...P].filter(Boolean).map(ae=>ae.ref.current);Sd(F,y)}}R.current=!1}),onBlur:dt(r.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),_C="RovingFocusGroupItem",AC=x.forwardRef(ma(function(r,c){const{__scopeRovingFocusGroup:o,focusable:s=!0,active:f=!1,tabStopId:m,children:v,...p}=r,b=an(),S=m||b,y=NC(_C,o),E=y.currentTabStopId===S,A=E1(o),{onFocusableItemAdd:j,onFocusableItemRemove:D,currentTabStopId:L}=y,Y=yC();return un(()=>{if(!(!Y||!s))return j(),()=>D()},[Y,s,j,D]),x.useEffect(()=>{if(!(Y||!s))return j(),()=>D()},[Y,s,j,D]),h.jsx($f.ItemSlot,{scope:o,id:S,focusable:s,active:f,children:h.jsx(Ke.span,{tabIndex:E?0:-1,"data-orientation":y.orientation,...p,ref:c,onMouseDown:dt(r.onMouseDown,G=>{s?y.onItemFocus(S):G.preventDefault()}),onFocus:dt(r.onFocus,()=>y.onItemFocus(S)),onKeyDown:dt(r.onKeyDown,G=>{if(G.key==="Tab"&&G.shiftKey){y.onItemShiftTab();return}if(G.target!==G.currentTarget)return;const k=w1(G,y.orientation,y.dir);if(k!==void 0){if(G.metaKey||G.ctrlKey||G.altKey||G.shiftKey)return;G.preventDefault();let I=A().filter(R=>R.focusable).map(R=>R.ref.current);if(k==="last")I.reverse();else if(k==="prev"||k==="next"){k==="prev"&&I.reverse();const R=I.indexOf(G.currentTarget);I=y.loop?T1(I,R+1):I.slice(R+1)}setTimeout(()=>Sd(I))}}),children:typeof v=="function"?v({isCurrentTabStop:E,hasTabStop:L!=null}):v})})},"RovingFocusGroupItem")),RC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function N1(i,r){return r!==EC.RTL?i:i==="ArrowLeft"?"ArrowRight":i==="ArrowRight"?"ArrowLeft":i}ma(N1,"getDirectionAwareKey");function w1(i,r,c){const o=N1(i.key,c);if(!(r===G0.Vertical&&["ArrowLeft","ArrowRight"].includes(o))&&!(r===G0.Horizontal&&["ArrowUp","ArrowDown"].includes(o)))return RC[o]}ma(w1,"getFocusIntent");function Sd(i,r=!1){const c=document.activeElement;for(const o of i)if(o===c||(o.focus({preventScroll:r}),document.activeElement!==c))return}ma(Sd,"focusFirst");function T1(i,r){return i.map((c,o)=>i[(r+o)%i.length])}ma(T1,"wrapArray");var jC=Object.defineProperty,Fn=(i,r)=>jC(i,"name",{value:r,configurable:!0});function _1(i,r){return x.useReducer((c,o)=>r[c][o]??c,i)}Fn(_1,"useStateMachine");var bo=Fn(i=>{const{present:r,children:c}=i,o=A1(r),s=typeof c=="function"?c({present:o.isPresent}):x.Children.only(c),f=R1(o.ref,j1(s));return typeof c=="function"||o.isPresent?x.cloneElement(s,{ref:f}):null},"Presence");function A1(i){const[r,c]=x.useState(),o=x.useRef(null),s=x.useRef(i),f=x.useRef("none"),m=x.useRef(void 0),v=i?"mounted":"unmounted",[p,b]=_1(v,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{p==="mounted"?(f.current=m.current??fi(o.current),m.current=void 0):f.current="none"},[p]),un(()=>{const S=o.current,y=s.current;if(y!==i){const A=f.current,j=fi(S);i?(m.current=j,b("MOUNT")):j==="none"||(S==null?void 0:S.display)==="none"?b("UNMOUNT"):b(y&&A!==j?"ANIMATION_OUT":"UNMOUNT"),s.current=i}},[i,b]),un(()=>{if(r){let S;const y=r.ownerDocument.defaultView??window,E=Fn(j=>{const L=fi(o.current).includes(CSS.escape(j.animationName));if(j.target===r&&L&&(b("ANIMATION_END"),!s.current)){const Y=r.style.animationFillMode;r.style.animationFillMode="forwards",S=y.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=Y)})}},"handleAnimationEnd"),A=Fn(j=>{j.target===r&&(f.current=fi(o.current))},"handleAnimationStart");return r.addEventListener("animationstart",A),r.addEventListener("animationcancel",E),r.addEventListener("animationend",E),()=>{y.clearTimeout(S),r.removeEventListener("animationstart",A),r.removeEventListener("animationcancel",E),r.removeEventListener("animationend",E)}}else b("ANIMATION_END")},[r,b]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:x.useCallback(S=>{if(S){const y=getComputedStyle(S);o.current=y,m.current=fi(y)}else o.current=null;c(S)},[])}}Fn(A1,"usePresence");function Wf(i,r){if(typeof i=="function")return i(r);i!=null&&(i.current=r)}Fn(Wf,"setRef");function R1(...i){const r=x.useRef(i);return r.current=i,x.useCallback(c=>{const o=r.current;let s=!1;const f=o.map(m=>{const v=Wf(m,c);return!s&&typeof v=="function"&&(s=!0),v});if(s)return()=>{for(let m=0;mOC(i,"name",{value:r,configurable:!0}),O1={Automatic:"automatic",Manual:"manual"},Ed="Tabs",[MC,dN]=da(Ed,[C1]),M1=C1(),[zC,Cd]=MC(Ed),DC=x.forwardRef(gi(function(r,c){const{__scopeTabs:o,value:s,onValueChange:f,defaultValue:m,orientation:v="horizontal",dir:p,activationMode:b=O1.Automatic,...S}=r,y=bd(p),[E,A]=bu({prop:s,onChange:f,defaultProp:m??"",caller:Ed});return h.jsx(zC,{scope:o,baseId:an(),value:E,onValueChange:A,orientation:v,dir:y,activationMode:b,children:h.jsx(Ke.div,{dir:y,"data-orientation":v,...S,ref:c})})},"Tabs")),UC="TabsList",z1=x.forwardRef(gi(function(r,c){const{__scopeTabs:o,loop:s=!0,...f}=r,m=Cd(UC,o),v=M1(o);return h.jsx(wC,{asChild:!0,...v,orientation:m.orientation,dir:m.dir,loop:s,children:h.jsx(Ke.div,{role:"tablist","aria-orientation":m.orientation,...f,ref:c})})},"TabsList")),BC="TabsTrigger",D1=x.forwardRef(gi(function(r,c){const{__scopeTabs:o,value:s,disabled:f=!1,...m}=r,v=Cd(BC,o),p=M1(o),b=Nd(v.baseId,s),S=wd(v.baseId,s),y=s===v.value;return h.jsx(AC,{asChild:!0,...p,focusable:!f,active:y,children:h.jsx(Ke.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":S,"data-state":y?"active":"inactive","data-disabled":f?"":void 0,disabled:f,id:b,...m,ref:c,onMouseDown:dt(r.onMouseDown,E=>{!f&&E.button===0&&E.ctrlKey===!1?(E.currentTarget.focus(),v.onValueChange(s)):E.preventDefault()}),onKeyDown:dt(r.onKeyDown,E=>{f||E.target!==E.currentTarget||[" ","Enter"].includes(E.key)&&v.onValueChange(s)}),onFocus:dt(r.onFocus,()=>{const E=v.activationMode!==O1.Manual;!y&&!f&&E&&v.onValueChange(s)})})})},"TabsTrigger")),kC="TabsContent",U1=x.forwardRef(gi(function(r,c){const{__scopeTabs:o,value:s,forceMount:f,children:m,...v}=r,p=Cd(kC,o),b=Nd(p.baseId,s),S=wd(p.baseId,s),y=s===p.value,E=x.useRef(y);return x.useEffect(()=>{const A=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(A)},[]),h.jsx(bo,{present:f||y,children:({present:A})=>h.jsx(Ke.div,{"data-state":y?"active":"inactive","data-orientation":p.orientation,role:"tabpanel","aria-labelledby":b,hidden:!A,id:S,tabIndex:0,...v,ref:c,style:{...r.style,animationDuration:E.current?"0s":void 0},children:A&&m})})},"TabsContent"));function Nd(i,r){return`${i}-trigger-${r}`}gi(Nd,"makeTriggerId");function wd(i,r){return`${i}-content-${r}`}gi(wd,"makeContentId");const ed=DC,ho=x.forwardRef(({className:i,...r},c)=>h.jsx(z1,{ref:c,className:Qe("inline-flex items-center justify-center rounded-lg hl-muted p-1 border hl-border text-[var(--text-muted)]",i),...r}));ho.displayName=z1.displayName;const ua=x.forwardRef(({className:i,...r},c)=>h.jsx(D1,{ref:c,className:Qe("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2.5 py-1 text-xs font-medium transition-all cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-[var(--bg-card)] data-[state=active]:text-[var(--text-main)] data-[state=active]:shadow-xs",i),...r}));ua.displayName=D1.displayName;const HC=x.forwardRef(({className:i,...r},c)=>h.jsx(U1,{ref:c,className:Qe("mt-2 outline-none",i),...r}));HC.displayName=U1.displayName;const LC=[{id:"auto",label:"智能路由"},{id:"edge443",label:"443 免端口"},{id:"home10443",label:"10443 家宽"},{id:"lan",label:"LAN 局域网"}],qC=()=>{const{theme:i,resolvedTheme:r,routeMode:c,viewMode:o,telemetry:s,setTheme:f,toggleTheme:m,setRouteMode:v,setViewMode:p,setShowAgyModal:b,setShowWechatModal:S,setShowCmdPalette:y}=Pn();return h.jsxs(h.Fragment,{children:[h.jsx("header",{className:"border-b hl-border sticky top-0 z-30 backdrop-blur-md",style:{backgroundColor:"color-mix(in srgb, var(--bg-card) 88%, transparent)"},children:h.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-14 flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[h.jsxs("div",{onClick:()=>p("dashboard"),className:"flex items-center gap-2.5 cursor-pointer",children:[h.jsx("img",{src:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/apple.png",alt:"Mac mini",className:"w-6 h-6 rounded"}),h.jsx("span",{className:"font-semibold text-sm tracking-tight",children:"HomeLab"}),h.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--success)"},title:"全屋 4 节点在线"})]}),h.jsx("div",{className:"h-4 w-[1px] hl-muted"}),h.jsx(ed,{value:o,onValueChange:E=>p(E),children:h.jsxs(ho,{children:[h.jsxs(ua,{value:"dashboard",children:[h.jsx(g2,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"中控台"})]}),h.jsxs(ua,{value:"storybook",children:[h.jsx(Oy,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"Storybook 设计规范"})]})]})})]}),h.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 ml-auto",children:[h.jsxs(nt,{variant:"outline",onClick:()=>y(!0),className:"gap-3",title:"按 Cmd+K 唤起全局命令面板",children:[h.jsxs("span",{className:"flex items-center gap-1.5",style:{color:"var(--text-muted)"},children:[h.jsx(dd,{className:"w-3.5 h-3.5"}),h.jsx("span",{className:"hidden sm:inline",children:"搜索服务或指令..."})]}),h.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-muted",style:{color:"var(--text-muted)"},children:"⌘K"})]}),h.jsxs(nt,{variant:"outline",onClick:()=>S(!0),title:"连接微信 ClawBot,在微信内直接收发消息与控制 Mac mini",children:[h.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:s.services.clawbot?"var(--success)":"var(--accent)"}}),h.jsx(My,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"微信 ClawBot"})]}),h.jsxs(nt,{onClick:()=>b(!0),children:[h.jsx(md,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"AGY 终端"})]}),h.jsxs("div",{className:"flex items-center p-0.5 rounded-lg hl-muted border hl-border text-xs",children:[h.jsx("button",{onClick:m,className:"px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 cursor-pointer",style:{backgroundColor:"var(--bg-card)",color:"var(--text-main)",boxShadow:"0 1px 2px rgba(0,0,0,0.08)"},title:"点击切换深色 / 浅色主题(默认跟随系统)",children:r==="dark"?h.jsxs(h.Fragment,{children:[h.jsx(S2,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"深色"})]}):h.jsxs(h.Fragment,{children:[h.jsx(q2,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"浅色"})]})}),i!=="system"&&h.jsx("button",{onClick:()=>f("system"),className:"px-2 py-1 rounded-md text-[11px] transition-all cursor-pointer",style:{color:"var(--text-muted)"},title:"恢复跟随设备系统深浅色自动切换",children:"自动"})]})]})]})}),o==="dashboard"&&h.jsx("div",{className:"border-b hl-border",style:{backgroundColor:"var(--bg-card)"},children:h.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-2.5 flex flex-wrap items-center justify-between gap-3",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs font-mono-num",children:[h.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[h.jsx("span",{style:{color:"var(--text-muted)"},children:"M6 CPU"}),h.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:h.jsx("div",{className:"h-full hl-bar-fill",style:{width:`${Math.max(5,s.mini.cpu_pct)}%`}})}),h.jsxs("span",{className:"font-medium",children:[s.mini.cpu_pct,"%"]})]}),h.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[h.jsx("span",{style:{color:"var(--text-muted)"},children:"RAM"}),h.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:h.jsx("div",{className:"h-full hl-bar-fill",style:{width:`${Math.max(5,s.mini.mem_pct)}%`}})}),h.jsxs("span",{className:"font-medium",children:[s.mini.mem_used_gb,"G"]})]}),h.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[h.jsx("span",{style:{color:"var(--text-muted)"},children:"NAS 余量"}),h.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:h.jsx("div",{className:"h-full hl-bar-fill-green",style:{width:`${Math.max(5,s.nas.pct)}%`}})}),h.jsxs("span",{className:"font-medium",style:{color:"var(--success)"},children:[s.nas.free_tb," TB"]})]}),h.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-1.5",children:[h.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:"var(--success)"}}),h.jsx("span",{style:{color:"var(--text-muted)"},children:"SG 专线"}),h.jsx("span",{className:"font-medium",children:s.network.sg_delay_ms>0?`${s.network.sg_delay_ms}ms`:"直连"})]})]}),h.jsx(ed,{value:c,onValueChange:E=>v(E),className:"ml-auto",children:h.jsx(ho,{children:LC.map(E=>h.jsx(ua,{value:E.id,children:E.label},E.id))})})]})})]})},B1=({card:i})=>{const{getEffectiveMode:r,setShowAgyModal:c,triggerAction:o}=Pn(),s=r(),f=s==="lan"?i.lanUrl:s==="home10443"?i.homeUrl:i.edgeUrl,m=s==="lan"?"LAN 直连":s==="home10443"?"10443":"443 免端口";return h.jsxs("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"hl-card hl-card-interactive flex flex-col justify-between overflow-hidden group cursor-pointer",children:[h.jsxs("div",{className:"p-4 sm:p-5 space-y-3",children:[h.jsxs("div",{className:"flex items-start justify-between gap-3",children:[h.jsxs("div",{className:"flex items-center gap-3.5 min-w-0",children:[h.jsx("div",{className:"w-10 h-10 rounded-xl hl-muted border hl-border p-1.5 flex items-center justify-center shrink-0",children:h.jsx("img",{src:i.iconUrl,alt:i.title,className:"w-full h-full object-contain"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h3",{className:"text-sm font-semibold truncate group-hover:underline",children:i.title}),h.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:i.online!==!1?"var(--success)":"#ef4444"}})]}),h.jsx("p",{className:"text-[11px] font-mono-num truncate mt-0.5",style:{color:"var(--text-muted)"},children:i.subtitle})]})]}),i.actionType==="drawer"?h.jsx("button",{onClick:v=>{v.preventDefault(),c(!0)},className:"px-2 py-1 rounded-md text-[11px] font-medium shrink-0 transition-opacity hover:opacity-80 cursor-pointer",style:{backgroundColor:"var(--accent-soft)",color:"var(--accent)"},children:"页内终端"}):i.actionType==="backup"?h.jsx("button",{onClick:v=>{v.preventDefault(),o("backup_nas","正在打包备份至极空间 Z4...")},className:"px-2 py-1 rounded-md text-[11px] font-medium shrink-0 transition-opacity hover:opacity-80 cursor-pointer",style:{backgroundColor:"var(--success-soft)",color:"var(--success)"},children:"立即备份"}):h.jsx("span",{className:"text-xs font-mono-num px-2 py-0.5 rounded hl-muted shrink-0",style:{color:"var(--text-muted)"},children:m})]}),h.jsx("p",{className:"text-xs leading-relaxed line-clamp-2",style:{color:"var(--text-muted)"},children:i.desc})]}),h.jsx("div",{className:"hl-widget-footer grid grid-cols-3 divide-x hl-border text-center",children:i.stats.map((v,p)=>h.jsxs("div",{className:"py-2.5 px-2 flex flex-col items-center justify-center",children:[h.jsx("span",{className:"text-[10px] uppercase tracking-wider truncate max-w-full",style:{color:"var(--text-subtle)"},children:v.label}),h.jsx("span",{className:"text-xs font-semibold font-mono-num mt-0.5 truncate max-w-full",style:{color:v.highlight?"var(--success)":"var(--text-main)"},children:v.value})]},p))})]})},GC=[{label:"SSH 连接 Mac mini",cmd:"ssh mini"},{label:"终端接力 AGY 会话",cmd:'ssh mini -t "tmux attach -t agy"'},{label:"SSH 连接新加坡 Azure",cmd:"ssh azure"},{label:"SSH 连接小米主路由",cmd:"ssh root@192.168.31.1"}],k1=()=>{const{copyCmd:i,triggerAction:r}=Pn();return h.jsxs("section",{className:"space-y-3 pt-1",children:[h.jsxs("div",{className:"flex items-center justify-between px-0.5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"终端快捷指令与备用直连书签"}),h.jsx("span",{className:"text-[11px] font-mono-num",style:{color:"var(--text-subtle)"},children:"· 点击指令即复制"})]}),h.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[h.jsx("button",{onClick:()=>r("refresh_ddns","正在同步 Cloudflare DDNS..."),className:"hover:underline font-medium cursor-pointer",style:{color:"var(--accent)"},children:"刷新 DDNS 解析"}),h.jsx("button",{onClick:()=>r("mount_nas","正在巡检极空间 20TB SMB 挂载..."),className:"hover:underline font-medium cursor-pointer",style:{color:"var(--accent)"},children:"巡检极空间挂载"})]})]}),h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:GC.map(c=>h.jsxs("button",{onClick:()=>i(c.cmd,c.label),className:"hl-card hl-card-interactive px-4 py-3 text-left flex items-center justify-between gap-2 cursor-pointer",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-xs font-semibold",children:c.label}),h.jsx("div",{className:"text-[11px] font-mono-num truncate mt-0.5",style:{color:"var(--accent)"},children:c.cmd})]}),h.jsx("span",{className:"text-[10px] font-mono-num px-1.5 py-0.5 rounded hl-muted shrink-0",style:{color:"var(--text-muted)"},children:"COPY"})]},c.cmd))})]})},YC=Yy("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-mono-num font-medium transition-colors shrink-0",{variants:{variant:{default:"bg-[var(--primary)] text-[var(--primary-fg)]",secondary:"hl-muted text-[var(--text-muted)] border hl-border",outline:"border hl-border text-[var(--text-muted)] bg-[var(--bg-card)]",accent:"bg-[var(--accent-soft)] text-[var(--accent)] font-semibold",success:"bg-[var(--success-soft)] text-[var(--success)] font-semibold"}},defaultVariants:{variant:"secondary"}});function Jn({className:i,variant:r,...c}){return h.jsx("div",{className:Qe(YC({variant:r}),i),...c})}var Y0=1,VC=.9,QC=.8,XC=.17,gf=.1,yf=.999,ZC=.9999,KC=.99,IC=/[\\\/_+.#"@\[\(\{&]/,JC=/[\\\/_+.#"@\[\(\{&]/g,FC=/[\s-]/,H1=/[\s-]/g;function td(i,r,c,o,s,f,m){if(f===r.length)return s===i.length?Y0:KC;var v=`${s},${f}`;if(m[v]!==void 0)return m[v];for(var p=o.charAt(f),b=c.indexOf(p,s),S=0,y,E,A,j;b>=0;)y=td(i,r,c,o,b+1,f+1,m),y>S&&(b===s?y*=Y0:IC.test(i.charAt(b-1))?(y*=QC,A=i.slice(s,b-1).match(JC),A&&s>0&&(y*=Math.pow(yf,A.length))):FC.test(i.charAt(b-1))?(y*=VC,j=i.slice(s,b-1).match(H1),j&&s>0&&(y*=Math.pow(yf,j.length))):(y*=XC,s>0&&(y*=Math.pow(yf,b-s))),i.charAt(b)!==r.charAt(f)&&(y*=ZC)),(yy&&(y=E*gf)),y>S&&(S=y),b=c.indexOf(p,b+1);return m[v]=S,S}function V0(i){return i.toLowerCase().replace(H1," ")}function PC(i,r,c){return i=c&&c.length>0?`${i+" "+c.join(" ")}`:i,td(i,r,V0(i),V0(r),0,0,{})}var $C=Object.defineProperty,ft=(i,r)=>$C(i,"name",{value:r,configurable:!0}),nd="dismissableLayer.update",WC="dismissableLayer.pointerDownOutside",e4="dismissableLayer.focusOutside",Q0,L1=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),t4=x.forwardRef(ft(function(r,c){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:v,onInteractOutside:p,onDismiss:b,...S}=r,y=x.useContext(L1),[E,A]=x.useState(null),j=(E==null?void 0:E.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,D]=x.useState({}),L=zt(c,A),Y=Array.from(y.layers),[G]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),k=G?Y.indexOf(G):-1,V=E?Y.indexOf(E):-1,I=y.layersWithOutsidePointerEventsDisabled.size>0,R=V>=k,T=x.useRef(!1),z=G1(P=>{m==null||m(P),p==null||p(P),P.defaultPrevented||b==null||b()},{ownerDocument:j,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:y.dismissableSurfaces,shouldHandlePointerDownOutside:x.useCallback(P=>{if(!(P instanceof Node))return!1;const ne=[...y.branches].some(ue=>ue.contains(P));return R&&!ne},[y.branches,R])}),Z=Y1(P=>{if(s&&T.current)return;const ne=P.target;[...y.branches].some(ge=>ge.contains(ne))||(v==null||v(P),p==null||p(P),P.defaultPrevented||b==null||b())},j),te=E?V===Y.length-1:!1,W=oa(P=>{P.key==="Escape"&&(f==null||f(P),!P.defaultPrevented&&b&&(P.preventDefault(),b()))});return x.useEffect(()=>{if(te)return j.addEventListener("keydown",W,{capture:!0}),()=>j.removeEventListener("keydown",W,{capture:!0})},[j,te,W]),x.useEffect(()=>{if(E)return o&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(Q0=j.body.style.pointerEvents,j.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(E)),y.layers.add(E),ld(),()=>{o&&(y.layersWithOutsidePointerEventsDisabled.delete(E),y.layersWithOutsidePointerEventsDisabled.size===0&&(j.body.style.pointerEvents=Q0))}},[E,j,o,y]),x.useEffect(()=>()=>{E&&(y.layers.delete(E),y.layersWithOutsidePointerEventsDisabled.delete(E),ld())},[E,y]),x.useEffect(()=>{const P=ft(()=>D({}),"handleUpdate");return document.addEventListener(nd,P),()=>document.removeEventListener(nd,P)},[]),h.jsx(Ke.div,{...S,ref:L,style:{pointerEvents:I?R?"auto":"none":void 0,...r.style},onFocusCapture:dt(r.onFocusCapture,Z.onFocusCapture),onBlurCapture:dt(r.onBlurCapture,Z.onBlurCapture),onPointerDownCapture:dt(r.onPointerDownCapture,z.onPointerDownCapture)})},"DismissableLayer"));function q1(){const i=x.useContext(L1),[r,c]=x.useState(null);return x.useEffect(()=>{if(r)return i.dismissableSurfaces.add(r),()=>{i.dismissableSurfaces.delete(r)}},[r,i.dismissableSurfaces]),c}ft(q1,"useDismissableLayerSurface");var n4=ft(()=>!0,"IS_TRUE");function G1(i,r){const{ownerDocument:c=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:f,shouldHandlePointerDownOutside:m=n4}=r,v=oa(i),p=x.useRef(!1),b=x.useRef(!1),S=x.useRef(new Map),y=x.useRef(()=>{});return x.useEffect(()=>{function E(){b.current=!1,s.current=!1,S.current.clear()}ft(E,"resetOutsideInteraction");function A(){return Array.from(S.current.values()).some(Boolean)}ft(A,"isOutsideInteractionIntercepted");function j(k){if(!b.current)return;const V=k.target;V instanceof Node&&[...f].some(R=>R.contains(V))||S.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{b.current&&y.current()},0)}ft(j,"handleInteractionCapture");function D(k){b.current&&S.current.set(k.type,!1)}ft(D,"handleInteractionBubble");const L=ft(k=>{if(k.target&&!p.current){let V=function(){c.removeEventListener("click",y.current);const R=A();E(),R||Td(WC,v,I,{discrete:!0})};if(ft(V,"handleAndDispatchPointerDownOutsideEvent"),!m(k.target)){c.removeEventListener("click",y.current),E(),p.current=!1;return}const I={originalEvent:k};b.current=!0,s.current=o&&k.button===0,S.current.clear(),!o||k.button!==0?V():(c.removeEventListener("click",y.current),y.current=V,c.addEventListener("click",y.current,{once:!0}))}else c.removeEventListener("click",y.current),E();p.current=!1},"handlePointerDown"),Y=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of Y)c.addEventListener(k,j,!0),c.addEventListener(k,D);const G=window.setTimeout(()=>{c.addEventListener("pointerdown",L)},0);return()=>{window.clearTimeout(G),c.removeEventListener("pointerdown",L),c.removeEventListener("click",y.current);for(const k of Y)c.removeEventListener(k,j,!0),c.removeEventListener(k,D)}},[c,v,o,s,f,m]),{onPointerDownCapture:ft(()=>p.current=!0,"onPointerDownCapture")}}ft(G1,"usePointerDownOutside");function Y1(i,r=globalThis==null?void 0:globalThis.document){const c=oa(i),o=x.useRef(!1);return x.useEffect(()=>{const s=ft(f=>{f.target&&!o.current&&Td(e4,c,{originalEvent:f},{discrete:!1})},"handleFocus");return r.addEventListener("focusin",s),()=>r.removeEventListener("focusin",s)},[r,c]),{onFocusCapture:ft(()=>o.current=!0,"onFocusCapture"),onBlurCapture:ft(()=>o.current=!1,"onBlurCapture")}}ft(Y1,"useFocusOutside");function ld(){const i=new CustomEvent(nd);document.dispatchEvent(i)}ft(ld,"dispatchUpdate");function Td(i,r,c,{discrete:o}){const s=c.originalEvent.target,f=new CustomEvent(i,{bubbles:!1,cancelable:!0,detail:c});r&&s.addEventListener(i,r,{once:!0}),o?h1(s,f):s.dispatchEvent(f)}ft(Td,"handleAndDispatchCustomEvent");var l4=Object.defineProperty,lt=(i,r)=>l4(i,"name",{value:r,configurable:!0}),pf="focusScope.autoFocusOnMount",bf="focusScope.autoFocusOnUnmount",X0={bubbles:!1,cancelable:!0},a4=x.forwardRef(lt(function(r,c){const{loop:o=!1,trapped:s=!1,branches:f,onMountAutoFocus:m,onUnmountAutoFocus:v,...p}=r,[b,S]=x.useState(null),y=oa(m),E=oa(v),A=x.useRef(null),j=zt(c,S),D=x.useRef(f);x.useEffect(()=>{D.current=f});const L=x.useCallback(k=>{var V;return k?b!=null&&b.contains(k)?!0:!!((V=D.current)!=null&&V.some(I=>I.contains(k))):!1},[b]),Y=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(s){let k=function(T){if(Y.paused||!b)return;const z=T.target;L(z)?A.current=z:In(A.current,{select:!0})},V=function(T){if(Y.paused||!b)return;const z=T.relatedTarget;z!==null&&(L(z)||In(A.current,{select:!0}))},I=function(T){if(document.activeElement===document.body)for(const Z of T)Z.removedNodes.length>0&&In(b)};lt(k,"handleFocusIn"),lt(V,"handleFocusOut"),lt(I,"handleMutations"),document.addEventListener("focusin",k),document.addEventListener("focusout",V);const R=new MutationObserver(I);return b&&R.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",V),R.disconnect()}}},[s,b,Y.paused,L]),x.useEffect(()=>{if(b){Z0.add(Y);const k=document.activeElement;if(!b.contains(k)){const I=new CustomEvent(pf,X0);b.addEventListener(pf,y),b.dispatchEvent(I),I.defaultPrevented||(Z1(P1(_d(b)),{select:!0}),document.activeElement===k&&In(b))}return()=>{b.removeEventListener(pf,y);const I=b.ownerDocument,R=CustomEvent;setTimeout(()=>{const T=new R(bf,X0);b.addEventListener(bf,E),b.dispatchEvent(T),T.defaultPrevented||In(k??I.body,{select:!0}),b.removeEventListener(bf,E),Z0.remove(Y)},0)}}},[b,y,E,Y]);const G=x.useCallback(k=>{if(!o&&!s||Y.paused)return;const V=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,I=document.activeElement;if(V&&I){const R=k.currentTarget,[T,z]=K1(R);T&&z?!k.shiftKey&&I===z?(k.preventDefault(),o&&In(T,{select:!0})):k.shiftKey&&I===T&&(k.preventDefault(),o&&In(z,{select:!0})):I===R&&k.preventDefault()}},[o,s,Y.paused]);return h.jsx(Ke.div,{tabIndex:-1,...p,ref:j,onKeyDown:G})},"FocusScope")),V1=x.createContext(null);function Q1({registry:i,children:r}){return i?h.jsx(V1.Provider,{value:i,children:r}):r}lt(Q1,"FocusScopeBranchProvider");function X1(){const[i,r]=x.useState([]),c=x.useMemo(()=>({add:lt(o=>r(s=>s.includes(o)?s:[...s,o]),"add"),remove:lt(o=>r(s=>s.filter(f=>f!==o)),"remove")}),[]);return{nodes:i,registry:c}}lt(X1,"useFocusScopeBranchRegistry");function i4(i){const r=x.useContext(V1);x.useEffect(()=>{if(!(!i||!r))return r.add(i),()=>r.remove(i)},[i,r])}lt(i4,"useFocusScopeBranch");function Z1(i,{select:r=!1}={}){const c=document.activeElement;for(const o of i)if(In(o,{select:r}),document.activeElement!==c)return}lt(Z1,"focusFirst");function K1(i){const r=_d(i),c=ad(r,i),o=ad(r.reverse(),i);return[c,o]}lt(K1,"getTabbableEdges");function _d(i){const r=[],o=i.ownerDocument.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:lt(s=>{const f=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||f?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)r.push(o.currentNode);return r}lt(_d,"getTabbableCandidates");function ad(i,r){const c=typeof r.checkVisibility=="function"&&r.checkVisibility({checkVisibilityCSS:!0});for(const o of i)if(!(c?!o.checkVisibility({checkVisibilityCSS:!0}):I1(o,{upTo:r})))return o}lt(ad,"findVisible");function I1(i,{upTo:r}){if(getComputedStyle(i).visibility==="hidden")return!0;for(;i;){if(r!==void 0&&i===r)return!1;if(getComputedStyle(i).display==="none")return!0;i=i.parentElement}return!1}lt(I1,"isHidden");function J1(i){return i.tagName==="INPUT"&&typeof i.select=="function"}lt(J1,"isSelectableInput");function In(i,{select:r=!1}={}){if(i&&i.focus){const o=(i.ownerDocument??document).activeElement;i.focus({preventScroll:!0}),i!==o&&J1(i)&&r&&i.select()}}lt(In,"focus");var Z0=F1();function F1(){let i=[];return{add(r){const c=i[0];r!==c&&(c==null||c.pause()),i=id(i,r),i.unshift(r)},remove(r){var c;i=id(i,r),(c=i[0])==null||c.resume()}}}lt(F1,"createFocusScopesStack");function id(i,r){const c=[...i],o=c.indexOf(r);return o!==-1&&c.splice(o,1),c}lt(id,"arrayRemove");function P1(i){return i.filter(r=>r.tagName!=="A")}lt(P1,"removeLinks");var u4=Object.defineProperty,r4=(i,r)=>u4(i,"name",{value:r,configurable:!0}),o4=x.forwardRef(r4(function(r,c){var p;const{container:o,...s}=r,[f,m]=x.useState(!1);un(()=>m(!0),[]);const v=o||f&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return v?m1.createPortal(h.jsx(Ke.div,{...s,ref:c}),v):null},"Portal")),c4=Object.defineProperty,Ad=(i,r)=>c4(i,"name",{value:r,configurable:!0}),to=0,Rn=null;function s4(i){return Rd(),i.children}Ad(s4,"FocusGuards");function Rd(){x.useEffect(()=>{Rn||(Rn={start:ud(),end:ud()});const{start:i,end:r}=Rn;return document.body.firstElementChild!==i&&document.body.insertAdjacentElement("afterbegin",i),document.body.lastElementChild!==r&&document.body.insertAdjacentElement("beforeend",r),to++,()=>{to===1&&(Rn==null||Rn.start.remove(),Rn==null||Rn.end.remove(),Rn=null),to=Math.max(0,to-1)}},[])}Ad(Rd,"useFocusGuards");function ud(){const i=document.createElement("span");return i.setAttribute("data-radix-focus-guard",""),i.tabIndex=0,i.style.outline="none",i.style.opacity="0",i.style.position="fixed",i.style.pointerEvents="none",i}Ad(ud,"createFocusGuard");var On=function(){return On=Object.assign||function(r){for(var c,o=1,s=arguments.length;o"u")return _4;var r=A4(i),c=document.documentElement.clientWidth,o=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,o-c+r[2]-r[0])}},j4=tp(),hi="data-scroll-locked",O4=function(i,r,c,o){var s=i.left,f=i.top,m=i.right,v=i.gap;return c===void 0&&(c="margin"),` + .`.concat(d4,` { + overflow: hidden `).concat(o,`; + padding-right: `).concat(v,"px ").concat(o,`; + } + body[`).concat(hi,`] { + overflow: hidden `).concat(o,`; + overscroll-behavior: contain; + `).concat([r&&"position: relative ".concat(o,";"),c==="margin"&&` + padding-left: `.concat(s,`px; + padding-top: `).concat(f,`px; + padding-right: `).concat(m,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(v,"px ").concat(o,`; + `),c==="padding"&&"padding-right: ".concat(v,"px ").concat(o,";")].filter(Boolean).join(""),` + } + + .`).concat(co,` { + right: `).concat(v,"px ").concat(o,`; + } + + .`).concat(so,` { + margin-right: `).concat(v,"px ").concat(o,`; + } + + .`).concat(co," .").concat(co,` { + right: 0 `).concat(o,`; + } + + .`).concat(so," .").concat(so,` { + margin-right: 0 `).concat(o,`; + } + + body[`).concat(hi,`] { + `).concat(m4,": ").concat(v,`px; + } +`)},I0=function(){var i=parseInt(document.body.getAttribute(hi)||"0",10);return isFinite(i)?i:0},M4=function(){x.useEffect(function(){return document.body.setAttribute(hi,(I0()+1).toString()),function(){var i=I0()-1;i<=0?document.body.removeAttribute(hi):document.body.setAttribute(hi,i.toString())}},[])},z4=function(i){var r=i.noRelative,c=i.noImportant,o=i.gapMode,s=o===void 0?"margin":o;M4();var f=x.useMemo(function(){return R4(s)},[s]);return x.createElement(j4,{styles:O4(f,!r,s,c?"":"!important")})},rd=!1;if(typeof window<"u")try{var no=Object.defineProperty({},"passive",{get:function(){return rd=!0,!0}});window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{rd=!1}var ri=rd?{passive:!1}:!1,D4=function(i){return i.tagName==="TEXTAREA"},np=function(i,r){if(!(i instanceof Element))return!1;var c=window.getComputedStyle(i);return c[r]!=="hidden"&&!(c.overflowY===c.overflowX&&!D4(i)&&c[r]==="visible")},U4=function(i){return np(i,"overflowY")},B4=function(i){return np(i,"overflowX")},J0=function(i,r){var c=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var s=lp(i,o);if(s){var f=ap(i,o),m=f[1],v=f[2];if(m>v)return!0}o=o.parentNode}while(o&&o!==c.body);return!1},k4=function(i){var r=i.scrollTop,c=i.scrollHeight,o=i.clientHeight;return[r,c,o]},H4=function(i){var r=i.scrollLeft,c=i.scrollWidth,o=i.clientWidth;return[r,c,o]},lp=function(i,r){return i==="v"?U4(r):B4(r)},ap=function(i,r){return i==="v"?k4(r):H4(r)},L4=function(i,r){return i==="h"&&r==="rtl"?-1:1},q4=function(i,r,c,o,s){var f=L4(i,window.getComputedStyle(r).direction),m=f*o,v=c.target,p=r.contains(v),b=!1,S=m>0,y=0,E=0;do{if(!v)break;var A=ap(i,v),j=A[0],D=A[1],L=A[2],Y=D-L-f*j;(j||Y)&&lp(i,v)&&(y+=Y,E+=j);var G=v.parentNode;v=G&&G.nodeType===Node.DOCUMENT_FRAGMENT_NODE?G.host:G}while(!p&&v!==document.body||p&&(r.contains(v)||r===v));return(S&&Math.abs(y)<1||!S&&Math.abs(E)<1)&&(b=!0),b},lo=function(i){return"changedTouches"in i?[i.changedTouches[0].clientX,i.changedTouches[0].clientY]:[0,0]},F0=function(i){return[i.deltaX,i.deltaY]},P0=function(i){return i&&"current"in i?i.current:i},G4=function(i,r){return i[0]===r[0]&&i[1]===r[1]},Y4=function(i){return` + .block-interactivity-`.concat(i,` {pointer-events: none;} + .allow-interactivity-`).concat(i,` {pointer-events: all;} +`)},V4=0,oi=[];function Q4(i){var r=x.useRef([]),c=x.useRef([0,0]),o=x.useRef(),s=x.useState(V4++)[0],f=x.useState(tp)[0],m=x.useRef(i);x.useEffect(function(){m.current=i},[i]),x.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(s));var D=f4([i.lockRef.current],(i.shards||[]).map(P0),!0).filter(Boolean);return D.forEach(function(L){return L.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),D.forEach(function(L){return L.classList.remove("allow-interactivity-".concat(s))})}}},[i.inert,i.lockRef.current,i.shards]);var v=x.useCallback(function(D,L){if("touches"in D&&D.touches.length===2||D.type==="wheel"&&D.ctrlKey)return!m.current.allowPinchZoom;var Y=lo(D),G=c.current,k="deltaX"in D?D.deltaX:G[0]-Y[0],V="deltaY"in D?D.deltaY:G[1]-Y[1],I,R=D.target,T=Math.abs(k)>Math.abs(V)?"h":"v";if("touches"in D&&T==="h"&&R.type==="range")return!1;var z=window.getSelection(),Z=z&&z.anchorNode,te=Z?Z===R||Z.contains(R):!1;if(te)return!1;var W=J0(T,R);if(!W)return!0;if(W?I=T:(I=T==="v"?"h":"v",W=J0(T,R)),!W)return!1;if(!o.current&&"changedTouches"in D&&(k||V)&&(o.current=I),!I)return!0;var P=o.current||I;return q4(P,L,D,P==="h"?k:V)},[]),p=x.useCallback(function(D){var L=D;if(!(!oi.length||oi[oi.length-1]!==f)){var Y="deltaY"in L?F0(L):lo(L),G=r.current.filter(function(I){return I.name===L.type&&(I.target===L.target||L.target===I.shadowParent)&&G4(I.delta,Y)})[0];if(G&&G.should){L.cancelable&&L.preventDefault();return}if(!G){var k=(m.current.shards||[]).map(P0).filter(Boolean).filter(function(I){return I.contains(L.target)}),V=k.length>0?v(L,k[0]):!m.current.noIsolation;V&&L.cancelable&&L.preventDefault()}}},[]),b=x.useCallback(function(D,L,Y,G){var k={name:D,delta:L,target:Y,should:G,shadowParent:X4(Y)};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(V){return V!==k})},1)},[]),S=x.useCallback(function(D){c.current=lo(D),o.current=void 0},[]),y=x.useCallback(function(D){b(D.type,F0(D),D.target,v(D,i.lockRef.current))},[]),E=x.useCallback(function(D){b(D.type,lo(D),D.target,v(D,i.lockRef.current))},[]);x.useEffect(function(){return oi.push(f),i.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:E}),document.addEventListener("wheel",p,ri),document.addEventListener("touchmove",p,ri),document.addEventListener("touchstart",S,ri),function(){oi=oi.filter(function(D){return D!==f}),document.removeEventListener("wheel",p,ri),document.removeEventListener("touchmove",p,ri),document.removeEventListener("touchstart",S,ri)}},[]);var A=i.removeScrollBar,j=i.inert;return x.createElement(x.Fragment,null,j?x.createElement(f,{styles:Y4(s)}):null,A?x.createElement(z4,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function X4(i){for(var r=null;i!==null;)i instanceof ShadowRoot&&(r=i.host,i=i.host),i=i.parentNode;return r}const Z4=x4(ep,Q4);var ip=x.forwardRef(function(i,r){return x.createElement(xo,On({},i,{ref:r,sideCar:Z4}))});ip.classNames=xo.classNames;var K4=function(i){if(typeof document>"u")return null;var r=Array.isArray(i)?i[0]:i;return r.ownerDocument.body},ci=new WeakMap,ao=new WeakMap,io={},Cf=0,up=function(i){return i&&(i.host||up(i.parentNode))},I4=function(i,r){return r.map(function(c){if(i.contains(c))return c;var o=up(c);return o&&i.contains(o)?o:(console.error("aria-hidden",c,"in not contained inside",i,". Doing nothing"),null)}).filter(function(c){return!!c})},J4=function(i,r,c,o){var s=I4(r,Array.isArray(i)?i:[i]);io[c]||(io[c]=new WeakMap);var f=io[c],m=[],v=new Set,p=new Set(s),b=function(y){!y||v.has(y)||(v.add(y),b(y.parentNode))};s.forEach(b);var S=function(y){!y||p.has(y)||Array.prototype.forEach.call(y.children,function(E){if(v.has(E))S(E);else try{var A=E.getAttribute(o),j=A!==null&&A!=="false",D=(ci.get(E)||0)+1,L=(f.get(E)||0)+1;ci.set(E,D),f.set(E,L),m.push(E),D===1&&j&&ao.set(E,!0),L===1&&E.setAttribute(c,"true"),j||E.setAttribute(o,"true")}catch(Y){console.error("aria-hidden: cannot operate on ",E,Y)}})};return S(r),v.clear(),Cf++,function(){m.forEach(function(y){var E=ci.get(y)-1,A=f.get(y)-1;ci.set(y,E),f.set(y,A),E||(ao.has(y)||y.removeAttribute(o),ao.delete(y)),A||y.removeAttribute(c)}),Cf--,Cf||(ci=new WeakMap,ci=new WeakMap,ao=new WeakMap,io={})}},F4=function(i,r,c){c===void 0&&(c="data-aria-hidden");var o=Array.from(Array.isArray(i)?i:[i]),s=K4(i);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live], script"))),J4(o,s,c,"aria-hidden")):function(){return null}},P4=Object.defineProperty,rn=(i,r)=>P4(i,"name",{value:r,configurable:!0}),jd="Dialog",[rp,mN]=da(jd),[$4,$n]=rp(jd),op=rn(i=>{const{__scopeDialog:r,children:c,open:o,defaultOpen:s,onOpenChange:f,modal:m=!0}=i,v=x.useRef(null),p=x.useRef(null),{nodes:b,registry:S}=X1(),[y,E]=bu({prop:o,defaultProp:s??!1,onChange:f,caller:jd}),[A,j]=x.useState(0),[D,L]=x.useState(0);return h.jsx($4,{scope:r,triggerRef:v,contentRef:p,contentId:an(),titleId:an(),descriptionId:an(),titlePresent:A>0,descriptionPresent:D>0,setTitleCount:j,setDescriptionCount:L,open:y,onOpenChange:E,onOpenToggle:x.useCallback(()=>E(Y=>!Y),[E]),modal:m,branchNodes:b,branchRegistry:S,children:c})},"Dialog"),cp="DialogPortal",[W4,sp]=rp(cp,{forceMount:void 0}),fp=rn(i=>{const{__scopeDialog:r,forceMount:c,children:o,container:s}=i,f=$n(cp,r);return h.jsx(W4,{scope:r,forceMount:c,children:x.Children.map(o,m=>h.jsx(bo,{present:c||f.open,children:h.jsx(o4,{asChild:!0,container:s,children:m})}))})},"DialogPortal"),od="DialogOverlay",Od=x.forwardRef(rn(function(r,c){const o=sp(od,r.__scopeDialog),{forceMount:s=o.forceMount,...f}=r,m=$n(od,r.__scopeDialog);return m.modal?h.jsx(bo,{present:s||m.open,children:h.jsx(t3,{...f,ref:c})}):null},"DialogOverlay")),e3=Ml("DialogOverlay.RemoveScroll"),t3=x.forwardRef(rn(function(r,c){const{__scopeDialog:o,...s}=r,f=$n(od,o),m=q1(),v=zt(c,m);return h.jsx(ip,{as:e3,allowPinchZoom:!0,shards:x.useMemo(()=>[f.contentRef,...f.branchNodes.map(p=>({current:p}))],[f.contentRef,f.branchNodes]),children:h.jsx(Ke.div,{"data-state":zd(f.open),...s,ref:v,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),yu="DialogContent",Md=x.forwardRef(rn(function(r,c){const o=sp(yu,r.__scopeDialog),{forceMount:s=o.forceMount,...f}=r,m=$n(yu,r.__scopeDialog);return h.jsx(bo,{present:s||m.open,children:m.modal?h.jsx(n3,{...f,ref:c}):h.jsx(l3,{...f,ref:c})})},"DialogContent")),n3=x.forwardRef(rn(function(r,c){const o=$n(yu,r.__scopeDialog),s=x.useRef(null),f=zt(c,o.contentRef,s);return x.useEffect(()=>{const m=s.current;if(m)return F4(m)},[]),h.jsx(dp,{...r,ref:f,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:dt(r.onCloseAutoFocus,m=>{var v;m.preventDefault(),(v=o.triggerRef.current)==null||v.focus()}),onPointerDownOutside:dt(r.onPointerDownOutside,m=>{const v=m.detail.originalEvent,p=v.button===0&&v.ctrlKey===!0;(v.button===2||p)&&m.preventDefault()}),onFocusOutside:dt(r.onFocusOutside,m=>m.preventDefault())})},"DialogContentModal")),l3=x.forwardRef(rn(function(r,c){const o=$n(yu,r.__scopeDialog),s=x.useRef(!1),f=x.useRef(!1);return h.jsx(dp,{...r,ref:c,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:m=>{var v,p;(v=r.onCloseAutoFocus)==null||v.call(r,m),m.defaultPrevented||(s.current||(p=o.triggerRef.current)==null||p.focus(),m.preventDefault()),s.current=!1,f.current=!1},onInteractOutside:m=>{var b,S;(b=r.onInteractOutside)==null||b.call(r,m),m.defaultPrevented||(s.current=!0,m.detail.originalEvent.type==="pointerdown"&&(f.current=!0));const v=m.target;((S=o.triggerRef.current)==null?void 0:S.contains(v))&&m.preventDefault(),m.detail.originalEvent.type==="focusin"&&f.current&&m.preventDefault()}})},"DialogContentNonModal")),dp=x.forwardRef(rn(function(r,c){const{__scopeDialog:o,trapFocus:s,onOpenAutoFocus:f,onCloseAutoFocus:m,"aria-describedby":v,children:p,...b}=r,S=$n(yu,o);return Rd(),h.jsx(Q1,{registry:S.branchRegistry,children:h.jsx(a4,{asChild:!0,loop:!0,trapped:s,branches:S.branchNodes,onMountAutoFocus:f,onUnmountAutoFocus:m,children:h.jsx(t4,{role:"dialog",id:S.contentId,"aria-labelledby":S.titlePresent?S.titleId:void 0,"aria-describedby":S.descriptionPresent?vp(v,S.descriptionId):v,"data-state":zd(S.open),...b,ref:c,deferPointerDownOutside:!0,onDismiss:()=>S.onOpenChange(!1),children:p})})})},"DialogContentImpl")),mp=x.forwardRef(rn(function(r,c){const{__scopeDialog:o,...s}=r,f=$n("DialogTitle",o),{setTitleCount:m}=f;return un(()=>(m(v=>v+1),()=>m(v=>v-1)),[m]),h.jsx(Ke.h2,{id:f.titleId,...s,ref:c})},"DialogTitle")),hp=x.forwardRef(rn(function(r,c){const{__scopeDialog:o,...s}=r,f=$n("DialogDescription",o),{setDescriptionCount:m}=f;return un(()=>(m(v=>v+1),()=>m(v=>v-1)),[m]),h.jsx(Ke.p,{id:f.descriptionId,...s,ref:c})},"DialogDescription"));function vp(...i){const r=new Set;for(const c of i)if(typeof c=="string")for(const o of String(c).trim().split(/\s+/))o&&r.add(o);return r.size>0?Array.from(r).join(" "):void 0}rn(vp,"concatAriaDescribedby");function zd(i){return i?"open":"closed"}rn(zd,"getState");var hu='[cmdk-group=""]',Nf='[cmdk-group-items=""]',a3='[cmdk-group-heading=""]',gp='[cmdk-item=""]',$0=`${gp}:not([aria-disabled="true"])`,cd="cmdk-item-select",di="data-value",i3=(i,r,c)=>PC(i,r,c),yp=x.createContext(void 0),xu=()=>x.useContext(yp),pp=x.createContext(void 0),Dd=()=>x.useContext(pp),bp=x.createContext(void 0),xp=x.forwardRef((i,r)=>{let c=mi(()=>{var J,me;return{search:"",value:(me=(J=i.value)!=null?J:i.defaultValue)!=null?me:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=mi(()=>new Set),s=mi(()=>new Map),f=mi(()=>new Map),m=mi(()=>new Set),v=Sp(i),{label:p,children:b,value:S,onValueChange:y,filter:E,shouldFilter:A,loop:j,disablePointerSelection:D=!1,vimBindings:L=!0,...Y}=i,G=an(),k=an(),V=an(),I=x.useRef(null),R=g3();ca(()=>{if(S!==void 0){let J=S.trim();c.current.value=J,T.emit()}},[S]),ca(()=>{R(6,ne)},[]);let T=x.useMemo(()=>({subscribe:J=>(m.current.add(J),()=>m.current.delete(J)),snapshot:()=>c.current,setState:(J,me,N)=>{var U,$,ee,he;if(!Object.is(c.current[J],me)){if(c.current[J]=me,J==="search")P(),te(),R(1,W);else if(J==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ie=document.getElementById(V);ie?ie.focus():(U=document.getElementById(G))==null||U.focus()}if(R(7,()=>{var ie;c.current.selectedItemId=(ie=ue())==null?void 0:ie.id,T.emit()}),N||R(5,ne),(($=v.current)==null?void 0:$.value)!==void 0){let ie=me??"";(he=(ee=v.current).onValueChange)==null||he.call(ee,ie);return}}T.emit()}},emit:()=>{m.current.forEach(J=>J())}}),[]),z=x.useMemo(()=>({value:(J,me,N)=>{var U;me!==((U=f.current.get(J))==null?void 0:U.value)&&(f.current.set(J,{value:me,keywords:N}),c.current.filtered.items.set(J,Z(me,N)),R(2,()=>{te(),T.emit()}))},item:(J,me)=>(o.current.add(J),me&&(s.current.has(me)?s.current.get(me).add(J):s.current.set(me,new Set([J]))),R(3,()=>{P(),te(),c.current.value||W(),T.emit()}),()=>{f.current.delete(J),o.current.delete(J),c.current.filtered.items.delete(J);let N=ue();R(4,()=>{P(),(N==null?void 0:N.getAttribute("id"))===J&&W(),T.emit()})}),group:J=>(s.current.has(J)||s.current.set(J,new Set),()=>{f.current.delete(J),s.current.delete(J)}),filter:()=>v.current.shouldFilter,label:p||i["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:G,inputId:V,labelId:k,listInnerRef:I}),[]);function Z(J,me){var N,U;let $=(U=(N=v.current)==null?void 0:N.filter)!=null?U:i3;return J?$(J,c.current.search,me):0}function te(){if(!c.current.search||v.current.shouldFilter===!1)return;let J=c.current.filtered.items,me=[];c.current.filtered.groups.forEach(U=>{let $=s.current.get(U),ee=0;$.forEach(he=>{let ie=J.get(he);ee=Math.max(ie,ee)}),me.push([U,ee])});let N=I.current;ge().sort((U,$)=>{var ee,he;let ie=U.getAttribute("id"),Ee=$.getAttribute("id");return((ee=J.get(Ee))!=null?ee:0)-((he=J.get(ie))!=null?he:0)}).forEach(U=>{let $=U.closest(Nf);$?$.appendChild(U.parentElement===$?U:U.closest(`${Nf} > *`)):N.appendChild(U.parentElement===N?U:U.closest(`${Nf} > *`))}),me.sort((U,$)=>$[1]-U[1]).forEach(U=>{var $;let ee=($=I.current)==null?void 0:$.querySelector(`${hu}[${di}="${encodeURIComponent(U[0])}"]`);ee==null||ee.parentElement.appendChild(ee)})}function W(){let J=ge().find(N=>N.getAttribute("aria-disabled")!=="true"),me=J==null?void 0:J.getAttribute(di);T.setState("value",me||void 0)}function P(){var J,me,N,U;if(!c.current.search||v.current.shouldFilter===!1){c.current.filtered.count=o.current.size;return}c.current.filtered.groups=new Set;let $=0;for(let ee of o.current){let he=(me=(J=f.current.get(ee))==null?void 0:J.value)!=null?me:"",ie=(U=(N=f.current.get(ee))==null?void 0:N.keywords)!=null?U:[],Ee=Z(he,ie);c.current.filtered.items.set(ee,Ee),Ee>0&&$++}for(let[ee,he]of s.current)for(let ie of he)if(c.current.filtered.items.get(ie)>0){c.current.filtered.groups.add(ee);break}c.current.filtered.count=$}function ne(){var J,me,N;let U=ue();U&&(((J=U.parentElement)==null?void 0:J.firstChild)===U&&((N=(me=U.closest(hu))==null?void 0:me.querySelector(a3))==null||N.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function ue(){var J;return(J=I.current)==null?void 0:J.querySelector(`${gp}[aria-selected="true"]`)}function ge(){var J;return Array.from(((J=I.current)==null?void 0:J.querySelectorAll($0))||[])}function F(J){let me=ge()[J];me&&T.setState("value",me.getAttribute(di))}function ae(J){var me;let N=ue(),U=ge(),$=U.findIndex(he=>he===N),ee=U[$+J];(me=v.current)!=null&&me.loop&&(ee=$+J<0?U[U.length-1]:$+J===U.length?U[0]:U[$+J]),ee&&T.setState("value",ee.getAttribute(di))}function ce(J){let me=ue(),N=me==null?void 0:me.closest(hu),U;for(;N&&!U;)N=J>0?h3(N,hu):v3(N,hu),U=N==null?void 0:N.querySelector($0);U?T.setState("value",U.getAttribute(di)):ae(J)}let xe=()=>F(ge().length-1),K=J=>{J.preventDefault(),J.metaKey?xe():J.altKey?ce(1):ae(1)},Se=J=>{J.preventDefault(),J.metaKey?F(0):J.altKey?ce(-1):ae(-1)};return x.createElement(Ke.div,{ref:r,tabIndex:-1,...Y,"cmdk-root":"",onKeyDown:J=>{var me;(me=Y.onKeyDown)==null||me.call(Y,J);let N=J.nativeEvent.isComposing||J.keyCode===229;if(!(J.defaultPrevented||N))switch(J.key){case"n":case"j":{L&&J.ctrlKey&&K(J);break}case"ArrowDown":{K(J);break}case"p":case"k":{L&&J.ctrlKey&&Se(J);break}case"ArrowUp":{Se(J);break}case"Home":{J.preventDefault(),F(0);break}case"End":{J.preventDefault(),xe();break}case"Enter":{J.preventDefault();let U=ue();if(U){let $=new Event(cd);U.dispatchEvent($)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:p3},p),So(i,J=>x.createElement(pp.Provider,{value:T},x.createElement(yp.Provider,{value:z},J))))}),u3=x.forwardRef((i,r)=>{var c,o;let s=an(),f=x.useRef(null),m=x.useContext(bp),v=xu(),p=Sp(i),b=(o=(c=p.current)==null?void 0:c.forceMount)!=null?o:m==null?void 0:m.forceMount;ca(()=>{if(!b)return v.item(s,m==null?void 0:m.id)},[b]);let S=Ep(s,f,[i.value,i.children,f],i.keywords),y=Dd(),E=zl(R=>R.value&&R.value===S.current),A=zl(R=>b||v.filter()===!1?!0:R.search?R.filtered.items.get(s)>0:!0);x.useEffect(()=>{let R=f.current;if(!(!R||i.disabled))return R.addEventListener(cd,j),()=>R.removeEventListener(cd,j)},[A,i.onSelect,i.disabled]);function j(){var R,T;D(),(T=(R=p.current).onSelect)==null||T.call(R,S.current)}function D(){y.setState("value",S.current,!0)}if(!A)return null;let{disabled:L,value:Y,onSelect:G,forceMount:k,keywords:V,...I}=i;return x.createElement(Ke.div,{ref:ra(f,r),...I,id:s,"cmdk-item":"",role:"option","aria-disabled":!!L,"aria-selected":!!E,"data-disabled":!!L,"data-selected":!!E,onPointerMove:L||v.getDisablePointerSelection()?void 0:D,onClick:L?void 0:j},i.children)}),r3=x.forwardRef((i,r)=>{let{heading:c,children:o,forceMount:s,...f}=i,m=an(),v=x.useRef(null),p=x.useRef(null),b=an(),S=xu(),y=zl(A=>s||S.filter()===!1?!0:A.search?A.filtered.groups.has(m):!0);ca(()=>S.group(m),[]),Ep(m,v,[i.value,i.heading,p]);let E=x.useMemo(()=>({id:m,forceMount:s}),[s]);return x.createElement(Ke.div,{ref:ra(v,r),...f,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},c&&x.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:b},c),So(i,A=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":c?b:void 0},x.createElement(bp.Provider,{value:E},A))))}),o3=x.forwardRef((i,r)=>{let{alwaysRender:c,...o}=i,s=x.useRef(null),f=zl(m=>!m.search);return!c&&!f?null:x.createElement(Ke.div,{ref:ra(s,r),...o,"cmdk-separator":"",role:"separator"})}),c3=x.forwardRef((i,r)=>{let{onValueChange:c,...o}=i,s=i.value!=null,f=Dd(),m=zl(b=>b.search),v=zl(b=>b.selectedItemId),p=xu();return x.useEffect(()=>{i.value!=null&&f.setState("search",i.value)},[i.value]),x.createElement(Ke.input,{ref:r,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":v,id:p.inputId,type:"text",value:s?i.value:m,onChange:b=>{s||f.setState("search",b.target.value),c==null||c(b.target.value)}})}),s3=x.forwardRef((i,r)=>{let{children:c,label:o="Suggestions",...s}=i,f=x.useRef(null),m=x.useRef(null),v=zl(b=>b.selectedItemId),p=xu();return x.useEffect(()=>{if(m.current&&f.current){let b=m.current,S=f.current,y,E=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let A=b.offsetHeight;S.style.setProperty("--cmdk-list-height",A.toFixed(1)+"px")})});return E.observe(b),()=>{cancelAnimationFrame(y),E.unobserve(b)}}},[]),x.createElement(Ke.div,{ref:ra(f,r),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":o,id:p.listId},So(i,b=>x.createElement("div",{ref:ra(m,p.listInnerRef),"cmdk-list-sizer":""},b)))}),f3=x.forwardRef((i,r)=>{let{open:c,onOpenChange:o,overlayClassName:s,contentClassName:f,container:m,...v}=i;return x.createElement(op,{open:c,onOpenChange:o},x.createElement(fp,{container:m},x.createElement(Od,{"cmdk-overlay":"",className:s}),x.createElement(Md,{"aria-label":i.label,"cmdk-dialog":"",className:f},x.createElement(xp,{ref:r,...v}))))}),d3=x.forwardRef((i,r)=>zl(c=>c.filtered.count===0)?x.createElement(Ke.div,{ref:r,...i,"cmdk-empty":"",role:"presentation"}):null),m3=x.forwardRef((i,r)=>{let{progress:c,children:o,label:s="Loading...",...f}=i;return x.createElement(Ke.div,{ref:r,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},So(i,m=>x.createElement("div",{"aria-hidden":!0},m)))}),on=Object.assign(xp,{List:s3,Item:u3,Input:c3,Group:r3,Separator:o3,Dialog:f3,Empty:d3,Loading:m3});function h3(i,r){let c=i.nextElementSibling;for(;c;){if(c.matches(r))return c;c=c.nextElementSibling}}function v3(i,r){let c=i.previousElementSibling;for(;c;){if(c.matches(r))return c;c=c.previousElementSibling}}function Sp(i){let r=x.useRef(i);return ca(()=>{r.current=i}),r}var ca=typeof window>"u"?x.useEffect:x.useLayoutEffect;function mi(i){let r=x.useRef();return r.current===void 0&&(r.current=i()),r}function zl(i){let r=Dd(),c=()=>i(r.snapshot());return x.useSyncExternalStore(r.subscribe,c,c)}function Ep(i,r,c,o=[]){let s=x.useRef(),f=xu();return ca(()=>{var m;let v=(()=>{var b;for(let S of c){if(typeof S=="string")return S.trim();if(typeof S=="object"&&"current"in S)return S.current?(b=S.current.textContent)==null?void 0:b.trim():s.current}})(),p=o.map(b=>b.trim());f.value(i,v,p),(m=r.current)==null||m.setAttribute(di,v),s.current=v}),s}var g3=()=>{let[i,r]=x.useState(),c=mi(()=>new Map);return ca(()=>{c.current.forEach(o=>o()),c.current=new Map},[i]),(o,s)=>{c.current.set(o,s),r({})}};function y3(i){let r=i.type;return typeof r=="function"?r(i.props):"render"in r?r.render(i.props):i}function So({asChild:i,children:r},c){return i&&x.isValidElement(r)?x.cloneElement(y3(r),{ref:r.ref},c(r.props.children)):c(r)}var p3={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Ud=op,b3=fp,Cp=x.forwardRef(({className:i,...r},c)=>h.jsx(Od,{ref:c,className:Qe("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm transition-opacity",i),...r}));Cp.displayName=Od.displayName;const Eo=x.forwardRef(({className:i,children:r,...c},o)=>h.jsxs(b3,{children:[h.jsx(Cp,{}),h.jsx(Md,{ref:o,className:Qe("fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] hl-card shadow-2xl duration-200 outline-none",i),...c,children:r})]}));Eo.displayName=Md.displayName;const Co=x.forwardRef(({className:i,...r},c)=>h.jsx(mp,{ref:c,className:Qe("text-sm font-bold leading-none tracking-tight",i),...r}));Co.displayName=mp.displayName;const No=x.forwardRef(({className:i,...r},c)=>h.jsx(hp,{ref:c,className:Qe("text-xs text-[var(--text-muted)]",i),...r}));No.displayName=hp.displayName;const Np=x.forwardRef(({className:i,...r},c)=>h.jsx(on,{ref:c,className:Qe("flex h-full w-full flex-col overflow-hidden rounded-xl bg-[var(--bg-card)] text-[var(--text-main)]",i),...r}));Np.displayName=on.displayName;const x3=({children:i,...r})=>h.jsx(Ud,{...r,children:h.jsxs(Eo,{className:"max-w-xl overflow-hidden p-0 shadow-2xl top-[22%] translate-y-0",children:[h.jsx(Co,{className:"sr-only",children:"全局命令与服务搜索面板"}),h.jsx(No,{className:"sr-only",children:"使用键盘上下方向键选择服务或操作,回车立即执行"}),h.jsx(Np,{children:i})]})}),wp=x.forwardRef(({className:i,...r},c)=>h.jsxs("div",{className:"flex items-center border-b hl-border px-4 py-3 gap-3","cmdk-input-wrapper":"",children:[h.jsx(dd,{className:"h-4 w-4 shrink-0 text-[var(--text-muted)]"}),h.jsx(on.Input,{ref:c,className:Qe("flex w-full bg-transparent text-sm outline-none placeholder:text-[var(--text-subtle)] disabled:cursor-not-allowed disabled:opacity-50",i),...r}),h.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-muted text-[var(--text-muted)] shrink-0",children:"ESC"})]}));wp.displayName=on.Input.displayName;const Tp=x.forwardRef(({className:i,...r},c)=>h.jsx(on.List,{ref:c,className:Qe("max-h-80 overflow-y-auto overflow-x-hidden p-2",i),...r}));Tp.displayName=on.List.displayName;const _p=x.forwardRef((i,r)=>h.jsx(on.Empty,{ref:r,className:"py-6 text-center text-xs text-[var(--text-muted)]",...i}));_p.displayName=on.Empty.displayName;const Ap=x.forwardRef(({className:i,...r},c)=>h.jsx(on.Group,{ref:c,className:Qe("overflow-hidden p-1 text-[var(--text-main)] [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[10px] [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider [&_[cmdk-group-heading]]:text-[var(--text-subtle)]",i),...r}));Ap.displayName=on.Group.displayName;const Rp=x.forwardRef(({className:i,...r},c)=>h.jsx(on.Item,{ref:c,className:Qe("relative flex cursor-pointer select-none items-center justify-between rounded-lg px-3 py-2 text-xs outline-none transition-colors data-[selected=true]:bg-[var(--bg-muted)] data-[selected=true]:text-[var(--text-main)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",i),...r}));Rp.displayName=on.Item.displayName;const S3=()=>{const{showCmdPalette:i,setShowCmdPalette:r,setShowAgyModal:c,setTheme:o,triggerAction:s,copyCmd:f,getEffectiveMode:m}=Pn(),v=x.useMemo(()=>{const p=m(),b=(S,y,E)=>p==="lan"?E:p==="home10443"?y:S;return[{id:"open-agy-drawer",title:"在页内唤起 AGY 云端终端",hint:"tmux attach -t agy",type:"终端",run:()=>c(!0)},{id:"open-agy",title:"新窗口打开 AGY 云端工作台",hint:"https://agy.961504.xyz",type:"跳转",run:()=>window.open(b("https://agy.961504.xyz","https://agy.home.961504.xyz:10443","http://192.168.31.164:7681"),"_blank")},{id:"open-z4",title:"打开 极空间 Z4 私有云 (20TB)",hint:"192.168.31.185:5055",type:"跳转",run:()=>window.open(b("https://z4.home.961504.xyz:10443","https://z4.home.961504.xyz:10443","http://192.168.31.185:5055"),"_blank")},{id:"open-vw",title:"打开 Vaultwarden 密码保险箱",hint:"https://vw.961504.xyz",type:"跳转",run:()=>window.open(b("https://vw.961504.xyz","https://vw.home.961504.xyz:10443","http://192.168.31.164:8222"),"_blank")},{id:"open-clash",title:"打开 Mihomo 路由分流面板",hint:"192.168.31.1:9999",type:"跳转",run:()=>window.open(b("https://clash.home.961504.xyz:10443/ui/","https://clash.home.961504.xyz:10443/ui/","http://192.168.31.1:9999/ui/"),"_blank")},{id:"act-backup",title:"立即打包备份核心数据至极空间 Z4",hint:"backup-to-nas.sh",type:"运维",run:()=>s("backup_nas","正在打包备份至极空间 Z4...")},{id:"act-ddns",title:"立即刷新 Cloudflare DDNS 解析",hint:"cloudflare-ddns.sh",type:"运维",run:()=>s("refresh_ddns","正在同步 Cloudflare DDNS...")},{id:"ssh-mini",title:"复制 SSH 连接 Mac mini 指令",hint:"ssh mini",type:"SSH",run:()=>f("ssh mini","SSH Mac mini")},{id:"ssh-agy",title:"复制 终端接力 AGY 会话指令",hint:'ssh mini -t "tmux attach -t agy"',type:"SSH",run:()=>f('ssh mini -t "tmux attach -t agy"',"接力 AGY")},{id:"theme-system",title:"主题模式: 跟随设备系统深浅色自动切换",hint:"system",type:"主题",run:()=>o("system")},{id:"theme-light",title:"切换主题: 浅色纯净 (Light)",hint:"light",type:"主题",run:()=>o("light")},{id:"theme-dark",title:"切换主题: 深色极客 (Dark)",hint:"dark",type:"主题",run:()=>o("dark")}]},[m,c,o,s,f]);return h.jsxs(x3,{open:i,onOpenChange:r,children:[h.jsx(wp,{placeholder:"输入服务名称、SSH 指令、路由模式或主题..."}),h.jsxs(Tp,{children:[h.jsx(_p,{children:"未找到匹配的指令或服务"}),h.jsx(Ap,{heading:"快速操作与服务直达 (cmdk + Radix Dialog)",children:v.map(p=>h.jsxs(Rp,{value:`${p.title} ${p.hint} ${p.type}`,onSelect:()=>{r(!1),p.run()},children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("span",{className:"font-medium",children:p.title}),h.jsx("span",{className:"font-mono-num text-[11px] text-[var(--text-muted)]",children:p.hint})]}),h.jsx(Jn,{variant:"secondary",children:p.type})]},p.id))})]})]})},Ol=x.forwardRef(({className:i,...r},c)=>h.jsx("div",{ref:c,className:Qe("hl-card",i),...r}));Ol.displayName="Card";const E3=x.forwardRef(({className:i,...r},c)=>h.jsx("div",{ref:c,className:Qe("flex flex-col space-y-1.5 p-5",i),...r}));E3.displayName="CardHeader";const C3=x.forwardRef(({className:i,...r},c)=>h.jsx("h3",{ref:c,className:Qe("text-sm font-bold leading-none tracking-tight",i),...r}));C3.displayName="CardTitle";const N3=x.forwardRef(({className:i,...r},c)=>h.jsx("p",{ref:c,className:Qe("text-xs text-[var(--text-muted)]",i),...r}));N3.displayName="CardDescription";const w3=x.forwardRef(({className:i,...r},c)=>h.jsx("div",{ref:c,className:Qe("p-5 pt-0",i),...r}));w3.displayName="CardContent";const T3=x.forwardRef(({className:i,...r},c)=>h.jsx("div",{ref:c,className:Qe("flex items-center p-5 pt-0",i),...r}));T3.displayName="CardFooter";const Bd=x.forwardRef(({className:i,type:r,...c},o)=>h.jsx("input",{type:r,className:Qe("hl-input",i),ref:o,...c}));Bd.displayName="Input";const vo=x.forwardRef(({className:i,...r},c)=>h.jsx("div",{ref:c,className:Qe("hl-input-group",i),...r}));vo.displayName="InputGroup";var _3=Object.defineProperty,A3=(i,r)=>_3(i,"name",{value:r,configurable:!0});function jp(i){const[r,c]=x.useState(void 0);return un(()=>{if(i){c({width:i.offsetWidth,height:i.offsetHeight});let o=0;const s=new ResizeObserver(f=>{if(!Array.isArray(f)||!f.length)return;const m=f[0];window.cancelAnimationFrame(o),o=window.requestAnimationFrame(()=>{let v,p;if("borderBoxSize"in m){const b=m.borderBoxSize,S=Array.isArray(b)?b[0]:b;v=S.inlineSize,p=S.blockSize}else v=i.offsetWidth,p=i.offsetHeight;c({width:v,height:p})})});return s.observe(i,{box:"border-box"}),()=>{window.cancelAnimationFrame(o),s.unobserve(i)}}else c(void 0)},[i]),r}A3(jp,"useSize");var R3=Object.defineProperty,Dl=(i,r)=>R3(i,"name",{value:r,configurable:!0}),kd="Switch",[j3,hN]=da(kd),[O3,Hd]=j3(kd);function Op(i){const{__scopeSwitch:r,checked:c,children:o,defaultChecked:s,disabled:f,form:m,name:v,onCheckedChange:p,required:b,value:S="on",internal_do_not_use_render:y}=i,[E,A]=bu({prop:c,defaultProp:s??!1,onChange:p,caller:kd}),[j,D]=x.useState(null),[L,Y]=x.useState(null),[G,k]=x.useState(null),V=j?!!m||!!j.closest("form"):!0,I={checked:E,setChecked:A,disabled:f,control:j,setControl:D,name:v,form:m,value:S,userClick:G,onUserClick:k,required:b,defaultChecked:s,isFormControl:V,bubbleInput:L,setBubbleInput:Y};return h.jsx(O3,{scope:r,...I,children:zp(y)?y(I):o})}Dl(Op,"SwitchProvider");var M3="SwitchTrigger",z3=x.forwardRef(Dl(function({__scopeSwitch:r,onClick:c,...o},s){const{control:f,form:m,value:v,disabled:p,checked:b,required:S,setControl:y,setChecked:E,onUserClick:A,isFormControl:j,bubbleInput:D}=Hd(M3,r),L=zt(s,y),Y=x.useRef(b);return x.useEffect(()=>{const G=m?f==null?void 0:f.ownerDocument.getElementById(m):f==null?void 0:f.form;if(G instanceof HTMLFormElement){const k=Dl(()=>E(Y.current),"reset");return G.addEventListener("reset",k),()=>G.removeEventListener("reset",k)}},[f,m,E]),h.jsx(Ke.button,{type:"button",role:"switch","aria-checked":b,"aria-required":S,"data-state":Ld(b),"data-disabled":p?"":void 0,disabled:p,value:v,...o,ref:L,onClick:dt(c,G=>{const k=G.isPropagationStopped();A({requestedChecked:!b,hasConsumerStoppedPropagation:k}),E(V=>!V),D&&j&&(k||G.stopPropagation())})})},"SwitchTrigger")),Mp=x.forwardRef(Dl(function(r,c){const{__scopeSwitch:o,name:s,checked:f,defaultChecked:m,required:v,disabled:p,value:b,onCheckedChange:S,form:y,...E}=r;return h.jsx(Op,{__scopeSwitch:o,checked:f,defaultChecked:m,disabled:p,required:v,onCheckedChange:S,name:s,form:y,value:b,internal_do_not_use_render:({isFormControl:A})=>h.jsxs(h.Fragment,{children:[h.jsx(z3,{...E,ref:c,__scopeSwitch:o}),A&&h.jsx(k3,{__scopeSwitch:o})]})})},"Switch")),D3="SwitchThumb",U3=x.forwardRef(Dl(function(r,c){const{__scopeSwitch:o,...s}=r,f=Hd(D3,o);return h.jsx(Ke.span,{"data-state":Ld(f.checked),"data-disabled":f.disabled?"":void 0,...s,ref:c})},"SwitchThumb")),B3="SwitchBubbleInput",k3=x.forwardRef(Dl(function({__scopeSwitch:r,onClick:c,...o},s){const{control:f,userClick:m,checked:v,defaultChecked:p,required:b,disabled:S,name:y,value:E,form:A,bubbleInput:j,setBubbleInput:D}=Hd(B3,r),L=zt(s,D),Y=jp(f),G=x.useRef(!1),k=x.useRef(v),V=x.useRef(m),I=x.useRef(null);x.useEffect(()=>{const T=j;if(!T)return;const z=window.HTMLInputElement.prototype,te=Object.getOwnPropertyDescriptor(z,"checked").set;if(!te)return;const W=k.current!==v;k.current=v;const P=m!==null&&m!==V.current;if(V.current=m,P)I.current=W?null:m,W&&te.call(T,v),T.dispatchEvent(new Event("click",{bubbles:!m.hasConsumerStoppedPropagation}));else if(W){const ne=I.current;I.current=null;const ue=(ne==null?void 0:ne.requestedChecked)===v;G.current=!0,te.call(T,v),T.dispatchEvent(new Event("click",{bubbles:!(ue&&ne.hasConsumerStoppedPropagation)})),G.current=!1}},[j,v,m]);const R=x.useRef(v);return h.jsx(Ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??R.current,required:b,disabled:S,name:y,value:E,form:A,...o,tabIndex:-1,ref:L,onClick:dt(c,T=>{G.current&&T.stopPropagation()}),style:{...o.style,...Y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function zp(i){return typeof i=="function"}Dl(zp,"isFunction");function Ld(i){return i?"checked":"unchecked"}Dl(Ld,"getState");const go=x.forwardRef(({className:i,...r},c)=>h.jsx(Mp,{className:Qe("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[var(--accent)] data-[state=checked]:border-[var(--accent)] data-[state=unchecked]:bg-[var(--bg-muted)] data-[state=unchecked]:border-[var(--border-color)]",i),...r,ref:c,children:h.jsx(U3,{className:Qe("pointer-events-none block h-3.5 w-3.5 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5")})}));go.displayName=Mp.displayName;const qd=({targetUrl:i="https://agy.961504.xyz",onSuccess:r,onCancel:c,embedded:o=!1})=>{const[s,f]=x.useState("ixvii0iv"),[m,v]=x.useState(""),[p,b]=x.useState(!1),[S,y]=x.useState(!0),[E,A]=x.useState(!1),[j,D]=x.useState(null),L=async Y=>{if(Y.preventDefault(),!s.trim()||!m){D("请输入用户名与访问密钥");return}A(!0),D(null);try{const G=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:s.trim(),password:m,remember:S})}),k=await G.json();G.ok&&k.ok?r==null||r():D(k.message||"认证未通过,请检查密码")}catch{D("网络请求异常,请稍后重试")}finally{A(!1)}};return h.jsxs(Ol,{className:`w-full max-w-md p-6 space-y-5 ${o?"":"shadow-2xl"}`,children:[h.jsx("div",{className:"flex items-start justify-between gap-3 border-b hl-border pb-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center border hl-border shrink-0",style:{backgroundColor:"var(--accent-soft)",color:"var(--accent)"},children:h.jsx(D2,{className:"w-5 h-5"})}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h3",{className:"text-sm font-bold tracking-tight",children:"HomeLab 统一安全通行证"}),h.jsx(Jn,{variant:"success",children:"SSO 2.0"})]}),h.jsx("p",{className:"text-xs font-mono-num mt-0.5 truncate max-w-[260px]",style:{color:"var(--text-muted)"},children:i})]})]})}),h.jsxs("form",{onSubmit:L,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("label",{className:"block text-xs font-semibold",style:{color:"var(--text-muted)"},children:"管理员账号 (Username)"}),h.jsxs(vo,{children:[h.jsx(X2,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),h.jsx("input",{type:"text",autoComplete:"username",value:s,onChange:Y=>f(Y.target.value),placeholder:"输入管理员账号 (如 ixvii0iv)",className:"font-mono-num"})]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("label",{className:"block text-xs font-semibold",style:{color:"var(--text-muted)"},children:"访问通行密钥 (Access Key)"}),h.jsx("span",{className:"text-[10px] font-mono-num",style:{color:"var(--text-subtle)"},children:"与 Mac mini 密码一致"})]}),h.jsxs(vo,{children:[h.jsx(p2,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),h.jsx("input",{type:p?"text":"password",autoComplete:"current-password",autoFocus:!0,value:m,onChange:Y=>v(Y.target.value),placeholder:"输入访问密钥...",className:"font-mono-num"}),h.jsx("button",{type:"button",onClick:()=>b(!p),className:"p-1 rounded hover:opacity-80 cursor-pointer",style:{color:"var(--text-muted)"},title:p?"隐藏密码":"显示密码",children:p?h.jsx(c2,{className:"w-3.5 h-3.5"}):h.jsx(f2,{className:"w-3.5 h-3.5"})})]})]}),h.jsxs("div",{className:"flex items-center justify-between pt-1",children:[h.jsx("span",{className:"text-xs select-none",style:{color:"var(--text-muted)"},children:"在此设备保持 30 天免密通行 (*.961504.xyz)"}),h.jsx(go,{checked:S,onCheckedChange:y})]}),j&&h.jsx("div",{className:"px-3 py-2 rounded-lg text-xs font-medium border",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",borderColor:"rgba(239, 68, 68, 0.3)",color:"#ef4444"},children:j}),h.jsxs("div",{className:"flex items-center justify-end gap-2.5 pt-2",children:[c&&h.jsx(nt,{type:"button",variant:"outline",onClick:c,children:"取消"}),h.jsxs(nt,{type:"submit",disabled:E,className:"px-4",children:[h.jsx(md,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:E?"正在验证签名...":"解锁并进入工作台"})]})]})]})]})},H3=()=>{const{showAgyModal:i,setShowAgyModal:r,getEffectiveMode:c}=Pn(),[o,s]=x.useState(!1),[f,m]=x.useState(!1),v=c(),p=v==="lan"?"http://192.168.31.164:7681":v==="home10443"?"https://agy.home.961504.xyz:10443":"https://agy.961504.xyz";return x.useEffect(()=>{if(i){if(v==="lan"){m(!0),s(!0);return}s(!1),fetch("/api/auth/status",{credentials:"include"}).then(b=>b.json()).then(b=>{m(!!b.authenticated),s(!0)}).catch(()=>{m(!1),s(!0)})}},[i,v]),h.jsx(Ud,{open:i,onOpenChange:r,children:h.jsxs(Eo,{className:"w-[95vw] max-w-6xl h-[88vh] flex flex-col overflow-hidden p-0",children:[h.jsx(Co,{className:"sr-only",children:"AGY 云端工作台"}),h.jsx(No,{className:"sr-only",children:"M6 Mac mini 上的 24 小时 tmux 常驻 AI 编程终端"}),h.jsxs("div",{className:"px-4 py-2.5 border-b hl-border flex items-center justify-between hl-muted shrink-0",children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("img",{src:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",alt:"AGY",className:"w-4 h-4"}),h.jsx("span",{className:"text-xs font-mono-num font-medium",children:"AGY 云端工作台 · tmux 持久会话 (关窗不断连)"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(nt,{variant:"outline",size:"sm",asChild:!0,children:h.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"font-mono-num",children:"新标签页全屏 ↗"})}),h.jsx(nt,{size:"sm",onClick:()=>r(!1),children:"收起终端"})]})]}),o?f?h.jsx("iframe",{src:p,title:"AGY Cloud Workbench",className:"w-full flex-1 bg-black border-0"}):h.jsx("div",{className:"flex-1 flex items-center justify-center p-4",style:{backgroundColor:"var(--bg-page)"},children:h.jsx(qd,{targetUrl:p,onSuccess:()=>m(!0),onCancel:()=>r(!1)})}):h.jsx("div",{className:"flex-1 flex items-center justify-center text-xs font-mono-num",style:{color:"var(--text-muted)"},children:"正在校验 HomeLab SSO 通行证..."})]})})};var si={},wf,W0;function L3(){return W0||(W0=1,wf=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),wf}var Tf={},jl={},ey;function ha(){if(ey)return jl;ey=1;let i;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return jl.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},jl.getSymbolTotalCodewords=function(o){return r[o]},jl.getBCHDigit=function(c){let o=0;for(;c!==0;)o++,c>>>=1;return o},jl.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');i=o},jl.isKanjiModeEnabled=function(){return typeof i<"u"},jl.toSJIS=function(o){return i(o)},jl}var _f={},ty;function Gd(){return ty||(ty=1,(function(i){i.L={bit:1},i.M={bit:0},i.Q={bit:3},i.H={bit:2};function r(c){if(typeof c!="string")throw new Error("Param is not a string");switch(c.toLowerCase()){case"l":case"low":return i.L;case"m":case"medium":return i.M;case"q":case"quartile":return i.Q;case"h":case"high":return i.H;default:throw new Error("Unknown EC Level: "+c)}}i.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},i.from=function(o,s){if(i.isValid(o))return o;try{return r(o)}catch{return s}}})(_f)),_f}var Af,ny;function q3(){if(ny)return Af;ny=1;function i(){this.buffer=[],this.length=0}return i.prototype={get:function(r){const c=Math.floor(r/8);return(this.buffer[c]>>>7-r%8&1)===1},put:function(r,c){for(let o=0;o>>c-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0),r&&(this.buffer[c]|=128>>>this.length%8),this.length++}},Af=i,Af}var Rf,ly;function G3(){if(ly)return Rf;ly=1;function i(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}return i.prototype.set=function(r,c,o,s){const f=r*this.size+c;this.data[f]=o,s&&(this.reservedBit[f]=!0)},i.prototype.get=function(r,c){return this.data[r*this.size+c]},i.prototype.xor=function(r,c,o){this.data[r*this.size+c]^=o},i.prototype.isReserved=function(r,c){return this.reservedBit[r*this.size+c]},Rf=i,Rf}var jf={},ay;function Y3(){return ay||(ay=1,(function(i){const r=ha().getSymbolSize;i.getRowColCoords=function(o){if(o===1)return[];const s=Math.floor(o/7)+2,f=r(o),m=f===145?26:Math.ceil((f-13)/(2*s-2))*2,v=[f-7];for(let p=1;p=0&&s<=7},i.from=function(s){return i.isValid(s)?parseInt(s,10):void 0},i.getPenaltyN1=function(s){const f=s.size;let m=0,v=0,p=0,b=null,S=null;for(let y=0;y=5&&(m+=r.N1+(v-5)),b=A,v=1),A=s.get(E,y),A===S?p++:(p>=5&&(m+=r.N1+(p-5)),S=A,p=1)}v>=5&&(m+=r.N1+(v-5)),p>=5&&(m+=r.N1+(p-5))}return m},i.getPenaltyN2=function(s){const f=s.size;let m=0;for(let v=0;v=10&&(v===1488||v===93)&&m++,p=p<<1&2047|s.get(S,b),S>=10&&(p===1488||p===93)&&m++}return m*r.N3},i.getPenaltyN4=function(s){let f=0;const m=s.data.length;for(let p=0;p=0;){const m=f[0];for(let p=0;p0){const v=new Uint8Array(this.degree);return v.set(f,m),v}return f},Df=r,Df}var Uf={},Bf={},kf={},fy;function Up(){return fy||(fy=1,kf.isValid=function(r){return!isNaN(r)&&r>=1&&r<=40}),kf}var jn={},dy;function Bp(){if(dy)return jn;dy=1;const i="[0-9]+",r="[A-Z $%*+\\-./:]+";let c="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";c=c.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+c+`)(?:.|[\r +]))+`;jn.KANJI=new RegExp(c,"g"),jn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),jn.BYTE=new RegExp(o,"g"),jn.NUMERIC=new RegExp(i,"g"),jn.ALPHANUMERIC=new RegExp(r,"g");const s=new RegExp("^"+c+"$"),f=new RegExp("^"+i+"$"),m=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return jn.testKanji=function(p){return s.test(p)},jn.testNumeric=function(p){return f.test(p)},jn.testAlphanumeric=function(p){return m.test(p)},jn}var my;function va(){return my||(my=1,(function(i){const r=Up(),c=Bp();i.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},i.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},i.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},i.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},i.MIXED={bit:-1},i.getCharCountIndicator=function(f,m){if(!f.ccBits)throw new Error("Invalid mode: "+f);if(!r.isValid(m))throw new Error("Invalid version: "+m);return m>=1&&m<10?f.ccBits[0]:m<27?f.ccBits[1]:f.ccBits[2]},i.getBestModeForData=function(f){return c.testNumeric(f)?i.NUMERIC:c.testAlphanumeric(f)?i.ALPHANUMERIC:c.testKanji(f)?i.KANJI:i.BYTE},i.toString=function(f){if(f&&f.id)return f.id;throw new Error("Invalid mode")},i.isValid=function(f){return f&&f.bit&&f.ccBits};function o(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return i.NUMERIC;case"alphanumeric":return i.ALPHANUMERIC;case"kanji":return i.KANJI;case"byte":return i.BYTE;default:throw new Error("Unknown mode: "+s)}}i.from=function(f,m){if(i.isValid(f))return f;try{return o(f)}catch{return m}}})(Bf)),Bf}var hy;function I3(){return hy||(hy=1,(function(i){const r=ha(),c=Dp(),o=Gd(),s=va(),f=Up(),m=7973,v=r.getBCHDigit(m);function p(E,A,j){for(let D=1;D<=40;D++)if(A<=i.getCapacity(D,j,E))return D}function b(E,A){return s.getCharCountIndicator(E,A)+4}function S(E,A){let j=0;return E.forEach(function(D){const L=b(D.mode,A);j+=L+D.getBitsLength()}),j}function y(E,A){for(let j=1;j<=40;j++)if(S(E,j)<=i.getCapacity(j,A,s.MIXED))return j}i.from=function(A,j){return f.isValid(A)?parseInt(A,10):j},i.getCapacity=function(A,j,D){if(!f.isValid(A))throw new Error("Invalid QR Code version");typeof D>"u"&&(D=s.BYTE);const L=r.getSymbolTotalCodewords(A),Y=c.getTotalCodewordsCount(A,j),G=(L-Y)*8;if(D===s.MIXED)return G;const k=G-b(D,A);switch(D){case s.NUMERIC:return Math.floor(k/10*3);case s.ALPHANUMERIC:return Math.floor(k/11*2);case s.KANJI:return Math.floor(k/13);case s.BYTE:default:return Math.floor(k/8)}},i.getBestVersionForData=function(A,j){let D;const L=o.from(j,o.M);if(Array.isArray(A)){if(A.length>1)return y(A,L);if(A.length===0)return 1;D=A[0]}else D=A;return p(D.mode,D.getLength(),L)},i.getEncodedBits=function(A){if(!f.isValid(A)||A<7)throw new Error("Invalid QR Code version");let j=A<<12;for(;r.getBCHDigit(j)-v>=0;)j^=m<=0;)p^=r<0&&(f=this.data.substr(s),m=parseInt(f,10),o.put(m,v*3+1))},qf=r,qf}var Gf,yy;function P3(){if(yy)return Gf;yy=1;const i=va(),r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function c(o){this.mode=i.ALPHANUMERIC,this.data=o}return c.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},c.prototype.getLength=function(){return this.data.length},c.prototype.getBitsLength=function(){return c.getBitsLength(this.data.length)},c.prototype.write=function(s){let f;for(f=0;f+2<=this.data.length;f+=2){let m=r.indexOf(this.data[f])*45;m+=r.indexOf(this.data[f+1]),s.put(m,11)}this.data.length%2&&s.put(r.indexOf(this.data[f]),6)},Gf=c,Gf}var Yf,py;function $3(){if(py)return Yf;py=1;const i=va();function r(c){this.mode=i.BYTE,typeof c=="string"?this.data=new TextEncoder().encode(c):this.data=new Uint8Array(c)}return r.getBitsLength=function(o){return o*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(c){for(let o=0,s=this.data.length;o=33088&&f<=40956)f-=33088;else if(f>=57408&&f<=60351)f-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+` +Make sure your charset is UTF-8`);f=(f>>>8&255)*192+(f&255),o.put(f,13)}},Vf=c,Vf}var Qf={exports:{}},xy;function eN(){return xy||(xy=1,(function(i){var r={single_source_shortest_paths:function(c,o,s){var f={},m={};m[o]=0;var v=r.PriorityQueue.make();v.push(o,0);for(var p,b,S,y,E,A,j,D,L;!v.empty();){p=v.pop(),b=p.value,y=p.cost,E=c[b]||{};for(S in E)E.hasOwnProperty(S)&&(A=E[S],j=y+A,D=m[S],L=typeof m[S]>"u",(L||D>j)&&(m[S]=j,v.push(S,j),f[S]=b))}if(typeof s<"u"&&typeof m[s]>"u"){var Y=["Could not find a path from ",o," to ",s,"."].join("");throw new Error(Y)}return f},extract_shortest_path_from_predecessor_list:function(c,o){for(var s=[],f=o;f;)s.push(f),c[f],f=c[f];return s.reverse(),s},find_path:function(c,o,s){var f=r.single_source_shortest_paths(c,o,s);return r.extract_shortest_path_from_predecessor_list(f,s)},PriorityQueue:{make:function(c){var o=r.PriorityQueue,s={},f;c=c||{};for(f in o)o.hasOwnProperty(f)&&(s[f]=o[f]);return s.queue=[],s.sorter=c.sorter||o.default_sorter,s},default_sorter:function(c,o){return c.cost-o.cost},push:function(c,o){var s={value:c,cost:o};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};i.exports=r})(Qf)),Qf.exports}var Sy;function tN(){return Sy||(Sy=1,(function(i){const r=va(),c=F3(),o=P3(),s=$3(),f=W3(),m=Bp(),v=ha(),p=eN();function b(Y){return unescape(encodeURIComponent(Y)).length}function S(Y,G,k){const V=[];let I;for(;(I=Y.exec(k))!==null;)V.push({data:I[0],index:I.index,mode:G,length:I[0].length});return V}function y(Y){const G=S(m.NUMERIC,r.NUMERIC,Y),k=S(m.ALPHANUMERIC,r.ALPHANUMERIC,Y);let V,I;return v.isKanjiModeEnabled()?(V=S(m.BYTE,r.BYTE,Y),I=S(m.KANJI,r.KANJI,Y)):(V=S(m.BYTE_KANJI,r.BYTE,Y),I=[]),G.concat(k,V,I).sort(function(T,z){return T.index-z.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function E(Y,G){switch(G){case r.NUMERIC:return c.getBitsLength(Y);case r.ALPHANUMERIC:return o.getBitsLength(Y);case r.KANJI:return f.getBitsLength(Y);case r.BYTE:return s.getBitsLength(Y)}}function A(Y){return Y.reduce(function(G,k){const V=G.length-1>=0?G[G.length-1]:null;return V&&V.mode===k.mode?(G[G.length-1].data+=k.data,G):(G.push(k),G)},[])}function j(Y){const G=[];for(let k=0;k=0&&ne<=6&&(ue===0||ue===6)||ue>=0&&ue<=6&&(ne===0||ne===6)||ne>=2&&ne<=4&&ue>=2&&ue<=4?R.set(W+ne,P+ue,!0,!0):R.set(W+ne,P+ue,!1,!0))}}function j(R){const T=R.size;for(let z=8;z>ne&1)===1,R.set(te,W,P,!0),R.set(W,te,P,!0)}function Y(R,T,z){const Z=R.size,te=S.getEncodedBits(T,z);let W,P;for(W=0;W<15;W++)P=(te>>W&1)===1,W<6?R.set(W,8,P,!0):W<8?R.set(W+1,8,P,!0):R.set(Z-15+W,8,P,!0),W<8?R.set(8,Z-W-1,P,!0):W<9?R.set(8,15-W-1+1,P,!0):R.set(8,15-W-1,P,!0);R.set(Z-8,8,1,!0)}function G(R,T){const z=R.size;let Z=-1,te=z-1,W=7,P=0;for(let ne=z-1;ne>0;ne-=2)for(ne===6&&ne--;;){for(let ue=0;ue<2;ue++)if(!R.isReserved(te,ne-ue)){let ge=!1;P>>W&1)===1),R.set(te,ne-ue,ge),W--,W===-1&&(P++,W=7)}if(te+=Z,te<0||z<=te){te-=Z,Z=-Z;break}}}function k(R,T,z){const Z=new c;z.forEach(function(ue){Z.put(ue.mode.bit,4),Z.put(ue.getLength(),y.getCharCountIndicator(ue.mode,R)),ue.write(Z)});const te=i.getSymbolTotalCodewords(R),W=v.getTotalCodewordsCount(R,T),P=(te-W)*8;for(Z.getLengthInBits()+4<=P&&Z.put(0,4);Z.getLengthInBits()%8!==0;)Z.putBit(0);const ne=(P-Z.getLengthInBits())/8;for(let ue=0;ue=7&&L(ue,T),G(ue,P),isNaN(Z)&&(Z=m.getBestMask(ue,Y.bind(null,ue,z))),m.applyMask(Z,ue),Y(ue,z,Z),{modules:ue,version:T,errorCorrectionLevel:z,maskPattern:Z,segments:te}}return Tf.create=function(T,z){if(typeof T>"u"||T==="")throw new Error("No input text");let Z=r.M,te,W;return typeof z<"u"&&(Z=r.from(z.errorCorrectionLevel,r.M),te=b.from(z.version),W=m.from(z.maskPattern),z.toSJISFunc&&i.setToSJISFunction(z.toSJISFunc)),I(T,te,Z,W)},Tf}var Xf={},Zf={},Cy;function kp(){return Cy||(Cy=1,(function(i){function r(c){if(typeof c=="number"&&(c=c.toString()),typeof c!="string")throw new Error("Color should be defined as hex string");let o=c.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+c);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(f){return[f,f]}))),o.length===6&&o.push("F","F");const s=parseInt(o.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+o.slice(0,6).join("")}}i.getOptions=function(o){o||(o={}),o.color||(o.color={});const s=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,f=o.width&&o.width>=21?o.width:void 0,m=o.scale||4;return{width:f,scale:f?4:m,margin:s,color:{dark:r(o.color.dark||"#000000ff"),light:r(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},i.getScale=function(o,s){return s.width&&s.width>=o+s.margin*2?s.width/(o+s.margin*2):s.scale},i.getImageWidth=function(o,s){const f=i.getScale(o,s);return Math.floor((o+s.margin*2)*f)},i.qrToImageData=function(o,s,f){const m=s.modules.size,v=s.modules.data,p=i.getScale(m,f),b=Math.floor((m+f.margin*2)*p),S=f.margin*p,y=[f.color.light,f.color.dark];for(let E=0;E=S&&A>=S&&E"u"&&(!m||!m.getContext)&&(p=m,m=void 0),m||(b=o()),p=r.getOptions(p);const S=r.getImageWidth(f.modules.size,p),y=b.getContext("2d"),E=y.createImageData(S,S);return r.qrToImageData(E.data,f,p),c(y,b,S),y.putImageData(E,0,0),b},i.renderToDataURL=function(f,m,v){let p=v;typeof p>"u"&&(!m||!m.getContext)&&(p=m,m=void 0),p||(p={});const b=i.render(f,m,p),S=p.type||"image/png",y=p.rendererOpts||{};return b.toDataURL(S,y.quality)}})(Xf)),Xf}var Kf={},wy;function aN(){if(wy)return Kf;wy=1;const i=kp();function r(s,f){const m=s.a/255,v=f+'="'+s.hex+'"';return m<1?v+" "+f+'-opacity="'+m.toFixed(2).slice(1)+'"':v}function c(s,f,m){let v=s+f;return typeof m<"u"&&(v+=" "+m),v}function o(s,f,m){let v="",p=0,b=!1,S=0;for(let y=0;y0&&E>0&&s[y-1]||(v+=b?c("M",E+m,.5+A+m):c("m",p,0),p=0,b=!1),E+1':"",A="',j='viewBox="0 0 '+y+" "+y+'"',L=''+E+A+` +`;return typeof v=="function"&&v(null,L),L},Kf}var Ty;function iN(){if(Ty)return si;Ty=1;const i=L3(),r=nN(),c=lN(),o=aN();function s(f,m,v,p,b){const S=[].slice.call(arguments,1),y=S.length,E=typeof S[y-1]=="function";if(!E&&!i())throw new Error("Callback required as last argument");if(E){if(y<2)throw new Error("Too few arguments provided");y===2?(b=v,v=m,m=p=void 0):y===3&&(m.getContext&&typeof b>"u"?(b=p,p=void 0):(b=p,p=v,v=m,m=void 0))}else{if(y<1)throw new Error("Too few arguments provided");return y===1?(v=m,m=p=void 0):y===2&&!m.getContext&&(p=v,v=m,m=void 0),new Promise(function(A,j){try{const D=r.create(v,p);A(f(D,m,p))}catch(D){j(D)}})}try{const A=r.create(v,p);b(null,f(A,m,p))}catch(A){b(A)}}return si.create=r.create,si.toCanvas=s.bind(null,c.render),si.toDataURL=s.bind(null,c.renderToDataURL),si.toString=s.bind(null,function(f,m,v){return o.render(f,v)}),si}var uN=iN();const If=sd(uN),rN=()=>{const{showWechatModal:i,setShowWechatModal:r,showToast:c,fetchTelemetry:o}=Pn(),[s,f]=x.useState(null),[m,v]=x.useState(""),[p,b]=x.useState(!1),[S,y]=x.useState(""),[E,A]=x.useState(!1),j=async()=>{var k;b(!0);try{const I=await(await fetch("/api/clawbot/qrcode",{method:"POST"})).json();f(I);const R=(k=I==null?void 0:I.login)==null?void 0:k.qrcode_url;if(R){const T=await If.toDataURL(R,{width:240,margin:2,color:{dark:"#09090b",light:"#ffffff"}});v(T)}}catch{c("获取微信 ClawBot 二维码失败")}finally{b(!1)}};x.useEffect(()=>{if(!i)return;let k=!1;(async()=>{var R,T,z;try{const te=await(await fetch("/api/clawbot/status")).json();if(k)return;if(f(te),!te.connected&&(!((R=te.login)!=null&&R.active)||!((T=te.login)!=null&&T.qrcode_url)))await j();else if((z=te.login)!=null&&z.qrcode_url){const W=await If.toDataURL(te.login.qrcode_url,{width:240,margin:2,color:{dark:"#09090b",light:"#ffffff"}});k||v(W)}}catch{}})();const I=setInterval(async()=>{var R;try{const T=await fetch("/api/clawbot/status");if(!T.ok)return;const z=await T.json();if(k)return;if(f(z),(R=z.login)!=null&&R.qrcode_url){const Z=await If.toDataURL(z.login.qrcode_url,{width:240,margin:2,color:{dark:"#09090b",light:"#ffffff"}});k||v(Z)}}catch{}},1500);return()=>{k=!0,clearInterval(I)}},[i]);const D=async k=>{if(k.preventDefault(),!!S.trim()){A(!0);try{const I=await(await fetch("/api/clawbot/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:S.trim()})})).json();f(I),y(""),c("配对码已提交,正在等待微信验证...")}catch{c("配对码提交失败")}finally{A(!1)}}},L=async()=>{try{const V=await(await fetch("/api/clawbot/disconnect",{method:"POST"})).json();f(V),v(""),o(),c("已断开微信 ClawBot 连接")}catch{c("断开失败")}},Y=!!(s!=null&&s.connected),G=s==null?void 0:s.login;return h.jsx(Ud,{open:i,onOpenChange:r,children:h.jsxs(Eo,{className:"max-w-lg p-6 space-y-5",children:[h.jsx("div",{className:"flex items-start justify-between gap-3 border-b hl-border pb-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center border hl-border shrink-0",style:{backgroundColor:"rgba(16, 185, 129, 0.14)",color:"var(--success)"},children:h.jsx(My,{className:"w-5 h-5"})}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Co,{className:"text-sm font-bold",children:"微信 ClawBot · M6 Mac mini 直连通道"}),h.jsx(Jn,{variant:Y?"success":"accent",children:Y?"已连接在线":"扫码绑定"})]}),h.jsx(No,{className:"text-xs font-mono-num mt-0.5",children:"@tencent-weixin/openclaw-weixin · ilinkai.weixin.qq.com"})]})]})}),Y?h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"p-4 rounded-xl border flex items-center justify-between",style:{backgroundColor:"var(--success-soft)",borderColor:"rgba(16, 185, 129, 0.3)"},children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(r2,{className:"w-5 h-5 shrink-0",style:{color:"var(--success)"}}),h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-bold",children:"微信 ClawBot 长轮询守护线程运行中"}),h.jsxs("div",{className:"text-[11px] font-mono-num mt-0.5",style:{color:"var(--text-muted)"},children:["Bot ID: ",s==null?void 0:s.bot_id," · 累计收发: ",(s==null?void 0:s.msg_count)??0," 条"]})]})]}),h.jsxs(nt,{variant:"outline",size:"sm",onClick:L,children:[h.jsx(V2,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"重新绑定"})]})]}),h.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border space-y-2.5 text-xs",children:[h.jsx("div",{className:"font-semibold",children:"📱 现在打开手机微信「微信 ClawBot」可直接发送:"}),h.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 font-mono-num text-[11px]",children:[h.jsxs("div",{className:"p-2 rounded hl-card",children:[h.jsx("span",{style:{color:"var(--accent)"},children:"状态"})," · 查看 M6 & 极空间遥测"]}),h.jsxs("div",{className:"p-2 rounded hl-card",children:[h.jsx("span",{style:{color:"var(--accent)"},children:"备份"})," · 立即打包备份至 20TB NAS"]}),h.jsxs("div",{className:"p-2 rounded hl-card",children:[h.jsx("span",{style:{color:"var(--accent)"},children:"屏幕"})," · 截取 AGY 终端实时画面"]}),h.jsxs("div",{className:"p-2 rounded hl-card",children:[h.jsx("span",{style:{color:"var(--accent)"},children:"$ df -h"})," · 执行任意 Mac mini 命令"]}),h.jsxs("div",{className:"p-2 rounded hl-card sm:col-span-2",children:[h.jsx("span",{style:{color:"var(--accent)"},children:"> 你好"})," 或直接发任意问题 · 注入 AGY 终端或调用 AI 回答"]})]})]})]}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex flex-col items-center justify-center p-5 rounded-xl hl-muted border hl-border space-y-3",children:[m?h.jsx("div",{className:"p-3 bg-white rounded-xl shadow-md border",children:h.jsx("img",{src:m,alt:"WeChat ClawBot QR Code",className:"w-48 h-48 block"})}):h.jsx("div",{className:"w-48 h-48 rounded-xl hl-card flex items-center justify-center text-xs font-mono-num",children:p?"正在向微信申请二维码...":"点击下方按钮生成二维码"}),h.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-center",children:[h.jsx(B2,{className:"w-4 h-4 shrink-0",style:{color:"var(--accent)"}}),h.jsx("span",{children:(G==null?void 0:G.message)||"请使用手机微信扫描上方二维码启用 ClawBot"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(nt,{variant:"outline",size:"sm",onClick:j,disabled:p,children:[h.jsx(R2,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:p?"刷新中...":"刷新二维码"})]}),(G==null?void 0:G.qrcode_url)&&h.jsx(nt,{variant:"ghost",size:"sm",asChild:!0,children:h.jsxs("a",{href:G.qrcode_url,target:"_blank",rel:"noopener noreferrer",className:"font-mono-num",children:[h.jsx(_2,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"打开备用链接 ↗"})]})})]})]}),(G==null?void 0:G.status)==="need_verifycode"&&h.jsxs("form",{onSubmit:D,className:"p-4 rounded-xl border space-y-2.5",style:{backgroundColor:"var(--accent-soft)",borderColor:"var(--accent)"},children:[h.jsx("label",{className:"block text-xs font-bold",children:"🔢 手机微信上显示了配对数字,请在下方输入:"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Bd,{type:"text",value:S,onChange:k=>y(k.target.value),placeholder:"输入手机微信显示的 6 位数字...",className:"font-mono-num",autoFocus:!0}),h.jsxs(nt,{type:"submit",disabled:E,children:[h.jsx(M2,{className:"w-3.5 h-3.5"}),h.jsx("span",{children:"验证"})]})]})]})]}),h.jsx("div",{className:"flex items-center justify-end pt-1",children:h.jsx(nt,{variant:"outline",onClick:()=>r(!1),children:"关闭窗口"})})]})})},oN={light:{id:"light",name:"Shadcn Clean Light (浅色纯净)",description:"对标 Apple / Stripe / Linear 浅色日光模式,高对比深灰文字配纯净白卡片与冷灰微边框。",tokens:{"--bg-page":"#f8fafc","--bg-card":"#ffffff","--bg-widget":"#f8fafc","--bg-muted":"#f1f5f9","--bg-hover":"#ffffff","--text-main":"#0f172a","--text-muted":"#64748b","--text-subtle":"#94a3b8","--border-color":"#e2e8f0","--border-hover":"#cbd5e1","--primary":"#0f172a","--primary-fg":"#ffffff","--accent":"#2563eb","--accent-soft":"rgba(37, 99, 235, 0.08)","--success":"#10b981","--success-soft":"rgba(16, 185, 129, 0.10)"}},dark:{id:"dark",name:"Catppuccin / Linear Dark (深色极客)",description:"融合 Catppuccin Mocha 与 Linear 暗黑规范,柔和护眼的深邃蓝黑基底配高辨识度状态色。",tokens:{"--bg-page":"#11111b","--bg-card":"#1e1e2e","--bg-widget":"#181825","--bg-muted":"#313244","--bg-hover":"#242438","--text-main":"#cdd6f4","--text-muted":"#a6adc8","--text-subtle":"#6c7086","--border-color":"#313244","--border-hover":"#45475a","--primary":"#cba6f7","--primary-fg":"#11111b","--accent":"#89b4fa","--accent-soft":"rgba(137, 180, 250, 0.15)","--success":"#a6e3a1","--success-soft":"rgba(166, 227, 161, 0.15)"}}},yo={"homepage-3col":{id:"homepage-3col",name:"Homepage 经典三列矩阵 (3-Column Grid)",description:"gethomepage.dev 标志性对称 3 列分组卡片,底部内嵌 3 格实时遥测单元。",gridClass:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},"bento-split":{id:"bento-split",name:"Shadcn 双列宽屏卡片 (2-Column Wide Bento)",description:"适合大字号阅读的 2 列宽体卡片布局,留白更充裕。",gridClass:"grid-cols-1 lg:grid-cols-2 gap-5"},"compact-2col":{id:"compact-2col",name:"高密度四列紧凑矩阵 (4-Column Dense)",description:"适合超宽显示器的一屏高密度 4 列布局。",gridClass:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3.5"}},cN=()=>{const[i,r]=x.useState("form-inputs"),{theme:c,resolvedTheme:o,layoutPreset:s,setTheme:f,setLayoutPreset:m,setViewMode:v,setShowCmdPalette:p,telemetry:b,showToast:S}=Pn(),[y,E]=x.useState(!0),[A,j]=x.useState("drawer"),[D,L]=x.useState(""),[Y,G]=x.useState("192.168.31.164"),[k,V]=x.useState(!0),I=[{id:"layout-architecture",group:"FOUNDATIONS / 架构与布局",title:"01. AppShell 双层顶栏与网格布局",icon:h.jsx(w2,{className:"w-3.5 h-3.5"})},{id:"theme-tokens",group:"FOUNDATIONS / 架构与布局",title:"02. 双主题色板与自动切换规范",icon:h.jsx(C2,{className:"w-3.5 h-3.5"})},{id:"form-inputs",group:"SHADCN / RADIX UI 组件",title:"03. shadcn/ui + Radix 原语与认证弹窗",icon:h.jsx(_0,{className:"w-3.5 h-3.5"})},{id:"service-card",group:"SHADCN / RADIX UI 组件",title:"04. ServiceCard 内联遥测卡片",icon:h.jsx(h2,{className:"w-3.5 h-3.5"})},{id:"ssh-shelf",group:"SHADCN / RADIX UI 组件",title:"05. SshShelf 快捷指令栏",icon:h.jsx(md,{className:"w-3.5 h-3.5"})}];return h.jsx("div",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6",children:h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 items-start",children:[h.jsxs(Ol,{className:"p-4 space-y-4 lg:sticky lg:top-20",children:[h.jsxs("div",{className:"flex items-center justify-between border-b hl-border pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Oy,{className:"w-4 h-4",style:{color:"var(--accent)"}}),h.jsx("span",{className:"text-xs font-bold uppercase tracking-wider",children:"shadcn/ui 组件库"})]}),h.jsx(Jn,{variant:"accent",children:"Radix + cmdk"})]}),h.jsx("div",{className:"space-y-1",children:I.map(R=>h.jsxs("button",{onClick:()=>r(R.id),className:"w-full px-3 py-2 rounded-lg text-left text-xs font-medium flex items-center gap-2.5 transition-all cursor-pointer",style:i===R.id?{backgroundColor:"var(--accent-soft)",color:"var(--accent)"}:{color:"var(--text-muted)"},children:[R.icon,h.jsx("span",{className:"truncate",children:R.title})]},R.id))}),h.jsxs("div",{className:"pt-3 border-t hl-border space-y-2 text-xs",children:[h.jsx("div",{className:"text-[11px] font-semibold",style:{color:"var(--text-muted)"},children:"全局外观状态预览 (@radix-ui/react-tabs)"}),h.jsx(ed,{value:c,onValueChange:R=>f(R),children:h.jsxs(ho,{className:"w-full grid grid-cols-3",children:[h.jsx(ua,{value:"system",children:"自动"}),h.jsx(ua,{value:"light",children:"浅色"}),h.jsx(ua,{value:"dark",children:"深色"})]})}),h.jsx(nt,{onClick:()=>v("dashboard"),className:"w-full mt-2",children:"返回中控台主页"})]})]}),h.jsxs("div",{className:"lg:col-span-3 space-y-6",children:[i==="layout-architecture"&&h.jsx("div",{className:"space-y-6",children:h.jsxs(Ol,{className:"p-6 space-y-4",children:[h.jsx("div",{className:"flex items-center justify-between border-b hl-border pb-4",children:h.jsxs("div",{children:[h.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Foundations / AppShell Layout"}),h.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"标准双层顶栏架构 (Two-Tier AppShell) & 响应式网格切换"})]})}),h.jsxs("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-muted)"},children:["参考 ",h.jsx("strong",{children:"Vercel Geist / shadcn/ui Dashboard-01 / GitHub AppShell"})," ","标准规范,将原本容易挤压折行的单层顶栏拆分为职责清晰的双层结构:"]}),h.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border space-y-2.5 font-mono-num text-xs",children:[h.jsxs("div",{className:"p-3 rounded-lg hl-card flex items-center justify-between",children:[h.jsx("span",{children:"[左] 🍎 HomeLab · Radix Tabs 切换 (中控台 / Storybook)"}),h.jsx("span",{style:{color:"var(--accent)"},children:"[最右固定] 🔍 搜索 ⌘K · >_ AGY 终端 · ☀️/🌙 主题切换"})]}),h.jsxs("div",{className:"p-3 rounded-lg hl-card flex items-center justify-between",children:[h.jsx("span",{style:{color:"var(--success)"},children:"[左] 实时硬件遥测条 (M6 CPU · RAM · Z4 20TB · SG 专线)"}),h.jsx("span",{children:"[右对齐] Radix Tabs 路由切换器 (智能路由 / 443 / 10443 / LAN)"})]})]}),h.jsxs("div",{className:"pt-2 space-y-3",children:[h.jsx("div",{className:"text-xs font-semibold",children:"选择主页卡片网格布局预设(点击立即应用到主页):"}),h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3.5",children:Object.keys(yo).map(R=>{const T=yo[R],z=s===R;return h.jsxs("div",{onClick:()=>m(R),className:"hl-card hl-card-interactive p-4 cursor-pointer space-y-2",style:z?{borderColor:"var(--accent)"}:{},children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"text-xs font-bold",children:T.name}),z&&h.jsx("span",{className:"w-4 h-4 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--accent)",color:"#fff"},children:h.jsx(i2,{className:"w-2.5 h-2.5"})})]}),h.jsx("p",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:T.description}),h.jsx("code",{className:"text-[10px] font-mono-num block pt-1",style:{color:"var(--accent)"},children:T.gridClass})]},R)})})]})]})}),i==="theme-tokens"&&h.jsxs(Ol,{className:"p-6 space-y-6",children:[h.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Foundations / Color System"}),h.jsxs("h2",{className:"text-lg font-bold mt-0.5",children:["主流双主题色板规范(当前生效:",o==="dark"?"深色极客":"浅色纯净",")"]})]}),h.jsxs(Jn,{variant:"secondary",children:["模式: ",c==="system"?"跟随设备自动切换":"手动锁定"]})]}),h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:["light","dark"].map(R=>{const T=oN[R];return h.jsxs("div",{className:"rounded-xl p-5 space-y-4 border",style:{backgroundColor:T.tokens["--bg-page"],color:T.tokens["--text-main"],borderColor:T.tokens["--border-color"]},children:[h.jsxs("div",{className:"flex items-center justify-between border-b pb-3",style:{borderColor:T.tokens["--border-color"]},children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold",children:T.name}),h.jsx("div",{className:"text-xs mt-0.5",style:{color:T.tokens["--text-muted"]},children:T.description})]}),h.jsx("button",{onClick:()=>f(R),className:"px-2.5 py-1 rounded-md text-xs font-mono-num font-semibold cursor-pointer",style:{backgroundColor:T.tokens["--primary"],color:T.tokens["--primary-fg"]},children:"预览此主题"})]}),h.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(T.tokens).map(([z,Z])=>h.jsxs("div",{className:"p-2 rounded-lg border flex items-center gap-2",style:{backgroundColor:T.tokens["--bg-card"],borderColor:T.tokens["--border-color"]},children:[h.jsx("span",{className:"w-5 h-5 rounded border shrink-0",style:{backgroundColor:Z,borderColor:T.tokens["--border-hover"]}}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-[10px] font-mono-num font-semibold truncate",children:z}),h.jsx("div",{className:"text-[10px] font-mono-num truncate",style:{color:T.tokens["--text-muted"]},children:Z})]})]},z))})]},T.id)})})]}),i==="form-inputs"&&h.jsxs(Ol,{className:"p-6 space-y-6",children:[h.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"src/components/ui/* · Official shadcn/ui + Radix Primitives + cmdk"}),h.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"开源 `shadcn/ui` 组件库(`Input` / `Button` / `Switch` / `Badge` / `CommandDialog` / `AuthGateCard`)"})]}),h.jsx(_0,{className:"w-4 h-4",style:{color:"var(--accent)"}})]}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 items-start",children:[h.jsxs("div",{className:"p-5 rounded-xl hl-muted border hl-border space-y-4",children:[h.jsx("div",{className:"text-xs font-bold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"1. `src/components/ui/*` 标准原语展示"}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"Button 变体 (`cva` + `@radix-ui/react-slot`)"}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(nt,{variant:"default",children:"Primary 主按钮"}),h.jsx(nt,{variant:"outline",children:"Outline 描边"}),h.jsx(nt,{variant:"secondary",children:"Secondary 次级"}),h.jsx(nt,{variant:"accent",children:"Accent 高亮"}),h.jsx(nt,{variant:"ghost",onClick:()=>p(!0),children:"唤起 cmdk 面板 ⌘K"})]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"Badge 标签与 `@radix-ui/react-switch` 开关"}),h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 p-2.5 rounded-lg hl-card",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx(Jn,{variant:"default",children:"Default"}),h.jsx(Jn,{variant:"accent",children:"Radix UI"}),h.jsx(Jn,{variant:"success",children:"Online"}),h.jsx(Jn,{variant:"outline",children:"v3.2"})]}),h.jsx(go,{checked:k,onCheckedChange:V})]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"`InputGroup` 组合输入框"}),h.jsxs(vo,{children:[h.jsx(dd,{className:"w-4 h-4 shrink-0",style:{color:"var(--text-subtle)"}}),h.jsx("input",{type:"text",value:D,onChange:R=>L(R.target.value),placeholder:"搜索服务、SSH 指令或节点..."}),h.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-card border hl-border",style:{color:"var(--text-muted)"},children:"⌘K"})]})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx("label",{className:"block text-xs font-medium",style:{color:"var(--text-muted)"},children:"`Input` 等宽字体输入框"}),h.jsx(Bd,{type:"text",value:Y,onChange:R=>G(R.target.value),className:"font-mono-num",placeholder:"192.168.31.164"})]})]}),h.jsx("div",{className:"flex flex-col items-center",children:h.jsx(qd,{embedded:!0,targetUrl:"https://agy.961504.xyz",onSuccess:()=>S("SSO 认证成功!已签发 30 天全域名通行 Cookie")})})]})]}),i==="service-card"&&h.jsxs(Ol,{className:"p-6 space-y-6",children:[h.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Components / ServiceCard"}),h.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"三段式内联遥测卡片 (ServiceCard Interactive Story)"})]}),h.jsx(H2,{className:"w-4 h-4",style:{color:"var(--accent)"}})]}),h.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border flex flex-wrap items-center gap-6 text-xs",children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("span",{className:"font-semibold",children:"在线状态 (online):"}),h.jsx(go,{checked:y,onCheckedChange:E}),h.jsx("span",{className:"font-mono-num",children:y?"true":"false"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"font-semibold",children:"右上角动作按钮 (actionType):"}),["drawer","backup",void 0].map((R,T)=>h.jsx(nt,{variant:A===R?"accent":"outline",size:"sm",onClick:()=>j(R),className:"font-mono-num",children:R||"route-badge"},T))]})]}),h.jsx("div",{className:"max-w-md mx-auto py-4",children:h.jsx(B1,{card:{id:"agy",title:"AGY 云端工作台",subtitle:"agy.961504.xyz · ttyd + tmux",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",online:y,actionType:A,desc:"M6 Mac mini 上的 24 小时常驻 AI 编程终端,已同步 Google 登录态并锁定新加坡出口,关掉网页后台继续运行。",edgeUrl:"https://agy.961504.xyz",homeUrl:"https://agy.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:7681",stats:[{label:"M6 CPU 负载",value:`${b.mini.cpu_pct}%`},{label:"已用内存",value:`${b.mini.mem_used_gb} / 24 GB`},{label:"tmux 会话",value:"常驻运行中",highlight:!0}]}})})]}),i==="ssh-shelf"&&h.jsxs(Ol,{className:"p-6 space-y-6",children:[h.jsxs("div",{className:"border-b hl-border pb-4",children:[h.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Components / SshShelf"}),h.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"底部 SSH 快捷复制与运维操作栏"})]}),h.jsx(k1,{})]})]})]})})},sN=()=>{var A;const{telemetry:i,toast:r,viewMode:c,layoutPreset:o,fetchTelemetry:s,setShowCmdPalette:f,getEffectiveMode:m,routeMode:v}=Pn(),[p,b]=x.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("auth_redirect"));x.useEffect(()=>{s();const j=setInterval(s,3e3),D=L=>{(L.metaKey||L.ctrlKey)&&L.key.toLowerCase()==="k"&&(L.preventDefault(),f(!0))};return window.addEventListener("keydown",D),()=>{clearInterval(j),window.removeEventListener("keydown",D)}},[s,f]);const S=x.useMemo(()=>{const j=m();return j==="lan"?"LAN 局域网极速直连 (192.168.31.x)":j==="home10443"?"10443 家宽公网 HTTPS 直连":"443 免端口 HTTPS 直达 (*.961504.xyz)"},[m,v]),y=((A=yo[o])==null?void 0:A.gridClass)||yo["homepage-3col"].gridClass,E=x.useMemo(()=>{const j=i;return[{title:"核心工作台与私有云存储",subtitle:"Core Workbench & Storage",showRouteHint:!0,items:[{id:"agy",title:"AGY 云端工作台",subtitle:"agy.961504.xyz · ttyd + tmux",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",online:j.services.agy,actionType:"drawer",desc:"M6 Mac mini 上的 24 小时常驻 AI 编程终端,已同步 Google 登录态并锁定新加坡出口,关掉网页后台继续运行。",edgeUrl:"https://agy.961504.xyz",homeUrl:"https://agy.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:7681",stats:[{label:"M6 CPU 负载",value:`${j.mini.cpu_pct}%`},{label:"已用内存",value:`${j.mini.mem_used_gb} / 24 GB`},{label:"tmux 会话",value:j.mini.agy_tmux?"常驻运行中":"待机",highlight:!0}]},{id:"zspace",title:"极空间 Z4 私有云",subtitle:"192.168.31.185 · 20TB RAID 存储池",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/synology-drive.png",online:j.services.nas,desc:"家庭 20TB 大容量存储中心、极影视蓝光影院与手机相册备份,已自动 SMB 挂载至 Mac mini ~/nas。",edgeUrl:"https://z4.home.961504.xyz:10443",homeUrl:"https://z4.home.961504.xyz:10443",lanUrl:"http://192.168.31.185:5055",stats:[{label:"剩余可用",value:`${j.nas.free_tb} TB`,highlight:!0},{label:"已用容量",value:`${j.nas.used_tb} TB (${j.nas.pct}%)`},{label:"SMB 挂载",value:j.nas.mounted?"~/nas 已挂载":"重连中"}]},{id:"vaultwarden",title:"Vaultwarden 密码保险箱",subtitle:"vw.961504.xyz · Bitwarden 兼容",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/vaultwarden.png",online:j.services.vaultwarden,actionType:"backup",desc:"自托管全平台加密密码库,支持 iOS / Android / 浏览器插件自动填充,每天凌晨 03:30 自动打包灾备至极空间。",edgeUrl:"https://vw.961504.xyz",homeUrl:"https://vw.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:8222",stats:[{label:"容器状态",value:"Healthy",highlight:!0},{label:"最近极空间灾备",value:j.nas.latest_backup},{label:"Mac SSD 占用",value:`${j.mini.disk_pct}%`}]}]},{title:"网络网关、AI 专线与外部哨兵",subtitle:"Network Gateway & Cloud Edge",showRouteHint:!1,items:[{id:"clash",title:"Mihomo 路由分流面板",subtitle:"192.168.31.1:9999 · ShellCrash",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/clash.png",online:j.services.clash,desc:"小米主路由器透明网关控制台,实时监控全屋设备流量、分流规则与狮城 AI 算力专线锁定状态。",edgeUrl:"https://clash.home.961504.xyz:10443/ui/",homeUrl:"https://clash.home.961504.xyz:10443/ui/",lanUrl:"http://192.168.31.1:9999/ui/",stats:[{label:"AI 锁定策略",value:"狮城节点",highlight:!0},{label:"新加坡延迟",value:j.network.sg_delay_ms>0?`${j.network.sg_delay_ms} ms`:"直连"},{label:"固定出口 IP",value:j.network.sg_egress_ip}]},{id:"router",title:"小米主路由器后台",subtitle:"192.168.31.1 · PPPoE 公网网关",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/openwrt.png",online:j.services.router,desc:"管理家庭联通公网宽带拨号、DHCP 静态 IP 绑定、10443 与 41641 端口转发及全屋内网 Split-DNS。",edgeUrl:"https://router.home.961504.xyz:10443",homeUrl:"https://router.home.961504.xyz:10443",lanUrl:"http://192.168.31.1",stats:[{label:"联通公网 IPv4",value:j.network.home_wan_ip,highlight:!0},{label:"泛域名 DDNS",value:"*.home.961504.xyz"},{label:"内网网关",value:"192.168.31.1"}]},{id:"uptime",title:"Uptime Kuma 外部哨兵",subtitle:"status.961504.xyz · SG Azure",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/uptime-kuma.png",online:j.services.uptime,desc:"独立部署在新加坡 Azure 公有云上的 24 小时外部监控哨兵,通过 Tailscale P2P 专线实时探测家庭服务。",edgeUrl:"https://status.961504.xyz",homeUrl:"https://status.961504.xyz",lanUrl:"https://status.961504.xyz",stats:[{label:"云端公网 IP",value:"104.43.105.243"},{label:"Tailscale 专线",value:"100.115.204.51"},{label:"外部探测状态",value:"100% 在线",highlight:!0}]}]}]},[i]);return h.jsxs("div",{className:"min-h-screen flex flex-col",children:[r&&h.jsxs("div",{className:"fixed bottom-5 right-5 z-50 hl-card px-4 py-3 flex items-center gap-2.5 shadow-2xl",children:[h.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--success)"}}),h.jsx("span",{className:"text-xs font-medium",children:r})]}),h.jsx(qC,{}),c==="storybook"?h.jsx(cN,{}):h.jsxs("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-7",children:[E.map(j=>h.jsxs("section",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between px-0.5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:j.title}),h.jsxs("span",{className:"text-[11px] font-mono-num",style:{color:"var(--text-subtle)"},children:["· ",j.subtitle]})]}),j.showRouteHint&&h.jsxs("span",{className:"text-[11px] font-mono-num hidden sm:inline",style:{color:"var(--text-subtle)"},children:["当前路由模式: ",S]})]}),h.jsx("div",{className:`grid ${y}`,children:j.items.map(D=>h.jsx(B1,{card:D},D.id))})]},j.title)),h.jsx(k1,{})]}),h.jsx(S3,{}),h.jsx(H3,{}),h.jsx(rN,{}),p&&h.jsx("div",{className:"fixed inset-0 z-50 bg-black/75 backdrop-blur-sm flex items-center justify-center p-4",children:h.jsx(qd,{targetUrl:p,onSuccess:()=>{window.location.href=p},onCancel:()=>{b(null),window.history.replaceState({},"","/")}})})]})};QS.createRoot(document.getElementById("root")).render(h.jsx(gu.StrictMode,{children:h.jsx(sN,{})})); diff --git a/stacks/portal/dist/assets/index-YkrrDNrk.css b/stacks/portal/dist/assets/index-YkrrDNrk.css new file mode 100644 index 0000000..73e2e3e --- /dev/null +++ b/stacks/portal/dist/assets/index-YkrrDNrk.css @@ -0,0 +1 @@ +/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.top-\[22\%\]{top:22%}.top-\[50\%\]{top:50%}.right-5{right:calc(var(--spacing) * 5)}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-\[50\%\]{left:50%}.z-30{z-index:30}.z-50{z-index:50}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-14{height:calc(var(--spacing) * 14)}.h-48{height:calc(var(--spacing) * 48)}.h-\[88vh\]{height:88vh}.h-full{height:100%}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-screen{min-height:100vh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-48{width:calc(var(--spacing) * 48)}.w-\[1px\]{width:1px}.w-\[95vw\]{width:95vw}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[260px\]{max-width:260px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 10) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 10) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\[var\(--accent\)\]{border-color:var(--accent)}.bg-\[var\(--accent-soft\)\]{background-color:var(--accent-soft)}.bg-\[var\(--bg-card\)\]{background-color:var(--bg-card)}.bg-\[var\(--primary\)\]{background-color:var(--primary)}.bg-\[var\(--success-soft\)\]{background-color:var(--success-soft)}.bg-black{background-color:var(--color-black)}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-black\/75{background-color:#000000bf}@supports (color:color-mix(in lab,red,red)){.bg-black\/75{background-color:color-mix(in oklab,var(--color-black) 75%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0{padding-top:0}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.text-\[var\(--accent\)\]{color:var(--accent)}.text-\[var\(--primary-fg\)\]{color:var(--primary-fg)}.text-\[var\(--success\)\]{color:var(--success)}.text-\[var\(--text-main\)\]{color:var(--text-main)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.uppercase{text-transform:uppercase}.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, )}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){:is(:where(.group):hover .group-hover\:underline){text-decoration-line:underline}}.placeholder\:text-\[var\(--text-subtle\)\]::placeholder{color:var(--text-subtle)}@media(hover:hover){.hover\:bg-\[var\(--bg-muted\)\]:hover{background-color:var(--bg-muted)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=true\]\:bg-\[var\(--bg-muted\)\][data-selected=true]{background-color:var(--bg-muted)}.data-\[selected\=true\]\:text-\[var\(--text-main\)\][data-selected=true]{color:var(--text-main)}.data-\[state\=active\]\:bg-\[var\(--bg-card\)\][data-state=active]{background-color:var(--bg-card)}.data-\[state\=active\]\:text-\[var\(--text-main\)\][data-state=active]{color:var(--text-main)}.data-\[state\=active\]\:shadow-xs[data-state=active]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-\[var\(--accent\)\][data-state=checked]{border-color:var(--accent)}.data-\[state\=checked\]\:bg-\[var\(--accent\)\][data-state=checked]{background-color:var(--accent)}.data-\[state\=unchecked\]\:translate-x-0\.5[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:border-\[var\(--border-color\)\][data-state=unchecked]{border-color:var(--border-color)}.data-\[state\=unchecked\]\:bg-\[var\(--bg-muted\)\][data-state=unchecked]{background-color:var(--bg-muted)}@media(min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:inline{display:inline}.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\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-8{padding:calc(var(--spacing) * 8)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media(min-width:48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:64rem){.lg\:sticky{position:sticky}.lg\:top-20{top:calc(var(--spacing) * 20)}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-inline:calc(var(--spacing) * 8)}}.\[\&_\[cmdk-group-heading\]\]\:px-2\.5 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-\[10px\] [cmdk-group-heading]{font-size:10px}.\[\&_\[cmdk-group-heading\]\]\:font-semibold [cmdk-group-heading]{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\[cmdk-group-heading\]\]\:tracking-wider [cmdk-group-heading]{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\[\&_\[cmdk-group-heading\]\]\:text-\[var\(--text-subtle\)\] [cmdk-group-heading]{color:var(--text-subtle)}.\[\&_\[cmdk-group-heading\]\]\:uppercase [cmdk-group-heading]{text-transform:uppercase}}:root,[data-theme=dark]{--bg-page:#09090b;--bg-card:#121215;--bg-widget:#16161a;--bg-muted:#18181b;--bg-hover:#1c1c21;--text-main:#f4f4f5;--text-muted:#a1a1aa;--text-subtle:#71717a;--border-color:#27272a;--border-subtle:#ffffff0f;--border-hover:#3f3f46;--primary:#fafafa;--primary-fg:#09090b;--accent:#3b82f6;--accent-soft:#3b82f629;--success:#10b981;--success-soft:#10b98124;--card-shadow:0 4px 16px -4px #0000008c}[data-theme=light]{--bg-page:#f8fafc;--bg-card:#fff;--bg-widget:#f8fafc;--bg-muted:#f1f5f9;--bg-hover:#fff;--text-main:#0f172a;--text-muted:#64748b;--text-subtle:#94a3b8;--border-color:#e2e8f0;--border-subtle:#f1f5f9;--border-hover:#cbd5e1;--primary:#0f172a;--primary-fg:#fff;--accent:#2563eb;--accent-soft:#2563eb1f;--success:#10b981;--success-soft:#10b9811a;--card-shadow:0 1px 3px 0 #0f172a0a, 0 1px 2px -1px #0f172a08}body{background-color:var(--bg-page);color:var(--text-main);-webkit-font-smoothing:antialiased;font-family:Inter,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei,sans-serif;transition:background-color .2s,color .2s}input,textarea,select,button{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;font-family:inherit}input:-webkit-autofill{transition:background-color 5000s ease-in-out;-webkit-text-fill-color:var(--text-main)!important;-webkit-box-shadow:0 0 0px 1000px var(--bg-muted) inset!important}input:-webkit-autofill:hover{transition:background-color 5000s ease-in-out;-webkit-text-fill-color:var(--text-main)!important;-webkit-box-shadow:0 0 0px 1000px var(--bg-muted) inset!important}input:-webkit-autofill:focus{transition:background-color 5000s ease-in-out;-webkit-text-fill-color:var(--text-main)!important;-webkit-box-shadow:0 0 0px 1000px var(--bg-muted) inset!important}textarea:-webkit-autofill{transition:background-color 5000s ease-in-out;-webkit-text-fill-color:var(--text-main)!important;-webkit-box-shadow:0 0 0px 1000px var(--bg-muted) inset!important}.hl-input{background-color:var(--bg-muted);width:100%;color:var(--text-main);border:1px solid var(--border-color);border-radius:.625rem;padding:.55rem .75rem;font-size:.8125rem;line-height:1.25rem;transition:border-color .15s,box-shadow .15s,background-color .15s}.hl-input::placeholder{color:var(--text-subtle)}.hl-input:hover{border-color:var(--border-hover)}.hl-input:focus,.hl-input:focus-visible{background-color:var(--bg-card);border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.hl-input-group{background-color:var(--bg-muted);width:100%;color:var(--text-main);border:1px solid var(--border-color);border-radius:.625rem;align-items:center;gap:.5rem;height:2.375rem;padding:0 .75rem;transition:border-color .15s,box-shadow .15s,background-color .15s;display:flex}.hl-input-group:hover{border-color:var(--border-hover)}.hl-input-group:focus-within{background-color:var(--bg-card);border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.hl-input-group input{min-width:0;height:100%;color:var(--text-main);background:0 0;border:0;flex:1;font-size:.8125rem}.hl-input-group input::placeholder{color:var(--text-subtle)}.font-mono-num{font-variant-numeric:tabular-nums;font-family:JetBrains Mono,SF Mono,Menlo,monospace}.hl-card{background-color:var(--bg-card);border:1px solid var(--border-color);box-shadow:var(--card-shadow);border-radius:.75rem;transition:border-color .16s,transform .16s,box-shadow .16s}.hl-card-interactive:hover{border-color:var(--border-hover);background-color:var(--bg-hover);transform:translateY(-1px)}.hl-widget-footer{background-color:var(--bg-widget);border-top:1px solid var(--border-color)}.hl-pill{background-color:var(--bg-card);border:1px solid var(--border-color);border-radius:.5rem}.hl-muted{background-color:var(--bg-muted)}.hl-border{border-color:var(--border-color)}.hl-btn-primary{background-color:var(--primary);color:var(--primary-fg);border-radius:.5rem;font-weight:500;transition:opacity .15s,transform .1s}.hl-btn-primary:hover{opacity:.9}.hl-btn-primary:active{transform:scale(.99)}.hl-btn-outline{background-color:var(--bg-card);color:var(--text-main);border:1px solid var(--border-color);border-radius:.5rem;transition:background-color .15s,border-color .15s}.hl-btn-outline:hover{background-color:var(--bg-muted);border-color:var(--border-hover)}.hl-bar-fill{background-color:var(--accent);transition:width .5s cubic-bezier(.22,1,.36,1)}.hl-bar-fill-green{background-color:var(--success);transition:width .5s cubic-bezier(.22,1,.36,1)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false} diff --git a/stacks/portal/dist/index.html b/stacks/portal/dist/index.html index 267d720..0abf4bc 100644 --- a/stacks/portal/dist/index.html +++ b/stacks/portal/dist/index.html @@ -11,8 +11,8 @@ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet" /> - - + +
diff --git a/stacks/portal/server.py b/stacks/portal/server.py index 5ef2c31..7f80bff 100755 --- a/stacks/portal/server.py +++ b/stacks/portal/server.py @@ -23,6 +23,7 @@ from concurrent.futures import ThreadPoolExecutor from http.cookies import SimpleCookie from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from pathlib import Path +from clawbot import ClawBotManager PORT = int(os.environ.get("PORT", "3004")) BASE_DIR = Path(__file__).resolve().parent @@ -298,7 +299,9 @@ def collect_telemetry() -> dict: "clash": net["router_online"], "router": net["router_online"], "uptime": net["azure_online"], + "clawbot": clawbot_mgr.is_connected(), }, + "clawbot": clawbot_mgr.get_public_status(), } with _cache_lock: _cache["data"] = data @@ -306,6 +309,9 @@ def collect_telemetry() -> dict: return data +clawbot_mgr = ClawBotManager(telemetry_fn=collect_telemetry) + + class PortalHandler(BaseHTTPRequestHandler): def log_message(self, fmt, *args): pass @@ -383,6 +389,11 @@ class PortalHandler(BaseHTTPRequestHandler): self._send_json(collect_telemetry()) return + # 3b. WeChat ClawBot status endpoint (/api/clawbot/status) + if self.path.startswith("/api/clawbot/status"): + self._send_json(clawbot_mgr.get_public_status()) + return + # 4. Serve static assets from Vite build output (dist/) if available clean_path = self.path.split("?", 1)[0].lstrip("/") if clean_path and DIST_DIR.exists(): @@ -456,6 +467,26 @@ class PortalHandler(BaseHTTPRequestHandler): self._send_json({"ok": True}, status=200, extra_headers=headers) return + # 2b. WeChat ClawBot Endpoints (/api/clawbot/*) + if self.path == "/api/clawbot/qrcode": + res = clawbot_mgr.start_qr_login() + self._send_json(res, status=200 if res.get("ok") else 500) + return + if self.path == "/api/clawbot/verify": + length = int(self.headers.get("Content-Length", "0")) + raw = self.rfile.read(length).decode("utf-8") if length > 0 else "{}" + try: + body = json.loads(raw) + except Exception: + body = {} + res = clawbot_mgr.submit_verify_code(str(body.get("code", ""))) + self._send_json(res) + return + if self.path == "/api/clawbot/disconnect": + res = clawbot_mgr.disconnect() + self._send_json(res) + return + # 3. Operations Actions if self.path == "/api/action/backup_nas": out = run_cmd("/Users/ixvii0iv/homelab/scripts/backup-to-nas.sh", timeout=15.0) diff --git a/stacks/portal/web/package-lock.json b/stacks/portal/web/package-lock.json index e2275b8..f48b099 100644 --- a/stacks/portal/web/package-lock.json +++ b/stacks/portal/web/package-lock.json @@ -14,10 +14,12 @@ "@radix-ui/react-slot": "^1.5.0", "@radix-ui/react-switch": "^1.4.1", "@radix-ui/react-tabs": "^1.2.1", + "@types/qrcode": "^1.5.6", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", "lucide-react": "^0.475.0", + "qrcode": "^1.5.4", "react": "^19.0.0", "react-dom": "^19.0.0", "tailwind-merge": "^3.0.1", @@ -2148,6 +2150,24 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "26.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", + "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@types/qrcode": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.6.tgz", + "integrity": "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/react": { "version": "19.3.0", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", @@ -2189,6 +2209,30 @@ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/aria-hidden": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz", @@ -2248,6 +2292,15 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001823", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001823.tgz", @@ -2281,6 +2334,17 @@ "url": "https://polar.sh/cva" } }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -2306,6 +2370,24 @@ "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2338,6 +2420,15 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -2354,6 +2445,12 @@ "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", "license": "MIT" }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, "node_modules/electron-to-chromium": { "version": "1.5.478", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.478.tgz", @@ -2361,6 +2458,12 @@ "dev": true, "license": "ISC" }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, "node_modules/enhanced-resolve": { "version": "5.26.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.1.tgz", @@ -2445,6 +2548,19 @@ } } }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2470,6 +2586,15 @@ "node": ">=6.9.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-nonce": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", @@ -2486,6 +2611,15 @@ "dev": true, "license": "ISC" }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/jiti": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", @@ -2802,6 +2936,18 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -2867,6 +3013,51 @@ "node": ">=18" } }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -2887,6 +3078,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/postcss": { "version": "8.5.32", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", @@ -2916,6 +3116,23 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/react": { "version": "19.3.1", "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", @@ -3016,6 +3233,21 @@ } } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, "node_modules/rollup": { "version": "4.67.5", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.67.5.tgz", @@ -3078,6 +3310,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, "node_modules/source-map-js": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", @@ -3088,6 +3326,32 @@ "node": ">=0.10.0" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/tailwind-merge": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.7.0.tgz", @@ -3156,6 +3420,12 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "license": "MIT" + }, "node_modules/update-browserslist-db": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", @@ -3305,6 +3575,32 @@ } } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -3312,6 +3608,41 @@ "dev": true, "license": "ISC" }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/zustand": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.1.0.tgz", diff --git a/stacks/portal/web/package.json b/stacks/portal/web/package.json index 49efa92..aafddd1 100644 --- a/stacks/portal/web/package.json +++ b/stacks/portal/web/package.json @@ -15,10 +15,12 @@ "@radix-ui/react-slot": "^1.5.0", "@radix-ui/react-switch": "^1.4.1", "@radix-ui/react-tabs": "^1.2.1", + "@types/qrcode": "^1.5.6", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", "lucide-react": "^0.475.0", + "qrcode": "^1.5.4", "react": "^19.0.0", "react-dom": "^19.0.0", "tailwind-merge": "^3.0.1", diff --git a/stacks/portal/web/src/App.tsx b/stacks/portal/web/src/App.tsx index 28e36e2..711f1c7 100644 --- a/stacks/portal/web/src/App.tsx +++ b/stacks/portal/web/src/App.tsx @@ -6,6 +6,7 @@ import { SshShelf } from './components/SshShelf'; import { CommandPalette } from './components/CommandPalette'; import { AgyTerminalModal } from './components/AgyTerminalModal'; import { AuthGateCard } from './components/AuthGateModal'; +import { WechatClawModal } from './components/WechatClawModal'; import { StorybookWorkbench } from './components/StorybookWorkbench'; import { LAYOUT_PRESETS } from './design-system/tokens'; import type { ServiceGroup } from './types/telemetry'; @@ -244,6 +245,9 @@ export const App: React.FC = () => { {/* 5. Embedded AGY Cloud Terminal Modal */} + {/* 5b. WeChat ClawBot QR Code & Live Status Modal */} + + {/* 6. Custom SSO Auth Gate Modal (Replaces Browser Native Basic Auth Popup!) */} {authRedirect && (
diff --git a/stacks/portal/web/src/components/TopRibbon.tsx b/stacks/portal/web/src/components/TopRibbon.tsx index ea4ba35..aff015d 100644 --- a/stacks/portal/web/src/components/TopRibbon.tsx +++ b/stacks/portal/web/src/components/TopRibbon.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { BookOpen, LayoutGrid, Moon, Search, Sun, Terminal } from 'lucide-react'; +import { BookOpen, LayoutGrid, MessageSquare, Moon, Search, Sun, Terminal } from 'lucide-react'; import { usePortalStore } from '../store/usePortalStore'; import type { RouteModeId } from '../types/telemetry'; import { Button } from './ui/button'; @@ -24,6 +24,7 @@ export const TopRibbon: React.FC = () => { setRouteMode, setViewMode, setShowAgyModal, + setShowWechatModal, setShowCmdPalette, } = usePortalStore(); @@ -98,6 +99,21 @@ export const TopRibbon: React.FC = () => { + + +
+ +
+
📱 现在打开手机微信「微信 ClawBot」可直接发送:
+
+
+ 状态 · 查看 M6 & 极空间遥测 +
+
+ 备份 · 立即打包备份至 20TB NAS +
+
+ 屏幕 · 截取 AGY 终端实时画面 +
+
+ $ df -h · 执行任意 Mac mini 命令 +
+
+ > 你好 或直接发任意问题 · 注入 AGY 终端或调用 AI 回答 +
+
+
+ + ) : ( +
+
+ {qrDataUrl ? ( +
+ WeChat ClawBot QR Code +
+ ) : ( +
+ {loadingQr ? '正在向微信申请二维码...' : '点击下方按钮生成二维码'} +
+ )} + +
+ + {loginState?.message || '请使用手机微信扫描上方二维码启用 ClawBot'} +
+ +
+ + {loginState?.qrcode_url && ( + + )} +
+
+ + {/* Verify Code Input (if WeChat prompts for pairing digits) */} + {loginState?.status === 'need_verifycode' && ( +
+ +
+ setVerifyCode(e.target.value)} + placeholder="输入手机微信显示的 6 位数字..." + className="font-mono-num" + autoFocus + /> + +
+
+ )} +
+ )} + +
+ +
+ + + ); +}; diff --git a/stacks/portal/web/src/store/usePortalStore.ts b/stacks/portal/web/src/store/usePortalStore.ts index 7499f4d..37b1423 100644 --- a/stacks/portal/web/src/store/usePortalStore.ts +++ b/stacks/portal/web/src/store/usePortalStore.ts @@ -9,6 +9,7 @@ interface PortalState { layoutPreset: LayoutPresetId; viewMode: 'dashboard' | 'storybook'; showAgyModal: boolean; + showWechatModal: boolean; showCmdPalette: boolean; toast: string; actionLoading: boolean; @@ -19,6 +20,7 @@ interface PortalState { setLayoutPreset: (preset: LayoutPresetId) => void; setViewMode: (view: 'dashboard' | 'storybook') => void; setShowAgyModal: (open: boolean) => void; + setShowWechatModal: (open: boolean) => void; setShowCmdPalette: (open: boolean) => void; showToast: (msg: string) => void; fetchTelemetry: () => Promise; @@ -34,11 +36,11 @@ const getSystemDark = () => const applyDomTheme = (mode: ThemeId): 'light' | 'dark' => { const isDark = mode === 'system' ? getSystemDark() : mode === 'dark'; - const domTheme = isDark ? 'catppuccin' : 'zinc-light'; + const domTheme = isDark ? 'dark' : 'light'; if (typeof document !== 'undefined') { document.documentElement.setAttribute('data-theme', domTheme); } - return isDark ? 'dark' : 'light'; + return domTheme; }; const storedTheme = localStorage.getItem('hl_theme_v2') as ThemeId | null; @@ -62,6 +64,7 @@ export const usePortalStore = create((set, get) => ({ layoutPreset: initialLayout, viewMode: initialView, showAgyModal: false, + showWechatModal: false, showCmdPalette: false, toast: '', actionLoading: false, @@ -105,6 +108,7 @@ export const usePortalStore = create((set, get) => ({ clash: true, router: true, uptime: true, + clawbot: false, }, }, @@ -138,6 +142,7 @@ export const usePortalStore = create((set, get) => ({ }, setShowAgyModal: (showAgyModal) => set({ showAgyModal }), + setShowWechatModal: (showWechatModal) => set({ showWechatModal }), setShowCmdPalette: (showCmdPalette) => set({ showCmdPalette }), showToast: (msg) => { diff --git a/stacks/portal/web/src/types/telemetry.ts b/stacks/portal/web/src/types/telemetry.ts index 3857496..ce3786e 100644 --- a/stacks/portal/web/src/types/telemetry.ts +++ b/stacks/portal/web/src/types/telemetry.ts @@ -1,6 +1,23 @@ export type ThemeId = 'system' | 'light' | 'dark'; export type RouteModeId = 'auto' | 'edge443' | 'home10443' | 'lan'; +export interface ClawbotPublicStatus { + connected: boolean; + bot_id?: string; + user_id?: string; + base_url?: string; + connected_at?: string; + msg_count?: number; + last_inbound_text?: string; + last_reply_text?: string; + login?: { + active: boolean; + qrcode_url: string; + status: string; + message: string; + }; +} + export interface TelemetryData { timestamp?: string; mini: { @@ -53,7 +70,9 @@ export interface TelemetryData { clash: boolean; router: boolean; uptime: boolean; + clawbot?: boolean; }; + clawbot?: ClawbotPublicStatus; } export interface StatCell { @@ -68,7 +87,7 @@ export interface ServiceCardItem { subtitle: string; iconUrl: string; online: boolean; - actionType?: 'drawer' | 'backup'; + actionType?: 'drawer' | 'backup' | 'clawbot'; desc: string; edgeUrl: string; homeUrl: string;