diff --git a/CHANGELOG.md b/CHANGELOG.md index 89a2df9..ded5814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,30 @@ --- +## 2026-11-16 · v3.6.8 + +### ✨ 新功能 + +- **一键转卖图片:可修改 / 删除 / 添加**(原为只读固定 3 张) + - 悬停图片:**删除**(至少保留 1 张)、**替换**(本地文件覆盖该张)、**设首图**(第一张即封面) + - 两种**添加**方式:本地上传(jpg/png/webp/gif ≤8MB,存服务端 resell_uploads 目录并生成直链)、 + 粘贴图片地址(自动读取真实宽高,防盗链/失效地址会拦截提示);上限 9 张 + - 发布时提交弹窗里改好的图片列表(后端校验清洗,非法条目丢弃、全空自动回退源商品图片,向后兼容) +- **AI 一键优化标题+描述**(弹窗「标题」行右侧紫色按钮) + - 按钮 → AI 生成中 → 返回 **4 个不同风格的候选标题**(点击任意一个即填入标题输入框,选中态高亮) + - **描述同步改写**为结构清晰的分段文案(保留原描述全部关键信息) + - 复用 AI 回复的模型 KEY 体系;无 KEY 时提示先去 AI 设置配置 + +### ✅ 验证(端到端实测,14 商品真实账号) + +- 图片:删除 3→2、本地上传 2→3(服务端文件落盘)、URL 添加 3→4、设首图(首图切换)、替换(idx1 换图)全通过 +- AI 优化:36 秒返回 4 个候选标题 → 点击候选2 → 标题精确填入;描述由 30 字改写为 246 字分段文案 +- 后端:`/resell/upload-image`、`/resell/ai-optimize` 路由注册(无 token 401);静态图 `/resell/uploaded/*` 免鉴权直链; + payload 单测:自定义图片覆盖、相对路径丢弃、尺寸兜底、空列表回退源图 +- 测试账号与属主临时变更已还原(用户表仅剩原有 admin/jinghui) + +--- + ## 2026-11-16 · v3.6.7 ### ✨ 新功能 diff --git a/app/routers/resell.py b/app/routers/resell.py index d4374d7..050f0fb 100644 --- a/app/routers/resell.py +++ b/app/routers/resell.py @@ -6,11 +6,16 @@ from __future__ import annotations +import json import re import time +import uuid +from pathlib import Path from typing import Any, Callable, Dict, List, Optional -from fastapi import APIRouter, Depends, HTTPException +from fastapi import APIRouter, Depends, File, HTTPException, UploadFile +from fastapi.responses import FileResponse +from openai import OpenAI from pydantic import BaseModel, Field from utils.xianyu_seller_api import SellerApiError, XianyuSellerAPI @@ -53,6 +58,15 @@ class ResellPublishRequest(BaseModel): delivery: str = "包邮" post_price: float = Field(default=0, ge=0) quantity: int = Field(default=1, ge=1, le=99999) + # 自定义图片列表 [{url, width, height}]:用户在弹窗里增删/替换后的最终图片; + # 为空或全非法时回退源商品图片,保持向后兼容 + images: Optional[List[Dict[str, Any]]] = None + + +class ResellAiOptimizeRequest(BaseModel): + cookie_id: str + title: str = Field(default="", max_length=120) + description: str = Field(default="", max_length=4000) def _money(value: float) -> str: @@ -235,6 +249,23 @@ def create_resell_router( detail = detail_result.get("data") or {} item_do = detail.get("itemDO") or {} images = _detail_images(item_do) + # 用户在弹窗里改过的图片优先;非法条目丢弃,全空则回退源图 + if req.images: + custom: List[Dict[str, Any]] = [] + for raw in req.images[:MAX_IMAGES]: + if not isinstance(raw, dict): + continue + url = str(raw.get("url") or "").strip() + if not url.startswith(("http://", "https://")): + continue + try: + width = int(raw.get("width") or 1000) + height = int(raw.get("height") or 1000) + except (TypeError, ValueError): + width, height = 1000, 1000 + custom.append({"url": url, "width": width, "height": height}) + if custom: + images = custom if not images: raise HTTPException(status_code=400, detail="源商品没有可用图片,无法转卖") labels = item_do.get("itemLabelExtList") or [] @@ -296,6 +327,129 @@ def create_resell_router( "price": req.price, } + # ------------------------------------------------------------------ + # 转卖图片:本地上传(存 data/resell_uploads,静态读取免鉴权供 加载) + # ------------------------------------------------------------------ + _UPLOAD_DIR = Path("/app/data/resell_uploads") + _ALLOWED_EXT = {".jpg", ".jpeg", ".png", ".webp", ".gif"} + + @router.post("/resell/upload-image") + async def resell_upload_image( + file: UploadFile = File(...), + current_user: dict[str, Any] = Depends(get_current_user), + ): + ext = Path(file.filename or "").suffix.lower() + if ext not in _ALLOWED_EXT: + raise HTTPException(status_code=400, detail="仅支持 jpg/png/webp/gif 图片") + data = await file.read() + if not data: + raise HTTPException(status_code=400, detail="图片内容为空") + if len(data) > 8 * 1024 * 1024: + raise HTTPException(status_code=400, detail="图片不能超过 8MB") + _UPLOAD_DIR.mkdir(parents=True, exist_ok=True) + name = f"{uuid.uuid4().hex}{ext}" + (_UPLOAD_DIR / name).write_bytes(data) + return {"success": True, "path": f"/resell/uploaded/{name}"} + + @router.get("/resell/uploaded/{name}") + async def resell_uploaded(name: str): + # 文件名 uuid 随机不可枚举;此路由免鉴权( 无法带 Authorization 头) + if "/" in name or ".." in name or not name: + raise HTTPException(status_code=400, detail="非法文件名") + ext = Path(name).suffix.lower() + if ext not in _ALLOWED_EXT: + raise HTTPException(status_code=404, detail="Not Found") + target = _UPLOAD_DIR / name + if not target.is_file(): + raise HTTPException(status_code=404, detail="图片不存在") + return FileResponse(target, media_type=f"image/{'jpeg' if ext in ('.jpg', '.jpeg') else ext[1:]}") + + # ------------------------------------------------------------------ + # AI 一键优化:按原标题/描述改写,返回多个候选标题 + 优化后描述 + # ------------------------------------------------------------------ + @router.post("/resell/ai-optimize") + def resell_ai_optimize( + req: ResellAiOptimizeRequest, + current_user: dict[str, Any] = Depends(get_current_user), + ): + require_account(req.cookie_id, current_user) + + settings = db_manager.get_ai_reply_settings(req.cookie_id) + api_key = (settings.get("api_key") or "").strip() + if not api_key: + return { + "success": False, + "status": "need_api_key", + "message": "尚未配置模型 KEY,请先在 AI 设置中填写模型 KEY 再使用 AI 优化。", + } + model_name = (settings.get("model_name") or "").strip() or "qwen-plus" + + system_prompt = ( + "你是闲鱼文案优化专家。根据用户提供的商品原标题与原描述改写优化,严格返回 JSON(不要 markdown 代码块):\n" + '{"titles": ["候选标题1", "候选标题2", "候选标题3", "候选标题4"], "description": "优化后的商品描述"}\n' + "要求:titles 为 4 个不同风格的标题(突出卖点/关键词前置/数字吸引/简洁直达,各 30 字内、吸睛不夸大、不含违规词);" + "description 保留原描述全部关键信息(规格、内容、使用说明),结构更清晰、分段合理、语气自然,长度与原描述相当。" + ) + user_prompt = ( + f"原标题:{(req.title or '').strip()[:120]}\n" + f"原描述:{(req.description or '').strip()[:3500]}" + ) + + content = "" + last_err: Optional[Exception] = None + for extra in ({"enable_thinking": False}, {}): + try: + client = OpenAI( + api_key=api_key, + base_url=(settings.get("base_url") or "").strip() or None, + timeout=60.0, + max_retries=0, + default_headers={"User-Agent": settings.get("user_agent") or "Mozilla/5.0"}, + ) + response = client.chat.completions.create( + model=model_name, + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_prompt}, + ], + temperature=0.7, + max_tokens=2000, + extra_body=extra or None, + ) + content = (response.choices[0].message.content or "").strip() + if content: + break + except Exception as exc: # noqa: BLE001 - 两发兜底后统一报错 + last_err = exc + if not content: + raise HTTPException(status_code=502, detail=f"模型调用失败:{last_err or '无返回'}") + + # 容错解析:优先整段 JSON,再从文本中截取首对花括号 + parsed: Dict[str, Any] = {} + try: + parsed = json.loads(content) + except json.JSONDecodeError: + match = re.search(r"\{[\s\S]*\}", content) + if match: + try: + parsed = json.loads(match.group(0)) + except json.JSONDecodeError: + parsed = {} + titles: List[str] = [] + for raw in (parsed.get("titles") or []): + text = str(raw).strip() + if text and text not in titles: + titles.append(text) + description = str(parsed.get("description") or "").strip() + if not titles and not description: + raise HTTPException(status_code=502, detail="模型返回无法解析,请重试") + return { + "success": True, + "titles": titles[:5], + "description": description or (req.description or ""), + "model": model_name, + } + return router diff --git a/frontend/components/Resell.tsx b/frontend/components/Resell.tsx index eabb5cf..09dfd04 100644 --- a/frontend/components/Resell.tsx +++ b/frontend/components/Resell.tsx @@ -5,17 +5,21 @@ import { Heart, Loader2, Package, + Plus, Search, + Sparkles, Store, X, } from 'lucide-react'; import { AccountDetail, ResellItem, ResellPreviewItem } from '../types'; import { getAccountDetails, + getResellAiOptimize, getResellFavorites, previewResellItem, publishResellItem, searchResellItems, + uploadResellImage, } from '../services/api'; import { EmptyState, NoticeBanner, PageHeader, PageTabs } from './ui'; @@ -32,6 +36,25 @@ const itemDetailUrl = (item: Pick): string => { return `https://www.goofish.com/item?id=${item.item_id}`; }; +// 弹窗里可编辑的图片:预览/上传后统一成这个结构,发布时原样提交 +interface EditImage { + url: string; + width: number; + height: number; +} + +// 读图片真实宽高(闲鱼 payload 需要 widthSize/heightSize);加载失败返回 null +const readImageSize = (src: string): Promise<{ width: number; height: number } | null> => + new Promise(resolve => { + const probe = new Image(); + probe.onload = () => resolve({ + width: probe.naturalWidth || 1000, + height: probe.naturalHeight || 1000, + }); + probe.onerror = () => resolve(null); + probe.src = src; + }); + interface PublishForm { title: string; price: string; @@ -76,6 +99,16 @@ const Resell: React.FC = () => { const [form, setForm] = useState(emptyForm); const [publishing, setPublishing] = useState(false); const [publishedUrl, setPublishedUrl] = useState(''); + // 图片增删改替:预览加载后进入可编辑状态,发布时提交这份 + const [editImages, setEditImages] = useState([]); + const [imgUrlDraft, setImgUrlDraft] = useState(''); + const [showAddUrl, setShowAddUrl] = useState(false); + const [imgBusy, setImgBusy] = useState(false); + const fileInputRef = useRef(null); + const replaceIdxRef = useRef(null); + // AI 一键优化:候选标题 + 生成中状态 + const [aiTitles, setAiTitles] = useState([]); + const [aiLoading, setAiLoading] = useState(false); const accountNames = useMemo( () => new Map(accounts.map(account => [ @@ -156,6 +189,124 @@ const Resell: React.FC = () => { } }; + // ------------------------------------------------------------------ + // 转卖图片:删除 / 设为首图 / URL 添加 / 本地上传替换 + // ------------------------------------------------------------------ + const removeImage = (idx: number) => { + if (editImages.length <= 1) { + setNotice({ type: 'error', message: '至少保留一张图片' }); + return; + } + setEditImages(list => list.filter((_, i) => i !== idx)); + }; + + const promoteImage = (idx: number) => { + if (idx <= 0) return; + setEditImages(list => { + const next = [...list]; + const [picked] = next.splice(idx, 1); + return [picked, ...next]; + }); + }; + + const addImageFromUrl = async () => { + const url = imgUrlDraft.trim(); + if (imgBusy) return; + if (!/^https?:\/\//.test(url)) { + setNotice({ type: 'error', message: '请输入以 http(s):// 开头的图片地址' }); + return; + } + if (editImages.length >= 9) { + setNotice({ type: 'error', message: '最多 9 张图片' }); + return; + } + setImgBusy(true); + try { + const size = await readImageSize(url); + if (!size) { + setNotice({ type: 'error', message: '该图片地址无法加载(可能防盗链或已失效)' }); + return; + } + setEditImages(list => [...list, { url, ...size }].slice(0, 9)); + setImgUrlDraft(''); + setShowAddUrl(false); + setNotice({ type: 'success', message: '已添加图片' }); + } finally { + setImgBusy(false); + } + }; + + const uploadImageFiles = async (files: FileList | null, replaceIdx: number | null) => { + if (!files || !files.length) return; + const file = files[0]; + setImgBusy(true); + try { + const res = await uploadResellImage(file); + // 相对路径转绝对:闲鱼服务器要能直接抓取该地址 + const absolute = new URL(res.path, window.location.origin).href; + const size = await readImageSize(absolute); + if (!size) { + setNotice({ type: 'error', message: '图片上传后无法加载,请重试' }); + return; + } + if (replaceIdx != null) { + setEditImages(list => list.map((img, i) => (i === replaceIdx ? { url: absolute, ...size } : img))); + setNotice({ type: 'success', message: '图片已替换' }); + } else { + if (editImages.length >= 9) { + setNotice({ type: 'error', message: '最多 9 张图片' }); + return; + } + setEditImages(list => [...list, { url: absolute, ...size }].slice(0, 9)); + setNotice({ type: 'success', message: '图片已添加' }); + } + // 本机/局域网地址闲鱼抓不到,提示一下 + if (/^(https?:\/\/)?(localhost|127\.0\.0\.1|192\.168\.)/.test(window.location.origin)) { + setNotice({ type: 'error', message: '当前访问地址非公网,闲鱼可能无法拉取上传的图片,建议通过公网域名操作' }); + } + } catch (error) { + setNotice({ type: 'error', message: error instanceof Error ? error.message : '图片上传失败' }); + } finally { + setImgBusy(false); + if (fileInputRef.current) fileInputRef.current.value = ''; + replaceIdxRef.current = null; + } + }; + + // ------------------------------------------------------------------ + // AI 一键优化:多候选标题点击填入 + 描述改写 + // ------------------------------------------------------------------ + const handleAiOptimize = async () => { + if (!publishItem || !selectedAccount || aiLoading) return; + setAiLoading(true); + try { + const res = await getResellAiOptimize({ + cookie_id: selectedAccount, + title: form.title, + description: form.desc, + }); + if (!res.success) { + setNotice({ type: 'error', message: res.message || 'AI 优化失败,请重试' }); + return; + } + const titles = res.titles || []; + setAiTitles(titles); + if (res.description && res.description !== form.desc) { + setForm(current => ({ ...current, desc: res.description as string })); + } + setNotice({ + type: 'success', + message: titles.length + ? `AI 已生成 ${titles.length} 个候选标题(点击选用),描述已同步优化` + : '描述已优化', + }); + } catch (error) { + setNotice({ type: 'error', message: error instanceof Error ? error.message : 'AI 优化失败' }); + } finally { + setAiLoading(false); + } + }; + const openResell = async (item: ResellItem) => { if (!selectedAccount) { setNotice({ type: 'error', message: '请先选择账号' }); @@ -164,6 +315,17 @@ const Resell: React.FC = () => { setPublishItem(item); setPreview(null); setPublishedUrl(''); + setAiTitles([]); + setShowAddUrl(false); + setImgUrlDraft(''); + // 预览未回前先用卡片图占位,详情回来后整组覆盖 + setEditImages( + (item.images?.length + ? item.images.map(url => ({ url, width: 1000, height: 1000 })) + : item.image + ? [{ url: item.image, width: 1000, height: 1000 }] + : []), + ); setForm({ ...emptyForm, title: item.title || '', @@ -174,6 +336,9 @@ const Resell: React.FC = () => { const res = await previewResellItem({ cookie_id: selectedAccount, item_id: item.item_id }); const detail = res.item; setPreview(detail); + if (detail.images?.length) { + setEditImages(detail.images.map(img => ({ url: img.url, width: img.width || 1000, height: img.height || 1000 }))); + } const detailPrice = detail.price != null ? String(detail.price) : ''; setForm(current => ({ ...current, @@ -220,6 +385,7 @@ const Resell: React.FC = () => { delivery: form.delivery, post_price: Number(form.postPrice) || 0, quantity: Number(form.quantity) || 1, + images: editImages.length ? editImages : undefined, }); setPublishedUrl(res.url); setNotice({ type: 'success', message: `转卖发布成功:${res.title}` }); @@ -489,28 +655,121 @@ const Resell: React.FC = () => { ) : (
- {(preview?.images?.length || publishItem.images?.length) ? ( -
- {(preview?.images || []).map(img => ( - - ))} - {!preview?.images?.length && publishItem.image && ( - - )} +
+
+ + 图片({editImages.length}/9)· 第一张为封面,悬停可替换/删除 +
- ) : null} + {editImages.length ? ( + <> +
+ {editImages.map((img, idx) => ( +
+ + {idx === 0 && ( + + 封面 + + )} + + +
+ ))} + {editImages.length < 9 && ( + + )} + +
+ {showAddUrl && ( +
+ setImgUrlDraft(event.target.value)} + placeholder="粘贴图片地址 https://…" + className="ios-input min-w-0 flex-1 rounded-md px-3 py-2 text-sm" + /> + +
+ )} + + ) : ( +

暂无图片,点下方「上传」或「URL」添加

+ )} + uploadImageFiles(event.target.files, replaceIdxRef.current)} + /> +
- +
+ + +
{ className="ios-input w-full rounded-md px-3 py-2.5" placeholder="商品标题" /> + {aiTitles.length > 0 && ( +
+

AI 候选标题(点击填入上方输入框):

+ {aiTitles.map((title, index) => ( + + ))} +
+ )}
diff --git a/frontend/services/api.ts b/frontend/services/api.ts index 79e57ec..81b7a68 100644 --- a/frontend/services/api.ts +++ b/frontend/services/api.ts @@ -1650,9 +1650,26 @@ export const publishResellItem = async (data: { delivery?: string; post_price?: number; quantity?: number; + /** 弹窗里增删改后的图片列表;缺省则用源商品图片 */ + images?: { url: string; width: number; height: number }[]; }): Promise<{ success: boolean; item_id: string; url: string; title: string; price: number }> => post('/resell/publish', data); +/** 转卖图片本地上传(存服务端 resell_uploads,返回可直链访问的 path)。 */ +export const uploadResellImage = async (file: File): Promise<{ success: boolean; path: string }> => { + const form = new FormData(); + form.append('file', file); + return post('/resell/upload-image', form, { timeout: 60000 }); +}; + +/** AI 一键优化:按原标题/描述改写,返回多个候选标题 + 优化后描述。 */ +export const getResellAiOptimize = async (data: { + cookie_id: string; + title: string; + description: string; +}): Promise<{ success: boolean; titles?: string[]; description?: string; model?: string; message?: string }> => + post('/resell/ai-optimize', data, { timeout: 150000 }); + // ==================== AI 一键优化建议 ==================== diff --git a/static/assets/AIReply-CSp6SZ4l.js b/static/assets/AIReply-teRO4Zqo.js similarity index 97% rename from static/assets/AIReply-CSp6SZ4l.js rename to static/assets/AIReply-teRO4Zqo.js index c3a6d5e..b7ae464 100644 --- a/static/assets/AIReply-CSp6SZ4l.js +++ b/static/assets/AIReply-teRO4Zqo.js @@ -1 +1 @@ -import{r as l,o as O,n as i,z as k,j as e,B as j,L as A,E as H,aE as q,S,K as z,aR as B}from"./index-BCb9Ylky.js";import{P as F,a as U,E as D,S as o}from"./ui-DcVZvy8T.js";import{S as $}from"./save-cq1qPfv2.js";import{M as E}from"./message-square-text-BMJDYICF.js";import{E as G}from"./eye-off-CWiudZEM.js";import{E as J}from"./eye-DywCDhqk.js";import{P as C}from"./play-IOsY5Rdt.js";const I="https://ai.88531.cn/v1",Q="https://ai.88531.cn",f={ai_enabled:!1,model_name:"qwen-plus",api_key:"",api_key_configured:!1,base_url:I,user_agent:"codex_cli_rs/0.0.0 (Hermes Agent)",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""},ae=()=>{const[c,P]=l.useState([]),[t,y]=l.useState(""),[a,d]=l.useState(f),[R,x]=l.useState(!0),[p,N]=l.useState(!1),[u,_]=l.useState(!1),[g,w]=l.useState(!1),[h,K]=l.useState("你好,这个商品现在还能买吗?"),[v,b]=l.useState(""),r=l.useMemo(()=>c.find(s=>s.id===t),[c,t]);l.useEffect(()=>{O().then(s=>{var m;P(s),y(((m=s[0])==null?void 0:m.id)||"")}).catch(s=>i(s instanceof Error?s.message:"账号加载失败","error")).finally(()=>x(!1))},[]),l.useEffect(()=>{t&&(x(!0),b(""),w(!1),k(t).then(s=>d({...f,...s,api_key:""})).catch(s=>i(s instanceof Error?s.message:"AI配置加载失败","error")).finally(()=>x(!1)))},[t]);const n=(s,m)=>{d(M=>({...M,[s]:m}))},T=async()=>{if(!t){i("请先选择账号","warning");return}if(!a.model_name.trim()||!a.base_url.trim()){i("模型名称和接口地址不能为空","warning");return}N(!0);try{await z(t,a);const s=await k(t);d({...f,...s,api_key:""}),i("人工智能回复配置已保存","success")}catch(s){i(s instanceof Error?s.message:"AI配置保存失败","error")}finally{N(!1)}},L=async()=>{if(!t||!h.trim()){i("请选择账号并输入测试消息","warning");return}_(!0),b("");try{const s=await B(t,{message:h.trim(),item_title:"测试商品",item_price:100,item_desc:"仅用于测试人工智能回复,不会发送到闲鱼。"});b(s.reply||s.message||"测试完成"),i("AI回复测试完成","success")}catch(s){i(s instanceof Error?s.message:"AI回复测试失败","error")}finally{_(!1)}};return R&&c.length===0?e.jsx(F,{label:"正在加载 AI 回复配置"}):e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(U,{title:"AI 回复",description:"按账号配置模型连接、上下文记忆、议价边界和业务回复规则。",icon:j,actions:e.jsxs("div",{className:"flex min-w-0 flex-wrap items-end gap-2",children:[e.jsxs("label",{className:"min-w-0 sm:w-72",children:[e.jsx("span",{className:"field-label",children:"当前账号"}),e.jsx("select",{value:t,onChange:s=>y(s.target.value),className:"ios-input w-full rounded-md px-3 py-2 text-sm font-semibold",children:c.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||`账号 ${s.id.slice(0,8)}`},s.id))})]}),e.jsxs("button",{type:"button",onClick:T,disabled:p||!t,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[p?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx($,{className:"h-4 w-4"}),p?"保存中":"保存配置"]})]})}),t?e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"section-panel grid gap-4 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-bold text-gray-900",children:[e.jsx(E,{className:"h-5 w-5"}),(r==null?void 0:r.nickname)||(r==null?void 0:r.remark)||t]}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"回复优先级:关键词回复 → 人工智能回复 → 默认回复。AI失败时不会中断消息处理。"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold text-gray-700",children:a.ai_enabled?"已启用":"已停用"}),e.jsx("input",{type:"checkbox",checked:a.ai_enabled,onChange:s=>n("ai_enabled",s.target.checked),className:"h-5 w-5 accent-yellow-400"})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.35fr)_minmax(340px,0.65fr)]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"模型连接",description:"支持 OpenAI 兼容接口;密钥留空时保留服务器中已有配置。",icon:j}),e.jsxs("div",{className:"grid gap-4 p-5 md:grid-cols-2",children:[e.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-brand-200 bg-brand-50 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"没有 API Key?每天可免费领取额度"}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:"兼容 OpenAI 接口,注册后把密钥填到下方即可直接用。"})]}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:e.jsxs("a",{href:Q,target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-1 rounded-md bg-brand-500 px-3 py-1.5 text-xs font-semibold text-brand-ink hover:bg-brand-600",children:["免费领取 token",e.jsx(H,{className:"h-3.5 w-3.5"})]})})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"接口地址"}),e.jsx("input",{value:a.base_url,onChange:s=>n("base_url",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:I})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"模型名称"}),e.jsx("input",{value:a.model_name,onChange:s=>n("model_name",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:"qwen-plus"})]}),e.jsxs("label",{className:"md:col-span-2",children:[e.jsxs("span",{className:"mb-1.5 flex items-center justify-between gap-3 text-sm font-semibold text-gray-700",children:["API Key",a.api_key_configured&&!a.api_key&&e.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-emerald-700",children:[e.jsx(q,{className:"h-3.5 w-3.5"}),"已配置,留空保持不变"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:g?"text":"password",value:a.api_key,onChange:s=>n("api_key",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 pr-10 text-sm",placeholder:a.api_key_configured?"输入新密钥以替换":"请输入 API Key",autoComplete:"new-password"}),e.jsx("button",{type:"button",onClick:()=>w(s=>!s),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 text-gray-500 hover:bg-gray-100",title:g?"隐藏密钥":"显示密钥",children:g?e.jsx(G,{className:"h-4 w-4"}):e.jsx(J,{className:"h-4 w-4"})})]})]}),e.jsxs("label",{className:"md:col-span-2",children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"User-Agent"}),e.jsx("input",{value:a.user_agent??"",onChange:s=>n("user_agent",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:"codex_cli_rs/0.0.0 (Hermes Agent)"}),e.jsx("span",{className:"mt-1 block text-xs text-gray-500",children:"部分 API 中转站(如 AgentRouter)通过 User-Agent 白名单检测客户端,留空使用默认值。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"回复策略",description:"约束议价空间,并补充账号专属的语气、承诺和售后规则。",icon:E}),e.jsxs("div",{className:"grid gap-4 p-5 sm:grid-cols-3",children:[e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大折扣比例"}),e.jsx("input",{type:"number",min:0,max:100,value:a.max_discount_percent,onChange:s=>n("max_discount_percent",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大折扣金额"}),e.jsx("input",{type:"number",min:0,value:a.max_discount_amount??0,onChange:s=>n("max_discount_amount",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大议价轮次"}),e.jsx("input",{type:"number",min:1,max:10,value:a.max_bargain_rounds,onChange:s=>n("max_bargain_rounds",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{className:"sm:col-span-3",children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"回复风格与业务规则"}),e.jsx("textarea",{value:a.custom_prompts,onChange:s=>n("custom_prompts",s.target.value),className:"ios-input min-h-36 w-full resize-y rounded-md px-3 py-2.5 text-sm leading-6",placeholder:"例如:语气简洁,不承诺未确认的库存;涉及售后时引导买家说明订单号。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"上下文对话",description:"控制单个买家会话中可用于连续回复的近期消息范围。",icon:S}),e.jsxs("div",{className:"grid gap-4 p-5 sm:grid-cols-2",children:[e.jsxs("label",{className:"flex items-center justify-between gap-4 sm:col-span-2",children:[e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold text-gray-700",children:"记住近期对话"}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-gray-500",children:"上下文按账号、会话和商品隔离,切换商品不会混入旧商品内容。"})]}),e.jsx("input",{type:"checkbox",checked:a.context_enabled,onChange:s=>n("context_enabled",s.target.checked),className:"h-5 w-5 shrink-0 accent-yellow-400"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"记忆消息数"}),e.jsx("input",{type:"number",min:2,max:30,disabled:!a.context_enabled,value:a.context_message_limit,onChange:s=>n("context_message_limit",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm disabled:bg-gray-100"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"上下文有效期(分钟)"}),e.jsx("input",{type:"number",min:5,max:1440,disabled:!a.context_enabled,value:a.context_expire_minutes,onChange:s=>n("context_expire_minutes",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm disabled:bg-gray-100"})]}),e.jsx("p",{className:"text-xs leading-5 text-gray-500 sm:col-span-2",children:"付款、发货、退款、收货等系统事件不会交给大模型,将继续由订单状态和自动发货规则处理。"})]})]})]}),e.jsxs("aside",{className:"space-y-5",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"回复测试",description:"只生成文本,不会发送到闲鱼会话。",icon:C}),e.jsxs("div",{className:"p-5",children:[e.jsx("textarea",{value:h,onChange:s=>K(s.target.value),className:"ios-input min-h-24 w-full resize-y rounded-md px-3 py-2.5 text-sm"}),e.jsxs("button",{type:"button",onClick:L,disabled:u||!a.ai_enabled,className:"ios-btn-primary mt-3 flex w-full items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[u?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx(C,{className:"h-4 w-4"}),u?"生成中":"测试回复"]}),v&&e.jsx("div",{className:"mt-4 border-l-4 border-yellow-400 bg-yellow-50 px-4 py-3 text-sm leading-6 text-gray-800",children:v})]})]}),e.jsx("section",{className:"section-panel p-5",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(S,{className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-700"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-bold text-gray-900",children:"运行保护"}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-gray-500",children:"密钥不会回传到浏览器;接口超时、空回复或格式异常时,系统会自动继续使用默认回复。"})]})]})})]})]})]}):e.jsx(D,{icon:j,title:"暂无可配置账号",description:"请先在账号管理中添加并登录闲鱼账号。"})]})};export{ae as default}; +import{r as l,o as O,n as i,z as k,j as e,B as j,L as A,E as H,aE as q,S,K as z,aR as B}from"./index-BZnqBmwp.js";import{P as F,a as U,E as D,S as o}from"./ui-B9Jzqjf7.js";import{S as $}from"./save-Dxf2dvgb.js";import{M as E}from"./message-square-text-Bnj1FXzX.js";import{E as G}from"./eye-off-D1JuM9mR.js";import{E as J}from"./eye-BibUMjxU.js";import{P as C}from"./play-P9T6ppIo.js";const I="https://ai.88531.cn/v1",Q="https://ai.88531.cn",f={ai_enabled:!1,model_name:"qwen-plus",api_key:"",api_key_configured:!1,base_url:I,user_agent:"codex_cli_rs/0.0.0 (Hermes Agent)",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""},ae=()=>{const[c,P]=l.useState([]),[t,y]=l.useState(""),[a,d]=l.useState(f),[R,x]=l.useState(!0),[p,N]=l.useState(!1),[u,_]=l.useState(!1),[g,w]=l.useState(!1),[h,K]=l.useState("你好,这个商品现在还能买吗?"),[v,b]=l.useState(""),r=l.useMemo(()=>c.find(s=>s.id===t),[c,t]);l.useEffect(()=>{O().then(s=>{var m;P(s),y(((m=s[0])==null?void 0:m.id)||"")}).catch(s=>i(s instanceof Error?s.message:"账号加载失败","error")).finally(()=>x(!1))},[]),l.useEffect(()=>{t&&(x(!0),b(""),w(!1),k(t).then(s=>d({...f,...s,api_key:""})).catch(s=>i(s instanceof Error?s.message:"AI配置加载失败","error")).finally(()=>x(!1)))},[t]);const n=(s,m)=>{d(M=>({...M,[s]:m}))},T=async()=>{if(!t){i("请先选择账号","warning");return}if(!a.model_name.trim()||!a.base_url.trim()){i("模型名称和接口地址不能为空","warning");return}N(!0);try{await z(t,a);const s=await k(t);d({...f,...s,api_key:""}),i("人工智能回复配置已保存","success")}catch(s){i(s instanceof Error?s.message:"AI配置保存失败","error")}finally{N(!1)}},L=async()=>{if(!t||!h.trim()){i("请选择账号并输入测试消息","warning");return}_(!0),b("");try{const s=await B(t,{message:h.trim(),item_title:"测试商品",item_price:100,item_desc:"仅用于测试人工智能回复,不会发送到闲鱼。"});b(s.reply||s.message||"测试完成"),i("AI回复测试完成","success")}catch(s){i(s instanceof Error?s.message:"AI回复测试失败","error")}finally{_(!1)}};return R&&c.length===0?e.jsx(F,{label:"正在加载 AI 回复配置"}):e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(U,{title:"AI 回复",description:"按账号配置模型连接、上下文记忆、议价边界和业务回复规则。",icon:j,actions:e.jsxs("div",{className:"flex min-w-0 flex-wrap items-end gap-2",children:[e.jsxs("label",{className:"min-w-0 sm:w-72",children:[e.jsx("span",{className:"field-label",children:"当前账号"}),e.jsx("select",{value:t,onChange:s=>y(s.target.value),className:"ios-input w-full rounded-md px-3 py-2 text-sm font-semibold",children:c.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||`账号 ${s.id.slice(0,8)}`},s.id))})]}),e.jsxs("button",{type:"button",onClick:T,disabled:p||!t,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[p?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx($,{className:"h-4 w-4"}),p?"保存中":"保存配置"]})]})}),t?e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"section-panel grid gap-4 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-bold text-gray-900",children:[e.jsx(E,{className:"h-5 w-5"}),(r==null?void 0:r.nickname)||(r==null?void 0:r.remark)||t]}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"回复优先级:关键词回复 → 人工智能回复 → 默认回复。AI失败时不会中断消息处理。"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold text-gray-700",children:a.ai_enabled?"已启用":"已停用"}),e.jsx("input",{type:"checkbox",checked:a.ai_enabled,onChange:s=>n("ai_enabled",s.target.checked),className:"h-5 w-5 accent-yellow-400"})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.35fr)_minmax(340px,0.65fr)]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"模型连接",description:"支持 OpenAI 兼容接口;密钥留空时保留服务器中已有配置。",icon:j}),e.jsxs("div",{className:"grid gap-4 p-5 md:grid-cols-2",children:[e.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-brand-200 bg-brand-50 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"没有 API Key?每天可免费领取额度"}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:"兼容 OpenAI 接口,注册后把密钥填到下方即可直接用。"})]}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:e.jsxs("a",{href:Q,target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-1 rounded-md bg-brand-500 px-3 py-1.5 text-xs font-semibold text-brand-ink hover:bg-brand-600",children:["免费领取 token",e.jsx(H,{className:"h-3.5 w-3.5"})]})})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"接口地址"}),e.jsx("input",{value:a.base_url,onChange:s=>n("base_url",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:I})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"模型名称"}),e.jsx("input",{value:a.model_name,onChange:s=>n("model_name",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:"qwen-plus"})]}),e.jsxs("label",{className:"md:col-span-2",children:[e.jsxs("span",{className:"mb-1.5 flex items-center justify-between gap-3 text-sm font-semibold text-gray-700",children:["API Key",a.api_key_configured&&!a.api_key&&e.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-emerald-700",children:[e.jsx(q,{className:"h-3.5 w-3.5"}),"已配置,留空保持不变"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:g?"text":"password",value:a.api_key,onChange:s=>n("api_key",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 pr-10 text-sm",placeholder:a.api_key_configured?"输入新密钥以替换":"请输入 API Key",autoComplete:"new-password"}),e.jsx("button",{type:"button",onClick:()=>w(s=>!s),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 text-gray-500 hover:bg-gray-100",title:g?"隐藏密钥":"显示密钥",children:g?e.jsx(G,{className:"h-4 w-4"}):e.jsx(J,{className:"h-4 w-4"})})]})]}),e.jsxs("label",{className:"md:col-span-2",children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"User-Agent"}),e.jsx("input",{value:a.user_agent??"",onChange:s=>n("user_agent",s.target.value),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm",placeholder:"codex_cli_rs/0.0.0 (Hermes Agent)"}),e.jsx("span",{className:"mt-1 block text-xs text-gray-500",children:"部分 API 中转站(如 AgentRouter)通过 User-Agent 白名单检测客户端,留空使用默认值。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"回复策略",description:"约束议价空间,并补充账号专属的语气、承诺和售后规则。",icon:E}),e.jsxs("div",{className:"grid gap-4 p-5 sm:grid-cols-3",children:[e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大折扣比例"}),e.jsx("input",{type:"number",min:0,max:100,value:a.max_discount_percent,onChange:s=>n("max_discount_percent",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大折扣金额"}),e.jsx("input",{type:"number",min:0,value:a.max_discount_amount??0,onChange:s=>n("max_discount_amount",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"最大议价轮次"}),e.jsx("input",{type:"number",min:1,max:10,value:a.max_bargain_rounds,onChange:s=>n("max_bargain_rounds",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm"})]}),e.jsxs("label",{className:"sm:col-span-3",children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"回复风格与业务规则"}),e.jsx("textarea",{value:a.custom_prompts,onChange:s=>n("custom_prompts",s.target.value),className:"ios-input min-h-36 w-full resize-y rounded-md px-3 py-2.5 text-sm leading-6",placeholder:"例如:语气简洁,不承诺未确认的库存;涉及售后时引导买家说明订单号。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"上下文对话",description:"控制单个买家会话中可用于连续回复的近期消息范围。",icon:S}),e.jsxs("div",{className:"grid gap-4 p-5 sm:grid-cols-2",children:[e.jsxs("label",{className:"flex items-center justify-between gap-4 sm:col-span-2",children:[e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold text-gray-700",children:"记住近期对话"}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-gray-500",children:"上下文按账号、会话和商品隔离,切换商品不会混入旧商品内容。"})]}),e.jsx("input",{type:"checkbox",checked:a.context_enabled,onChange:s=>n("context_enabled",s.target.checked),className:"h-5 w-5 shrink-0 accent-yellow-400"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"记忆消息数"}),e.jsx("input",{type:"number",min:2,max:30,disabled:!a.context_enabled,value:a.context_message_limit,onChange:s=>n("context_message_limit",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm disabled:bg-gray-100"})]}),e.jsxs("label",{children:[e.jsx("span",{className:"mb-1.5 block text-sm font-semibold text-gray-700",children:"上下文有效期(分钟)"}),e.jsx("input",{type:"number",min:5,max:1440,disabled:!a.context_enabled,value:a.context_expire_minutes,onChange:s=>n("context_expire_minutes",Number(s.target.value)),className:"ios-input w-full rounded-md px-3 py-2.5 text-sm disabled:bg-gray-100"})]}),e.jsx("p",{className:"text-xs leading-5 text-gray-500 sm:col-span-2",children:"付款、发货、退款、收货等系统事件不会交给大模型,将继续由订单状态和自动发货规则处理。"})]})]})]}),e.jsxs("aside",{className:"space-y-5",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"回复测试",description:"只生成文本,不会发送到闲鱼会话。",icon:C}),e.jsxs("div",{className:"p-5",children:[e.jsx("textarea",{value:h,onChange:s=>K(s.target.value),className:"ios-input min-h-24 w-full resize-y rounded-md px-3 py-2.5 text-sm"}),e.jsxs("button",{type:"button",onClick:L,disabled:u||!a.ai_enabled,className:"ios-btn-primary mt-3 flex w-full items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[u?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx(C,{className:"h-4 w-4"}),u?"生成中":"测试回复"]}),v&&e.jsx("div",{className:"mt-4 border-l-4 border-yellow-400 bg-yellow-50 px-4 py-3 text-sm leading-6 text-gray-800",children:v})]})]}),e.jsx("section",{className:"section-panel p-5",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(S,{className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-700"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-bold text-gray-900",children:"运行保护"}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-gray-500",children:"密钥不会回传到浏览器;接口超时、空回复或格式异常时,系统会自动继续使用默认回复。"})]})]})})]})]})]}):e.jsx(D,{icon:j,title:"暂无可配置账号",description:"请先在账号管理中添加并登录闲鱼账号。"})]})};export{ae as default}; diff --git a/static/assets/About-V2zOAa0k.js b/static/assets/About-B_6kryH7.js similarity index 98% rename from static/assets/About-V2zOAa0k.js rename to static/assets/About-B_6kryH7.js index 00f238b..a1643a5 100644 --- a/static/assets/About-V2zOAa0k.js +++ b/static/assets/About-B_6kryH7.js @@ -1,4 +1,4 @@ -import{c as m,r as n,j as e,bD as h,e as g,P as b,E as l,aE as j,aU as f,aV as o,bE as N}from"./index-BCb9Ylky.js";import{a as u,E as y}from"./ui-DcVZvy8T.js";/** +import{c as m,r as n,j as e,bD as h,e as g,P as b,E as l,aE as j,aU as f,aV as o,bE as N}from"./index-BZnqBmwp.js";import{a as u,E as y}from"./ui-B9Jzqjf7.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/AccountList-Lyt155CU.js b/static/assets/AccountList-BxMZ8Udh.js similarity index 98% rename from static/assets/AccountList-Lyt155CU.js rename to static/assets/AccountList-BxMZ8Udh.js index c8bca7c..6ed836f 100644 --- a/static/assets/AccountList-Lyt155CU.js +++ b/static/assets/AccountList-BxMZ8Udh.js @@ -1,4 +1,4 @@ -import{c as X,r as i,j as e,U as je,B as U,M as Ke,L as S,S as J,e as Ne,k as Ye,b as L,X as q,l as He,m as W,o as Je,p as Ve,q as Xe,s as Ge,t as Ze,n as m,u as _e,v as ve,w as es,x as ss,y as ts,z as as,A as rs,D as ls,F as ns,G as is,H as os,I as ds,J as cs,K as ms,N as xs}from"./index-BCb9Ylky.js";import{P as us,a as hs,E as ps}from"./ui-DcVZvy8T.js";import{C as V}from"./check-BIO52wQW.js";import{S as gs}from"./sparkles-Dw_-KUhM.js";import{P as bs,a as fs}from"./power-D2SYbVC-.js";import{T as ys}from"./trash-2-D-oW6aaO.js";import{K as js}from"./key-DAHJOHIR.js";import{E as Ns}from"./eye-off-CWiudZEM.js";import{E as _s}from"./eye-DywCDhqk.js";import{S as we}from"./save-cq1qPfv2.js";/** +import{c as X,r as i,j as e,U as je,B as U,M as Ke,L as S,S as J,e as Ne,k as Ye,b as L,X as q,l as He,m as W,o as Je,p as Ve,q as Xe,s as Ge,t as Ze,n as m,u as _e,v as ve,w as es,x as ss,y as ts,z as as,A as rs,D as ls,F as ns,G as is,H as os,I as ds,J as cs,K as ms,N as xs}from"./index-BZnqBmwp.js";import{P as us,a as hs,E as ps}from"./ui-B9Jzqjf7.js";import{C as V}from"./check-C6LyX_Nv.js";import{S as gs}from"./sparkles-DVlvGI-3.js";import{P as bs,a as fs}from"./power-D9WTjX12.js";import{T as ys}from"./trash-2-CmT2n80I.js";import{K as js}from"./key-C0msAg8e.js";import{E as Ns}from"./eye-off-D1JuM9mR.js";import{E as _s}from"./eye-BibUMjxU.js";import{S as we}from"./save-Dxf2dvgb.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/BuyerInteraction-DzbRhyPP.js b/static/assets/BuyerInteraction-DnC0dxfT.js similarity index 96% rename from static/assets/BuyerInteraction-DzbRhyPP.js rename to static/assets/BuyerInteraction-DnC0dxfT.js index 70bb902..ad307f8 100644 --- a/static/assets/BuyerInteraction-DzbRhyPP.js +++ b/static/assets/BuyerInteraction-DnC0dxfT.js @@ -1 +1 @@ -import{r as n,j as e,Q as C,e as A,aS as $,T as P,o as B,n as i,aX as H,bF as M}from"./index-BCb9Ylky.js";import{P as D,a as R,N as z,S as d}from"./ui-DcVZvy8T.js";import{S as O}from"./save-cq1qPfv2.js";import{S as U}from"./shield-alert--Sbe2-vu.js";import{F as X}from"./flower-2-DmwUj7Qc.js";import{M as q}from"./message-square-text-BMJDYICF.js";const r=200,E="宝贝收到了,很满意,感谢老板,欢迎下次再来!",G="亲,感谢支持!有任何问题随时找我~",I={auto_rate_enabled:"评价买家",auto_flower_enabled:"索要小红花",auto_thanks_enabled:"收货致谢",auto_receive_flower_enabled:"自动收下小红花"},K=[{value:300,label:"5 分钟"},{value:900,label:"15 分钟"},{value:1800,label:"30 分钟"},{value:3600,label:"1 小时"},{value:7200,label:"2 小时(默认)"},{value:21600,label:"6 小时"},{value:86400,label:"24 小时"}],ee=()=>{const[l,c]=n.useState(null),[p,h]=n.useState(!1),[b,_]=n.useState(!1),[o,T]=n.useState([]),[f,x]=n.useState({}),j=()=>{h(!0),Promise.all([$(),P().catch(()=>null),B().catch(()=>[])]).then(([t,a,s])=>{c({...t,auto_rate_template:(t.auto_rate_template??"").trim()||(a==null?void 0:a.auto_rate_template)||E}),T(s),x((a==null?void 0:a.accounts)??{})}).finally(()=>h(!1))},F=async(t,a)=>{const s=f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},w={...s,[a]:!s[a]};x(u=>({...u,[t]:w}));try{await M(t,{[a]:w[a]})}catch(u){x(k=>({...k,[t]:s})),i(`保存失败:${u.message}`)}};n.useEffect(()=>{j()},[]);const L=async()=>{if(!l)return;const t=(l.auto_rate_template||"").trim();if(!t){i("默认评价内容不能为空");return}if(t.length>r){i(`默认评价内容不能超过 ${r} 字`);return}_(!0);try{await H({auto_rate_template:t,auto_thanks_template:(l.auto_thanks_template||"").trim(),buyer_interaction_interval:String(S)}),i("买家互动配置已保存")}catch(a){i(`保存失败:${a.message}`)}finally{_(!1)}};if(!l)return e.jsx(D,{label:"正在加载买家互动配置"});const m=t=>f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},g=o.some(t=>m(t.id).auto_rate_enabled),y=o.some(t=>m(t.id).auto_thanks_enabled),N=l.auto_rate_template??"",v=l.auto_thanks_template??"",S=Number(l.buyer_interaction_interval)||7200;return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(R,{title:"买家互动",description:"评价买家、索要小红花与自动收花。涉及平台实际操作,请按账号开启。",icon:C,actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:p,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(A,{className:`h-4 w-4 ${p?"animate-spin":""}`}),"刷新"]}),e.jsxs("button",{type:"button",onClick:()=>void L(),disabled:b,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(O,{className:"h-4 w-4"}),b?"保存中":"保存设置"]})]})}),e.jsx(z,{type:"warning",message:"评价提交后无法撤销,求花会向买家发送一条消息。建议先用测试订单验证效果。"}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-2",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"按账号开启",description:"逐个账号控制。关闭的账号不会自动执行,订单页也不显示入口、后端拒绝请求。",icon:U}),o.length===0?e.jsx("p",{className:"px-4 py-6 text-sm text-gray-500",children:"还没有账号,请先在账号管理里添加。"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[e.jsx("th",{className:"px-4 py-2 font-semibold",children:"账号"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"评价买家"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"索要小红花"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"收货致谢"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"自动收下小红花"})]})}),e.jsx("tbody",{children:o.map(t=>{const a=m(t.id);return e.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.nickname||t.id}),e.jsx("p",{className:"mt-0.5 font-mono text-xs text-gray-400",children:t.id})]}),["auto_rate_enabled","auto_flower_enabled","auto_thanks_enabled","auto_receive_flower_enabled"].map(s=>e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",role:"switch","aria-checked":a[s],"aria-label":`${t.nickname||t.id} ${I[s]}`,onClick:()=>void F(t.id,s),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${a[s]?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${a[s]?"translate-x-5":""}`})})},s))]},t.id)})})]})}),e.jsxs("p",{className:"border-t border-gray-100 px-4 py-3 text-xs leading-5 text-gray-500",children:["三项都在",e.jsx("strong",{className:"font-semibold text-gray-700",children:"买家确认收货"}),"后触发。 致谢文本立即发送;评价和求花要等闲鱼把订单切到「交易成功」,通常几十秒内完成, 失败则由下面的兜底轮询稍后重试。"]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"默认评价内容",description:"订单页打开评价框时自动填入,仍可逐单修改后再提交。",icon:X}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"评价文案"}),e.jsx("textarea",{value:N,onChange:t=>c({...l,auto_rate_template:t.target.value}),maxLength:r,placeholder:E,className:"ios-input mt-1 min-h-28 w-full resize-y rounded-md px-3 py-2.5 text-sm",disabled:!g}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-gray-500",children:g?"闲鱼对评价内容有长度和内容限制,过长可能被拒绝。":"为任一账号开启「评价买家」后可编辑。"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[N.length,"/",r]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"收货致谢文本",description:"买家确认收货后立即发送这条消息。留空则不发送。",icon:q}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"致谢文案"}),e.jsx("textarea",{value:v,onChange:t=>c({...l,auto_thanks_template:t.target.value}),maxLength:r,placeholder:G,className:"ios-input mt-1 min-h-28 w-full resize-y rounded-md px-3 py-2.5 text-sm",disabled:!y}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-gray-500",children:y?"同一笔交易只发一次,不会因多条系统消息重复打扰买家。":"为任一账号开启「收货致谢」后可编辑。"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[v.length,"/",r]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"兜底检查间隔",description:"确认收货已由消息事件即时触发,这里只在漏收消息或服务重启时补做。",icon:A}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"检查频率"}),e.jsx("select",{value:S,onChange:t=>c({...l,buyer_interaction_interval:t.target.value}),className:"ios-input mt-1 w-full rounded-md px-3 py-2.5 text-sm",children:K.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-gray-500",children:"每轮都会拉取一次卖出订单列表,设得太密容易触发平台风控。 正常情况下靠即时触发就够了,这里保持较长间隔即可。"})]})]})]})]})};export{ee as default}; +import{r as n,j as e,Q as C,e as A,aS as $,T as P,o as B,n as i,aX as H,bF as M}from"./index-BZnqBmwp.js";import{P as D,a as R,N as z,S as d}from"./ui-B9Jzqjf7.js";import{S as O}from"./save-Dxf2dvgb.js";import{S as U}from"./shield-alert-rM_NVGQr.js";import{F as X}from"./flower-2-B1FJm-vw.js";import{M as q}from"./message-square-text-Bnj1FXzX.js";const r=200,E="宝贝收到了,很满意,感谢老板,欢迎下次再来!",G="亲,感谢支持!有任何问题随时找我~",I={auto_rate_enabled:"评价买家",auto_flower_enabled:"索要小红花",auto_thanks_enabled:"收货致谢",auto_receive_flower_enabled:"自动收下小红花"},K=[{value:300,label:"5 分钟"},{value:900,label:"15 分钟"},{value:1800,label:"30 分钟"},{value:3600,label:"1 小时"},{value:7200,label:"2 小时(默认)"},{value:21600,label:"6 小时"},{value:86400,label:"24 小时"}],ee=()=>{const[l,c]=n.useState(null),[p,h]=n.useState(!1),[b,_]=n.useState(!1),[o,T]=n.useState([]),[f,x]=n.useState({}),j=()=>{h(!0),Promise.all([$(),P().catch(()=>null),B().catch(()=>[])]).then(([t,a,s])=>{c({...t,auto_rate_template:(t.auto_rate_template??"").trim()||(a==null?void 0:a.auto_rate_template)||E}),T(s),x((a==null?void 0:a.accounts)??{})}).finally(()=>h(!1))},F=async(t,a)=>{const s=f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},w={...s,[a]:!s[a]};x(u=>({...u,[t]:w}));try{await M(t,{[a]:w[a]})}catch(u){x(k=>({...k,[t]:s})),i(`保存失败:${u.message}`)}};n.useEffect(()=>{j()},[]);const L=async()=>{if(!l)return;const t=(l.auto_rate_template||"").trim();if(!t){i("默认评价内容不能为空");return}if(t.length>r){i(`默认评价内容不能超过 ${r} 字`);return}_(!0);try{await H({auto_rate_template:t,auto_thanks_template:(l.auto_thanks_template||"").trim(),buyer_interaction_interval:String(S)}),i("买家互动配置已保存")}catch(a){i(`保存失败:${a.message}`)}finally{_(!1)}};if(!l)return e.jsx(D,{label:"正在加载买家互动配置"});const m=t=>f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},g=o.some(t=>m(t.id).auto_rate_enabled),y=o.some(t=>m(t.id).auto_thanks_enabled),N=l.auto_rate_template??"",v=l.auto_thanks_template??"",S=Number(l.buyer_interaction_interval)||7200;return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(R,{title:"买家互动",description:"评价买家、索要小红花与自动收花。涉及平台实际操作,请按账号开启。",icon:C,actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:p,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(A,{className:`h-4 w-4 ${p?"animate-spin":""}`}),"刷新"]}),e.jsxs("button",{type:"button",onClick:()=>void L(),disabled:b,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(O,{className:"h-4 w-4"}),b?"保存中":"保存设置"]})]})}),e.jsx(z,{type:"warning",message:"评价提交后无法撤销,求花会向买家发送一条消息。建议先用测试订单验证效果。"}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-2",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"按账号开启",description:"逐个账号控制。关闭的账号不会自动执行,订单页也不显示入口、后端拒绝请求。",icon:U}),o.length===0?e.jsx("p",{className:"px-4 py-6 text-sm text-gray-500",children:"还没有账号,请先在账号管理里添加。"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[e.jsx("th",{className:"px-4 py-2 font-semibold",children:"账号"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"评价买家"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"索要小红花"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"收货致谢"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"自动收下小红花"})]})}),e.jsx("tbody",{children:o.map(t=>{const a=m(t.id);return e.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.nickname||t.id}),e.jsx("p",{className:"mt-0.5 font-mono text-xs text-gray-400",children:t.id})]}),["auto_rate_enabled","auto_flower_enabled","auto_thanks_enabled","auto_receive_flower_enabled"].map(s=>e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",role:"switch","aria-checked":a[s],"aria-label":`${t.nickname||t.id} ${I[s]}`,onClick:()=>void F(t.id,s),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${a[s]?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${a[s]?"translate-x-5":""}`})})},s))]},t.id)})})]})}),e.jsxs("p",{className:"border-t border-gray-100 px-4 py-3 text-xs leading-5 text-gray-500",children:["三项都在",e.jsx("strong",{className:"font-semibold text-gray-700",children:"买家确认收货"}),"后触发。 致谢文本立即发送;评价和求花要等闲鱼把订单切到「交易成功」,通常几十秒内完成, 失败则由下面的兜底轮询稍后重试。"]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"默认评价内容",description:"订单页打开评价框时自动填入,仍可逐单修改后再提交。",icon:X}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"评价文案"}),e.jsx("textarea",{value:N,onChange:t=>c({...l,auto_rate_template:t.target.value}),maxLength:r,placeholder:E,className:"ios-input mt-1 min-h-28 w-full resize-y rounded-md px-3 py-2.5 text-sm",disabled:!g}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-gray-500",children:g?"闲鱼对评价内容有长度和内容限制,过长可能被拒绝。":"为任一账号开启「评价买家」后可编辑。"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[N.length,"/",r]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"收货致谢文本",description:"买家确认收货后立即发送这条消息。留空则不发送。",icon:q}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"致谢文案"}),e.jsx("textarea",{value:v,onChange:t=>c({...l,auto_thanks_template:t.target.value}),maxLength:r,placeholder:G,className:"ios-input mt-1 min-h-28 w-full resize-y rounded-md px-3 py-2.5 text-sm",disabled:!y}),e.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-gray-500",children:y?"同一笔交易只发一次,不会因多条系统消息重复打扰买家。":"为任一账号开启「收货致谢」后可编辑。"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[v.length,"/",r]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"兜底检查间隔",description:"确认收货已由消息事件即时触发,这里只在漏收消息或服务重启时补做。",icon:A}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("label",{className:"field-label",children:"检查频率"}),e.jsx("select",{value:S,onChange:t=>c({...l,buyer_interaction_interval:t.target.value}),className:"ios-input mt-1 w-full rounded-md px-3 py-2.5 text-sm",children:K.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-gray-500",children:"每轮都会拉取一次卖出订单列表,设得太密容易触发平台风控。 正常情况下靠即时触发就够了,这里保持较长间隔即可。"})]})]})]})]})};export{ee as default}; diff --git a/static/assets/CardList-CkB5V0PZ.js b/static/assets/CardList-Camdnn7z.js similarity index 98% rename from static/assets/CardList-CkB5V0PZ.js rename to static/assets/CardList-Camdnn7z.js index 3138de9..221e395 100644 --- a/static/assets/CardList-CkB5V0PZ.js +++ b/static/assets/CardList-Camdnn7z.js @@ -1,4 +1,4 @@ -import{c as P,r as m,j as e,X as D,a6 as re,n as j,a7 as de,a8 as M,a9 as G,b as z,aa as H,v as Y,ab as ce,ac as oe,ad as me}from"./index-BCb9Ylky.js";import{a as pe,S as xe,E as B}from"./ui-DcVZvy8T.js";import{P as U}from"./plus-DVdQwMrj.js";import{S as he}from"./square-pen-C-Z-gDiq.js";import{T as ye}from"./trash-2-D-oW6aaO.js";import{P as Z}from"./package-CbDV2ANe.js";import{S as ue}from"./save-cq1qPfv2.js";import{I as q}from"./image-CpvPr1oL.js";import{P as be}from"./package-check-CEUjK1hJ.js";/** +import{c as P,r as m,j as e,X as D,a6 as re,n as j,a7 as de,a8 as M,a9 as G,b as z,aa as H,v as Y,ab as ce,ac as oe,ad as me}from"./index-BZnqBmwp.js";import{a as pe,S as xe,E as B}from"./ui-B9Jzqjf7.js";import{P as U}from"./plus-BljRK6L8.js";import{S as he}from"./square-pen-Bmle-FRS.js";import{T as ye}from"./trash-2-CmT2n80I.js";import{P as Z}from"./package-CDIx-vGO.js";import{S as ue}from"./save-Dxf2dvgb.js";import{I as q}from"./image-BE6TxU00.js";import{P as be}from"./package-check-BKkFNxd0.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Dashboard-BqSYxYMH.js b/static/assets/Dashboard-SIGinmod.js similarity index 99% rename from static/assets/Dashboard-BqSYxYMH.js rename to static/assets/Dashboard-SIGinmod.js index 25f620a..5243b8e 100644 --- a/static/assets/Dashboard-BqSYxYMH.js +++ b/static/assets/Dashboard-SIGinmod.js @@ -1,4 +1,4 @@ -var Db=Object.defineProperty;var $b=(e,t,r)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _i=(e,t,r)=>$b(e,typeof t!="symbol"?t+"":t,r);import{c as gu,r as v,a as bu,b as xu,g as Nb,R as Rb,d as Lb,j as I,C as zb,e as Bb,U as Fb,E as Wb,f as Kb,h as Ub,n as Hb,i as Ac}from"./index-BCb9Ylky.js";import{P as Yb,a as Gb,b as Vb,S as qb,E as Ii}from"./ui-DcVZvy8T.js";import{P as Ro}from"./package-CbDV2ANe.js";import{T as Lh}from"./trending-up-r2pDWepX.js";import{A as Xb}from"./activity-BGRjBy8G.js";import{P as Zb}from"./package-check-CEUjK1hJ.js";/** +var Db=Object.defineProperty;var $b=(e,t,r)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _i=(e,t,r)=>$b(e,typeof t!="symbol"?t+"":t,r);import{c as gu,r as v,a as bu,b as xu,g as Nb,R as Rb,d as Lb,j as I,C as zb,e as Bb,U as Fb,E as Wb,f as Kb,h as Ub,n as Hb,i as Ac}from"./index-BZnqBmwp.js";import{P as Yb,a as Gb,b as Vb,S as qb,E as Ii}from"./ui-B9Jzqjf7.js";import{P as Ro}from"./package-CDIx-vGO.js";import{T as Lh}from"./trending-up-BLnHDV6T.js";import{A as Xb}from"./activity-D09genEZ.js";import{P as Zb}from"./package-check-BKkFNxd0.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Help-Diw0fiZl.js b/static/assets/Help-CmGhIHyo.js similarity index 99% rename from static/assets/Help-Diw0fiZl.js rename to static/assets/Help-CmGhIHyo.js index a409557..9e4f368 100644 --- a/static/assets/Help-Diw0fiZl.js +++ b/static/assets/Help-CmGhIHyo.js @@ -1 +1 @@ -import{r as o,j as e}from"./index-BCb9Ylky.js";const r=[{group:"快速开始",items:[{id:"dashboard",label:"系统总览"},{id:"accounts",label:"账号管理"}]},{group:"闲鱼业务",items:[{id:"items",label:"商品与发货"},{id:"resell",label:"一键转卖"},{id:"hotlist",label:"实时热卖榜"},{id:"pricewatch",label:"价格监控"},{id:"orders",label:"订单管理"},{id:"buyer-interaction",label:"买家互动"},{id:"cards",label:"卡密库存"}]},{group:"消息与自动化",items:[{id:"messages",label:"消息中心"},{id:"auto-reply",label:"自动回复"},{id:"ai-reply",label:"AI 回复"},{id:"product-automation",label:"商品自动化"}]},{group:"系统",items:[{id:"notifications",label:"通知与日志"},{id:"settings",label:"系统设置"},{id:"users",label:"用户管理"},{id:"about",label:"关于本系统"}]}],p={dashboard:{title:"系统总览",intro:"登录后的首页,汇总账号、订单、营收和库存数据,一眼判断当前经营状态。",steps:["顶部时间筛选可切换统计周期:今天 / 昨天 / 三天内 / 7天内 / 一个月内 / 自定义。","「有效成交额」与「已到账」两张卡片展示所选周期内的资金数据。","「系统运行中」状态灯表示后端自动回复、定时任务正常运行。","左侧菜单点击任意功能即可切换页面,右上角可切换日间/夜间模式。"],tips:["新部署时没有订单记录,金额显示 ¥0.00 属正常,产生交易后自动累计。"]},accounts:{title:"账号管理",intro:"所有功能的入口:先把闲鱼账号接入系统,其他页面才能选择该账号操作。",steps:["点击「添加账号」,填入账号备注名与 Cookie(从浏览器登录闲鱼后在开发者工具 Network 里复制)。","保存后列表会显示该账号,可点击「检测」验证 Cookie 是否仍然有效。","失效的账号需要重新复制 Cookie 更新;不用的账号可「禁用」而不必删除。","启用状态的账号才会参与自动回复、订单同步、消息聚合等自动化。"],tips:["Cookie 等同账号登录态,请勿泄露;本系统只保存在自己的服务器数据库中。"]},items:{title:"商品与发货",intro:"同步闲鱼在售商品,为每个商品配置自动发货内容(卡密、网盘链接或文字说明)。",steps:["选择账号后点击同步,把该账号在闲鱼的在售商品拉取到列表。","给商品设置发货内容:虚拟商品可填卡密说明或网盘链接,实物商品可填物流备注。","买家付款后系统按这里配置的内容自动回复发货,无需手动复制粘贴。","商品价格、标题变化可通过刷新按钮同步最新状态。"],tips:["发货内容支持多行文本与链接,建议按「商品名称 + 提取码」格式写清楚。"]},resell:{title:"一键转卖",intro:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号,做无货源转卖。",steps:["右上角先选择要发布到的闲鱼账号。","点「我的收藏」→「加载收藏」读取该账号收藏的在售商品;或切到「搜索商品」按关键词找货。","在列表中勾选想转卖的商品,修改标题、价格、描述等发布信息。","点「一键转卖」发布,商品即挂到自己账号名下。"],tips:["发布前核对价格是否留足利润;同名商品重复转卖前先在商品列表确认未上架过。"]},hotlist:{title:"实时热卖榜",intro:"抓取闲鱼实时热卖数据,帮你判断什么好卖、该上什么货。",steps:["选择分类或直接查看综合热卖榜,列表按近期成交热度排序。","点击商品可查看详情与价格区间,作为自己定价的参考。","看中的品可直接跳「一键转卖」上架到自己账号。"],tips:["榜单数据为实时抓取,个别时段可能延迟,可点刷新重新拉取。"]},pricewatch:{title:"价格监控",intro:"设定关键词和目标价,系统定时搜索闲鱼,出现低于目标价的商品立即通知你捡漏。",steps:["点「新建规则」:填写关键词(如想蹲的商品名)、目标价、检测间隔,保存后立即执行一次检测。","检测结果展示匹配商品数、历史最低价与「最近一次」的完整商品信息(超长内容自动换行展示)。","低于目标价时触发通知——前提是已在「通知与日志」页配置好通知渠道并勾选「价格监控」事件(见下方章节)。","点「历史记录」查看每次检测的明细;不需要的规则可停用或删除。"],tips:["通知没发出来时,页面顶部的红色提示会写明去哪配置,按提示到「通知与日志」页补配即可。","关键词越具体匹配越准,避免太宽泛导致噪音过多。"]},orders:{title:"订单管理",intro:"汇总所选账号的闲鱼订单,查看状态、手动补发与核对发货记录。",steps:["选择账号与时间范围筛选订单,列表显示买家、商品、金额与状态。","自动发货成功的订单会标记发货内容;失败的可在这里点「重新发货」补发。","点订单行可展开详情,核对买家留言与发货回执。"],tips:["订单数据来自定时同步,新成交订单可能延迟几分钟出现。"]},"buyer-interaction":{title:"买家互动",intro:"评价买家、索要小红花与自动收花——和闲鱼平台实际操作绑定,需按账号开启。",steps:["先在「账号管理」添加账号(无账号时本页会提示先去添加)。","在「按账号开启」区域为需要的账号打开对应开关:评价买家 / 索要小红花 / 自动收花。","点「保存设置」生效;关闭的账号不会执行任何互动,订单页也不显示入口。","建议先用一笔测试订单验证效果,再放开到全部账号。"],tips:["⚠ 评价提交后无法撤销,索要小红花会给买家发一条消息——务必先小范围测试。"]},cards:{title:"卡密库存",intro:"导入与管理卡密,配合「商品与发货」实现虚拟商品自动发货、库存自动扣减。",steps:["新建卡密分组(对应某个商品),批量粘贴或上传卡密文本,一行一条。","在「商品与发货」把商品的发货方式关联到该卡密分组。","买家付款后系统自动取一条卡密发出并扣减库存,列表显示剩余数量。","库存告急时及时补充,发货失败的订单会记录原因便于排查。"],tips:["卡密只对管理员可见,普通用户页面不会展示明文。"]},messages:{title:"消息中心",intro:"把多个闲鱼账号的买家消息聚合到一处,集中查看与回复。",steps:["选择账号后加载未读/全部消息,按时间倒序展示。","点击会话查看上下文并可手动回复;已被自动回复接管的会话会标注规则来源。","新消息会实时提醒,避免漏掉买家咨询。"],tips:["消息聚合依赖账号 Cookie 有效,账号失效时先到「账号管理」更新。"]},"auto-reply":{title:"自动回复",intro:"配置关键词规则:买家消息命中触发词即自动回复,7×24 接待。",steps:["点「新建规则」,设置触发关键词(支持多个、精确/模糊匹配)与回复内容。","回复支持多行文本、链接与随机话术(多条回复轮流发送,避免重复感)。","保存即生效,无需重启;列表可停用、编辑、删除规则。","在规则上可指定仅对某账号生效,或全局所有账号共用。"],tips:["建议先配 3-5 条高频问题(价格、包邮、发货时间)再逐步扩充。"]},"ai-reply":{title:"AI 回复",intro:"接入大模型 API,让 AI 根据上下文智能回复买家消息、自动议价。",steps:["先到「系统设置 → AI 服务」填好 API 地址、Key 与模型名(本地 NewAPI 或任意兼容接口)。","在本页设置议价策略:最大优惠百分比/金额、议价轮数上限。","开启「上下文」后 AI 会携带最近若干条对话,回复更连贯。","系统先匹配关键词规则,未命中才走 AI;可在页面调整两者的优先级。"],tips:["AI 每次回复消耗 API 额度,量大时建议设置轮数与优惠上限兜底。"]},"product-automation":{title:"商品自动化",intro:"商品素材库与批量任务:筛选规则、删除计划、历史数据补偿集中管理。",steps:["「素材库」标签:按账号/关键词搜索已入库的商品素材,供批量任务取用。","「筛选规则」标签:定义商品筛选条件(标题、分类、价格区间),命中规则的素材进入处理流程。","「删除计划」标签:创建批量下架任务,按计划时间或条件执行删除。","「补偿任务」标签:对漏统计的历史数据发起回补;「刷新数据」同步最新任务状态。"],tips:["删除计划执行前请核对规则,批量下架不可自动撤销。"]},notifications:{title:"通知与日志",intro:"统一管理外部通知渠道、账号绑定、风控事件和系统运行日志。",steps:["「通知渠道」标签:点「新建渠道」创建发送通道——邮件渠道只需填接收邮箱(SMTP 自动复用系统设置)。","「账号通知」标签:新建规则时选择账号 + 渠道,并在「事件」里勾选要提醒的类型(价格监控、登录异常等)。","「风控日志」「系统日志」标签:查看平台风控事件与系统运行记录,便于排查问题。","顶部「刷新配置」可重新加载渠道与规则的最新状态。"],tips:["价格监控要发通知:渠道 + 账号通知规则 + 事件勾选「价格监控」三者缺一不可。","渠道里的密钥仅用于服务端发送,不要截图外发。"]},settings:{title:"系统设置",intro:"全局配置中心:邮件服务、AI 接口、公告与默认登录信息都在这里。",steps:["「邮件服务」:填 SMTP 服务器/端口/账号/授权码(QQ 邮箱 465 端口自动走 SSL),点「测试发送」验证。","「AI 服务」:配置模型 API 地址、Key 与模型名,供「AI 回复」使用。","「公告管理」:编辑系统顶部展示的公告与版本更新提示。","其余开关(默认登录信息展示、图形验证码等)按需调整,改动即时生效。"],tips:["改完 SMTP 务必点测试发送,收到邮件即配置成功。"]},users:{title:"用户管理",intro:"管理员专用:管理能登录本系统的用户,支持重置密码与启用禁用。",steps:["列表展示全部用户及其登录状态,可按启用/停用控制能否登录。","点「重置密码」为用户设置新密码(只有管理员能操作)。","停用的用户立即无法登录,历史数据保留。"],tips:["建议只给自己与必要协作者开账号,管理员账号保持一个即可。"]},about:{title:"关于本系统",intro:"版本信息、项目主页与联系方式。",steps:["查看当前版本号与更新日志,新版本发布后按提示升级。","页面上有项目开源地址与作者联系方式,问题反馈优先走这里。"]}},x=()=>{const[n,d]=o.useState("dashboard");o.useEffect(()=>{const l=new IntersectionObserver(t=>{const s=t.filter(i=>i.isIntersecting).sort((i,a)=>i.boundingClientRect.top-a.boundingClientRect.top);s[0]&&d(s[0].target.id.replace("help-",""))},{rootMargin:"0px 0px -70% 0px",threshold:0});return r.forEach(t=>t.items.forEach(s=>{const i=document.getElementById(`help-${s.id}`);i&&l.observe(i)})),()=>l.disconnect()},[]);const c=l=>{const t=document.getElementById(`help-${l}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),d(l))};return e.jsx("div",{className:"p-4 md:p-6",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[e.jsx("nav",{id:"help-nav",className:"lg:w-48 shrink-0",children:e.jsxs("div",{className:"lg:sticky lg:top-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-3",children:[e.jsx("div",{className:"px-2 pb-2 text-xs font-semibold text-slate-400 uppercase tracking-wider",children:"功能导航"}),e.jsx("div",{className:"flex lg:block gap-2 lg:gap-0 overflow-x-auto lg:overflow-visible",children:r.map(l=>e.jsxs("div",{className:"lg:mb-3 shrink-0",children:[e.jsx("div",{className:"hidden lg:block px-2 pt-1 pb-1 text-[11px] font-medium text-slate-400",children:l.group}),l.items.map(t=>e.jsx("button",{onClick:()=>c(t.id),className:`w-auto lg:w-full text-left whitespace-nowrap px-2.5 py-1.5 rounded-lg text-sm transition-colors ${n===t.id?"bg-amber-500/15 text-amber-600 dark:text-amber-400 font-medium":"text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700/60"}`,children:t.label},t.id))]},l.group))})]})}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-6",children:[e.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-5",children:[e.jsx("h1",{className:"text-xl font-bold text-slate-800 dark:text-slate-100",children:"躺赚鱼 使用说明"}),e.jsx("p",{className:"mt-1.5 text-sm text-slate-500 dark:text-slate-400",children:"每个功能的详细使用教程:左侧菜单点击可跳转定位,右侧为操作步骤与真实界面截图。 建议按「快速开始 → 闲鱼业务 → 消息与自动化」的顺序初次上手。"})]}),r.map(l=>l.items.map(t=>{const s=p[t.id];return s?e.jsxs("section",{id:`help-${t.id}`,className:"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-5 scroll-mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-1.5 h-5 rounded-full bg-amber-500"}),e.jsx("h2",{className:"text-lg font-semibold text-slate-800 dark:text-slate-100",children:s.title})]}),e.jsx("p",{className:"mt-2 text-sm text-slate-600 dark:text-slate-300",children:s.intro}),e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"text-xs font-semibold text-slate-400 mb-2",children:"操作步骤"}),e.jsx("ol",{className:"space-y-1.5 text-sm text-slate-700 dark:text-slate-300 list-decimal list-inside",children:s.steps.map((i,a)=>e.jsx("li",{className:"leading-relaxed",children:i},a))})]}),s.tips&&s.tips.length>0&&e.jsxs("div",{className:"mt-4 rounded-lg bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/20 px-3.5 py-2.5",children:[e.jsx("div",{className:"text-xs font-semibold text-amber-700 dark:text-amber-400 mb-1",children:"小提示"}),e.jsx("ul",{className:"space-y-1 text-[13px] text-amber-800 dark:text-amber-300 list-disc list-inside",children:s.tips.map((i,a)=>e.jsx("li",{className:"leading-relaxed",children:i},a))})]}),e.jsxs("figure",{className:"mt-4",children:[e.jsx("img",{src:`/static/help/${t.id}.png`,alt:`${s.title} 页面界面截图`,loading:"lazy",className:"w-full rounded-lg border border-slate-200 dark:border-slate-700 shadow-sm"}),e.jsxs("figcaption",{className:"mt-1.5 text-xs text-slate-400",children:["▲ ",s.title," —— 实际界面截图"]})]})]},t.id):null}))]})]})})};export{x as default}; +import{r as o,j as e}from"./index-BZnqBmwp.js";const r=[{group:"快速开始",items:[{id:"dashboard",label:"系统总览"},{id:"accounts",label:"账号管理"}]},{group:"闲鱼业务",items:[{id:"items",label:"商品与发货"},{id:"resell",label:"一键转卖"},{id:"hotlist",label:"实时热卖榜"},{id:"pricewatch",label:"价格监控"},{id:"orders",label:"订单管理"},{id:"buyer-interaction",label:"买家互动"},{id:"cards",label:"卡密库存"}]},{group:"消息与自动化",items:[{id:"messages",label:"消息中心"},{id:"auto-reply",label:"自动回复"},{id:"ai-reply",label:"AI 回复"},{id:"product-automation",label:"商品自动化"}]},{group:"系统",items:[{id:"notifications",label:"通知与日志"},{id:"settings",label:"系统设置"},{id:"users",label:"用户管理"},{id:"about",label:"关于本系统"}]}],p={dashboard:{title:"系统总览",intro:"登录后的首页,汇总账号、订单、营收和库存数据,一眼判断当前经营状态。",steps:["顶部时间筛选可切换统计周期:今天 / 昨天 / 三天内 / 7天内 / 一个月内 / 自定义。","「有效成交额」与「已到账」两张卡片展示所选周期内的资金数据。","「系统运行中」状态灯表示后端自动回复、定时任务正常运行。","左侧菜单点击任意功能即可切换页面,右上角可切换日间/夜间模式。"],tips:["新部署时没有订单记录,金额显示 ¥0.00 属正常,产生交易后自动累计。"]},accounts:{title:"账号管理",intro:"所有功能的入口:先把闲鱼账号接入系统,其他页面才能选择该账号操作。",steps:["点击「添加账号」,填入账号备注名与 Cookie(从浏览器登录闲鱼后在开发者工具 Network 里复制)。","保存后列表会显示该账号,可点击「检测」验证 Cookie 是否仍然有效。","失效的账号需要重新复制 Cookie 更新;不用的账号可「禁用」而不必删除。","启用状态的账号才会参与自动回复、订单同步、消息聚合等自动化。"],tips:["Cookie 等同账号登录态,请勿泄露;本系统只保存在自己的服务器数据库中。"]},items:{title:"商品与发货",intro:"同步闲鱼在售商品,为每个商品配置自动发货内容(卡密、网盘链接或文字说明)。",steps:["选择账号后点击同步,把该账号在闲鱼的在售商品拉取到列表。","给商品设置发货内容:虚拟商品可填卡密说明或网盘链接,实物商品可填物流备注。","买家付款后系统按这里配置的内容自动回复发货,无需手动复制粘贴。","商品价格、标题变化可通过刷新按钮同步最新状态。"],tips:["发货内容支持多行文本与链接,建议按「商品名称 + 提取码」格式写清楚。"]},resell:{title:"一键转卖",intro:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号,做无货源转卖。",steps:["右上角先选择要发布到的闲鱼账号。","点「我的收藏」→「加载收藏」读取该账号收藏的在售商品;或切到「搜索商品」按关键词找货。","在列表中勾选想转卖的商品,修改标题、价格、描述等发布信息。","点「一键转卖」发布,商品即挂到自己账号名下。"],tips:["发布前核对价格是否留足利润;同名商品重复转卖前先在商品列表确认未上架过。"]},hotlist:{title:"实时热卖榜",intro:"抓取闲鱼实时热卖数据,帮你判断什么好卖、该上什么货。",steps:["选择分类或直接查看综合热卖榜,列表按近期成交热度排序。","点击商品可查看详情与价格区间,作为自己定价的参考。","看中的品可直接跳「一键转卖」上架到自己账号。"],tips:["榜单数据为实时抓取,个别时段可能延迟,可点刷新重新拉取。"]},pricewatch:{title:"价格监控",intro:"设定关键词和目标价,系统定时搜索闲鱼,出现低于目标价的商品立即通知你捡漏。",steps:["点「新建规则」:填写关键词(如想蹲的商品名)、目标价、检测间隔,保存后立即执行一次检测。","检测结果展示匹配商品数、历史最低价与「最近一次」的完整商品信息(超长内容自动换行展示)。","低于目标价时触发通知——前提是已在「通知与日志」页配置好通知渠道并勾选「价格监控」事件(见下方章节)。","点「历史记录」查看每次检测的明细;不需要的规则可停用或删除。"],tips:["通知没发出来时,页面顶部的红色提示会写明去哪配置,按提示到「通知与日志」页补配即可。","关键词越具体匹配越准,避免太宽泛导致噪音过多。"]},orders:{title:"订单管理",intro:"汇总所选账号的闲鱼订单,查看状态、手动补发与核对发货记录。",steps:["选择账号与时间范围筛选订单,列表显示买家、商品、金额与状态。","自动发货成功的订单会标记发货内容;失败的可在这里点「重新发货」补发。","点订单行可展开详情,核对买家留言与发货回执。"],tips:["订单数据来自定时同步,新成交订单可能延迟几分钟出现。"]},"buyer-interaction":{title:"买家互动",intro:"评价买家、索要小红花与自动收花——和闲鱼平台实际操作绑定,需按账号开启。",steps:["先在「账号管理」添加账号(无账号时本页会提示先去添加)。","在「按账号开启」区域为需要的账号打开对应开关:评价买家 / 索要小红花 / 自动收花。","点「保存设置」生效;关闭的账号不会执行任何互动,订单页也不显示入口。","建议先用一笔测试订单验证效果,再放开到全部账号。"],tips:["⚠ 评价提交后无法撤销,索要小红花会给买家发一条消息——务必先小范围测试。"]},cards:{title:"卡密库存",intro:"导入与管理卡密,配合「商品与发货」实现虚拟商品自动发货、库存自动扣减。",steps:["新建卡密分组(对应某个商品),批量粘贴或上传卡密文本,一行一条。","在「商品与发货」把商品的发货方式关联到该卡密分组。","买家付款后系统自动取一条卡密发出并扣减库存,列表显示剩余数量。","库存告急时及时补充,发货失败的订单会记录原因便于排查。"],tips:["卡密只对管理员可见,普通用户页面不会展示明文。"]},messages:{title:"消息中心",intro:"把多个闲鱼账号的买家消息聚合到一处,集中查看与回复。",steps:["选择账号后加载未读/全部消息,按时间倒序展示。","点击会话查看上下文并可手动回复;已被自动回复接管的会话会标注规则来源。","新消息会实时提醒,避免漏掉买家咨询。"],tips:["消息聚合依赖账号 Cookie 有效,账号失效时先到「账号管理」更新。"]},"auto-reply":{title:"自动回复",intro:"配置关键词规则:买家消息命中触发词即自动回复,7×24 接待。",steps:["点「新建规则」,设置触发关键词(支持多个、精确/模糊匹配)与回复内容。","回复支持多行文本、链接与随机话术(多条回复轮流发送,避免重复感)。","保存即生效,无需重启;列表可停用、编辑、删除规则。","在规则上可指定仅对某账号生效,或全局所有账号共用。"],tips:["建议先配 3-5 条高频问题(价格、包邮、发货时间)再逐步扩充。"]},"ai-reply":{title:"AI 回复",intro:"接入大模型 API,让 AI 根据上下文智能回复买家消息、自动议价。",steps:["先到「系统设置 → AI 服务」填好 API 地址、Key 与模型名(本地 NewAPI 或任意兼容接口)。","在本页设置议价策略:最大优惠百分比/金额、议价轮数上限。","开启「上下文」后 AI 会携带最近若干条对话,回复更连贯。","系统先匹配关键词规则,未命中才走 AI;可在页面调整两者的优先级。"],tips:["AI 每次回复消耗 API 额度,量大时建议设置轮数与优惠上限兜底。"]},"product-automation":{title:"商品自动化",intro:"商品素材库与批量任务:筛选规则、删除计划、历史数据补偿集中管理。",steps:["「素材库」标签:按账号/关键词搜索已入库的商品素材,供批量任务取用。","「筛选规则」标签:定义商品筛选条件(标题、分类、价格区间),命中规则的素材进入处理流程。","「删除计划」标签:创建批量下架任务,按计划时间或条件执行删除。","「补偿任务」标签:对漏统计的历史数据发起回补;「刷新数据」同步最新任务状态。"],tips:["删除计划执行前请核对规则,批量下架不可自动撤销。"]},notifications:{title:"通知与日志",intro:"统一管理外部通知渠道、账号绑定、风控事件和系统运行日志。",steps:["「通知渠道」标签:点「新建渠道」创建发送通道——邮件渠道只需填接收邮箱(SMTP 自动复用系统设置)。","「账号通知」标签:新建规则时选择账号 + 渠道,并在「事件」里勾选要提醒的类型(价格监控、登录异常等)。","「风控日志」「系统日志」标签:查看平台风控事件与系统运行记录,便于排查问题。","顶部「刷新配置」可重新加载渠道与规则的最新状态。"],tips:["价格监控要发通知:渠道 + 账号通知规则 + 事件勾选「价格监控」三者缺一不可。","渠道里的密钥仅用于服务端发送,不要截图外发。"]},settings:{title:"系统设置",intro:"全局配置中心:邮件服务、AI 接口、公告与默认登录信息都在这里。",steps:["「邮件服务」:填 SMTP 服务器/端口/账号/授权码(QQ 邮箱 465 端口自动走 SSL),点「测试发送」验证。","「AI 服务」:配置模型 API 地址、Key 与模型名,供「AI 回复」使用。","「公告管理」:编辑系统顶部展示的公告与版本更新提示。","其余开关(默认登录信息展示、图形验证码等)按需调整,改动即时生效。"],tips:["改完 SMTP 务必点测试发送,收到邮件即配置成功。"]},users:{title:"用户管理",intro:"管理员专用:管理能登录本系统的用户,支持重置密码与启用禁用。",steps:["列表展示全部用户及其登录状态,可按启用/停用控制能否登录。","点「重置密码」为用户设置新密码(只有管理员能操作)。","停用的用户立即无法登录,历史数据保留。"],tips:["建议只给自己与必要协作者开账号,管理员账号保持一个即可。"]},about:{title:"关于本系统",intro:"版本信息、项目主页与联系方式。",steps:["查看当前版本号与更新日志,新版本发布后按提示升级。","页面上有项目开源地址与作者联系方式,问题反馈优先走这里。"]}},x=()=>{const[n,d]=o.useState("dashboard");o.useEffect(()=>{const l=new IntersectionObserver(t=>{const s=t.filter(i=>i.isIntersecting).sort((i,a)=>i.boundingClientRect.top-a.boundingClientRect.top);s[0]&&d(s[0].target.id.replace("help-",""))},{rootMargin:"0px 0px -70% 0px",threshold:0});return r.forEach(t=>t.items.forEach(s=>{const i=document.getElementById(`help-${s.id}`);i&&l.observe(i)})),()=>l.disconnect()},[]);const c=l=>{const t=document.getElementById(`help-${l}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),d(l))};return e.jsx("div",{className:"p-4 md:p-6",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[e.jsx("nav",{id:"help-nav",className:"lg:w-48 shrink-0",children:e.jsxs("div",{className:"lg:sticky lg:top-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-3",children:[e.jsx("div",{className:"px-2 pb-2 text-xs font-semibold text-slate-400 uppercase tracking-wider",children:"功能导航"}),e.jsx("div",{className:"flex lg:block gap-2 lg:gap-0 overflow-x-auto lg:overflow-visible",children:r.map(l=>e.jsxs("div",{className:"lg:mb-3 shrink-0",children:[e.jsx("div",{className:"hidden lg:block px-2 pt-1 pb-1 text-[11px] font-medium text-slate-400",children:l.group}),l.items.map(t=>e.jsx("button",{onClick:()=>c(t.id),className:`w-auto lg:w-full text-left whitespace-nowrap px-2.5 py-1.5 rounded-lg text-sm transition-colors ${n===t.id?"bg-amber-500/15 text-amber-600 dark:text-amber-400 font-medium":"text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700/60"}`,children:t.label},t.id))]},l.group))})]})}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-6",children:[e.jsxs("div",{className:"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-5",children:[e.jsx("h1",{className:"text-xl font-bold text-slate-800 dark:text-slate-100",children:"躺赚鱼 使用说明"}),e.jsx("p",{className:"mt-1.5 text-sm text-slate-500 dark:text-slate-400",children:"每个功能的详细使用教程:左侧菜单点击可跳转定位,右侧为操作步骤与真实界面截图。 建议按「快速开始 → 闲鱼业务 → 消息与自动化」的顺序初次上手。"})]}),r.map(l=>l.items.map(t=>{const s=p[t.id];return s?e.jsxs("section",{id:`help-${t.id}`,className:"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-5 scroll-mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-1.5 h-5 rounded-full bg-amber-500"}),e.jsx("h2",{className:"text-lg font-semibold text-slate-800 dark:text-slate-100",children:s.title})]}),e.jsx("p",{className:"mt-2 text-sm text-slate-600 dark:text-slate-300",children:s.intro}),e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"text-xs font-semibold text-slate-400 mb-2",children:"操作步骤"}),e.jsx("ol",{className:"space-y-1.5 text-sm text-slate-700 dark:text-slate-300 list-decimal list-inside",children:s.steps.map((i,a)=>e.jsx("li",{className:"leading-relaxed",children:i},a))})]}),s.tips&&s.tips.length>0&&e.jsxs("div",{className:"mt-4 rounded-lg bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/20 px-3.5 py-2.5",children:[e.jsx("div",{className:"text-xs font-semibold text-amber-700 dark:text-amber-400 mb-1",children:"小提示"}),e.jsx("ul",{className:"space-y-1 text-[13px] text-amber-800 dark:text-amber-300 list-disc list-inside",children:s.tips.map((i,a)=>e.jsx("li",{className:"leading-relaxed",children:i},a))})]}),e.jsxs("figure",{className:"mt-4",children:[e.jsx("img",{src:`/static/help/${t.id}.png`,alt:`${s.title} 页面界面截图`,loading:"lazy",className:"w-full rounded-lg border border-slate-200 dark:border-slate-700 shadow-sm"}),e.jsxs("figcaption",{className:"mt-1.5 text-xs text-slate-400",children:["▲ ",s.title," —— 实际界面截图"]})]})]},t.id):null}))]})]})})};export{x as default}; diff --git a/static/assets/HotList-BLmZsZvH.js b/static/assets/HotList-SDSWlemc.js similarity index 88% rename from static/assets/HotList-BLmZsZvH.js rename to static/assets/HotList-SDSWlemc.js index 0d28797..f768196 100644 --- a/static/assets/HotList-BLmZsZvH.js +++ b/static/assets/HotList-SDSWlemc.js @@ -1 +1 @@ -import{r as n,bL as H,bM as A,j as e,bN as S,L as y,e as B,E as F}from"./index-BCb9Ylky.js";import{P as O,a as U,N as q,b as z,E as V}from"./ui-DcVZvy8T.js";import{T as L}from"./trending-up-r2pDWepX.js";import{P as W}from"./package-CbDV2ANe.js";const Y=2500,R=r=>r?r>=1e4?`${(r/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(r):"0",G=r=>{if(!r)return"—";const i=Date.now()-r;if(i<6e4)return"刚刚";if(i<36e5)return`${Math.floor(i/6e4)}分钟前`;if(i<864e5)return`${Math.floor(i/36e5)}小时前`;if(i<7*864e5)return`${Math.floor(i/864e5)}天前`;const o=new Date(r);return`${o.getMonth()+1}月${o.getDate()}日`},J=r=>{if(!r)return"—";const i=new Date(r),o=v=>String(v).padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`},K=({rank:r})=>{const i=r===1?"bg-amber-400 text-white":r===2?"bg-gray-300 text-gray-700":r===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsx("span",{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-sm font-bold ${i}`,children:r})},se=()=>{const[r,i]=n.useState(!0),[o,v]=n.useState({}),[$,M]=n.useState([]),[d,P]=n.useState("digital"),[j,f]=n.useState(null),[h,_]=n.useState(0),[u,k]=n.useState(!1),g=n.useRef(null),I=n.useRef(d);I.current=d;const w=n.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),b=n.useCallback(async s=>{try{const a=await H();v(a.boards||{}),M(a.categories||[]),s!=null&&s.silent||i(!1),Object.values(a.boards||{}).some(x=>x.refreshing)?E():w()}catch(a){s!=null&&s.silent||(i(!1),f({type:"error",message:a.message||"榜单加载失败"}))}},[]),E=n.useCallback(()=>{g.current||(g.current=setInterval(()=>{b({silent:!0})},Y))},[b]);n.useEffect(()=>(b(),w),[b,w]),n.useEffect(()=>{if(h<=0)return;const s=setInterval(()=>_(a=>a<=1?0:a-1),1e3);return()=>clearInterval(s)},[h]);const t=o[d];n.useEffect(()=>{const s=o[d];!s||r||s.refreshing||s.items.length>0||s.cooldown_remaining>0||N(d)},[d,r,o]);const N=async s=>{if(!u){k(!0);try{const a=await A(s);a.started?(f({type:"info",message:a.categories&&a.categories.length>1?"已开始刷新全部类目,完成后自动更新。":"已开始抓取,十几秒后榜单自动刷新。"}),E()):a.reason==="cooldown"?f({type:"error",message:a.message||"刷新过于频繁,请稍后再试"}):f({type:"info",message:a.message||"已有刷新任务进行中"})}catch(a){f({type:"error",message:a.message||"刷新触发失败"})}finally{k(!1)}}};n.useEffect(()=>{t&&t.cooldown_remaining>0&&_(t.cooldown_remaining)},[t]);const T=n.useMemo(()=>$.map(s=>{var a;return{id:s.id,label:s.name,count:(a=o[s.id])==null?void 0:a.items.length}}),[$,o]),C=n.useMemo(()=>{if(!t)return[];const s={};return(t.items||[]).forEach(l=>{(l.keywords||[]).forEach(x=>{const p=s[x]||(s[x]={hits:0,want:0});p.hits+=1,p.want+=l.want_count||0})}),(t.keywords&&t.keywords.length?t.keywords:Object.keys(s)).map(l=>{var x,p;return{kw:l,hits:((x=s[l])==null?void 0:x.hits)||0,want:((p=s[l])==null?void 0:p.want)||0}}).sort((l,x)=>x.want-l.want)},[t]),m=!!(t!=null&&t.refreshing),c=t==null?void 0:t.progress,D=t!=null&&t.updated_at?G(t.updated_at*1e3):"尚未生成";return r?e.jsx(O,{label:"正在加载热卖榜"}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(U,{title:"实时热卖榜",description:"按「想要人数」排序的全网热卖商品,数据来自闲鱼实时搜索聚合。",icon:S,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:t?`更新于 ${D}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N("all"),disabled:u||m||h>0,children:[u||m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(B,{className:"h-4 w-4"}),"全部刷新"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N(d),disabled:u||m||h>0,children:[m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(L,{className:"h-4 w-4"}),h>0?`${h}s 后可刷新`:"刷新本类目"]})]})}),j&&e.jsx(q,{type:j.type==="info"?"success":j.type,message:j.message,onClose:()=>f(null)}),e.jsx("div",{className:"toolbar",children:e.jsx(z,{value:d,onChange:P,items:T,ariaLabel:"热卖榜类目"})}),m&&e.jsx("div",{className:"section-panel",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(y,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:["正在抓取「",(c==null?void 0:c.keyword)||"…","」",c&&c.total>0?`(${Math.min(c.done+1,c.total)}/${c.total})`:""]}),c&&c.total>0&&e.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("span",{className:"block h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.round(c.done/c.total*100)}%`}})})]})}),!t||t.items.length===0?e.jsx(V,{icon:S,title:m?"正在生成榜单":"榜单还没生成",description:m?"首次抓取需要十几个关键词、约 20 秒,完成后自动展示。":"点右上角「刷新本类目」开始抓取,按想要人数排出前 30 名。",action:m?void 0:e.jsx("button",{type:"button",className:"ios-btn-primary rounded-md px-4 py-2 text-sm",onClick:()=>void N(d),disabled:u||h>0,children:"生成榜单"})}):e.jsxs("section",{className:"section-panel",children:[e.jsx("div",{className:"section-panel__header",children:e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(L,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h2",{className:"section-title",children:[t.name,"热卖榜 · Top ",t.items.length]}),e.jsxs("p",{className:"section-description",children:["共 ",t.source_count," 个在售商品参与排序,按「想要人数」取前 ",t.items.length," 名"]}),C.length>0&&e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-soft)]",children:"热门搜索词:"}),C.map(({kw:s,hits:a,want:l})=>e.jsxs("a",{href:`https://www.goofish.com/search?q=${encodeURIComponent(s)}`,target:"_blank",rel:"noreferrer noopener",title:a>0?`点击搜索「${s}」· 命中 ${a} 个商品 · 合计 ${l} 人想要`:`点击搜索「${s}」(本轮未命中商品)`,className:"group inline-flex items-center gap-1 rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text)] transition-colors hover:bg-[#ff4400] hover:text-white",children:[e.jsx("span",{children:s}),a>0&&e.jsx("span",{className:"font-medium text-[#ff4400] group-hover:text-white",children:R(l)})]},s))]})]})]})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[6%]",children:"排名"}),e.jsx("th",{className:"w-[44%]",children:"商品"}),e.jsx("th",{className:"w-[11%]",children:"价格"}),e.jsx("th",{className:"w-[12%]",children:"想要人数"}),e.jsx("th",{className:"w-[12%]",children:"发布时间"}),e.jsx("th",{className:"w-[15%] text-right",children:"操作"})]})}),e.jsx("tbody",{children:t.items.map(s=>{var a;return e.jsxs("tr",{children:[e.jsx("td",{"data-label":"排名",children:e.jsx(K,{rank:s.rank})}),e.jsx("td",{"data-label":"商品",children:e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("div",{className:"h-12 w-12 shrink-0 overflow-hidden rounded-lg bg-[var(--surface-subtle)]",children:s.image?e.jsx("img",{src:s.image,alt:"",loading:"lazy",className:"h-full w-full object-cover",onError:l=>{l.currentTarget.style.display="none"}}):e.jsx("div",{className:"flex h-full items-center justify-center text-gray-400",children:e.jsx(W,{className:"h-5 w-5"})})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer noopener",className:"block text-sm text-[var(--text)] break-words hover:text-[#ff4400] hover:underline",title:s.title,children:s.title||"(无标题)"}),e.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-[var(--text-soft)]",children:[s.area&&e.jsx("span",{children:s.area}),(a=s.keywords)==null?void 0:a.slice(0,3).map(l=>e.jsx("span",{className:"rounded bg-[var(--surface-subtle)] px-1.5 py-0.5",children:l},l))]})]})]})}),e.jsx("td",{"data-label":"价格",children:e.jsx("span",{className:"font-bold text-[#ff4400]",children:s.price||"面议"})}),e.jsxs("td",{"data-label":"想要人数",children:[e.jsx("span",{className:"font-semibold text-[var(--text)]",children:R(s.want_count)}),e.jsx("span",{className:"ml-1 text-xs text-[var(--text-soft)]",children:"人想要"})]}),e.jsx("td",{"data-label":"发布时间",className:"whitespace-nowrap text-sm text-[var(--text-soft)]",children:J(s.publish_time)}),e.jsx("td",{"data-label":"操作",className:"text-right",children:e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer noopener",className:"ios-btn-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm",children:[e.jsx(F,{className:"h-3.5 w-3.5"}),"查看商品"]})})]},s.item_id)})})]})}),e.jsx("p",{className:"px-4 py-3 text-xs text-[var(--text-soft)]",children:"口径说明:闲鱼不公开销量数据,本榜按商品「想要人数」降序排列,同分按发布时间取新; 数据为实时搜索快照,每 10 分钟可刷新一次。"})]})]})};export{se as default}; +import{r as n,bN as H,bO as O,j as e,bP as S,L as y,e as A,E as B}from"./index-BZnqBmwp.js";import{P as F,a as U,N as q,b as z,E as V}from"./ui-B9Jzqjf7.js";import{T as R}from"./trending-up-BLnHDV6T.js";import{P as W}from"./package-CDIx-vGO.js";const Y=2500,L=r=>r?r>=1e4?`${(r/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(r):"0",G=r=>{if(!r)return"—";const i=Date.now()-r;if(i<6e4)return"刚刚";if(i<36e5)return`${Math.floor(i/6e4)}分钟前`;if(i<864e5)return`${Math.floor(i/36e5)}小时前`;if(i<7*864e5)return`${Math.floor(i/864e5)}天前`;const o=new Date(r);return`${o.getMonth()+1}月${o.getDate()}日`},J=r=>{if(!r)return"—";const i=new Date(r),o=v=>String(v).padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`},K=({rank:r})=>{const i=r===1?"bg-amber-400 text-white":r===2?"bg-gray-300 text-gray-700":r===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsx("span",{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-sm font-bold ${i}`,children:r})},se=()=>{const[r,i]=n.useState(!0),[o,v]=n.useState({}),[$,P]=n.useState([]),[d,M]=n.useState("digital"),[j,f]=n.useState(null),[h,_]=n.useState(0),[u,k]=n.useState(!1),g=n.useRef(null),I=n.useRef(d);I.current=d;const w=n.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),b=n.useCallback(async s=>{try{const a=await H();v(a.boards||{}),P(a.categories||[]),s!=null&&s.silent||i(!1),Object.values(a.boards||{}).some(x=>x.refreshing)?E():w()}catch(a){s!=null&&s.silent||(i(!1),f({type:"error",message:a.message||"榜单加载失败"}))}},[]),E=n.useCallback(()=>{g.current||(g.current=setInterval(()=>{b({silent:!0})},Y))},[b]);n.useEffect(()=>(b(),w),[b,w]),n.useEffect(()=>{if(h<=0)return;const s=setInterval(()=>_(a=>a<=1?0:a-1),1e3);return()=>clearInterval(s)},[h]);const t=o[d];n.useEffect(()=>{const s=o[d];!s||r||s.refreshing||s.items.length>0||s.cooldown_remaining>0||N(d)},[d,r,o]);const N=async s=>{if(!u){k(!0);try{const a=await O(s);a.started?(f({type:"info",message:a.categories&&a.categories.length>1?"已开始刷新全部类目,完成后自动更新。":"已开始抓取,十几秒后榜单自动刷新。"}),E()):a.reason==="cooldown"?f({type:"error",message:a.message||"刷新过于频繁,请稍后再试"}):f({type:"info",message:a.message||"已有刷新任务进行中"})}catch(a){f({type:"error",message:a.message||"刷新触发失败"})}finally{k(!1)}}};n.useEffect(()=>{t&&t.cooldown_remaining>0&&_(t.cooldown_remaining)},[t]);const T=n.useMemo(()=>$.map(s=>{var a;return{id:s.id,label:s.name,count:(a=o[s.id])==null?void 0:a.items.length}}),[$,o]),C=n.useMemo(()=>{if(!t)return[];const s={};return(t.items||[]).forEach(l=>{(l.keywords||[]).forEach(x=>{const p=s[x]||(s[x]={hits:0,want:0});p.hits+=1,p.want+=l.want_count||0})}),(t.keywords&&t.keywords.length?t.keywords:Object.keys(s)).map(l=>{var x,p;return{kw:l,hits:((x=s[l])==null?void 0:x.hits)||0,want:((p=s[l])==null?void 0:p.want)||0}}).sort((l,x)=>x.want-l.want)},[t]),m=!!(t!=null&&t.refreshing),c=t==null?void 0:t.progress,D=t!=null&&t.updated_at?G(t.updated_at*1e3):"尚未生成";return r?e.jsx(F,{label:"正在加载热卖榜"}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(U,{title:"实时热卖榜",description:"按「想要人数」排序的全网热卖商品,数据来自闲鱼实时搜索聚合。",icon:S,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:t?`更新于 ${D}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N("all"),disabled:u||m||h>0,children:[u||m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(A,{className:"h-4 w-4"}),"全部刷新"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N(d),disabled:u||m||h>0,children:[m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(R,{className:"h-4 w-4"}),h>0?`${h}s 后可刷新`:"刷新本类目"]})]})}),j&&e.jsx(q,{type:j.type==="info"?"success":j.type,message:j.message,onClose:()=>f(null)}),e.jsx("div",{className:"toolbar",children:e.jsx(z,{value:d,onChange:M,items:T,ariaLabel:"热卖榜类目"})}),m&&e.jsx("div",{className:"section-panel",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(y,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:["正在抓取「",(c==null?void 0:c.keyword)||"…","」",c&&c.total>0?`(${Math.min(c.done+1,c.total)}/${c.total})`:""]}),c&&c.total>0&&e.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("span",{className:"block h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.round(c.done/c.total*100)}%`}})})]})}),!t||t.items.length===0?e.jsx(V,{icon:S,title:m?"正在生成榜单":"榜单还没生成",description:m?"首次抓取需要十几个关键词、约 20 秒,完成后自动展示。":"点右上角「刷新本类目」开始抓取,按想要人数排出前 30 名。",action:m?void 0:e.jsx("button",{type:"button",className:"ios-btn-primary rounded-md px-4 py-2 text-sm",onClick:()=>void N(d),disabled:u||h>0,children:"生成榜单"})}):e.jsxs("section",{className:"section-panel",children:[e.jsx("div",{className:"section-panel__header",children:e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(R,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h2",{className:"section-title",children:[t.name,"热卖榜 · Top ",t.items.length]}),e.jsxs("p",{className:"section-description",children:["共 ",t.source_count," 个在售商品参与排序,按「想要人数」取前 ",t.items.length," 名"]}),C.length>0&&e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-[var(--text-soft)]",children:"热门搜索词:"}),C.map(({kw:s,hits:a,want:l})=>e.jsxs("a",{href:`https://www.goofish.com/search?q=${encodeURIComponent(s)}`,target:"_blank",rel:"noreferrer noopener",title:a>0?`点击搜索「${s}」· 命中 ${a} 个商品 · 合计 ${l} 人想要`:`点击搜索「${s}」(本轮未命中商品)`,className:"group inline-flex items-center gap-1 rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text)] transition-colors hover:bg-[#ff4400] hover:text-white",children:[e.jsx("span",{children:s}),a>0&&e.jsx("span",{className:"font-medium text-[#ff4400] group-hover:text-white",children:L(l)})]},s))]})]})]})}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[6%]",children:"排名"}),e.jsx("th",{className:"w-[44%]",children:"商品"}),e.jsx("th",{className:"w-[11%]",children:"价格"}),e.jsx("th",{className:"w-[12%]",children:"想要人数"}),e.jsx("th",{className:"w-[12%]",children:"发布时间"}),e.jsx("th",{className:"w-[15%] text-right",children:"操作"})]})}),e.jsx("tbody",{children:t.items.map(s=>{var a;return e.jsxs("tr",{children:[e.jsx("td",{"data-label":"排名",children:e.jsx(K,{rank:s.rank})}),e.jsx("td",{"data-label":"商品",children:e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("div",{className:"h-12 w-12 shrink-0 overflow-hidden rounded-lg bg-[var(--surface-subtle)]",children:s.image?e.jsx("img",{src:s.image,alt:"",loading:"lazy",className:"h-full w-full object-cover",onError:l=>{l.currentTarget.style.display="none"}}):e.jsx("div",{className:"flex h-full items-center justify-center text-gray-400",children:e.jsx(W,{className:"h-5 w-5"})})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer noopener",className:"block text-sm text-[var(--text)] break-words hover:text-[#ff4400] hover:underline",title:s.title,children:s.title||"(无标题)"}),e.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-[var(--text-soft)]",children:[s.area&&e.jsx("span",{children:s.area}),(a=s.keywords)==null?void 0:a.slice(0,3).map(l=>e.jsx("span",{className:"rounded bg-[var(--surface-subtle)] px-1.5 py-0.5",children:l},l))]})]})]})}),e.jsx("td",{"data-label":"价格",children:e.jsx("span",{className:"font-bold text-[#ff4400]",children:s.price||"面议"})}),e.jsxs("td",{"data-label":"想要人数",children:[e.jsx("span",{className:"font-semibold text-[var(--text)]",children:L(s.want_count)}),e.jsx("span",{className:"ml-1 text-xs text-[var(--text-soft)]",children:"人想要"})]}),e.jsx("td",{"data-label":"发布时间",className:"whitespace-nowrap text-sm text-[var(--text-soft)]",children:J(s.publish_time)}),e.jsx("td",{"data-label":"操作",className:"text-right",children:e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer noopener",className:"ios-btn-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm",children:[e.jsx(B,{className:"h-3.5 w-3.5"}),"查看商品"]})})]},s.item_id)})})]})}),e.jsx("p",{className:"px-4 py-3 text-xs text-[var(--text-soft)]",children:"口径说明:闲鱼不公开销量数据,本榜按商品「想要人数」降序排列,同分按发布时间取新; 数据为实时搜索快照,每 10 分钟可刷新一次。"})]})]})};export{se as default}; diff --git a/static/assets/ItemList-HN0VsL5w.js b/static/assets/ItemList-D_zO1nzP.js similarity index 98% rename from static/assets/ItemList-HN0VsL5w.js rename to static/assets/ItemList-D_zO1nzP.js index 4154faf..835e8d0 100644 --- a/static/assets/ItemList-HN0VsL5w.js +++ b/static/assets/ItemList-D_zO1nzP.js @@ -1,4 +1,4 @@ -import{c as _e,r,ae as fs,af as Ee,n as w,j as e,e as ve,X as ee,L as V,ag as js,ah as Ns,ai as _s,v as xe,aj as vs,ak as Be,b as re,al as fe,am as je,an as ws,ao as ks,ap as Qe,aq as Re,o as Te,h as ye,a8 as Le,ar as ze,as as be,w as Ss,at as Cs,au as Ue,av as Ke,aw as Is,ax as $s,ay as Ms,az as Ds}from"./index-BCb9Ylky.js";import{E as se,S as Ne,P as qe,a as Fs,b as Ps,N as Es}from"./ui-DcVZvy8T.js";import{S as de}from"./shield-alert--Sbe2-vu.js";import{S as ce}from"./save-cq1qPfv2.js";import{T as me}from"./trash-2-D-oW6aaO.js";import{P as oe}from"./plus-DVdQwMrj.js";import{P as Bs}from"./power-off-D3lAodJa.js";import{a as Rs,P as Ts}from"./power-D2SYbVC-.js";import{P as We}from"./package-check-CEUjK1hJ.js";import{S as Oe}from"./sparkles-Dw_-KUhM.js";import{S as Ls}from"./settings-2-BanKKh4_.js";import{S as zs}from"./square-pen-C-Z-gDiq.js";/** +import{c as _e,r,ae as fs,af as Ee,n as w,j as e,e as ve,X as ee,L as V,ag as js,ah as Ns,ai as _s,v as xe,aj as vs,ak as Be,b as re,al as fe,am as je,an as ws,ao as ks,ap as Qe,aq as Re,o as Te,h as ye,a8 as Le,ar as ze,as as be,w as Ss,at as Cs,au as Ue,av as Ke,aw as Is,ax as $s,ay as Ms,az as Ds}from"./index-BZnqBmwp.js";import{E as se,S as Ne,P as qe,a as Fs,b as Ps,N as Es}from"./ui-B9Jzqjf7.js";import{S as de}from"./shield-alert-rM_NVGQr.js";import{S as ce}from"./save-Dxf2dvgb.js";import{T as me}from"./trash-2-CmT2n80I.js";import{P as oe}from"./plus-BljRK6L8.js";import{P as Bs}from"./power-off-NLH-bTqs.js";import{a as Rs,P as Ts}from"./power-D9WTjX12.js";import{P as We}from"./package-check-BKkFNxd0.js";import{S as Oe}from"./sparkles-DVlvGI-3.js";import{S as Ls}from"./settings-2-CRN1TI2k.js";import{S as zs}from"./square-pen-Bmle-FRS.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Keywords-fyAYcEeY.js b/static/assets/Keywords-GHbY9xAn.js similarity index 97% rename from static/assets/Keywords-fyAYcEeY.js rename to static/assets/Keywords-GHbY9xAn.js index 3604fca..d71d5db 100644 --- a/static/assets/Keywords-fyAYcEeY.js +++ b/static/assets/Keywords-GHbY9xAn.js @@ -1 +1 @@ -import{r as i,o as J,b2 as fe,ar as Ne,a8 as ve,b3 as we,j as e,M as R,B as P,e as Q,b as E,X as F,v as k,b4 as _e,n as t,al as V,am as ke,b5 as Se,b6 as Ce,b7 as De,b8 as Re,b9 as Pe}from"./index-BCb9Ylky.js";import{a as Ee,b as Fe,E as S,P as Me,S as M}from"./ui-DcVZvy8T.js";import{T}from"./truck-DyCIYGWz.js";import{K as W}from"./key-DAHJOHIR.js";import{P as Te}from"./plus-DVdQwMrj.js";import{P as $,a as $e}from"./power-D2SYbVC-.js";import{T as A}from"./trash-2-D-oW6aaO.js";import{P as Ae}from"./power-off-D3lAodJa.js";import{S as K}from"./save-cq1qPfv2.js";import{S as Ke}from"./sparkles-Dw_-KUhM.js";const Ve=({mode:l})=>{const[x,L]=i.useState([]),[d,B]=i.useState(""),[y,Y]=i.useState("reply"),[j,Z]=i.useState([]),[I,h]=i.useState(!1),[f,z]=i.useState(null),[c,N]=i.useState({keyword:"",reply_content:""}),[C,ee]=i.useState([]),[se,ae]=i.useState([]),[te,u]=i.useState(!1),[v,H]=i.useState(null),[r,o]=i.useState({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),[O,le]=i.useState({}),[ie,g]=i.useState(!1),[Le,q]=i.useState(null),[n,m]=i.useState({cookie_id:"",enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),[re,U]=i.useState(!1);i.useEffect(()=>{if(l==="delivery"){b(),X(),J().then(L);return}J().then(s=>{L(s),s&&s.length>0&&B(a=>a||s[0].id)})},[l]),i.useEffect(()=>{l==="reply"&&d&&(_(),w())},[l,d]);const w=async()=>{try{const s=await fe();le(s)}catch(s){console.error("加载默认回复失败",s)}},b=async()=>{try{const s=await Ne();ee(s.filter(a=>!a.item_id))}catch(s){console.error("加载发货规则失败",s)}},X=async()=>{try{const s=await ve();ae(s)}catch(s){console.error("加载卡券失败",s)}},_=async()=>{if(d){U(!0);try{const s=await we(d);Z(s)}catch(s){console.error("加载关键词失败",s)}finally{U(!1)}}},ne=()=>{if(l==="delivery")H(null),o({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),u(!0);else if(y==="reply")z(null),N({keyword:"",reply_content:""}),h(!0);else{if(!d)return;G(d)}},G=async s=>{try{const a=await Se(s);q(a),m({cookie_id:s,enabled:a.enabled,reply_content:a.reply_content,reply_once:a.reply_once,reply_image_url:a.reply_image_url||""}),g(!0)}catch(a){console.error("加载默认回复失败",a),q(null),m({cookie_id:s,enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),g(!0)}},de=s=>{y==="reply"&&(z(s),N({keyword:s.keyword,reply_content:s.reply_content}),h(!0))},ce=s=>{H(s),o({keyword:s.item_keyword,cookie_id:s.cookie_id||"",card_id:String(s.card_group_id),description:s.name,enabled:s.enabled}),u(!0)},oe=async()=>{if(!d){t("请先选择账号");return}if(!c.keyword.trim()||!c.reply_content.trim()){t("请填写关键词和回复内容");return}try{await Re({id:f==null?void 0:f.id,keyword:c.keyword,reply_content:c.reply_content,match_type:"exact",enabled:!0},d),h(!1),_(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},me=async()=>{if(!r.keyword.trim()){t("请填写触发关键词");return}if(!r.card_id){t("请选择卡券");return}try{await V({id:v==null?void 0:v.id,item_keyword:r.keyword,cookie_id:r.cookie_id||void 0,item_id:void 0,card_group_id:parseInt(r.card_id),name:r.description,priority:1,enabled:r.enabled}),u(!1),b(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},pe=async s=>{if(!(!d||!await k("确认删除该关键词吗?")))try{await _e(s,d),_(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},xe=async s=>{if(await k("确认删除该发货规则吗?"))try{await ke(s),b(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ye=async s=>{try{await V({id:s.id,item_keyword:s.item_keyword,cookie_id:s.cookie_id,item_id:s.item_id,card_group_id:s.card_group_id,name:s.name,priority:s.priority,enabled:!s.enabled}),b()}catch(a){t("操作失败:"+a.message)}},he=async()=>{if(!n.cookie_id){t("请先选择账号");return}try{await Pe(n.cookie_id,{enabled:n.enabled,reply_content:n.reply_content,reply_once:n.reply_once,reply_image_url:n.reply_image_url}),g(!1),w(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},ue=async s=>{if(await k("确认删除该默认回复吗?"))try{await De(s),w(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ge=async s=>{if(await k("确认清空该账号的回复记录吗?清空后可以重新对所有对话使用默认回复。"))try{await Ce(s),t("清空成功!")}catch(a){t("清空失败:"+a.message)}},be=Object.values(O).filter(s=>s.enabled).length,je=()=>{l==="delivery"?Promise.all([b(),X()]):y==="reply"?_():w()},D=(s,a,p)=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":p,onClick:a,className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${s?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${s?"translate-x-5":""}`})});return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(Ee,{title:l==="reply"?"自动回复":"通用自动发货",description:l==="reply"?"管理账号关键词回复和未命中规则时的默认回复。":"管理按账号或全部账号生效的关键词兜底发货规则。",icon:l==="reply"?R:T}),l==="reply"&&e.jsx(Fe,{value:y,onChange:Y,ariaLabel:"自动回复功能",items:[{id:"reply",label:"关键词回复",icon:W,count:j.length},{id:"default",label:"账号默认回复",icon:P,count:be}]}),e.jsxs("div",{className:"toolbar",children:[e.jsx("div",{className:"toolbar__group",children:l==="reply"?e.jsxs(e.Fragment,{children:[e.jsx("label",{htmlFor:"reply-account",className:"text-xs font-bold text-gray-600",children:"应用账号"}),e.jsxs("select",{id:"reply-account",className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-64",value:d,onChange:s=>B(s.target.value),children:[e.jsx("option",{value:"",children:"请选择账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}):e.jsx("p",{className:"text-sm text-gray-600",children:"商品专属规则在“商品与发货”配置,此处仅处理关键词兜底。"})}),e.jsxs("div",{className:"toolbar__group",children:[e.jsxs("button",{type:"button",onClick:je,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx(Q,{className:"h-4 w-4"}),"刷新"]}),e.jsxs("button",{type:"button",onClick:ne,disabled:l==="reply"&&!d,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx(Te,{className:"h-4 w-4"}),l==="delivery"?"添加通用规则":y==="reply"?"添加关键词":"编辑默认回复"]})]})]}),l==="reply"&&!d?e.jsx(S,{title:"请选择闲鱼账号",description:"选择账号后可查看和编辑该账号的自动回复配置。",icon:R}):l==="reply"&&y==="reply"?re?e.jsx(Me,{label:"正在加载关键词回复"}):e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"关键词回复规则",description:`当前账号共 ${j.length} 条规则`,icon:W}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[j.map(s=>e.jsxs("article",{className:"grid gap-3 px-4 py-4 sm:grid-cols-[minmax(160px,0.7fr)_minmax(0,1.5fr)_auto] sm:items-center",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"break-words text-sm font-bold text-gray-900",children:s.keyword}),e.jsx("span",{className:"status-badge status-badge-success",children:"精确匹配"})]})}),e.jsx("p",{className:"min-w-0 whitespace-pre-wrap break-words text-sm leading-6 text-gray-600",children:s.reply_content||"未填写回复内容"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>de(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑关键词",children:e.jsx($,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void pe(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除关键词",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id)),j.length===0&&e.jsx(S,{compact:!0,title:"暂无关键词回复",description:"添加规则后,命中关键词的买家消息将使用指定内容回复。",icon:R})]})]}):l==="delivery"?e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"关键词兜底发货",description:`共 ${C.length} 条通用规则`,icon:T}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[C.map(s=>{var a;return e.jsxs("article",{className:"grid gap-3 px-4 py-4 lg:grid-cols-[minmax(180px,0.7fr)_minmax(0,1.4fr)_auto] lg:items-center",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"break-words text-sm font-bold text-gray-900",children:s.item_keyword}),e.jsx("span",{className:`status-badge ${s.enabled?"status-badge-success":"bg-gray-100 text-gray-600"}`,children:s.enabled?"已启用":"已停用"})]}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:s.cookie_id?"指定账号":"全部账号"})]}),e.jsxs("div",{className:"min-w-0 text-sm text-gray-600",children:[e.jsxs("p",{className:"truncate",children:["发货内容:",s.card_group_name||`卡密 ${s.card_group_id}`]}),s.cookie_id&&e.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",children:["账号:",((a=x.find(p=>p.id===s.cookie_id))==null?void 0:a.nickname)||s.cookie_id]}),s.name&&e.jsx("p",{className:"mt-1 break-words text-xs text-gray-500",children:s.name})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void ye(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:s.enabled?"停用规则":"启用规则",children:s.enabled?e.jsx(Ae,{className:"h-4 w-4"}):e.jsx($e,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>ce(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑规则",children:e.jsx($,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void xe(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除规则",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id)}),C.length===0&&e.jsx(S,{compact:!0,title:"暂无通用发货规则",description:"商品专属发货请在“商品与发货”中配置。",icon:T})]})]}):e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"账号默认回复",description:"关键词规则未命中时使用对应账号的默认内容。",icon:P}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[x.map(s=>{const a=O[s.id],p=!!(a!=null&&a.enabled);return e.jsxs("article",{className:"grid gap-3 px-4 py-4 sm:grid-cols-[minmax(180px,0.7fr)_minmax(0,1.4fr)_auto] sm:items-center",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"truncate text-sm font-bold text-gray-900",children:s.nickname||s.remark||s.id}),e.jsx("span",{className:`status-badge ${p?"status-badge-success":"bg-gray-100 text-gray-600"}`,children:p?"已启用":"未启用"}),(a==null?void 0:a.reply_once)&&e.jsx("span",{className:"status-badge status-badge-info",children:"单会话一次"})]}),e.jsx("p",{className:"mt-1 break-all text-xs text-gray-500",children:s.id})]}),e.jsx("p",{className:"min-w-0 whitespace-pre-wrap break-words text-sm leading-6 text-gray-600",children:(a==null?void 0:a.reply_content)||"未设置默认回复内容"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void G(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑默认回复",children:e.jsx($,{className:"h-4 w-4"})}),p&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>void ge(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-blue-50 text-blue-700 hover:bg-blue-100",title:"清空回复记录",children:e.jsx(Q,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void ue(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除默认回复",children:e.jsx(A,{className:"h-4 w-4"})})]})]})]},s.id)}),x.length===0&&e.jsx(S,{compact:!0,title:"暂无闲鱼账号",description:"添加账号后可配置账号默认回复。",icon:P})]})]}),l==="reply"&&I&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:f?"编辑关键词回复":"添加关键词回复"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"当前规则使用精确匹配。"})]}),e.jsx("button",{type:"button",onClick:()=>h(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"触发关键词"}),e.jsx("input",{value:c.keyword,onChange:s=>N({...c,keyword:s.target.value}),placeholder:"例如:价格、包邮",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复内容"}),e.jsx("textarea",{value:c.reply_content,onChange:s=>N({...c,reply_content:s.target.value}),placeholder:"输入自动回复内容",rows:7,className:"ios-input w-full resize-y rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>h(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void oe(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body),l==="delivery"&&te&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:v?"编辑通用发货规则":"添加通用发货规则"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"未指定账号时对全部闲鱼账号生效。"})]}),e.jsx("button",{type:"button",onClick:()=>u(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body grid gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block sm:col-span-2",children:[e.jsx("span",{className:"field-label",children:"适用账号"}),e.jsxs("select",{value:r.cookie_id,onChange:s=>o({...r,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"全部账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}),e.jsxs("label",{className:"block sm:col-span-2",children:[e.jsx("span",{className:"field-label",children:"商品关键词"}),e.jsx("input",{value:r.keyword,onChange:s=>o({...r,keyword:s.target.value}),placeholder:"例如:会员、周卡",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"发货卡密或内容"}),e.jsxs("select",{value:r.card_id,onChange:s=>o({...r,card_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"请选择"}),se.map(s=>{var a;return e.jsx("option",{value:s.id,children:s.name||((a=s.text_content)==null?void 0:a.substring(0,30))||`卡券 ${s.id}`},s.id)})]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"规则备注"}),e.jsx("input",{value:r.description,onChange:s=>o({...r,description:s.target.value}),placeholder:"便于识别此规则",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4 sm:col-span-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"启用规则"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"停用后保留配置但不参与匹配。"})]}),D(r.enabled,()=>o({...r,enabled:!r.enabled}),"启用通用发货规则")]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>u(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void me(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body),l==="reply"&&ie&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"账号默认回复"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"关键词规则未命中时使用此内容。"})]}),e.jsx("button",{type:"button",onClick:()=>g(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"应用账号"}),e.jsxs("select",{value:n.cookie_id,onChange:s=>m({...n,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"请选择账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"启用默认回复"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"参与当前账号自动回复。"})]}),D(n.enabled,()=>m({...n,enabled:!n.enabled}),"启用默认回复")]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"单会话一次"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"每个对话仅触发一次。"})]}),D(n.reply_once,()=>m({...n,reply_once:!n.reply_once}),"每个会话只回复一次")]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复内容"}),e.jsx("textarea",{value:n.reply_content,onChange:s=>m({...n,reply_content:s.target.value}),placeholder:"输入默认回复内容",rows:7,className:"ios-input w-full resize-y rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复图片 URL(可选)"}),e.jsxs("div",{className:"relative",children:[e.jsx(Ke,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),e.jsx("input",{value:n.reply_image_url,onChange:s=>m({...n,reply_image_url:s.target.value}),placeholder:"https://example.com/image.jpg",className:"ios-input w-full rounded-md py-2.5 pl-9 pr-3"})]})]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>g(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void he(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body)]})};export{Ve as default}; +import{r as i,o as J,b2 as fe,ar as Ne,a8 as ve,b3 as we,j as e,M as R,B as P,e as Q,b as E,X as F,v as k,b4 as _e,n as t,al as V,am as ke,b5 as Se,b6 as Ce,b7 as De,b8 as Re,b9 as Pe}from"./index-BZnqBmwp.js";import{a as Ee,b as Fe,E as S,P as Me,S as M}from"./ui-B9Jzqjf7.js";import{T}from"./truck-3I9pdhz5.js";import{K as W}from"./key-C0msAg8e.js";import{P as Te}from"./plus-BljRK6L8.js";import{P as $,a as $e}from"./power-D9WTjX12.js";import{T as A}from"./trash-2-CmT2n80I.js";import{P as Ae}from"./power-off-NLH-bTqs.js";import{S as K}from"./save-Dxf2dvgb.js";import{S as Ke}from"./sparkles-DVlvGI-3.js";const Ve=({mode:l})=>{const[x,L]=i.useState([]),[d,B]=i.useState(""),[y,Y]=i.useState("reply"),[j,Z]=i.useState([]),[I,h]=i.useState(!1),[f,z]=i.useState(null),[c,N]=i.useState({keyword:"",reply_content:""}),[C,ee]=i.useState([]),[se,ae]=i.useState([]),[te,u]=i.useState(!1),[v,H]=i.useState(null),[r,o]=i.useState({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),[O,le]=i.useState({}),[ie,g]=i.useState(!1),[Le,q]=i.useState(null),[n,m]=i.useState({cookie_id:"",enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),[re,U]=i.useState(!1);i.useEffect(()=>{if(l==="delivery"){b(),X(),J().then(L);return}J().then(s=>{L(s),s&&s.length>0&&B(a=>a||s[0].id)})},[l]),i.useEffect(()=>{l==="reply"&&d&&(_(),w())},[l,d]);const w=async()=>{try{const s=await fe();le(s)}catch(s){console.error("加载默认回复失败",s)}},b=async()=>{try{const s=await Ne();ee(s.filter(a=>!a.item_id))}catch(s){console.error("加载发货规则失败",s)}},X=async()=>{try{const s=await ve();ae(s)}catch(s){console.error("加载卡券失败",s)}},_=async()=>{if(d){U(!0);try{const s=await we(d);Z(s)}catch(s){console.error("加载关键词失败",s)}finally{U(!1)}}},ne=()=>{if(l==="delivery")H(null),o({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),u(!0);else if(y==="reply")z(null),N({keyword:"",reply_content:""}),h(!0);else{if(!d)return;G(d)}},G=async s=>{try{const a=await Se(s);q(a),m({cookie_id:s,enabled:a.enabled,reply_content:a.reply_content,reply_once:a.reply_once,reply_image_url:a.reply_image_url||""}),g(!0)}catch(a){console.error("加载默认回复失败",a),q(null),m({cookie_id:s,enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),g(!0)}},de=s=>{y==="reply"&&(z(s),N({keyword:s.keyword,reply_content:s.reply_content}),h(!0))},ce=s=>{H(s),o({keyword:s.item_keyword,cookie_id:s.cookie_id||"",card_id:String(s.card_group_id),description:s.name,enabled:s.enabled}),u(!0)},oe=async()=>{if(!d){t("请先选择账号");return}if(!c.keyword.trim()||!c.reply_content.trim()){t("请填写关键词和回复内容");return}try{await Re({id:f==null?void 0:f.id,keyword:c.keyword,reply_content:c.reply_content,match_type:"exact",enabled:!0},d),h(!1),_(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},me=async()=>{if(!r.keyword.trim()){t("请填写触发关键词");return}if(!r.card_id){t("请选择卡券");return}try{await V({id:v==null?void 0:v.id,item_keyword:r.keyword,cookie_id:r.cookie_id||void 0,item_id:void 0,card_group_id:parseInt(r.card_id),name:r.description,priority:1,enabled:r.enabled}),u(!1),b(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},pe=async s=>{if(!(!d||!await k("确认删除该关键词吗?")))try{await _e(s,d),_(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},xe=async s=>{if(await k("确认删除该发货规则吗?"))try{await ke(s),b(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ye=async s=>{try{await V({id:s.id,item_keyword:s.item_keyword,cookie_id:s.cookie_id,item_id:s.item_id,card_group_id:s.card_group_id,name:s.name,priority:s.priority,enabled:!s.enabled}),b()}catch(a){t("操作失败:"+a.message)}},he=async()=>{if(!n.cookie_id){t("请先选择账号");return}try{await Pe(n.cookie_id,{enabled:n.enabled,reply_content:n.reply_content,reply_once:n.reply_once,reply_image_url:n.reply_image_url}),g(!1),w(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},ue=async s=>{if(await k("确认删除该默认回复吗?"))try{await De(s),w(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ge=async s=>{if(await k("确认清空该账号的回复记录吗?清空后可以重新对所有对话使用默认回复。"))try{await Ce(s),t("清空成功!")}catch(a){t("清空失败:"+a.message)}},be=Object.values(O).filter(s=>s.enabled).length,je=()=>{l==="delivery"?Promise.all([b(),X()]):y==="reply"?_():w()},D=(s,a,p)=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":p,onClick:a,className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${s?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${s?"translate-x-5":""}`})});return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(Ee,{title:l==="reply"?"自动回复":"通用自动发货",description:l==="reply"?"管理账号关键词回复和未命中规则时的默认回复。":"管理按账号或全部账号生效的关键词兜底发货规则。",icon:l==="reply"?R:T}),l==="reply"&&e.jsx(Fe,{value:y,onChange:Y,ariaLabel:"自动回复功能",items:[{id:"reply",label:"关键词回复",icon:W,count:j.length},{id:"default",label:"账号默认回复",icon:P,count:be}]}),e.jsxs("div",{className:"toolbar",children:[e.jsx("div",{className:"toolbar__group",children:l==="reply"?e.jsxs(e.Fragment,{children:[e.jsx("label",{htmlFor:"reply-account",className:"text-xs font-bold text-gray-600",children:"应用账号"}),e.jsxs("select",{id:"reply-account",className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-64",value:d,onChange:s=>B(s.target.value),children:[e.jsx("option",{value:"",children:"请选择账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}):e.jsx("p",{className:"text-sm text-gray-600",children:"商品专属规则在“商品与发货”配置,此处仅处理关键词兜底。"})}),e.jsxs("div",{className:"toolbar__group",children:[e.jsxs("button",{type:"button",onClick:je,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx(Q,{className:"h-4 w-4"}),"刷新"]}),e.jsxs("button",{type:"button",onClick:ne,disabled:l==="reply"&&!d,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx(Te,{className:"h-4 w-4"}),l==="delivery"?"添加通用规则":y==="reply"?"添加关键词":"编辑默认回复"]})]})]}),l==="reply"&&!d?e.jsx(S,{title:"请选择闲鱼账号",description:"选择账号后可查看和编辑该账号的自动回复配置。",icon:R}):l==="reply"&&y==="reply"?re?e.jsx(Me,{label:"正在加载关键词回复"}):e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"关键词回复规则",description:`当前账号共 ${j.length} 条规则`,icon:W}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[j.map(s=>e.jsxs("article",{className:"grid gap-3 px-4 py-4 sm:grid-cols-[minmax(160px,0.7fr)_minmax(0,1.5fr)_auto] sm:items-center",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"break-words text-sm font-bold text-gray-900",children:s.keyword}),e.jsx("span",{className:"status-badge status-badge-success",children:"精确匹配"})]})}),e.jsx("p",{className:"min-w-0 whitespace-pre-wrap break-words text-sm leading-6 text-gray-600",children:s.reply_content||"未填写回复内容"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>de(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑关键词",children:e.jsx($,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void pe(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除关键词",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id)),j.length===0&&e.jsx(S,{compact:!0,title:"暂无关键词回复",description:"添加规则后,命中关键词的买家消息将使用指定内容回复。",icon:R})]})]}):l==="delivery"?e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"关键词兜底发货",description:`共 ${C.length} 条通用规则`,icon:T}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[C.map(s=>{var a;return e.jsxs("article",{className:"grid gap-3 px-4 py-4 lg:grid-cols-[minmax(180px,0.7fr)_minmax(0,1.4fr)_auto] lg:items-center",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"break-words text-sm font-bold text-gray-900",children:s.item_keyword}),e.jsx("span",{className:`status-badge ${s.enabled?"status-badge-success":"bg-gray-100 text-gray-600"}`,children:s.enabled?"已启用":"已停用"})]}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:s.cookie_id?"指定账号":"全部账号"})]}),e.jsxs("div",{className:"min-w-0 text-sm text-gray-600",children:[e.jsxs("p",{className:"truncate",children:["发货内容:",s.card_group_name||`卡密 ${s.card_group_id}`]}),s.cookie_id&&e.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",children:["账号:",((a=x.find(p=>p.id===s.cookie_id))==null?void 0:a.nickname)||s.cookie_id]}),s.name&&e.jsx("p",{className:"mt-1 break-words text-xs text-gray-500",children:s.name})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void ye(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:s.enabled?"停用规则":"启用规则",children:s.enabled?e.jsx(Ae,{className:"h-4 w-4"}):e.jsx($e,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>ce(s),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑规则",children:e.jsx($,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void xe(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除规则",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id)}),C.length===0&&e.jsx(S,{compact:!0,title:"暂无通用发货规则",description:"商品专属发货请在“商品与发货”中配置。",icon:T})]})]}):e.jsxs("section",{className:"section-panel",children:[e.jsx(M,{title:"账号默认回复",description:"关键词规则未命中时使用对应账号的默认内容。",icon:P}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[x.map(s=>{const a=O[s.id],p=!!(a!=null&&a.enabled);return e.jsxs("article",{className:"grid gap-3 px-4 py-4 sm:grid-cols-[minmax(180px,0.7fr)_minmax(0,1.4fr)_auto] sm:items-center",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"truncate text-sm font-bold text-gray-900",children:s.nickname||s.remark||s.id}),e.jsx("span",{className:`status-badge ${p?"status-badge-success":"bg-gray-100 text-gray-600"}`,children:p?"已启用":"未启用"}),(a==null?void 0:a.reply_once)&&e.jsx("span",{className:"status-badge status-badge-info",children:"单会话一次"})]}),e.jsx("p",{className:"mt-1 break-all text-xs text-gray-500",children:s.id})]}),e.jsx("p",{className:"min-w-0 whitespace-pre-wrap break-words text-sm leading-6 text-gray-600",children:(a==null?void 0:a.reply_content)||"未设置默认回复内容"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void G(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",title:"编辑默认回复",children:e.jsx($,{className:"h-4 w-4"})}),p&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>void ge(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-blue-50 text-blue-700 hover:bg-blue-100",title:"清空回复记录",children:e.jsx(Q,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void ue(s.id),className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",title:"删除默认回复",children:e.jsx(A,{className:"h-4 w-4"})})]})]})]},s.id)}),x.length===0&&e.jsx(S,{compact:!0,title:"暂无闲鱼账号",description:"添加账号后可配置账号默认回复。",icon:P})]})]}),l==="reply"&&I&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:f?"编辑关键词回复":"添加关键词回复"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"当前规则使用精确匹配。"})]}),e.jsx("button",{type:"button",onClick:()=>h(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"触发关键词"}),e.jsx("input",{value:c.keyword,onChange:s=>N({...c,keyword:s.target.value}),placeholder:"例如:价格、包邮",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复内容"}),e.jsx("textarea",{value:c.reply_content,onChange:s=>N({...c,reply_content:s.target.value}),placeholder:"输入自动回复内容",rows:7,className:"ios-input w-full resize-y rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>h(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void oe(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body),l==="delivery"&&te&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:v?"编辑通用发货规则":"添加通用发货规则"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"未指定账号时对全部闲鱼账号生效。"})]}),e.jsx("button",{type:"button",onClick:()=>u(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body grid gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block sm:col-span-2",children:[e.jsx("span",{className:"field-label",children:"适用账号"}),e.jsxs("select",{value:r.cookie_id,onChange:s=>o({...r,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"全部账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}),e.jsxs("label",{className:"block sm:col-span-2",children:[e.jsx("span",{className:"field-label",children:"商品关键词"}),e.jsx("input",{value:r.keyword,onChange:s=>o({...r,keyword:s.target.value}),placeholder:"例如:会员、周卡",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"发货卡密或内容"}),e.jsxs("select",{value:r.card_id,onChange:s=>o({...r,card_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"请选择"}),se.map(s=>{var a;return e.jsx("option",{value:s.id,children:s.name||((a=s.text_content)==null?void 0:a.substring(0,30))||`卡券 ${s.id}`},s.id)})]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"规则备注"}),e.jsx("input",{value:r.description,onChange:s=>o({...r,description:s.target.value}),placeholder:"便于识别此规则",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4 sm:col-span-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"启用规则"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"停用后保留配置但不参与匹配。"})]}),D(r.enabled,()=>o({...r,enabled:!r.enabled}),"启用通用发货规则")]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>u(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void me(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body),l==="reply"&&ie&&E.createPortal(e.jsx("div",{className:"modal-overlay",children:e.jsxs("div",{className:"modal-container",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"账号默认回复"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"关键词规则未命中时使用此内容。"})]}),e.jsx("button",{type:"button",onClick:()=>g(!1),className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(F,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"modal-body space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"应用账号"}),e.jsxs("select",{value:n.cookie_id,onChange:s=>m({...n,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"请选择账号"}),x.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||s.id},s.id))]})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"启用默认回复"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"参与当前账号自动回复。"})]}),D(n.enabled,()=>m({...n,enabled:!n.enabled}),"启用默认回复")]}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-200 bg-gray-50 p-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-800",children:"单会话一次"}),e.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"每个对话仅触发一次。"})]}),D(n.reply_once,()=>m({...n,reply_once:!n.reply_once}),"每个会话只回复一次")]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复内容"}),e.jsx("textarea",{value:n.reply_content,onChange:s=>m({...n,reply_content:s.target.value}),placeholder:"输入默认回复内容",rows:7,className:"ios-input w-full resize-y rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"field-label",children:"回复图片 URL(可选)"}),e.jsxs("div",{className:"relative",children:[e.jsx(Ke,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),e.jsx("input",{value:n.reply_image_url,onChange:s=>m({...n,reply_image_url:s.target.value}),placeholder:"https://example.com/image.jpg",className:"ios-input w-full rounded-md py-2.5 pl-9 pr-3"})]})]})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>g(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsxs("button",{type:"button",onClick:()=>void he(),className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5",children:[e.jsx(K,{className:"h-4 w-4"}),"保存"]})]})]})}),document.body)]})};export{Ve as default}; diff --git a/static/assets/MessageManagement-C3dJ1ot-.js b/static/assets/MessageManagement-B1rvp6fJ.js similarity index 98% rename from static/assets/MessageManagement-C3dJ1ot-.js rename to static/assets/MessageManagement-B1rvp6fJ.js index 3a6af08..77a90ad 100644 --- a/static/assets/MessageManagement-C3dJ1ot-.js +++ b/static/assets/MessageManagement-B1rvp6fJ.js @@ -1,4 +1,4 @@ -import{c as We,r as n,aW as mt,o as xt,n as u,h as ut,ba as ht,bb as ft,j as t,e as $e,L as U,bc as pt,X as gt,bd as bt,be as jt,bf as yt,aT as vt,bg as wt,bh as Nt,bi as kt,bj as St,v as Te,bk as Ct,bl as Mt}from"./index-BCb9Ylky.js";import{I as Re,c as _t,S as Ee,E as It}from"./ui-DcVZvy8T.js";import{S as Z}from"./settings-2-BanKKh4_.js";import{S as $t}from"./search-DAVBnJPC.js";import{P as Tt}from"./package-CbDV2ANe.js";import{I as Rt}from"./image-CpvPr1oL.js";import{Z as Et}from"./zap-B162HdXv.js";import{S as Lt}from"./send-CYAobdMm.js";import{P as Le}from"./plus-DVdQwMrj.js";import{T as Ue}from"./trash-2-D-oW6aaO.js";/** +import{c as We,r as n,aW as mt,o as xt,n as u,h as ut,ba as ht,bb as ft,j as t,e as $e,L as U,bc as pt,X as gt,bd as bt,be as jt,bf as yt,aT as vt,bg as wt,bh as Nt,bi as kt,bj as St,v as Te,bk as Ct,bl as Mt}from"./index-BZnqBmwp.js";import{I as Re,c as _t,S as Ee,E as It}from"./ui-B9Jzqjf7.js";import{S as Z}from"./settings-2-CRN1TI2k.js";import{S as $t}from"./search-FaxHcuoK.js";import{P as Tt}from"./package-CDIx-vGO.js";import{I as Rt}from"./image-BE6TxU00.js";import{Z as Et}from"./zap-BWofDPZm.js";import{S as Lt}from"./send-BjFPcqyQ.js";import{P as Le}from"./plus-BljRK6L8.js";import{T as Ue}from"./trash-2-CmT2n80I.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/NotificationsAndLogs-CXySSaLa.js b/static/assets/NotificationsAndLogs-BsCaJ8H7.js similarity index 97% rename from static/assets/NotificationsAndLogs-CXySSaLa.js rename to static/assets/NotificationsAndLogs-BsCaJ8H7.js index 212a41e..0db4de7 100644 --- a/static/assets/NotificationsAndLogs-CXySSaLa.js +++ b/static/assets/NotificationsAndLogs-BsCaJ8H7.js @@ -1 +1 @@ -import{r as l,j as t,bc as E,e as ee,L as te,aE as ot,C as ct,X as Se,o as dt,bm as mt,bn as xt,bo as pt,n as o,bp as ut,bq as ht,br as _e,v as se,bs as yt,bt as Re,bu as bt,bv as gt,bw as ft,bx as jt,by as Nt}from"./index-BCb9Ylky.js";import{a as vt,b as wt,S as $,E as L}from"./ui-DcVZvy8T.js";import{L as ae}from"./link-2-DIsiJoFB.js";import{S as le}from"./shield-alert--Sbe2-vu.js";import{A as ne}from"./activity-BGRjBy8G.js";import{P as Ee}from"./plus-DVdQwMrj.js";import{P as $e}from"./pen-line-CudbazBc.js";import{T as ie}from"./trash-2-D-oW6aaO.js";import{S as kt}from"./send-CYAobdMm.js";import{C as Ct,a as St}from"./chevron-right-D40Kl_P-.js";import{S as Le}from"./save-cq1qPfv2.js";import{C as _t}from"./check-BIO52wQW.js";const y={dingtalk:{label:"钉钉",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://oapi.dingtalk.com/robot/send?..."},{key:"secret",label:"加签密钥",type:"password",optional:!0}],defaults:{}},feishu:{label:"飞书",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/..."},{key:"secret",label:"签名密钥",type:"password",optional:!0}],defaults:{}},bark:{label:"Bark",fields:[{key:"device_key",label:"Device Key",type:"password"},{key:"server_url",label:"服务器地址",placeholder:"https://api.day.app",optional:!0}],defaults:{server_url:"https://api.day.app"}},email:{label:"邮件",fields:[{key:"smtp_server",label:"SMTP 服务器",placeholder:"留空则使用「系统设置 → 邮件服务」",optional:!0},{key:"smtp_port",label:"SMTP 端口",type:"number",placeholder:"留空则使用系统设置(如 465)",optional:!0},{key:"email_user",label:"发件邮箱",placeholder:"留空则使用系统设置的发件邮箱",optional:!0},{key:"email_password",label:"邮箱密码或授权码",type:"password",placeholder:"留空则使用系统设置的授权码",optional:!0},{key:"recipient_email",label:"接收邮箱",placeholder:"必填,通知发到这个邮箱"}],defaults:{}},webhook:{label:"Webhook",fields:[{key:"webhook_url",label:"Webhook 地址"},{key:"http_method",label:"请求方法",type:"select",options:["POST","PUT"]},{key:"headers",label:"请求头 JSON",type:"textarea",placeholder:'{"Authorization":"Bearer ..."}',optional:!0}],defaults:{http_method:"POST",headers:"{}"}},wechat:{label:"企业微信",fields:[{key:"webhook_url",label:"机器人 Webhook 地址"}],defaults:{}},telegram:{label:"Telegram",fields:[{key:"bot_token",label:"Bot Token",type:"password"},{key:"chat_id",label:"Chat ID"}],defaults:{}}},re=20,Rt=i=>{var k,x;const r=(x=(k=i==null?void 0:i.response)==null?void 0:k.data)==null?void 0:x.detail;if(r&&typeof r=="object"&&"message"in r){const b=r.message;if(typeof b=="string"&&b.trim())return b.trim()}return typeof r=="string"&&r.trim()?r.trim():i instanceof Error&&i.message?i.message:"测试发送失败,请稍后重试"},oe=i=>i.nickname||i.remark||i.id,T=i=>{if(!i)return"-";const r=new Date(i.includes("T")?i:`${i.replace(" ","T")}Z`);return Number.isNaN(r.getTime())?i:r.toLocaleString("zh-CN")},Wt=({isAdmin:i})=>{const[r,k]=l.useState("channels"),[x,b]=l.useState([]),[A,ce]=l.useState([]),[de,D]=l.useState([]),[Te,g]=l.useState({}),[f,Ae]=l.useState([]),[me,De]=l.useState([]),[C,xe]=l.useState(!0),[Pe,j]=l.useState(!1),[N,pe]=l.useState(null),[P,B]=l.useState("dingtalk"),[O,I]=l.useState(""),[d,p]=l.useState({}),[ue,he]=l.useState(!1),[Be,u]=l.useState(!1),[v,ye]=l.useState(null),[M,q]=l.useState(""),[W,G]=l.useState(""),[z,F]=l.useState(""),[H,h]=l.useState([]),[be,S]=l.useState(!1),[ge,Oe]=l.useState([]),[fe,Ie]=l.useState(0),[U,Me]=l.useState(""),[Z,qe]=l.useState(""),[w,_]=l.useState(0),[J,je]=l.useState(!1),[Ne,We]=l.useState([]),[ve,Ge]=l.useState(""),[R,we]=l.useState(""),[K,ke]=l.useState(!1),m=async()=>{xe(!0);try{const[e,s,a,n]=await Promise.all([dt(),mt(),xt(),pt()]);b(e),ce(s.data),D(a.data),g(c=>{const rt=new Set(a.data.map(Y=>String(Y.id)));return Object.fromEntries(Object.entries(c).filter(([Y])=>rt.has(Y)))}),Ae(n.events),De(n.priorities)}catch(e){o(`加载通知配置失败:${e.message}`)}finally{xe(!1)}};l.useEffect(()=>{m()},[]);const ze=()=>{const e="dingtalk";pe(null),B(e),I(""),p({...y[e].defaults}),j(!0)},Fe=e=>{pe(e),B(e.type),I(e.name),p({...y[e.type].defaults,...e.config}),j(!0)},He=e=>{B(e),p({...y[e].defaults})},Ue=async()=>{he(!0);try{N?await _e(N.id,{name:O,config:d,enabled:N.enabled}):await jt({name:O,type:P,config:d}),j(!1),await m()}catch(e){o(`保存通知渠道失败:${e.message}`)}finally{he(!1)}},Ze=async e=>{try{await _e(e.id,{enabled:!e.enabled}),ce(s=>s.map(a=>a.id===e.id?{...a,enabled:!a.enabled}:a)),e.enabled?D(s=>s.filter(a=>a.channel_id!==Number(e.id))):await m()}catch(s){o(`更新渠道状态失败:${s.message}`)}},Je=async e=>{if(await se(`确认删除通知渠道“${e.name}”?相关账号绑定也会被删除。`))try{await yt(e.id),await m()}catch(s){o(`删除通知渠道失败:${s.message}`)}},Ke=e=>{var s;return((s=f.find(a=>a.id===e))==null?void 0:s.label)||e},Xe=e=>!e.event_types||e.event_types.length===0?"全部事件":e.event_types.map(Ke).join("、"),Qe=me.length>0?me:Array.from(new Set(f.map(e=>e.priority))).map(e=>({id:e,label:e==="critical"?"关键":e==="warning"?"重要":"一般"})),Ve=()=>{var e;ye(null),q(((e=x[0])==null?void 0:e.id)||""),G(""),F(""),h([]),u(!0)},Ye=e=>{ye(e),q(e.cookie_id),G(String(e.channel_id)),F(e.name||""),h(e.event_types||[]),u(!0)},et=e=>{h(s=>s.includes(e)?s.filter(a=>a!==e):[...s,e])},X=e=>{if(e==="all"){h(f.map(s=>s.id));return}if(e==="none"){h([]);return}h(f.filter(s=>s.priority===e).map(s=>s.id))},tt=async()=>{if(v){S(!0);try{await Re(v.id,{name:z.trim(),eventTypes:H}),u(!1),await m()}catch(e){o(`保存通知规则失败:${e.message}`)}finally{S(!1)}return}if(!M||!W){o("请选择账号和通知渠道");return}S(!0);try{await Nt(M,Number(W),!0,{name:z.trim(),eventTypes:H}),u(!1),await m()}catch(e){o(`创建通知规则失败:${e.message}`)}finally{S(!1)}},st=async e=>{try{await Re(e.id,{enabled:!e.enabled}),await m()}catch(s){o(`更新通知规则失败:${s.message}`)}},at=async e=>{const s=String(e.id);g(a=>({...a,[s]:{status:"sending",message:"发送中"}}));try{const a=await bt(e.id),n=`${a.message} · ${a.channel.name}`;g(c=>({...c,[s]:{status:"success",message:n,requestId:a.request_id,sentAt:a.sent_at}})),o(`${n}(请求 ID:${a.request_id})`,"success")}catch(a){const n=Rt(a);g(c=>({...c,[s]:{status:"error",message:n}})),o(`测试发送失败:${n}`,"error")}},lt=async e=>{const s=e.name||e.channel_name;if(await se(`确认删除通知规则“${s}”?`))try{await gt(e.id),D(a=>a.filter(n=>n.id!==e.id)),g(a=>{const n={...a};return delete n[String(e.id)],n})}catch(a){o(`删除通知规则失败:${a.message}`)}},Q=async(e=w)=>{je(!0);try{const s=await ut({cookie_id:U||void 0,processing_status:Z||void 0,limit:re,offset:e*re});Oe(s.data||[]),Ie(s.total||0)}catch(s){o(`加载风控日志失败:${s.message}`)}finally{je(!1)}};l.useEffect(()=>{r==="risk"&&Q()},[r,U,Z,w]);const nt=async e=>{if(await se("确认删除这条风控日志?"))try{const s=await ft(e.id);if(s.success===!1)throw new Error(s.message||"删除失败");await Q()}catch(s){o(`删除风控日志失败:${s.message}`)}},Ce=async()=>{if(i){ke(!0);try{const e=await ht({lines:300,level:ve||void 0,source:R.trim()||void 0});if(!e.success)throw new Error(e.message||"加载失败");We(e.logs||[])}catch(e){o(`加载系统日志失败:${e.message}`)}finally{ke(!1)}}};l.useEffect(()=>{r==="system"&&i&&Ce()},[r]);const V=Math.max(1,Math.ceil(fe/re)),it=[{id:"channels",label:"通知渠道",icon:E},{id:"bindings",label:"账号通知",icon:ae},{id:"risk",label:"风控日志",icon:le},...i?[{id:"system",label:"系统日志",icon:ne}]:[]];return t.jsxs("div",{className:"page-stack animate-fade-in",children:[t.jsx(vt,{title:"通知与日志",description:"统一管理外部通知渠道、账号绑定、风控事件和系统运行日志。",icon:E,actions:t.jsxs("button",{type:"button",onClick:()=>void m(),disabled:C,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[t.jsx(ee,{className:`h-4 w-4 ${C?"animate-spin":""}`}),"刷新配置"]})}),t.jsx(wt,{value:r,onChange:k,items:it,ariaLabel:"通知与日志功能"}),r==="channels"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"通知渠道",description:"密钥仅用于服务端发送通知,请避免在日志或截图中公开。",icon:E,actions:t.jsxs("button",{type:"button",onClick:ze,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(Ee,{className:"h-4 w-4"}),"新建渠道"]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[A.map(e=>{var s;return t.jsxs("div",{className:"flex flex-col gap-3 py-4 sm:flex-row sm:items-center",children:[t.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,onClick:()=>void Ze(e),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${e.enabled?"bg-[#ffe100]":"bg-gray-300"}`,title:e.enabled?"停用渠道":"启用渠道",children:t.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-5":""}`})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("span",{className:"font-bold text-gray-900",children:e.name}),t.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-600",children:((s=y[e.type])==null?void 0:s.label)||e.type})]}),t.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[e.enabled?"可用于账号通知":"已停用",e.updated_at?` · 更新于 ${T(e.updated_at)}`:""]})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"button",onClick:()=>Fe(e),title:"编辑渠道",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",children:t.jsx($e,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>void Je(e),title:"删除渠道",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})})]})]},e.id)}),!C&&A.length===0&&t.jsx(L,{compact:!0,title:"暂无通知渠道",description:"新建渠道后可绑定到指定闲鱼账号。",icon:E})]})]}),r==="bindings"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"账号通知规则",description:"同一账号可配置多条规则,按事件类型选择要通知的内容;测试发送会真实触达当前渠道。",icon:ae,actions:t.jsxs("button",{type:"button",onClick:Ve,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(Ee,{className:"h-4 w-4"}),"新建规则"]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[de.map(e=>{const s=x.find(c=>c.id===e.cookie_id),a=Te[String(e.id)],n=(a==null?void 0:a.status)==="sending";return t.jsxs("div",{className:"flex flex-col gap-3 py-4 sm:flex-row sm:items-center","aria-busy":n||void 0,children:[t.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,"aria-label":`${e.name||e.channel_name}通知规则开关`,onClick:()=>void st(e),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${e.enabled?"bg-[#ffe100]":"bg-gray-300"}`,title:e.enabled?"暂停规则":"启用规则",children:t.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-5":""}`})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("p",{className:"font-bold text-gray-900",children:e.name||"默认规则"}),t.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-600",children:e.channel_name})]}),t.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[s?oe(s):e.cookie_id," · ",e.channel_enabled===!1?"渠道已停用":e.enabled?"接收通知":"已暂停"]}),t.jsxs("p",{className:"mt-1 break-words text-xs text-gray-500",children:["通知内容:",Xe(e)]})]}),t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:()=>void at(e),disabled:n,"aria-label":`测试发送规则${e.name||e.channel_name}`,title:e.enabled?"向该渠道真实发送一条测试消息":"规则已暂停,仅验证渠道配置",className:"ios-btn-secondary flex min-h-11 items-center gap-1.5 rounded-md px-3 text-xs disabled:cursor-wait disabled:opacity-60",children:[n?t.jsx(te,{className:"h-3.5 w-3.5 animate-spin"}):t.jsx(kt,{className:"h-3.5 w-3.5"}),n?"发送中":"测试发送"]}),t.jsx("button",{type:"button",onClick:()=>Ye(e),title:"编辑规则",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",children:t.jsx($e,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>void lt(e),title:"删除规则",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})}),a&&a.status!=="sending"&&t.jsxs("span",{role:"status",className:`flex max-w-full items-center gap-1 text-xs ${a.status==="success"?"text-emerald-700":"text-red-700"}`,title:a.requestId?`请求 ID:${a.requestId}`:void 0,children:[a.status==="success"?t.jsx(ot,{className:"h-3.5 w-3.5 shrink-0"}):t.jsx(ct,{className:"h-3.5 w-3.5 shrink-0"}),t.jsxs("span",{className:"break-words",children:[a.message,a.sentAt?` · ${T(a.sentAt)}`:""]})]})]})]},e.id)}),!C&&de.length===0&&t.jsx(L,{compact:!0,title:"暂无账号通知规则",description:"先创建并启用通知渠道,再为账号添加通知规则。",icon:ae})]})]}),r==="risk"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"发货风控日志",description:"查看发货前拦截、关单、补偿和异常处理结果。",icon:le}),t.jsx("div",{className:"toolbar rounded-none border-x-0 border-t-0 shadow-none",children:t.jsxs("div",{className:"toolbar__group",children:[t.jsxs("select",{value:U,onChange:e=>{Me(e.target.value),_(0)},className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-56",children:[t.jsx("option",{value:"",children:"全部账号"}),x.map(e=>t.jsx("option",{value:e.id,children:oe(e)},e.id))]}),t.jsxs("select",{value:Z,onChange:e=>{qe(e.target.value),_(0)},className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-40",children:[t.jsx("option",{value:"",children:"全部状态"}),t.jsx("option",{value:"processing",children:"处理中"}),t.jsx("option",{value:"success",children:"成功"}),t.jsx("option",{value:"failed",children:"失败"})]}),t.jsxs("button",{type:"button",onClick:()=>void Q(),disabled:J,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(ee,{className:`h-4 w-4 ${J?"animate-spin":""}`}),"刷新"]})]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[ge.map(e=>t.jsxs("div",{className:"grid gap-3 py-4 lg:grid-cols-[180px_120px_minmax(0,1fr)_44px] lg:items-start",children:[t.jsxs("div",{children:[t.jsx("p",{className:"break-all text-sm font-bold text-gray-900",children:e.cookie_id}),t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:T(e.created_at)})]}),t.jsxs("div",{children:[t.jsx("span",{className:`inline-flex rounded px-2 py-1 text-xs font-bold ${e.processing_status==="success"?"bg-emerald-50 text-emerald-700":e.processing_status==="failed"?"bg-red-50 text-red-700":"bg-amber-50 text-amber-700"}`,children:e.processing_status==="success"?"成功":e.processing_status==="failed"?"失败":"处理中"}),t.jsx("p",{className:"mt-2 text-xs text-gray-500",children:e.event_type})]}),t.jsxs("div",{className:"min-w-0 text-sm leading-6 text-gray-700",children:[t.jsx("p",{children:e.event_description||e.processing_result||"无详细描述"}),e.processing_result&&e.event_description&&t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:e.processing_result}),e.error_message&&t.jsx("p",{className:"mt-1 break-words text-xs text-red-600",children:e.error_message})]}),t.jsx("button",{type:"button",onClick:()=>void nt(e),title:"删除日志",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})})]},e.id)),!J&&ge.length===0&&t.jsx(L,{compact:!0,title:"没有符合条件的风控日志",description:"调整账号或状态筛选条件后重新查询。",icon:le})]}),t.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3",children:[t.jsxs("p",{className:"text-xs text-gray-500",children:["共 ",fe," 条"]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>_(e=>Math.max(0,e-1)),disabled:w===0,title:"上一页",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 disabled:opacity-40",children:t.jsx(Ct,{className:"h-4 w-4"})}),t.jsxs("span",{className:"min-w-20 text-center text-sm font-bold",children:[w+1," / ",V]}),t.jsx("button",{type:"button",onClick:()=>_(e=>Math.min(V-1,e+1)),disabled:w+1>=V,title:"下一页",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 disabled:opacity-40",children:t.jsx(St,{className:"h-4 w-4"})})]})]})]}),r==="system"&&i&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"系统运行日志",description:"最多读取最近 300 行,可按级别和来源快速定位运行异常。",icon:ne}),t.jsxs("div",{className:"grid gap-3 border-b border-gray-200 bg-gray-50/60 p-4 sm:grid-cols-[160px_minmax(0,1fr)_auto_auto]",children:[t.jsxs("select",{value:ve,onChange:e=>Ge(e.target.value),className:"ios-input rounded-md px-3 py-2.5 text-sm",children:[t.jsx("option",{value:"",children:"全部级别"}),t.jsx("option",{value:"DEBUG",children:"DEBUG"}),t.jsx("option",{value:"INFO",children:"INFO"}),t.jsx("option",{value:"WARNING",children:"WARNING"}),t.jsx("option",{value:"ERROR",children:"ERROR"})]}),t.jsx("input",{value:R,onChange:e=>we(e.target.value),placeholder:"按日志来源筛选",className:"ios-input rounded-md px-3 py-2.5 text-sm"}),t.jsx("button",{type:"button","aria-pressed":R==="logistics_quote",onClick:()=>we(e=>e==="logistics_quote"?"":"logistics_quote"),className:`rounded-md px-3 py-2.5 text-sm font-bold ${R==="logistics_quote"?"bg-[#ffe100] text-gray-900":"bg-white text-gray-700 ring-1 ring-gray-200 hover:bg-gray-100"}`,children:"物流报价"}),t.jsxs("button",{type:"button",onClick:()=>void Ce(),disabled:K,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(ee,{className:`h-4 w-4 ${K?"animate-spin":""}`}),"查询"]})]}),t.jsxs("div",{className:"max-h-[620px] divide-y divide-gray-100 overflow-y-auto px-4 font-mono text-xs",children:[[...Ne].reverse().map((e,s)=>t.jsxs("div",{className:"grid gap-2 py-3 lg:grid-cols-[165px_80px_180px_minmax(0,1fr)]",children:[t.jsx("span",{className:"text-gray-500",children:T(e.timestamp)}),t.jsx("span",{className:`font-bold ${e.level==="ERROR"?"text-red-600":e.level==="WARNING"?"text-amber-700":"text-gray-700"}`,children:e.level}),t.jsx("span",{className:"truncate text-gray-500",title:e.source,children:e.source}),t.jsx("span",{className:"break-words text-gray-800",children:e.message})]},`${e.timestamp}-${s}`)),!K&&Ne.length===0&&t.jsx(L,{compact:!0,title:"暂无系统日志",description:"当前筛选条件没有返回运行记录。",icon:ne})]})]}),Pe&&t.jsx("div",{className:"modal-overlay",children:t.jsxs("div",{className:"modal-container max-w-xl",children:[t.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900",children:N?"编辑通知渠道":"新建通知渠道"}),t.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"配置服务端发送通知所需的连接信息。"})]}),t.jsx("button",{type:"button",onClick:()=>j(!1),title:"关闭",className:"flex h-9 w-9 items-center justify-center rounded-md hover:bg-gray-100",children:t.jsx(Se,{className:"h-5 w-5"})})]}),t.jsxs("div",{className:"modal-body space-y-4",children:[t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["渠道名称",t.jsx("input",{value:O,onChange:e=>I(e.target.value),placeholder:"例如:订单告警群",className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["渠道类型",t.jsx("select",{value:P,disabled:!!N,onChange:e=>He(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:Object.entries(y).map(([e,s])=>t.jsx("option",{value:e,children:s.label},e))})]}),y[P].fields.map(e=>{var s;return t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:[e.label,e.optional?"(可选)":"",e.type==="textarea"?t.jsx("textarea",{value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:a.target.value}),placeholder:e.placeholder,rows:4,className:"ios-input mt-2 w-full resize-y rounded-md px-3 py-2.5 font-mono text-sm font-normal"}):e.type==="select"?t.jsx("select",{value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:a.target.value}),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal",children:(s=e.options)==null?void 0:s.map(a=>t.jsx("option",{children:a},a))}):t.jsx("input",{type:e.type||"text",value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:e.type==="number"?Number(a.target.value):a.target.value}),placeholder:e.placeholder,className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]},e.key)})]}),t.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[t.jsx("button",{type:"button",onClick:()=>j(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5 text-sm",children:"取消"}),t.jsxs("button",{type:"button",onClick:()=>void Ue(),disabled:ue,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[ue?t.jsx(te,{className:"h-4 w-4 animate-spin"}):t.jsx(Le,{className:"h-4 w-4"}),"保存"]})]})]})}),Be&&t.jsx("div",{className:"modal-overlay",children:t.jsxs("div",{className:"modal-container max-w-2xl",children:[t.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900",children:v?"编辑通知规则":"新建通知规则"}),t.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"选择这条规则要通知的内容,未勾选任何类型表示订阅全部事件。"})]}),t.jsx("button",{type:"button",onClick:()=>u(!1),title:"关闭",className:"flex h-9 w-9 items-center justify-center rounded-md hover:bg-gray-100",children:t.jsx(Se,{className:"h-5 w-5"})})]}),t.jsxs("div",{className:"modal-body space-y-4",children:[t.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["账号",t.jsxs("select",{value:M,disabled:!!v,onChange:e=>q(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:[t.jsx("option",{value:"",children:"选择账号"}),x.map(e=>t.jsx("option",{value:e.id,children:oe(e)},e.id))]})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["通知渠道",t.jsxs("select",{value:W,disabled:!!v,onChange:e=>G(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:[t.jsx("option",{value:"",children:"选择已启用渠道"}),A.filter(e=>e.enabled).map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))]})]})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["规则名称(可选)",t.jsx("input",{value:z,onChange:e=>F(e.target.value),placeholder:"例如:仅关键提醒",className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsx("span",{className:"text-sm font-bold text-gray-700",children:"通知内容"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"button",onClick:()=>X("all"),className:"rounded-md bg-gray-100 px-3 py-1.5 text-xs font-bold text-gray-700 hover:bg-gray-200",children:"全选"}),t.jsx("button",{type:"button",onClick:()=>X("critical"),className:"rounded-md bg-red-50 px-3 py-1.5 text-xs font-bold text-red-700 hover:bg-red-100",children:"仅关键"}),t.jsx("button",{type:"button",onClick:()=>X("none"),className:"rounded-md bg-gray-100 px-3 py-1.5 text-xs font-bold text-gray-700 hover:bg-gray-200",children:"清空"})]})]}),t.jsx("div",{className:"mt-3 space-y-3",children:Qe.map(e=>{const s=f.filter(n=>n.priority===e.id);if(s.length===0)return null;const a=e.id==="critical"?"text-red-700":e.id==="warning"?"text-amber-700":"text-gray-600";return t.jsxs("div",{children:[t.jsx("p",{className:`text-xs font-bold ${a}`,children:e.label}),t.jsx("div",{className:"mt-2 grid gap-2 sm:grid-cols-2",children:s.map(n=>{const c=H.includes(n.id);return t.jsxs("button",{type:"button",onClick:()=>et(n.id),className:`flex items-start gap-2 rounded-md border p-3 text-left transition-colors ${c?"border-[#ffe100] bg-[#fffbe6]":"border-gray-200 bg-white hover:bg-gray-50"}`,children:[t.jsx("span",{className:`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border ${c?"border-[#ffe100] bg-[#ffe100]":"border-gray-300 bg-white"}`,children:c&&t.jsx(_t,{className:"h-3 w-3 text-gray-900"})}),t.jsxs("span",{className:"min-w-0",children:[t.jsx("span",{className:"block text-sm font-bold text-gray-900",children:n.label}),t.jsx("span",{className:"mt-0.5 block text-xs text-gray-500",children:n.description})]})]},n.id)})})]},e.id)})}),t.jsx("p",{className:"mt-3 text-xs text-gray-500",children:"未勾选任何类型时接收全部事件;只想收关键提醒可点“仅关键”。"})]})]}),t.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[t.jsx("button",{type:"button",onClick:()=>u(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5 text-sm",children:"取消"}),t.jsxs("button",{type:"button",onClick:()=>void tt(),disabled:be,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[be?t.jsx(te,{className:"h-4 w-4 animate-spin"}):t.jsx(Le,{className:"h-4 w-4"}),"保存"]})]})]})})]})};export{Wt as default}; +import{r as l,j as t,bc as E,e as ee,L as te,aE as ot,C as ct,X as Se,o as dt,bm as mt,bn as xt,bo as pt,n as o,bp as ut,bq as ht,br as _e,v as se,bs as yt,bt as Re,bu as bt,bv as gt,bw as ft,bx as jt,by as Nt}from"./index-BZnqBmwp.js";import{a as vt,b as wt,S as $,E as L}from"./ui-B9Jzqjf7.js";import{L as ae}from"./link-2-CTuWzTfU.js";import{S as le}from"./shield-alert-rM_NVGQr.js";import{A as ne}from"./activity-D09genEZ.js";import{P as Ee}from"./plus-BljRK6L8.js";import{P as $e}from"./pen-line-CmEoWNKp.js";import{T as ie}from"./trash-2-CmT2n80I.js";import{S as kt}from"./send-BjFPcqyQ.js";import{C as Ct,a as St}from"./chevron-right-pxFcnXJt.js";import{S as Le}from"./save-Dxf2dvgb.js";import{C as _t}from"./check-C6LyX_Nv.js";const y={dingtalk:{label:"钉钉",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://oapi.dingtalk.com/robot/send?..."},{key:"secret",label:"加签密钥",type:"password",optional:!0}],defaults:{}},feishu:{label:"飞书",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/..."},{key:"secret",label:"签名密钥",type:"password",optional:!0}],defaults:{}},bark:{label:"Bark",fields:[{key:"device_key",label:"Device Key",type:"password"},{key:"server_url",label:"服务器地址",placeholder:"https://api.day.app",optional:!0}],defaults:{server_url:"https://api.day.app"}},email:{label:"邮件",fields:[{key:"smtp_server",label:"SMTP 服务器",placeholder:"留空则使用「系统设置 → 邮件服务」",optional:!0},{key:"smtp_port",label:"SMTP 端口",type:"number",placeholder:"留空则使用系统设置(如 465)",optional:!0},{key:"email_user",label:"发件邮箱",placeholder:"留空则使用系统设置的发件邮箱",optional:!0},{key:"email_password",label:"邮箱密码或授权码",type:"password",placeholder:"留空则使用系统设置的授权码",optional:!0},{key:"recipient_email",label:"接收邮箱",placeholder:"必填,通知发到这个邮箱"}],defaults:{}},webhook:{label:"Webhook",fields:[{key:"webhook_url",label:"Webhook 地址"},{key:"http_method",label:"请求方法",type:"select",options:["POST","PUT"]},{key:"headers",label:"请求头 JSON",type:"textarea",placeholder:'{"Authorization":"Bearer ..."}',optional:!0}],defaults:{http_method:"POST",headers:"{}"}},wechat:{label:"企业微信",fields:[{key:"webhook_url",label:"机器人 Webhook 地址"}],defaults:{}},telegram:{label:"Telegram",fields:[{key:"bot_token",label:"Bot Token",type:"password"},{key:"chat_id",label:"Chat ID"}],defaults:{}}},re=20,Rt=i=>{var k,x;const r=(x=(k=i==null?void 0:i.response)==null?void 0:k.data)==null?void 0:x.detail;if(r&&typeof r=="object"&&"message"in r){const b=r.message;if(typeof b=="string"&&b.trim())return b.trim()}return typeof r=="string"&&r.trim()?r.trim():i instanceof Error&&i.message?i.message:"测试发送失败,请稍后重试"},oe=i=>i.nickname||i.remark||i.id,T=i=>{if(!i)return"-";const r=new Date(i.includes("T")?i:`${i.replace(" ","T")}Z`);return Number.isNaN(r.getTime())?i:r.toLocaleString("zh-CN")},Wt=({isAdmin:i})=>{const[r,k]=l.useState("channels"),[x,b]=l.useState([]),[A,ce]=l.useState([]),[de,D]=l.useState([]),[Te,g]=l.useState({}),[f,Ae]=l.useState([]),[me,De]=l.useState([]),[C,xe]=l.useState(!0),[Pe,j]=l.useState(!1),[N,pe]=l.useState(null),[P,B]=l.useState("dingtalk"),[O,I]=l.useState(""),[d,p]=l.useState({}),[ue,he]=l.useState(!1),[Be,u]=l.useState(!1),[v,ye]=l.useState(null),[M,q]=l.useState(""),[W,G]=l.useState(""),[z,F]=l.useState(""),[H,h]=l.useState([]),[be,S]=l.useState(!1),[ge,Oe]=l.useState([]),[fe,Ie]=l.useState(0),[U,Me]=l.useState(""),[Z,qe]=l.useState(""),[w,_]=l.useState(0),[J,je]=l.useState(!1),[Ne,We]=l.useState([]),[ve,Ge]=l.useState(""),[R,we]=l.useState(""),[K,ke]=l.useState(!1),m=async()=>{xe(!0);try{const[e,s,a,n]=await Promise.all([dt(),mt(),xt(),pt()]);b(e),ce(s.data),D(a.data),g(c=>{const rt=new Set(a.data.map(Y=>String(Y.id)));return Object.fromEntries(Object.entries(c).filter(([Y])=>rt.has(Y)))}),Ae(n.events),De(n.priorities)}catch(e){o(`加载通知配置失败:${e.message}`)}finally{xe(!1)}};l.useEffect(()=>{m()},[]);const ze=()=>{const e="dingtalk";pe(null),B(e),I(""),p({...y[e].defaults}),j(!0)},Fe=e=>{pe(e),B(e.type),I(e.name),p({...y[e.type].defaults,...e.config}),j(!0)},He=e=>{B(e),p({...y[e].defaults})},Ue=async()=>{he(!0);try{N?await _e(N.id,{name:O,config:d,enabled:N.enabled}):await jt({name:O,type:P,config:d}),j(!1),await m()}catch(e){o(`保存通知渠道失败:${e.message}`)}finally{he(!1)}},Ze=async e=>{try{await _e(e.id,{enabled:!e.enabled}),ce(s=>s.map(a=>a.id===e.id?{...a,enabled:!a.enabled}:a)),e.enabled?D(s=>s.filter(a=>a.channel_id!==Number(e.id))):await m()}catch(s){o(`更新渠道状态失败:${s.message}`)}},Je=async e=>{if(await se(`确认删除通知渠道“${e.name}”?相关账号绑定也会被删除。`))try{await yt(e.id),await m()}catch(s){o(`删除通知渠道失败:${s.message}`)}},Ke=e=>{var s;return((s=f.find(a=>a.id===e))==null?void 0:s.label)||e},Xe=e=>!e.event_types||e.event_types.length===0?"全部事件":e.event_types.map(Ke).join("、"),Qe=me.length>0?me:Array.from(new Set(f.map(e=>e.priority))).map(e=>({id:e,label:e==="critical"?"关键":e==="warning"?"重要":"一般"})),Ve=()=>{var e;ye(null),q(((e=x[0])==null?void 0:e.id)||""),G(""),F(""),h([]),u(!0)},Ye=e=>{ye(e),q(e.cookie_id),G(String(e.channel_id)),F(e.name||""),h(e.event_types||[]),u(!0)},et=e=>{h(s=>s.includes(e)?s.filter(a=>a!==e):[...s,e])},X=e=>{if(e==="all"){h(f.map(s=>s.id));return}if(e==="none"){h([]);return}h(f.filter(s=>s.priority===e).map(s=>s.id))},tt=async()=>{if(v){S(!0);try{await Re(v.id,{name:z.trim(),eventTypes:H}),u(!1),await m()}catch(e){o(`保存通知规则失败:${e.message}`)}finally{S(!1)}return}if(!M||!W){o("请选择账号和通知渠道");return}S(!0);try{await Nt(M,Number(W),!0,{name:z.trim(),eventTypes:H}),u(!1),await m()}catch(e){o(`创建通知规则失败:${e.message}`)}finally{S(!1)}},st=async e=>{try{await Re(e.id,{enabled:!e.enabled}),await m()}catch(s){o(`更新通知规则失败:${s.message}`)}},at=async e=>{const s=String(e.id);g(a=>({...a,[s]:{status:"sending",message:"发送中"}}));try{const a=await bt(e.id),n=`${a.message} · ${a.channel.name}`;g(c=>({...c,[s]:{status:"success",message:n,requestId:a.request_id,sentAt:a.sent_at}})),o(`${n}(请求 ID:${a.request_id})`,"success")}catch(a){const n=Rt(a);g(c=>({...c,[s]:{status:"error",message:n}})),o(`测试发送失败:${n}`,"error")}},lt=async e=>{const s=e.name||e.channel_name;if(await se(`确认删除通知规则“${s}”?`))try{await gt(e.id),D(a=>a.filter(n=>n.id!==e.id)),g(a=>{const n={...a};return delete n[String(e.id)],n})}catch(a){o(`删除通知规则失败:${a.message}`)}},Q=async(e=w)=>{je(!0);try{const s=await ut({cookie_id:U||void 0,processing_status:Z||void 0,limit:re,offset:e*re});Oe(s.data||[]),Ie(s.total||0)}catch(s){o(`加载风控日志失败:${s.message}`)}finally{je(!1)}};l.useEffect(()=>{r==="risk"&&Q()},[r,U,Z,w]);const nt=async e=>{if(await se("确认删除这条风控日志?"))try{const s=await ft(e.id);if(s.success===!1)throw new Error(s.message||"删除失败");await Q()}catch(s){o(`删除风控日志失败:${s.message}`)}},Ce=async()=>{if(i){ke(!0);try{const e=await ht({lines:300,level:ve||void 0,source:R.trim()||void 0});if(!e.success)throw new Error(e.message||"加载失败");We(e.logs||[])}catch(e){o(`加载系统日志失败:${e.message}`)}finally{ke(!1)}}};l.useEffect(()=>{r==="system"&&i&&Ce()},[r]);const V=Math.max(1,Math.ceil(fe/re)),it=[{id:"channels",label:"通知渠道",icon:E},{id:"bindings",label:"账号通知",icon:ae},{id:"risk",label:"风控日志",icon:le},...i?[{id:"system",label:"系统日志",icon:ne}]:[]];return t.jsxs("div",{className:"page-stack animate-fade-in",children:[t.jsx(vt,{title:"通知与日志",description:"统一管理外部通知渠道、账号绑定、风控事件和系统运行日志。",icon:E,actions:t.jsxs("button",{type:"button",onClick:()=>void m(),disabled:C,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[t.jsx(ee,{className:`h-4 w-4 ${C?"animate-spin":""}`}),"刷新配置"]})}),t.jsx(wt,{value:r,onChange:k,items:it,ariaLabel:"通知与日志功能"}),r==="channels"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"通知渠道",description:"密钥仅用于服务端发送通知,请避免在日志或截图中公开。",icon:E,actions:t.jsxs("button",{type:"button",onClick:ze,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(Ee,{className:"h-4 w-4"}),"新建渠道"]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[A.map(e=>{var s;return t.jsxs("div",{className:"flex flex-col gap-3 py-4 sm:flex-row sm:items-center",children:[t.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,onClick:()=>void Ze(e),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${e.enabled?"bg-[#ffe100]":"bg-gray-300"}`,title:e.enabled?"停用渠道":"启用渠道",children:t.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-5":""}`})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("span",{className:"font-bold text-gray-900",children:e.name}),t.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-600",children:((s=y[e.type])==null?void 0:s.label)||e.type})]}),t.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[e.enabled?"可用于账号通知":"已停用",e.updated_at?` · 更新于 ${T(e.updated_at)}`:""]})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"button",onClick:()=>Fe(e),title:"编辑渠道",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",children:t.jsx($e,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>void Je(e),title:"删除渠道",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})})]})]},e.id)}),!C&&A.length===0&&t.jsx(L,{compact:!0,title:"暂无通知渠道",description:"新建渠道后可绑定到指定闲鱼账号。",icon:E})]})]}),r==="bindings"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"账号通知规则",description:"同一账号可配置多条规则,按事件类型选择要通知的内容;测试发送会真实触达当前渠道。",icon:ae,actions:t.jsxs("button",{type:"button",onClick:Ve,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(Ee,{className:"h-4 w-4"}),"新建规则"]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[de.map(e=>{const s=x.find(c=>c.id===e.cookie_id),a=Te[String(e.id)],n=(a==null?void 0:a.status)==="sending";return t.jsxs("div",{className:"flex flex-col gap-3 py-4 sm:flex-row sm:items-center","aria-busy":n||void 0,children:[t.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,"aria-label":`${e.name||e.channel_name}通知规则开关`,onClick:()=>void st(e),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${e.enabled?"bg-[#ffe100]":"bg-gray-300"}`,title:e.enabled?"暂停规则":"启用规则",children:t.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-5":""}`})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx("p",{className:"font-bold text-gray-900",children:e.name||"默认规则"}),t.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-600",children:e.channel_name})]}),t.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[s?oe(s):e.cookie_id," · ",e.channel_enabled===!1?"渠道已停用":e.enabled?"接收通知":"已暂停"]}),t.jsxs("p",{className:"mt-1 break-words text-xs text-gray-500",children:["通知内容:",Xe(e)]})]}),t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:()=>void at(e),disabled:n,"aria-label":`测试发送规则${e.name||e.channel_name}`,title:e.enabled?"向该渠道真实发送一条测试消息":"规则已暂停,仅验证渠道配置",className:"ios-btn-secondary flex min-h-11 items-center gap-1.5 rounded-md px-3 text-xs disabled:cursor-wait disabled:opacity-60",children:[n?t.jsx(te,{className:"h-3.5 w-3.5 animate-spin"}):t.jsx(kt,{className:"h-3.5 w-3.5"}),n?"发送中":"测试发送"]}),t.jsx("button",{type:"button",onClick:()=>Ye(e),title:"编辑规则",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 text-gray-700 hover:bg-gray-200",children:t.jsx($e,{className:"h-4 w-4"})}),t.jsx("button",{type:"button",onClick:()=>void lt(e),title:"删除规则",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})}),a&&a.status!=="sending"&&t.jsxs("span",{role:"status",className:`flex max-w-full items-center gap-1 text-xs ${a.status==="success"?"text-emerald-700":"text-red-700"}`,title:a.requestId?`请求 ID:${a.requestId}`:void 0,children:[a.status==="success"?t.jsx(ot,{className:"h-3.5 w-3.5 shrink-0"}):t.jsx(ct,{className:"h-3.5 w-3.5 shrink-0"}),t.jsxs("span",{className:"break-words",children:[a.message,a.sentAt?` · ${T(a.sentAt)}`:""]})]})]})]},e.id)}),!C&&de.length===0&&t.jsx(L,{compact:!0,title:"暂无账号通知规则",description:"先创建并启用通知渠道,再为账号添加通知规则。",icon:ae})]})]}),r==="risk"&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"发货风控日志",description:"查看发货前拦截、关单、补偿和异常处理结果。",icon:le}),t.jsx("div",{className:"toolbar rounded-none border-x-0 border-t-0 shadow-none",children:t.jsxs("div",{className:"toolbar__group",children:[t.jsxs("select",{value:U,onChange:e=>{Me(e.target.value),_(0)},className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-56",children:[t.jsx("option",{value:"",children:"全部账号"}),x.map(e=>t.jsx("option",{value:e.id,children:oe(e)},e.id))]}),t.jsxs("select",{value:Z,onChange:e=>{qe(e.target.value),_(0)},className:"ios-input rounded-md px-3 py-2.5 text-sm sm:min-w-40",children:[t.jsx("option",{value:"",children:"全部状态"}),t.jsx("option",{value:"processing",children:"处理中"}),t.jsx("option",{value:"success",children:"成功"}),t.jsx("option",{value:"failed",children:"失败"})]}),t.jsxs("button",{type:"button",onClick:()=>void Q(),disabled:J,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(ee,{className:`h-4 w-4 ${J?"animate-spin":""}`}),"刷新"]})]})}),t.jsxs("div",{className:"divide-y divide-gray-100 px-4",children:[ge.map(e=>t.jsxs("div",{className:"grid gap-3 py-4 lg:grid-cols-[180px_120px_minmax(0,1fr)_44px] lg:items-start",children:[t.jsxs("div",{children:[t.jsx("p",{className:"break-all text-sm font-bold text-gray-900",children:e.cookie_id}),t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:T(e.created_at)})]}),t.jsxs("div",{children:[t.jsx("span",{className:`inline-flex rounded px-2 py-1 text-xs font-bold ${e.processing_status==="success"?"bg-emerald-50 text-emerald-700":e.processing_status==="failed"?"bg-red-50 text-red-700":"bg-amber-50 text-amber-700"}`,children:e.processing_status==="success"?"成功":e.processing_status==="failed"?"失败":"处理中"}),t.jsx("p",{className:"mt-2 text-xs text-gray-500",children:e.event_type})]}),t.jsxs("div",{className:"min-w-0 text-sm leading-6 text-gray-700",children:[t.jsx("p",{children:e.event_description||e.processing_result||"无详细描述"}),e.processing_result&&e.event_description&&t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:e.processing_result}),e.error_message&&t.jsx("p",{className:"mt-1 break-words text-xs text-red-600",children:e.error_message})]}),t.jsx("button",{type:"button",onClick:()=>void nt(e),title:"删除日志",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100",children:t.jsx(ie,{className:"h-4 w-4"})})]},e.id)),!J&&ge.length===0&&t.jsx(L,{compact:!0,title:"没有符合条件的风控日志",description:"调整账号或状态筛选条件后重新查询。",icon:le})]}),t.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3",children:[t.jsxs("p",{className:"text-xs text-gray-500",children:["共 ",fe," 条"]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>_(e=>Math.max(0,e-1)),disabled:w===0,title:"上一页",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 disabled:opacity-40",children:t.jsx(Ct,{className:"h-4 w-4"})}),t.jsxs("span",{className:"min-w-20 text-center text-sm font-bold",children:[w+1," / ",V]}),t.jsx("button",{type:"button",onClick:()=>_(e=>Math.min(V-1,e+1)),disabled:w+1>=V,title:"下一页",className:"flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 disabled:opacity-40",children:t.jsx(St,{className:"h-4 w-4"})})]})]})]}),r==="system"&&i&&t.jsxs("section",{className:"section-panel",children:[t.jsx($,{title:"系统运行日志",description:"最多读取最近 300 行,可按级别和来源快速定位运行异常。",icon:ne}),t.jsxs("div",{className:"grid gap-3 border-b border-gray-200 bg-gray-50/60 p-4 sm:grid-cols-[160px_minmax(0,1fr)_auto_auto]",children:[t.jsxs("select",{value:ve,onChange:e=>Ge(e.target.value),className:"ios-input rounded-md px-3 py-2.5 text-sm",children:[t.jsx("option",{value:"",children:"全部级别"}),t.jsx("option",{value:"DEBUG",children:"DEBUG"}),t.jsx("option",{value:"INFO",children:"INFO"}),t.jsx("option",{value:"WARNING",children:"WARNING"}),t.jsx("option",{value:"ERROR",children:"ERROR"})]}),t.jsx("input",{value:R,onChange:e=>we(e.target.value),placeholder:"按日志来源筛选",className:"ios-input rounded-md px-3 py-2.5 text-sm"}),t.jsx("button",{type:"button","aria-pressed":R==="logistics_quote",onClick:()=>we(e=>e==="logistics_quote"?"":"logistics_quote"),className:`rounded-md px-3 py-2.5 text-sm font-bold ${R==="logistics_quote"?"bg-[#ffe100] text-gray-900":"bg-white text-gray-700 ring-1 ring-gray-200 hover:bg-gray-100"}`,children:"物流报价"}),t.jsxs("button",{type:"button",onClick:()=>void Ce(),disabled:K,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[t.jsx(ee,{className:`h-4 w-4 ${K?"animate-spin":""}`}),"查询"]})]}),t.jsxs("div",{className:"max-h-[620px] divide-y divide-gray-100 overflow-y-auto px-4 font-mono text-xs",children:[[...Ne].reverse().map((e,s)=>t.jsxs("div",{className:"grid gap-2 py-3 lg:grid-cols-[165px_80px_180px_minmax(0,1fr)]",children:[t.jsx("span",{className:"text-gray-500",children:T(e.timestamp)}),t.jsx("span",{className:`font-bold ${e.level==="ERROR"?"text-red-600":e.level==="WARNING"?"text-amber-700":"text-gray-700"}`,children:e.level}),t.jsx("span",{className:"truncate text-gray-500",title:e.source,children:e.source}),t.jsx("span",{className:"break-words text-gray-800",children:e.message})]},`${e.timestamp}-${s}`)),!K&&Ne.length===0&&t.jsx(L,{compact:!0,title:"暂无系统日志",description:"当前筛选条件没有返回运行记录。",icon:ne})]})]}),Pe&&t.jsx("div",{className:"modal-overlay",children:t.jsxs("div",{className:"modal-container max-w-xl",children:[t.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900",children:N?"编辑通知渠道":"新建通知渠道"}),t.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"配置服务端发送通知所需的连接信息。"})]}),t.jsx("button",{type:"button",onClick:()=>j(!1),title:"关闭",className:"flex h-9 w-9 items-center justify-center rounded-md hover:bg-gray-100",children:t.jsx(Se,{className:"h-5 w-5"})})]}),t.jsxs("div",{className:"modal-body space-y-4",children:[t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["渠道名称",t.jsx("input",{value:O,onChange:e=>I(e.target.value),placeholder:"例如:订单告警群",className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["渠道类型",t.jsx("select",{value:P,disabled:!!N,onChange:e=>He(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:Object.entries(y).map(([e,s])=>t.jsx("option",{value:e,children:s.label},e))})]}),y[P].fields.map(e=>{var s;return t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:[e.label,e.optional?"(可选)":"",e.type==="textarea"?t.jsx("textarea",{value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:a.target.value}),placeholder:e.placeholder,rows:4,className:"ios-input mt-2 w-full resize-y rounded-md px-3 py-2.5 font-mono text-sm font-normal"}):e.type==="select"?t.jsx("select",{value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:a.target.value}),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal",children:(s=e.options)==null?void 0:s.map(a=>t.jsx("option",{children:a},a))}):t.jsx("input",{type:e.type||"text",value:String(d[e.key]??""),onChange:a=>p({...d,[e.key]:e.type==="number"?Number(a.target.value):a.target.value}),placeholder:e.placeholder,className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]},e.key)})]}),t.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[t.jsx("button",{type:"button",onClick:()=>j(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5 text-sm",children:"取消"}),t.jsxs("button",{type:"button",onClick:()=>void Ue(),disabled:ue,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[ue?t.jsx(te,{className:"h-4 w-4 animate-spin"}):t.jsx(Le,{className:"h-4 w-4"}),"保存"]})]})]})}),Be&&t.jsx("div",{className:"modal-overlay",children:t.jsxs("div",{className:"modal-container max-w-2xl",children:[t.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900",children:v?"编辑通知规则":"新建通知规则"}),t.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"选择这条规则要通知的内容,未勾选任何类型表示订阅全部事件。"})]}),t.jsx("button",{type:"button",onClick:()=>u(!1),title:"关闭",className:"flex h-9 w-9 items-center justify-center rounded-md hover:bg-gray-100",children:t.jsx(Se,{className:"h-5 w-5"})})]}),t.jsxs("div",{className:"modal-body space-y-4",children:[t.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["账号",t.jsxs("select",{value:M,disabled:!!v,onChange:e=>q(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:[t.jsx("option",{value:"",children:"选择账号"}),x.map(e=>t.jsx("option",{value:e.id,children:oe(e)},e.id))]})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["通知渠道",t.jsxs("select",{value:W,disabled:!!v,onChange:e=>G(e.target.value),className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal disabled:bg-gray-100",children:[t.jsx("option",{value:"",children:"选择已启用渠道"}),A.filter(e=>e.enabled).map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))]})]})]}),t.jsxs("label",{className:"block text-sm font-bold text-gray-700",children:["规则名称(可选)",t.jsx("input",{value:z,onChange:e=>F(e.target.value),placeholder:"例如:仅关键提醒",className:"ios-input mt-2 w-full rounded-md px-3 py-2.5 font-normal"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsx("span",{className:"text-sm font-bold text-gray-700",children:"通知内容"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"button",onClick:()=>X("all"),className:"rounded-md bg-gray-100 px-3 py-1.5 text-xs font-bold text-gray-700 hover:bg-gray-200",children:"全选"}),t.jsx("button",{type:"button",onClick:()=>X("critical"),className:"rounded-md bg-red-50 px-3 py-1.5 text-xs font-bold text-red-700 hover:bg-red-100",children:"仅关键"}),t.jsx("button",{type:"button",onClick:()=>X("none"),className:"rounded-md bg-gray-100 px-3 py-1.5 text-xs font-bold text-gray-700 hover:bg-gray-200",children:"清空"})]})]}),t.jsx("div",{className:"mt-3 space-y-3",children:Qe.map(e=>{const s=f.filter(n=>n.priority===e.id);if(s.length===0)return null;const a=e.id==="critical"?"text-red-700":e.id==="warning"?"text-amber-700":"text-gray-600";return t.jsxs("div",{children:[t.jsx("p",{className:`text-xs font-bold ${a}`,children:e.label}),t.jsx("div",{className:"mt-2 grid gap-2 sm:grid-cols-2",children:s.map(n=>{const c=H.includes(n.id);return t.jsxs("button",{type:"button",onClick:()=>et(n.id),className:`flex items-start gap-2 rounded-md border p-3 text-left transition-colors ${c?"border-[#ffe100] bg-[#fffbe6]":"border-gray-200 bg-white hover:bg-gray-50"}`,children:[t.jsx("span",{className:`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border ${c?"border-[#ffe100] bg-[#ffe100]":"border-gray-300 bg-white"}`,children:c&&t.jsx(_t,{className:"h-3 w-3 text-gray-900"})}),t.jsxs("span",{className:"min-w-0",children:[t.jsx("span",{className:"block text-sm font-bold text-gray-900",children:n.label}),t.jsx("span",{className:"mt-0.5 block text-xs text-gray-500",children:n.description})]})]},n.id)})})]},e.id)})}),t.jsx("p",{className:"mt-3 text-xs text-gray-500",children:"未勾选任何类型时接收全部事件;只想收关键提醒可点“仅关键”。"})]})]}),t.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[t.jsx("button",{type:"button",onClick:()=>u(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5 text-sm",children:"取消"}),t.jsxs("button",{type:"button",onClick:()=>void tt(),disabled:be,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm disabled:opacity-50",children:[be?t.jsx(te,{className:"h-4 w-4 animate-spin"}):t.jsx(Le,{className:"h-4 w-4"}),"保存"]})]})]})})]})};export{Wt as default}; diff --git a/static/assets/OrderList-DUrGM6ZA.js b/static/assets/OrderList-ZwW4LdUq.js similarity index 98% rename from static/assets/OrderList-DUrGM6ZA.js rename to static/assets/OrderList-ZwW4LdUq.js index 8c838b2..5cc5ec3 100644 --- a/static/assets/OrderList-DUrGM6ZA.js +++ b/static/assets/OrderList-ZwW4LdUq.js @@ -1,4 +1,4 @@ -import{c as Re,r as l,h as ys,O as js,j as e,e as $,P as fs,E as vs,Q as Ns,b as N,X as _,o as _s,T as ws,V as Me,W as ks,Y as Ss,n,Z as Cs,v as Pe,_ as Os,$ as Es,a0 as Ls,a1 as Is,a2 as Ms,a3 as Ps,a4 as Ds,a5 as Fs}from"./index-BCb9Ylky.js";import{a as As,b as $s,E as Rs}from"./ui-DcVZvy8T.js";import{P as qs}from"./plus-DVdQwMrj.js";import{T as De}from"./truck-DyCIYGWz.js";import{S as Ts}from"./search-DAVBnJPC.js";import{P as Y}from"./package-check-CEUjK1hJ.js";import{F as zs}from"./flower-2-DmwUj7Qc.js";import{E as Vs}from"./eye-DywCDhqk.js";import{S as Hs}from"./square-pen-C-Z-gDiq.js";import{T as Js}from"./trash-2-D-oW6aaO.js";import{C as Ws,a as Bs}from"./chevron-right-D40Kl_P-.js";import{S as Fe}from"./save-cq1qPfv2.js";/** +import{c as Re,r as l,h as ys,O as js,j as e,e as $,P as fs,E as vs,Q as Ns,b as N,X as _,o as _s,T as ws,V as Me,W as ks,Y as Ss,n,Z as Cs,v as Pe,_ as Os,$ as Es,a0 as Ls,a1 as Is,a2 as Ms,a3 as Ps,a4 as Ds,a5 as Fs}from"./index-BZnqBmwp.js";import{a as As,b as $s,E as Rs}from"./ui-B9Jzqjf7.js";import{P as qs}from"./plus-BljRK6L8.js";import{T as De}from"./truck-3I9pdhz5.js";import{S as Ts}from"./search-FaxHcuoK.js";import{P as Y}from"./package-check-BKkFNxd0.js";import{F as zs}from"./flower-2-B1FJm-vw.js";import{E as Vs}from"./eye-BibUMjxU.js";import{S as Hs}from"./square-pen-Bmle-FRS.js";import{T as Js}from"./trash-2-CmT2n80I.js";import{C as Ws,a as Bs}from"./chevron-right-pxFcnXJt.js";import{S as Fe}from"./save-Dxf2dvgb.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/PriceWatch-BrSmVRsV.js b/static/assets/PriceWatch-nQDi2og7.js similarity index 92% rename from static/assets/PriceWatch-BrSmVRsV.js rename to static/assets/PriceWatch-nQDi2og7.js index 9504536..1fee3c5 100644 --- a/static/assets/PriceWatch-BrSmVRsV.js +++ b/static/assets/PriceWatch-nQDi2og7.js @@ -1,4 +1,4 @@ -import{c as A,r as n,bO as oe,bP as me,j as e,bQ as X,e as M,X as q,bR as xe,aE as pe,bS as he,bT as ue,bU as be,bV as je,bW as ge,bX as ve}from"./index-BCb9Ylky.js";import{P as Q,a as ye,N as E,E as U}from"./ui-DcVZvy8T.js";import{P as Ne}from"./plus-DVdQwMrj.js";import{P as _e}from"./play-IOsY5Rdt.js";import{P as fe}from"./pen-line-CudbazBc.js";import{T as we}from"./trash-2-D-oW6aaO.js";import{S as V}from"./search-DAVBnJPC.js";/** +import{c as A,r as n,bQ as oe,bR as me,j as e,bS as X,e as M,X as q,bT as xe,aE as pe,bU as he,bV as ue,bW as be,bX as je,bY as ge,bZ as ve}from"./index-BZnqBmwp.js";import{P as Q,a as ye,N as E,E as U}from"./ui-B9Jzqjf7.js";import{P as Ne}from"./plus-BljRK6L8.js";import{P as _e}from"./play-P9T6ppIo.js";import{P as fe}from"./pen-line-CmEoWNKp.js";import{T as we}from"./trash-2-CmT2n80I.js";import{S as V}from"./search-FaxHcuoK.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. @@ -13,4 +13,4 @@ import{c as A,r as n,bO as oe,bP as me,j as e,bQ as X,e as M,X as q,bR as xe,aE * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],$e=A("history",Pe),Me=2500,x=t=>t==null?"—":`¥${Number(t).toLocaleString("zh-CN",{maximumFractionDigits:2})}`,I=()=>Math.floor(Date.now()/1e3),L=t=>{if(!t||t<=0)return"—";const i=Math.floor(t);return i<60?`${i} 秒前`:i<3600?`${Math.floor(i/60)} 分钟前`:i<86400?`${Math.floor(i/3600)} 小时前`:`${Math.floor(i/86400)} 天前`},Ee=t=>t==null||t<0?"已停用":t<60?`${Math.max(0,Math.round(t))} 秒后`:t<3600?`${Math.floor(t/60)} 分钟后`:`${Math.floor(t/3600)} 小时后`,k=t=>{const i=t.trim();if(i==="")return null;const h=Number(i);return Number.isFinite(h)&&h>=0?h:null},J={name:"",keyword:"",min_price:"",max_price:"",target_price:"",interval_minutes:"30",pages:"2",enabled:!0,cookie_id:"",min_seller_credit:"",min_seller_deals:"",ai_precise:!1},Re=t=>({name:t.name,keyword:t.keyword,min_price:t.min_price===null?"":String(t.min_price),max_price:t.max_price===null?"":String(t.max_price),target_price:t.target_price===null?"":String(t.target_price),interval_minutes:String(t.interval_minutes),pages:String(t.pages||2),enabled:t.enabled!==!1,cookie_id:t.cookie_id||"",min_seller_credit:t.min_seller_credit||"",min_seller_deals:t.min_seller_deals!=null?String(t.min_seller_deals):"",ai_precise:!!t.ai_precise}),Z=t=>{const i=t.keyword.trim();if(!i)return{input:null,error:"请填写搜索关键词"};const h=t.name.trim()||i,v=k(t.min_price),m=k(t.max_price);if(v!==null&&m!==null&&v>m)return{input:null,error:"最低价不能大于最高价"};const g=k(t.target_price);if(g!==null&&m!==null&&g>m)return{input:null,error:"目标价不能高于最高价"};const u=Number(t.interval_minutes);if(!Number.isFinite(u)||u<5)return{input:null,error:"检查间隔至少 5 分钟"};const c=Number(t.pages);return!Number.isFinite(c)||c<1||c>5?{input:null,error:"每轮页数取 1~5"}:{input:{name:h,keyword:i,min_price:v,max_price:m,target_price:g,interval_minutes:Math.round(u),pages:Math.round(c),enabled:t.enabled,cookie_id:t.cookie_id||null,min_seller_credit:t.min_seller_credit||null,min_seller_deals:k(t.min_seller_deals),ai_precise:t.ai_precise}}};function He(){const[t,i]=n.useState([]),[h,v]=n.useState(!0),[m,g]=n.useState(""),[u,c]=n.useState(null),[ee,F]=n.useState([]),[se,y]=n.useState(!1),[N,T]=n.useState(null),[l,d]=n.useState(J),[D,O]=n.useState(!1),[H,_]=n.useState(""),[C,B]=n.useState(!1),[o,f]=n.useState(null),[Y,b]=n.useState(""),[S,z]=n.useState(null),[G,P]=n.useState([]),[te,K]=n.useState(!1),w=n.useRef(new Set),p=n.useCallback(async()=>{try{const r=(await oe()).rules??[];i(r),g("");const a=new Set;for(const j of r)j.running&&a.add(j.id);const $=[...w.current].filter(j=>!a.has(j));w.current=a,$.length&&p()}catch(s){g(s instanceof Error?s.message:"加载失败")}finally{v(!1)}},[]);n.useEffect(()=>{p(),me().then(r=>F(r.cookies??[])).catch(()=>F([]));const s=setInterval(()=>void p(),Me);return()=>clearInterval(s)},[p]);const ae=()=>{T(null),d(J),f(null),b(""),_(""),y(!0)},re=s=>{T(s.id),d(Re(s)),f(null),b(""),_(""),y(!0)},le=async()=>{const{input:s,error:r}=Z(l);if(!s){b(r??"参数有误");return}B(!0),b(""),f(null);try{const a=await he({keyword:s.keyword,min_price:s.min_price,max_price:s.max_price,pages:s.pages,cookie_id:s.cookie_id,min_seller_credit:s.min_seller_credit,min_seller_deals:s.min_seller_deals,ai_precise:s.ai_precise});f(a),a.error?b(a.error):a.lowest||b("没搜到符合条件的商品,换个关键词或放宽价格区间试试")}catch(a){b(a instanceof Error?a.message:"试搜失败")}finally{B(!1)}},ne=async()=>{const{input:s,error:r}=Z(l);if(!s){_(r??"参数有误");return}O(!0),_("");try{N===null?await ue(s):await be(N,s),y(!1),c({type:"info",message:N===null?"规则已创建,可以立即检查一次":"规则已保存"}),await p()}catch(a){_(a instanceof Error?a.message:"保存失败")}finally{O(!1)}},ie=async s=>{w.current.add(s.id),c(null);try{const r=await je(s.id);if(!r.started)c({type:"info",message:r.message??"任务未启动"});else if(r.record){const a=r.record.lowest_price;a==null?c({type:"warning",message:`「${s.name}」没搜到可比价的商品(已记录一次空结果)`}):r.notified?c({type:"success",message:`已找到最低价 ${x(a)},通知已发送(${r.notify_reason||"命中"})`}):c({type:"info",message:`本次最低价 ${x(a)}(${r.notify_reason||"未触发通知"})`}),r.notify_error&&c({type:"error",message:`通知发送失败:${r.notify_error}`})}}catch(r){c({type:"error",message:r instanceof Error?r.message:"检查失败"})}finally{w.current.delete(s.id),await p()}},ce=async s=>{if(window.confirm(`删除监控规则「${s.name}」?检查历史会一并删除。`))try{await ge(s.id),c({type:"info",message:"规则已删除"}),await p()}catch(r){c({type:"error",message:r instanceof Error?r.message:"删除失败"})}},de=async s=>{z(s),K(!0),P([]);try{const r=await ve(s.id,50);P(r.records??[])}catch{P([])}finally{K(!1)}};return h&&!t.length?e.jsx(Q,{}):e.jsxs("div",{className:"mx-auto max-w-[1600px] space-y-6 px-4 py-5 sm:px-6",children:[e.jsx(ye,{title:"价格监控",description:"填关键词和价格条件,实时搜出最低价并记录;命中目标价自动发通知。",icon:X,actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void p(),className:"ios-btn-secondary rounded-md px-4 py-2","aria-label":"刷新",children:e.jsx(M,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",onClick:ae,className:"ios-btn-primary rounded-md px-4 py-2",children:[e.jsx(Ne,{className:"mr-1.5 inline h-4 w-4"}),"新建监控规则"]})]})}),e.jsx(E,{type:"info",message:"「最低价」按搜索结果本地排序得出(闲鱼搜索接口不返回销量)。为避免触发风控,所有规则共用串行队列、两次搜索固定间隔 1 秒,请把检查间隔设得宽松些,建议不低于 15 分钟。"}),u&&e.jsx(E,{type:u.type,message:u.message,onClose:()=>c(null)}),m&&e.jsx(E,{type:"error",message:`加载失败:${m}`}),!t.length&&!m?e.jsx(U,{title:"还没有监控规则",description:"点「新建监控规则」,填关键词与价格条件后即可实时搜到最低价。",icon:R}):e.jsx("div",{className:"overflow-hidden rounded-lg border border-[var(--border-light)] bg-[var(--surface)] shadow-sm",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table min-w-[1100px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[20%]",children:"规则"}),e.jsx("th",{className:"w-[17%]",children:"条件"}),e.jsx("th",{className:"w-[22%]",children:"最近一次"}),e.jsx("th",{className:"w-[13%]",children:"下次检查"}),e.jsx("th",{className:"w-[11%]",children:"进度"}),e.jsx("th",{className:"w-[17%] text-right",children:"操作"})]})}),e.jsx("tbody",{children:t.map(s=>{var j,W;const r=s.running,a=s.last_record,$=a!=null&&a.lowest_price!==null&&a.lowest_price!==void 0;return e.jsxs("tr",{children:[e.jsx("td",{"data-label":"规则",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"break-words font-medium text-[var(--text-primary)]",title:s.name,children:s.name}),e.jsxs("div",{className:"break-words text-xs text-[var(--text-muted)]",title:s.keyword,children:["关键词:",s.keyword]}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs",children:[e.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 ${s.enabled?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:s.enabled?"运行中":"已停用"}),e.jsxs("span",{className:"text-[var(--text-muted)]",children:["每 ",s.interval_minutes," 分钟"]})]})]})}),e.jsx("td",{"data-label":"条件",children:e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[e.jsxs("div",{children:[s.min_price===null?"不限":x(s.min_price)," ~ ",s.max_price===null?"不限":x(s.max_price)]}),e.jsx("div",{className:s.target_price!==null?"text-[var(--brand-primary)]":"text-[var(--text-muted)]",children:s.target_price!==null?`目标价 ${x(s.target_price)}`:"新低价即通知"}),(s.min_seller_credit||s.min_seller_deals!=null||s.ai_precise)&&e.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[s.min_seller_credit&&e.jsxs("span",{className:"rounded bg-slate-100 px-1.5 py-0.5 text-[11px] text-slate-600",children:["信用≥",s.min_seller_credit]}),s.min_seller_deals!=null&&e.jsxs("span",{className:"rounded bg-slate-100 px-1.5 py-0.5 text-[11px] text-slate-600",children:["销量≥",s.min_seller_deals]}),s.ai_precise&&e.jsx("span",{className:"rounded bg-indigo-100 px-1.5 py-0.5 text-[11px] text-indigo-700",children:"AI 精准"})]}),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:["每轮 ",s.pages," 页 · 历史 ",s.history_count," 条"]})]})}),e.jsx("td",{"data-label":"最近一次",children:a?a.error?e.jsxs("span",{className:"text-sm text-amber-600",title:a.error,children:["上次出错:",a.error.slice(0,24)]}):$?e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-emerald-600",children:[e.jsx(X,{className:"h-3.5 w-3.5 shrink-0"}),x(a.lowest_price),a.notified?e.jsx(R,{className:"h-3 w-3 text-[var(--brand-primary)]","aria-label":"已通知"}):null]}),e.jsx("div",{className:"break-words text-xs text-[var(--text-muted)]",title:a.lowest_title??"",children:a.lowest_title}),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:[L(I()-a.checked_at)," · 比价 ",a.item_count," 件",a.source==="auto"?" · 自动":""]})]}):e.jsxs("span",{className:"text-sm text-[var(--text-muted)]",children:["没搜到可比价商品 · ",L(I()-a.checked_at)]}):e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"还没检查过"})}),e.jsx("td",{"data-label":"下次检查",children:e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[r?"检查中…":Ee(s.next_run_in),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:["上次"," ",s.last_run_at?L(I()-s.last_run_at):"—"]})]})}),e.jsx("td",{"data-label":"进度",children:r?e.jsxs("div",{className:"text-xs text-[var(--text-secondary)]",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(M,{className:"h-3 w-3 animate-spin"}),s.progress?`${s.progress.done}/${s.progress.total}`:"启动中"]}),((j=s.progress)==null?void 0:j.keyword)&&e.jsx("div",{className:"truncate text-[var(--text-muted)]",title:s.progress.keyword,children:s.progress.keyword}),((W=s.progress)==null?void 0:W.error)&&e.jsx("div",{className:"text-amber-600",children:s.progress.error.slice(0,20)})]}):e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.manual_cooldown_remaining>0?`手动冷却 ${Math.ceil(s.manual_cooldown_remaining)}s`:"空闲"})}),e.jsx("td",{"data-label":"操作",children:e.jsxs("div",{className:"flex flex-wrap justify-end gap-1.5",children:[e.jsxs("button",{type:"button",onClick:()=>void ie(s),disabled:r||s.manual_cooldown_remaining>0,className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs disabled:opacity-50",title:s.manual_cooldown_remaining>0?"手动检查冷却中":"立即搜索一次",children:[e.jsx(_e,{className:"h-3.5 w-3.5"}),"立即检查"]}),e.jsxs("button",{type:"button",onClick:()=>void de(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs",children:[e.jsx($e,{className:"h-3.5 w-3.5"}),"历史"]}),e.jsxs("button",{type:"button",onClick:()=>re(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),"编辑"]}),e.jsxs("button",{type:"button",onClick:()=>void ce(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs text-rose-600 hover:bg-rose-50",children:[e.jsx(we,{className:"h-3.5 w-3.5"}),"删除"]})]})})]},s.id)})})]})})}),t.some(s=>s.running)&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-[var(--text-muted)]",children:[e.jsx(M,{className:"h-4 w-4 animate-spin"}),"有规则正在检查,结果会自动刷新。"]}),se&&e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"监控规则",children:e.jsxs("div",{className:"modal-container max-h-[92vh] w-full max-w-[680px] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border-light)] px-6 py-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:N===null?"新建监控规则":"编辑监控规则"}),e.jsx("button",{type:"button",onClick:()=>y(!1),className:"rounded-full p-1.5 text-[var(--text-muted)] hover:bg-slate-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"space-y-4 px-6 py-5",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"规则名称"}),e.jsx("input",{type:"text",value:l.name,onChange:s=>d({...l,name:s.target.value}),placeholder:"留空则用关键词",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"搜索关键词 *"}),e.jsx("input",{type:"text",value:l.keyword,onChange:s=>d({...l,keyword:s.target.value}),placeholder:"如 iPhone 15",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"最低价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.min_price,onChange:s=>d({...l,min_price:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"最高价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.max_price,onChange:s=>d({...l,max_price:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"目标价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.target_price,onChange:s=>d({...l,target_price:s.target.value}),placeholder:"留空=新低价即通知",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsx("p",{className:"-mt-2 text-xs text-[var(--text-muted)]",children:"目标价留空时,只要比上次低就通知;填了则要低于等于目标价才通知。"}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"卖家信用度"}),e.jsxs("select",{value:l.min_seller_credit,onChange:s=>d({...l,min_seller_credit:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"不限(含未标注信用的卖家)"}),e.jsx("option",{value:"极好",children:"「极好」及以上"}),e.jsx("option",{value:"优秀",children:"「优秀」及以上"}),e.jsx("option",{value:"良好",children:"「良好」及以上"})]})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"卖家销量下限(条评价)"}),e.jsx("input",{type:"number",min:"0",step:"1",value:l.min_seller_deals,onChange:s=>d({...l,min_seller_deals:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("p",{className:"-mt-1 text-xs text-[var(--text-muted)]",children:[e.jsx("b",{children:"销量"}),":闲鱼是单件二手成交、没有商品级销量,这里按卖家的「N 条评价」 累计量筛(如「126 条评价」≈ 该卖家已成交 126 单,越大越靠谱)—— 实测每条商品",e.jsx("b",{children:"都能取到"}),",放心用。",e.jsx("br",{}),e.jsx("b",{children:"信用度"}),":取自搜索结果的「卖家信用极好 / 优秀」标签,",e.jsx("b",{children:"但闲鱼只给部分卖家显示该标签"}),"(实测同类商品可能 0~3 条有标注),",e.jsx("b",{children:"选了具体等级后,未标注的卖家会被排除"}),",结果可能明显变少甚至为空—— 这是数据本身的限制,不是故障;建议先点下方「实时试搜」确认数量再保存, 拿不准就选「不限」。"]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"检查间隔(分钟)"}),e.jsx("input",{type:"number",min:"5",step:"1",value:l.interval_minutes,onChange:s=>d({...l,interval_minutes:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"每轮页数"}),e.jsx("input",{type:"number",min:"1",max:"5",step:"1",value:l.pages,onChange:s=>d({...l,pages:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"搜索账号"}),e.jsxs("select",{value:l.cookie_id,onChange:s=>d({...l,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"自动选择"}),ee.map(s=>e.jsxs("option",{value:s.id,children:["账号 ",s.id]},s.id))]})]})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:l.enabled,onChange:s=>d({...l,enabled:s.target.checked}),className:"h-4 w-4 rounded border-slate-300"}),"启用自动检查(按间隔后台运行)"]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:l.ai_precise,onChange:s=>d({...l,ai_precise:s.target.checked}),className:"h-4 w-4 rounded border-slate-300"}),e.jsxs("span",{children:["启用 ",e.jsx("b",{className:"text-indigo-600",children:"AI 精准监控"}),e.jsx("span",{className:"ml-1 text-xs text-[var(--text-muted)]",children:"(大模型逐条判断商品是否真的匹配关键词)"})]})]}),l.ai_precise&&e.jsxs("div",{className:"rounded-lg border border-indigo-200 bg-indigo-50/70 p-3.5 text-xs leading-relaxed text-indigo-950",children:[e.jsx("div",{className:"mb-2 font-semibold text-indigo-700",children:"启用 AI 有什么好处?"}),e.jsxs("ul",{className:"list-disc space-y-1.5 pl-4",children:[e.jsxs("li",{children:[e.jsx("b",{children:"过滤标题党与无关商品"}),":关键词命中标题但实际不卖这个的直接剔除, 通知里不再混进一堆看似相关、点进去却对不上的结果。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"识别真实规格与成色"}),":分清 128G / 256G、有锁 / 国行、全新 / 骗修, 避免「假低价」——便宜那台其实是另一个规格,比价才准。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"排除风险商品"}),":描述前后矛盾、疑似引流或诈骗话术的商品不进入比价。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"通知更精准、少打扰"}),":只有通过判断的商品参与「新低价」比较, 你收到的每条降价提醒都是真值得点的。"]})]}),e.jsxs("div",{className:"mt-2.5 border-t border-indigo-200 pt-2 text-[11px] text-indigo-800",children:[e.jsx("b",{children:"成本与兜底"}),":每轮对前 20 条商品",e.jsx("b",{children:"批量调用一次"}),"大模型 (走「AI 优化建议」里已配置的模型 KEY,约增加几秒延迟);",e.jsx("b",{children:"未配置 KEY 或调用失败会自动跳过并保留全部结果"}),"——AI 挂了监控照常跑, 宁可多报也不漏报。"]})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border-light)] bg-slate-50 p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"text-sm font-medium text-[var(--text-secondary)]",children:[e.jsx(V,{className:"mr-1.5 inline h-4 w-4"}),"实时试搜(不保存、不通知)"]}),e.jsxs("button",{type:"button",onClick:()=>void le(),disabled:C,className:"ios-btn-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-2 text-sm disabled:opacity-50",children:[e.jsx(V,{className:`h-4 w-4 ${C?"animate-pulse":""}`}),C?"搜索中…":"搜索最低价"]})]}),Y&&e.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-md bg-amber-50 px-3 py-2 text-sm text-amber-700",children:[e.jsx(xe,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("span",{children:Y})]}),(o==null?void 0:o.lowest)&&e.jsxs("div",{className:"mb-3 rounded-md border border-emerald-200 bg-emerald-50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-700",children:[e.jsx(pe,{className:"h-4 w-4"}),"当前最低价 ",x(o.lowest.price_value)]}),e.jsx("a",{href:o.lowest.url,target:"_blank",rel:"noreferrer",className:"shrink-0 text-xs text-[var(--brand-primary)] hover:underline",children:"查看商品"})]}),e.jsx("div",{className:"mt-1 line-clamp-2 text-sm text-emerald-900/80",children:o.lowest.title}),e.jsxs("div",{className:"mt-1 text-xs text-emerald-700/70",children:["参与比价 ",o.matched," / ",o.count," 件",o.ai_note?` · ${o.ai_note}`:""]})]}),o&&o.items.length>0&&e.jsx("div",{className:"max-h-[220px] space-y-1.5 overflow-y-auto",children:o.items.slice(0,8).map((s,r)=>e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer",className:"flex items-center justify-between gap-3 rounded-md bg-white px-3 py-2 text-sm hover:bg-slate-100",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate text-[var(--text-secondary)]",children:s.title}),e.jsx("span",{className:"shrink-0 font-medium text-emerald-600",children:x(s.price_value)})]},s.item_id||r))})]}),H&&e.jsx("div",{className:"text-sm text-rose-600",children:H})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-3 border-t border-[var(--border-light)] px-6 py-4",children:[e.jsx("button",{type:"button",onClick:()=>y(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsx("button",{type:"button",onClick:()=>void ne(),disabled:D,className:"ios-btn-primary rounded-md px-4 py-2.5 disabled:opacity-50",children:D?"保存中…":N===null?"创建规则":"保存修改"})]})]})}),S&&e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"检查历史",children:e.jsxs("div",{className:"modal-container max-h-[90vh] w-full max-w-[980px] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border-light)] px-6 py-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:["检查历史 · ",S.name]}),e.jsxs("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:["关键词「",S.keyword,"」,保留最近 100 次"]})]}),e.jsx("button",{type:"button",onClick:()=>z(null),className:"rounded-full p-1.5 text-[var(--text-muted)] hover:bg-slate-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsx("div",{className:"px-6 py-5",children:te?e.jsx(Q,{}):G.length?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table min-w-[760px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[18%]",children:"时间"}),e.jsx("th",{className:"w-[12%]",children:"最低价"}),e.jsx("th",{children:"商品"}),e.jsx("th",{className:"w-[10%]",children:"比价数"}),e.jsx("th",{className:"w-[16%]",children:"结果"})]})}),e.jsx("tbody",{children:G.map(s=>e.jsxs("tr",{children:[e.jsxs("td",{"data-label":"时间",children:[e.jsx("div",{className:"text-sm text-[var(--text-secondary)]",children:new Date(s.checked_at*1e3).toLocaleString("zh-CN",{hour12:!1})}),e.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:s.source==="auto"?"自动":"手动"})]}),e.jsx("td",{"data-label":"最低价",children:s.lowest_price===null||s.lowest_price===void 0?e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"—"}):e.jsx("span",{className:"font-semibold text-emerald-600",children:x(s.lowest_price)})}),e.jsx("td",{"data-label":"商品",children:s.lowest_url?e.jsx("a",{href:s.lowest_url,target:"_blank",rel:"noreferrer",className:"block max-w-[380px] break-words text-sm text-[var(--brand-primary)] hover:underline",title:s.lowest_title??"",children:s.lowest_title||"(无标题)"}):e.jsx("span",{className:"block max-w-[380px] break-words text-sm text-[var(--text-muted)]",children:s.lowest_title||"—"})}),e.jsx("td",{"data-label":"比价数",children:e.jsxs("span",{className:"text-sm text-[var(--text-secondary)]",children:[s.item_count," 件"]})}),e.jsx("td",{"data-label":"结果",children:s.error?e.jsxs("span",{className:"text-xs text-amber-600",title:s.error,children:["出错:",s.error.slice(0,18)]}):s.lowest_price===null||s.lowest_price===void 0?e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"无可比价商品"}):e.jsx("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs ${s.notified?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:s.notified?e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-3 w-3"}),"已通知"]}):"已记录"})})]},s.id))})]})}):e.jsx(U,{title:"还没有检查记录",description:"点规则右侧的「立即检查」跑一次。",icon:Se})})]})})]})}export{He as default}; + */const $e=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Pe=A("history",$e),Me=2500,x=t=>t==null?"—":`¥${Number(t).toLocaleString("zh-CN",{maximumFractionDigits:2})}`,I=()=>Math.floor(Date.now()/1e3),L=t=>{if(!t||t<=0)return"—";const i=Math.floor(t);return i<60?`${i} 秒前`:i<3600?`${Math.floor(i/60)} 分钟前`:i<86400?`${Math.floor(i/3600)} 小时前`:`${Math.floor(i/86400)} 天前`},Ee=t=>t==null||t<0?"已停用":t<60?`${Math.max(0,Math.round(t))} 秒后`:t<3600?`${Math.floor(t/60)} 分钟后`:`${Math.floor(t/3600)} 小时后`,k=t=>{const i=t.trim();if(i==="")return null;const h=Number(i);return Number.isFinite(h)&&h>=0?h:null},Z={name:"",keyword:"",min_price:"",max_price:"",target_price:"",interval_minutes:"30",pages:"2",enabled:!0,cookie_id:"",min_seller_credit:"",min_seller_deals:"",ai_precise:!1},Re=t=>({name:t.name,keyword:t.keyword,min_price:t.min_price===null?"":String(t.min_price),max_price:t.max_price===null?"":String(t.max_price),target_price:t.target_price===null?"":String(t.target_price),interval_minutes:String(t.interval_minutes),pages:String(t.pages||2),enabled:t.enabled!==!1,cookie_id:t.cookie_id||"",min_seller_credit:t.min_seller_credit||"",min_seller_deals:t.min_seller_deals!=null?String(t.min_seller_deals):"",ai_precise:!!t.ai_precise}),J=t=>{const i=t.keyword.trim();if(!i)return{input:null,error:"请填写搜索关键词"};const h=t.name.trim()||i,v=k(t.min_price),m=k(t.max_price);if(v!==null&&m!==null&&v>m)return{input:null,error:"最低价不能大于最高价"};const g=k(t.target_price);if(g!==null&&m!==null&&g>m)return{input:null,error:"目标价不能高于最高价"};const u=Number(t.interval_minutes);if(!Number.isFinite(u)||u<5)return{input:null,error:"检查间隔至少 5 分钟"};const c=Number(t.pages);return!Number.isFinite(c)||c<1||c>5?{input:null,error:"每轮页数取 1~5"}:{input:{name:h,keyword:i,min_price:v,max_price:m,target_price:g,interval_minutes:Math.round(u),pages:Math.round(c),enabled:t.enabled,cookie_id:t.cookie_id||null,min_seller_credit:t.min_seller_credit||null,min_seller_deals:k(t.min_seller_deals),ai_precise:t.ai_precise}}};function Oe(){const[t,i]=n.useState([]),[h,v]=n.useState(!0),[m,g]=n.useState(""),[u,c]=n.useState(null),[ee,F]=n.useState([]),[se,y]=n.useState(!1),[N,T]=n.useState(null),[l,d]=n.useState(Z),[D,H]=n.useState(!1),[O,_]=n.useState(""),[C,Y]=n.useState(!1),[o,f]=n.useState(null),[B,b]=n.useState(""),[S,z]=n.useState(null),[G,$]=n.useState([]),[te,K]=n.useState(!1),w=n.useRef(new Set),p=n.useCallback(async()=>{try{const r=(await oe()).rules??[];i(r),g("");const a=new Set;for(const j of r)j.running&&a.add(j.id);const P=[...w.current].filter(j=>!a.has(j));w.current=a,P.length&&p()}catch(s){g(s instanceof Error?s.message:"加载失败")}finally{v(!1)}},[]);n.useEffect(()=>{p(),me().then(r=>F(r.cookies??[])).catch(()=>F([]));const s=setInterval(()=>void p(),Me);return()=>clearInterval(s)},[p]);const ae=()=>{T(null),d(Z),f(null),b(""),_(""),y(!0)},re=s=>{T(s.id),d(Re(s)),f(null),b(""),_(""),y(!0)},le=async()=>{const{input:s,error:r}=J(l);if(!s){b(r??"参数有误");return}Y(!0),b(""),f(null);try{const a=await he({keyword:s.keyword,min_price:s.min_price,max_price:s.max_price,pages:s.pages,cookie_id:s.cookie_id,min_seller_credit:s.min_seller_credit,min_seller_deals:s.min_seller_deals,ai_precise:s.ai_precise});f(a),a.error?b(a.error):a.lowest||b("没搜到符合条件的商品,换个关键词或放宽价格区间试试")}catch(a){b(a instanceof Error?a.message:"试搜失败")}finally{Y(!1)}},ne=async()=>{const{input:s,error:r}=J(l);if(!s){_(r??"参数有误");return}H(!0),_("");try{N===null?await ue(s):await be(N,s),y(!1),c({type:"info",message:N===null?"规则已创建,可以立即检查一次":"规则已保存"}),await p()}catch(a){_(a instanceof Error?a.message:"保存失败")}finally{H(!1)}},ie=async s=>{w.current.add(s.id),c(null);try{const r=await je(s.id);if(!r.started)c({type:"info",message:r.message??"任务未启动"});else if(r.record){const a=r.record.lowest_price;a==null?c({type:"warning",message:`「${s.name}」没搜到可比价的商品(已记录一次空结果)`}):r.notified?c({type:"success",message:`已找到最低价 ${x(a)},通知已发送(${r.notify_reason||"命中"})`}):c({type:"info",message:`本次最低价 ${x(a)}(${r.notify_reason||"未触发通知"})`}),r.notify_error&&c({type:"error",message:`通知发送失败:${r.notify_error}`})}}catch(r){c({type:"error",message:r instanceof Error?r.message:"检查失败"})}finally{w.current.delete(s.id),await p()}},ce=async s=>{if(window.confirm(`删除监控规则「${s.name}」?检查历史会一并删除。`))try{await ge(s.id),c({type:"info",message:"规则已删除"}),await p()}catch(r){c({type:"error",message:r instanceof Error?r.message:"删除失败"})}},de=async s=>{z(s),K(!0),$([]);try{const r=await ve(s.id,50);$(r.records??[])}catch{$([])}finally{K(!1)}};return h&&!t.length?e.jsx(Q,{}):e.jsxs("div",{className:"mx-auto max-w-[1600px] space-y-6 px-4 py-5 sm:px-6",children:[e.jsx(ye,{title:"价格监控",description:"填关键词和价格条件,实时搜出最低价并记录;命中目标价自动发通知。",icon:X,actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void p(),className:"ios-btn-secondary rounded-md px-4 py-2","aria-label":"刷新",children:e.jsx(M,{className:"h-4 w-4"})}),e.jsxs("button",{type:"button",onClick:ae,className:"ios-btn-primary rounded-md px-4 py-2",children:[e.jsx(Ne,{className:"mr-1.5 inline h-4 w-4"}),"新建监控规则"]})]})}),e.jsx(E,{type:"info",message:"「最低价」按搜索结果本地排序得出(闲鱼搜索接口不返回销量)。为避免触发风控,所有规则共用串行队列、两次搜索固定间隔 1 秒,请把检查间隔设得宽松些,建议不低于 15 分钟。"}),u&&e.jsx(E,{type:u.type,message:u.message,onClose:()=>c(null)}),m&&e.jsx(E,{type:"error",message:`加载失败:${m}`}),!t.length&&!m?e.jsx(U,{title:"还没有监控规则",description:"点「新建监控规则」,填关键词与价格条件后即可实时搜到最低价。",icon:R}):e.jsx("div",{className:"overflow-hidden rounded-lg border border-[var(--border-light)] bg-[var(--surface)] shadow-sm",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table min-w-[1100px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[20%]",children:"规则"}),e.jsx("th",{className:"w-[17%]",children:"条件"}),e.jsx("th",{className:"w-[22%]",children:"最近一次"}),e.jsx("th",{className:"w-[13%]",children:"下次检查"}),e.jsx("th",{className:"w-[11%]",children:"进度"}),e.jsx("th",{className:"w-[17%] text-right",children:"操作"})]})}),e.jsx("tbody",{children:t.map(s=>{var j,W;const r=s.running,a=s.last_record,P=a!=null&&a.lowest_price!==null&&a.lowest_price!==void 0;return e.jsxs("tr",{children:[e.jsx("td",{"data-label":"规则",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"break-words font-medium text-[var(--text-primary)]",title:s.name,children:s.name}),e.jsxs("div",{className:"break-words text-xs text-[var(--text-muted)]",title:s.keyword,children:["关键词:",s.keyword]}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs",children:[e.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 ${s.enabled?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:s.enabled?"运行中":"已停用"}),e.jsxs("span",{className:"text-[var(--text-muted)]",children:["每 ",s.interval_minutes," 分钟"]})]})]})}),e.jsx("td",{"data-label":"条件",children:e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[e.jsxs("div",{children:[s.min_price===null?"不限":x(s.min_price)," ~ ",s.max_price===null?"不限":x(s.max_price)]}),e.jsx("div",{className:s.target_price!==null?"text-[var(--brand-primary)]":"text-[var(--text-muted)]",children:s.target_price!==null?`目标价 ${x(s.target_price)}`:"新低价即通知"}),(s.min_seller_credit||s.min_seller_deals!=null||s.ai_precise)&&e.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[s.min_seller_credit&&e.jsxs("span",{className:"rounded bg-slate-100 px-1.5 py-0.5 text-[11px] text-slate-600",children:["信用≥",s.min_seller_credit]}),s.min_seller_deals!=null&&e.jsxs("span",{className:"rounded bg-slate-100 px-1.5 py-0.5 text-[11px] text-slate-600",children:["销量≥",s.min_seller_deals]}),s.ai_precise&&e.jsx("span",{className:"rounded bg-indigo-100 px-1.5 py-0.5 text-[11px] text-indigo-700",children:"AI 精准"})]}),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:["每轮 ",s.pages," 页 · 历史 ",s.history_count," 条"]})]})}),e.jsx("td",{"data-label":"最近一次",children:a?a.error?e.jsxs("span",{className:"text-sm text-amber-600",title:a.error,children:["上次出错:",a.error.slice(0,24)]}):P?e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-emerald-600",children:[e.jsx(X,{className:"h-3.5 w-3.5 shrink-0"}),x(a.lowest_price),a.notified?e.jsx(R,{className:"h-3 w-3 text-[var(--brand-primary)]","aria-label":"已通知"}):null]}),e.jsx("div",{className:"break-words text-xs text-[var(--text-muted)]",title:a.lowest_title??"",children:a.lowest_title}),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:[L(I()-a.checked_at)," · 比价 ",a.item_count," 件",a.source==="auto"?" · 自动":""]})]}):e.jsxs("span",{className:"text-sm text-[var(--text-muted)]",children:["没搜到可比价商品 · ",L(I()-a.checked_at)]}):e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"还没检查过"})}),e.jsx("td",{"data-label":"下次检查",children:e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[r?"检查中…":Ee(s.next_run_in),e.jsxs("div",{className:"text-xs text-[var(--text-muted)]",children:["上次"," ",s.last_run_at?L(I()-s.last_run_at):"—"]})]})}),e.jsx("td",{"data-label":"进度",children:r?e.jsxs("div",{className:"text-xs text-[var(--text-secondary)]",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(M,{className:"h-3 w-3 animate-spin"}),s.progress?`${s.progress.done}/${s.progress.total}`:"启动中"]}),((j=s.progress)==null?void 0:j.keyword)&&e.jsx("div",{className:"truncate text-[var(--text-muted)]",title:s.progress.keyword,children:s.progress.keyword}),((W=s.progress)==null?void 0:W.error)&&e.jsx("div",{className:"text-amber-600",children:s.progress.error.slice(0,20)})]}):e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:s.manual_cooldown_remaining>0?`手动冷却 ${Math.ceil(s.manual_cooldown_remaining)}s`:"空闲"})}),e.jsx("td",{"data-label":"操作",children:e.jsxs("div",{className:"flex flex-wrap justify-end gap-1.5",children:[e.jsxs("button",{type:"button",onClick:()=>void ie(s),disabled:r||s.manual_cooldown_remaining>0,className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs disabled:opacity-50",title:s.manual_cooldown_remaining>0?"手动检查冷却中":"立即搜索一次",children:[e.jsx(_e,{className:"h-3.5 w-3.5"}),"立即检查"]}),e.jsxs("button",{type:"button",onClick:()=>void de(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs",children:[e.jsx(Pe,{className:"h-3.5 w-3.5"}),"历史"]}),e.jsxs("button",{type:"button",onClick:()=>re(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),"编辑"]}),e.jsxs("button",{type:"button",onClick:()=>void ce(s),className:"ios-btn-secondary inline-flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs text-rose-600 hover:bg-rose-50",children:[e.jsx(we,{className:"h-3.5 w-3.5"}),"删除"]})]})})]},s.id)})})]})})}),t.some(s=>s.running)&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-[var(--text-muted)]",children:[e.jsx(M,{className:"h-4 w-4 animate-spin"}),"有规则正在检查,结果会自动刷新。"]}),se&&e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"监控规则",children:e.jsxs("div",{className:"modal-container max-h-[92vh] w-full max-w-[680px] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border-light)] px-6 py-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:N===null?"新建监控规则":"编辑监控规则"}),e.jsx("button",{type:"button",onClick:()=>y(!1),className:"rounded-full p-1.5 text-[var(--text-muted)] hover:bg-slate-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"space-y-4 px-6 py-5",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"规则名称"}),e.jsx("input",{type:"text",value:l.name,onChange:s=>d({...l,name:s.target.value}),placeholder:"留空则用关键词",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"搜索关键词 *"}),e.jsx("input",{type:"text",value:l.keyword,onChange:s=>d({...l,keyword:s.target.value}),placeholder:"如 iPhone 15",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"最低价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.min_price,onChange:s=>d({...l,min_price:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"最高价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.max_price,onChange:s=>d({...l,max_price:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"目标价(元)"}),e.jsx("input",{type:"number",min:"0",step:"1",inputMode:"decimal",value:l.target_price,onChange:s=>d({...l,target_price:s.target.value}),placeholder:"留空=新低价即通知",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsx("p",{className:"-mt-2 text-xs text-[var(--text-muted)]",children:"目标价留空时,只要比上次低就通知;填了则要低于等于目标价才通知。"}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"卖家信用度"}),e.jsxs("select",{value:l.min_seller_credit,onChange:s=>d({...l,min_seller_credit:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"不限(含未标注信用的卖家)"}),e.jsx("option",{value:"极好",children:"「极好」及以上"}),e.jsx("option",{value:"优秀",children:"「优秀」及以上"}),e.jsx("option",{value:"良好",children:"「良好」及以上"})]})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"卖家销量下限(条评价)"}),e.jsx("input",{type:"number",min:"0",step:"1",value:l.min_seller_deals,onChange:s=>d({...l,min_seller_deals:s.target.value}),placeholder:"不限",className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("p",{className:"-mt-1 text-xs text-[var(--text-muted)]",children:[e.jsx("b",{children:"销量"}),":闲鱼是单件二手成交、没有商品级销量,这里按卖家的「N 条评价」 累计量筛(如「126 条评价」≈ 该卖家已成交 126 单,越大越靠谱)—— 实测每条商品",e.jsx("b",{children:"都能取到"}),",放心用。",e.jsx("br",{}),e.jsx("b",{children:"信用度"}),":取自搜索结果的「卖家信用极好 / 优秀」标签,",e.jsx("b",{children:"但闲鱼只给部分卖家显示该标签"}),"(实测同类商品可能 0~3 条有标注),",e.jsx("b",{children:"选了具体等级后,未标注的卖家会被排除"}),",结果可能明显变少甚至为空—— 这是数据本身的限制,不是故障;建议先点下方「实时试搜」确认数量再保存, 拿不准就选「不限」。"]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"检查间隔(分钟)"}),e.jsx("input",{type:"number",min:"5",step:"1",value:l.interval_minutes,onChange:s=>d({...l,interval_minutes:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"每轮页数"}),e.jsx("input",{type:"number",min:"1",max:"5",step:"1",value:l.pages,onChange:s=>d({...l,pages:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5"})]}),e.jsxs("label",{className:"block text-sm",children:[e.jsx("span",{className:"mb-1.5 block font-medium text-[var(--text-secondary)]",children:"搜索账号"}),e.jsxs("select",{value:l.cookie_id,onChange:s=>d({...l,cookie_id:s.target.value}),className:"ios-input w-full rounded-md px-3 py-2.5",children:[e.jsx("option",{value:"",children:"自动选择"}),ee.map(s=>e.jsxs("option",{value:s.id,children:["账号 ",s.id]},s.id))]})]})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:l.enabled,onChange:s=>d({...l,enabled:s.target.checked}),className:"h-4 w-4 rounded border-slate-300"}),"启用自动检查(按间隔后台运行)"]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:l.ai_precise,onChange:s=>d({...l,ai_precise:s.target.checked}),className:"h-4 w-4 rounded border-slate-300"}),e.jsxs("span",{children:["启用 ",e.jsx("b",{className:"text-indigo-600",children:"AI 精准监控"}),e.jsx("span",{className:"ml-1 text-xs text-[var(--text-muted)]",children:"(大模型逐条判断商品是否真的匹配关键词)"})]})]}),l.ai_precise&&e.jsxs("div",{className:"rounded-lg border border-indigo-200 bg-indigo-50/70 p-3.5 text-xs leading-relaxed text-indigo-950",children:[e.jsx("div",{className:"mb-2 font-semibold text-indigo-700",children:"启用 AI 有什么好处?"}),e.jsxs("ul",{className:"list-disc space-y-1.5 pl-4",children:[e.jsxs("li",{children:[e.jsx("b",{children:"过滤标题党与无关商品"}),":关键词命中标题但实际不卖这个的直接剔除, 通知里不再混进一堆看似相关、点进去却对不上的结果。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"识别真实规格与成色"}),":分清 128G / 256G、有锁 / 国行、全新 / 骗修, 避免「假低价」——便宜那台其实是另一个规格,比价才准。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"排除风险商品"}),":描述前后矛盾、疑似引流或诈骗话术的商品不进入比价。"]}),e.jsxs("li",{children:[e.jsx("b",{children:"通知更精准、少打扰"}),":只有通过判断的商品参与「新低价」比较, 你收到的每条降价提醒都是真值得点的。"]})]}),e.jsxs("div",{className:"mt-2.5 border-t border-indigo-200 pt-2 text-[11px] text-indigo-800",children:[e.jsx("b",{children:"成本与兜底"}),":每轮对前 20 条商品",e.jsx("b",{children:"批量调用一次"}),"大模型 (走「AI 优化建议」里已配置的模型 KEY,约增加几秒延迟);",e.jsx("b",{children:"未配置 KEY 或调用失败会自动跳过并保留全部结果"}),"——AI 挂了监控照常跑, 宁可多报也不漏报。"]})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border-light)] bg-slate-50 p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"text-sm font-medium text-[var(--text-secondary)]",children:[e.jsx(V,{className:"mr-1.5 inline h-4 w-4"}),"实时试搜(不保存、不通知)"]}),e.jsxs("button",{type:"button",onClick:()=>void le(),disabled:C,className:"ios-btn-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-2 text-sm disabled:opacity-50",children:[e.jsx(V,{className:`h-4 w-4 ${C?"animate-pulse":""}`}),C?"搜索中…":"搜索最低价"]})]}),B&&e.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-md bg-amber-50 px-3 py-2 text-sm text-amber-700",children:[e.jsx(xe,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("span",{children:B})]}),(o==null?void 0:o.lowest)&&e.jsxs("div",{className:"mb-3 rounded-md border border-emerald-200 bg-emerald-50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-700",children:[e.jsx(pe,{className:"h-4 w-4"}),"当前最低价 ",x(o.lowest.price_value)]}),e.jsx("a",{href:o.lowest.url,target:"_blank",rel:"noreferrer",className:"shrink-0 text-xs text-[var(--brand-primary)] hover:underline",children:"查看商品"})]}),e.jsx("div",{className:"mt-1 line-clamp-2 text-sm text-emerald-900/80",children:o.lowest.title}),e.jsxs("div",{className:"mt-1 text-xs text-emerald-700/70",children:["参与比价 ",o.matched," / ",o.count," 件",o.ai_note?` · ${o.ai_note}`:""]})]}),o&&o.items.length>0&&e.jsx("div",{className:"max-h-[220px] space-y-1.5 overflow-y-auto",children:o.items.slice(0,8).map((s,r)=>e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer",className:"flex items-center justify-between gap-3 rounded-md bg-white px-3 py-2 text-sm hover:bg-slate-100",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate text-[var(--text-secondary)]",children:s.title}),e.jsx("span",{className:"shrink-0 font-medium text-emerald-600",children:x(s.price_value)})]},s.item_id||r))})]}),O&&e.jsx("div",{className:"text-sm text-rose-600",children:O})]}),e.jsxs("div",{className:"modal-footer flex justify-end gap-3 border-t border-[var(--border-light)] px-6 py-4",children:[e.jsx("button",{type:"button",onClick:()=>y(!1),className:"ios-btn-secondary rounded-md px-4 py-2.5",children:"取消"}),e.jsx("button",{type:"button",onClick:()=>void ne(),disabled:D,className:"ios-btn-primary rounded-md px-4 py-2.5 disabled:opacity-50",children:D?"保存中…":N===null?"创建规则":"保存修改"})]})]})}),S&&e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"检查历史",children:e.jsxs("div",{className:"modal-container max-h-[90vh] w-full max-w-[980px] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border-light)] px-6 py-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-semibold text-[var(--text-primary)]",children:["检查历史 · ",S.name]}),e.jsxs("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:["关键词「",S.keyword,"」,保留最近 100 次"]})]}),e.jsx("button",{type:"button",onClick:()=>z(null),className:"rounded-full p-1.5 text-[var(--text-muted)] hover:bg-slate-100","aria-label":"关闭",children:e.jsx(q,{className:"h-5 w-5"})})]}),e.jsx("div",{className:"px-6 py-5",children:te?e.jsx(Q,{}):G.length?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"data-table responsive-data-table min-w-[760px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-[18%]",children:"时间"}),e.jsx("th",{className:"w-[12%]",children:"最低价"}),e.jsx("th",{children:"商品"}),e.jsx("th",{className:"w-[10%]",children:"比价数"}),e.jsx("th",{className:"w-[16%]",children:"结果"})]})}),e.jsx("tbody",{children:G.map(s=>e.jsxs("tr",{children:[e.jsxs("td",{"data-label":"时间",children:[e.jsx("div",{className:"text-sm text-[var(--text-secondary)]",children:new Date(s.checked_at*1e3).toLocaleString("zh-CN",{hour12:!1})}),e.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:s.source==="auto"?"自动":"手动"})]}),e.jsx("td",{"data-label":"最低价",children:s.lowest_price===null||s.lowest_price===void 0?e.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"—"}):e.jsx("span",{className:"font-semibold text-emerald-600",children:x(s.lowest_price)})}),e.jsx("td",{"data-label":"商品",children:s.lowest_url?e.jsx("a",{href:s.lowest_url,target:"_blank",rel:"noreferrer",className:"block max-w-[380px] break-words text-sm text-[var(--brand-primary)] hover:underline",title:s.lowest_title??"",children:s.lowest_title||"(无标题)"}):e.jsx("span",{className:"block max-w-[380px] break-words text-sm text-[var(--text-muted)]",children:s.lowest_title||"—"})}),e.jsx("td",{"data-label":"比价数",children:e.jsxs("span",{className:"text-sm text-[var(--text-secondary)]",children:[s.item_count," 件"]})}),e.jsx("td",{"data-label":"结果",children:s.error?e.jsxs("span",{className:"text-xs text-amber-600",title:s.error,children:["出错:",s.error.slice(0,18)]}):s.lowest_price===null||s.lowest_price===void 0?e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"无可比价商品"}):e.jsx("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs ${s.notified?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:s.notified?e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-3 w-3"}),"已通知"]}):"已记录"})})]},s.id))})]})}):e.jsx(U,{title:"还没有检查记录",description:"点规则右侧的「立即检查」跑一次。",icon:Se})})]})})]})}export{Oe as default}; diff --git a/static/assets/ProductAutomation-B-uvMI8m.js b/static/assets/ProductAutomation-MbnRCc-u.js similarity index 98% rename from static/assets/ProductAutomation-B-uvMI8m.js rename to static/assets/ProductAutomation-MbnRCc-u.js index e114a4f..8e38180 100644 --- a/static/assets/ProductAutomation-B-uvMI8m.js +++ b/static/assets/ProductAutomation-MbnRCc-u.js @@ -1,4 +1,4 @@ -import{c as H,r as c,j as e,aA as J,e as ye,S as ge,E as be,L as j,aB as je,aC as _e,aD as Ne,aE as ve,X as O,o as fe,aF as we,aG as ke,aH as Ce,aI as U,n as r,v as E,aJ as $e,aK as Se,aL as Pe,aM as De,aN as Re,aO as Fe,aP as Me,aQ as Le}from"./index-BCb9Ylky.js";import{P as Ie,a as Ae,b as Ee,S as _,E as N,N as ze}from"./ui-DcVZvy8T.js";import{S as C}from"./search-DAVBnJPC.js";import{T as v}from"./trash-2-D-oW6aaO.js";import{S as z}from"./save-cq1qPfv2.js";import{P as X}from"./play-IOsY5Rdt.js";import{P as Te}from"./package-check-CEUjK1hJ.js";import{L as Be}from"./link-2-DIsiJoFB.js";/** +import{c as H,r as c,j as e,aA as J,e as ye,S as ge,E as be,L as j,aB as je,aC as _e,aD as Ne,aE as ve,X as O,o as fe,aF as we,aG as ke,aH as Ce,aI as U,n as r,v as E,aJ as $e,aK as Se,aL as Pe,aM as De,aN as Re,aO as Fe,aP as Me,aQ as Le}from"./index-BZnqBmwp.js";import{P as Ie,a as Ae,b as Ee,S as _,E as N,N as ze}from"./ui-B9Jzqjf7.js";import{S as C}from"./search-FaxHcuoK.js";import{T as v}from"./trash-2-CmT2n80I.js";import{S as z}from"./save-Dxf2dvgb.js";import{P as X}from"./play-P9T6ppIo.js";import{P as Te}from"./package-check-BKkFNxd0.js";import{L as Be}from"./link-2-CTuWzTfU.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/Resell-45XAV9t5.js b/static/assets/Resell-45XAV9t5.js new file mode 100644 index 0000000..f3dbe1b --- /dev/null +++ b/static/assets/Resell-45XAV9t5.js @@ -0,0 +1,6 @@ +import{c as Fe,r,o as Ee,j as e,bG as le,L as g,b as Re,X as ie,E as Ae,bH as $e,bI as Ue,bJ as qe,bK as De,bL as Me,bM as Te}from"./index-BZnqBmwp.js";import{a as ze,N as Be,b as He,E as ne}from"./ui-B9Jzqjf7.js";import{S as F}from"./search-FaxHcuoK.js";import{P as Oe}from"./plus-BljRK6L8.js";import{S as Ke}from"./sparkles-DVlvGI-3.js";import{P as We}from"./package-CDIx-vGO.js";/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ge=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],E=Fe("heart",Ge),Je=["包邮","无需邮寄","一口价","按距离计费"],z=d=>d.url?d.url:!d.item_id||d.item_id.startsWith("mock_")?"":`https://www.goofish.com/item?id=${d.item_id}`,ce=d=>new Promise(k=>{const n=new Image;n.onload=()=>k({width:n.naturalWidth||1e3,height:n.naturalHeight||1e3}),n.onerror=()=>k(null),n.src=d}),oe={title:"",price:"",desc:"",delivery:"包邮",postPrice:"0",quantity:"1"},ss=()=>{const[d,k]=r.useState([]),[n,B]=r.useState(""),[y,de]=r.useState("favorites"),[R,a]=r.useState(null),[S,me]=r.useState([]),[xe,ue]=r.useState(1),[pe,he]=r.useState(!1),[f,H]=r.useState(!1),[j,ge]=r.useState(!1),[_,fe]=r.useState(""),[O,be]=r.useState([]),[A,K]=r.useState(!1),[W,ye]=r.useState(!1),[x,G]=r.useState(null),[h,$]=r.useState(null),[J,V]=r.useState(!1),[c,u]=r.useState(oe),[I,X]=r.useState(!1),[C,U]=r.useState(""),[p,b]=r.useState([]),[Y,q]=r.useState(""),[je,D]=r.useState(!1),[v,L]=r.useState(!1),N=r.useRef(null),M=r.useRef(null),[Q,Z]=r.useState([]),[P,ee]=r.useState(!1),ve=r.useMemo(()=>new Map(d.map(s=>[s.id,s.nickname||s.remark||`账号 ${s.id.substring(0,6)}`])),[d]);r.useEffect(()=>{Ee().then(s=>{const t=s.filter(i=>i.enabled),l=t.length>0?t:s;k(l),B(i=>{var o;return i||((o=l[0])==null?void 0:o.id)||""})}).catch(()=>a({type:"error",message:"账号列表加载失败"}))},[]);const T=async(s=1)=>{if(!n){a({type:"error",message:"请先选择账号"});return}H(!0),a(null);try{const t=await $e(n,s,20),l=t.items||[];me(i=>s===1?l:[...i,...l]),he(!!t.next_page),ue(s),ge(!0),l.length===0&&s===1&&a({type:"error",message:"该账号没有可转卖的有效收藏"})}catch(t){a({type:"error",message:t instanceof Error?t.message:"收藏列表加载失败"})}finally{H(!1)}},se=r.useRef(!1);r.useEffect(()=>{!n||y!=="favorites"||j||f||se.current||(se.current=!0,T(1))},[n,y,j,f]);const te=async()=>{if(!n){a({type:"error",message:"请先选择账号"});return}if(!_.trim()){a({type:"error",message:"请输入搜索关键词"});return}K(!0),a(null);try{const s=await Ue(n,_.trim());be(s.items||[]),ye(!0),(s.items||[]).length===0&&a({type:"error",message:`没有搜到「${_.trim()}」相关商品`})}catch(s){a({type:"error",message:s instanceof Error?s.message:"搜索失败"})}finally{K(!1)}},Ne=s=>{if(p.length<=1){a({type:"error",message:"至少保留一张图片"});return}b(t=>t.filter((l,i)=>i!==s))},we=s=>{s<=0||b(t=>{const l=[...t],[i]=l.splice(s,1);return[i,...l]})},ke=async()=>{const s=Y.trim();if(!v){if(!/^https?:\/\//.test(s)){a({type:"error",message:"请输入以 http(s):// 开头的图片地址"});return}if(p.length>=9){a({type:"error",message:"最多 9 张图片"});return}L(!0);try{const t=await ce(s);if(!t){a({type:"error",message:"该图片地址无法加载(可能防盗链或已失效)"});return}b(l=>[...l,{url:s,...t}].slice(0,9)),q(""),D(!1),a({type:"success",message:"已添加图片"})}finally{L(!1)}}},Se=async(s,t)=>{if(!s||!s.length)return;const l=s[0];L(!0);try{const i=await qe(l),o=new URL(i.path,window.location.origin).href,w=await ce(o);if(!w){a({type:"error",message:"图片上传后无法加载,请重试"});return}if(t!=null)b(m=>m.map((Le,Pe)=>Pe===t?{url:o,...w}:Le)),a({type:"success",message:"图片已替换"});else{if(p.length>=9){a({type:"error",message:"最多 9 张图片"});return}b(m=>[...m,{url:o,...w}].slice(0,9)),a({type:"success",message:"图片已添加"})}/^(https?:\/\/)?(localhost|127\.0\.0\.1|192\.168\.)/.test(window.location.origin)&&a({type:"error",message:"当前访问地址非公网,闲鱼可能无法拉取上传的图片,建议通过公网域名操作"})}catch(i){a({type:"error",message:i instanceof Error?i.message:"图片上传失败"})}finally{L(!1),N.current&&(N.current.value=""),M.current=null}},_e=async()=>{if(!(!x||!n||P)){ee(!0);try{const s=await De({cookie_id:n,title:c.title,description:c.desc});if(!s.success){a({type:"error",message:s.message||"AI 优化失败,请重试"});return}const t=s.titles||[];Z(t),s.description&&s.description!==c.desc&&u(l=>({...l,desc:s.description})),a({type:"success",message:t.length?`AI 已生成 ${t.length} 个候选标题(点击选用),描述已同步优化`:"描述已优化"})}catch(s){a({type:"error",message:s instanceof Error?s.message:"AI 优化失败"})}finally{ee(!1)}}},Ie=async s=>{var t,l;if(!n){a({type:"error",message:"请先选择账号"});return}G(s),$(null),U(""),Z([]),D(!1),q(""),b((t=s.images)!=null&&t.length?s.images.map(i=>({url:i,width:1e3,height:1e3})):s.image?[{url:s.image,width:1e3,height:1e3}]:[]),u({...oe,title:s.title||"",price:(s.price||"").replace(/[^\d.]/g,"")}),V(!0);try{const o=(await Te({cookie_id:n,item_id:s.item_id})).item;$(o),(l=o.images)!=null&&l.length&&b(o.images.map(m=>({url:m.url,width:m.width||1e3,height:m.height||1e3})));const w=o.price!=null?String(o.price):"";u(m=>({...m,title:o.title||m.title,price:w.replace(/[^\d.]/g,"")||m.price,desc:o.desc||"",quantity:String(o.quantity||1)}))}catch(i){a({type:"warning",message:`详情预览失败(${i instanceof Error?i.message:"未知错误"}),可手动补全后发布`})}finally{V(!1)}},ae=()=>{I||(G(null),$(null),U(""))},Ce=async()=>{if(!x||!n)return;const s=Number(c.price);if(!c.title.trim()){a({type:"error",message:"标题不能为空"});return}if(!Number.isFinite(s)||s<=0){a({type:"error",message:"请输入有效的价格"});return}X(!0),a(null);try{const t=await Me({cookie_id:n,item_id:x.item_id,title:c.title.trim(),price:s,desc:c.desc,delivery:c.delivery,post_price:Number(c.postPrice)||0,quantity:Number(c.quantity)||1,images:p.length?p:void 0});U(t.url),a({type:"success",message:`转卖发布成功:${t.title}`})}catch(t){a({type:"error",message:t instanceof Error?t.message:"发布失败"})}finally{X(!1)}},re=s=>{const t=z(s),l=s.image?e.jsx("img",{src:s.image,alt:s.title,className:"h-full w-full object-cover",loading:"lazy"}):e.jsx("div",{className:"flex h-full items-center justify-center text-gray-400",children:e.jsx(We,{className:"h-8 w-8"})}),i=s.area?e.jsx("span",{className:"absolute left-2 top-2 rounded bg-black/55 px-1.5 py-0.5 text-[11px] text-white",children:s.area}):null;return e.jsxs("article",{className:"flex flex-col overflow-hidden rounded-xl border border-[var(--border)] bg-[var(--surface)]",children:[t?e.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",title:"在闲鱼打开商品详情",className:"relative block aspect-square bg-gray-100",children:[l,i]}):e.jsxs("div",{className:"relative aspect-square bg-gray-100",children:[l,i]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-2 p-3",children:[t?e.jsx("a",{href:t,target:"_blank",rel:"noreferrer",title:`${s.title}(在闲鱼打开商品详情)`,className:"line-clamp-2 min-h-[2.5rem] text-sm text-[var(--text)] hover:text-[#ff4400] hover:underline",children:s.title}):e.jsx("p",{className:"line-clamp-2 min-h-[2.5rem] text-sm text-[var(--text)]",title:s.title,children:s.title}),e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-base font-bold text-[#ff4400]",children:s.price||"面议"}),s.want_count?e.jsxs("span",{className:"text-xs text-[var(--text-soft)]",children:[s.want_count,"人想要"]}):null]}),s.seller&&e.jsxs("p",{className:"truncate text-xs text-[var(--text-soft)]",children:["卖家:",s.seller]}),e.jsxs("button",{type:"button",onClick:()=>Ie(s),className:"ios-btn-primary mt-auto flex items-center justify-center gap-1.5 rounded-md px-3 py-2 text-sm",children:[e.jsx(le,{className:"h-4 w-4"}),"一键转卖"]})]})]},s.item_id)};return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ze,{title:"一键转卖",description:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号。",icon:le,actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"resell-account",className:"text-sm text-[var(--text-soft)]",children:"账号"}),e.jsxs("select",{id:"resell-account",value:n,onChange:s=>B(s.target.value),className:"ios-input rounded-md px-3 py-2 text-sm",children:[e.jsx("option",{value:"",children:"请选择账号"}),d.map(s=>e.jsx("option",{value:s.id,children:ve.get(s.id)},s.id))]})]})}),R&&e.jsx(Be,{type:R.type,message:R.message,onClose:()=>a(null)}),e.jsx(He,{value:y,onChange:de,ariaLabel:"转卖来源",items:[{id:"favorites",label:"我的收藏",icon:E,count:S.length||void 0},{id:"search",label:"搜索商品",icon:F}]}),y==="favorites"&&e.jsxs("section",{className:"section-panel",children:[e.jsxs("div",{className:"section-panel__header",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(E,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:"收藏的商品"}),e.jsx("p",{className:"section-description",children:"读取所选账号在闲鱼收藏的在售商品,点「一键转卖」即可挂到自己名下。"})]})]}),e.jsx("div",{className:"section-header__actions",children:e.jsxs("button",{type:"button",onClick:()=>T(1),disabled:f,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2 text-sm",children:[f?e.jsx(g,{className:"h-4 w-4 animate-spin"}):e.jsx(E,{className:"h-4 w-4"}),j?"刷新收藏":"加载收藏"]})})]}),e.jsx("div",{className:"p-4",children:f&&S.length===0?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-sm text-[var(--text-soft)]",children:[e.jsx(g,{className:"h-5 w-5 animate-spin"})," 正在读取收藏…"]}):S.length===0?e.jsx(ne,{icon:E,title:j?"没有可转卖的收藏":"还没有加载收藏",description:j?"换个筛选或先去闲鱼收藏几件商品。":"选择账号后点击「加载收藏」。"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:S.map(re)}),pe&&e.jsx("div",{className:"mt-4 flex justify-center",children:e.jsx("button",{type:"button",onClick:()=>T(xe+1),disabled:f,className:"ios-btn-secondary rounded-md px-6 py-2 text-sm",children:f?"加载中…":"加载更多"})})]})})]}),y==="search"&&e.jsxs("section",{className:"section-panel",children:[e.jsx("div",{className:"section-panel__header",children:e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(F,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:"搜索商品"}),e.jsx("p",{className:"section-description",children:"全网搜闲鱼在售商品,挑中后一键转卖到自己账号。"})]})]})}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row",children:[e.jsx("input",{value:_,onChange:s=>fe(s.target.value),onKeyDown:s=>{s.key==="Enter"&&te()},className:"ios-input flex-1 rounded-md px-3 py-2.5",placeholder:"例如:机械键盘、iPhone 15","aria-label":"搜索关键词"}),e.jsxs("button",{type:"button",onClick:()=>void te(),disabled:A,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-5 py-2.5 text-sm",children:[A?e.jsx(g,{className:"h-4 w-4 animate-spin"}):e.jsx(F,{className:"h-4 w-4"}),"搜索"]})]}),A?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-sm text-[var(--text-soft)]",children:[e.jsx(g,{className:"h-5 w-5 animate-spin"})," 正在搜索…"]}):O.length===0?e.jsx(ne,{icon:F,title:W?"没有搜到商品":"输入关键词开始搜索",description:W?"换个关键词试试。":"搜索结果可直接一键转卖。"}):e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:O.map(re)})]})]}),x&&Re.createPortal(e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"一键转卖",children:e.jsxs("div",{className:"modal-container max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"一键转卖"}),e.jsxs("p",{className:"mt-1 truncate text-sm text-gray-500",title:x.title,children:["源商品:"," ",z(x)?e.jsx("a",{href:z(x),target:"_blank",rel:"noreferrer",title:`${x.title}(在闲鱼打开商品详情)`,className:"text-[#ff4400] hover:underline",children:x.title}):x.title]})]}),e.jsx("button",{type:"button",onClick:ae,className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(ie,{className:"h-5 w-5"})})]}),e.jsx("div",{className:"modal-body",children:J?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-gray-500",children:[e.jsx(g,{className:"h-5 w-5 animate-spin"})," 正在读取商品详情…"]}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 flex items-center justify-between",children:e.jsxs("span",{className:"text-xs text-gray-500",children:["图片(",p.length,"/9)· 第一张为封面,悬停可替换/删除"]})}),p.length?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[p.map((s,t)=>e.jsxs("div",{className:"group relative h-20 w-20 shrink-0",children:[e.jsx("img",{src:s.url,alt:"",className:"h-full w-full rounded-md border border-gray-200 object-cover"}),t===0&&e.jsx("span",{className:"absolute inset-x-0 bottom-0 rounded-b-md bg-black/55 text-center text-[10px] leading-4 text-white",children:"封面"}),e.jsx("button",{type:"button",onClick:()=>Ne(t),title:"删除该图",className:"absolute -right-1.5 -top-1.5 hidden h-5 w-5 items-center justify-center rounded-full bg-red-500 text-white shadow group-hover:flex",children:e.jsx(ie,{className:"h-3 w-3"})}),e.jsxs("div",{className:`absolute inset-x-0 hidden gap-1 bg-black/55 p-0.5 group-hover:flex ${t===0?"bottom-4":"bottom-0"}`,children:[e.jsx("button",{type:"button",onClick:()=>{var l;M.current=t,(l=N.current)==null||l.click()},className:"flex-1 rounded bg-white/20 text-[10px] text-white hover:bg-white/40",children:"替换"}),t>0&&e.jsx("button",{type:"button",onClick:()=>we(t),className:"flex-1 rounded bg-white/20 text-[10px] text-white hover:bg-white/40",children:"设首图"})]})]},`${s.url}-${t}`)),p.length<9&&e.jsxs("button",{type:"button",onClick:()=>{var s;return(s=N.current)==null?void 0:s.click()},disabled:v,className:"flex h-20 w-20 shrink-0 flex-col items-center justify-center gap-1 rounded-md border border-dashed border-gray-300 text-gray-400 transition hover:border-purple-400 hover:text-purple-500 disabled:opacity-60",children:[v?e.jsx(g,{className:"h-5 w-5 animate-spin"}):e.jsx(Oe,{className:"h-5 w-5"}),e.jsx("span",{className:"text-[10px]",children:"上传"})]}),e.jsxs("button",{type:"button",onClick:()=>D(s=>!s),className:"flex h-20 w-20 shrink-0 flex-col items-center justify-center gap-1 rounded-md border border-dashed border-gray-300 text-gray-400 transition hover:border-purple-400 hover:text-purple-500",children:[e.jsx("span",{className:"text-base leading-none",children:"🔗"}),e.jsx("span",{className:"text-[10px]",children:"URL"})]})]}),je&&e.jsxs("div",{className:"mt-2 flex gap-2",children:[e.jsx("input",{value:Y,onChange:s=>q(s.target.value),placeholder:"粘贴图片地址 https://…",className:"ios-input min-w-0 flex-1 rounded-md px-3 py-2 text-sm"}),e.jsx("button",{type:"button",onClick:ke,disabled:v,className:"shrink-0 rounded-md bg-purple-500 px-3 text-xs font-bold text-white disabled:opacity-60",children:v?"读取中…":"添加"})]})]}):e.jsx("p",{className:"text-xs text-gray-400",children:"暂无图片,点下方「上传」或「URL」添加"}),e.jsx("input",{ref:N,type:"file",accept:"image/*",className:"hidden",onChange:s=>Se(s.target.files,M.current)})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[e.jsx("label",{className:"text-sm font-bold text-gray-700",htmlFor:"resell-title",children:"标题"}),e.jsxs("button",{type:"button",onClick:_e,disabled:P,className:"inline-flex shrink-0 items-center gap-1 rounded-md bg-purple-50 px-2.5 py-1 text-xs font-bold text-purple-600 transition hover:bg-purple-100 disabled:cursor-not-allowed disabled:opacity-60",children:[P?e.jsx(g,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Ke,{className:"h-3.5 w-3.5"}),P?"AI 生成中…":"AI 优化标题+描述"]})]}),e.jsx("input",{id:"resell-title",value:c.title,maxLength:60,onChange:s=>u(t=>({...t,title:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5",placeholder:"商品标题"}),Q.length>0&&e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[e.jsx("p",{className:"text-xs text-gray-400",children:"AI 候选标题(点击填入上方输入框):"}),Q.map((s,t)=>e.jsx("button",{type:"button",onClick:()=>u(l=>({...l,title:s})),className:`rounded-md border px-2.5 py-1.5 text-left text-xs leading-relaxed transition ${c.title===s?"border-purple-500 bg-purple-50 text-purple-700":"border-gray-200 bg-white text-gray-700 hover:border-purple-400 hover:bg-purple-50"}`,children:s},`${s}-${t}`))]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-price",children:"转卖价格(元)"}),e.jsx("input",{id:"resell-price",value:c.price,inputMode:"decimal",onChange:s=>u(t=>({...t,price:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5",placeholder:"例如 99"}),(h==null?void 0:h.original_price)&&e.jsxs("p",{className:"mt-1 text-xs text-gray-400",children:["源商品原价 ",String(h.original_price)," 元"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-qty",children:"数量"}),e.jsx("input",{id:"resell-qty",value:c.quantity,inputMode:"numeric",onChange:s=>u(t=>({...t,quantity:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-delivery",children:"运费方式"}),e.jsx("select",{id:"resell-delivery",value:c.delivery,onChange:s=>u(t=>({...t,delivery:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5",children:Je.map(s=>e.jsx("option",{value:s,children:s},s))})]}),c.delivery==="一口价"&&e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-post",children:"运费(元)"}),e.jsx("input",{id:"resell-post",value:c.postPrice,inputMode:"decimal",onChange:s=>u(t=>({...t,postPrice:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-desc",children:"描述"}),e.jsx("textarea",{id:"resell-desc",value:c.desc,rows:5,maxLength:2e3,onChange:s=>u(t=>({...t,desc:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5",placeholder:"商品描述"})]}),(h==null?void 0:h.cat_name)&&e.jsxs("p",{className:"text-xs text-gray-400",children:["类目:",h.cat_name,"(发布时自动带上)"]}),C&&e.jsxs("div",{className:"rounded-md border border-green-200 bg-green-50 p-3 text-sm text-green-700",children:["发布成功!",e.jsxs("a",{href:C,target:"_blank",rel:"noreferrer",className:"ml-1 inline-flex items-center gap-1 font-bold underline",children:["查看商品 ",e.jsx(Ae,{className:"h-3.5 w-3.5"})]})]})]})}),e.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:ae,className:"ios-btn-secondary rounded-md px-4 py-2.5",children:C?"关闭":"取消"}),!C&&e.jsxs("button",{type:"button",onClick:()=>void Ce(),disabled:I||J,className:"ios-btn-primary flex items-center gap-2 rounded-md px-5 py-2.5",children:[I&&e.jsx(g,{className:"h-4 w-4 animate-spin"}),I?"发布中…":"确认转卖发布"]})]})]})}),document.body)]})};export{ss as default}; diff --git a/static/assets/Resell-BxlYjwuk.js b/static/assets/Resell-BxlYjwuk.js deleted file mode 100644 index aa76455..0000000 --- a/static/assets/Resell-BxlYjwuk.js +++ /dev/null @@ -1,6 +0,0 @@ -import{c as oe,r as a,o as de,j as e,bG as G,L as p,b as me,X as xe,E as ue,bH as he,bI as pe,bJ as ge,bK as fe}from"./index-BCb9Ylky.js";import{a as je,N as be,b as ye,E as J}from"./ui-DcVZvy8T.js";import{S as N}from"./search-DAVBnJPC.js";import{P as ve}from"./package-CbDV2ANe.js";/** - * @license lucide-react v0.562.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ne=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],w=oe("heart",Ne),we=["包邮","无需邮寄","一口价","按距离计费"],L=m=>m.url?m.url:!m.item_id||m.item_id.startsWith("mock_")?"":`https://www.goofish.com/item?id=${m.item_id}`,V={title:"",price:"",desc:"",delivery:"包邮",postPrice:"0",quantity:"1"},Ce=()=>{var B,O,z;const[m,W]=a.useState([]),[o,F]=a.useState(""),[g,X]=a.useState("favorites"),[_,l]=a.useState(null),[j,Y]=a.useState([]),[Q,Z]=a.useState(1),[ee,se]=a.useState(!1),[u,E]=a.useState(!1),[f,te]=a.useState(!1),[b,ae]=a.useState(""),[I,le]=a.useState([]),[S,q]=a.useState(!1),[R,re]=a.useState(!1),[c,$]=a.useState(null),[r,k]=a.useState(null),[A,M]=a.useState(!1),[n,x]=a.useState(V),[y,D]=a.useState(!1),[v,P]=a.useState(""),ie=a.useMemo(()=>new Map(m.map(s=>[s.id,s.nickname||s.remark||`账号 ${s.id.substring(0,6)}`])),[m]);a.useEffect(()=>{de().then(s=>{const t=s.filter(d=>d.enabled),i=t.length>0?t:s;W(i),F(d=>{var h;return d||((h=i[0])==null?void 0:h.id)||""})}).catch(()=>l({type:"error",message:"账号列表加载失败"}))},[]);const C=async(s=1)=>{if(!o){l({type:"error",message:"请先选择账号"});return}E(!0),l(null);try{const t=await he(o,s,20),i=t.items||[];Y(d=>s===1?i:[...d,...i]),se(!!t.next_page),Z(s),te(!0),i.length===0&&s===1&&l({type:"error",message:"该账号没有可转卖的有效收藏"})}catch(t){l({type:"error",message:t instanceof Error?t.message:"收藏列表加载失败"})}finally{E(!1)}},T=a.useRef(!1);a.useEffect(()=>{!o||g!=="favorites"||f||u||T.current||(T.current=!0,C(1))},[o,g,f,u]);const U=async()=>{if(!o){l({type:"error",message:"请先选择账号"});return}if(!b.trim()){l({type:"error",message:"请输入搜索关键词"});return}q(!0),l(null);try{const s=await pe(o,b.trim());le(s.items||[]),re(!0),(s.items||[]).length===0&&l({type:"error",message:`没有搜到「${b.trim()}」相关商品`})}catch(s){l({type:"error",message:s instanceof Error?s.message:"搜索失败"})}finally{q(!1)}},ne=async s=>{if(!o){l({type:"error",message:"请先选择账号"});return}$(s),k(null),P(""),x({...V,title:s.title||"",price:(s.price||"").replace(/[^\d.]/g,"")}),M(!0);try{const i=(await fe({cookie_id:o,item_id:s.item_id})).item;k(i);const d=i.price!=null?String(i.price):"";x(h=>({...h,title:i.title||h.title,price:d.replace(/[^\d.]/g,"")||h.price,desc:i.desc||"",quantity:String(i.quantity||1)}))}catch(t){l({type:"warning",message:`详情预览失败(${t instanceof Error?t.message:"未知错误"}),可手动补全后发布`})}finally{M(!1)}},H=()=>{y||($(null),k(null),P(""))},ce=async()=>{if(!c||!o)return;const s=Number(n.price);if(!n.title.trim()){l({type:"error",message:"标题不能为空"});return}if(!Number.isFinite(s)||s<=0){l({type:"error",message:"请输入有效的价格"});return}D(!0),l(null);try{const t=await ge({cookie_id:o,item_id:c.item_id,title:n.title.trim(),price:s,desc:n.desc,delivery:n.delivery,post_price:Number(n.postPrice)||0,quantity:Number(n.quantity)||1});P(t.url),l({type:"success",message:`转卖发布成功:${t.title}`})}catch(t){l({type:"error",message:t instanceof Error?t.message:"发布失败"})}finally{D(!1)}},K=s=>{const t=L(s),i=s.image?e.jsx("img",{src:s.image,alt:s.title,className:"h-full w-full object-cover",loading:"lazy"}):e.jsx("div",{className:"flex h-full items-center justify-center text-gray-400",children:e.jsx(ve,{className:"h-8 w-8"})}),d=s.area?e.jsx("span",{className:"absolute left-2 top-2 rounded bg-black/55 px-1.5 py-0.5 text-[11px] text-white",children:s.area}):null;return e.jsxs("article",{className:"flex flex-col overflow-hidden rounded-xl border border-[var(--border)] bg-[var(--surface)]",children:[t?e.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",title:"在闲鱼打开商品详情",className:"relative block aspect-square bg-gray-100",children:[i,d]}):e.jsxs("div",{className:"relative aspect-square bg-gray-100",children:[i,d]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-2 p-3",children:[t?e.jsx("a",{href:t,target:"_blank",rel:"noreferrer",title:`${s.title}(在闲鱼打开商品详情)`,className:"line-clamp-2 min-h-[2.5rem] text-sm text-[var(--text)] hover:text-[#ff4400] hover:underline",children:s.title}):e.jsx("p",{className:"line-clamp-2 min-h-[2.5rem] text-sm text-[var(--text)]",title:s.title,children:s.title}),e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-base font-bold text-[#ff4400]",children:s.price||"面议"}),s.want_count?e.jsxs("span",{className:"text-xs text-[var(--text-soft)]",children:[s.want_count,"人想要"]}):null]}),s.seller&&e.jsxs("p",{className:"truncate text-xs text-[var(--text-soft)]",children:["卖家:",s.seller]}),e.jsxs("button",{type:"button",onClick:()=>ne(s),className:"ios-btn-primary mt-auto flex items-center justify-center gap-1.5 rounded-md px-3 py-2 text-sm",children:[e.jsx(G,{className:"h-4 w-4"}),"一键转卖"]})]})]},s.item_id)};return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(je,{title:"一键转卖",description:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号。",icon:G,actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"resell-account",className:"text-sm text-[var(--text-soft)]",children:"账号"}),e.jsxs("select",{id:"resell-account",value:o,onChange:s=>F(s.target.value),className:"ios-input rounded-md px-3 py-2 text-sm",children:[e.jsx("option",{value:"",children:"请选择账号"}),m.map(s=>e.jsx("option",{value:s.id,children:ie.get(s.id)},s.id))]})]})}),_&&e.jsx(be,{type:_.type,message:_.message,onClose:()=>l(null)}),e.jsx(ye,{value:g,onChange:X,ariaLabel:"转卖来源",items:[{id:"favorites",label:"我的收藏",icon:w,count:j.length||void 0},{id:"search",label:"搜索商品",icon:N}]}),g==="favorites"&&e.jsxs("section",{className:"section-panel",children:[e.jsxs("div",{className:"section-panel__header",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(w,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:"收藏的商品"}),e.jsx("p",{className:"section-description",children:"读取所选账号在闲鱼收藏的在售商品,点「一键转卖」即可挂到自己名下。"})]})]}),e.jsx("div",{className:"section-header__actions",children:e.jsxs("button",{type:"button",onClick:()=>C(1),disabled:u,className:"ios-btn-primary flex items-center gap-2 rounded-md px-4 py-2 text-sm",children:[u?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(w,{className:"h-4 w-4"}),f?"刷新收藏":"加载收藏"]})})]}),e.jsx("div",{className:"p-4",children:u&&j.length===0?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-sm text-[var(--text-soft)]",children:[e.jsx(p,{className:"h-5 w-5 animate-spin"})," 正在读取收藏…"]}):j.length===0?e.jsx(J,{icon:w,title:f?"没有可转卖的收藏":"还没有加载收藏",description:f?"换个筛选或先去闲鱼收藏几件商品。":"选择账号后点击「加载收藏」。"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:j.map(K)}),ee&&e.jsx("div",{className:"mt-4 flex justify-center",children:e.jsx("button",{type:"button",onClick:()=>C(Q+1),disabled:u,className:"ios-btn-secondary rounded-md px-6 py-2 text-sm",children:u?"加载中…":"加载更多"})})]})})]}),g==="search"&&e.jsxs("section",{className:"section-panel",children:[e.jsx("div",{className:"section-panel__header",children:e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(N,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:"搜索商品"}),e.jsx("p",{className:"section-description",children:"全网搜闲鱼在售商品,挑中后一键转卖到自己账号。"})]})]})}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row",children:[e.jsx("input",{value:b,onChange:s=>ae(s.target.value),onKeyDown:s=>{s.key==="Enter"&&U()},className:"ios-input flex-1 rounded-md px-3 py-2.5",placeholder:"例如:机械键盘、iPhone 15","aria-label":"搜索关键词"}),e.jsxs("button",{type:"button",onClick:()=>void U(),disabled:S,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-5 py-2.5 text-sm",children:[S?e.jsx(p,{className:"h-4 w-4 animate-spin"}):e.jsx(N,{className:"h-4 w-4"}),"搜索"]})]}),S?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-sm text-[var(--text-soft)]",children:[e.jsx(p,{className:"h-5 w-5 animate-spin"})," 正在搜索…"]}):I.length===0?e.jsx(J,{icon:N,title:R?"没有搜到商品":"输入关键词开始搜索",description:R?"换个关键词试试。":"搜索结果可直接一键转卖。"}):e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:I.map(K)})]})]}),c&&me.createPortal(e.jsx("div",{className:"modal-overlay",role:"dialog","aria-modal":"true","aria-label":"一键转卖",children:e.jsxs("div",{className:"modal-container max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"modal-header flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"一键转卖"}),e.jsxs("p",{className:"mt-1 truncate text-sm text-gray-500",title:c.title,children:["源商品:"," ",L(c)?e.jsx("a",{href:L(c),target:"_blank",rel:"noreferrer",title:`${c.title}(在闲鱼打开商品详情)`,className:"text-[#ff4400] hover:underline",children:c.title}):c.title]})]}),e.jsx("button",{type:"button",onClick:H,className:"rounded-md p-2 hover:bg-gray-100","aria-label":"关闭",children:e.jsx(xe,{className:"h-5 w-5"})})]}),e.jsx("div",{className:"modal-body",children:A?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-gray-500",children:[e.jsx(p,{className:"h-5 w-5 animate-spin"})," 正在读取商品详情…"]}):e.jsxs("div",{className:"flex flex-col gap-4",children:[(B=r==null?void 0:r.images)!=null&&B.length||(O=c.images)!=null&&O.length?e.jsxs("div",{className:"flex gap-2 overflow-x-auto pb-1",children:[((r==null?void 0:r.images)||[]).map(s=>e.jsx("img",{src:s.url,alt:"",className:"h-20 w-20 shrink-0 rounded-md border border-gray-200 object-cover"},s.url)),!((z=r==null?void 0:r.images)!=null&&z.length)&&c.image&&e.jsx("img",{src:c.image,alt:"",className:"h-20 w-20 shrink-0 rounded-md border border-gray-200 object-cover"})]}):null,e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-title",children:"标题"}),e.jsx("input",{id:"resell-title",value:n.title,maxLength:60,onChange:s=>x(t=>({...t,title:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5",placeholder:"商品标题"})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-price",children:"转卖价格(元)"}),e.jsx("input",{id:"resell-price",value:n.price,inputMode:"decimal",onChange:s=>x(t=>({...t,price:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5",placeholder:"例如 99"}),(r==null?void 0:r.original_price)&&e.jsxs("p",{className:"mt-1 text-xs text-gray-400",children:["源商品原价 ",String(r.original_price)," 元"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-qty",children:"数量"}),e.jsx("input",{id:"resell-qty",value:n.quantity,inputMode:"numeric",onChange:s=>x(t=>({...t,quantity:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-delivery",children:"运费方式"}),e.jsx("select",{id:"resell-delivery",value:n.delivery,onChange:s=>x(t=>({...t,delivery:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5",children:we.map(s=>e.jsx("option",{value:s,children:s},s))})]}),n.delivery==="一口价"&&e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-post",children:"运费(元)"}),e.jsx("input",{id:"resell-post",value:n.postPrice,inputMode:"decimal",onChange:s=>x(t=>({...t,postPrice:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"resell-desc",children:"描述"}),e.jsx("textarea",{id:"resell-desc",value:n.desc,rows:5,maxLength:2e3,onChange:s=>x(t=>({...t,desc:s.target.value})),className:"ios-input w-full rounded-md px-3 py-2.5",placeholder:"商品描述"})]}),(r==null?void 0:r.cat_name)&&e.jsxs("p",{className:"text-xs text-gray-400",children:["类目:",r.cat_name,"(发布时自动带上)"]}),v&&e.jsxs("div",{className:"rounded-md border border-green-200 bg-green-50 p-3 text-sm text-green-700",children:["发布成功!",e.jsxs("a",{href:v,target:"_blank",rel:"noreferrer",className:"ml-1 inline-flex items-center gap-1 font-bold underline",children:["查看商品 ",e.jsx(ue,{className:"h-3.5 w-3.5"})]})]})]})}),e.jsxs("div",{className:"modal-footer flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:H,className:"ios-btn-secondary rounded-md px-4 py-2.5",children:v?"关闭":"取消"}),!v&&e.jsxs("button",{type:"button",onClick:()=>void ce(),disabled:y||A,className:"ios-btn-primary flex items-center gap-2 rounded-md px-5 py-2.5",children:[y&&e.jsx(p,{className:"h-4 w-4 animate-spin"}),y?"发布中…":"确认转卖发布"]})]})]})}),document.body)]})};export{Ce as default}; diff --git a/static/assets/Settings-B4iT-2pS.js b/static/assets/Settings-C3ht1_iw.js similarity index 98% rename from static/assets/Settings-B4iT-2pS.js rename to static/assets/Settings-C3ht1_iw.js index 347c1cc..0505c0a 100644 --- a/static/assets/Settings-B4iT-2pS.js +++ b/static/assets/Settings-C3ht1_iw.js @@ -1,4 +1,4 @@ -import{c as se,r as l,aS as ae,j as e,l as te,e as K,aT as ne,aU as v,aV as q,S as le,ak as O,aW as ie,aX as re,n as c,aY as ce,aZ as oe,a_ as de,a$ as pe,b0 as me,b1 as ue}from"./index-BCb9Ylky.js";import{P as xe,a as he,b as ge,S as p,N as ye}from"./ui-DcVZvy8T.js";import{S as je}from"./save-cq1qPfv2.js";import{S as Q}from"./sparkles-Dw_-KUhM.js";import{Z as L}from"./zap-B162HdXv.js";import{E as w}from"./eye-off-CWiudZEM.js";import{E as C}from"./eye-DywCDhqk.js";/** +import{c as se,r as l,aS as ae,j as e,l as te,e as K,aT as ne,aU as v,aV as q,S as le,ak as O,aW as ie,aX as re,n as c,aY as ce,aZ as oe,a_ as de,a$ as pe,b0 as me,b1 as ue}from"./index-BZnqBmwp.js";import{P as xe,a as he,b as ge,S as p,N as ye}from"./ui-B9Jzqjf7.js";import{S as je}from"./save-Dxf2dvgb.js";import{S as Q}from"./sparkles-DVlvGI-3.js";import{Z as L}from"./zap-BWofDPZm.js";import{E as w}from"./eye-off-D1JuM9mR.js";import{E as C}from"./eye-BibUMjxU.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/UserManagement-m20rmA1E.js b/static/assets/UserManagement-BCtLeLer.js similarity index 98% rename from static/assets/UserManagement-m20rmA1E.js rename to static/assets/UserManagement-BCtLeLer.js index 0beba2d..58c4dab 100644 --- a/static/assets/UserManagement-m20rmA1E.js +++ b/static/assets/UserManagement-BCtLeLer.js @@ -1 +1 @@ -import{r as l,j as e,U as h,e as $,S as j,aT as A,L as f,ak as T,bz as L,n as i,v as y,bA as P,bB as R,aY as E,bC as _}from"./index-BCb9Ylky.js";import{a as I,S as N,E as B}from"./ui-DcVZvy8T.js";import{T as z}from"./trash-2-D-oW6aaO.js";const D=n=>{if(!n)return"-";const c=new Date(n.includes("T")?n:`${n.replace(" ","T")}Z`);return Number.isNaN(c.getTime())?n:c.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},Y=()=>{const[n,c]=l.useState([]),[u,g]=l.useState(!0),[o,d]=l.useState(null),[w,p]=l.useState(null),[b,m]=l.useState(""),x=async()=>{g(!0);try{c(await L())}catch(t){i(`加载用户列表失败:${t.message}`,"error")}finally{g(!1)}};l.useEffect(()=>{x()},[]);const U=async t=>{if(o!==null)return;const s=t.is_active!==!1;if(!(s&&!await y(`禁用用户「${t.username}」?其所有在线会话将立即下线,且无法再登录。`,{title:"禁用用户",confirmLabel:"禁用",danger:!0}))){d(t.id);try{const a=await P(t.id,!s);i(a.message||"状态已更新","success"),await x()}catch(a){i(`操作失败:${a.message}`,"error")}finally{d(null)}}},C=async t=>{const[s,a]=E(b);if(!s){i(a,"warning");return}if(o===null){d(t.id);try{const r=await _(t.id,b);i(r.message||"密码已重置","success"),p(null),m("")}catch(r){i(`重置失败:${r.message}`,"error")}finally{d(null)}}},k=async t=>{if(o===null&&await y(`删除用户「${t.username}」?其名下的闲鱼账号、卡密、回复规则等数据将一并删除,不可恢复。`,{title:"删除用户",confirmLabel:"删除",danger:!0})){d(t.id);try{const s=await R(t.id);i(s.message||"用户已删除","success"),await x()}catch(s){i(`删除失败:${s.message}`,"error")}finally{d(null)}}};return e.jsxs("div",{className:"page-stack",children:[e.jsx(I,{title:"用户管理",description:"管理注册用户与登录权限。普通用户仅能操作分配给其名下的账号数据。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>void x(),className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx($,{className:`h-4 w-4 ${u?"animate-spin":""}`}),"刷新"]})}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"权限说明",icon:j}),e.jsxs("div",{className:"grid gap-3 p-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(j,{className:"h-4 w-4 text-[#8a6300]"}),"管理员(admin)"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"拥有全部权限:系统设置、通知与系统日志、用户管理,以及所有闲鱼账号和数据。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(A,{className:"h-4 w-4 text-[var(--text-soft)]"}),"普通用户"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"只能看到并操作自己名下的闲鱼账号、商品、订单与消息;侧栏不显示系统设置与用户管理,接口层也会拒绝其访问。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"用户列表",description:`共 ${n.length} 个用户`,icon:h}),e.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[n.map(t=>{const s=t.username==="admin",a=t.is_active===!1,r=o===t.id,v=w===t.id;return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--brand)] text-sm font-black text-[#2a2416]",children:t.username.slice(0,1).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-[var(--text)]",children:t.username}),s&&e.jsx("span",{className:"rounded-full bg-[var(--brand)] px-2 py-0.5 text-[10px] font-bold text-[#2a2416]",children:"内置管理员"}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold ${a?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-600"}`,children:a?"已禁用":"正常"})]}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-[var(--text-muted)]",children:t.email}),e.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-soft)]",children:[t.cookie_count??0," 个闲鱼账号 · ",t.card_count??0," 张卡密 · 注册于 ",D(t.created_at)]})]}),!s&&e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void U(t),disabled:r,className:a?"rounded-md bg-emerald-50 px-3 py-2 text-xs font-bold text-emerald-700 hover:bg-emerald-100 disabled:opacity-50":"rounded-md bg-amber-50 px-3 py-2 text-xs font-bold text-amber-700 hover:bg-amber-100 disabled:opacity-50",children:r?e.jsx(f,{className:"h-4 w-4 animate-spin"}):a?"启用":"禁用"}),e.jsx("button",{type:"button",onClick:()=>{p(v?null:t.id),m("")},disabled:r,title:"重置密码",className:"flex h-9 w-9 items-center justify-center rounded-md bg-[var(--surface-subtle)] text-[var(--text-muted)] hover:bg-[var(--surface-hover)] hover:text-[var(--text)] disabled:opacity-50",children:e.jsx(T,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void k(t),disabled:r,title:"删除用户",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100 disabled:opacity-50",children:e.jsx(z,{className:"h-4 w-4"})})]})]}),v&&!s&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3",children:[e.jsx("input",{type:"password",value:b,onChange:S=>m(S.target.value),placeholder:"新密码:至少 8 位,含字母和数字",autoComplete:"new-password",className:"ios-input h-10 min-w-0 flex-1 rounded-md px-3 text-sm"}),e.jsx("button",{type:"button",onClick:()=>void C(t),disabled:r,className:"ios-btn-primary h-10 rounded-md px-4 text-sm disabled:opacity-50",children:r?e.jsx(f,{className:"h-4 w-4 animate-spin"}):"确认重置"}),e.jsx("button",{type:"button",onClick:()=>{p(null),m("")},className:"ios-btn-secondary h-10 rounded-md px-4 text-sm",children:"取消"})]})]},t.id)}),!u&&n.length===0&&e.jsx(B,{compact:!0,title:"暂无用户",description:"开放注册后,新注册的用户会出现在这里。",icon:h}),u&&e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(f,{className:"h-6 w-6 animate-spin text-[#d6b600]"})})]})]})]})};export{Y as default}; +import{r as l,j as e,U as h,e as $,S as j,aT as A,L as f,ak as T,bz as L,n as i,v as y,bA as P,bB as R,aY as E,bC as _}from"./index-BZnqBmwp.js";import{a as I,S as N,E as B}from"./ui-B9Jzqjf7.js";import{T as z}from"./trash-2-CmT2n80I.js";const D=n=>{if(!n)return"-";const c=new Date(n.includes("T")?n:`${n.replace(" ","T")}Z`);return Number.isNaN(c.getTime())?n:c.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},Y=()=>{const[n,c]=l.useState([]),[u,g]=l.useState(!0),[o,d]=l.useState(null),[w,p]=l.useState(null),[b,m]=l.useState(""),x=async()=>{g(!0);try{c(await L())}catch(t){i(`加载用户列表失败:${t.message}`,"error")}finally{g(!1)}};l.useEffect(()=>{x()},[]);const U=async t=>{if(o!==null)return;const s=t.is_active!==!1;if(!(s&&!await y(`禁用用户「${t.username}」?其所有在线会话将立即下线,且无法再登录。`,{title:"禁用用户",confirmLabel:"禁用",danger:!0}))){d(t.id);try{const a=await P(t.id,!s);i(a.message||"状态已更新","success"),await x()}catch(a){i(`操作失败:${a.message}`,"error")}finally{d(null)}}},C=async t=>{const[s,a]=E(b);if(!s){i(a,"warning");return}if(o===null){d(t.id);try{const r=await _(t.id,b);i(r.message||"密码已重置","success"),p(null),m("")}catch(r){i(`重置失败:${r.message}`,"error")}finally{d(null)}}},k=async t=>{if(o===null&&await y(`删除用户「${t.username}」?其名下的闲鱼账号、卡密、回复规则等数据将一并删除,不可恢复。`,{title:"删除用户",confirmLabel:"删除",danger:!0})){d(t.id);try{const s=await R(t.id);i(s.message||"用户已删除","success"),await x()}catch(s){i(`删除失败:${s.message}`,"error")}finally{d(null)}}};return e.jsxs("div",{className:"page-stack",children:[e.jsx(I,{title:"用户管理",description:"管理注册用户与登录权限。普通用户仅能操作分配给其名下的账号数据。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>void x(),className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx($,{className:`h-4 w-4 ${u?"animate-spin":""}`}),"刷新"]})}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"权限说明",icon:j}),e.jsxs("div",{className:"grid gap-3 p-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(j,{className:"h-4 w-4 text-[#8a6300]"}),"管理员(admin)"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"拥有全部权限:系统设置、通知与系统日志、用户管理,以及所有闲鱼账号和数据。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(A,{className:"h-4 w-4 text-[var(--text-soft)]"}),"普通用户"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"只能看到并操作自己名下的闲鱼账号、商品、订单与消息;侧栏不显示系统设置与用户管理,接口层也会拒绝其访问。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"用户列表",description:`共 ${n.length} 个用户`,icon:h}),e.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[n.map(t=>{const s=t.username==="admin",a=t.is_active===!1,r=o===t.id,v=w===t.id;return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--brand)] text-sm font-black text-[#2a2416]",children:t.username.slice(0,1).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-[var(--text)]",children:t.username}),s&&e.jsx("span",{className:"rounded-full bg-[var(--brand)] px-2 py-0.5 text-[10px] font-bold text-[#2a2416]",children:"内置管理员"}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold ${a?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-600"}`,children:a?"已禁用":"正常"})]}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-[var(--text-muted)]",children:t.email}),e.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-soft)]",children:[t.cookie_count??0," 个闲鱼账号 · ",t.card_count??0," 张卡密 · 注册于 ",D(t.created_at)]})]}),!s&&e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void U(t),disabled:r,className:a?"rounded-md bg-emerald-50 px-3 py-2 text-xs font-bold text-emerald-700 hover:bg-emerald-100 disabled:opacity-50":"rounded-md bg-amber-50 px-3 py-2 text-xs font-bold text-amber-700 hover:bg-amber-100 disabled:opacity-50",children:r?e.jsx(f,{className:"h-4 w-4 animate-spin"}):a?"启用":"禁用"}),e.jsx("button",{type:"button",onClick:()=>{p(v?null:t.id),m("")},disabled:r,title:"重置密码",className:"flex h-9 w-9 items-center justify-center rounded-md bg-[var(--surface-subtle)] text-[var(--text-muted)] hover:bg-[var(--surface-hover)] hover:text-[var(--text)] disabled:opacity-50",children:e.jsx(T,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>void k(t),disabled:r,title:"删除用户",className:"flex h-9 w-9 items-center justify-center rounded-md bg-red-50 text-red-600 hover:bg-red-100 disabled:opacity-50",children:e.jsx(z,{className:"h-4 w-4"})})]})]}),v&&!s&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3",children:[e.jsx("input",{type:"password",value:b,onChange:S=>m(S.target.value),placeholder:"新密码:至少 8 位,含字母和数字",autoComplete:"new-password",className:"ios-input h-10 min-w-0 flex-1 rounded-md px-3 text-sm"}),e.jsx("button",{type:"button",onClick:()=>void C(t),disabled:r,className:"ios-btn-primary h-10 rounded-md px-4 text-sm disabled:opacity-50",children:r?e.jsx(f,{className:"h-4 w-4 animate-spin"}):"确认重置"}),e.jsx("button",{type:"button",onClick:()=>{p(null),m("")},className:"ios-btn-secondary h-10 rounded-md px-4 text-sm",children:"取消"})]})]},t.id)}),!u&&n.length===0&&e.jsx(B,{compact:!0,title:"暂无用户",description:"开放注册后,新注册的用户会出现在这里。",icon:h}),u&&e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(f,{className:"h-6 w-6 animate-spin text-[#d6b600]"})})]})]})]})};export{Y as default}; diff --git a/static/assets/activity-BGRjBy8G.js b/static/assets/activity-D09genEZ.js similarity index 89% rename from static/assets/activity-BGRjBy8G.js rename to static/assets/activity-D09genEZ.js index c615001..fef7f7f 100644 --- a/static/assets/activity-BGRjBy8G.js +++ b/static/assets/activity-D09genEZ.js @@ -1,4 +1,4 @@ -import{c as t}from"./index-BCb9Ylky.js";/** +import{c as t}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/check-BIO52wQW.js b/static/assets/check-C6LyX_Nv.js similarity index 86% rename from static/assets/check-BIO52wQW.js rename to static/assets/check-C6LyX_Nv.js index a229ee7..a8ee478 100644 --- a/static/assets/check-BIO52wQW.js +++ b/static/assets/check-C6LyX_Nv.js @@ -1,4 +1,4 @@ -import{c}from"./index-BCb9Ylky.js";/** +import{c}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/chevron-right-D40Kl_P-.js b/static/assets/chevron-right-pxFcnXJt.js similarity index 92% rename from static/assets/chevron-right-D40Kl_P-.js rename to static/assets/chevron-right-pxFcnXJt.js index 9d11978..321dd4a 100644 --- a/static/assets/chevron-right-D40Kl_P-.js +++ b/static/assets/chevron-right-pxFcnXJt.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-BCb9Ylky.js";/** +import{c as o}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/eye-DywCDhqk.js b/static/assets/eye-BibUMjxU.js similarity index 90% rename from static/assets/eye-DywCDhqk.js rename to static/assets/eye-BibUMjxU.js index da9aedb..dd57208 100644 --- a/static/assets/eye-DywCDhqk.js +++ b/static/assets/eye-BibUMjxU.js @@ -1,4 +1,4 @@ -import{c}from"./index-BCb9Ylky.js";/** +import{c}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/eye-off-CWiudZEM.js b/static/assets/eye-off-D1JuM9mR.js similarity index 92% rename from static/assets/eye-off-CWiudZEM.js rename to static/assets/eye-off-D1JuM9mR.js index dc44988..e9db8e4 100644 --- a/static/assets/eye-off-CWiudZEM.js +++ b/static/assets/eye-off-D1JuM9mR.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/flower-2-DmwUj7Qc.js b/static/assets/flower-2-B1FJm-vw.js similarity index 93% rename from static/assets/flower-2-DmwUj7Qc.js rename to static/assets/flower-2-B1FJm-vw.js index dff1d8c..792407a 100644 --- a/static/assets/flower-2-DmwUj7Qc.js +++ b/static/assets/flower-2-B1FJm-vw.js @@ -1,4 +1,4 @@ -import{c}from"./index-BCb9Ylky.js";/** +import{c}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/image-CpvPr1oL.js b/static/assets/image-BE6TxU00.js similarity index 90% rename from static/assets/image-CpvPr1oL.js rename to static/assets/image-BE6TxU00.js index 91c1fc1..a846027 100644 --- a/static/assets/image-CpvPr1oL.js +++ b/static/assets/image-BE6TxU00.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/index-BCb9Ylky.js b/static/assets/index-BZnqBmwp.js similarity index 86% rename from static/assets/index-BCb9Ylky.js rename to static/assets/index-BZnqBmwp.js index 273539e..0c67f62 100644 --- a/static/assets/index-BCb9Ylky.js +++ b/static/assets/index-BZnqBmwp.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-BqSYxYMH.js","assets/ui-DcVZvy8T.js","assets/package-CbDV2ANe.js","assets/trending-up-r2pDWepX.js","assets/activity-BGRjBy8G.js","assets/package-check-CEUjK1hJ.js","assets/AccountList-Lyt155CU.js","assets/check-BIO52wQW.js","assets/sparkles-Dw_-KUhM.js","assets/power-D2SYbVC-.js","assets/trash-2-D-oW6aaO.js","assets/key-DAHJOHIR.js","assets/eye-off-CWiudZEM.js","assets/eye-DywCDhqk.js","assets/save-cq1qPfv2.js","assets/OrderList-DUrGM6ZA.js","assets/plus-DVdQwMrj.js","assets/truck-DyCIYGWz.js","assets/search-DAVBnJPC.js","assets/flower-2-DmwUj7Qc.js","assets/square-pen-C-Z-gDiq.js","assets/chevron-right-D40Kl_P-.js","assets/CardList-CkB5V0PZ.js","assets/image-CpvPr1oL.js","assets/ItemList-HN0VsL5w.js","assets/shield-alert--Sbe2-vu.js","assets/power-off-D3lAodJa.js","assets/settings-2-BanKKh4_.js","assets/ProductAutomation-B-uvMI8m.js","assets/play-IOsY5Rdt.js","assets/link-2-DIsiJoFB.js","assets/AIReply-CSp6SZ4l.js","assets/message-square-text-BMJDYICF.js","assets/Settings-B4iT-2pS.js","assets/zap-B162HdXv.js","assets/Keywords-fyAYcEeY.js","assets/MessageManagement-C3dJ1ot-.js","assets/send-CYAobdMm.js","assets/NotificationsAndLogs-CXySSaLa.js","assets/pen-line-CudbazBc.js","assets/UserManagement-m20rmA1E.js","assets/About-V2zOAa0k.js","assets/BuyerInteraction-DzbRhyPP.js","assets/Resell-BxlYjwuk.js","assets/HotList-BLmZsZvH.js","assets/PriceWatch-BrSmVRsV.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-SIGinmod.js","assets/ui-B9Jzqjf7.js","assets/package-CDIx-vGO.js","assets/trending-up-BLnHDV6T.js","assets/activity-D09genEZ.js","assets/package-check-BKkFNxd0.js","assets/AccountList-BxMZ8Udh.js","assets/check-C6LyX_Nv.js","assets/sparkles-DVlvGI-3.js","assets/power-D9WTjX12.js","assets/trash-2-CmT2n80I.js","assets/key-C0msAg8e.js","assets/eye-off-D1JuM9mR.js","assets/eye-BibUMjxU.js","assets/save-Dxf2dvgb.js","assets/OrderList-ZwW4LdUq.js","assets/plus-BljRK6L8.js","assets/truck-3I9pdhz5.js","assets/search-FaxHcuoK.js","assets/flower-2-B1FJm-vw.js","assets/square-pen-Bmle-FRS.js","assets/chevron-right-pxFcnXJt.js","assets/CardList-Camdnn7z.js","assets/image-BE6TxU00.js","assets/ItemList-D_zO1nzP.js","assets/shield-alert-rM_NVGQr.js","assets/power-off-NLH-bTqs.js","assets/settings-2-CRN1TI2k.js","assets/ProductAutomation-MbnRCc-u.js","assets/play-P9T6ppIo.js","assets/link-2-CTuWzTfU.js","assets/AIReply-teRO4Zqo.js","assets/message-square-text-Bnj1FXzX.js","assets/Settings-C3ht1_iw.js","assets/zap-BWofDPZm.js","assets/Keywords-GHbY9xAn.js","assets/MessageManagement-B1rvp6fJ.js","assets/send-BjFPcqyQ.js","assets/NotificationsAndLogs-BsCaJ8H7.js","assets/pen-line-CmEoWNKp.js","assets/UserManagement-BCtLeLer.js","assets/About-B_6kryH7.js","assets/BuyerInteraction-DnC0dxfT.js","assets/Resell-45XAV9t5.js","assets/HotList-SDSWlemc.js","assets/PriceWatch-nQDi2og7.js"])))=>i.map(i=>d[i]); function xp(l,s){for(var c=0;cr[f]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function c(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 r(f){if(f.ep)return;f.ep=!0;const m=c(f);fetch(f.href,m)}})();function hh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Ic={exports:{}},lu={};/** * @license React * react-jsx-runtime.production.js @@ -7,7 +7,7 @@ function xp(l,s){for(var c=0;cre||(e.current=Se[re],Se[re]=null,re--)}function H(e,t){re++,Se[re]=e.current,e.current=t}var G=S(null),le=S(null),Z=S(null),k=S(null);function ue(e,t){switch(H(Z,t),H(le,e),H(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Id(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Id(t),e=Pd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(G),H(G,e)}function Te(){j(G),j(le),j(Z)}function Za(e){e.memoizedState!==null&&H(k,e);var t=G.current,a=Pd(t,e.type);t!==a&&(H(le,e),H(G,a))}function Ka(e){le.current===e&&(j(G),j(le)),k.current===e&&(j(k),eu._currentValue=P)}var Et,ol;function Zt(e){if(Et===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Et=t&&t[1]||"",ol=-1)":-1u||b[n]!==O[u]){var D=` -`+b[n].replace(" at new "," at ");return e.displayName&&D.includes("")&&(D=D.replace("",e.displayName)),D}while(1<=n&&0<=u);break}}}finally{At=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Zt(a):""}function dt(e,t){switch(e.tag){case 26:case 27:case 5:return Zt(e.type);case 16:return Zt("Lazy");case 13:return e.child!==t&&t!==null?Zt("Suspense Fallback"):Zt("Suspense");case 19:return Zt("SuspenseList");case 0:case 15:return ie(e.type,!1);case 11:return ie(e.type.render,!1);case 1:return ie(e.type,!0);case 31:return Zt("Activity");default:return""}}function Kt(e){try{var t="",a=null;do t+=dt(e,a),a=e,e=e.return;while(e);return t}catch(n){return` +`+b[n].replace(" at new "," at ");return e.displayName&&D.includes("")&&(D=D.replace("",e.displayName)),D}while(1<=n&&0<=u);break}}}finally{At=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Zt(a):""}function dt(e,t){switch(e.tag){case 26:case 27:case 5:return Zt(e.type);case 16:return Zt("Lazy");case 13:return e.child!==t&&t!==null?Zt("Suspense Fallback"):Zt("Suspense");case 19:return Zt("SuspenseList");case 0:case 15:return se(e.type,!1);case 11:return se(e.type.render,!1);case 1:return se(e.type,!0);case 31:return Zt("Activity");default:return""}}function Kt(e){try{var t="",a=null;do t+=dt(e,a),a=e,e=e.return;while(e);return t}catch(n){return` Error generating stack: `+n.message+` `+n.stack}}var Jt=Object.prototype.hasOwnProperty,vn=l.unstable_scheduleCallback,fl=l.unstable_cancelCallback,Ja=l.unstable_shouldYield,ty=l.unstable_requestPaint,Tt=l.unstable_now,ay=l.unstable_getCurrentPriorityLevel,Rr=l.unstable_ImmediatePriority,wr=l.unstable_UserBlockingPriority,mu=l.unstable_NormalPriority,ny=l.unstable_LowPriority,zr=l.unstable_IdlePriority,ly=l.log,uy=l.unstable_setDisableYieldValue,dl=null,Ot=null;function Sa(e){if(typeof ly=="function"&&uy(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(dl,e)}catch{}}var Nt=Math.clz32?Math.clz32:cy,iy=Math.log,sy=Math.LN2;function cy(e){return e>>>=0,e===0?32:31-(iy(e)/sy|0)|0}var hu=256,yu=262144,pu=4194304;function $a(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gu(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var d=n&134217727;return d!==0?(n=d&~i,n!==0?u=$a(n):(o&=d,o!==0?u=$a(o):a||(a=d&~e,a!==0&&(u=$a(a))))):(d=n&~i,d!==0?u=$a(d):o!==0?u=$a(o):a||(a=n&~e,a!==0&&(u=$a(a)))),u===0?0:t!==0&&t!==u&&(t&i)===0&&(i=u&-u,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:u}function ml(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ry(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jr(){var e=pu;return pu<<=1,(pu&62914560)===0&&(pu=4194304),e}function ki(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function hl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function oy(e,t,a,n,u,i){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var d=e.entanglements,b=e.expirationTimes,O=e.hiddenUpdates;for(a=o&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var py=/[\n"\\]/g;function qt(e){return e.replace(py,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zi(e,t,a,n,u,i,o,d){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ut(t)):e.value!==""+Ut(t)&&(e.value=""+Ut(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Ki(e,o,Ut(t)):a!=null?Ki(e,o,Ut(a)):n!=null&&e.removeAttribute("value"),u==null&&i!=null&&(e.defaultChecked=!!i),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+Ut(d):e.removeAttribute("name")}function Gr(e,t,a,n,u,i,o,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Qi(e);return}a=a!=null?""+Ut(a):"",t=t!=null?""+Ut(t):a,d||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=d?e.checked:!!n,e.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Qi(e)}function Ki(e,t,a){t==="number"&&Su(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Tn(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ii=!1;if(la)try{var bl={};Object.defineProperty(bl,"passive",{get:function(){Ii=!0}}),window.addEventListener("test",bl,bl),window.removeEventListener("test",bl,bl)}catch{Ii=!1}var xa=null,Pi=null,xu=null;function Wr(){if(xu)return xu;var e,t=Pi,a=t.length,n,u="value"in xa?xa.value:xa.textContent,i=u.length;for(e=0;e=_l),no=" ",lo=!1;function uo(e,t){switch(e){case"keyup":return Gy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function io(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wn=!1;function Zy(e,t){switch(e){case"compositionend":return io(t);case"keypress":return t.which!==32?null:(lo=!0,no);case"textInput":return e=t.data,e===no&&lo?null:e;default:return null}}function Ky(e,t){if(wn)return e==="compositionend"||!ls&&uo(e,t)?(e=Wr(),xu=Pi=xa=null,wn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=yo(a)}}function go(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?go(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Su(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Su(e.document)}return t}function ss(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 t0=la&&"documentMode"in document&&11>=document.documentMode,zn=null,cs=null,Tl=null,rs=!1;function vo(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;rs||zn==null||zn!==Su(n)||(n=zn,"selectionStart"in n&&ss(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}),Tl&&Al(Tl,n)||(Tl=n,n=yi(cs,"onSelect"),0>=o,u-=o,It=1<<32-Nt(t)+u|a<fe?(ge=$,$=null):ge=$.sibling;var xe=R(E,$,T[fe],M);if(xe===null){$===null&&($=ge);break}e&&$&&xe.alternate===null&&t(E,$),_=i(xe,_,fe),_e===null?I=xe:_e.sibling=xe,_e=xe,$=ge}if(fe===T.length)return a(E,$),ve&&ia(E,fe),I;if($===null){for(;fefe?(ge=$,$=null):ge=$.sibling;var Ga=R(E,$,xe.value,M);if(Ga===null){$===null&&($=ge);break}e&&$&&Ga.alternate===null&&t(E,$),_=i(Ga,_,fe),_e===null?I=Ga:_e.sibling=Ga,_e=Ga,$=ge}if(xe.done)return a(E,$),ve&&ia(E,fe),I;if($===null){for(;!xe.done;fe++,xe=T.next())xe=U(E,xe.value,M),xe!==null&&(_=i(xe,_,fe),_e===null?I=xe:_e.sibling=xe,_e=xe);return ve&&ia(E,fe),I}for($=n($);!xe.done;fe++,xe=T.next())xe=w($,E,fe,xe.value,M),xe!==null&&(e&&xe.alternate!==null&&$.delete(xe.key===null?fe:xe.key),_=i(xe,_,fe),_e===null?I=xe:_e.sibling=xe,_e=xe);return e&&$.forEach(function(_p){return t(E,_p)}),ve&&ia(E,fe),I}function je(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===X&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case F:e:{for(var I=T.key;_!==null;){if(_.key===I){if(I=T.type,I===X){if(_.tag===7){a(E,_.sibling),M=u(_,T.props.children),M.return=E,E=M;break e}}else if(_.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Le&&sn(I)===_.type){a(E,_.sibling),M=u(_,T.props),jl(M,T),M.return=E,E=M;break e}a(E,_);break}else t(E,_);_=_.sibling}T.type===X?(M=tn(T.props.children,E.mode,M,T.key),M.return=E,E=M):(M=Du(T.type,T.key,T.props,null,E.mode,M),jl(M,T),M.return=E,E=M)}return o(E);case W:e:{for(I=T.key;_!==null;){if(_.key===I)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){a(E,_.sibling),M=u(_,T.children||[]),M.return=E,E=M;break e}else{a(E,_);break}else t(E,_);_=_.sibling}M=ps(T,E.mode,M),M.return=E,E=M}return o(E);case Le:return T=sn(T),je(E,_,T,M)}if(Re(T))return J(E,_,T,M);if(ke(T)){if(I=ke(T),typeof I!="function")throw Error(r(150));return T=I.call(T),te(E,_,T,M)}if(typeof T.then=="function")return je(E,_,Lu(T),M);if(T.$$typeof===Q)return je(E,_,Uu(E,T),M);ku(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,_!==null&&_.tag===6?(a(E,_.sibling),M=u(_,T),M.return=E,E=M):(a(E,_),M=ys(T,E.mode,M),M.return=E,E=M),o(E)):a(E,_)}return function(E,_,T,M){try{zl=0;var I=je(E,_,T,M);return Yn=null,I}catch($){if($===kn||$===Bu)throw $;var _e=wt(29,$,null,E.mode);return _e.lanes=M,_e.return=E,_e}finally{}}}var rn=Vo(!0),Xo=Vo(!1),Na=!1;function Rs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ws(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ae&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=ju(e),Oo(e,null,a),t}return zu(e,n,t,a),ju(e)}function Dl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Cr(e,a)}}function zs(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?u=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?u=i=t:i=i.next=t}else u=i=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var js=!1;function Cl(){if(js){var e=Ln;if(e!==null)throw e}}function Ml(e,t,a,n){js=!1;var u=e.updateQueue;Na=!1;var i=u.firstBaseUpdate,o=u.lastBaseUpdate,d=u.shared.pending;if(d!==null){u.shared.pending=null;var b=d,O=b.next;b.next=null,o===null?i=O:o.next=O,o=b;var D=e.alternate;D!==null&&(D=D.updateQueue,d=D.lastBaseUpdate,d!==o&&(d===null?D.firstBaseUpdate=O:d.next=O,D.lastBaseUpdate=b))}if(i!==null){var U=u.baseState;o=0,D=O=b=null,d=i;do{var R=d.lane&-536870913,w=R!==d.lane;if(w?(pe&R)===R:(n&R)===R){R!==0&&R===Hn&&(js=!0),D!==null&&(D=D.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var J=e,te=d;R=t;var je=a;switch(te.tag){case 1:if(J=te.payload,typeof J=="function"){U=J.call(je,U,R);break e}U=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=te.payload,R=typeof J=="function"?J.call(je,U,R):J,R==null)break e;U=N({},U,R);break e;case 2:Na=!0}}R=d.callback,R!==null&&(e.flags|=64,w&&(e.flags|=8192),w=u.callbacks,w===null?u.callbacks=[R]:w.push(R))}else w={lane:R,tag:d.tag,payload:d.payload,callback:d.callback,next:null},D===null?(O=D=w,b=U):D=D.next=w,o|=R;if(d=d.next,d===null){if(d=u.shared.pending,d===null)break;w=d,d=w.next,w.next=null,u.lastBaseUpdate=w,u.shared.pending=null}}while(!0);D===null&&(b=U),u.baseState=b,u.firstBaseUpdate=O,u.lastBaseUpdate=D,i===null&&(u.shared.lanes=0),Ma|=o,e.lanes=o,e.memoizedState=U}}function Go(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Qo(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;ei?i:8;var o=z.T,d={};z.T=d,Fs(e,!1,t,a);try{var b=u(),O=z.S;if(O!==null&&O(d,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var D=o0(b,n);Bl(e,t,D,Mt(e))}else Bl(e,t,n,Mt(e))}catch(U){Bl(e,t,{then:function(){},status:"rejected",reason:U},Mt())}finally{L.p=i,o!==null&&d.types!==null&&(o.types=d.types),z.T=o}}function p0(){}function Js(e,t,a,n){if(e.tag!==5)throw Error(r(476));var u=Af(e).queue;Ef(e,u,t,P,a===null?p0:function(){return Tf(e),a(n)})}function Af(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:P},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Tf(e){var t=Af(e);t.next===null&&(t=e.alternate.memoizedState),Bl(e,t.next.queue,{},Mt())}function $s(){return lt(eu)}function Of(){return Ge().memoizedState}function Nf(){return Ge().memoizedState}function g0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Mt();e=Ra(a);var n=wa(t,e,a);n!==null&&(St(n,t,a),Dl(n,t,a)),t={cache:As()},e.payload=t;return}t=t.return}}function b0(e,t,a){var n=Mt();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Fu(e)?wf(t,a):(a=ms(e,t,a,n),a!==null&&(St(a,e,n),zf(a,t,n)))}function Rf(e,t,a){var n=Mt();Bl(e,t,a,n)}function Bl(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fu(e))wf(t,u);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,d=i(o,a);if(u.hasEagerState=!0,u.eagerState=d,Rt(d,o))return zu(e,t,u,0),Ce===null&&wu(),!1}catch{}finally{}if(a=ms(e,t,u,n),a!==null)return St(a,e,n),zf(a,t,n),!0}return!1}function Fs(e,t,a,n){if(n={lane:2,revertLane:Rc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fu(e)){if(t)throw Error(r(479))}else t=ms(e,a,n,2),t!==null&&St(t,e,2)}function Fu(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function wf(e,t){Xn=Xu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function zf(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Cr(e,a)}}var Hl={readContext:lt,use:Zu,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Hl.useEffectEvent=Ye;var jf={readContext:lt,use:Zu,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:hf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ju(4194308,4,bf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ju(4194308,4,e,t)},useInsertionEffect:function(e,t){Ju(4,2,e,t)},useMemo:function(e,t){var a=mt();t=t===void 0?null:t;var n=e();if(on){Sa(!0);try{e()}finally{Sa(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=mt();if(a!==void 0){var u=a(t);if(on){Sa(!0);try{a(t)}finally{Sa(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=b0.bind(null,oe,e),[n.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Xs(e);var t=e.queue,a=Rf.bind(null,oe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Zs,useDeferredValue:function(e,t){var a=mt();return Ks(a,e,t)},useTransition:function(){var e=Xs(!1);return e=Ef.bind(null,oe,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=oe,u=mt();if(ve){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ce===null)throw Error(r(349));(pe&127)!==0||Wo(n,t,a)}u.memoizedState=a;var i={value:a,getSnapshot:t};return u.queue=i,hf(Po.bind(null,n,i,e),[e]),n.flags|=2048,Qn(9,{destroy:void 0},Io.bind(null,n,i,a,t),null),a},useId:function(){var e=mt(),t=Ce.identifierPrefix;if(ve){var a=Pt,n=It;a=(n&~(1<<32-Nt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Gu++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(u,{is:n.is}):o.createElement(u)}}i[at]=t,i[ht]=n;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(it(i,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&da(t)}}return qe(t),oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&da(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(r(166));if(e=Z.current,qn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=nt,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[at]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Fd(e.nodeValue,a)),e||Ta(t,!0)}else e=pi(e).createTextNode(n),e[at]=t,t.stateNode=e}return qe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=qn(t),a!==null){if(e===null){if(!n)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[at]=t}else an(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else a=Ss(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(jt(t),t):(jt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=qn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[at]=t}else an(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),u=!1}else u=Ss(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(jt(t),t):(jt(t),null)}return jt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ti(t,t.updateQueue),qe(t),null);case 4:return Te(),e===null&&Dc(t.stateNode.containerInfo),qe(t),null;case 10:return ca(t.type),qe(t),null;case 19:if(j(Xe),n=t.memoizedState,n===null)return qe(t),null;if(u=(t.flags&128)!==0,i=n.rendering,i===null)if(u)kl(n,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Vu(e),i!==null){for(t.flags|=128,kl(n,!1),e=i.updateQueue,t.updateQueue=e,ti(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)No(a,e),a=a.sibling;return H(Xe,Xe.current&1|2),ve&&ia(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Tt()>ii&&(t.flags|=128,u=!0,kl(n,!1),t.lanes=4194304)}else{if(!u)if(e=Vu(i),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,ti(t,e),kl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!ve)return qe(t),null}else 2*Tt()-n.renderingStartTime>ii&&a!==536870912&&(t.flags|=128,u=!0,kl(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Tt(),e.sibling=null,a=Xe.current,H(Xe,u?a&1|2:a&1),ve&&ia(t,n.treeForkCount),e):(qe(t),null);case 22:case 23:return jt(t),Cs(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),a=t.updateQueue,a!==null&&ti(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&j(un),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ca(Ze),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function E0(e,t){switch(bs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ca(Ze),Te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ka(t),null;case 31:if(t.memoizedState!==null){if(jt(t),t.alternate===null)throw Error(r(340));an()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));an()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(Xe),null;case 4:return Te(),null;case 10:return ca(t.type),null;case 22:case 23:return jt(t),Cs(),e!==null&&j(un),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ca(Ze),null;case 25:return null;default:return null}}function td(e,t){switch(bs(t),t.tag){case 3:ca(Ze),Te();break;case 26:case 27:case 5:Ka(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&jt(t);break;case 13:jt(t);break;case 19:j(Xe);break;case 10:ca(t.type);break;case 22:case 23:jt(t),Cs(),e!==null&&j(un);break;case 24:ca(Ze)}}function Yl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var i=a.create,o=a.inst;n=i(),o.destroy=n}a=a.next}while(a!==u)}}catch(d){Ne(t,t.return,d)}}function Da(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var i=u.next;n=i;do{if((n.tag&e)===e){var o=n.inst,d=o.destroy;if(d!==void 0){o.destroy=void 0,u=t;var b=a,O=d;try{O()}catch(D){Ne(u,b,D)}}}n=n.next}while(n!==i)}}catch(D){Ne(t,t.return,D)}}function ad(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Qo(t,a)}catch(n){Ne(e,e.return,n)}}}function nd(e,t,a){a.props=fn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ne(e,t,n)}}function Vl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){Ne(e,t,u)}}function ea(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){Ne(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Ne(e,t,u)}else a.current=null}function ld(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(u){Ne(e,e.return,u)}}function fc(e,t,a){try{var n=e.stateNode;Q0(n,e.type,a,t),n[ht]=t}catch(u){Ne(e,e.return,u)}}function ud(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&La(e.type)||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ud(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&La(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=na));else if(n!==4&&(n===27&&La(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(mc(e,t,a),e=e.sibling;e!==null;)mc(e,t,a),e=e.sibling}function ai(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&La(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ai(e,t,a),e=e.sibling;e!==null;)ai(e,t,a),e=e.sibling}function id(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);it(t,n,a),t[at]=e,t[ht]=a}catch(i){Ne(e,e.return,i)}}var ma=!1,$e=!1,hc=!1,sd=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function A0(e,t){if(e=e.containerInfo,Uc=Ei,e=bo(e),ss(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var o=0,d=-1,b=-1,O=0,D=0,U=e,R=null;t:for(;;){for(var w;U!==a||u!==0&&U.nodeType!==3||(d=o+u),U!==i||n!==0&&U.nodeType!==3||(b=o+n),U.nodeType===3&&(o+=U.nodeValue.length),(w=U.firstChild)!==null;)R=U,U=w;for(;;){if(U===e)break t;if(R===a&&++O===u&&(d=o),R===i&&++D===n&&(b=o),(w=U.nextSibling)!==null)break;U=R,R=U.parentNode}U=w}a=d===-1||b===-1?null:{start:d,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(qc={focusedElem:e,selectionRange:a},Ei=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){switch(t=Ie,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),it(i,n,a),i[at]=e,We(i),n=i;break e;case"link":var o=mm("link","href",u).get(n+(a.href||""));if(o){for(var d=0;dje&&(o=je,je=te,te=o);var E=po(d,te),_=po(d,je);if(E&&_&&(w.rangeCount!==1||w.anchorNode!==E.node||w.anchorOffset!==E.offset||w.focusNode!==_.node||w.focusOffset!==_.offset)){var T=U.createRange();T.setStart(E.node,E.offset),w.removeAllRanges(),te>je?(w.addRange(T),w.extend(_.node,_.offset)):(T.setEnd(_.node,_.offset),w.addRange(T))}}}}for(U=[],w=d;w=w.parentNode;)w.nodeType===1&&U.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;da?32:a,z.T=null,a=_c,_c=null;var i=qa,o=ba;if(Fe=0,Fn=qa=null,ba=0,(Ae&6)!==0)throw Error(r(331));var d=Ae;if(Ae|=4,bd(i.current),yd(i,i.current,o,a),Ae=d,Jl(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(dl,i)}catch{}return!0}finally{L.p=u,z.T=n,qd(e,t)}}function Hd(e,t,a){t=Ht(a,t),t=ec(e.stateNode,t,2),e=wa(e,t,2),e!==null&&(hl(e,2),ta(e))}function Ne(e,t,a){if(e.tag===3)Hd(e,e,a);else for(;t!==null;){if(t.tag===3){Hd(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ua===null||!Ua.has(n))){e=Ht(a,e),a=Lf(2),n=wa(t,a,2),n!==null&&(kf(a,n,t,e),hl(n,2),ta(n));break}}t=t.return}}function Tc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new N0;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(gc=!0,u.add(a),e=D0.bind(null,e,t,a),t.then(e,e))}function D0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ce===e&&(pe&a)===a&&(Ve===4||Ve===3&&(pe&62914560)===pe&&300>Tt()-ui?(Ae&2)===0&&Wn(e,0):bc|=a,$n===pe&&($n=0)),ta(e)}function Ld(e,t){t===0&&(t=jr()),e=en(e,t),e!==null&&(hl(e,t),ta(e))}function C0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ld(e,a)}function M0(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(t),Ld(e,a)}function U0(e,t){return vn(e,t)}var di=null,Pn=null,Oc=!1,mi=!1,Nc=!1,Ha=0;function ta(e){e!==Pn&&e.next===null&&(Pn===null?di=Pn=e:Pn=Pn.next=e),mi=!0,Oc||(Oc=!0,B0())}function Jl(e,t){if(!Nc&&mi){Nc=!0;do for(var a=!1,n=di;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var i=0;else{var o=n.suspendedLanes,d=n.pingedLanes;i=(1<<31-Nt(42|e)+1)-1,i&=u&~(o&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Xd(n,i))}else i=pe,i=gu(n,n===Ce?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||ml(n,i)||(a=!0,Xd(n,i));n=n.next}while(a);Nc=!1}}function q0(){kd()}function kd(){mi=Oc=!1;var e=0;Ha!==0&&K0()&&(e=Ha);for(var t=Tt(),a=null,n=di;n!==null;){var u=n.next,i=Yd(n,t);i===0?(n.next=null,a===null?di=u:a.next=u,u===null&&(Pn=a)):(a=n,(e!==0||(i&3)!==0)&&(mi=!0)),n=u}Fe!==0&&Fe!==5||Jl(e),Ha!==0&&(Ha=0)}function Yd(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,i=e.pendingLanes&-62914561;0d)break;var D=b.transferSize,U=b.initiatorType;D&&Wd(U)&&(b=b.responseEnd,o+=D*(b"u"?null:document;function rm(e,t,a){var n=el;if(n&&typeof t=="string"&&t){var u=qt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),cm.has(u)||(cm.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),it(t,"link",e),We(t),n.head.appendChild(t)))}}function ap(e){va.D(e),rm("dns-prefetch",e,null)}function np(e,t){va.C(e,t),rm("preconnect",e,t)}function lp(e,t,a){va.L(e,t,a);var n=el;if(n&&e&&t){var u='link[rel="preload"][as="'+qt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+qt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+qt(a.imageSizes)+'"]')):u+='[href="'+qt(e)+'"]';var i=u;switch(t){case"style":i=tl(e);break;case"script":i=al(e)}Gt.has(i)||(e=N({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Gt.set(i,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Il(i))||t==="script"&&n.querySelector(Pl(i))||(t=n.createElement("link"),it(t,"link",e),We(t),n.head.appendChild(t)))}}function up(e,t){va.m(e,t);var a=el;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+qt(n)+'"][href="'+qt(e)+'"]',i=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=al(e)}if(!Gt.has(i)&&(e=N({rel:"modulepreload",href:e},t),Gt.set(i,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Pl(i)))return}n=a.createElement("link"),it(n,"link",e),We(n),a.head.appendChild(n)}}}function ip(e,t,a){va.S(e,t,a);var n=el;if(n&&e){var u=En(n).hoistableStyles,i=tl(e);t=t||"default";var o=u.get(i);if(!o){var d={loading:0,preload:null};if(o=n.querySelector(Il(i)))d.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Gt.get(i))&&Xc(e,a);var b=o=n.createElement("link");We(b),it(b,"link",e),b._p=new Promise(function(O,D){b.onload=O,b.onerror=D}),b.addEventListener("load",function(){d.loading|=1}),b.addEventListener("error",function(){d.loading|=2}),d.loading|=4,bi(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:d},u.set(i,o)}}}function sp(e,t){va.X(e,t);var a=el;if(a&&e){var n=En(a).hoistableScripts,u=al(e),i=n.get(u);i||(i=a.querySelector(Pl(u)),i||(e=N({src:e,async:!0},t),(t=Gt.get(u))&&Gc(e,t),i=a.createElement("script"),We(i),it(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(u,i))}}function cp(e,t){va.M(e,t);var a=el;if(a&&e){var n=En(a).hoistableScripts,u=al(e),i=n.get(u);i||(i=a.querySelector(Pl(u)),i||(e=N({src:e,async:!0,type:"module"},t),(t=Gt.get(u))&&Gc(e,t),i=a.createElement("script"),We(i),it(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(u,i))}}function om(e,t,a,n){var u=(u=Z.current)?gi(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=tl(a.href),a=En(u).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=tl(a.href);var i=En(u).hoistableStyles,o=i.get(e);if(o||(u=u.ownerDocument||u,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=u.querySelector(Il(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Gt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Gt.set(e,a),i||rp(u,e,a,o.state))),t&&n===null)throw Error(r(528,""));return o}if(t&&n!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=al(a),a=En(u).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function tl(e){return'href="'+qt(e)+'"'}function Il(e){return'link[rel="stylesheet"]['+e+"]"}function fm(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function rp(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),it(t,"link",a),We(t),e.head.appendChild(t))}function al(e){return'[src="'+qt(e)+'"]'}function Pl(e){return"script[async]"+e}function dm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+qt(a.href)+'"]');if(n)return t.instance=n,We(n),n;var u=N({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),We(n),it(n,"style",u),bi(n,a.precedence,e),t.instance=n;case"stylesheet":u=tl(a.href);var i=e.querySelector(Il(u));if(i)return t.state.loading|=4,t.instance=i,We(i),i;n=fm(a),(u=Gt.get(u))&&Xc(n,u),i=(e.ownerDocument||e).createElement("link"),We(i);var o=i;return o._p=new Promise(function(d,b){o.onload=d,o.onerror=b}),it(i,"link",n),t.state.loading|=4,bi(i,a.precedence,e),t.instance=i;case"script":return i=al(a.src),(u=e.querySelector(Pl(i)))?(t.instance=u,We(u),u):(n=a,(u=Gt.get(i))&&(n=N({},a),Gc(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),We(u),it(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,bi(n,a.precedence,e));return t.instance}function bi(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,i=u,o=0;o title"):null)}function op(e,t,a){if(a===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 ym(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fp(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=tl(n.href),i=t.querySelector(Il(u));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Si.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,We(i);return}i=t.ownerDocument||t,n=fm(n),(u=Gt.get(u))&&Xc(n,u),i=i.createElement("link"),We(i);var o=i;o._p=new Promise(function(d,b){o.onload=d,o.onerror=b}),it(i,"link",n),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Si.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Qc=0;function dp(e,t){return e.stylesheets&&e.count===0&&xi(e,e.stylesheets),0Qc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Si(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _i=null;function xi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_i=new Map,t.forEach(mp,e),_i=null,Si.call(e))}function mp(e,t){if(!(t.state.loading&4)){var a=_i.get(e);if(a)var n=a.get(null);else{a=new Map,_i.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),er.exports=wp(),er.exports}var jp=zp();const Dp=hh(jp),Cp="modulepreload",Mp=function(l){return"/static/"+l},Lm={},et=function(s,c,r){let f=Promise.resolve();if(c&&c.length>0){let h=function(g){return Promise.all(g.map(A=>Promise.resolve(A).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),v=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));f=h(c.map(g=>{if(g=Mp(g),g in Lm)return;Lm[g]=!0;const A=g.endsWith(".css"),N=A?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${N}`))return;const q=document.createElement("link");if(q.rel=A?"stylesheet":Cp,A||(q.as="script"),q.crossOrigin="",q.href=g,v&&q.setAttribute("nonce",v),document.head.appendChild(q),A)return new Promise((F,W)=>{q.addEventListener("load",F),q.addEventListener("error",()=>W(new Error(`Unable to preload CSS for ${g}`)))})}))}function m(h){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=h,window.dispatchEvent(p),!p.defaultPrevented)throw h}return f.then(h=>{for(const p of h||[])p.status==="rejected"&&m(p.reason);return s().catch(m)})};var Up=ph();/** @@ -269,10 +269,10 @@ Error generating stack: `+n.message+` * See the LICENSE file in the root directory of this source tree. */const ag=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_h=de("x",ag),fr="xianyu-theme-preference",xh="(prefers-color-scheme: dark)",Eh=B.createContext(null),Ah=l=>l==="light"||l==="dark"||l==="system"?l:"system",ng=()=>{if(typeof window>"u")return"system";try{return Ah(window.localStorage.getItem(fr))}catch{return"system"}},lg=()=>typeof window>"u"?"light":window.matchMedia(xh).matches?"dark":"light",ug=({children:l})=>{const[s,c]=B.useState(ng),[r,f]=B.useState(lg);B.useEffect(()=>{const v=window.matchMedia(xh),g=A=>{f(A.matches?"dark":"light")};return f(v.matches?"dark":"light"),v.addEventListener("change",g),()=>v.removeEventListener("change",g)},[]),B.useEffect(()=>{const v=g=>{g.key===fr&&c(Ah(g.newValue))};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[]);const m=s==="system"?r:s;B.useLayoutEffect(()=>{const v=document.documentElement;v.dataset.theme=m,v.dataset.themePreference=s,v.classList.toggle("dark",m==="dark"),v.style.colorScheme=m;try{window.localStorage.setItem(fr,s)}catch{}},[m,s]);const h=B.useCallback(v=>{c(v)},[]),p=B.useMemo(()=>({theme:s,resolvedTheme:m,setTheme:h}),[m,h,s]);return y.jsx(Eh.Provider,{value:p,children:l})},ig=()=>{const l=B.useContext(Eh);if(!l)throw new Error("useTheme must be used inside ThemeProvider");return l},ll=[{value:"light",label:"浅色",description:"使用浅色主题",icon:X1},{value:"dark",label:"深色",description:"使用深色主题",icon:z1},{value:"system",label:"自动",description:"跟随系统外观",icon:R1}],dr=({compact:l=!1,className:s=""})=>{const{theme:c,resolvedTheme:r,setTheme:f}=ig(),m=(h,p)=>{var A,N;let v=p;if(h.key==="ArrowRight"||h.key==="ArrowDown")v=(p+1)%ll.length;else if(h.key==="ArrowLeft"||h.key==="ArrowUp")v=(p-1+ll.length)%ll.length;else if(h.key==="Home")v=0;else if(h.key==="End")v=ll.length-1;else return;h.preventDefault();const g=ll[v].value;f(g),(N=(A=h.currentTarget.parentElement)==null?void 0:A.querySelector(`[data-theme-option="${g}"]`))==null||N.focus()};return y.jsxs("div",{className:`theme-picker ${l?"theme-picker--compact":""} ${s}`.trim(),"data-resolved-theme":r,children:[!l&&y.jsxs("div",{className:"theme-picker__heading",children:[y.jsx("span",{children:"显示主题"}),y.jsx("span",{className:"theme-picker__status",children:c==="system"?`自动 · ${r==="dark"?"深色":"浅色"}`:c==="dark"?"深色":"浅色"})]}),y.jsx("div",{className:"theme-switcher",role:"radiogroup","aria-label":"显示主题",children:ll.map((h,p)=>{const v=h.icon,g=c===h.value;return y.jsxs("button",{type:"button",role:"radio","aria-checked":g,"aria-label":h.description,title:h.description,tabIndex:g?0:-1,"data-theme-option":h.value,className:`theme-switcher__option ${g?"theme-switcher__option--active":""}`,onClick:()=>f(h.value),onKeyDown:A=>m(A,p),children:[y.jsx(v,{className:"h-3.5 w-3.5"}),!l&&y.jsx("span",{children:h.label})]},h.value)})})]})};function Th(l,s){return function(){return l.apply(s,arguments)}}const{toString:sg}=Object.prototype,{getPrototypeOf:sl}=Object,{iterator:ru,toStringTag:Oh}=Symbol,Mi=(({hasOwnProperty:l})=>(s,c)=>l.call(s,c))(Object.prototype),cu=(l,s)=>{let c=l;const r=[];for(;c!=null&&c!==Object.prototype;){if(r.indexOf(c)!==-1)return!1;if(r.push(c),Mi(c,s))return!0;c=sl(c)}return!1},cg=(l,s)=>l!=null&&cu(l,s)?l[s]:void 0,Sr=(l=>s=>{const c=sg.call(s);return l[c]||(l[c]=c.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=l=>(l=l.toLowerCase(),s=>Sr(s)===l),Bi=l=>s=>typeof s===l,{isArray:pn}=Array,gn=Bi("undefined");function cl(l){return l!==null&&!gn(l)&&l.constructor!==null&&!gn(l.constructor)&&_t(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const Nh=Qt("ArrayBuffer");function rg(l){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(l):s=l&&l.buffer&&Nh(l.buffer),s}const og=Bi("string"),_t=Bi("function"),Rh=Bi("number"),rl=l=>l!==null&&typeof l=="object",fg=l=>l===!0||l===!1,ji=l=>{if(!rl(l))return!1;const s=sl(l);return(s===null||s===Object.prototype||sl(s)===null)&&!cu(l,Oh)&&!cu(l,ru)},dg=l=>{if(!rl(l)||cl(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},mg=Qt("Date"),hg=Qt("File"),yg=l=>!!(l&&typeof l.uri<"u"),pg=l=>l&&typeof l.getParts<"u",gg=Qt("Blob"),bg=Qt("FileList"),vg=Qt("Set"),Sg=l=>rl(l)&&_t(l.pipe);function _g(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qm=_g(),Zm=typeof Qm.FormData<"u"?Qm.FormData:void 0,xg=l=>{if(!l)return!1;if(Zm&&l instanceof Zm)return!0;const s=sl(l);if(!s||s===Object.prototype||!_t(l.append))return!1;const c=Sr(l);return c==="formdata"||c==="object"&&_t(l.toString)&&l.toString()==="[object FormData]"},Eg=Qt("URLSearchParams"),[Ag,Tg,Og,Ng]=["ReadableStream","Request","Response","Headers"].map(Qt),Rg=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ou(l,s,{allOwnKeys:c=!1}={}){if(l===null||typeof l>"u")return;let r,f;if(typeof l!="object"&&(l=[l]),pn(l))for(r=0,f=l.length;r0;)if(f=c[r],s===f.toLowerCase())return f;return null}const hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zh=l=>!gn(l)&&l!==hn;function mr(...l){const{caseless:s,skipUndefined:c}=zh(this)&&this||{},r={},f=(m,h)=>{if(h==="__proto__"||h==="constructor"||h==="prototype")return;const p=s&&typeof h=="string"&&wh(r,h)||h,v=Mi(r,p)?r[p]:void 0;ji(v)&&ji(m)?r[p]=mr(v,m):ji(m)?r[p]=mr({},m):pn(m)?r[p]=m.slice():(!c||!gn(m))&&(r[p]=m)};for(let m=0,h=l.length;m(ou(s,(f,m)=>{c&&_t(f)?Object.defineProperty(l,m,{__proto__:null,value:Th(f,c),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(l,m,{__proto__:null,value:f,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),l),zg=l=>(l.charCodeAt(0)===65279&&(l=l.slice(1)),l),jg=(l,s,c,r)=>{l.prototype=Object.create(s.prototype,r),Object.defineProperty(l.prototype,"constructor",{__proto__:null,value:l,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(l,"super",{__proto__:null,value:s.prototype}),c&&Object.assign(l.prototype,c)},Dg=(l,s,c,r)=>{let f,m,h;const p={};if(s=s||{},l==null)return s;do{for(f=Object.getOwnPropertyNames(l),m=f.length;m-- >0;)h=f[m],(!r||r(h,l,s))&&!p[h]&&(s[h]=l[h],p[h]=!0);l=c!==!1&&sl(l)}while(l&&(!c||c(l,s))&&l!==Object.prototype);return s},Cg=(l,s,c)=>{l=String(l),(c===void 0||c>l.length)&&(c=l.length),c-=s.length;const r=l.indexOf(s,c);return r!==-1&&r===c},Mg=l=>{if(!l)return null;if(pn(l))return l;let s=l.length;if(!Rh(s))return null;const c=new Array(s);for(;s-- >0;)c[s]=l[s];return c},Ug=(l=>s=>l&&s instanceof l)(typeof Uint8Array<"u"&&sl(Uint8Array)),qg=(l,s)=>{const r=(l&&l[ru]).call(l);let f;for(;(f=r.next())&&!f.done;){const m=f.value;s.call(l,m[0],m[1])}},Bg=(l,s)=>{let c;const r=[];for(;(c=l.exec(s))!==null;)r.push(c);return r},Hg=Qt("HTMLFormElement"),Lg=l=>l.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(c,r,f){return r.toUpperCase()+f}),{propertyIsEnumerable:kg}=Object.prototype,Yg=Qt("RegExp"),jh=(l,s)=>{const c=Object.getOwnPropertyDescriptors(l),r={};ou(c,(f,m)=>{let h;(h=s(f,m,l))!==!1&&(r[m]=h||f)}),Object.defineProperties(l,r)},Vg=l=>{jh(l,(s,c)=>{if(_t(l)&&["arguments","caller","callee"].includes(c))return!1;const r=l[c];if(_t(r)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+c+"'")})}})},Xg=(l,s)=>{const c={},r=f=>{f.forEach(m=>{c[m]=!0})};return pn(l)?r(l):r(String(l).split(s)),c},Gg=()=>{},Qg=(l,s)=>l!=null&&Number.isFinite(l=+l)?l:s;function Zg(l){return!!(l&&_t(l.append)&&l[Oh]==="FormData"&&l[ru])}const Kg=l=>{const s=new WeakSet,c=r=>{if(rl(r)){if(s.has(r))return;if(cl(r))return r;if(!("toJSON"in r)){s.add(r);let f;if(vg(r)){f=[];for(const m of r){const h=c(m);!gn(h)&&f.push(h)}}else f=pn(r)?[]:{},ou(r,(m,h)=>{const p=c(m);!gn(p)&&(f[h]=p)});return s.delete(r),f}}return r};return c(l)},Jg=Qt("AsyncFunction"),$g=l=>l&&(rl(l)||_t(l))&&_t(l.then)&&_t(l.catch),Dh=((l,s)=>l?setImmediate:s?((c,r)=>(hn.addEventListener("message",({source:f,data:m})=>{f===hn&&m===c&&r.length&&r.shift()()},!1),f=>{r.push(f),hn.postMessage(c,"*")}))(`axios@${Math.random()}`,[]):c=>setTimeout(c))(typeof setImmediate=="function",_t(hn.postMessage)),Fg=typeof queueMicrotask<"u"?queueMicrotask.bind(hn):typeof process<"u"&&process.nextTick||Dh,Ch=l=>l!=null&&_t(l[ru]),Wg=l=>l!=null&&cu(l,ru)&&Ch(l),x={isArray:pn,isArrayBuffer:Nh,isBuffer:cl,isFormData:xg,isArrayBufferView:rg,isString:og,isNumber:Rh,isBoolean:fg,isObject:rl,isPlainObject:ji,isEmptyObject:dg,isReadableStream:Ag,isRequest:Tg,isResponse:Og,isHeaders:Ng,isUndefined:gn,isDate:mg,isFile:hg,isReactNativeBlob:yg,isReactNative:pg,isBlob:gg,isRegExp:Yg,isFunction:_t,isStream:Sg,isURLSearchParams:Eg,isTypedArray:Ug,isFileList:bg,forEach:ou,merge:mr,extend:wg,trim:Rg,stripBOM:zg,inherits:jg,toFlatObject:Dg,kindOf:Sr,kindOfTest:Qt,endsWith:Cg,toArray:Mg,forEachEntry:qg,matchAll:Bg,isHTMLForm:Hg,hasOwnProperty:Mi,hasOwnProp:Mi,hasOwnInPrototypeChain:cu,getSafeProp:cg,reduceDescriptors:jh,freezeMethods:Vg,toObjectSet:Xg,toCamelCase:Lg,noop:Gg,toFiniteNumber:Qg,findKey:wh,global:hn,isContextDefined:zh,isSpecCompliantForm:Zg,toJSONObject:Kg,isAsyncFn:Jg,isThenable:$g,setImmediate:Dh,asap:Fg,isIterable:Ch,isSafeIterable:Wg},Ig=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pg=l=>{const s={};let c,r,f;return l&&l.split(` `).forEach(function(h){f=h.indexOf(":"),c=h.substring(0,f).trim().toLowerCase(),r=h.substring(f+1).trim();const p=x.hasOwnProp(s,c);!c||p&&x.hasOwnProp(Ig,c)||(c==="set-cookie"?p?s[c].push(r):s[c]=[r]:s[c]=p?s[c]+", "+r:r)}),s};function eb(l){let s=0,c=l.length;for(;ss;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}const tb=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ab=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function _r(l,s){return x.isArray(l)?l.map(c=>_r(c,s)):eb(String(l).replace(s,""))}const nb=l=>_r(l,tb),lb=l=>_r(l,ab);function Mh(l){const s=Object.create(null);return x.forEach(l.toJSON(),(c,r)=>{s[r]=lb(c)}),s}const Km=Symbol("internals");function iu(l){return l&&String(l).trim().toLowerCase()}function Di(l){return l===!1||l==null?l:x.isArray(l)?l.map(Di):nb(String(l))}function ub(l){const s=Object.create(null),c=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=c.exec(l);)s[r[1]]=r[2];return s}const ib=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function lr(l){let s=0,c=l.length;for(;ss;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}function sb(l){const s=l.length-1;if(s<1||l.charCodeAt(0)!==34||l.charCodeAt(s)!==34)return l;let c="";for(let r=1;r=s))return l;c+=l[r]}return c}function cb(l){const s=Object.create(null),c=String(l);let r=0,f=!1,m=!1;function h(p){const v=lr(c.slice(r,p)),g=v.indexOf("=");if(g<1)return;const A=lr(v.slice(0,g));if(!ib.test(A))return;const N=A.toLowerCase();if(N==="__proto__"||N==="constructor"||N==="prototype")return;const q=lr(v.slice(g+1));s[N]=sb(q)}for(let p=0;p/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function ur(l,s,c,r,f){if(x.isFunction(r))return r.call(this,s,c);if(f&&(s=c),!!x.isString(s)){if(x.isString(r))return s.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(s)}}function ob(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,c,r)=>c.toUpperCase()+r)}function fb(l,s){const c=x.toCamelCase(" "+s);["get","set","has"].forEach(r=>{Object.defineProperty(l,r+c,{__proto__:null,value:function(f,m,h){return this[r].call(this,s,f,m,h)},configurable:!0})})}let ft=class{constructor(s){s&&this.set(s)}set(s,c,r){const f=this;function m(p,v,g){const A=iu(v);if(!A)return;const N=x.findKey(f,A);(!N||f[N]===void 0||g===!0||g===void 0&&f[N]!==!1)&&(f[N||v]=Di(p))}const h=(p,v)=>x.forEach(p,(g,A)=>m(g,A,v));if(x.isPlainObject(s)||s instanceof this.constructor)h(s,c);else if(x.isString(s)&&(s=s.trim())&&!rb(s))h(Pg(s),c);else if(x.isObject(s)&&x.isSafeIterable(s)){let p=Object.create(null),v,g;for(const A of s){if(!x.isArray(A))throw new TypeError("Object iterator must return a key-value pair");g=A[0],x.hasOwnProp(p,g)?(v=p[g],p[g]=x.isArray(v)?[...v,A[1]]:[v,A[1]]):p[g]=A[1]}h(p,c)}else s!=null&&m(c,s,r);return this}get(s,c){if(s=iu(s),s){const r=x.findKey(this,s);if(r){const f=this[r];if(!c)return f;if(c===!0)return ub(f);if(x.isFunction(c))return c.call(this,f,r);if(x.isRegExp(c))return c.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,c){if(s=iu(s),s){const r=x.findKey(this,s);return!!(r&&this[r]!==void 0&&(!c||ur(this,this[r],r,c)))}return!1}delete(s,c){const r=this;let f=!1;function m(h){if(h=iu(h),h){const p=x.findKey(r,h);p&&(!c||ur(r,r[p],p,c))&&(delete r[p],f=!0)}}return x.isArray(s)?s.forEach(m):m(s),f}clear(s){const c=Object.keys(this);let r=c.length,f=!1;for(;r--;){const m=c[r];(!s||ur(this,this[m],m,s,!0))&&(delete this[m],f=!0)}return f}normalize(s){const c=this,r={};return x.forEach(this,(f,m)=>{const h=x.findKey(r,m);if(h){c[h]=Di(f),delete c[m];return}const p=s?ob(m):String(m).trim();p!==m&&delete c[m],c[p]=Di(f),r[p]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const c=Object.create(null);return x.forEach(this,(r,f)=>{r!=null&&r!==!1&&(c[f]=s&&x.isArray(r)?r.join(", "):r)}),c}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,c])=>s+": "+c).join(` -`)}getSetCookie(){const s=this.get("set-cookie");return x.isArray(s)?s:s==null||s===!1?[]:[s]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static parseParameters(s){return cb(s)}static concat(s,...c){const r=new this(s);return c.forEach(f=>r.set(f)),r}static accessor(s){const r=(this[Km]=this[Km]={accessors:{}}).accessors,f=this.prototype;function m(h){const p=iu(h);r[p]||(fb(f,h),r[p]=!0)}return x.isArray(s)?s.forEach(m):m(s),this}};ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ft.prototype,({value:l},s)=>{let c=s[0].toUpperCase()+s.slice(1);return{get:()=>l,set(r){this[c]=r}}});x.freezeMethods(ft);const Ui="[REDACTED ****]";function db(l){if(x.hasOwnProp(l,"toJSON"))return!0;let s=Object.getPrototypeOf(l);for(;s&&s!==Object.prototype;){if(x.hasOwnProp(s,"toJSON"))return!0;s=Object.getPrototypeOf(s)}return!1}function mb(l,s){const c=new Set(s.map(m=>String(m).toLowerCase())),r=[],f=m=>{if(m===null||typeof m!="object"||x.isBuffer(m))return m;if(r.indexOf(m)!==-1)return;m instanceof ft&&(m=m.toJSON()),r.push(m);let h;if(x.isArray(m))h=[],m.forEach((p,v)=>{const g=f(p);x.isUndefined(g)||(h[v]=g)});else{if(!x.isPlainObject(m)&&db(m))return r.pop(),m;h=Object.create(null);for(const[p,v]of Object.entries(m)){const g=c.has(p.toLowerCase())?Ui:f(v);x.isUndefined(g)||(h[p]=g)}}return r.pop(),h};return f(l)}function Jm(l){try{return String(l)}catch{return""}}function hb(l){return l.errors.map(c=>{try{return c&&c.message?Jm(c.message):Jm(c)}catch{return""}}).filter(Boolean).join("; ")||l.name||"AggregateError"}let V=class Uh extends Error{static from(s,c,r,f,m,h){let p=s.message;!p&&x.isArray(s.errors)&&s.errors.length&&(p=hb(s));const v=new Uh(p,c||s.code,r,f,m);return Object.defineProperty(v,"cause",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),v.name=s.name,s.status!=null&&v.status==null&&(v.status=s.status),h&&Object.assign(v,h),v}constructor(s,c,r,f,m){super(s),Object.defineProperty(this,"message",{__proto__:null,value:s,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,c&&(this.code=c),r&&(this.config=r),f&&(this.request=f),m&&(this.response=m,this.status=m.status)}toJSON(){const s=this.config,c=s&&x.hasOwnProp(s,"redact")?s.redact:void 0,r=x.isArray(c)&&c.length>0?mb(s,c):x.toJSONObject(s);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};V.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";V.ERR_BAD_OPTION="ERR_BAD_OPTION";V.ECONNABORTED="ECONNABORTED";V.ETIMEDOUT="ETIMEDOUT";V.ECONNREFUSED="ECONNREFUSED";V.ERR_NETWORK="ERR_NETWORK";V.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";V.ERR_DEPRECATED="ERR_DEPRECATED";V.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";V.ERR_BAD_REQUEST="ERR_BAD_REQUEST";V.ERR_CANCELED="ERR_CANCELED";V.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";V.ERR_INVALID_URL="ERR_INVALID_URL";V.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const yb=null,qh=100;function hr(l){return x.isPlainObject(l)||x.isArray(l)}function Bh(l){return x.endsWith(l,"[]")?l.slice(0,-2):l}function ir(l,s,c){return l?l.concat(s).map(function(f,m){return f=Bh(f),!c&&m?"["+f+"]":f}).join(c?".":""):s}function pb(l){return x.isArray(l)&&!l.some(hr)}const gb=x.toFlatObject(x,{},null,function(s){return/^is[A-Z]/.test(s)});function Hi(l,s,c){if(!x.isObject(l))throw new TypeError("target must be an object");s=s||new FormData,c=x.toFlatObject(c,{metaTokens:!0,dots:!1,indexes:!1},!1,function(K,Q){return!x.isUndefined(Q[K])});const r=c.metaTokens,f=c.visitor||W,m=c.dots,h=c.indexes,p=c.Blob||typeof Blob<"u"&&Blob,v=c.maxDepth===void 0?qh:c.maxDepth,g=p&&x.isSpecCompliantForm(s),A=[];if(!x.isFunction(f))throw new TypeError("visitor must be a function");function N(C){if(C===null)return"";if(x.isDate(C))return C.toISOString();if(x.isBoolean(C))return C.toString();if(!g&&x.isBlob(C))throw new V("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(C)||x.isTypedArray(C)){if(g&&typeof p=="function")return new p([C]);throw new V("Blob is not supported. Use a Buffer instead.",V.ERR_NOT_SUPPORT)}return C}function q(C){if(C>v)throw new V("Object is too deeply nested ("+C+" levels). Max depth: "+v,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function F(C,K){if(v===1/0)return JSON.stringify(C);const Q=[];return JSON.stringify(C,function(Ee,me){if(!x.isObject(me))return me;for(;Q.length&&Q[Q.length-1]!==this;)Q.pop();return Q.push(me),q(K+Q.length-1),me})}function W(C,K,Q){let ee=C;if(x.isReactNative(s)&&x.isReactNativeBlob(C))return s.append(ir(Q,K,m),N(C)),!1;if(C&&!Q&&typeof C=="object"){if(x.endsWith(K,"{}"))K=r?K:K.slice(0,-2),C=F(C,1);else if(x.isArray(C)&&pb(C)||(x.isFileList(C)||x.endsWith(K,"[]"))&&(ee=x.toArray(C)))return K=Bh(K),ee.forEach(function(me,ne){!(x.isUndefined(me)||me===null)&&s.append(h===!0?ir([K],ne,m):h===null?K:K+"[]",N(me))}),!1}return hr(C)?!0:(s.append(ir(Q,K,m),N(C)),!1)}const X=Object.assign(gb,{defaultVisitor:W,convertValue:N,isVisitable:hr});function Y(C,K,Q=0){if(!x.isUndefined(C)){if(q(Q),A.indexOf(C)!==-1)throw new Error("Circular reference detected in "+K.join("."));A.push(C),x.forEach(C,function(Ee,me){(!(x.isUndefined(Ee)||Ee===null)&&f.call(s,Ee,x.isString(me)?me.trim():me,K,X))===!0&&Y(Ee,K?K.concat(me):[me],Q+1)}),A.pop()}}if(!x.isObject(l))throw new TypeError("data must be an object");return Y(l),s}function $m(l){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(l).replace(/[!'()~]|%20/g,function(r){return s[r]})}function xr(l,s){this._pairs=[],l&&Hi(l,this,s)}const Hh=xr.prototype;Hh.append=function(s,c){this._pairs.push([s,c])};Hh.toString=function(s){const c=s?r=>s.call(this,r,$m):$m;return this._pairs.map(function(f){return c(f[0])+"="+c(f[1])},"").join("&")};function bb(l){return encodeURIComponent(l).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lh(l,s,c){if(!s)return l;l=l||"";const r=x.isFunction(c)?{serialize:c}:c,f=x.getSafeProp(r,"encode")||bb,m=x.getSafeProp(r,"serialize");let h;if(m?h=m(s,r):h=x.isURLSearchParams(s)?s.toString():new xr(s,r).toString(f),h){const p=l.indexOf("#");p!==-1&&(l=l.slice(0,p)),l+=(l.indexOf("?")===-1?"?":"&")+h}return l}class Fm{constructor(){this.handlers=[]}use(s,c,r){return this.handlers.push({fulfilled:s,rejected:c,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){x.forEach(this.handlers,function(r){r!==null&&s(r)})}}const Er={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},vb=typeof URLSearchParams<"u"?URLSearchParams:xr,Sb=typeof FormData<"u"?FormData:null,_b=typeof Blob<"u"?Blob:null,xb={isBrowser:!0,classes:{URLSearchParams:vb,FormData:Sb,Blob:_b},protocols:["http","https","file","blob","url","data"]},Ar=typeof window<"u"&&typeof document<"u",yr=typeof navigator=="object"&&navigator||void 0,Eb=Ar&&(!yr||["ReactNative","NativeScript","NS"].indexOf(yr.product)<0),Ab=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tb=Ar&&window.location.href||"http://localhost",Ob=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ar,hasStandardBrowserEnv:Eb,hasStandardBrowserWebWorkerEnv:Ab,navigator:yr,origin:Tb},Symbol.toStringTag,{value:"Module"})),st={...Ob,...xb};function Nb(l,s){return Hi(l,new st.classes.URLSearchParams,{visitor:function(c,r,f,m){return st.isNode&&x.isBuffer(c)?(this.append(r,c.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)},...s})}const Wm=qh;function kh(l){if(l>Wm)throw new V("FormData field is too deeply nested ("+l+" levels). Max depth: "+Wm,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Rb(l){const s=[],c=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=c.exec(l))!==null;)kh(s.length),s.push(r[0]==="[]"?"":r[1]||r[0]);return s}function wb(l){const s={},c=Object.keys(l);let r;const f=c.length;let m;for(r=0;r=c.length;return h=!h&&x.isArray(f)?f.length:h,v?(x.hasOwnProp(f,h)?f[h]=x.isArray(f[h])?f[h].concat(r):[f[h],r]:f[h]=r,!p):((!x.hasOwnProp(f,h)||!x.isObject(f[h]))&&(f[h]=[]),s(c,r,f[h],m)&&x.isArray(f[h])&&(f[h]=wb(f[h])),!p)}if(x.isFormData(l)&&x.isFunction(l.entries)){const c={};return x.forEachEntry(l,(r,f)=>{s(Rb(r),f,c,0)}),c}return null}const ul=(l,s)=>l!=null&&x.hasOwnProp(l,s)?l[s]:void 0;function zb(l,s,c){if(x.isString(l))try{return(s||JSON.parse)(l),x.trim(l)}catch(r){if(r.name!=="SyntaxError")throw r}return(c||JSON.stringify)(l)}const fu={transitional:Er,adapter:["xhr","http","fetch"],transformRequest:[function(s,c){const r=c.getContentType()||"",f=r.indexOf("application/json")>-1,m=x.isObject(s);if(m&&x.isHTMLForm(s)&&(s=new FormData(s)),x.isFormData(s))return f?JSON.stringify(Yh(s)):s;if(x.isArrayBuffer(s)||x.isBuffer(s)||x.isStream(s)||x.isFile(s)||x.isBlob(s)||x.isReadableStream(s))return s;if(x.isArrayBufferView(s))return s.buffer;if(x.isURLSearchParams(s))return c.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let p;if(m){const v=ul(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Nb(s,v).toString();if((p=x.isFileList(s))||r.indexOf("multipart/form-data")>-1){const g=ul(this,"env"),A=g&&g.FormData;return Hi(p?{"files[]":s}:s,A&&new A,v)}}return m||f?(c.setContentType("application/json",!1),zb(s)):s}],transformResponse:[function(s){const c=ul(this,"transitional")||fu.transitional,r=c&&c.forcedJSONParsing,f=ul(this,"responseType"),m=f==="json";if(x.isResponse(s)||x.isReadableStream(s))return s;if(s&&x.isString(s)&&(r&&!f||m)){const p=!(c&&c.silentJSONParsing)&&m;try{return JSON.parse(s,ul(this,"parseReviver"))}catch(v){if(p)throw v.name==="SyntaxError"?V.from(v,V.ERR_BAD_RESPONSE,this,null,ul(this,"response")):v}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:st.classes.FormData,Blob:st.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch","query"],l=>{fu.headers[l]={}});function sr(l,s){const c=this||fu,r=s||c,f=ft.from(r.headers);let m=r.data;return x.forEach(l,function(p){m=p.call(c,m,f.normalize(),s?s.status:void 0)}),f.normalize(),m}function Vh(l){return!!(l&&l.__CANCEL__)}let du=class extends V{constructor(s,c,r){super(s??"canceled",V.ERR_CANCELED,c,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xh(l,s,c){const r=c.config.validateStatus;!c.status||!r||r(c.status)?l(c):s(new V("Request failed with status code "+c.status,c.status>=400&&c.status<500?V.ERR_BAD_REQUEST:V.ERR_BAD_RESPONSE,c.config,c.request,c))}function jb(l){const s=/^([-+\w]{1,25}):(?:\/\/)?/.exec(l);return s&&s[1]||""}function Db(l,s){l=l||10;const c=new Array(l),r=new Array(l);let f=0,m=0,h;return s=s!==void 0?s:1e3,function(v){const g=Date.now(),A=r[m];h||(h=g),c[f]=v,r[f]=g;let N=m,q=0;for(;N!==f;)q+=c[N++],N=N%l;if(f=(f+1)%l,f===m&&(m=(m+1)%l),g-h{c=A,f=null,m&&(clearTimeout(m),m=null),l(...g)};return[(...g)=>{const A=Date.now(),N=A-c;N>=r?h(g,A):(f=g,m||(m=setTimeout(()=>{m=null,h(f)},r-N)))},()=>f&&h(f)]}const qi=(l,s,c=3)=>{let r=0;const f=Db(50,250);return Cb(m=>{if(!m||typeof m.loaded!="number")return;const h=m.loaded,p=m.lengthComputable?m.total:void 0,v=Math.max(0,p!=null?Math.min(h,p):h),g=Math.max(0,v-r),A=f(g);r=Math.max(r,v);const N={loaded:v,total:p,progress:p?v/p:void 0,bytes:g,rate:A||void 0,estimated:A&&p?(p-v)/A:void 0,event:m,lengthComputable:p!=null,[s?"download":"upload"]:!0};l(N)},c)},Im=(l,s)=>{const c=l!=null;return[r=>s[0]({lengthComputable:c,total:l,loaded:r}),s[1]]},Pm=(l,s=x.asap)=>(...c)=>s(()=>l(...c)),Mb=st.hasStandardBrowserEnv?((l,s)=>c=>(c=new URL(c,st.origin),l.protocol===c.protocol&&l.host===c.host&&(s||l.port===c.port)))(new URL(st.origin),st.navigator&&/(msie|trident)/i.test(st.navigator.userAgent)):()=>!0,Ub=st.hasStandardBrowserEnv?{write(l,s,c,r,f,m,h){if(typeof document>"u")return;const p=[`${l}=${encodeURIComponent(s)}`];x.isNumber(c)&&p.push(`expires=${new Date(c).toUTCString()}`),x.isString(r)&&p.push(`path=${r}`),x.isString(f)&&p.push(`domain=${f}`),m===!0&&p.push("secure"),x.isString(h)&&p.push(`SameSite=${h}`),document.cookie=p.join("; ")},read(l){if(typeof document>"u")return null;const s=document.cookie.split(";");for(let c=0;c0&&l.charCodeAt(c-1)===47;)c--;return l.slice(0,c)+"/"+s.replace(/^\/+/,"")}const Hb=/^https?:(?!\/\/)/i,Lb=/[\t\n\r]/g;function kb(l){let s=0;for(;s`${c}${r}${Ui}`)}function Xb(l){const s=l.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Ui}@`),c=s.indexOf("#"),f=(c===-1?s:s.slice(0,c)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Ui}`);return c===-1?f:`${f}#${Vb(s.slice(c+1))}`}function eh(l,s){if(typeof l=="string"){const c=Yb(l);if(Hb.test(c))throw new V(`Invalid URL ${JSON.stringify(Xb(c))}: missing "//" after protocol`,V.ERR_INVALID_URL,s)}}function Gh(l,s,c,r){eh(s,r);let f=!qb(s);return l&&(f||c===!1)?(eh(l,r),Bb(l,s)):s}const th=l=>l instanceof ft?{...l}:l,Gb=l=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(l).concat(Object.getOwnPropertySymbols(l).filter(s=>Object.getOwnPropertyDescriptor(l,s).enumerable)):Object.keys(l);function bn(l,s){l=l||{},s=s||{};const c=Object.create(null);Object.defineProperty(c,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(A,N,q,F){return x.isPlainObject(A)&&x.isPlainObject(N)?x.merge.call({caseless:F},A,N):x.isPlainObject(N)?x.merge({},N):x.isArray(N)?N.slice():N}function f(A,N,q,F){if(x.isUndefined(N)){if(!x.isUndefined(A))return r(void 0,A,q,F)}else return r(A,N,q,F)}function m(A,N){if(!x.isUndefined(N))return r(void 0,N)}function h(A,N){if(x.isUndefined(N)){if(!x.isUndefined(A))return r(void 0,A)}else return r(void 0,N)}function p(A){const N=x.hasOwnProp(s,"transitional")?s.transitional:void 0;if(!x.isUndefined(N))if(x.isPlainObject(N)){if(x.hasOwnProp(N,A))return N[A]}else return;const q=x.hasOwnProp(l,"transitional")?l.transitional:void 0;if(x.isPlainObject(q)&&x.hasOwnProp(q,A))return q[A]}function v(A,N,q){if(x.hasOwnProp(s,q))return r(A,N);if(x.hasOwnProp(l,q))return r(void 0,A)}const g={url:m,method:m,data:m,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,allowedSocketPaths:h,responseEncoding:h,validateStatus:v,headers:(A,N,q)=>f(th(A),th(N),q,!0)};return x.forEach(Gb({...l,...s}),function(N){if(N==="__proto__"||N==="constructor"||N==="prototype")return;const q=x.hasOwnProp(g,N)?g[N]:f,F=x.hasOwnProp(l,N)?l[N]:void 0,W=x.hasOwnProp(s,N)?s[N]:void 0,X=q(F,W,N);x.isUndefined(X)&&q!==v||(c[N]=X)}),x.hasOwnProp(s,"validateStatus")&&x.isUndefined(s.validateStatus)&&p("validateStatusUndefinedResolves")===!1&&(x.hasOwnProp(l,"validateStatus")?c.validateStatus=r(void 0,l.validateStatus):delete c.validateStatus),c}const Qb=["content-type","content-length"];function Zb(l,s,c){if(c!=="content-only"){l.set(s);return}Object.entries(s||{}).forEach(([r,f])=>{Qb.includes(r.toLowerCase())&&l.set(r,f)})}const Kb=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(s,c)=>String.fromCharCode(parseInt(c,16)));function Qh(l){const s=bn({},l),c=q=>x.hasOwnProp(s,q)?s[q]:void 0,r=c("data");let f=c("withXSRFToken");const m=c("xsrfHeaderName"),h=c("xsrfCookieName");let p=c("headers");const v=c("auth"),g=c("baseURL"),A=c("allowAbsoluteUrls"),N=c("url");if(s.headers=p=ft.from(p),s.url=Lh(Gh(g,N,A,s),c("params"),c("paramsSerializer")),v){const q=x.getSafeProp(v,"username")||"",F=x.getSafeProp(v,"password")||"";try{p.set("Authorization","Basic "+btoa(q+":"+(F?Kb(F):"")))}catch(W){throw V.from(W,V.ERR_BAD_OPTION_VALUE,l)}}if(x.isFormData(r)&&(st.hasStandardBrowserEnv||st.hasStandardBrowserWebWorkerEnv||x.isReactNative(r)?p.setContentType(void 0):x.isFunction(r.getHeaders)&&Zb(p,r.getHeaders(),c("formDataHeaderPolicy"))),st.hasStandardBrowserEnv&&(x.isFunction(f)&&(f=f(s)),f===!0||f==null&&Mb(s.url))){const F=m&&h&&Ub.read(h);F&&p.set(m,F)}return s}const Jb=typeof XMLHttpRequest<"u",$b=Jb&&function(l){return new Promise(function(c,r){const f=Qh(l);let m=f.data;const h=ft.from(f.headers).normalize();let{responseType:p,onUploadProgress:v,onDownloadProgress:g}=f,A,N,q,F,W;function X(){F&&F(),W&&W(),f.cancelToken&&f.cancelToken.unsubscribe(A),f.signal&&f.signal.removeEventListener("abort",A)}let Y=new XMLHttpRequest;Y.open(f.method.toUpperCase(),f.url,!0),Y.timeout=f.timeout;function C(){if(!Y)return;const Q=ft.from("getAllResponseHeaders"in Y&&Y.getAllResponseHeaders()),Ee={data:!p||p==="text"||p==="json"?Y.responseText:Y.response,status:Y.status,statusText:Y.statusText,headers:Q,config:l,request:Y};Xh(function(ne){c(ne),X()},function(ne){r(ne),X()},Ee),Y=null}"onloadend"in Y?Y.onloadend=C:Y.onreadystatechange=function(){!Y||Y.readyState!==4||Y.status===0&&!(Y.responseURL&&Y.responseURL.startsWith("file:"))||setTimeout(C)},Y.onabort=function(){Y&&(r(new V("Request aborted",V.ECONNABORTED,l,Y)),X(),Y=null)},Y.onerror=function(ee){const Ee=ee&&ee.message?ee.message:"Network Error",me=new V(Ee,V.ERR_NETWORK,l,Y);me.event=ee||null,r(me),X(),Y=null},Y.ontimeout=function(){let ee=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded";const Ee=f.transitional||Er;f.timeoutErrorMessage&&(ee=f.timeoutErrorMessage),r(new V(ee,Ee.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,l,Y)),X(),Y=null},m===void 0&&h.setContentType(null),"setRequestHeader"in Y&&x.forEach(Mh(h),function(ee,Ee){Y.setRequestHeader(Ee,ee)}),x.isUndefined(f.withCredentials)||(Y.withCredentials=!!f.withCredentials),p&&p!=="json"&&(Y.responseType=f.responseType),g&&([q,W]=qi(g,!0),Y.addEventListener("progress",q)),v&&Y.upload&&([N,F]=qi(v),Y.upload.addEventListener("progress",N),Y.upload.addEventListener("loadend",F)),(f.cancelToken||f.signal)&&(A=Q=>{Y&&(r(!Q||Q.type?new du(null,l,Y):Q),Y.abort(),X(),Y=null)},f.cancelToken&&f.cancelToken.subscribe(A),f.signal&&(f.signal.aborted?A():f.signal.addEventListener("abort",A)));const K=jb(f.url);if(K&&!st.protocols.includes(K)){r(new V("Unsupported protocol "+K+":",V.ERR_BAD_REQUEST,l)),X();return}Y.send(m||null)})},Fb=(l,s)=>{if(l=l?l.filter(Boolean):[],!s&&!l.length)return;const c=new AbortController;let r=!1;const f=function(v){if(!r){r=!0,h();const g=v instanceof Error?v:this.reason;c.abort(g instanceof V?g:new du(g instanceof Error?g.message:g))}};let m=s&&setTimeout(()=>{m=null,f(new V(`timeout of ${s}ms exceeded`,V.ETIMEDOUT))},s);const h=()=>{l&&(m&&clearTimeout(m),m=null,l.forEach(v=>{v.unsubscribe?v.unsubscribe(f):v.removeEventListener("abort",f)}),l=null)};l.forEach(v=>{if(!r){if(v.aborted){f.call(v);return}v.addEventListener("abort",f,{once:!0})}});const{signal:p}=c;return p.unsubscribe=()=>x.asap(h),p},Wb=function*(l,s){let c=l.byteLength;if(c{const f=Ib(l,s);let m=0,h,p=v=>{h||(h=!0,r&&r(v))};return new ReadableStream({async pull(v){try{const{done:g,value:A}=await f.next();if(g){p(),v.close();return}let N=A.byteLength;if(c){let q=m+=N;c(q)}v.enqueue(new Uint8Array(A))}catch(g){throw p(g),g}},cancel(v){return p(v),f.return()}},{highWaterMark:2})},nh=l=>l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102,Zh=(l,s,c)=>s+2l<=57?l-48:(l&223)-55,ev=l=>l>=65&&l<=90||l>=97&&l<=122||l>=48&&l<=57||l===43||l===47||l===45||l===95,tv=l=>l===9||l===10||l===12||l===13||l===32,av=l=>{const s=Math.floor(l/4),c=l%4;return s*3+(c===2?1:c===3?2:0)},nv=l=>{const s=l.length;let c=0;return s>0&&l.charCodeAt(s-1)===61&&(c++,s>1&&l.charCodeAt(s-2)===61&&c++),Math.floor((s-c)*3/4)},lv=l=>{const s=l.length;let c=0,r=0,f=!1;for(let m=0;m0){f=!0;continue}c++}}return f||r>2||r>0&&(c+r)%4!==0||c%4===1?nv(l):av(c)},uv=(l,s)=>{if(!l||typeof l!="string"||!l.startsWith("data:"))return 0;const c=l.indexOf(",");if(c<0)return 0;const r=l.slice(5,c),f=l.slice(c+1);if(/;base64/i.test(r))return s(f);let h=0;for(let p=0,v=f.length;p=55296&&g<=56319&&p+1=56320&&A<=57343?(h+=4,p++):h+=3}else h+=3}return h};function iv(l){const s=typeof l=="string"?l.indexOf("#"):-1;return uv(s===-1?l:l.slice(0,s),lv)}const Tr="1.19.0",uh=64*1024,{isFunction:zi}=x,sv=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(s,c)=>String.fromCharCode(parseInt(c,16))),ih=l=>{if(!x.isString(l))return l;try{return decodeURIComponent(l)}catch{return l}},sh=(l,...s)=>{try{return!!l(...s)}catch{return!1}},cv=l=>{const s=l.indexOf("://");let c=l;return s!==-1&&(c=c.slice(s+3)),c.includes("@")||c.includes(":")},rv=l=>{const s=x.global!==void 0&&x.global!==null?x.global:globalThis,{ReadableStream:c,TextEncoder:r}=s;l=x.merge.call({skipUndefined:!0},{Request:s.Request,Response:s.Response},l);const{fetch:f,Request:m,Response:h}=l,p=f?zi(f):typeof fetch=="function",v=zi(m),g=zi(h);if(!p)return!1;const A=p&&zi(c),N=p&&(typeof r=="function"?(C=>K=>C.encode(K))(new r):async C=>new Uint8Array(await new m(C).arrayBuffer())),q=v&&A&&sh(()=>{let C=!1;const K=new m(st.origin,{body:new c,method:"POST",get duplex(){return C=!0,"half"}}),Q=K.headers.has("Content-Type");return K.body!=null&&K.body.cancel(),C&&!Q}),F=g&&A&&sh(()=>x.isReadableStream(new h("").body)),W={stream:F&&(C=>C.body)};p&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!W[C]&&(W[C]=(K,Q)=>{let ee=K&&K[C];if(ee)return ee.call(K);throw new V(`Response type '${C}' is not supported`,V.ERR_NOT_SUPPORT,Q)})});const X=async C=>{if(C==null)return 0;if(x.isBlob(C))return C.size;if(x.isSpecCompliantForm(C))return(await new m(st.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(x.isArrayBufferView(C)||x.isArrayBuffer(C))return C.byteLength;if(x.isURLSearchParams(C)&&(C=C+""),x.isString(C))return(await N(C)).byteLength},Y=async(C,K)=>{const Q=x.toFiniteNumber(C.getContentLength());return Q??X(K)};return async C=>{let{url:K,method:Q,data:ee,signal:Ee,cancelToken:me,timeout:ne,onDownloadProgress:Le,onUploadProgress:ct,responseType:be,headers:Me,withCredentials:ke="same-origin",fetchOptions:xt,maxContentLength:He,maxBodyLength:Re}=Qh(C);const z=x.isNumber(He)&&He>-1,L=x.isNumber(Re)&&Re>-1,P=Z=>x.hasOwnProp(C,Z)?C[Z]:void 0;let Se=f||fetch;be=be?(be+"").toLowerCase():"text";let re=Fb([Ee,me&&me.toAbortSignal()],ne),S=null;const j=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let H,G=null;const le=()=>new V("Request body larger than maxBodyLength limit",V.ERR_BAD_REQUEST,C,S);try{let Z;const k=P("auth");if(k){const ie=x.getSafeProp(k,"username")||"",dt=x.getSafeProp(k,"password")||"";Z={username:ie,password:dt}}if(cv(K)){const ie=new URL(K,st.origin);if(!Z&&(ie.username||ie.password)){const dt=ih(ie.username),Kt=ih(ie.password);Z={username:dt,password:Kt}}(ie.username||ie.password)&&(ie.username="",ie.password="",K=ie.href)}if(Z&&(Me.delete("authorization"),Me.set("Authorization","Basic "+btoa(sv((Z.username||"")+":"+(Z.password||""))))),z&&typeof K=="string"&&K.startsWith("data:")&&iv(K)>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S);if(L&&Q!=="get"&&Q!=="head"){const ie=await X(ee);if(typeof ie=="number"&&isFinite(ie)&&(H=ie,ie>Re))throw le()}const ue=L&&(x.isReadableStream(ee)||x.isStream(ee)),Te=(ie,dt,Kt)=>ah(ie,uh,Jt=>{if(L&&Jt>Re)throw G=le();dt&&dt(Jt)},Kt);if(q&&Q!=="get"&&Q!=="head"&&(ct||ue)){if(H=H??await Y(Me,ee),H!==0||ue){let ie=new m(K,{method:"POST",body:ee,duplex:"half"}),dt;if(x.isFormData(ee)&&(dt=ie.headers.get("content-type"))&&Me.setContentType(dt),ie.body){const[Kt,Jt]=ct&&Im(H,qi(Pm(ct)))||[];ee=Te(ie.body,Kt,Jt)}}}else if(ue&&!v&&A&&Q!=="get"&&Q!=="head")ee=Te(ee);else if(ue&&v&&!q&&Q!=="get"&&Q!=="head")throw new V("Stream request bodies are not supported by the current fetch implementation",V.ERR_NOT_SUPPORT,C,S);x.isString(ke)||(ke=ke?"include":"omit");const Za=v&&"credentials"in m.prototype;if(x.isFormData(ee)){const ie=Me.getContentType();ie&&/^multipart\/form-data/i.test(ie)&&!/boundary=/i.test(ie)&&Me.delete("content-type")}Me.set("User-Agent","axios/"+Tr,!1);const Ka={...xt,signal:re,method:Q.toUpperCase(),headers:Mh(Me.normalize()),body:ee,duplex:"half",credentials:Za?ke:void 0};S=v&&new m(K,Ka);let Et=await(v?Se(S,xt):Se(K,Ka));const ol=ft.from(Et.headers);if(z){const ie=x.toFiniteNumber(ol.getContentLength());if(ie!=null&&ie>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S)}const Zt=F&&(be==="stream"||be==="response");if(F&&Et.body&&(Le||z||Zt&&j)){const ie={};["status","statusText","headers"].forEach(Ja=>{ie[Ja]=Et[Ja]});const dt=x.toFiniteNumber(ol.getContentLength()),[Kt,Jt]=Le&&Im(dt,qi(Pm(Le),!0))||[];let vn=0;const fl=Ja=>{if(z&&(vn=Ja,vn>He))throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S);Kt&&Kt(Ja)};Et=new h(ah(Et.body,uh,fl,()=>{Jt&&Jt(),j&&j()}),ie)}be=be||"text";let At=await W[x.findKey(W,be)||"text"](Et,C);if(z&&!F&&!Zt){let ie;if(At!=null&&(typeof At.byteLength=="number"?ie=At.byteLength:typeof At.size=="number"?ie=At.size:typeof At=="string"&&(ie=typeof r=="function"?new r().encode(At).byteLength:At.length)),typeof ie=="number"&&ie>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S)}return!Zt&&j&&j(),await new Promise((ie,dt)=>{Xh(ie,dt,{data:At,headers:ft.from(Et.headers),status:Et.status,statusText:Et.statusText,config:C,request:S})})}catch(Z){if(j&&j(),re&&re.aborted&&re.reason instanceof V){const k=re.reason;throw k.config=C,S&&(k.request=S),Z!==k&&Object.defineProperty(k,"cause",{__proto__:null,value:Z,writable:!0,enumerable:!1,configurable:!0}),k}if(G)throw S&&!G.request&&(G.request=S),G;if(Z instanceof V)throw S&&!Z.request&&(Z.request=S),Z;if(Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)){const k=new V("Network Error",V.ERR_NETWORK,C,S,Z&&Z.response);throw Object.defineProperty(k,"cause",{__proto__:null,value:Z.cause||Z,writable:!0,enumerable:!1,configurable:!0}),k}throw V.from(Z,Z&&Z.code,C,S,Z&&Z.response)}}},ov=new Map,Kh=l=>{let s=l&&l.env||{};const{fetch:c,Request:r,Response:f}=s,m=[r,f,c];let h=m.length,p=h,v,g,A=ov;for(;p--;)v=m[p],g=A.get(v),g===void 0&&A.set(v,g=p?new Map:rv(s)),A=g;return g};Kh();const Or={http:yb,xhr:$b,fetch:{get:Kh}};x.forEach(Or,(l,s)=>{if(l){try{Object.defineProperty(l,"name",{__proto__:null,value:s})}catch{}Object.defineProperty(l,"adapterName",{__proto__:null,value:s})}});const ch=l=>`- ${l}`,fv=l=>x.isFunction(l)||l===null||l===!1;function dv(l,s){l=x.isArray(l)?l:[l];const{length:c}=l;let r,f;const m={};for(let h=0;h`adapter ${v} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=c?h.length>1?`since : +`)}getSetCookie(){const s=this.get("set-cookie");return x.isArray(s)?s:s==null||s===!1?[]:[s]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static parseParameters(s){return cb(s)}static concat(s,...c){const r=new this(s);return c.forEach(f=>r.set(f)),r}static accessor(s){const r=(this[Km]=this[Km]={accessors:{}}).accessors,f=this.prototype;function m(h){const p=iu(h);r[p]||(fb(f,h),r[p]=!0)}return x.isArray(s)?s.forEach(m):m(s),this}};ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ft.prototype,({value:l},s)=>{let c=s[0].toUpperCase()+s.slice(1);return{get:()=>l,set(r){this[c]=r}}});x.freezeMethods(ft);const Ui="[REDACTED ****]";function db(l){if(x.hasOwnProp(l,"toJSON"))return!0;let s=Object.getPrototypeOf(l);for(;s&&s!==Object.prototype;){if(x.hasOwnProp(s,"toJSON"))return!0;s=Object.getPrototypeOf(s)}return!1}function mb(l,s){const c=new Set(s.map(m=>String(m).toLowerCase())),r=[],f=m=>{if(m===null||typeof m!="object"||x.isBuffer(m))return m;if(r.indexOf(m)!==-1)return;m instanceof ft&&(m=m.toJSON()),r.push(m);let h;if(x.isArray(m))h=[],m.forEach((p,v)=>{const g=f(p);x.isUndefined(g)||(h[v]=g)});else{if(!x.isPlainObject(m)&&db(m))return r.pop(),m;h=Object.create(null);for(const[p,v]of Object.entries(m)){const g=c.has(p.toLowerCase())?Ui:f(v);x.isUndefined(g)||(h[p]=g)}}return r.pop(),h};return f(l)}function Jm(l){try{return String(l)}catch{return""}}function hb(l){return l.errors.map(c=>{try{return c&&c.message?Jm(c.message):Jm(c)}catch{return""}}).filter(Boolean).join("; ")||l.name||"AggregateError"}let V=class Uh extends Error{static from(s,c,r,f,m,h){let p=s.message;!p&&x.isArray(s.errors)&&s.errors.length&&(p=hb(s));const v=new Uh(p,c||s.code,r,f,m);return Object.defineProperty(v,"cause",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),v.name=s.name,s.status!=null&&v.status==null&&(v.status=s.status),h&&Object.assign(v,h),v}constructor(s,c,r,f,m){super(s),Object.defineProperty(this,"message",{__proto__:null,value:s,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,c&&(this.code=c),r&&(this.config=r),f&&(this.request=f),m&&(this.response=m,this.status=m.status)}toJSON(){const s=this.config,c=s&&x.hasOwnProp(s,"redact")?s.redact:void 0,r=x.isArray(c)&&c.length>0?mb(s,c):x.toJSONObject(s);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};V.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";V.ERR_BAD_OPTION="ERR_BAD_OPTION";V.ECONNABORTED="ECONNABORTED";V.ETIMEDOUT="ETIMEDOUT";V.ECONNREFUSED="ECONNREFUSED";V.ERR_NETWORK="ERR_NETWORK";V.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";V.ERR_DEPRECATED="ERR_DEPRECATED";V.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";V.ERR_BAD_REQUEST="ERR_BAD_REQUEST";V.ERR_CANCELED="ERR_CANCELED";V.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";V.ERR_INVALID_URL="ERR_INVALID_URL";V.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const yb=null,qh=100;function hr(l){return x.isPlainObject(l)||x.isArray(l)}function Bh(l){return x.endsWith(l,"[]")?l.slice(0,-2):l}function ir(l,s,c){return l?l.concat(s).map(function(f,m){return f=Bh(f),!c&&m?"["+f+"]":f}).join(c?".":""):s}function pb(l){return x.isArray(l)&&!l.some(hr)}const gb=x.toFlatObject(x,{},null,function(s){return/^is[A-Z]/.test(s)});function Hi(l,s,c){if(!x.isObject(l))throw new TypeError("target must be an object");s=s||new FormData,c=x.toFlatObject(c,{metaTokens:!0,dots:!1,indexes:!1},!1,function(K,Q){return!x.isUndefined(Q[K])});const r=c.metaTokens,f=c.visitor||W,m=c.dots,h=c.indexes,p=c.Blob||typeof Blob<"u"&&Blob,v=c.maxDepth===void 0?qh:c.maxDepth,g=p&&x.isSpecCompliantForm(s),A=[];if(!x.isFunction(f))throw new TypeError("visitor must be a function");function N(C){if(C===null)return"";if(x.isDate(C))return C.toISOString();if(x.isBoolean(C))return C.toString();if(!g&&x.isBlob(C))throw new V("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(C)||x.isTypedArray(C)){if(g&&typeof p=="function")return new p([C]);throw new V("Blob is not supported. Use a Buffer instead.",V.ERR_NOT_SUPPORT)}return C}function q(C){if(C>v)throw new V("Object is too deeply nested ("+C+" levels). Max depth: "+v,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function F(C,K){if(v===1/0)return JSON.stringify(C);const Q=[];return JSON.stringify(C,function(Ee,me){if(!x.isObject(me))return me;for(;Q.length&&Q[Q.length-1]!==this;)Q.pop();return Q.push(me),q(K+Q.length-1),me})}function W(C,K,Q){let ee=C;if(x.isReactNative(s)&&x.isReactNativeBlob(C))return s.append(ir(Q,K,m),N(C)),!1;if(C&&!Q&&typeof C=="object"){if(x.endsWith(K,"{}"))K=r?K:K.slice(0,-2),C=F(C,1);else if(x.isArray(C)&&pb(C)||(x.isFileList(C)||x.endsWith(K,"[]"))&&(ee=x.toArray(C)))return K=Bh(K),ee.forEach(function(me,ne){!(x.isUndefined(me)||me===null)&&s.append(h===!0?ir([K],ne,m):h===null?K:K+"[]",N(me))}),!1}return hr(C)?!0:(s.append(ir(Q,K,m),N(C)),!1)}const X=Object.assign(gb,{defaultVisitor:W,convertValue:N,isVisitable:hr});function Y(C,K,Q=0){if(!x.isUndefined(C)){if(q(Q),A.indexOf(C)!==-1)throw new Error("Circular reference detected in "+K.join("."));A.push(C),x.forEach(C,function(Ee,me){(!(x.isUndefined(Ee)||Ee===null)&&f.call(s,Ee,x.isString(me)?me.trim():me,K,X))===!0&&Y(Ee,K?K.concat(me):[me],Q+1)}),A.pop()}}if(!x.isObject(l))throw new TypeError("data must be an object");return Y(l),s}function $m(l){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(l).replace(/[!'()~]|%20/g,function(r){return s[r]})}function xr(l,s){this._pairs=[],l&&Hi(l,this,s)}const Hh=xr.prototype;Hh.append=function(s,c){this._pairs.push([s,c])};Hh.toString=function(s){const c=s?r=>s.call(this,r,$m):$m;return this._pairs.map(function(f){return c(f[0])+"="+c(f[1])},"").join("&")};function bb(l){return encodeURIComponent(l).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lh(l,s,c){if(!s)return l;l=l||"";const r=x.isFunction(c)?{serialize:c}:c,f=x.getSafeProp(r,"encode")||bb,m=x.getSafeProp(r,"serialize");let h;if(m?h=m(s,r):h=x.isURLSearchParams(s)?s.toString():new xr(s,r).toString(f),h){const p=l.indexOf("#");p!==-1&&(l=l.slice(0,p)),l+=(l.indexOf("?")===-1?"?":"&")+h}return l}class Fm{constructor(){this.handlers=[]}use(s,c,r){return this.handlers.push({fulfilled:s,rejected:c,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){x.forEach(this.handlers,function(r){r!==null&&s(r)})}}const Er={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},vb=typeof URLSearchParams<"u"?URLSearchParams:xr,Sb=typeof FormData<"u"?FormData:null,_b=typeof Blob<"u"?Blob:null,xb={isBrowser:!0,classes:{URLSearchParams:vb,FormData:Sb,Blob:_b},protocols:["http","https","file","blob","url","data"]},Ar=typeof window<"u"&&typeof document<"u",yr=typeof navigator=="object"&&navigator||void 0,Eb=Ar&&(!yr||["ReactNative","NativeScript","NS"].indexOf(yr.product)<0),Ab=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tb=Ar&&window.location.href||"http://localhost",Ob=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ar,hasStandardBrowserEnv:Eb,hasStandardBrowserWebWorkerEnv:Ab,navigator:yr,origin:Tb},Symbol.toStringTag,{value:"Module"})),st={...Ob,...xb};function Nb(l,s){return Hi(l,new st.classes.URLSearchParams,{visitor:function(c,r,f,m){return st.isNode&&x.isBuffer(c)?(this.append(r,c.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)},...s})}const Wm=qh;function kh(l){if(l>Wm)throw new V("FormData field is too deeply nested ("+l+" levels). Max depth: "+Wm,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Rb(l){const s=[],c=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=c.exec(l))!==null;)kh(s.length),s.push(r[0]==="[]"?"":r[1]||r[0]);return s}function wb(l){const s={},c=Object.keys(l);let r;const f=c.length;let m;for(r=0;r=c.length;return h=!h&&x.isArray(f)?f.length:h,v?(x.hasOwnProp(f,h)?f[h]=x.isArray(f[h])?f[h].concat(r):[f[h],r]:f[h]=r,!p):((!x.hasOwnProp(f,h)||!x.isObject(f[h]))&&(f[h]=[]),s(c,r,f[h],m)&&x.isArray(f[h])&&(f[h]=wb(f[h])),!p)}if(x.isFormData(l)&&x.isFunction(l.entries)){const c={};return x.forEachEntry(l,(r,f)=>{s(Rb(r),f,c,0)}),c}return null}const ul=(l,s)=>l!=null&&x.hasOwnProp(l,s)?l[s]:void 0;function zb(l,s,c){if(x.isString(l))try{return(s||JSON.parse)(l),x.trim(l)}catch(r){if(r.name!=="SyntaxError")throw r}return(c||JSON.stringify)(l)}const fu={transitional:Er,adapter:["xhr","http","fetch"],transformRequest:[function(s,c){const r=c.getContentType()||"",f=r.indexOf("application/json")>-1,m=x.isObject(s);if(m&&x.isHTMLForm(s)&&(s=new FormData(s)),x.isFormData(s))return f?JSON.stringify(Yh(s)):s;if(x.isArrayBuffer(s)||x.isBuffer(s)||x.isStream(s)||x.isFile(s)||x.isBlob(s)||x.isReadableStream(s))return s;if(x.isArrayBufferView(s))return s.buffer;if(x.isURLSearchParams(s))return c.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let p;if(m){const v=ul(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Nb(s,v).toString();if((p=x.isFileList(s))||r.indexOf("multipart/form-data")>-1){const g=ul(this,"env"),A=g&&g.FormData;return Hi(p?{"files[]":s}:s,A&&new A,v)}}return m||f?(c.setContentType("application/json",!1),zb(s)):s}],transformResponse:[function(s){const c=ul(this,"transitional")||fu.transitional,r=c&&c.forcedJSONParsing,f=ul(this,"responseType"),m=f==="json";if(x.isResponse(s)||x.isReadableStream(s))return s;if(s&&x.isString(s)&&(r&&!f||m)){const p=!(c&&c.silentJSONParsing)&&m;try{return JSON.parse(s,ul(this,"parseReviver"))}catch(v){if(p)throw v.name==="SyntaxError"?V.from(v,V.ERR_BAD_RESPONSE,this,null,ul(this,"response")):v}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:st.classes.FormData,Blob:st.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch","query"],l=>{fu.headers[l]={}});function sr(l,s){const c=this||fu,r=s||c,f=ft.from(r.headers);let m=r.data;return x.forEach(l,function(p){m=p.call(c,m,f.normalize(),s?s.status:void 0)}),f.normalize(),m}function Vh(l){return!!(l&&l.__CANCEL__)}let du=class extends V{constructor(s,c,r){super(s??"canceled",V.ERR_CANCELED,c,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xh(l,s,c){const r=c.config.validateStatus;!c.status||!r||r(c.status)?l(c):s(new V("Request failed with status code "+c.status,c.status>=400&&c.status<500?V.ERR_BAD_REQUEST:V.ERR_BAD_RESPONSE,c.config,c.request,c))}function jb(l){const s=/^([-+\w]{1,25}):(?:\/\/)?/.exec(l);return s&&s[1]||""}function Db(l,s){l=l||10;const c=new Array(l),r=new Array(l);let f=0,m=0,h;return s=s!==void 0?s:1e3,function(v){const g=Date.now(),A=r[m];h||(h=g),c[f]=v,r[f]=g;let N=m,q=0;for(;N!==f;)q+=c[N++],N=N%l;if(f=(f+1)%l,f===m&&(m=(m+1)%l),g-h{c=A,f=null,m&&(clearTimeout(m),m=null),l(...g)};return[(...g)=>{const A=Date.now(),N=A-c;N>=r?h(g,A):(f=g,m||(m=setTimeout(()=>{m=null,h(f)},r-N)))},()=>f&&h(f)]}const qi=(l,s,c=3)=>{let r=0;const f=Db(50,250);return Cb(m=>{if(!m||typeof m.loaded!="number")return;const h=m.loaded,p=m.lengthComputable?m.total:void 0,v=Math.max(0,p!=null?Math.min(h,p):h),g=Math.max(0,v-r),A=f(g);r=Math.max(r,v);const N={loaded:v,total:p,progress:p?v/p:void 0,bytes:g,rate:A||void 0,estimated:A&&p?(p-v)/A:void 0,event:m,lengthComputable:p!=null,[s?"download":"upload"]:!0};l(N)},c)},Im=(l,s)=>{const c=l!=null;return[r=>s[0]({lengthComputable:c,total:l,loaded:r}),s[1]]},Pm=(l,s=x.asap)=>(...c)=>s(()=>l(...c)),Mb=st.hasStandardBrowserEnv?((l,s)=>c=>(c=new URL(c,st.origin),l.protocol===c.protocol&&l.host===c.host&&(s||l.port===c.port)))(new URL(st.origin),st.navigator&&/(msie|trident)/i.test(st.navigator.userAgent)):()=>!0,Ub=st.hasStandardBrowserEnv?{write(l,s,c,r,f,m,h){if(typeof document>"u")return;const p=[`${l}=${encodeURIComponent(s)}`];x.isNumber(c)&&p.push(`expires=${new Date(c).toUTCString()}`),x.isString(r)&&p.push(`path=${r}`),x.isString(f)&&p.push(`domain=${f}`),m===!0&&p.push("secure"),x.isString(h)&&p.push(`SameSite=${h}`),document.cookie=p.join("; ")},read(l){if(typeof document>"u")return null;const s=document.cookie.split(";");for(let c=0;c0&&l.charCodeAt(c-1)===47;)c--;return l.slice(0,c)+"/"+s.replace(/^\/+/,"")}const Hb=/^https?:(?!\/\/)/i,Lb=/[\t\n\r]/g;function kb(l){let s=0;for(;s`${c}${r}${Ui}`)}function Xb(l){const s=l.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Ui}@`),c=s.indexOf("#"),f=(c===-1?s:s.slice(0,c)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Ui}`);return c===-1?f:`${f}#${Vb(s.slice(c+1))}`}function eh(l,s){if(typeof l=="string"){const c=Yb(l);if(Hb.test(c))throw new V(`Invalid URL ${JSON.stringify(Xb(c))}: missing "//" after protocol`,V.ERR_INVALID_URL,s)}}function Gh(l,s,c,r){eh(s,r);let f=!qb(s);return l&&(f||c===!1)?(eh(l,r),Bb(l,s)):s}const th=l=>l instanceof ft?{...l}:l,Gb=l=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(l).concat(Object.getOwnPropertySymbols(l).filter(s=>Object.getOwnPropertyDescriptor(l,s).enumerable)):Object.keys(l);function bn(l,s){l=l||{},s=s||{};const c=Object.create(null);Object.defineProperty(c,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(A,N,q,F){return x.isPlainObject(A)&&x.isPlainObject(N)?x.merge.call({caseless:F},A,N):x.isPlainObject(N)?x.merge({},N):x.isArray(N)?N.slice():N}function f(A,N,q,F){if(x.isUndefined(N)){if(!x.isUndefined(A))return r(void 0,A,q,F)}else return r(A,N,q,F)}function m(A,N){if(!x.isUndefined(N))return r(void 0,N)}function h(A,N){if(x.isUndefined(N)){if(!x.isUndefined(A))return r(void 0,A)}else return r(void 0,N)}function p(A){const N=x.hasOwnProp(s,"transitional")?s.transitional:void 0;if(!x.isUndefined(N))if(x.isPlainObject(N)){if(x.hasOwnProp(N,A))return N[A]}else return;const q=x.hasOwnProp(l,"transitional")?l.transitional:void 0;if(x.isPlainObject(q)&&x.hasOwnProp(q,A))return q[A]}function v(A,N,q){if(x.hasOwnProp(s,q))return r(A,N);if(x.hasOwnProp(l,q))return r(void 0,A)}const g={url:m,method:m,data:m,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,allowedSocketPaths:h,responseEncoding:h,validateStatus:v,headers:(A,N,q)=>f(th(A),th(N),q,!0)};return x.forEach(Gb({...l,...s}),function(N){if(N==="__proto__"||N==="constructor"||N==="prototype")return;const q=x.hasOwnProp(g,N)?g[N]:f,F=x.hasOwnProp(l,N)?l[N]:void 0,W=x.hasOwnProp(s,N)?s[N]:void 0,X=q(F,W,N);x.isUndefined(X)&&q!==v||(c[N]=X)}),x.hasOwnProp(s,"validateStatus")&&x.isUndefined(s.validateStatus)&&p("validateStatusUndefinedResolves")===!1&&(x.hasOwnProp(l,"validateStatus")?c.validateStatus=r(void 0,l.validateStatus):delete c.validateStatus),c}const Qb=["content-type","content-length"];function Zb(l,s,c){if(c!=="content-only"){l.set(s);return}Object.entries(s||{}).forEach(([r,f])=>{Qb.includes(r.toLowerCase())&&l.set(r,f)})}const Kb=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(s,c)=>String.fromCharCode(parseInt(c,16)));function Qh(l){const s=bn({},l),c=q=>x.hasOwnProp(s,q)?s[q]:void 0,r=c("data");let f=c("withXSRFToken");const m=c("xsrfHeaderName"),h=c("xsrfCookieName");let p=c("headers");const v=c("auth"),g=c("baseURL"),A=c("allowAbsoluteUrls"),N=c("url");if(s.headers=p=ft.from(p),s.url=Lh(Gh(g,N,A,s),c("params"),c("paramsSerializer")),v){const q=x.getSafeProp(v,"username")||"",F=x.getSafeProp(v,"password")||"";try{p.set("Authorization","Basic "+btoa(q+":"+(F?Kb(F):"")))}catch(W){throw V.from(W,V.ERR_BAD_OPTION_VALUE,l)}}if(x.isFormData(r)&&(st.hasStandardBrowserEnv||st.hasStandardBrowserWebWorkerEnv||x.isReactNative(r)?p.setContentType(void 0):x.isFunction(r.getHeaders)&&Zb(p,r.getHeaders(),c("formDataHeaderPolicy"))),st.hasStandardBrowserEnv&&(x.isFunction(f)&&(f=f(s)),f===!0||f==null&&Mb(s.url))){const F=m&&h&&Ub.read(h);F&&p.set(m,F)}return s}const Jb=typeof XMLHttpRequest<"u",$b=Jb&&function(l){return new Promise(function(c,r){const f=Qh(l);let m=f.data;const h=ft.from(f.headers).normalize();let{responseType:p,onUploadProgress:v,onDownloadProgress:g}=f,A,N,q,F,W;function X(){F&&F(),W&&W(),f.cancelToken&&f.cancelToken.unsubscribe(A),f.signal&&f.signal.removeEventListener("abort",A)}let Y=new XMLHttpRequest;Y.open(f.method.toUpperCase(),f.url,!0),Y.timeout=f.timeout;function C(){if(!Y)return;const Q=ft.from("getAllResponseHeaders"in Y&&Y.getAllResponseHeaders()),Ee={data:!p||p==="text"||p==="json"?Y.responseText:Y.response,status:Y.status,statusText:Y.statusText,headers:Q,config:l,request:Y};Xh(function(ne){c(ne),X()},function(ne){r(ne),X()},Ee),Y=null}"onloadend"in Y?Y.onloadend=C:Y.onreadystatechange=function(){!Y||Y.readyState!==4||Y.status===0&&!(Y.responseURL&&Y.responseURL.startsWith("file:"))||setTimeout(C)},Y.onabort=function(){Y&&(r(new V("Request aborted",V.ECONNABORTED,l,Y)),X(),Y=null)},Y.onerror=function(ee){const Ee=ee&&ee.message?ee.message:"Network Error",me=new V(Ee,V.ERR_NETWORK,l,Y);me.event=ee||null,r(me),X(),Y=null},Y.ontimeout=function(){let ee=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded";const Ee=f.transitional||Er;f.timeoutErrorMessage&&(ee=f.timeoutErrorMessage),r(new V(ee,Ee.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,l,Y)),X(),Y=null},m===void 0&&h.setContentType(null),"setRequestHeader"in Y&&x.forEach(Mh(h),function(ee,Ee){Y.setRequestHeader(Ee,ee)}),x.isUndefined(f.withCredentials)||(Y.withCredentials=!!f.withCredentials),p&&p!=="json"&&(Y.responseType=f.responseType),g&&([q,W]=qi(g,!0),Y.addEventListener("progress",q)),v&&Y.upload&&([N,F]=qi(v),Y.upload.addEventListener("progress",N),Y.upload.addEventListener("loadend",F)),(f.cancelToken||f.signal)&&(A=Q=>{Y&&(r(!Q||Q.type?new du(null,l,Y):Q),Y.abort(),X(),Y=null)},f.cancelToken&&f.cancelToken.subscribe(A),f.signal&&(f.signal.aborted?A():f.signal.addEventListener("abort",A)));const K=jb(f.url);if(K&&!st.protocols.includes(K)){r(new V("Unsupported protocol "+K+":",V.ERR_BAD_REQUEST,l)),X();return}Y.send(m||null)})},Fb=(l,s)=>{if(l=l?l.filter(Boolean):[],!s&&!l.length)return;const c=new AbortController;let r=!1;const f=function(v){if(!r){r=!0,h();const g=v instanceof Error?v:this.reason;c.abort(g instanceof V?g:new du(g instanceof Error?g.message:g))}};let m=s&&setTimeout(()=>{m=null,f(new V(`timeout of ${s}ms exceeded`,V.ETIMEDOUT))},s);const h=()=>{l&&(m&&clearTimeout(m),m=null,l.forEach(v=>{v.unsubscribe?v.unsubscribe(f):v.removeEventListener("abort",f)}),l=null)};l.forEach(v=>{if(!r){if(v.aborted){f.call(v);return}v.addEventListener("abort",f,{once:!0})}});const{signal:p}=c;return p.unsubscribe=()=>x.asap(h),p},Wb=function*(l,s){let c=l.byteLength;if(c{const f=Ib(l,s);let m=0,h,p=v=>{h||(h=!0,r&&r(v))};return new ReadableStream({async pull(v){try{const{done:g,value:A}=await f.next();if(g){p(),v.close();return}let N=A.byteLength;if(c){let q=m+=N;c(q)}v.enqueue(new Uint8Array(A))}catch(g){throw p(g),g}},cancel(v){return p(v),f.return()}},{highWaterMark:2})},nh=l=>l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102,Zh=(l,s,c)=>s+2l<=57?l-48:(l&223)-55,ev=l=>l>=65&&l<=90||l>=97&&l<=122||l>=48&&l<=57||l===43||l===47||l===45||l===95,tv=l=>l===9||l===10||l===12||l===13||l===32,av=l=>{const s=Math.floor(l/4),c=l%4;return s*3+(c===2?1:c===3?2:0)},nv=l=>{const s=l.length;let c=0;return s>0&&l.charCodeAt(s-1)===61&&(c++,s>1&&l.charCodeAt(s-2)===61&&c++),Math.floor((s-c)*3/4)},lv=l=>{const s=l.length;let c=0,r=0,f=!1;for(let m=0;m0){f=!0;continue}c++}}return f||r>2||r>0&&(c+r)%4!==0||c%4===1?nv(l):av(c)},uv=(l,s)=>{if(!l||typeof l!="string"||!l.startsWith("data:"))return 0;const c=l.indexOf(",");if(c<0)return 0;const r=l.slice(5,c),f=l.slice(c+1);if(/;base64/i.test(r))return s(f);let h=0;for(let p=0,v=f.length;p=55296&&g<=56319&&p+1=56320&&A<=57343?(h+=4,p++):h+=3}else h+=3}return h};function iv(l){const s=typeof l=="string"?l.indexOf("#"):-1;return uv(s===-1?l:l.slice(0,s),lv)}const Tr="1.19.0",uh=64*1024,{isFunction:zi}=x,sv=l=>encodeURIComponent(l).replace(/%([0-9A-F]{2})/gi,(s,c)=>String.fromCharCode(parseInt(c,16))),ih=l=>{if(!x.isString(l))return l;try{return decodeURIComponent(l)}catch{return l}},sh=(l,...s)=>{try{return!!l(...s)}catch{return!1}},cv=l=>{const s=l.indexOf("://");let c=l;return s!==-1&&(c=c.slice(s+3)),c.includes("@")||c.includes(":")},rv=l=>{const s=x.global!==void 0&&x.global!==null?x.global:globalThis,{ReadableStream:c,TextEncoder:r}=s;l=x.merge.call({skipUndefined:!0},{Request:s.Request,Response:s.Response},l);const{fetch:f,Request:m,Response:h}=l,p=f?zi(f):typeof fetch=="function",v=zi(m),g=zi(h);if(!p)return!1;const A=p&&zi(c),N=p&&(typeof r=="function"?(C=>K=>C.encode(K))(new r):async C=>new Uint8Array(await new m(C).arrayBuffer())),q=v&&A&&sh(()=>{let C=!1;const K=new m(st.origin,{body:new c,method:"POST",get duplex(){return C=!0,"half"}}),Q=K.headers.has("Content-Type");return K.body!=null&&K.body.cancel(),C&&!Q}),F=g&&A&&sh(()=>x.isReadableStream(new h("").body)),W={stream:F&&(C=>C.body)};p&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!W[C]&&(W[C]=(K,Q)=>{let ee=K&&K[C];if(ee)return ee.call(K);throw new V(`Response type '${C}' is not supported`,V.ERR_NOT_SUPPORT,Q)})});const X=async C=>{if(C==null)return 0;if(x.isBlob(C))return C.size;if(x.isSpecCompliantForm(C))return(await new m(st.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(x.isArrayBufferView(C)||x.isArrayBuffer(C))return C.byteLength;if(x.isURLSearchParams(C)&&(C=C+""),x.isString(C))return(await N(C)).byteLength},Y=async(C,K)=>{const Q=x.toFiniteNumber(C.getContentLength());return Q??X(K)};return async C=>{let{url:K,method:Q,data:ee,signal:Ee,cancelToken:me,timeout:ne,onDownloadProgress:Le,onUploadProgress:ct,responseType:be,headers:Me,withCredentials:ke="same-origin",fetchOptions:xt,maxContentLength:He,maxBodyLength:Re}=Qh(C);const z=x.isNumber(He)&&He>-1,L=x.isNumber(Re)&&Re>-1,P=Z=>x.hasOwnProp(C,Z)?C[Z]:void 0;let Se=f||fetch;be=be?(be+"").toLowerCase():"text";let re=Fb([Ee,me&&me.toAbortSignal()],ne),S=null;const j=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let H,G=null;const le=()=>new V("Request body larger than maxBodyLength limit",V.ERR_BAD_REQUEST,C,S);try{let Z;const k=P("auth");if(k){const se=x.getSafeProp(k,"username")||"",dt=x.getSafeProp(k,"password")||"";Z={username:se,password:dt}}if(cv(K)){const se=new URL(K,st.origin);if(!Z&&(se.username||se.password)){const dt=ih(se.username),Kt=ih(se.password);Z={username:dt,password:Kt}}(se.username||se.password)&&(se.username="",se.password="",K=se.href)}if(Z&&(Me.delete("authorization"),Me.set("Authorization","Basic "+btoa(sv((Z.username||"")+":"+(Z.password||""))))),z&&typeof K=="string"&&K.startsWith("data:")&&iv(K)>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S);if(L&&Q!=="get"&&Q!=="head"){const se=await X(ee);if(typeof se=="number"&&isFinite(se)&&(H=se,se>Re))throw le()}const ue=L&&(x.isReadableStream(ee)||x.isStream(ee)),Te=(se,dt,Kt)=>ah(se,uh,Jt=>{if(L&&Jt>Re)throw G=le();dt&&dt(Jt)},Kt);if(q&&Q!=="get"&&Q!=="head"&&(ct||ue)){if(H=H??await Y(Me,ee),H!==0||ue){let se=new m(K,{method:"POST",body:ee,duplex:"half"}),dt;if(x.isFormData(ee)&&(dt=se.headers.get("content-type"))&&Me.setContentType(dt),se.body){const[Kt,Jt]=ct&&Im(H,qi(Pm(ct)))||[];ee=Te(se.body,Kt,Jt)}}}else if(ue&&!v&&A&&Q!=="get"&&Q!=="head")ee=Te(ee);else if(ue&&v&&!q&&Q!=="get"&&Q!=="head")throw new V("Stream request bodies are not supported by the current fetch implementation",V.ERR_NOT_SUPPORT,C,S);x.isString(ke)||(ke=ke?"include":"omit");const Za=v&&"credentials"in m.prototype;if(x.isFormData(ee)){const se=Me.getContentType();se&&/^multipart\/form-data/i.test(se)&&!/boundary=/i.test(se)&&Me.delete("content-type")}Me.set("User-Agent","axios/"+Tr,!1);const Ka={...xt,signal:re,method:Q.toUpperCase(),headers:Mh(Me.normalize()),body:ee,duplex:"half",credentials:Za?ke:void 0};S=v&&new m(K,Ka);let Et=await(v?Se(S,xt):Se(K,Ka));const ol=ft.from(Et.headers);if(z){const se=x.toFiniteNumber(ol.getContentLength());if(se!=null&&se>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S)}const Zt=F&&(be==="stream"||be==="response");if(F&&Et.body&&(Le||z||Zt&&j)){const se={};["status","statusText","headers"].forEach(Ja=>{se[Ja]=Et[Ja]});const dt=x.toFiniteNumber(ol.getContentLength()),[Kt,Jt]=Le&&Im(dt,qi(Pm(Le),!0))||[];let vn=0;const fl=Ja=>{if(z&&(vn=Ja,vn>He))throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S);Kt&&Kt(Ja)};Et=new h(ah(Et.body,uh,fl,()=>{Jt&&Jt(),j&&j()}),se)}be=be||"text";let At=await W[x.findKey(W,be)||"text"](Et,C);if(z&&!F&&!Zt){let se;if(At!=null&&(typeof At.byteLength=="number"?se=At.byteLength:typeof At.size=="number"?se=At.size:typeof At=="string"&&(se=typeof r=="function"?new r().encode(At).byteLength:At.length)),typeof se=="number"&&se>He)throw new V("maxContentLength size of "+He+" exceeded",V.ERR_BAD_RESPONSE,C,S)}return!Zt&&j&&j(),await new Promise((se,dt)=>{Xh(se,dt,{data:At,headers:ft.from(Et.headers),status:Et.status,statusText:Et.statusText,config:C,request:S})})}catch(Z){if(j&&j(),re&&re.aborted&&re.reason instanceof V){const k=re.reason;throw k.config=C,S&&(k.request=S),Z!==k&&Object.defineProperty(k,"cause",{__proto__:null,value:Z,writable:!0,enumerable:!1,configurable:!0}),k}if(G)throw S&&!G.request&&(G.request=S),G;if(Z instanceof V)throw S&&!Z.request&&(Z.request=S),Z;if(Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)){const k=new V("Network Error",V.ERR_NETWORK,C,S,Z&&Z.response);throw Object.defineProperty(k,"cause",{__proto__:null,value:Z.cause||Z,writable:!0,enumerable:!1,configurable:!0}),k}throw V.from(Z,Z&&Z.code,C,S,Z&&Z.response)}}},ov=new Map,Kh=l=>{let s=l&&l.env||{};const{fetch:c,Request:r,Response:f}=s,m=[r,f,c];let h=m.length,p=h,v,g,A=ov;for(;p--;)v=m[p],g=A.get(v),g===void 0&&A.set(v,g=p?new Map:rv(s)),A=g;return g};Kh();const Or={http:yb,xhr:$b,fetch:{get:Kh}};x.forEach(Or,(l,s)=>{if(l){try{Object.defineProperty(l,"name",{__proto__:null,value:s})}catch{}Object.defineProperty(l,"adapterName",{__proto__:null,value:s})}});const ch=l=>`- ${l}`,fv=l=>x.isFunction(l)||l===null||l===!1;function dv(l,s){l=x.isArray(l)?l:[l];const{length:c}=l;let r,f;const m={};for(let h=0;h`adapter ${v} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=c?h.length>1?`since : `+h.map(ch).join(` `):" "+ch(h[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+p,V.ERR_NOT_SUPPORT)}return f}const Jh={getAdapter:dv,adapters:Or};function cr(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new du(null,l)}function rr(l){return cr(l),l.headers=ft.from(l.headers),l.data=sr.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),Jh.getAdapter(l.adapter||fu.adapter,l)(l).then(function(r){cr(l),l.response=r;try{r.data=sr.call(l,l.transformResponse,r)}finally{delete l.response}return r.headers=ft.from(r.headers),r},function(r){if(!Vh(r)&&(cr(l),r&&r.response)){l.response=r.response;try{r.response.data=sr.call(l,l.transformResponse,r.response)}finally{delete l.response}r.response.headers=ft.from(r.response.headers)}return Promise.reject(r)})}const Li={};["object","boolean","number","function","string","symbol"].forEach((l,s)=>{Li[l]=function(r){return typeof r===l||"a"+(s<1?"n ":" ")+l}});const rh={};Li.transitional=function(s,c,r){function f(m,h){return"[Axios v"+Tr+"] Transitional option '"+m+"'"+h+(r?". "+r:"")}return(m,h,p)=>{if(s===!1)throw new V(f(h," has been removed"+(c?" in "+c:"")),V.ERR_DEPRECATED);return c&&!rh[h]&&(rh[h]=!0,console.warn(f(h," has been deprecated since v"+c+" and will be removed in the near future"))),s?s(m,h,p):!0}};Li.spelling=function(s){return(c,r)=>(console.warn(`${r} is likely a misspelling of ${s}`),!0)};function mv(l,s,c){if(typeof l!="object"||l===null)throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const r=Object.keys(l);let f=r.length;for(;f-- >0;){const m=r[f],h=Object.prototype.hasOwnProperty.call(s,m)?s[m]:void 0;if(h){const p=l[m],v=p===void 0||h(p,m,l);if(v!==!0)throw new V("option "+m+" must be "+v,V.ERR_BAD_OPTION_VALUE);continue}if(c!==!0)throw new V("Unknown option "+m,V.ERR_BAD_OPTION)}}const Ci={assertOptions:mv,validators:Li},ot=Ci.validators;let yn=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Fm,response:new Fm}}async request(s,c){try{return await this._request(s,c)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const m=(()=>{if(!f.stack)return"";const h=f.stack.indexOf(` `);return h===-1?"":f.stack.slice(h+1)})();try{if(!r.stack)r.stack=m;else if(m){const h=m.indexOf(` `),p=h===-1?-1:m.indexOf(` `,h+1),v=p===-1?"":m.slice(p+1);String(r.stack).endsWith(v)||(r.stack+=` -`+m)}}catch{}}throw r}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=bn(this.defaults,c);const{transitional:r,paramsSerializer:f,headers:m}=c;r!==void 0&&Ci.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean),advertiseZstdAcceptEncoding:ot.transitional(ot.boolean),validateStatusUndefinedResolves:ot.transitional(ot.boolean)},!1),f!=null&&(x.isFunction(f)?c.paramsSerializer={serialize:f}:Ci.assertOptions(f,{encode:ot.function,serialize:ot.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Ci.assertOptions(c,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let h=m&&x.merge(m.common,m[c.method]);m&&x.forEach(["delete","get","head","post","put","patch","query","common"],W=>{delete m[W]}),c.headers=ft.concat(h,m);const p=[];let v=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen=="function"&&X.runWhen(c)===!1)return;v=v&&X.synchronous;const Y=c.transitional||Er;Y&&Y.legacyInterceptorReqResOrdering?p.unshift(X.fulfilled,X.rejected):p.push(X.fulfilled,X.rejected)});const g=[];this.interceptors.response.forEach(function(X){g.push(X.fulfilled,X.rejected)});let A,N=0,q;if(!v){const W=[rr.bind(this),void 0];for(W.unshift(...p),W.push(...g),q=W.length,A=Promise.resolve(c);Nrr.call(this,F)))}catch(C){A=Promise.reject(C)}break}}if(!A)try{A=rr.call(this,F)}catch(W){A=Promise.reject(W)}for(N=0,q=g.length;N{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const h=new Promise(p=>{r.subscribe(p),m=p}).then(f);return h.cancel=function(){r.unsubscribe(m)},h},s(function(m,h,p){r.reason||(r.reason=new du(m,h,p),c(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=r=>{s.abort(r)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new $h(function(f){s=f}),cancel:s}}};function yv(l){return function(c){return l.apply(null,c)}}function pv(l){return x.isObject(l)&&l.isAxiosError===!0}const pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pr).forEach(([l,s])=>{pr[s]=l});function Fh(l){const s=new yn(l),c=Th(yn.prototype.request,s);return x.extend(c,yn.prototype,s,{allOwnKeys:!0}),x.extend(c,s,null,{allOwnKeys:!0}),c.create=function(f){return Fh(bn(l,f))},c}const Qe=Fh(fu);Qe.Axios=yn;Qe.CanceledError=du;Qe.CancelToken=hv;Qe.isCancel=Vh;Qe.VERSION=Tr;Qe.toFormData=Hi;Qe.AxiosError=V;Qe.Cancel=Qe.CanceledError;Qe.all=function(s){return Promise.all(s)};Qe.spread=yv;Qe.isAxiosError=pv;Qe.mergeConfig=bn;Qe.AxiosHeaders=ft;Qe.formToJSON=l=>Yh(x.isHTMLForm(l)?new FormData(l):l);Qe.getAdapter=Jh.getAdapter;Qe.HttpStatusCode=pr;Qe.default=Qe;const{Axios:d2,AxiosError:m2,CanceledError:h2,isCancel:y2,CancelToken:p2,VERSION:g2,all:b2,Cancel:v2,isAxiosError:S2,spread:_2,toFormData:x2,AxiosHeaders:E2,HttpStatusCode:A2,formToJSON:T2,getAdapter:O2,mergeConfig:N2,create:R2}=Qe,Qa=Qe.create({baseURL:"",timeout:3e4,headers:{"Content-Type":"application/json"}});Qa.interceptors.request.use(l=>{const s=localStorage.getItem("auth_token");return s&&(l.headers.Authorization=`Bearer ${s}`),typeof FormData<"u"&&l.data instanceof FormData&&delete l.headers["Content-Type"],l},l=>Promise.reject(l));Qa.interceptors.response.use(l=>l,l=>{var s;if(((s=l.response)==null?void 0:s.status)===401){localStorage.removeItem("auth_token");try{window.dispatchEvent(new Event("auth:logout"))}catch{}}return Promise.reject(l)});const ae=async(l,s,c)=>(await Qa.get(l,{params:s,...c})).data,ce=async(l,s,c)=>(await Qa.post(l,s,c)).data,De=async(l,s,c)=>(await Qa.put(l,s,c)).data,gv=async(l,s,c)=>(await Qa.patch(l,s,c)).data,tt=async(l,s)=>(await Qa.delete(l,s)).data,bv=async l=>ce("/login",l),vv=async()=>ae("/system-settings/public"),Sv=async(l,s)=>De("/profile",{new_username:l,current_password:s}),_v=async l=>ce("/register",l),xv=async(l,s="register",c)=>ce("/send-verification-code",{email:l,type:s,captcha_session_id:c==null?void 0:c.session_id,captcha_code:c==null?void 0:c.code}),Ev=async l=>ce("/generate-captcha",{session_id:l}),Av=async()=>ae("/verify"),Tv=async(l,s)=>ce("/change-password",{current_password:l,new_password:s}),w2=async()=>(await ae("/cookies/details")).map(s=>({id:s.id,value:s.value,cookie:s.value,enabled:s.enabled,auto_confirm:s.auto_confirm,remark:s.remark,note:s.remark,pause_duration:s.pause_duration,username:s.username,login_password:s.login_password,show_browser:s.show_browser,nickname:s.nickname||s.remark||s.username||`账号 ${s.id.substring(0,6)}`,avatar_url:s.avatar_url,location:s.location,bio:s.bio,followers:s.followers,following:s.following,profile_updated_at:s.profile_updated_at,runtime_state:s.runtime_state,ai_enabled:!1})),z2=async l=>ce(`/cookies/${l}/refresh-profile`),j2=async()=>ce("/qr-login/generate"),D2=async l=>ae(`/qr-login/check/${l}`),C2=async(l,s)=>De(`/cookies/${l}/status`,{enabled:s}),M2=async l=>tt(`/cookies/${l}`),U2=async(l,s)=>De(`/cookies/${l}/remark`,{remark:s}),q2=async(l,s)=>De(`/cookies/${l}/auto-confirm`,{auto_confirm:s}),B2=async(l,s)=>De(`/cookies/${l}/pause-duration`,{pause_duration:s}),H2=async(l,s)=>De(`/cookies/${l}`,{id:l,value:s}),L2=async(l,s)=>De(`/cookies/${l}/login-info`,s),k2=async()=>ae("/ai-reply-settings"),Ov=l=>{const s=(l==null?void 0:l.order_status)||(l==null?void 0:l.status)||"processing";return{...l,status:s,order_status:s}},Y2=async(l,s,c=1,r=20)=>{const f={page:c,page_size:r};l&&(f.cookie_id=l),s&&s!=="all"&&(f.status=s);const m=await ae("/api/orders",f),h=(m.orders||m.data||[]).map(Ov);return{success:!0,data:h,total:m.total||h.length,page:m.page||c,page_size:m.page_size||r,total_pages:m.total_pages||1,status_counts:m.status_counts}},V2=async(l,s)=>De(`/api/orders/${l}`,s),X2=async(l,s)=>De(`/api/orders/${l}/note`,{note:s}),G2=async l=>tt(`/api/orders/${l}`),Q2=async(l,s)=>{const c=new FormData,r=localStorage.getItem("auth_token");return(await fetch("/api/orders/refresh",{method:"POST",headers:{Authorization:`Bearer ${r}`},body:c})).json()},Z2=async l=>ce(`/api/orders/${l}/refresh`),K2=async(l,s,c)=>ce("/api/orders/manual-ship",{order_ids:l,ship_mode:s,custom_content:c}),J2=async l=>{const s=l instanceof FormData;return(await fetch("/api/orders/import",{method:"POST",headers:{...s?{}:{"Content-Type":"application/json"},Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:s?l:JSON.stringify(l)})).json()},Nv=l=>{if(!l)return"";const s=l.match(/filename\*=UTF-8''([^;\s]+)/i);if(s)try{return decodeURIComponent(s[1])}catch{return s[1]}const c=l.match(/filename\s*=\s*"?([^";]+)"?/i);return c?c[1].trim():""},$2=async l=>{var v;const s={};l.cookie_id&&(s.cookie_id=l.cookie_id),l.status&&l.status!=="all"&&(s.status=l.status);const c=await Qa.get("/api/orders/export",{params:s,responseType:"blob"}),r=c.data;if(!(r instanceof Blob)||r.size===0)throw new Error("导出失败:服务器未返回有效文件");if(r.type.includes("application/json")){let g="导出失败";try{const A=JSON.parse(await r.text());g=(A==null?void 0:A.message)||g}catch{}throw new Error(g)}const f=Nv((v=c.headers)==null?void 0:v["content-disposition"]),m=/\.csv$/i.test(f)?f:`orders_${Date.now()}.csv`,h=URL.createObjectURL(r),p=document.createElement("a");return p.href=h,p.download=m,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(h),m},F2=async(l,s=7)=>{const c=new FormData;return c.append("days",String(s)),(await fetch("/api/orders/sync-sold",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},W2=async(l=!1)=>(await ae("/quick-phrases",{include_disabled:l})).data||[],I2=async(l,s,c="默认",r=0)=>{const f=new FormData;return f.append("title",l),f.append("content",s),f.append("category",c),f.append("sort_order",String(r)),(await fetch("/quick-phrases",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:f})).json()},P2=async(l,s)=>{const c=new FormData;return Object.entries(s).forEach(([f,m])=>{m!=null&&c.append(f,String(m))}),(await fetch(`/quick-phrases/${l}`,{method:"PUT",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},eS=async l=>tt(`/quick-phrases/${l}`),tS=async l=>ce(`/quick-phrases/${l}/use`),aS=async()=>ae("/api/risk-control/status"),nS=async l=>ce(`/api/risk-control/${encodeURIComponent(l)}/fresh-captcha-url`),lS=async(l,s=300)=>{const c=new FormData;return c.append("cookie_id",l),c.append("timeout",String(s)),ce("/api/captcha/manual-session",c,{timeout:(s+30)*1e3})},uS=async(l,s)=>{const c=new FormData;return l&&c.append("cookie_id",l),(await fetch("/api/items/polish",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},iS=async l=>ce(`/api/orders/${l}/require-flower`),sS=async()=>ae("/api/seller-features"),cS=async(l,s)=>De(`/api/seller-features/${l}`,s),rS=async(l,s,c=1,r=!1)=>{const f=new FormData;return f.append("order_ids",l.join(",")),f.append("feedback",s),f.append("rate",String(c)),f.append("anonymous",String(r)),(await fetch("/api/orders/rate",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:f})).json()},oS=async()=>ae("/admin/stats"),fS=async()=>(await ae("/admin/users")).users||[],dS=async(l,s)=>gv(`/admin/users/${l}/status`,{is_active:s}),mS=async(l,s)=>De(`/admin/users/${l}/password`,{new_password:s}),hS=async l=>tt(`/admin/users/${l}`),yS=async(l=7)=>{let s;if(typeof l=="number"){const c=new Date,r=new Date;r.setDate(r.getDate()-l),s={start_date:r.toISOString().split("T")[0],end_date:c.toISOString().split("T")[0]}}else s=l;return ae("/analytics/orders",s)},pS=async l=>(await ae("/analytics/orders/valid",{start_date:l.start_date,end_date:l.end_date})).orders||[],gS=async()=>{const l=await ae("/cards");return Array.isArray(l)?l:l.cards||[]},bS=async l=>ce("/cards",l),vS=async(l,s)=>De(`/cards/${l}`,s),SS=async l=>tt(`/cards/${l}`),_S=async(l=200)=>{const s=await ae("/cards/shipped",{limit:l});return{total:s.total||0,shipments:s.shipments||[]}},xS=async()=>tt("/cards/shipped"),ES=async l=>{const s=new FormData;return s.append("image",l),ce("/upload-image",s)},AS=async()=>{const l=await ae("/items");return Array.isArray(l)?l:l.items||[]},TS=async l=>ce("/items/get-all-from-account",{cookie_id:l}),OS=async l=>ce("/items",l),NS=async(l,s)=>tt(`/items/${l}/${s}`),RS=async(l,s,c)=>De(`/items/${l}/${s}`,{item_detail:c}),wS=async(l,s,c)=>De(`/items/${l}/${s}/multi-quantity-delivery`,{multi_quantity_delivery:c}),zS=async()=>(await ae("/item-delivery-configs")).configs||[],jS=async(l,s)=>ae(`/items/${encodeURIComponent(l)}/${encodeURIComponent(s)}/delivery-config`),DS=async(l,s,c)=>De(`/items/${encodeURIComponent(l)}/${encodeURIComponent(s)}/delivery-config`,c),Wh=l=>({options:l.options||[],detection_status:l.detection_status||"ok",retry_after_seconds:l.retry_after_seconds,warning:l.warning}),CS=async(l,s)=>{const c=await ae(`/api/anti-abuse/sku-options/${encodeURIComponent(s)}`,{cookie_id:l});return Wh(c)},MS=async(l,s)=>{const c=await ae(`/api/anti-abuse/sku-options/${encodeURIComponent(s)}/buyer-test`,{cookie_id:l});return Wh(c)},US=async l=>(await ae("/product-automation/materials",void 0)).data||[],qS=async(l,s)=>(await De(`/product-automation/materials/${l}`,s)).data,BS=async l=>{await tt(`/product-automation/materials/${l}`)},HS=async()=>(await ae("/product-automation/filter-rules")).data||[],LS=async l=>(l.id?await De(`/product-automation/filter-rules/${l.id}`,l):await ce("/product-automation/filter-rules",l)).data,kS=async l=>{await tt(`/product-automation/filter-rules/${l}`)},YS=async l=>(await ce(`/product-automation/filter-rules/${l}/run`,{})).data,VS=async()=>(await ae("/product-automation/delete-rules")).data||[],XS=async l=>(l.id?await De(`/product-automation/delete-rules/${l.id}`,l):await ce("/product-automation/delete-rules",l)).data,GS=async l=>{await tt(`/product-automation/delete-rules/${l}`)},QS=async l=>(await ce(`/product-automation/delete-rules/${l}/preview`,{})).data,ZS=async(l=50)=>(await ae("/product-automation/runs",{limit:l})).data||[],Nr=async l=>(await ce(l,{})).data,KS=()=>Nr("/product-automation/repairs/published-ids"),JS=()=>Nr("/product-automation/repairs/short-links"),$S=()=>Nr("/product-automation/repairs/cards"),FS=async()=>{const l=await ae("/delivery-rules");return(Array.isArray(l)?l:l.data||l.rules||[]).map(c=>({id:String(c.id),name:c.description||c.keyword||"",item_keyword:c.keyword||"",cookie_id:c.cookie_id||void 0,item_id:c.item_id||void 0,item_title:c.item_title||void 0,card_group_id:c.card_id||0,card_group_name:c.card_name||"",priority:c.delivery_count||1,enabled:!!c.enabled,delivery_times:c.delivery_times||0}))},WS=async l=>{const s={keyword:l.item_keyword,card_id:l.card_group_id,delivery_count:l.priority,enabled:l.enabled??!0,description:l.name,cookie_id:l.cookie_id||null,item_id:l.item_id||null};return l.id?De(`/delivery-rules/${l.id}`,s):ce("/delivery-rules",s)},IS=async l=>tt(`/delivery-rules/${l}`),PS=async l=>(await ae(`/delivery-block-rules/${l}`)).rules,e_=async(l,s,c)=>(await De(`/delivery-block-rules/${l}/${s}`,c)).rule,t_=async l=>(await ae("/blacklist",l?{cookie_id:l}:void 0)).entries,a_=async l=>(await ce("/blacklist",l)).entry,n_=async(l,s)=>(await De(`/blacklist/${l}`,s)).entry,l_=async l=>{await tt(`/blacklist/${l}`)},u_=async l=>{if(!l)return[];const s=await ae(`/keywords-with-item-id/${l}`);return(Array.isArray(s)?s:[]).map((r,f)=>({id:String(f),keyword:r.keyword||"",reply_content:r.reply||"",item_id:r.item_id||"",match_type:"exact",enabled:!0}))},i_=async(l,s)=>{const c=await ae(`/keywords-with-item-id/${s}`),r=Array.isArray(c)?c:[];if(l.id){const f=parseInt(l.id);f>=0&&f{const c=await ae(`/keywords-with-item-id/${s}`),r=Array.isArray(c)?c:[],f=parseInt(l);return f>=0&&f{const l=await ae("/system-settings");return l.data||l},r_=async l=>{const s=Object.entries(l).map(([c,r])=>De(`/system-settings/${c}`,{value:String(r)}));return await Promise.all(s),{success:!0,message:"Settings saved"}},o_=async l=>ce("/system-settings/email-test",l),f_=async l=>ae(`/ai-reply-settings/${l}`),d_=async(l,s)=>{const c={ai_enabled:s.ai_enabled??!1,model_name:s.model_name??"qwen-plus",api_key:s.api_key??"",base_url:s.base_url??"https://dashscope.aliyuncs.com/compatible-mode/v1",max_discount_percent:s.max_discount_percent??10,max_discount_amount:s.max_discount_amount??100,max_bargain_rounds:s.max_bargain_rounds??3,context_enabled:s.context_enabled??!0,context_message_limit:s.context_message_limit??12,context_expire_minutes:s.context_expire_minutes??120,custom_prompts:s.custom_prompts??""};return De(`/ai-reply-settings/${l}`,c)},m_=async(l,s={})=>{const c=await ce(`/ai-reply-test/${l}`,{message:"你好,这是一条测试消息",...s});return{success:c.success??!0,message:c.message||"AI 连接测试成功",reply:c.reply}},h_=async()=>({success:!0,data:(await ae("/notification-channels")||[]).map(c=>{let r;try{r=JSON.parse(c.config)}catch{r=void 0}return{id:String(c.id),name:c.name,type:c.type,config:r||{},enabled:c.enabled,created_at:c.created_at,updated_at:c.updated_at}})}),y_=async l=>ce("/notification-channels",{...l,config:JSON.stringify(l.config)}),p_=async(l,s)=>{const c={...s};return"config"in s&&(c.config=JSON.stringify(s.config)),De(`/notification-channels/${l}`,c)},g_=async l=>tt(`/notification-channels/${l}`),b_=async()=>{const l=await ae("/notification-events");return{success:!0,events:(l==null?void 0:l.events)||[],priorities:(l==null?void 0:l.priorities)||[]}},v_=async()=>{const l=await ae("/message-notifications"),s=[];for(const[c,r]of Object.entries(l||{}))if(Array.isArray(r))for(const f of r)s.push({id:String(f.id),cookie_id:c,channel_id:f.channel_id,channel_name:f.channel_name,channel_type:f.channel_type,channel_enabled:f.channel_enabled!==!1,name:f.name??null,event_types:f.event_types??null,enabled:f.enabled});return{success:!0,data:s}},S_=async(l,s,c,r)=>ce(`/message-notifications/${l}`,{channel_id:s,enabled:c,...r?{name:r.name??"",event_types:r.eventTypes??[]}:{}}),__=async(l,s)=>{const c={};return s.name!==void 0&&(c.name=s.name),s.eventTypes!==void 0&&(c.event_types=s.eventTypes),s.enabled!==void 0&&(c.enabled=s.enabled),De(`/message-notifications/rule/${l}`,c)},x_=async l=>tt(`/message-notifications/${l}`),E_=async l=>ce(`/message-notifications/rule/${l}/test`),A_=async(l={})=>ae("/risk-control-logs",l),T_=async l=>tt(`/risk-control-logs/${l}`),O_=async(l={})=>ae("/logs",l),N_=async(l={})=>(await ae("/message-filters",l)).data||[],R_=async l=>ce("/message-filters/batch-create",l),w_=async l=>(await De(`/message-filters/${l}/toggle`,{})).data,z_=async l=>{await tt(`/message-filters/${l}`)},j_=async l=>(await ce("/message-filters/batch-delete",{ids:l})).deleted,D_=async()=>(await ae("/chat/accounts")).data||[],C_=async(l,s,c=30)=>(await ae(`/chat/conversations/${encodeURIComponent(l)}`,{cursor:s,limit:c})).data,M_=async(l,s,c,r=50)=>(await ae(`/chat/messages/${encodeURIComponent(l)}/${encodeURIComponent(s)}`,{cursor:c,limit:r})).data,U_=async(l,s)=>ce(`/chat/send/${encodeURIComponent(l)}`,s),q_=async(l,s)=>{const c=new FormData;return c.append("cid",s.cid),c.append("to_user_id",s.to_user_id),c.append("image",s.file),ce(`/chat/send-image/${encodeURIComponent(l)}`,c)},B_=async()=>ae("/default-replies"),H_=async l=>{const s=await ae(`/default-replies/${l}`);return{cookie_id:l,enabled:s.enabled||!1,reply_content:s.reply_content||"",reply_once:s.reply_once||!1,reply_image_url:s.reply_image_url||""}},L_=async(l,s)=>De(`/default-replies/${l}`,{enabled:s.enabled??!1,reply_content:s.reply_content||"",reply_once:s.reply_once??!1,reply_image_url:s.reply_image_url||""}),k_=async l=>tt(`/default-replies/${l}`),Y_=async l=>ce(`/default-replies/${l}/clear-records`,{}),Rv=async(l=!1)=>ae("/api/announcement",l?{force:!0}:void 0),V_=async(l,s=1,c=20,r="VALID")=>ae("/resell/favorites",{cookie_id:l,page:s,page_size:c,type:r}),X_=async(l,s,c=1,r=20)=>ae("/resell/search",{cookie_id:l,keyword:s,page:c,page_size:r}),G_=async()=>ae("/hotlist"),Q_=async l=>ce("/hotlist/refresh",{category:l}),Z_=async l=>ce("/resell/preview",l),K_=async()=>ae("/pricewatch/rules"),J_=async l=>ce("/pricewatch/rules",l),$_=async(l,s)=>De(`/pricewatch/rules/${l}`,s),F_=async l=>tt(`/pricewatch/rules/${l}`),W_=async l=>ce("/pricewatch/preview",l),I_=async l=>ce(`/pricewatch/rules/${l}/run`),P_=async(l,s=50)=>ae(`/pricewatch/rules/${l}/records`,{limit:s}),ex=async()=>ae("/pricewatch/cookies"),tx=async l=>ce("/resell/publish",l),ax=async l=>ce("/ai-optimize/preview",{cookie_id:l},{timeout:15e3}),nx=async l=>ce("/ai-optimize/suggest",{cookie_id:l},{timeout:36e4}),gr="app:feedback",br="app:confirm",wv=l=>/失败|错误|异常|无法|error|fail/i.test(l)?"error":/警告|注意|请输入|请选择|warning/i.test(l)?"warning":/成功|完成|已新增|已保存|已删除|success/i.test(l)?"success":"info",il=(l,s)=>{const c=String(l??"").trim();c&&window.dispatchEvent(new CustomEvent(gr,{detail:{id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,message:c,type:s||wv(c)}}))},lx=(l,s={})=>new Promise(c=>{window.dispatchEvent(new CustomEvent(br,{detail:{message:l,title:s.title||"确认操作",confirmLabel:s.confirmLabel||"确认",cancelLabel:s.cancelLabel||"取消",danger:s.danger??!0,resolve:c}}))}),zv=/^[A-Za-z0-9_-]{3,32}$/,jv=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,Dv=72;function Ih(l){return l?zv.test(l)?[!0,""]:[!1,"用户名需为 3-32 位字母、数字、下划线或连字符"]:[!1,"用户名不能为空"]}function Cv(l){return l?l.length>254?[!1,"邮箱地址过长"]:jv.test(l)?[!0,""]:[!1,"邮箱格式不正确"]:[!1,"邮箱不能为空"]}function Ph(l){if(!l)return[!1,"密码不能为空"];if(l.length<8)return[!1,"密码至少 8 位,且需同时包含字母和数字"];if(l.length>64)return[!1,"密码最长 64 位"];if(new TextEncoder().encode(l).length>Dv)return[!1,"密码过长(超过 72 字节),请缩短后重试"];const s=/[a-zA-Z]/.test(l),c=/\d/.test(l);return!s||!c?[!1,"密码至少 8 位,且需同时包含字母和数字"]:[!0,""]}const Mv=({activeTab:l,setActiveTab:s,onLogout:c,mobileOpen:r,onMobileClose:f,isAdmin:m=!1,username:h,onUsernameChange:p})=>{const[v,g]=B.useState(!1),[A,N]=B.useState(null),q=B.useRef(null),F=X=>m||!["settings","users"].includes(X.id);B.useEffect(()=>{if(!v)return;const X=Y=>{q.current&&!q.current.contains(Y.target)&&g(!1)};return document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)},[v]);const W=[{label:"经营概览",items:[{id:"dashboard",icon:d1,label:"总览"}]},{label:"闲鱼业务",items:[{id:"accounts",icon:P1,label:"账号管理"},{id:"items",icon:$p,label:"商品与发货"},{id:"resell",icon:Y1,label:"一键转卖"},{id:"hotlist",icon:c1,label:"实时热卖榜"},{id:"pricewatch",icon:Q1,label:"价格监控"},{id:"orders",icon:B1,label:"订单管理"},{id:"buyer-interaction",icon:L1,label:"买家互动"},{id:"cards",icon:a1,label:"卡密库存"}]},{label:"客户沟通",items:[{id:"messages",icon:h1,label:"消息中心"},{id:"auto-reply",icon:O1,label:"自动回复"},{id:"ai-reply",icon:Kp,label:"AI 回复"}]},{label:"自动化",items:[{id:"product-automation",icon:tg,label:"商品自动化"}]},{label:"系统",items:[{id:"help",icon:Qp,label:"使用说明"},{id:"users",icon:J1,label:"用户管理"},{id:"notifications",icon:Xp,label:"通知与日志"},{id:"settings",icon:M1,label:"系统设置"},{id:"about",icon:bh,label:"关于"}].filter(F)}];return y.jsxs(y.Fragment,{children:[r&&y.jsx("button",{type:"button",className:"fixed inset-0 z-30 bg-black/40 lg:hidden",onClick:f,"aria-label":"关闭导航"}),y.jsxs("aside",{className:`fixed left-0 top-0 z-40 flex h-screen w-[248px] flex-col bg-[var(--surface)] transition-transform lg:translate-x-0 ${r?"translate-x-0":"-translate-x-full"}`,style:{borderRight:"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[y.jsxs("div",{className:"flex h-[76px] shrink-0 items-center gap-3 px-5",children:[y.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"},children:y.jsx("span",{className:"text-lg font-black text-[#2a2416]",children:"躺"})}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("p",{className:"truncate text-base font-extrabold text-[var(--text)]",children:"躺赚鱼"}),y.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-[var(--text-soft)]",children:"运营工作台"})]}),y.jsx("button",{type:"button",onClick:f,className:"rounded-full p-2 hover:bg-[var(--surface-hover)] lg:hidden","aria-label":"关闭导航",children:y.jsx(_h,{className:"w-5 h-5"})})]}),y.jsx("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 pb-4",children:W.map((X,Y)=>y.jsxs("div",{className:Y===0?"":"mt-5",children:[y.jsx("p",{className:"mb-2 px-3 text-[11px] font-bold uppercase tracking-wide text-[var(--text-soft)]",children:X.label}),y.jsx("div",{className:"space-y-1",children:X.items.map(C=>{const K=C.icon,Q=l===C.id;return y.jsxs("button",{type:"button",onClick:()=>s(C.id),className:`group flex min-h-11 w-full items-center gap-3 rounded-xl px-3 text-left transition-all ${Q?"font-bold text-[#2a2416]":"font-medium text-[var(--text-muted)] hover:bg-[var(--surface-hover)] hover:text-[var(--text)]"}`,style:Q?{background:"linear-gradient(135deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"}:void 0,children:[y.jsx(K,{className:`h-[18px] w-[18px] shrink-0 ${Q?"text-[#2a2416]":"text-[var(--text-soft)] group-hover:text-[var(--text-muted)]"}`}),y.jsx("span",{className:"truncate text-sm",children:C.label})]},C.id)})})]},X.label))})]}),y.jsxs("div",{className:"shrink-0 p-3",style:{borderTop:"1px solid var(--border)"},children:[y.jsx(dr,{className:"mb-2"}),y.jsxs("div",{className:"relative",ref:q,children:[y.jsxs("button",{type:"button",onClick:()=>g(X=>!X),"aria-expanded":v,"aria-haspopup":"menu",className:"flex min-h-11 w-full items-center gap-3 rounded-xl px-3 text-left transition-colors hover:bg-[var(--surface-hover)]",children:[y.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-black text-[#2a2416]",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))"},children:(h||"?").slice(0,1).toUpperCase()}),y.jsxs("span",{className:"min-w-0 flex-1",children:[y.jsx("span",{className:"block truncate text-sm font-semibold text-[var(--text)]",children:h||"未登录"}),y.jsx("span",{className:"block text-[11px] font-medium text-[var(--text-soft)]",children:m?"管理员":"用户"})]}),y.jsx(Wp,{className:`h-4 w-4 shrink-0 text-[var(--text-soft)] transition-transform ${v?"":"rotate-180"}`})]}),v&&y.jsxs("div",{role:"menu",className:"absolute bottom-full left-0 right-0 mb-2 space-y-0.5 rounded-xl border bg-[var(--surface)] p-1.5 shadow-[var(--shadow-card,0_8px_24px_rgba(20,24,28,0.16))]",style:{borderColor:"var(--border)"},children:[!m&&y.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{g(!1),N("rename")},className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text)]",children:[y.jsx(F1,{className:"h-4 w-4 shrink-0"}),"修改用户名"]}),y.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{g(!1),N("password")},className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text)]",children:[y.jsx(vh,{className:"h-4 w-4 shrink-0"}),"修改密码"]}),y.jsx("div",{className:"my-1",style:{borderTop:"1px solid var(--border)"}}),y.jsxs("button",{type:"button",role:"menuitem",onClick:c,className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--danger-soft)] hover:text-[var(--danger)]",children:[y.jsx(b1,{className:"h-4 w-4 shrink-0"}),"退出登录"]})]})]})]}),A&&Up.createPortal(y.jsx(Uv,{mode:A,isAdmin:m,onClose:()=>N(null),onRenamed:X=>{N(null),p==null||p(X)}}),document.body)]})]})},Uv=({mode:l,isAdmin:s,onClose:c,onRenamed:r})=>{const[f,m]=B.useState(""),[h,p]=B.useState(""),[v,g]=B.useState(""),[A,N]=B.useState(!1),q=l==="rename",F=async X=>{X.preventDefault();const Y=h.trim();if(q){if(!Ih(Y)){il("用户名需 3-32 位,仅限字母、数字、下划线或短横线","warning");return}}else{if(!Ph(Y)){il("新密码至少 8 位,且同时包含字母和数字","warning");return}if(Y!==v){il("两次输入的新密码不一致","warning");return}}N(!0);try{const C=q?await Sv(Y,f):await Tv(f,Y);C.success?(il(q?"用户名修改成功":"密码修改成功,下次登录请使用新密码","success"),q?r(Y):c()):il(C.message||"修改失败,请稍后重试","error")}catch{il("网络异常,修改失败","error")}finally{N(!1)}},W="ios-input h-11 w-full rounded-md px-4 text-sm";return y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onClick:A?void 0:c,children:y.jsxs("form",{className:"w-full max-w-sm rounded-2xl bg-[var(--surface)] p-6 shadow-[0_12px_40px_rgba(20,24,28,0.24)]",onClick:X=>X.stopPropagation(),onSubmit:X=>void F(X),children:[y.jsx("h3",{className:"text-base font-extrabold text-[var(--text)]",children:q?"修改用户名":"修改密码"}),y.jsx("p",{className:"mt-1 text-xs text-[var(--text-soft)]",children:q?"用户名是登录凭证,修改后请用新用户名登录":"修改成功后当前登录保持有效"}),y.jsxs("label",{className:"mt-4 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:"当前密码"}),y.jsx("input",{type:"password",autoComplete:"current-password",value:f,onChange:X=>m(X.target.value),className:W,placeholder:"请输入当前密码",disabled:A})]}),y.jsxs("label",{className:"mt-3 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:q?"新用户名":"新密码"}),y.jsx("input",{type:q?"text":"password",autoComplete:q?"username":"new-password",value:h,onChange:X=>p(X.target.value),className:W,placeholder:q?"3-32 位字母/数字/下划线/短横线":"至少 8 位,含字母和数字",disabled:A})]}),!q&&y.jsxs("label",{className:"mt-3 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:"确认新密码"}),y.jsx("input",{type:"password",autoComplete:"new-password",value:v,onChange:X=>g(X.target.value),className:W,placeholder:"再次输入新密码",disabled:A})]}),y.jsxs("div",{className:"mt-6 flex gap-3",children:[y.jsx("button",{type:"button",onClick:c,disabled:A,className:"ios-btn-secondary h-11 flex-1 rounded-md text-sm font-bold",children:"取消"}),y.jsx("button",{type:"submit",disabled:A||!f||!h.trim(),className:"ios-btn-primary h-11 flex-1 rounded-md text-sm font-bold disabled:opacity-60",children:A?y.jsx(su,{className:"mx-auto h-4 w-4 animate-spin"}):"确认修改"})]})]})})},qv={success:{icon:or,className:"border-emerald-200 bg-emerald-50 text-emerald-800"},error:{icon:Pp,className:"border-red-200 bg-red-50 text-red-800"},warning:{icon:Sh,className:"border-amber-200 bg-amber-50 text-amber-900"},info:{icon:bh,className:"border-gray-200 bg-white text-gray-800"}},Bv=()=>{const[l,s]=B.useState([]),[c,r]=B.useState(null);B.useEffect(()=>{const m=p=>{const v=p.detail;s(g=>[...g.slice(-3),v]),window.setTimeout(()=>{s(g=>g.filter(A=>A.id!==v.id))},v.type==="error"?6e3:3600)},h=p=>{r(p.detail)};return window.addEventListener(gr,m),window.addEventListener(br,h),()=>{window.removeEventListener(gr,m),window.removeEventListener(br,h)}},[]),B.useEffect(()=>{if(!c)return;const m=h=>{h.key==="Escape"&&(c.resolve(!1),r(null))};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[c]);const f=m=>{c==null||c.resolve(m),r(null)};return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed right-4 top-4 z-[10000] flex w-[min(380px,calc(100vw-2rem))] flex-col gap-2","aria-live":"polite",children:l.map(m=>{const h=qv[m.type],p=h.icon;return y.jsxs("div",{role:m.type==="error"?"alert":"status",className:`flex items-start gap-3 rounded-md border px-4 py-3 shadow-[0_4px_16px_rgba(20,24,28,0.10)] ${h.className}`,children:[y.jsx(p,{className:"mt-0.5 h-5 w-5 shrink-0"}),y.jsx("span",{className:"min-w-0 flex-1 break-words text-sm font-medium",children:m.message}),y.jsx("button",{type:"button",className:"shrink-0 rounded p-0.5 hover:bg-black/5",onClick:()=>s(v=>v.filter(g=>g.id!==m.id)),"aria-label":"关闭提示",children:y.jsx(_h,{className:"h-4 w-4"})})]},m.id)})}),c&&y.jsx("div",{className:"modal-overlay",role:"presentation",onMouseDown:m=>{m.target===m.currentTarget&&f(!1)},children:y.jsxs("div",{role:"alertdialog","aria-modal":"true","aria-labelledby":"global-confirm-title","aria-describedby":"global-confirm-message",className:"modal-container max-w-md",children:[y.jsxs("div",{className:"modal-body flex items-start gap-3",children:[y.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-amber-50 text-amber-700",children:y.jsx(Sh,{className:"h-5 w-5"})}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("h2",{id:"global-confirm-title",className:"text-base font-bold text-gray-900",children:c.title}),y.jsx("p",{id:"global-confirm-message",className:"mt-1 break-words text-sm leading-6 text-gray-600",children:c.message})]})]}),y.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[y.jsx("button",{type:"button",className:"ios-btn-secondary rounded-md px-4 py-2 text-sm",onClick:()=>f(!1),children:c.cancelLabel}),y.jsx("button",{type:"button",className:`${c.danger?"ios-btn-danger":"ios-btn-primary"} rounded-md px-4 py-2 text-sm`,onClick:()=>f(!0),autoFocus:!0,children:c.confirmLabel})]})]})})]})},Hv={info:"border-[#ffe566] bg-[#fffdf0] text-[#6b5200]",warning:"border-[#f5c800] bg-[#fff7e6] text-[#8a6300]",danger:"border-red-200 bg-red-50 text-red-700"},oh={info:"bg-[#ffe100] text-[#2a2416]",warning:"bg-[#f5c800] text-[#2a2416]",danger:"bg-red-600 text-white"},Lv=()=>{const[l,s]=B.useState(null);B.useEffect(()=>{const h=()=>{Rv().then(s).catch(()=>{})};h();const p=setInterval(h,3e5);return()=>clearInterval(p)},[]);const c=(l==null?void 0:l.announcements)||[],r=!!(l!=null&&l.has_update);if(!c.length&&!r)return null;const f=c.some(h=>h.level==="danger")?"danger":c.some(h=>h.level==="warning")?"warning":"info",m=c.map(h=>y.jsxs("span",{className:"inline-flex items-center gap-2 px-8",children:[y.jsx("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-bold ${oh[h.level]||oh.info}`,children:h.level==="danger"?"重要":h.level==="warning"?"注意":"通知"}),h.title&&y.jsx("b",{className:"font-bold",children:h.title}),y.jsx("span",{children:h.content.replace(/\s*\n\s*/g," ")}),h.published_at&&y.jsx("span",{className:"text-[11px] opacity-60",children:h.published_at})]},h.id));return y.jsxs("div",{className:"mx-auto max-w-[1320px] space-y-2 px-4 pt-4 sm:px-6 lg:px-8",children:[r&&y.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 px-4 py-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsxs("p",{className:"text-sm font-bold text-amber-900",children:["发现新版本 ",l==null?void 0:l.latest_version,y.jsxs("span",{className:"ml-2 font-normal text-amber-700",children:["当前 ",l==null?void 0:l.local_version]})]}),(l==null?void 0:l.release_notes)&&y.jsx("p",{className:"mt-1 whitespace-pre-wrap text-xs leading-relaxed text-amber-800",children:l.release_notes})]}),(l==null?void 0:l.download_url)&&y.jsxs("a",{href:l.download_url,target:"_blank",rel:"noopener noreferrer",className:"ios-btn-primary inline-flex flex-none items-center gap-2 rounded-md px-3 py-2 text-xs",children:[y.jsx(l1,{className:"h-4 w-4"}),"前往下载",y.jsx(i1,{className:"h-3 w-3"})]})]}),c.length>0&&y.jsxs("div",{className:`flex items-center gap-3 overflow-hidden rounded-md border px-3 py-2 ${Hv[f]}`,children:[y.jsx(x1,{className:"h-4 w-4 flex-none"}),y.jsx("div",{className:"marquee min-w-0 flex-1",children:y.jsxs("div",{className:"marquee__track text-xs leading-relaxed",children:[m,y.jsx("span",{"aria-hidden":"true",children:m})]})})]})]})},fh=({image:l,code:s,onCodeChange:c,onRefresh:r,label:f="图形验证码"})=>y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:f}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx("input",{type:"text",placeholder:"请输入图中字符",value:s,onChange:m=>c(m.target.value),maxLength:4,autoComplete:"off",className:"ios-input h-11 w-full rounded-md px-4 text-sm uppercase"}),l?y.jsx("img",{src:l,alt:"图形验证码,点击换一张",title:"看不清?点击换一张",onClick:r,className:"h-11 w-28 shrink-0 cursor-pointer rounded-md border border-gray-200 bg-white"}):y.jsx("button",{type:"button",onClick:r,className:"h-11 w-28 shrink-0 rounded-md border border-gray-200 bg-gray-50 text-xs text-gray-500",children:"点击获取"}),y.jsx("button",{type:"button",onClick:r,"aria-label":"刷新图形验证码",className:"ios-btn-secondary h-11 shrink-0 rounded-md px-2",children:y.jsx(D1,{className:"h-4 w-4"})})]})]});function dh(l=!1){const[s,c]=B.useState(()=>mh()),[r,f]=B.useState(""),[m,h]=B.useState(""),[p,v]=B.useState(!1),g=B.useCallback(async()=>{const A=mh();c(A),h("");try{const N=await Ev(A);N.success&&f(N.captcha_image)}catch{}},[]);return B.useEffect(()=>{l&&g()},[]),{sessionId:s,image:r,code:m,setCode:h,required:p,setRequired:v,refresh:g}}function mh(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`sess-${Date.now()}-${Math.random().toString(36).slice(2)}`}const kv=B.lazy(()=>et(()=>import("./Dashboard-BqSYxYMH.js"),__vite__mapDeps([0,1,2,3,4,5]))),Yv=B.lazy(()=>et(()=>import("./AccountList-Lyt155CU.js"),__vite__mapDeps([6,1,7,8,9,10,11,12,13,14]))),Vv=B.lazy(()=>et(()=>import("./OrderList-DUrGM6ZA.js"),__vite__mapDeps([15,1,16,17,18,5,19,13,20,10,21,14]))),Xv=B.lazy(()=>et(()=>import("./CardList-CkB5V0PZ.js"),__vite__mapDeps([22,1,16,20,10,2,14,23,5]))),Gv=B.lazy(()=>et(()=>import("./ItemList-HN0VsL5w.js"),__vite__mapDeps([24,1,25,14,10,16,26,9,5,8,27,20]))),Qv=B.lazy(()=>et(()=>import("./ProductAutomation-B-uvMI8m.js"),__vite__mapDeps([28,1,18,10,14,29,5,30]))),Zv=B.lazy(()=>et(()=>import("./AIReply-CSp6SZ4l.js"),__vite__mapDeps([31,1,14,32,12,13,29]))),Kv=B.lazy(()=>et(()=>import("./Settings-B4iT-2pS.js"),__vite__mapDeps([33,1,14,8,34,12,13]))),Jv=B.lazy(()=>et(()=>import("./Keywords-fyAYcEeY.js"),__vite__mapDeps([35,1,17,11,16,9,10,26,14,8]))),$v=B.lazy(()=>et(()=>import("./MessageManagement-C3dJ1ot-.js"),__vite__mapDeps([36,1,27,18,2,23,34,37,16,10]))),Fv=B.lazy(()=>et(()=>import("./NotificationsAndLogs-CXySSaLa.js"),__vite__mapDeps([38,1,30,25,4,16,39,10,37,21,14,7]))),Wv=B.lazy(()=>et(()=>import("./UserManagement-m20rmA1E.js"),__vite__mapDeps([40,1,10]))),Iv=B.lazy(()=>et(()=>import("./About-V2zOAa0k.js"),__vite__mapDeps([41,1]))),Pv=B.lazy(()=>et(()=>import("./BuyerInteraction-DzbRhyPP.js"),__vite__mapDeps([42,1,14,25,19,32]))),e2=B.lazy(()=>et(()=>import("./Resell-BxlYjwuk.js"),__vite__mapDeps([43,1,18,2]))),t2=B.lazy(()=>et(()=>import("./HotList-BLmZsZvH.js"),__vite__mapDeps([44,1,3,2]))),a2=B.lazy(()=>et(()=>import("./PriceWatch-BrSmVRsV.js"),__vite__mapDeps([45,1,16,29,39,10,18]))),n2=B.lazy(()=>et(()=>import("./Help-Diw0fiZl.js"),[])),Pe=()=>y.jsxs("div",{className:"page-loading",children:[y.jsx(su,{className:"h-5 w-5 animate-spin"}),y.jsx("span",{children:"正在加载页面"})]}),l2={dashboard:"总览",accounts:"账号管理",items:"商品与发货",resell:"一键转卖",hotlist:"实时热卖榜",pricewatch:"价格监控",orders:"订单管理","buyer-interaction":"买家互动",cards:"卡密库存",messages:"消息中心","auto-reply":"自动回复","ai-reply":"AI 回复","product-automation":"商品自动化",notifications:"通知与日志",settings:"系统设置",users:"用户管理",about:"关于",help:"使用说明"},u2=["settings","users"],i2=()=>{const[l,s]=B.useState(!1),[c,r]=B.useState(()=>localStorage.getItem("active_page")||"dashboard"),[f,m]=B.useState(!0),[h,p]=B.useState(""),[v,g]=B.useState(""),[A,N]=B.useState(!1),[q,F]=B.useState(""),[W,X]=B.useState(""),[Y,C]=B.useState(!1),[K,Q]=B.useState(!1),[ee,Ee]=B.useState("login"),[me,ne]=B.useState(!1),[Le,ct]=B.useState(!0),[be,Me]=B.useState({username:"",email:"",password:"",code:""}),[ke,xt]=B.useState(!1),[He,Re]=B.useState(""),[z,L]=B.useState(""),[P,Se]=B.useState(!1),[re,S]=B.useState(0),j=dh(),H=dh();B.useEffect(()=>{ee==="register"&&j.refresh()},[ee]),B.useEffect(()=>{vv().then(k=>{ne(String(k.registration_enabled)==="true"),ct(String(k.email_verification_enabled??"true")!=="false")}).catch(()=>ne(!1))},[]),B.useEffect(()=>{if(re<=0)return;const k=setTimeout(()=>S(re-1),1e3);return()=>clearTimeout(k)},[re]);const G=async()=>{if(!be.email.trim()){Re("请先填写邮箱");return}if(!j.code.trim()){Re("请先输入图形验证码");return}Se(!0),Re(""),L("");try{const k=await xv(be.email.trim(),"register",{session_id:j.sessionId,code:j.code.trim()});if((k==null?void 0:k.success)===!1){Re(k.message||"验证码发送失败,请确认邮件服务已配置"),j.refresh();return}L("验证码已发送,请查收邮箱"),S(60),j.refresh()}catch(k){Re(k instanceof Error?k.message:"验证码发送失败"),j.refresh()}finally{Se(!1)}},le=async k=>{k.preventDefault(),Re(""),L("");for(const[ue,Te]of[Ih(be.username.trim()),Cv(be.email.trim()),Ph(be.password)])if(!ue){Re(Te);return}if(Le&&!be.code.trim()){Re("请填写邮箱验证码");return}xt(!0);try{const ue=await _v({username:be.username.trim(),email:be.email.trim(),password:be.password,...Le?{verification_code:be.code.trim()}:{}});ue!=null&&ue.success?(p(be.username.trim()),g(""),Me({username:"",email:"",password:"",code:""}),Ee("login"),F(""),L(""),X("注册成功,请使用新账号登录")):Re((ue==null?void 0:ue.message)||"注册失败")}catch(ue){Re(ue instanceof Error?ue.message:"注册失败,请稍后重试")}finally{xt(!1)}};B.useEffect(()=>{localStorage.getItem("auth_token")?Av().then(Te=>{if(!Te.authenticated){localStorage.removeItem("auth_token");return}Q(!!Te.is_admin),p(Te.username||""),s(!0)}).catch(()=>localStorage.removeItem("auth_token")).finally(()=>m(!1)):m(!1);const ue=()=>s(!1);return window.addEventListener("auth:logout",ue),()=>window.removeEventListener("auth:logout",ue)},[]),B.useEffect(()=>{localStorage.setItem("active_page",c)},[c]),B.useEffect(()=>{!K&&u2.includes(c)&&r("dashboard")},[K]);const Z=async k=>{k.preventDefault(),N(!0),F("");try{const ue=await bv({username:h,password:v,...H.required?{captcha_session_id:H.sessionId,captcha_code:H.code.trim()}:{}});ue.success&&ue.token?(localStorage.setItem("auth_token",ue.token),Q(!!ue.is_admin),p(ue.username||h),s(!0)):(F(ue.message||"账号或密码错误"),ue.captcha_required&&(H.setRequired(!0),H.refresh()))}catch(ue){F(ue instanceof Error?ue.message:"登录失败,请稍后重试")}finally{N(!1)}};return f?y.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[var(--app-bg)]",children:y.jsxs("div",{className:"flex items-center gap-3 text-sm font-semibold text-[var(--text-muted)]",children:[y.jsx(su,{className:"h-5 w-5 animate-spin text-[var(--brand-text)]"}),"正在验证登录状态"]})}):l?y.jsxs("div",{className:"flex min-h-screen bg-[var(--app-bg)] text-[var(--text)]",children:[y.jsx(Bv,{}),y.jsx(Mv,{activeTab:c,setActiveTab:k=>{r(k),C(!1)},mobileOpen:Y,onMobileClose:()=>C(!1),isAdmin:K,username:l?h:"",onUsernameChange:p,onLogout:()=>{localStorage.removeItem("auth_token"),Q(!1),s(!1)}}),y.jsxs("main",{className:"min-h-screen min-w-0 flex-1 overflow-y-auto lg:ml-[248px]",children:[y.jsxs("header",{className:"sticky top-0 z-20 flex h-14 items-center gap-3 border-b border-[var(--border)] bg-[var(--surface)] px-4 lg:hidden",children:[y.jsx("button",{type:"button",onClick:()=>C(!0),className:"p-2 -ml-2 rounded-md hover:bg-gray-100",title:"打开导航","aria-label":"打开导航",children:y.jsx(A1,{className:"w-5 h-5"})}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("p",{className:"truncate text-sm font-bold",children:l2[c]||"躺赚鱼"}),y.jsx("p",{className:"text-[11px] text-gray-400",children:"躺赚鱼"})]}),y.jsx(dr,{compact:!0,className:"ml-auto"})]}),c!=="messages"&&y.jsx(Lv,{}),y.jsxs("div",{className:c==="messages"?"h-[calc(100vh-3.5rem)] lg:h-screen overflow-hidden":"mx-auto max-w-[1320px] p-4 pb-10 sm:p-6 lg:p-8",children:[y.jsx("section",{hidden:c!=="dashboard",children:y.jsx(B.Suspense,{fallback:c==="dashboard"?y.jsx(Pe,{}):null,children:y.jsx(kv,{})})}),y.jsx("section",{hidden:c!=="accounts",children:y.jsx(B.Suspense,{fallback:c==="accounts"?y.jsx(Pe,{}):null,children:y.jsx(Yv,{})})}),y.jsx("section",{hidden:c!=="items",children:y.jsx(B.Suspense,{fallback:c==="items"?y.jsx(Pe,{}):null,children:y.jsx(Gv,{})})}),y.jsx("section",{hidden:c!=="resell",children:y.jsx(B.Suspense,{fallback:c==="resell"?y.jsx(Pe,{}):null,children:y.jsx(e2,{})})}),y.jsx("section",{hidden:c!=="hotlist",children:y.jsx(B.Suspense,{fallback:c==="hotlist"?y.jsx(Pe,{}):null,children:y.jsx(t2,{})})}),y.jsx("section",{hidden:c!=="pricewatch",children:y.jsx(B.Suspense,{fallback:c==="pricewatch"?y.jsx(Pe,{}):null,children:y.jsx(a2,{})})}),y.jsx("section",{hidden:c!=="product-automation",children:y.jsx(B.Suspense,{fallback:c==="product-automation"?y.jsx(Pe,{}):null,children:y.jsx(Qv,{})})}),y.jsx("section",{hidden:c!=="orders",children:y.jsx(B.Suspense,{fallback:c==="orders"?y.jsx(Pe,{}):null,children:y.jsx(Vv,{})})}),y.jsx("section",{hidden:c!=="cards",children:y.jsx(B.Suspense,{fallback:c==="cards"?y.jsx(Pe,{}):null,children:y.jsx(Xv,{})})}),y.jsx("section",{hidden:c!=="auto-reply",children:y.jsx(B.Suspense,{fallback:c==="auto-reply"?y.jsx(Pe,{}):null,children:y.jsx(Jv,{mode:"reply"})})}),y.jsx("section",{hidden:c!=="ai-reply",children:y.jsx(B.Suspense,{fallback:c==="ai-reply"?y.jsx(Pe,{}):null,children:y.jsx(Zv,{})})}),y.jsx("section",{hidden:c!=="messages",className:"h-full min-h-0",children:y.jsx(B.Suspense,{fallback:c==="messages"?y.jsx(Pe,{}):null,children:y.jsx($v,{isActive:c==="messages"})})}),y.jsx("section",{hidden:c!=="notifications",children:y.jsx(B.Suspense,{fallback:c==="notifications"?y.jsx(Pe,{}):null,children:y.jsx(Fv,{isAdmin:K})})}),K&&y.jsx("section",{hidden:c!=="users",children:y.jsx(B.Suspense,{fallback:c==="users"?y.jsx(Pe,{}):null,children:y.jsx(Wv,{})})}),K&&y.jsx("section",{hidden:c!=="settings",children:y.jsx(B.Suspense,{fallback:c==="settings"?y.jsx(Pe,{}):null,children:y.jsx(Kv,{})})}),y.jsx("section",{hidden:c!=="buyer-interaction",children:y.jsx(B.Suspense,{fallback:c==="buyer-interaction"?y.jsx(Pe,{}):null,children:y.jsx(Pv,{})})}),y.jsx("section",{hidden:c!=="about",children:y.jsx(B.Suspense,{fallback:c==="about"?y.jsx(Pe,{}):null,children:y.jsx(Iv,{})})}),y.jsx("section",{hidden:c!=="help",children:y.jsx(B.Suspense,{fallback:c==="help"?y.jsx(Pe,{}):null,children:y.jsx(n2,{})})})]})]})]}):y.jsxs("div",{className:"relative min-h-screen bg-[var(--app-bg)] p-4 font-sans text-[var(--text)] sm:p-6",children:[y.jsx(dr,{compact:!0,className:"absolute right-4 top-4 z-10 sm:right-6 sm:top-6"}),y.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-2rem)] max-w-5xl items-center justify-center sm:min-h-[calc(100vh-3rem)]",children:y.jsxs("div",{className:"grid w-full overflow-hidden rounded-3xl bg-[var(--surface)] lg:grid-cols-[1.05fr_0.95fr]",style:{border:"1px solid var(--border)",boxShadow:"var(--shadow-lg)"},children:[y.jsxs("div",{className:"theme-brand-panel hidden min-h-[560px] flex-col justify-between p-10 lg:flex",style:{background:"linear-gradient(155deg, #fff8d1 0%, #ffe566 55%, #ffe100 100%)"},children:[y.jsxs("div",{children:[y.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl bg-white/70 backdrop-blur",children:y.jsx("span",{className:"text-2xl font-black text-[#2a2416]",children:"躺"})}),y.jsx("p",{className:"mt-7 text-xs font-bold tracking-widest text-[#8a6300]",children:"TANGZHUAN YU"}),y.jsx("h1",{className:"mt-2 max-w-md text-3xl font-extrabold leading-tight text-[#2a2416]",children:"躺赚鱼"}),y.jsx("p",{className:"mt-4 max-w-md text-sm leading-7 text-[#6b5200]",children:"统一处理账号、商品、订单、消息、回复和自动发货。"})]}),y.jsx("div",{className:"grid grid-cols-2 gap-3",children:["账号与商品同步","订单与发货处理","消息与自动回复","通知与运行日志"].map(k=>y.jsx("div",{className:"rounded-2xl bg-white/70 px-4 py-3 text-xs font-bold text-[#544c39] backdrop-blur",children:k},k))})]}),y.jsx("div",{className:"flex min-h-[500px] items-center p-7 sm:p-10",children:y.jsxs("div",{className:"mx-auto w-full max-w-sm animate-fade-in",children:[y.jsxs("div",{className:"mb-8",children:[y.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-2xl lg:hidden",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"},children:y.jsx("span",{className:"text-xl font-black text-[#2a2416]",children:"躺"})}),y.jsx("h2",{className:"text-2xl font-extrabold text-gray-900",children:ee==="login"?"登录管理后台":"注册新账号"}),y.jsx("p",{className:"mt-2 text-sm text-gray-500",children:ee==="login"?"使用管理员账号进入工作台":"创建账号后即可登录工作台"})]}),ee==="login"&&y.jsxs("form",{onSubmit:Z,className:"space-y-5",children:[y.jsxs("div",{className:"space-y-4",children:[y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"管理员账号"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Gm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"请输入账号",value:h,onChange:k=>p(k.target.value),autoComplete:"username",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"密码"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Vm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"password",placeholder:"请输入密码",value:v,onChange:k=>g(k.target.value),autoComplete:"current-password",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),H.required&&y.jsx(fh,{image:H.image,code:H.code,onCodeChange:H.setCode,onRefresh:()=>void H.refresh()})]}),W&&y.jsxs("div",{role:"status",className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm font-semibold text-green-700",children:[y.jsx(or,{className:"h-4 w-4 shrink-0"})," ",W]}),q&&y.jsxs("div",{role:"alert",className:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:[y.jsx(Xm,{className:"h-4 w-4 shrink-0"})," ",q]}),y.jsx("button",{type:"submit",disabled:A,className:"ios-btn-primary flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm disabled:opacity-70",children:A?y.jsx(su,{className:"h-4 w-4 animate-spin"}):y.jsxs(y.Fragment,{children:["登录 ",y.jsx(Ym,{className:"h-4 w-4"})]})})]}),ee==="register"&&y.jsxs("form",{onSubmit:le,className:"space-y-5",children:[y.jsxs("div",{className:"space-y-4",children:[y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"账号"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Gm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"设置登录账号",value:be.username,onChange:k=>Me({...be,username:k.target.value}),autoComplete:"username",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"邮箱"}),y.jsxs("div",{className:"relative group",children:[y.jsx(S1,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"email",placeholder:"用于找回账号",value:be.email,onChange:k=>Me({...be,email:k.target.value}),autoComplete:"email",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"密码"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Vm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"password",placeholder:"至少 8 位,含字母和数字",value:be.password,onChange:k=>Me({...be,password:k.target.value}),autoComplete:"new-password",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),Le&&y.jsxs(y.Fragment,{children:[y.jsx(fh,{image:j.image,code:j.code,onCodeChange:j.setCode,onRefresh:()=>void j.refresh()}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"邮箱验证码"}),y.jsxs("div",{className:"flex gap-2",children:[y.jsxs("div",{className:"relative group flex-1",children:[y.jsx(vh,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"请输入验证码",value:be.code,onChange:k=>Me({...be,code:k.target.value}),className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]}),y.jsx("button",{type:"button",onClick:()=>void G(),disabled:P||re>0,className:"ios-btn-secondary h-11 shrink-0 rounded-md px-3 text-xs font-bold disabled:opacity-60",children:re>0?`${re}s`:P?"发送中":"获取验证码"})]})]})]})]}),z&&y.jsxs("div",{role:"status",className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm font-semibold text-green-700",children:[y.jsx(or,{className:"h-4 w-4 shrink-0"})," ",z]}),He&&y.jsxs("div",{role:"alert",className:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:[y.jsx(Xm,{className:"h-4 w-4 shrink-0"})," ",He]}),y.jsx("button",{type:"submit",disabled:ke,className:"ios-btn-primary flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm disabled:opacity-70",children:ke?y.jsx(su,{className:"h-4 w-4 animate-spin"}):y.jsxs(y.Fragment,{children:["注册 ",y.jsx(Ym,{className:"h-4 w-4"})]})})]}),me&&y.jsx("div",{className:"mt-5 text-center text-xs text-gray-500",children:ee==="login"?y.jsxs(y.Fragment,{children:["还没有账号?",y.jsx("button",{type:"button",onClick:()=>{Ee("register"),F(""),X("")},className:"ml-1 font-bold text-[var(--brand-text)] hover:underline",children:"注册新账号"})]}):y.jsxs(y.Fragment,{children:["已有账号?",y.jsx("button",{type:"button",onClick:()=>{Ee("login"),Re(""),L("")},className:"ml-1 font-bold text-[var(--brand-text)] hover:underline",children:"返回登录"})]})}),y.jsx("p",{className:"mt-7 border-t border-gray-100 pt-5 text-xs font-medium text-gray-400",children:"躺赚鱼 · www.88531.cn"})]})})]})})]})},ey=document.getElementById("root");if(!ey)throw new Error("Could not find root element to mount to");const s2=Dp.createRoot(ey);s2.render(y.jsx(yh.StrictMode,{children:y.jsx(ug,{children:y.jsx(i2,{})})}));export{Z2 as $,C2 as A,Kp as B,Pp as C,M2 as D,i1 as E,U2 as F,H2 as G,q2 as H,B2 as I,L2 as J,d_ as K,su as L,O1 as M,ax as N,yh as O,l1 as P,L1 as Q,c2 as R,Xm as S,sS as T,P1 as U,Y2 as V,Q2 as W,_h as X,$2 as Y,F2 as Z,iS as _,vr as a,P2 as a$,G2 as a0,J2 as a1,K2 as a2,V2 as a3,X2 as a4,rS as a5,ES as a6,_S as a7,gS as a8,a1 as a9,tg as aA,KS as aB,JS as aC,$S as aD,or as aE,US as aF,HS as aG,VS as aH,ZS as aI,BS as aJ,LS as aK,YS as aL,kS as aM,XS as aN,QS as aO,GS as aP,qS as aQ,m_ as aR,c_ as aS,F1 as aT,S1 as aU,x1 as aV,W2 as aW,r_ as aX,Ph as aY,Tv as aZ,I2 as a_,vS as aa,SS as ab,bS as ac,xS as ad,PS as ae,t_ as af,e_ as ag,a_ as ah,n_ as ai,l_ as aj,vh as ak,WS as al,IS as am,CS as an,MS as ao,$p as ap,B1 as aq,FS as ar,zS as as,uS as at,jS as au,DS as av,wS as aw,NS as ax,RS as ay,OS as az,Up as b,eS as b0,o_ as b1,B_ as b2,u_ as b3,s_ as b4,H_ as b5,Y_ as b6,k_ as b7,i_ as b8,L_ as b9,dS as bA,hS as bB,mS as bC,bh as bD,Rv as bE,cS as bF,Y1 as bG,V_ as bH,X_ as bI,tx as bJ,Z_ as bK,G_ as bL,Q_ as bM,c1 as bN,K_ as bO,ex as bP,Q1 as bQ,Sh as bR,W_ as bS,J_ as bT,$_ as bU,I_ as bV,F_ as bW,P_ as bX,C_ as ba,M_ as bb,Xp as bc,w_ as bd,D_ as be,N_ as bf,tS as bg,U_ as bh,q_ as bi,R_ as bj,j_ as bk,z_ as bl,h_ as bm,v_ as bn,b_ as bo,A_ as bp,O_ as bq,p_ as br,g_ as bs,__ as bt,E_ as bu,x_ as bv,T_ as bw,y_ as bx,S_ as by,fS as bz,de as c,pS as d,D1 as e,oS as f,hh as g,AS as h,yS as i,y as j,Gm as k,M1 as l,aS as m,il as n,w2 as o,k2 as p,j2 as q,B as r,D2 as s,nS as t,nx as u,lx as v,TS as w,lS as x,z2 as y,f_ as z}; +`+m)}}catch{}}throw r}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=bn(this.defaults,c);const{transitional:r,paramsSerializer:f,headers:m}=c;r!==void 0&&Ci.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean),advertiseZstdAcceptEncoding:ot.transitional(ot.boolean),validateStatusUndefinedResolves:ot.transitional(ot.boolean)},!1),f!=null&&(x.isFunction(f)?c.paramsSerializer={serialize:f}:Ci.assertOptions(f,{encode:ot.function,serialize:ot.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Ci.assertOptions(c,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let h=m&&x.merge(m.common,m[c.method]);m&&x.forEach(["delete","get","head","post","put","patch","query","common"],W=>{delete m[W]}),c.headers=ft.concat(h,m);const p=[];let v=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen=="function"&&X.runWhen(c)===!1)return;v=v&&X.synchronous;const Y=c.transitional||Er;Y&&Y.legacyInterceptorReqResOrdering?p.unshift(X.fulfilled,X.rejected):p.push(X.fulfilled,X.rejected)});const g=[];this.interceptors.response.forEach(function(X){g.push(X.fulfilled,X.rejected)});let A,N=0,q;if(!v){const W=[rr.bind(this),void 0];for(W.unshift(...p),W.push(...g),q=W.length,A=Promise.resolve(c);Nrr.call(this,F)))}catch(C){A=Promise.reject(C)}break}}if(!A)try{A=rr.call(this,F)}catch(W){A=Promise.reject(W)}for(N=0,q=g.length;N{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const h=new Promise(p=>{r.subscribe(p),m=p}).then(f);return h.cancel=function(){r.unsubscribe(m)},h},s(function(m,h,p){r.reason||(r.reason=new du(m,h,p),c(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=r=>{s.abort(r)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new $h(function(f){s=f}),cancel:s}}};function yv(l){return function(c){return l.apply(null,c)}}function pv(l){return x.isObject(l)&&l.isAxiosError===!0}const pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pr).forEach(([l,s])=>{pr[s]=l});function Fh(l){const s=new yn(l),c=Th(yn.prototype.request,s);return x.extend(c,yn.prototype,s,{allOwnKeys:!0}),x.extend(c,s,null,{allOwnKeys:!0}),c.create=function(f){return Fh(bn(l,f))},c}const Qe=Fh(fu);Qe.Axios=yn;Qe.CanceledError=du;Qe.CancelToken=hv;Qe.isCancel=Vh;Qe.VERSION=Tr;Qe.toFormData=Hi;Qe.AxiosError=V;Qe.Cancel=Qe.CanceledError;Qe.all=function(s){return Promise.all(s)};Qe.spread=yv;Qe.isAxiosError=pv;Qe.mergeConfig=bn;Qe.AxiosHeaders=ft;Qe.formToJSON=l=>Yh(x.isHTMLForm(l)?new FormData(l):l);Qe.getAdapter=Jh.getAdapter;Qe.HttpStatusCode=pr;Qe.default=Qe;const{Axios:d2,AxiosError:m2,CanceledError:h2,isCancel:y2,CancelToken:p2,VERSION:g2,all:b2,Cancel:v2,isAxiosError:S2,spread:_2,toFormData:x2,AxiosHeaders:E2,HttpStatusCode:A2,formToJSON:T2,getAdapter:O2,mergeConfig:N2,create:R2}=Qe,Qa=Qe.create({baseURL:"",timeout:3e4,headers:{"Content-Type":"application/json"}});Qa.interceptors.request.use(l=>{const s=localStorage.getItem("auth_token");return s&&(l.headers.Authorization=`Bearer ${s}`),typeof FormData<"u"&&l.data instanceof FormData&&delete l.headers["Content-Type"],l},l=>Promise.reject(l));Qa.interceptors.response.use(l=>l,l=>{var s;if(((s=l.response)==null?void 0:s.status)===401){localStorage.removeItem("auth_token");try{window.dispatchEvent(new Event("auth:logout"))}catch{}}return Promise.reject(l)});const ae=async(l,s,c)=>(await Qa.get(l,{params:s,...c})).data,ie=async(l,s,c)=>(await Qa.post(l,s,c)).data,De=async(l,s,c)=>(await Qa.put(l,s,c)).data,gv=async(l,s,c)=>(await Qa.patch(l,s,c)).data,tt=async(l,s)=>(await Qa.delete(l,s)).data,bv=async l=>ie("/login",l),vv=async()=>ae("/system-settings/public"),Sv=async(l,s)=>De("/profile",{new_username:l,current_password:s}),_v=async l=>ie("/register",l),xv=async(l,s="register",c)=>ie("/send-verification-code",{email:l,type:s,captcha_session_id:c==null?void 0:c.session_id,captcha_code:c==null?void 0:c.code}),Ev=async l=>ie("/generate-captcha",{session_id:l}),Av=async()=>ae("/verify"),Tv=async(l,s)=>ie("/change-password",{current_password:l,new_password:s}),w2=async()=>(await ae("/cookies/details")).map(s=>({id:s.id,value:s.value,cookie:s.value,enabled:s.enabled,auto_confirm:s.auto_confirm,remark:s.remark,note:s.remark,pause_duration:s.pause_duration,username:s.username,login_password:s.login_password,show_browser:s.show_browser,nickname:s.nickname||s.remark||s.username||`账号 ${s.id.substring(0,6)}`,avatar_url:s.avatar_url,location:s.location,bio:s.bio,followers:s.followers,following:s.following,profile_updated_at:s.profile_updated_at,runtime_state:s.runtime_state,ai_enabled:!1})),z2=async l=>ie(`/cookies/${l}/refresh-profile`),j2=async()=>ie("/qr-login/generate"),D2=async l=>ae(`/qr-login/check/${l}`),C2=async(l,s)=>De(`/cookies/${l}/status`,{enabled:s}),M2=async l=>tt(`/cookies/${l}`),U2=async(l,s)=>De(`/cookies/${l}/remark`,{remark:s}),q2=async(l,s)=>De(`/cookies/${l}/auto-confirm`,{auto_confirm:s}),B2=async(l,s)=>De(`/cookies/${l}/pause-duration`,{pause_duration:s}),H2=async(l,s)=>De(`/cookies/${l}`,{id:l,value:s}),L2=async(l,s)=>De(`/cookies/${l}/login-info`,s),k2=async()=>ae("/ai-reply-settings"),Ov=l=>{const s=(l==null?void 0:l.order_status)||(l==null?void 0:l.status)||"processing";return{...l,status:s,order_status:s}},Y2=async(l,s,c=1,r=20)=>{const f={page:c,page_size:r};l&&(f.cookie_id=l),s&&s!=="all"&&(f.status=s);const m=await ae("/api/orders",f),h=(m.orders||m.data||[]).map(Ov);return{success:!0,data:h,total:m.total||h.length,page:m.page||c,page_size:m.page_size||r,total_pages:m.total_pages||1,status_counts:m.status_counts}},V2=async(l,s)=>De(`/api/orders/${l}`,s),X2=async(l,s)=>De(`/api/orders/${l}/note`,{note:s}),G2=async l=>tt(`/api/orders/${l}`),Q2=async(l,s)=>{const c=new FormData,r=localStorage.getItem("auth_token");return(await fetch("/api/orders/refresh",{method:"POST",headers:{Authorization:`Bearer ${r}`},body:c})).json()},Z2=async l=>ie(`/api/orders/${l}/refresh`),K2=async(l,s,c)=>ie("/api/orders/manual-ship",{order_ids:l,ship_mode:s,custom_content:c}),J2=async l=>{const s=l instanceof FormData;return(await fetch("/api/orders/import",{method:"POST",headers:{...s?{}:{"Content-Type":"application/json"},Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:s?l:JSON.stringify(l)})).json()},Nv=l=>{if(!l)return"";const s=l.match(/filename\*=UTF-8''([^;\s]+)/i);if(s)try{return decodeURIComponent(s[1])}catch{return s[1]}const c=l.match(/filename\s*=\s*"?([^";]+)"?/i);return c?c[1].trim():""},$2=async l=>{var v;const s={};l.cookie_id&&(s.cookie_id=l.cookie_id),l.status&&l.status!=="all"&&(s.status=l.status);const c=await Qa.get("/api/orders/export",{params:s,responseType:"blob"}),r=c.data;if(!(r instanceof Blob)||r.size===0)throw new Error("导出失败:服务器未返回有效文件");if(r.type.includes("application/json")){let g="导出失败";try{const A=JSON.parse(await r.text());g=(A==null?void 0:A.message)||g}catch{}throw new Error(g)}const f=Nv((v=c.headers)==null?void 0:v["content-disposition"]),m=/\.csv$/i.test(f)?f:`orders_${Date.now()}.csv`,h=URL.createObjectURL(r),p=document.createElement("a");return p.href=h,p.download=m,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(h),m},F2=async(l,s=7)=>{const c=new FormData;return c.append("days",String(s)),(await fetch("/api/orders/sync-sold",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},W2=async(l=!1)=>(await ae("/quick-phrases",{include_disabled:l})).data||[],I2=async(l,s,c="默认",r=0)=>{const f=new FormData;return f.append("title",l),f.append("content",s),f.append("category",c),f.append("sort_order",String(r)),(await fetch("/quick-phrases",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:f})).json()},P2=async(l,s)=>{const c=new FormData;return Object.entries(s).forEach(([f,m])=>{m!=null&&c.append(f,String(m))}),(await fetch(`/quick-phrases/${l}`,{method:"PUT",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},eS=async l=>tt(`/quick-phrases/${l}`),tS=async l=>ie(`/quick-phrases/${l}/use`),aS=async()=>ae("/api/risk-control/status"),nS=async l=>ie(`/api/risk-control/${encodeURIComponent(l)}/fresh-captcha-url`),lS=async(l,s=300)=>{const c=new FormData;return c.append("cookie_id",l),c.append("timeout",String(s)),ie("/api/captcha/manual-session",c,{timeout:(s+30)*1e3})},uS=async(l,s)=>{const c=new FormData;return l&&c.append("cookie_id",l),(await fetch("/api/items/polish",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:c})).json()},iS=async l=>ie(`/api/orders/${l}/require-flower`),sS=async()=>ae("/api/seller-features"),cS=async(l,s)=>De(`/api/seller-features/${l}`,s),rS=async(l,s,c=1,r=!1)=>{const f=new FormData;return f.append("order_ids",l.join(",")),f.append("feedback",s),f.append("rate",String(c)),f.append("anonymous",String(r)),(await fetch("/api/orders/rate",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:f})).json()},oS=async()=>ae("/admin/stats"),fS=async()=>(await ae("/admin/users")).users||[],dS=async(l,s)=>gv(`/admin/users/${l}/status`,{is_active:s}),mS=async(l,s)=>De(`/admin/users/${l}/password`,{new_password:s}),hS=async l=>tt(`/admin/users/${l}`),yS=async(l=7)=>{let s;if(typeof l=="number"){const c=new Date,r=new Date;r.setDate(r.getDate()-l),s={start_date:r.toISOString().split("T")[0],end_date:c.toISOString().split("T")[0]}}else s=l;return ae("/analytics/orders",s)},pS=async l=>(await ae("/analytics/orders/valid",{start_date:l.start_date,end_date:l.end_date})).orders||[],gS=async()=>{const l=await ae("/cards");return Array.isArray(l)?l:l.cards||[]},bS=async l=>ie("/cards",l),vS=async(l,s)=>De(`/cards/${l}`,s),SS=async l=>tt(`/cards/${l}`),_S=async(l=200)=>{const s=await ae("/cards/shipped",{limit:l});return{total:s.total||0,shipments:s.shipments||[]}},xS=async()=>tt("/cards/shipped"),ES=async l=>{const s=new FormData;return s.append("image",l),ie("/upload-image",s)},AS=async()=>{const l=await ae("/items");return Array.isArray(l)?l:l.items||[]},TS=async l=>ie("/items/get-all-from-account",{cookie_id:l}),OS=async l=>ie("/items",l),NS=async(l,s)=>tt(`/items/${l}/${s}`),RS=async(l,s,c)=>De(`/items/${l}/${s}`,{item_detail:c}),wS=async(l,s,c)=>De(`/items/${l}/${s}/multi-quantity-delivery`,{multi_quantity_delivery:c}),zS=async()=>(await ae("/item-delivery-configs")).configs||[],jS=async(l,s)=>ae(`/items/${encodeURIComponent(l)}/${encodeURIComponent(s)}/delivery-config`),DS=async(l,s,c)=>De(`/items/${encodeURIComponent(l)}/${encodeURIComponent(s)}/delivery-config`,c),Wh=l=>({options:l.options||[],detection_status:l.detection_status||"ok",retry_after_seconds:l.retry_after_seconds,warning:l.warning}),CS=async(l,s)=>{const c=await ae(`/api/anti-abuse/sku-options/${encodeURIComponent(s)}`,{cookie_id:l});return Wh(c)},MS=async(l,s)=>{const c=await ae(`/api/anti-abuse/sku-options/${encodeURIComponent(s)}/buyer-test`,{cookie_id:l});return Wh(c)},US=async l=>(await ae("/product-automation/materials",void 0)).data||[],qS=async(l,s)=>(await De(`/product-automation/materials/${l}`,s)).data,BS=async l=>{await tt(`/product-automation/materials/${l}`)},HS=async()=>(await ae("/product-automation/filter-rules")).data||[],LS=async l=>(l.id?await De(`/product-automation/filter-rules/${l.id}`,l):await ie("/product-automation/filter-rules",l)).data,kS=async l=>{await tt(`/product-automation/filter-rules/${l}`)},YS=async l=>(await ie(`/product-automation/filter-rules/${l}/run`,{})).data,VS=async()=>(await ae("/product-automation/delete-rules")).data||[],XS=async l=>(l.id?await De(`/product-automation/delete-rules/${l.id}`,l):await ie("/product-automation/delete-rules",l)).data,GS=async l=>{await tt(`/product-automation/delete-rules/${l}`)},QS=async l=>(await ie(`/product-automation/delete-rules/${l}/preview`,{})).data,ZS=async(l=50)=>(await ae("/product-automation/runs",{limit:l})).data||[],Nr=async l=>(await ie(l,{})).data,KS=()=>Nr("/product-automation/repairs/published-ids"),JS=()=>Nr("/product-automation/repairs/short-links"),$S=()=>Nr("/product-automation/repairs/cards"),FS=async()=>{const l=await ae("/delivery-rules");return(Array.isArray(l)?l:l.data||l.rules||[]).map(c=>({id:String(c.id),name:c.description||c.keyword||"",item_keyword:c.keyword||"",cookie_id:c.cookie_id||void 0,item_id:c.item_id||void 0,item_title:c.item_title||void 0,card_group_id:c.card_id||0,card_group_name:c.card_name||"",priority:c.delivery_count||1,enabled:!!c.enabled,delivery_times:c.delivery_times||0}))},WS=async l=>{const s={keyword:l.item_keyword,card_id:l.card_group_id,delivery_count:l.priority,enabled:l.enabled??!0,description:l.name,cookie_id:l.cookie_id||null,item_id:l.item_id||null};return l.id?De(`/delivery-rules/${l.id}`,s):ie("/delivery-rules",s)},IS=async l=>tt(`/delivery-rules/${l}`),PS=async l=>(await ae(`/delivery-block-rules/${l}`)).rules,e_=async(l,s,c)=>(await De(`/delivery-block-rules/${l}/${s}`,c)).rule,t_=async l=>(await ae("/blacklist",l?{cookie_id:l}:void 0)).entries,a_=async l=>(await ie("/blacklist",l)).entry,n_=async(l,s)=>(await De(`/blacklist/${l}`,s)).entry,l_=async l=>{await tt(`/blacklist/${l}`)},u_=async l=>{if(!l)return[];const s=await ae(`/keywords-with-item-id/${l}`);return(Array.isArray(s)?s:[]).map((r,f)=>({id:String(f),keyword:r.keyword||"",reply_content:r.reply||"",item_id:r.item_id||"",match_type:"exact",enabled:!0}))},i_=async(l,s)=>{const c=await ae(`/keywords-with-item-id/${s}`),r=Array.isArray(c)?c:[];if(l.id){const f=parseInt(l.id);f>=0&&f{const c=await ae(`/keywords-with-item-id/${s}`),r=Array.isArray(c)?c:[],f=parseInt(l);return f>=0&&f{const l=await ae("/system-settings");return l.data||l},r_=async l=>{const s=Object.entries(l).map(([c,r])=>De(`/system-settings/${c}`,{value:String(r)}));return await Promise.all(s),{success:!0,message:"Settings saved"}},o_=async l=>ie("/system-settings/email-test",l),f_=async l=>ae(`/ai-reply-settings/${l}`),d_=async(l,s)=>{const c={ai_enabled:s.ai_enabled??!1,model_name:s.model_name??"qwen-plus",api_key:s.api_key??"",base_url:s.base_url??"https://dashscope.aliyuncs.com/compatible-mode/v1",max_discount_percent:s.max_discount_percent??10,max_discount_amount:s.max_discount_amount??100,max_bargain_rounds:s.max_bargain_rounds??3,context_enabled:s.context_enabled??!0,context_message_limit:s.context_message_limit??12,context_expire_minutes:s.context_expire_minutes??120,custom_prompts:s.custom_prompts??""};return De(`/ai-reply-settings/${l}`,c)},m_=async(l,s={})=>{const c=await ie(`/ai-reply-test/${l}`,{message:"你好,这是一条测试消息",...s});return{success:c.success??!0,message:c.message||"AI 连接测试成功",reply:c.reply}},h_=async()=>({success:!0,data:(await ae("/notification-channels")||[]).map(c=>{let r;try{r=JSON.parse(c.config)}catch{r=void 0}return{id:String(c.id),name:c.name,type:c.type,config:r||{},enabled:c.enabled,created_at:c.created_at,updated_at:c.updated_at}})}),y_=async l=>ie("/notification-channels",{...l,config:JSON.stringify(l.config)}),p_=async(l,s)=>{const c={...s};return"config"in s&&(c.config=JSON.stringify(s.config)),De(`/notification-channels/${l}`,c)},g_=async l=>tt(`/notification-channels/${l}`),b_=async()=>{const l=await ae("/notification-events");return{success:!0,events:(l==null?void 0:l.events)||[],priorities:(l==null?void 0:l.priorities)||[]}},v_=async()=>{const l=await ae("/message-notifications"),s=[];for(const[c,r]of Object.entries(l||{}))if(Array.isArray(r))for(const f of r)s.push({id:String(f.id),cookie_id:c,channel_id:f.channel_id,channel_name:f.channel_name,channel_type:f.channel_type,channel_enabled:f.channel_enabled!==!1,name:f.name??null,event_types:f.event_types??null,enabled:f.enabled});return{success:!0,data:s}},S_=async(l,s,c,r)=>ie(`/message-notifications/${l}`,{channel_id:s,enabled:c,...r?{name:r.name??"",event_types:r.eventTypes??[]}:{}}),__=async(l,s)=>{const c={};return s.name!==void 0&&(c.name=s.name),s.eventTypes!==void 0&&(c.event_types=s.eventTypes),s.enabled!==void 0&&(c.enabled=s.enabled),De(`/message-notifications/rule/${l}`,c)},x_=async l=>tt(`/message-notifications/${l}`),E_=async l=>ie(`/message-notifications/rule/${l}/test`),A_=async(l={})=>ae("/risk-control-logs",l),T_=async l=>tt(`/risk-control-logs/${l}`),O_=async(l={})=>ae("/logs",l),N_=async(l={})=>(await ae("/message-filters",l)).data||[],R_=async l=>ie("/message-filters/batch-create",l),w_=async l=>(await De(`/message-filters/${l}/toggle`,{})).data,z_=async l=>{await tt(`/message-filters/${l}`)},j_=async l=>(await ie("/message-filters/batch-delete",{ids:l})).deleted,D_=async()=>(await ae("/chat/accounts")).data||[],C_=async(l,s,c=30)=>(await ae(`/chat/conversations/${encodeURIComponent(l)}`,{cursor:s,limit:c})).data,M_=async(l,s,c,r=50)=>(await ae(`/chat/messages/${encodeURIComponent(l)}/${encodeURIComponent(s)}`,{cursor:c,limit:r})).data,U_=async(l,s)=>ie(`/chat/send/${encodeURIComponent(l)}`,s),q_=async(l,s)=>{const c=new FormData;return c.append("cid",s.cid),c.append("to_user_id",s.to_user_id),c.append("image",s.file),ie(`/chat/send-image/${encodeURIComponent(l)}`,c)},B_=async()=>ae("/default-replies"),H_=async l=>{const s=await ae(`/default-replies/${l}`);return{cookie_id:l,enabled:s.enabled||!1,reply_content:s.reply_content||"",reply_once:s.reply_once||!1,reply_image_url:s.reply_image_url||""}},L_=async(l,s)=>De(`/default-replies/${l}`,{enabled:s.enabled??!1,reply_content:s.reply_content||"",reply_once:s.reply_once??!1,reply_image_url:s.reply_image_url||""}),k_=async l=>tt(`/default-replies/${l}`),Y_=async l=>ie(`/default-replies/${l}/clear-records`,{}),Rv=async(l=!1)=>ae("/api/announcement",l?{force:!0}:void 0),V_=async(l,s=1,c=20,r="VALID")=>ae("/resell/favorites",{cookie_id:l,page:s,page_size:c,type:r}),X_=async(l,s,c=1,r=20)=>ae("/resell/search",{cookie_id:l,keyword:s,page:c,page_size:r}),G_=async()=>ae("/hotlist"),Q_=async l=>ie("/hotlist/refresh",{category:l}),Z_=async l=>ie("/resell/preview",l),K_=async()=>ae("/pricewatch/rules"),J_=async l=>ie("/pricewatch/rules",l),$_=async(l,s)=>De(`/pricewatch/rules/${l}`,s),F_=async l=>tt(`/pricewatch/rules/${l}`),W_=async l=>ie("/pricewatch/preview",l),I_=async l=>ie(`/pricewatch/rules/${l}/run`),P_=async(l,s=50)=>ae(`/pricewatch/rules/${l}/records`,{limit:s}),ex=async()=>ae("/pricewatch/cookies"),tx=async l=>ie("/resell/publish",l),ax=async l=>{const s=new FormData;return s.append("file",l),ie("/resell/upload-image",s,{timeout:6e4})},nx=async l=>ie("/resell/ai-optimize",l,{timeout:15e4}),lx=async l=>ie("/ai-optimize/preview",{cookie_id:l},{timeout:15e3}),ux=async l=>ie("/ai-optimize/suggest",{cookie_id:l},{timeout:36e4}),gr="app:feedback",br="app:confirm",wv=l=>/失败|错误|异常|无法|error|fail/i.test(l)?"error":/警告|注意|请输入|请选择|warning/i.test(l)?"warning":/成功|完成|已新增|已保存|已删除|success/i.test(l)?"success":"info",il=(l,s)=>{const c=String(l??"").trim();c&&window.dispatchEvent(new CustomEvent(gr,{detail:{id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,message:c,type:s||wv(c)}}))},ix=(l,s={})=>new Promise(c=>{window.dispatchEvent(new CustomEvent(br,{detail:{message:l,title:s.title||"确认操作",confirmLabel:s.confirmLabel||"确认",cancelLabel:s.cancelLabel||"取消",danger:s.danger??!0,resolve:c}}))}),zv=/^[A-Za-z0-9_-]{3,32}$/,jv=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,Dv=72;function Ih(l){return l?zv.test(l)?[!0,""]:[!1,"用户名需为 3-32 位字母、数字、下划线或连字符"]:[!1,"用户名不能为空"]}function Cv(l){return l?l.length>254?[!1,"邮箱地址过长"]:jv.test(l)?[!0,""]:[!1,"邮箱格式不正确"]:[!1,"邮箱不能为空"]}function Ph(l){if(!l)return[!1,"密码不能为空"];if(l.length<8)return[!1,"密码至少 8 位,且需同时包含字母和数字"];if(l.length>64)return[!1,"密码最长 64 位"];if(new TextEncoder().encode(l).length>Dv)return[!1,"密码过长(超过 72 字节),请缩短后重试"];const s=/[a-zA-Z]/.test(l),c=/\d/.test(l);return!s||!c?[!1,"密码至少 8 位,且需同时包含字母和数字"]:[!0,""]}const Mv=({activeTab:l,setActiveTab:s,onLogout:c,mobileOpen:r,onMobileClose:f,isAdmin:m=!1,username:h,onUsernameChange:p})=>{const[v,g]=B.useState(!1),[A,N]=B.useState(null),q=B.useRef(null),F=X=>m||!["settings","users"].includes(X.id);B.useEffect(()=>{if(!v)return;const X=Y=>{q.current&&!q.current.contains(Y.target)&&g(!1)};return document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)},[v]);const W=[{label:"经营概览",items:[{id:"dashboard",icon:d1,label:"总览"}]},{label:"闲鱼业务",items:[{id:"accounts",icon:P1,label:"账号管理"},{id:"items",icon:$p,label:"商品与发货"},{id:"resell",icon:Y1,label:"一键转卖"},{id:"hotlist",icon:c1,label:"实时热卖榜"},{id:"pricewatch",icon:Q1,label:"价格监控"},{id:"orders",icon:B1,label:"订单管理"},{id:"buyer-interaction",icon:L1,label:"买家互动"},{id:"cards",icon:a1,label:"卡密库存"}]},{label:"客户沟通",items:[{id:"messages",icon:h1,label:"消息中心"},{id:"auto-reply",icon:O1,label:"自动回复"},{id:"ai-reply",icon:Kp,label:"AI 回复"}]},{label:"自动化",items:[{id:"product-automation",icon:tg,label:"商品自动化"}]},{label:"系统",items:[{id:"help",icon:Qp,label:"使用说明"},{id:"users",icon:J1,label:"用户管理"},{id:"notifications",icon:Xp,label:"通知与日志"},{id:"settings",icon:M1,label:"系统设置"},{id:"about",icon:bh,label:"关于"}].filter(F)}];return y.jsxs(y.Fragment,{children:[r&&y.jsx("button",{type:"button",className:"fixed inset-0 z-30 bg-black/40 lg:hidden",onClick:f,"aria-label":"关闭导航"}),y.jsxs("aside",{className:`fixed left-0 top-0 z-40 flex h-screen w-[248px] flex-col bg-[var(--surface)] transition-transform lg:translate-x-0 ${r?"translate-x-0":"-translate-x-full"}`,style:{borderRight:"1px solid var(--border)"},children:[y.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[y.jsxs("div",{className:"flex h-[76px] shrink-0 items-center gap-3 px-5",children:[y.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"},children:y.jsx("span",{className:"text-lg font-black text-[#2a2416]",children:"躺"})}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("p",{className:"truncate text-base font-extrabold text-[var(--text)]",children:"躺赚鱼"}),y.jsx("p",{className:"mt-0.5 text-[11px] font-medium text-[var(--text-soft)]",children:"运营工作台"})]}),y.jsx("button",{type:"button",onClick:f,className:"rounded-full p-2 hover:bg-[var(--surface-hover)] lg:hidden","aria-label":"关闭导航",children:y.jsx(_h,{className:"w-5 h-5"})})]}),y.jsx("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 pb-4",children:W.map((X,Y)=>y.jsxs("div",{className:Y===0?"":"mt-5",children:[y.jsx("p",{className:"mb-2 px-3 text-[11px] font-bold uppercase tracking-wide text-[var(--text-soft)]",children:X.label}),y.jsx("div",{className:"space-y-1",children:X.items.map(C=>{const K=C.icon,Q=l===C.id;return y.jsxs("button",{type:"button",onClick:()=>s(C.id),className:`group flex min-h-11 w-full items-center gap-3 rounded-xl px-3 text-left transition-all ${Q?"font-bold text-[#2a2416]":"font-medium text-[var(--text-muted)] hover:bg-[var(--surface-hover)] hover:text-[var(--text)]"}`,style:Q?{background:"linear-gradient(135deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"}:void 0,children:[y.jsx(K,{className:`h-[18px] w-[18px] shrink-0 ${Q?"text-[#2a2416]":"text-[var(--text-soft)] group-hover:text-[var(--text-muted)]"}`}),y.jsx("span",{className:"truncate text-sm",children:C.label})]},C.id)})})]},X.label))})]}),y.jsxs("div",{className:"shrink-0 p-3",style:{borderTop:"1px solid var(--border)"},children:[y.jsx(dr,{className:"mb-2"}),y.jsxs("div",{className:"relative",ref:q,children:[y.jsxs("button",{type:"button",onClick:()=>g(X=>!X),"aria-expanded":v,"aria-haspopup":"menu",className:"flex min-h-11 w-full items-center gap-3 rounded-xl px-3 text-left transition-colors hover:bg-[var(--surface-hover)]",children:[y.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-black text-[#2a2416]",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))"},children:(h||"?").slice(0,1).toUpperCase()}),y.jsxs("span",{className:"min-w-0 flex-1",children:[y.jsx("span",{className:"block truncate text-sm font-semibold text-[var(--text)]",children:h||"未登录"}),y.jsx("span",{className:"block text-[11px] font-medium text-[var(--text-soft)]",children:m?"管理员":"用户"})]}),y.jsx(Wp,{className:`h-4 w-4 shrink-0 text-[var(--text-soft)] transition-transform ${v?"":"rotate-180"}`})]}),v&&y.jsxs("div",{role:"menu",className:"absolute bottom-full left-0 right-0 mb-2 space-y-0.5 rounded-xl border bg-[var(--surface)] p-1.5 shadow-[var(--shadow-card,0_8px_24px_rgba(20,24,28,0.16))]",style:{borderColor:"var(--border)"},children:[!m&&y.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{g(!1),N("rename")},className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text)]",children:[y.jsx(F1,{className:"h-4 w-4 shrink-0"}),"修改用户名"]}),y.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{g(!1),N("password")},className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text)]",children:[y.jsx(vh,{className:"h-4 w-4 shrink-0"}),"修改密码"]}),y.jsx("div",{className:"my-1",style:{borderTop:"1px solid var(--border)"}}),y.jsxs("button",{type:"button",role:"menuitem",onClick:c,className:"flex min-h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-sm font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--danger-soft)] hover:text-[var(--danger)]",children:[y.jsx(b1,{className:"h-4 w-4 shrink-0"}),"退出登录"]})]})]})]}),A&&Up.createPortal(y.jsx(Uv,{mode:A,isAdmin:m,onClose:()=>N(null),onRenamed:X=>{N(null),p==null||p(X)}}),document.body)]})]})},Uv=({mode:l,isAdmin:s,onClose:c,onRenamed:r})=>{const[f,m]=B.useState(""),[h,p]=B.useState(""),[v,g]=B.useState(""),[A,N]=B.useState(!1),q=l==="rename",F=async X=>{X.preventDefault();const Y=h.trim();if(q){if(!Ih(Y)){il("用户名需 3-32 位,仅限字母、数字、下划线或短横线","warning");return}}else{if(!Ph(Y)){il("新密码至少 8 位,且同时包含字母和数字","warning");return}if(Y!==v){il("两次输入的新密码不一致","warning");return}}N(!0);try{const C=q?await Sv(Y,f):await Tv(f,Y);C.success?(il(q?"用户名修改成功":"密码修改成功,下次登录请使用新密码","success"),q?r(Y):c()):il(C.message||"修改失败,请稍后重试","error")}catch{il("网络异常,修改失败","error")}finally{N(!1)}},W="ios-input h-11 w-full rounded-md px-4 text-sm";return y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onClick:A?void 0:c,children:y.jsxs("form",{className:"w-full max-w-sm rounded-2xl bg-[var(--surface)] p-6 shadow-[0_12px_40px_rgba(20,24,28,0.24)]",onClick:X=>X.stopPropagation(),onSubmit:X=>void F(X),children:[y.jsx("h3",{className:"text-base font-extrabold text-[var(--text)]",children:q?"修改用户名":"修改密码"}),y.jsx("p",{className:"mt-1 text-xs text-[var(--text-soft)]",children:q?"用户名是登录凭证,修改后请用新用户名登录":"修改成功后当前登录保持有效"}),y.jsxs("label",{className:"mt-4 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:"当前密码"}),y.jsx("input",{type:"password",autoComplete:"current-password",value:f,onChange:X=>m(X.target.value),className:W,placeholder:"请输入当前密码",disabled:A})]}),y.jsxs("label",{className:"mt-3 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:q?"新用户名":"新密码"}),y.jsx("input",{type:q?"text":"password",autoComplete:q?"username":"new-password",value:h,onChange:X=>p(X.target.value),className:W,placeholder:q?"3-32 位字母/数字/下划线/短横线":"至少 8 位,含字母和数字",disabled:A})]}),!q&&y.jsxs("label",{className:"mt-3 block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-[var(--text-muted)]",children:"确认新密码"}),y.jsx("input",{type:"password",autoComplete:"new-password",value:v,onChange:X=>g(X.target.value),className:W,placeholder:"再次输入新密码",disabled:A})]}),y.jsxs("div",{className:"mt-6 flex gap-3",children:[y.jsx("button",{type:"button",onClick:c,disabled:A,className:"ios-btn-secondary h-11 flex-1 rounded-md text-sm font-bold",children:"取消"}),y.jsx("button",{type:"submit",disabled:A||!f||!h.trim(),className:"ios-btn-primary h-11 flex-1 rounded-md text-sm font-bold disabled:opacity-60",children:A?y.jsx(su,{className:"mx-auto h-4 w-4 animate-spin"}):"确认修改"})]})]})})},qv={success:{icon:or,className:"border-emerald-200 bg-emerald-50 text-emerald-800"},error:{icon:Pp,className:"border-red-200 bg-red-50 text-red-800"},warning:{icon:Sh,className:"border-amber-200 bg-amber-50 text-amber-900"},info:{icon:bh,className:"border-gray-200 bg-white text-gray-800"}},Bv=()=>{const[l,s]=B.useState([]),[c,r]=B.useState(null);B.useEffect(()=>{const m=p=>{const v=p.detail;s(g=>[...g.slice(-3),v]),window.setTimeout(()=>{s(g=>g.filter(A=>A.id!==v.id))},v.type==="error"?6e3:3600)},h=p=>{r(p.detail)};return window.addEventListener(gr,m),window.addEventListener(br,h),()=>{window.removeEventListener(gr,m),window.removeEventListener(br,h)}},[]),B.useEffect(()=>{if(!c)return;const m=h=>{h.key==="Escape"&&(c.resolve(!1),r(null))};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[c]);const f=m=>{c==null||c.resolve(m),r(null)};return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed right-4 top-4 z-[10000] flex w-[min(380px,calc(100vw-2rem))] flex-col gap-2","aria-live":"polite",children:l.map(m=>{const h=qv[m.type],p=h.icon;return y.jsxs("div",{role:m.type==="error"?"alert":"status",className:`flex items-start gap-3 rounded-md border px-4 py-3 shadow-[0_4px_16px_rgba(20,24,28,0.10)] ${h.className}`,children:[y.jsx(p,{className:"mt-0.5 h-5 w-5 shrink-0"}),y.jsx("span",{className:"min-w-0 flex-1 break-words text-sm font-medium",children:m.message}),y.jsx("button",{type:"button",className:"shrink-0 rounded p-0.5 hover:bg-black/5",onClick:()=>s(v=>v.filter(g=>g.id!==m.id)),"aria-label":"关闭提示",children:y.jsx(_h,{className:"h-4 w-4"})})]},m.id)})}),c&&y.jsx("div",{className:"modal-overlay",role:"presentation",onMouseDown:m=>{m.target===m.currentTarget&&f(!1)},children:y.jsxs("div",{role:"alertdialog","aria-modal":"true","aria-labelledby":"global-confirm-title","aria-describedby":"global-confirm-message",className:"modal-container max-w-md",children:[y.jsxs("div",{className:"modal-body flex items-start gap-3",children:[y.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-amber-50 text-amber-700",children:y.jsx(Sh,{className:"h-5 w-5"})}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("h2",{id:"global-confirm-title",className:"text-base font-bold text-gray-900",children:c.title}),y.jsx("p",{id:"global-confirm-message",className:"mt-1 break-words text-sm leading-6 text-gray-600",children:c.message})]})]}),y.jsxs("div",{className:"modal-footer flex justify-end gap-2",children:[y.jsx("button",{type:"button",className:"ios-btn-secondary rounded-md px-4 py-2 text-sm",onClick:()=>f(!1),children:c.cancelLabel}),y.jsx("button",{type:"button",className:`${c.danger?"ios-btn-danger":"ios-btn-primary"} rounded-md px-4 py-2 text-sm`,onClick:()=>f(!0),autoFocus:!0,children:c.confirmLabel})]})]})})]})},Hv={info:"border-[#ffe566] bg-[#fffdf0] text-[#6b5200]",warning:"border-[#f5c800] bg-[#fff7e6] text-[#8a6300]",danger:"border-red-200 bg-red-50 text-red-700"},oh={info:"bg-[#ffe100] text-[#2a2416]",warning:"bg-[#f5c800] text-[#2a2416]",danger:"bg-red-600 text-white"},Lv=()=>{const[l,s]=B.useState(null);B.useEffect(()=>{const h=()=>{Rv().then(s).catch(()=>{})};h();const p=setInterval(h,3e5);return()=>clearInterval(p)},[]);const c=(l==null?void 0:l.announcements)||[],r=!!(l!=null&&l.has_update);if(!c.length&&!r)return null;const f=c.some(h=>h.level==="danger")?"danger":c.some(h=>h.level==="warning")?"warning":"info",m=c.map(h=>y.jsxs("span",{className:"inline-flex items-center gap-2 px-8",children:[y.jsx("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-bold ${oh[h.level]||oh.info}`,children:h.level==="danger"?"重要":h.level==="warning"?"注意":"通知"}),h.title&&y.jsx("b",{className:"font-bold",children:h.title}),y.jsx("span",{children:h.content.replace(/\s*\n\s*/g," ")}),h.published_at&&y.jsx("span",{className:"text-[11px] opacity-60",children:h.published_at})]},h.id));return y.jsxs("div",{className:"mx-auto max-w-[1320px] space-y-2 px-4 pt-4 sm:px-6 lg:px-8",children:[r&&y.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 px-4 py-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsxs("p",{className:"text-sm font-bold text-amber-900",children:["发现新版本 ",l==null?void 0:l.latest_version,y.jsxs("span",{className:"ml-2 font-normal text-amber-700",children:["当前 ",l==null?void 0:l.local_version]})]}),(l==null?void 0:l.release_notes)&&y.jsx("p",{className:"mt-1 whitespace-pre-wrap text-xs leading-relaxed text-amber-800",children:l.release_notes})]}),(l==null?void 0:l.download_url)&&y.jsxs("a",{href:l.download_url,target:"_blank",rel:"noopener noreferrer",className:"ios-btn-primary inline-flex flex-none items-center gap-2 rounded-md px-3 py-2 text-xs",children:[y.jsx(l1,{className:"h-4 w-4"}),"前往下载",y.jsx(i1,{className:"h-3 w-3"})]})]}),c.length>0&&y.jsxs("div",{className:`flex items-center gap-3 overflow-hidden rounded-md border px-3 py-2 ${Hv[f]}`,children:[y.jsx(x1,{className:"h-4 w-4 flex-none"}),y.jsx("div",{className:"marquee min-w-0 flex-1",children:y.jsxs("div",{className:"marquee__track text-xs leading-relaxed",children:[m,y.jsx("span",{"aria-hidden":"true",children:m})]})})]})]})},fh=({image:l,code:s,onCodeChange:c,onRefresh:r,label:f="图形验证码"})=>y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:f}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx("input",{type:"text",placeholder:"请输入图中字符",value:s,onChange:m=>c(m.target.value),maxLength:4,autoComplete:"off",className:"ios-input h-11 w-full rounded-md px-4 text-sm uppercase"}),l?y.jsx("img",{src:l,alt:"图形验证码,点击换一张",title:"看不清?点击换一张",onClick:r,className:"h-11 w-28 shrink-0 cursor-pointer rounded-md border border-gray-200 bg-white"}):y.jsx("button",{type:"button",onClick:r,className:"h-11 w-28 shrink-0 rounded-md border border-gray-200 bg-gray-50 text-xs text-gray-500",children:"点击获取"}),y.jsx("button",{type:"button",onClick:r,"aria-label":"刷新图形验证码",className:"ios-btn-secondary h-11 shrink-0 rounded-md px-2",children:y.jsx(D1,{className:"h-4 w-4"})})]})]});function dh(l=!1){const[s,c]=B.useState(()=>mh()),[r,f]=B.useState(""),[m,h]=B.useState(""),[p,v]=B.useState(!1),g=B.useCallback(async()=>{const A=mh();c(A),h("");try{const N=await Ev(A);N.success&&f(N.captcha_image)}catch{}},[]);return B.useEffect(()=>{l&&g()},[]),{sessionId:s,image:r,code:m,setCode:h,required:p,setRequired:v,refresh:g}}function mh(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`sess-${Date.now()}-${Math.random().toString(36).slice(2)}`}const kv=B.lazy(()=>et(()=>import("./Dashboard-SIGinmod.js"),__vite__mapDeps([0,1,2,3,4,5]))),Yv=B.lazy(()=>et(()=>import("./AccountList-BxMZ8Udh.js"),__vite__mapDeps([6,1,7,8,9,10,11,12,13,14]))),Vv=B.lazy(()=>et(()=>import("./OrderList-ZwW4LdUq.js"),__vite__mapDeps([15,1,16,17,18,5,19,13,20,10,21,14]))),Xv=B.lazy(()=>et(()=>import("./CardList-Camdnn7z.js"),__vite__mapDeps([22,1,16,20,10,2,14,23,5]))),Gv=B.lazy(()=>et(()=>import("./ItemList-D_zO1nzP.js"),__vite__mapDeps([24,1,25,14,10,16,26,9,5,8,27,20]))),Qv=B.lazy(()=>et(()=>import("./ProductAutomation-MbnRCc-u.js"),__vite__mapDeps([28,1,18,10,14,29,5,30]))),Zv=B.lazy(()=>et(()=>import("./AIReply-teRO4Zqo.js"),__vite__mapDeps([31,1,14,32,12,13,29]))),Kv=B.lazy(()=>et(()=>import("./Settings-C3ht1_iw.js"),__vite__mapDeps([33,1,14,8,34,12,13]))),Jv=B.lazy(()=>et(()=>import("./Keywords-GHbY9xAn.js"),__vite__mapDeps([35,1,17,11,16,9,10,26,14,8]))),$v=B.lazy(()=>et(()=>import("./MessageManagement-B1rvp6fJ.js"),__vite__mapDeps([36,1,27,18,2,23,34,37,16,10]))),Fv=B.lazy(()=>et(()=>import("./NotificationsAndLogs-BsCaJ8H7.js"),__vite__mapDeps([38,1,30,25,4,16,39,10,37,21,14,7]))),Wv=B.lazy(()=>et(()=>import("./UserManagement-BCtLeLer.js"),__vite__mapDeps([40,1,10]))),Iv=B.lazy(()=>et(()=>import("./About-B_6kryH7.js"),__vite__mapDeps([41,1]))),Pv=B.lazy(()=>et(()=>import("./BuyerInteraction-DnC0dxfT.js"),__vite__mapDeps([42,1,14,25,19,32]))),e2=B.lazy(()=>et(()=>import("./Resell-45XAV9t5.js"),__vite__mapDeps([43,1,18,16,8,2]))),t2=B.lazy(()=>et(()=>import("./HotList-SDSWlemc.js"),__vite__mapDeps([44,1,3,2]))),a2=B.lazy(()=>et(()=>import("./PriceWatch-nQDi2og7.js"),__vite__mapDeps([45,1,16,29,39,10,18]))),n2=B.lazy(()=>et(()=>import("./Help-CmGhIHyo.js"),[])),Pe=()=>y.jsxs("div",{className:"page-loading",children:[y.jsx(su,{className:"h-5 w-5 animate-spin"}),y.jsx("span",{children:"正在加载页面"})]}),l2={dashboard:"总览",accounts:"账号管理",items:"商品与发货",resell:"一键转卖",hotlist:"实时热卖榜",pricewatch:"价格监控",orders:"订单管理","buyer-interaction":"买家互动",cards:"卡密库存",messages:"消息中心","auto-reply":"自动回复","ai-reply":"AI 回复","product-automation":"商品自动化",notifications:"通知与日志",settings:"系统设置",users:"用户管理",about:"关于",help:"使用说明"},u2=["settings","users"],i2=()=>{const[l,s]=B.useState(!1),[c,r]=B.useState(()=>localStorage.getItem("active_page")||"dashboard"),[f,m]=B.useState(!0),[h,p]=B.useState(""),[v,g]=B.useState(""),[A,N]=B.useState(!1),[q,F]=B.useState(""),[W,X]=B.useState(""),[Y,C]=B.useState(!1),[K,Q]=B.useState(!1),[ee,Ee]=B.useState("login"),[me,ne]=B.useState(!1),[Le,ct]=B.useState(!0),[be,Me]=B.useState({username:"",email:"",password:"",code:""}),[ke,xt]=B.useState(!1),[He,Re]=B.useState(""),[z,L]=B.useState(""),[P,Se]=B.useState(!1),[re,S]=B.useState(0),j=dh(),H=dh();B.useEffect(()=>{ee==="register"&&j.refresh()},[ee]),B.useEffect(()=>{vv().then(k=>{ne(String(k.registration_enabled)==="true"),ct(String(k.email_verification_enabled??"true")!=="false")}).catch(()=>ne(!1))},[]),B.useEffect(()=>{if(re<=0)return;const k=setTimeout(()=>S(re-1),1e3);return()=>clearTimeout(k)},[re]);const G=async()=>{if(!be.email.trim()){Re("请先填写邮箱");return}if(!j.code.trim()){Re("请先输入图形验证码");return}Se(!0),Re(""),L("");try{const k=await xv(be.email.trim(),"register",{session_id:j.sessionId,code:j.code.trim()});if((k==null?void 0:k.success)===!1){Re(k.message||"验证码发送失败,请确认邮件服务已配置"),j.refresh();return}L("验证码已发送,请查收邮箱"),S(60),j.refresh()}catch(k){Re(k instanceof Error?k.message:"验证码发送失败"),j.refresh()}finally{Se(!1)}},le=async k=>{k.preventDefault(),Re(""),L("");for(const[ue,Te]of[Ih(be.username.trim()),Cv(be.email.trim()),Ph(be.password)])if(!ue){Re(Te);return}if(Le&&!be.code.trim()){Re("请填写邮箱验证码");return}xt(!0);try{const ue=await _v({username:be.username.trim(),email:be.email.trim(),password:be.password,...Le?{verification_code:be.code.trim()}:{}});ue!=null&&ue.success?(p(be.username.trim()),g(""),Me({username:"",email:"",password:"",code:""}),Ee("login"),F(""),L(""),X("注册成功,请使用新账号登录")):Re((ue==null?void 0:ue.message)||"注册失败")}catch(ue){Re(ue instanceof Error?ue.message:"注册失败,请稍后重试")}finally{xt(!1)}};B.useEffect(()=>{localStorage.getItem("auth_token")?Av().then(Te=>{if(!Te.authenticated){localStorage.removeItem("auth_token");return}Q(!!Te.is_admin),p(Te.username||""),s(!0)}).catch(()=>localStorage.removeItem("auth_token")).finally(()=>m(!1)):m(!1);const ue=()=>s(!1);return window.addEventListener("auth:logout",ue),()=>window.removeEventListener("auth:logout",ue)},[]),B.useEffect(()=>{localStorage.setItem("active_page",c)},[c]),B.useEffect(()=>{!K&&u2.includes(c)&&r("dashboard")},[K]);const Z=async k=>{k.preventDefault(),N(!0),F("");try{const ue=await bv({username:h,password:v,...H.required?{captcha_session_id:H.sessionId,captcha_code:H.code.trim()}:{}});ue.success&&ue.token?(localStorage.setItem("auth_token",ue.token),Q(!!ue.is_admin),p(ue.username||h),s(!0)):(F(ue.message||"账号或密码错误"),ue.captcha_required&&(H.setRequired(!0),H.refresh()))}catch(ue){F(ue instanceof Error?ue.message:"登录失败,请稍后重试")}finally{N(!1)}};return f?y.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[var(--app-bg)]",children:y.jsxs("div",{className:"flex items-center gap-3 text-sm font-semibold text-[var(--text-muted)]",children:[y.jsx(su,{className:"h-5 w-5 animate-spin text-[var(--brand-text)]"}),"正在验证登录状态"]})}):l?y.jsxs("div",{className:"flex min-h-screen bg-[var(--app-bg)] text-[var(--text)]",children:[y.jsx(Bv,{}),y.jsx(Mv,{activeTab:c,setActiveTab:k=>{r(k),C(!1)},mobileOpen:Y,onMobileClose:()=>C(!1),isAdmin:K,username:l?h:"",onUsernameChange:p,onLogout:()=>{localStorage.removeItem("auth_token"),Q(!1),s(!1)}}),y.jsxs("main",{className:"min-h-screen min-w-0 flex-1 overflow-y-auto lg:ml-[248px]",children:[y.jsxs("header",{className:"sticky top-0 z-20 flex h-14 items-center gap-3 border-b border-[var(--border)] bg-[var(--surface)] px-4 lg:hidden",children:[y.jsx("button",{type:"button",onClick:()=>C(!0),className:"p-2 -ml-2 rounded-md hover:bg-gray-100",title:"打开导航","aria-label":"打开导航",children:y.jsx(A1,{className:"w-5 h-5"})}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("p",{className:"truncate text-sm font-bold",children:l2[c]||"躺赚鱼"}),y.jsx("p",{className:"text-[11px] text-gray-400",children:"躺赚鱼"})]}),y.jsx(dr,{compact:!0,className:"ml-auto"})]}),c!=="messages"&&y.jsx(Lv,{}),y.jsxs("div",{className:c==="messages"?"h-[calc(100vh-3.5rem)] lg:h-screen overflow-hidden":"mx-auto max-w-[1320px] p-4 pb-10 sm:p-6 lg:p-8",children:[y.jsx("section",{hidden:c!=="dashboard",children:y.jsx(B.Suspense,{fallback:c==="dashboard"?y.jsx(Pe,{}):null,children:y.jsx(kv,{})})}),y.jsx("section",{hidden:c!=="accounts",children:y.jsx(B.Suspense,{fallback:c==="accounts"?y.jsx(Pe,{}):null,children:y.jsx(Yv,{})})}),y.jsx("section",{hidden:c!=="items",children:y.jsx(B.Suspense,{fallback:c==="items"?y.jsx(Pe,{}):null,children:y.jsx(Gv,{})})}),y.jsx("section",{hidden:c!=="resell",children:y.jsx(B.Suspense,{fallback:c==="resell"?y.jsx(Pe,{}):null,children:y.jsx(e2,{})})}),y.jsx("section",{hidden:c!=="hotlist",children:y.jsx(B.Suspense,{fallback:c==="hotlist"?y.jsx(Pe,{}):null,children:y.jsx(t2,{})})}),y.jsx("section",{hidden:c!=="pricewatch",children:y.jsx(B.Suspense,{fallback:c==="pricewatch"?y.jsx(Pe,{}):null,children:y.jsx(a2,{})})}),y.jsx("section",{hidden:c!=="product-automation",children:y.jsx(B.Suspense,{fallback:c==="product-automation"?y.jsx(Pe,{}):null,children:y.jsx(Qv,{})})}),y.jsx("section",{hidden:c!=="orders",children:y.jsx(B.Suspense,{fallback:c==="orders"?y.jsx(Pe,{}):null,children:y.jsx(Vv,{})})}),y.jsx("section",{hidden:c!=="cards",children:y.jsx(B.Suspense,{fallback:c==="cards"?y.jsx(Pe,{}):null,children:y.jsx(Xv,{})})}),y.jsx("section",{hidden:c!=="auto-reply",children:y.jsx(B.Suspense,{fallback:c==="auto-reply"?y.jsx(Pe,{}):null,children:y.jsx(Jv,{mode:"reply"})})}),y.jsx("section",{hidden:c!=="ai-reply",children:y.jsx(B.Suspense,{fallback:c==="ai-reply"?y.jsx(Pe,{}):null,children:y.jsx(Zv,{})})}),y.jsx("section",{hidden:c!=="messages",className:"h-full min-h-0",children:y.jsx(B.Suspense,{fallback:c==="messages"?y.jsx(Pe,{}):null,children:y.jsx($v,{isActive:c==="messages"})})}),y.jsx("section",{hidden:c!=="notifications",children:y.jsx(B.Suspense,{fallback:c==="notifications"?y.jsx(Pe,{}):null,children:y.jsx(Fv,{isAdmin:K})})}),K&&y.jsx("section",{hidden:c!=="users",children:y.jsx(B.Suspense,{fallback:c==="users"?y.jsx(Pe,{}):null,children:y.jsx(Wv,{})})}),K&&y.jsx("section",{hidden:c!=="settings",children:y.jsx(B.Suspense,{fallback:c==="settings"?y.jsx(Pe,{}):null,children:y.jsx(Kv,{})})}),y.jsx("section",{hidden:c!=="buyer-interaction",children:y.jsx(B.Suspense,{fallback:c==="buyer-interaction"?y.jsx(Pe,{}):null,children:y.jsx(Pv,{})})}),y.jsx("section",{hidden:c!=="about",children:y.jsx(B.Suspense,{fallback:c==="about"?y.jsx(Pe,{}):null,children:y.jsx(Iv,{})})}),y.jsx("section",{hidden:c!=="help",children:y.jsx(B.Suspense,{fallback:c==="help"?y.jsx(Pe,{}):null,children:y.jsx(n2,{})})})]})]})]}):y.jsxs("div",{className:"relative min-h-screen bg-[var(--app-bg)] p-4 font-sans text-[var(--text)] sm:p-6",children:[y.jsx(dr,{compact:!0,className:"absolute right-4 top-4 z-10 sm:right-6 sm:top-6"}),y.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-2rem)] max-w-5xl items-center justify-center sm:min-h-[calc(100vh-3rem)]",children:y.jsxs("div",{className:"grid w-full overflow-hidden rounded-3xl bg-[var(--surface)] lg:grid-cols-[1.05fr_0.95fr]",style:{border:"1px solid var(--border)",boxShadow:"var(--shadow-lg)"},children:[y.jsxs("div",{className:"theme-brand-panel hidden min-h-[560px] flex-col justify-between p-10 lg:flex",style:{background:"linear-gradient(155deg, #fff8d1 0%, #ffe566 55%, #ffe100 100%)"},children:[y.jsxs("div",{children:[y.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl bg-white/70 backdrop-blur",children:y.jsx("span",{className:"text-2xl font-black text-[#2a2416]",children:"躺"})}),y.jsx("p",{className:"mt-7 text-xs font-bold tracking-widest text-[#8a6300]",children:"TANGZHUAN YU"}),y.jsx("h1",{className:"mt-2 max-w-md text-3xl font-extrabold leading-tight text-[#2a2416]",children:"躺赚鱼"}),y.jsx("p",{className:"mt-4 max-w-md text-sm leading-7 text-[#6b5200]",children:"统一处理账号、商品、订单、消息、回复和自动发货。"})]}),y.jsx("div",{className:"grid grid-cols-2 gap-3",children:["账号与商品同步","订单与发货处理","消息与自动回复","通知与运行日志"].map(k=>y.jsx("div",{className:"rounded-2xl bg-white/70 px-4 py-3 text-xs font-bold text-[#544c39] backdrop-blur",children:k},k))})]}),y.jsx("div",{className:"flex min-h-[500px] items-center p-7 sm:p-10",children:y.jsxs("div",{className:"mx-auto w-full max-w-sm animate-fade-in",children:[y.jsxs("div",{className:"mb-8",children:[y.jsx("div",{className:"mb-5 flex h-14 w-14 items-center justify-center rounded-2xl lg:hidden",style:{background:"linear-gradient(140deg, var(--brand-300), var(--brand))",boxShadow:"var(--shadow-brand)"},children:y.jsx("span",{className:"text-xl font-black text-[#2a2416]",children:"躺"})}),y.jsx("h2",{className:"text-2xl font-extrabold text-gray-900",children:ee==="login"?"登录管理后台":"注册新账号"}),y.jsx("p",{className:"mt-2 text-sm text-gray-500",children:ee==="login"?"使用管理员账号进入工作台":"创建账号后即可登录工作台"})]}),ee==="login"&&y.jsxs("form",{onSubmit:Z,className:"space-y-5",children:[y.jsxs("div",{className:"space-y-4",children:[y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"管理员账号"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Gm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"请输入账号",value:h,onChange:k=>p(k.target.value),autoComplete:"username",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"密码"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Vm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"password",placeholder:"请输入密码",value:v,onChange:k=>g(k.target.value),autoComplete:"current-password",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),H.required&&y.jsx(fh,{image:H.image,code:H.code,onCodeChange:H.setCode,onRefresh:()=>void H.refresh()})]}),W&&y.jsxs("div",{role:"status",className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm font-semibold text-green-700",children:[y.jsx(or,{className:"h-4 w-4 shrink-0"})," ",W]}),q&&y.jsxs("div",{role:"alert",className:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:[y.jsx(Xm,{className:"h-4 w-4 shrink-0"})," ",q]}),y.jsx("button",{type:"submit",disabled:A,className:"ios-btn-primary flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm disabled:opacity-70",children:A?y.jsx(su,{className:"h-4 w-4 animate-spin"}):y.jsxs(y.Fragment,{children:["登录 ",y.jsx(Ym,{className:"h-4 w-4"})]})})]}),ee==="register"&&y.jsxs("form",{onSubmit:le,className:"space-y-5",children:[y.jsxs("div",{className:"space-y-4",children:[y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"账号"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Gm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"设置登录账号",value:be.username,onChange:k=>Me({...be,username:k.target.value}),autoComplete:"username",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"邮箱"}),y.jsxs("div",{className:"relative group",children:[y.jsx(S1,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"email",placeholder:"用于找回账号",value:be.email,onChange:k=>Me({...be,email:k.target.value}),autoComplete:"email",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"密码"}),y.jsxs("div",{className:"relative group",children:[y.jsx(Vm,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"password",placeholder:"至少 8 位,含字母和数字",value:be.password,onChange:k=>Me({...be,password:k.target.value}),autoComplete:"new-password",required:!0,className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]})]}),Le&&y.jsxs(y.Fragment,{children:[y.jsx(fh,{image:j.image,code:j.code,onCodeChange:j.setCode,onRefresh:()=>void j.refresh()}),y.jsxs("label",{className:"block",children:[y.jsx("span",{className:"mb-1.5 block text-xs font-bold text-gray-600",children:"邮箱验证码"}),y.jsxs("div",{className:"flex gap-2",children:[y.jsxs("div",{className:"relative group flex-1",children:[y.jsx(vh,{className:"absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 group-focus-within:text-gray-700"}),y.jsx("input",{type:"text",placeholder:"请输入验证码",value:be.code,onChange:k=>Me({...be,code:k.target.value}),className:"ios-input h-11 w-full rounded-md py-2.5 pl-10 pr-4 text-sm"})]}),y.jsx("button",{type:"button",onClick:()=>void G(),disabled:P||re>0,className:"ios-btn-secondary h-11 shrink-0 rounded-md px-3 text-xs font-bold disabled:opacity-60",children:re>0?`${re}s`:P?"发送中":"获取验证码"})]})]})]})]}),z&&y.jsxs("div",{role:"status",className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm font-semibold text-green-700",children:[y.jsx(or,{className:"h-4 w-4 shrink-0"})," ",z]}),He&&y.jsxs("div",{role:"alert",className:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:[y.jsx(Xm,{className:"h-4 w-4 shrink-0"})," ",He]}),y.jsx("button",{type:"submit",disabled:ke,className:"ios-btn-primary flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm disabled:opacity-70",children:ke?y.jsx(su,{className:"h-4 w-4 animate-spin"}):y.jsxs(y.Fragment,{children:["注册 ",y.jsx(Ym,{className:"h-4 w-4"})]})})]}),me&&y.jsx("div",{className:"mt-5 text-center text-xs text-gray-500",children:ee==="login"?y.jsxs(y.Fragment,{children:["还没有账号?",y.jsx("button",{type:"button",onClick:()=>{Ee("register"),F(""),X("")},className:"ml-1 font-bold text-[var(--brand-text)] hover:underline",children:"注册新账号"})]}):y.jsxs(y.Fragment,{children:["已有账号?",y.jsx("button",{type:"button",onClick:()=>{Ee("login"),Re(""),L("")},className:"ml-1 font-bold text-[var(--brand-text)] hover:underline",children:"返回登录"})]})}),y.jsx("p",{className:"mt-7 border-t border-gray-100 pt-5 text-xs font-medium text-gray-400",children:"躺赚鱼 · www.88531.cn"})]})})]})})]})},ey=document.getElementById("root");if(!ey)throw new Error("Could not find root element to mount to");const s2=Dp.createRoot(ey);s2.render(y.jsx(yh.StrictMode,{children:y.jsx(ug,{children:y.jsx(i2,{})})}));export{Z2 as $,C2 as A,Kp as B,Pp as C,M2 as D,i1 as E,U2 as F,H2 as G,q2 as H,B2 as I,L2 as J,d_ as K,su as L,O1 as M,lx as N,yh as O,l1 as P,L1 as Q,c2 as R,Xm as S,sS as T,P1 as U,Y2 as V,Q2 as W,_h as X,$2 as Y,F2 as Z,iS as _,vr as a,P2 as a$,G2 as a0,J2 as a1,K2 as a2,V2 as a3,X2 as a4,rS as a5,ES as a6,_S as a7,gS as a8,a1 as a9,tg as aA,KS as aB,JS as aC,$S as aD,or as aE,US as aF,HS as aG,VS as aH,ZS as aI,BS as aJ,LS as aK,YS as aL,kS as aM,XS as aN,QS as aO,GS as aP,qS as aQ,m_ as aR,c_ as aS,F1 as aT,S1 as aU,x1 as aV,W2 as aW,r_ as aX,Ph as aY,Tv as aZ,I2 as a_,vS as aa,SS as ab,bS as ac,xS as ad,PS as ae,t_ as af,e_ as ag,a_ as ah,n_ as ai,l_ as aj,vh as ak,WS as al,IS as am,CS as an,MS as ao,$p as ap,B1 as aq,FS as ar,zS as as,uS as at,jS as au,DS as av,wS as aw,NS as ax,RS as ay,OS as az,Up as b,eS as b0,o_ as b1,B_ as b2,u_ as b3,s_ as b4,H_ as b5,Y_ as b6,k_ as b7,i_ as b8,L_ as b9,dS as bA,hS as bB,mS as bC,bh as bD,Rv as bE,cS as bF,Y1 as bG,V_ as bH,X_ as bI,ax as bJ,nx as bK,tx as bL,Z_ as bM,G_ as bN,Q_ as bO,c1 as bP,K_ as bQ,ex as bR,Q1 as bS,Sh as bT,W_ as bU,J_ as bV,$_ as bW,I_ as bX,F_ as bY,P_ as bZ,C_ as ba,M_ as bb,Xp as bc,w_ as bd,D_ as be,N_ as bf,tS as bg,U_ as bh,q_ as bi,R_ as bj,j_ as bk,z_ as bl,h_ as bm,v_ as bn,b_ as bo,A_ as bp,O_ as bq,p_ as br,g_ as bs,__ as bt,E_ as bu,x_ as bv,T_ as bw,y_ as bx,S_ as by,fS as bz,de as c,pS as d,D1 as e,oS as f,hh as g,AS as h,yS as i,y as j,Gm as k,M1 as l,aS as m,il as n,w2 as o,k2 as p,j2 as q,B as r,D2 as s,nS as t,ux as u,ix as v,TS as w,lS as x,z2 as y,f_ as z}; diff --git a/static/assets/index-BlMpFSYI.css b/static/assets/index-BlMpFSYI.css deleted file mode 100644 index bdddeb5..0000000 --- a/static/assets/index-BlMpFSYI.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--gray-200) / 1)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}input::placeholder,textarea::placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-3{left:.75rem;right:.75rem}.-bottom-1{bottom:-.25rem}.-right-1{right:-.25rem}.bottom-3{bottom:.75rem}.bottom-8{bottom:2rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.left-4{left:1rem}.left-5{left:1.25rem}.right-0{right:0}.right-0\.5{right:.125rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-4{top:1rem}.top-8{top:2rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[10000\]{z-index:10000}.col-span-2{grid-column:span 2 / span 2}.m-3{margin:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-ml-2{margin-left:-.5rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-44{height:11rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[280px\]{height:280px}.h-\[300px\]{height:300px}.h-\[340px\]{height:340px}.h-\[68px\]{height:68px}.h-\[76px\]{height:76px}.h-\[calc\(100vh-3\.5rem\)\]{height:calc(100vh - 3.5rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-\[220px\]{max-height:220px}.max-h-\[400px\]{max-height:400px}.max-h-\[460px\]{max-height:460px}.max-h-\[620px\]{max-height:620px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[92vh\]{max-height:92vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-11{min-height:2.75rem}.min-h-20{min-height:5rem}.min-h-24{min-height:6rem}.min-h-28{min-height:7rem}.min-h-36{min-height:9rem}.min-h-64{min-height:16rem}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[320px\]{min-height:320px}.min-h-\[42px\]{min-height:42px}.min-h-\[500px\]{min-height:500px}.min-h-\[560px\]{min-height:560px}.min-h-\[56px\]{min-height:56px}.min-h-\[84px\]{min-height:84px}.min-h-\[calc\(100vh-2rem\)\]{min-height:calc(100vh - 2rem)}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[10\%\]{width:10%}.w-\[11\%\]{width:11%}.w-\[12\%\]{width:12%}.w-\[13\%\]{width:13%}.w-\[15\%\]{width:15%}.w-\[16\%\]{width:16%}.w-\[17\%\]{width:17%}.w-\[18\%\]{width:18%}.w-\[18px\]{width:18px}.w-\[20\%\]{width:20%}.w-\[22\%\]{width:22%}.w-\[248px\]{width:248px}.w-\[25\%\]{width:25%}.w-\[44\%\]{width:44%}.w-\[6\%\]{width:6%}.w-\[min\(22rem\,calc\(100vw-3rem\)\)\]{width:min(22rem,calc(100vw - 3rem))}.w-\[min\(380px\,calc\(100vw-2rem\)\)\]{width:min(380px,calc(100vw - 2rem))}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-5{min-width:1.25rem}.min-w-\[1040px\]{min-width:1040px}.min-w-\[1100px\]{min-width:1100px}.min-w-\[760px\]{min-width:760px}.min-w-\[820px\]{min-width:820px}.min-w-\[860px\]{min-width:860px}.min-w-\[980px\]{min-width:980px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-5xl{max-width:64rem}.max-w-72{max-width:18rem}.max-w-\[10rem\]{max-width:10rem}.max-w-\[1320px\]{max-width:1320px}.max-w-\[1600px\]{max-width:1600px}.max-w-\[220px\]{max-width:220px}.max-w-\[260px\]{max-width:260px}.max-w-\[380px\]{max-width:380px}.max-w-\[680px\]{max-width:680px}.max-w-\[76\%\]{max-width:76%}.max-w-\[86\%\]{max-width:86%}.max-w-\[980px\]{max-width:980px}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.scroll-mt-4{scroll-margin-top:1rem}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[340px_140px_260px_210px_110px\]{grid-template-columns:340px 140px 260px 210px 110px}.grid-cols-\[48px_minmax\(0\,1fr\)_auto\]{grid-template-columns:48px minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-2>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(2px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(2px * var(--tw-divide-y-reverse))}.divide-\[\#eeeeee\]>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(238 238 238 / var(--tw-divide-opacity, 1))}.divide-\[var\(--border\)\]>:not([hidden])~:not([hidden]){border-color:var(--border)}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(var(--gray-100) / var(--tw-divide-opacity, 1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-divide-opacity, 1))}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:8px}.rounded-2xl{border-radius:24px}.rounded-3xl{border-radius:32px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:10px}.rounded-none{border-radius:0}.rounded-xl{border-radius:20px}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-dashed{border-style:dashed}.border-\[\#f5c800\]{--tw-border-opacity: 1;border-color:rgb(245 200 0 / var(--tw-border-opacity, 1))}.border-\[\#ffe100\]{--tw-border-opacity: 1;border-color:rgb(255 225 0 / var(--tw-border-opacity, 1))}.border-\[\#ffe566\]{--tw-border-opacity: 1;border-color:rgb(255 229 102 / var(--tw-border-opacity, 1))}.border-\[var\(--border\)\]{border-color:var(--border)}.border-\[var\(--border-light\)\]{border-color:var(--border-light)}.border-\[var\(--border-strong\)\]{border-color:var(--border-strong)}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-brand-200{--tw-border-opacity: 1;border-color:rgb(255 239 163 / var(--tw-border-opacity, 1))}.border-cyan-100{--tw-border-opacity: 1;border-color:rgb(207 250 254 / var(--tw-border-opacity, 1))}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity, 1))}.border-cyan-600{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(var(--gray-100) / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(var(--gray-300) / var(--tw-border-opacity, 1))}.border-gray-50{--tw-border-opacity: 1;border-color:rgb(var(--gray-50) / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-violet-100{--tw-border-opacity: 1;border-color:rgb(237 233 254 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity, 1))}.bg-\[\#8fc7a8\]{--tw-bg-opacity: 1;background-color:rgb(143 199 168 / var(--tw-bg-opacity, 1))}.bg-\[\#b8ac8e\]{--tw-bg-opacity: 1;background-color:rgb(184 172 142 / var(--tw-bg-opacity, 1))}.bg-\[\#c9b8e8\]{--tw-bg-opacity: 1;background-color:rgb(201 184 232 / var(--tw-bg-opacity, 1))}.bg-\[\#e8a0a0\]{--tw-bg-opacity: 1;background-color:rgb(232 160 160 / var(--tw-bg-opacity, 1))}.bg-\[\#e8dcbc\]{--tw-bg-opacity: 1;background-color:rgb(232 220 188 / var(--tw-bg-opacity, 1))}.bg-\[\#eef4ff\]{--tw-bg-opacity: 1;background-color:rgb(238 244 255 / var(--tw-bg-opacity, 1))}.bg-\[\#f0f7f3\]{--tw-bg-opacity: 1;background-color:rgb(240 247 243 / var(--tw-bg-opacity, 1))}.bg-\[\#f5c800\]{--tw-bg-opacity: 1;background-color:rgb(245 200 0 / var(--tw-bg-opacity, 1))}.bg-\[\#f7f2fb\]{--tw-bg-opacity: 1;background-color:rgb(247 242 251 / var(--tw-bg-opacity, 1))}.bg-\[\#ff4400\]{--tw-bg-opacity: 1;background-color:rgb(255 68 0 / var(--tw-bg-opacity, 1))}.bg-\[\#ffd700\]{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.bg-\[\#ffe100\]{--tw-bg-opacity: 1;background-color:rgb(255 225 0 / var(--tw-bg-opacity, 1))}.bg-\[\#fff7e6\]{--tw-bg-opacity: 1;background-color:rgb(255 247 230 / var(--tw-bg-opacity, 1))}.bg-\[\#fff8d1\]{--tw-bg-opacity: 1;background-color:rgb(255 248 209 / var(--tw-bg-opacity, 1))}.bg-\[\#fffbe6\]{--tw-bg-opacity: 1;background-color:rgb(255 251 230 / var(--tw-bg-opacity, 1))}.bg-\[\#fffdf0\]{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.bg-\[var\(--app-bg\)\]{background-color:var(--app-bg)}.bg-\[var\(--brand\)\]{background-color:var(--brand)}.bg-\[var\(--brand-50\)\]{background-color:var(--brand-50)}.bg-\[var\(--surface\)\]{background-color:var(--surface)}.bg-\[var\(--surface-hover\)\]{background-color:var(--surface-hover)}.bg-\[var\(--surface-strong\)\]{background-color:var(--surface-strong)}.bg-\[var\(--surface-subtle\)\]{background-color:var(--surface-subtle)}.bg-\[var\(--unread-badge\)\]{background-color:var(--unread-badge)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black\/40{background-color:#0006}.bg-black\/55{background-color:#0000008c}.bg-black\/60{background-color:#0009}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-brand-50{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.bg-brand-500{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.bg-cyan-50{--tw-bg-opacity: 1;background-color:rgb(236 254 255 / var(--tw-bg-opacity, 1))}.bg-cyan-50\/40{background-color:#ecfeff66}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(var(--gray-200) / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(var(--gray-300) / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(var(--gray-50) / var(--tw-bg-opacity, 1))}.bg-gray-50\/60{background-color:rgb(var(--gray-50) / .6)}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-indigo-50\/70{background-color:#eef2ffb3}.bg-orange-300{--tw-bg-opacity: 1;background-color:rgb(253 186 116 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-violet-50{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/70{background-color:#ffffffb3}.bg-white\/95{background-color:#fffffff2}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.px-0{padding-left:0;padding-right:0}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-11{padding-right:2.75rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#2a2416\]{--tw-text-opacity: 1;color:rgb(42 36 22 / var(--tw-text-opacity, 1))}.text-\[\#3f5f8f\]{--tw-text-opacity: 1;color:rgb(63 95 143 / var(--tw-text-opacity, 1))}.text-\[\#3f7a5c\]{--tw-text-opacity: 1;color:rgb(63 122 92 / var(--tw-text-opacity, 1))}.text-\[\#544c39\]{--tw-text-opacity: 1;color:rgb(84 76 57 / var(--tw-text-opacity, 1))}.text-\[\#6b5200\]{--tw-text-opacity: 1;color:rgb(107 82 0 / var(--tw-text-opacity, 1))}.text-\[\#6b5a8a\]{--tw-text-opacity: 1;color:rgb(107 90 138 / var(--tw-text-opacity, 1))}.text-\[\#8a6300\]{--tw-text-opacity: 1;color:rgb(138 99 0 / var(--tw-text-opacity, 1))}.text-\[\#8c7900\]{--tw-text-opacity: 1;color:rgb(140 121 0 / var(--tw-text-opacity, 1))}.text-\[\#999\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity, 1))}.text-\[\#d6b600\]{--tw-text-opacity: 1;color:rgb(214 182 0 / var(--tw-text-opacity, 1))}.text-\[\#d92d20\]{--tw-text-opacity: 1;color:rgb(217 45 32 / var(--tw-text-opacity, 1))}.text-\[\#ff3b30\]{--tw-text-opacity: 1;color:rgb(255 59 48 / var(--tw-text-opacity, 1))}.text-\[\#ff4400\]{--tw-text-opacity: 1;color:rgb(255 68 0 / var(--tw-text-opacity, 1))}.text-\[var\(--brand-ink\)\]{color:var(--brand-ink)}.text-\[var\(--brand-primary\)\]{color:var(--brand-primary)}.text-\[var\(--brand-text\)\]{color:var(--brand-text)}.text-\[var\(--danger-ink\)\]{color:var(--danger-ink)}.text-\[var\(--text\)\]{color:var(--text)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-\[var\(--text-secondary\)\]{color:var(--text-secondary)}.text-\[var\(--text-soft\)\]{color:var(--text-soft)}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-brand-ink{--tw-text-opacity: 1;color:rgb(42 36 22 / var(--tw-text-opacity, 1))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-cyan-800{--tw-text-opacity: 1;color:rgb(21 94 117 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-700\/70{color:#047857b3}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-emerald-900\/80{color:#064e3bcc}.text-gray-400{--tw-text-opacity: 1;color:rgb(var(--gray-400) / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(var(--gray-500) / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(var(--gray-600) / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(var(--gray-700) / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(var(--gray-800) / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(var(--gray-900) / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-indigo-950{--tw-text-opacity: 1;color:rgb(30 27 75 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-violet-900{--tw-text-opacity: 1;color:rgb(76 29 149 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.accent-\[\#f5c400\]{accent-color:#f5c400}.accent-brand-500{accent-color:#FFD700}.accent-yellow-400{accent-color:#facc15}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-\[0_12px_40px_rgba\(20\,24\,28\,0\.24\)\]{--tw-shadow: 0 12px 40px rgba(20,24,28,.24);--tw-shadow-colored: 0 12px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_rgba\(20\,24\,28\,0\.10\)\]{--tw-shadow: 0 4px 16px rgba(20,24,28,.1);--tw-shadow-colored: 0 4px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--shadow-card\,0_8px_24px_rgba\(20\,24\,28\,0\.16\)\)\]{--tw-shadow: var(--shadow-card,0 8px 24px rgba(20,24,28,.16));--tw-shadow-colored: 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--shadow-brand\)\]{--tw-shadow-color: var(--shadow-brand);--tw-shadow: var(--tw-shadow-colored)}.shadow-\[var\(--shadow-sm\)\]{--tw-shadow-color: var(--shadow-sm);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(var(--gray-200) / var(--tw-ring-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-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:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}*{box-sizing:border-box;margin:0;padding:0}:root,:root[data-theme=light]{color-scheme:light;--app-bg: #f7f6f3;--surface: #ffffff;--surface-subtle: #faf9f7;--surface-strong: #f2f1ed;--surface-hover: #faf9f6;--border: #e9e7e2;--border-strong: #d6d3cc;--border-brand: #ffd400;--text: #23211e;--text-muted: #6b6862;--text-soft: #76716a;--gray-50: 250 250 248;--gray-100: 245 244 240;--gray-200: 235 233 227;--gray-300: 221 217 208;--gray-400: 118 113 106;--gray-500: 107 104 98;--gray-600: 102 98 92;--gray-700: 74 71 66;--gray-800: 51 48 44;--gray-900: 34 32 29;--brand-50: #fffdf0;--brand-100: #fff8d1;--brand-200: #ffefa3;--brand-300: #ffe566;--brand: #ffe100;--brand-hover: #ffd700;--brand-active: #f5c800;--brand-ink: #2a2416;--brand-soft: #fff9c9;--brand-text: #806d00;--selection-bg: #fb923c;--selection-ink: var(--brand-ink);--focus-ring: #806d00;--unread-badge: #dc2626;--danger: #b42318;--danger-ink: #b42318;--danger-soft: #fff0f0;--success: #0f704b;--success-ink: #0f704b;--success-soft: #eefaf3;--warning: #945800;--warning-ink: #945800;--warning-soft: #fff7e6;--info: #2a5f92;--info-ink: #2a5f92;--info-soft: #f0f7ff;--radius-xs: 8px;--radius: 10px;--radius-lg: 16px;--radius-xl: 20px;--radius-pill: 999px;--shadow-sm: 0 1px 2px rgba(35, 33, 30, .05);--shadow-md: 0 6px 20px rgba(35, 33, 30, .08);--shadow-lg: 0 16px 40px rgba(35, 33, 30, .12);--shadow-brand: 0 6px 18px rgba(255, 214, 0, .35);--chart-grid: #ebe9e3;--chart-cursor: rgba(35, 33, 30, .06);--scrollbar-thumb: #d6d3cc;--scrollbar-thumb-hover: #b9b4aa}:root[data-theme=dark]{color-scheme:dark;--app-bg: #11110f;--surface: #191916;--surface-subtle: #20201c;--surface-strong: #292820;--surface-hover: #302e27;--border: #37362f;--border-strong: #504c40;--border-brand: #d9bd19;--text: #f5f2e8;--text-muted: #c2bcae;--text-soft: #aaa59b;--gray-50: 32 32 28;--gray-100: 41 40 34;--gray-200: 56 53 45;--gray-300: 77 72 60;--gray-400: 170 165 155;--gray-500: 174 167 153;--gray-600: 194 188 174;--gray-700: 215 210 198;--gray-800: 234 230 220;--gray-900: 245 242 232;--brand-50: #292617;--brand-100: #373116;--brand-200: #4b4015;--brand-soft: #393216;--brand-text: #f2d85c;--focus-ring: #f2d85c;--danger: #ff8c8c;--danger-ink: #ffaaaa;--danger-soft: #3a1e1e;--success: #75d9a3;--success-ink: #8fe0b5;--success-soft: #173528;--warning: #ffd170;--warning-ink: #f3d77c;--warning-soft: #3a2d16;--info: #91c9ff;--info-ink: #9dccff;--info-soft: #182e45;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);--shadow-md: 0 10px 28px rgba(0, 0, 0, .32);--shadow-lg: 0 22px 60px rgba(0, 0, 0, .42);--shadow-brand: 0 7px 22px rgba(221, 187, 0, .18);--chart-grid: #403d36;--chart-cursor: rgba(255, 255, 255, .06);--scrollbar-thumb: #5b574e;--scrollbar-thumb-hover: #d2bd38}html,body,#root{height:100%;width:100%}html{background:var(--app-bg);scrollbar-color:var(--scrollbar-thumb) transparent}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;background-color:var(--app-bg);color:var(--text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}button,input,select,textarea{font:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}input:disabled,select:disabled,textarea:disabled,input[readonly]{color:var(--text-muted)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill,select:-webkit-autofill{-webkit-text-fill-color:var(--text);caret-color:var(--text);box-shadow:0 0 0 1000px var(--surface) inset;-webkit-transition:background-color 9999s ease-out 0s;transition:background-color 9999s ease-out 0s}.theme-picker{min-width:0;color:var(--text-muted)}.theme-picker__heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;padding:0 2px;font-size:11px;font-weight:700}.theme-picker__status{color:var(--text-soft);font-size:10px;font-weight:600}.theme-switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;border:1px solid var(--border);border-radius:12px;background:var(--surface-strong);padding:3px}.theme-switcher__option{display:inline-flex;min-width:0;min-height:36px;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:8px;color:var(--text-muted);font-size:11px;font-weight:650;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.theme-switcher__option:hover{background:var(--surface-hover);color:var(--text)}.theme-switcher__option--active,.theme-switcher__option--active:hover{border-color:var(--border-brand);background:var(--brand-soft);color:var(--brand-text);font-weight:750}.theme-picker--compact .theme-switcher{grid-template-columns:repeat(3,36px);border-radius:11px}.theme-picker--compact .theme-switcher__option{width:36px;min-height:36px}.media-light-surface{color-scheme:light;background:#fff!important;color:#23211e!important}:root[data-theme=dark] .media-light-surface .bg-white,:root[data-theme=dark] .media-light-surface [class~="bg-white/95"]{background-color:#fffffff5!important}:root[data-theme=dark] .media-light-surface .bg-gray-50,:root[data-theme=dark] .media-light-surface .bg-green-50{background-color:#fafaf8!important}:root[data-theme=dark] .media-light-surface .text-gray-500{color:#6b6862!important}:root[data-theme=dark] .media-light-surface .text-gray-800{color:#33302c!important}:root[data-theme=dark] .media-light-surface .text-green-700{color:#0f704b!important}:root[data-theme=dark] .media-light-surface .text-amber-800{color:#7a5100!important}:root[data-theme=dark] .media-light-surface .text-blue-600{color:#245f9d!important}:root[data-theme=dark] .media-light-surface .text-red-600{color:#c92a2a!important}:root[data-theme=dark] .bg-white{background-color:var(--surface)}:root[data-theme=dark] [class~="bg-white/95"]{background-color:#191916f5}:root[data-theme=dark] [class~="bg-white/90"],:root[data-theme=dark] [class~="bg-white/80"]{background-color:#191916e6}:root[data-theme=dark] [class~="bg-[#fffdf5]"]{background-color:var(--app-bg)}:root[data-theme=dark] [class~="bg-[#fff9e8]"],:root[data-theme=dark] [class~="bg-[#fffdf0]"],:root[data-theme=dark] [class~="bg-[#f5edd6]"]{background-color:var(--surface-strong)}:root[data-theme=dark] [class~="hover:bg-[#fff9e8]"]:hover,:root[data-theme=dark] [class~="hover:bg-[#fffdf5]"]:hover,:root[data-theme=dark] [class~="hover:bg-[#fffdf0]"]:hover{background-color:var(--surface-hover)}:root[data-theme=dark] [class~="disabled:bg-white"]:disabled{background-color:var(--surface)}:root[data-theme=dark] [class~="border-[#f0e6c8]"],:root[data-theme=dark] [class~="border-[#e6d69a]"]{border-color:var(--border)}:root[data-theme=dark] [class~="text-[#111]"],:root[data-theme=dark] [class~="text-[#333]"],:root[data-theme=dark] [class~="text-[#555]"],:root[data-theme=dark] [class~="text-[#666]"]{color:var(--text)}:root[data-theme=dark] [class~="text-[#777]"],:root[data-theme=dark] [class~="text-[#888]"]{color:var(--text-muted)}:root[data-theme=dark] [class~="text-[#999]"],:root[data-theme=dark] [class~="text-[#aaa]"],:root[data-theme=dark] [class~="text-[#a89e83]"],:root[data-theme=dark] [class~="text-[#b8ac8e]"],:root[data-theme=dark] [class~="text-[#d0d0d0]"]{color:var(--text-soft)}:root[data-theme=dark] [class~="text-[#8c7900]"],:root[data-theme=dark] [class~="text-[#8a6300]"],:root[data-theme=dark] [class~="text-[#6b5200]"],:root[data-theme=dark] [class~="text-[#d6b600]"]{color:var(--brand-text)}:root[data-theme=dark] [class~="hover:text-black"]:hover,:root[data-theme=dark] [class~="hover:text-[#111]"]:hover{color:var(--text)}:root[data-theme=dark] button .rounded-full.bg-white{background-color:#f4f1e8}:root[data-theme=dark] .bg-red-50,:root[data-theme=dark] .bg-red-100{background-color:var(--danger-soft)}:root[data-theme=dark] .border-red-200{border-color:#744040}:root[data-theme=dark] .text-red-500,:root[data-theme=dark] .text-red-600,:root[data-theme=dark] .text-red-700,:root[data-theme=dark] .text-red-800,:root[data-theme=dark] .text-red-900{color:#faa}:root[data-theme=dark] .bg-green-50,:root[data-theme=dark] .bg-green-100,:root[data-theme=dark] .bg-emerald-50{background-color:var(--success-soft)}:root[data-theme=dark] .border-green-200,:root[data-theme=dark] .border-emerald-200{border-color:#356b50}:root[data-theme=dark] .text-green-600,:root[data-theme=dark] .text-green-700,:root[data-theme=dark] .text-green-800,:root[data-theme=dark] .text-emerald-600,:root[data-theme=dark] .text-emerald-700,:root[data-theme=dark] .text-emerald-800{color:#8fe0b5}:root[data-theme=dark] .bg-blue-50,:root[data-theme=dark] .bg-blue-100{background-color:var(--info-soft)}:root[data-theme=dark] .border-blue-200{border-color:#3c638c}:root[data-theme=dark] .text-blue-500,:root[data-theme=dark] .text-blue-600,:root[data-theme=dark] .text-blue-700,:root[data-theme=dark] .text-blue-800,:root[data-theme=dark] .text-blue-900{color:#9dccff}:root[data-theme=dark] .bg-yellow-50,:root[data-theme=dark] .bg-yellow-100,:root[data-theme=dark] .bg-amber-50,:root[data-theme=dark] .bg-amber-100,:root[data-theme=dark] .bg-amber-200{background-color:var(--warning-soft)}:root[data-theme=dark] .border-amber-200{border-color:#755f2d}:root[data-theme=dark] .text-yellow-600,:root[data-theme=dark] .text-yellow-700,:root[data-theme=dark] .text-yellow-800,:root[data-theme=dark] .text-amber-500,:root[data-theme=dark] .text-amber-600,:root[data-theme=dark] .text-amber-700,:root[data-theme=dark] .text-amber-800,:root[data-theme=dark] .text-amber-900{color:#f3d77c}:root[data-theme=dark] [class~="bg-[#fff8d1]"]{background-color:#393216}:root[data-theme=dark] [class~="bg-[#eef4ff]"]{background-color:#1c2d45}:root[data-theme=dark] [class~="bg-[#f0f7f3]"]{background-color:#193126}:root[data-theme=dark] [class~="bg-[#f7f2fb]"]{background-color:#2c2438}:root[data-theme=dark] [class~="text-[#3f5f8f]"]{color:#aacbff}:root[data-theme=dark] [class~="text-[#3f7a5c]"]{color:#9bd9b5}:root[data-theme=dark] [class~="text-[#6b5a8a]"]{color:#d1baf2}:root[data-theme=dark] [class~="hover:bg-red-50"]:hover,:root[data-theme=dark] [class~="hover:bg-red-100"]:hover{background-color:var(--danger-soft)}:root[data-theme=dark] [class~="hover:bg-green-50"]:hover,:root[data-theme=dark] [class~="hover:bg-green-100"]:hover,:root[data-theme=dark] [class~="hover:bg-emerald-50"]:hover{background-color:var(--success-soft)}:root[data-theme=dark] [class~="hover:bg-blue-50"]:hover,:root[data-theme=dark] [class~="hover:bg-blue-100"]:hover{background-color:var(--info-soft)}:root[data-theme=dark] [class~="hover:bg-yellow-50"]:hover,:root[data-theme=dark] [class~="hover:bg-yellow-100"]:hover,:root[data-theme=dark] [class~="hover:bg-amber-50"]:hover,:root[data-theme=dark] [class~="hover:bg-amber-100"]:hover{background-color:var(--warning-soft)}:root[data-theme=dark] [class~="hover:bg-black/5"]:hover{background-color:#ffffff14}:root[data-theme=dark] [class~="hover:text-red-600"]:hover,:root[data-theme=dark] [class~="hover:text-red-700"]:hover{color:#faa}:root[data-theme=dark] [class~="hover:text-green-600"]:hover,:root[data-theme=dark] [class~="hover:text-green-700"]:hover,:root[data-theme=dark] [class~="hover:text-emerald-600"]:hover{color:#8fe0b5}:root[data-theme=dark] [class~="hover:text-blue-600"]:hover,:root[data-theme=dark] [class~="hover:text-blue-700"]:hover{color:#9dccff}:root[data-theme=dark] [class~="hover:text-amber-600"]:hover,:root[data-theme=dark] [class~="hover:text-amber-700"]:hover{color:#f3d77c}:root[data-theme=dark] [class~="hover:bg-pink-50"]:hover,:root[data-theme=dark] [class~="hover:bg-pink-100"]:hover{background-color:var(--danger-soft)}:root[data-theme=dark] [class~="hover:text-pink-600"]:hover,:root[data-theme=dark] [class~="hover:text-pink-700"]:hover,:root[data-theme=dark] [class~="hover:text-yellow-600"]:hover{color:var(--warning-ink)}:root[data-theme=dark] [class~="hover:bg-amber-200"]:hover{background-color:var(--warning-soft)}:root[data-theme=dark] .theme-brand-panel [class~="text-[#8a6300]"]{color:#8a6300}:root[data-theme=dark] .theme-brand-panel [class~="text-[#6b5200]"]{color:#6b5200}:root[data-theme=dark] .page-tab:not(.page-tab--active) .page-tab__count{background:#ffffff14}.recharts-pie-label-text,.recharts-text{fill:var(--text-muted)}:root[data-theme=dark] .modal-overlay,:root[data-theme=dark] .modal-overlay-centered{background-color:#000000ad}.page-stack{display:flex;flex-direction:column;gap:20px}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;min-height:62px;padding-bottom:16px;border-bottom:1px solid var(--border)}.page-header__identity{display:flex;min-width:0;align-items:flex-start;gap:12px}.page-header__icon{display:inline-flex;width:42px;height:42px;flex:0 0 42px;align-items:center;justify-content:center;border-radius:var(--radius-lg);background:linear-gradient(140deg,var(--brand-300),var(--brand));color:var(--brand-ink);box-shadow:var(--shadow-brand)}.page-title{color:var(--text);font-size:24px;font-weight:750;line-height:1.25}.page-description{margin-top:5px;max-width:760px;color:var(--text-muted);font-size:13px;line-height:1.6}.page-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.page-tabs{display:inline-flex;max-width:100%;gap:4px;overflow-x:auto;border-radius:var(--radius-pill);background:var(--surface-strong);padding:4px;scrollbar-width:none;-ms-overflow-style:none}.page-tabs::-webkit-scrollbar{display:none}.page-tab{display:inline-flex;min-height:38px;flex:0 0 auto;align-items:center;justify-content:center;gap:7px;border-radius:var(--radius-pill);padding:8px 16px;color:var(--text-muted);font-size:13px;font-weight:650;line-height:1.2;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}.page-tab:hover{background:var(--surface);color:var(--text)}.page-tab--active{background:var(--brand);color:var(--brand-ink);box-shadow:var(--shadow-brand)}.page-tab--active:hover{background:var(--brand)}.page-tab__count{min-width:20px;border-radius:var(--radius-pill);background:#ffffff8c;padding:2px 7px;color:inherit;font-size:11px;font-weight:700;text-align:center}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:14px;box-shadow:var(--shadow-sm)}.toolbar__group{display:flex;min-width:0;flex-wrap:wrap;align-items:center;gap:8px}.section-panel{overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--surface);box-shadow:var(--shadow-sm)}.section-panel__header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px;border-bottom:1px solid var(--border);padding:14px 18px}.section-header__icon{display:inline-flex;width:34px;height:34px;flex:0 0 34px;align-items:center;justify-content:center;border-radius:var(--radius);background:var(--surface-strong);color:var(--text-muted)}.section-header__actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.section-title{color:var(--text);font-size:15px;font-weight:700}.section-description{margin-top:3px;color:var(--text-muted);font-size:12px;line-height:1.5}.notice-banner{display:flex;min-height:46px;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--radius-lg);padding:11px 14px;font-size:13px;font-weight:600;line-height:1.5}.notice-banner button{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;border-radius:var(--radius-pill);padding:5px}.notice-banner--success{border-color:color-mix(in srgb,var(--success) 38%,var(--border));background:var(--success-soft);color:var(--success-ink)}.notice-banner--error{border-color:color-mix(in srgb,var(--danger) 38%,var(--border));background:var(--danger-soft);color:var(--danger-ink)}.notice-banner--warning{border-color:var(--border-strong);background:var(--warning-soft);color:var(--warning-ink)}.notice-banner--info{border-color:color-mix(in srgb,var(--info) 38%,var(--border));background:var(--info-soft);color:var(--info-ink)}.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.metric-card{min-width:0;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:18px;box-shadow:var(--shadow-sm);transition:box-shadow .16s ease,transform .16s ease}.metric-card:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}.metric-card__label{color:var(--text-muted);font-size:12px;font-weight:650}.metric-card__value{margin-top:7px;color:var(--text);font-size:24px;font-weight:750;line-height:1.2}.metric-card__meta{margin-top:6px;color:var(--text-soft);font-size:11px;line-height:1.5}.metric-grid--compact{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.metric-grid--compact .metric-card{padding:10px 12px;border-radius:var(--radius-md)}.metric-grid--compact .metric-card__label{font-size:11px}.metric-grid--compact .metric-card__value{margin-top:2px;font-size:20px}.metric-grid--compact .metric-card__meta{margin-top:1px;font-size:10px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}.field-label{display:block;margin-bottom:6px;color:var(--text-muted);font-size:12px;font-weight:700}.empty-state{display:flex;min-height:260px;flex-direction:column;align-items:center;justify-content:center;border:1px dashed var(--border-strong);border-radius:var(--radius-xl);background:var(--surface);padding:32px;text-align:center}.empty-state--compact{min-height:160px}.empty-state__icon{display:inline-flex;width:52px;height:52px;align-items:center;justify-content:center;border-radius:var(--radius-lg);background:var(--surface-strong);color:var(--text-soft)}.empty-state h3{margin-top:14px;color:var(--text);font-size:15px;font-weight:700}.empty-state p{margin-top:5px;max-width:520px;color:var(--text-muted);font-size:13px;line-height:1.6}.page-loading{display:flex;min-height:260px;align-items:center;justify-content:center;gap:9px;color:var(--text-muted);font-size:13px;font-weight:600}.ios-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);box-shadow:var(--shadow-sm);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}.ios-card:hover{border-color:var(--border-brand);box-shadow:var(--shadow-md)}.ios-input{min-height:42px;background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius);color:var(--text);font-weight:500;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ios-input:hover:not(:disabled):not(:focus){border-color:var(--border-brand)}.ios-input:focus{background:var(--surface);border-color:var(--focus-ring);box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-ring) 28%,transparent);outline:none}.ios-input::-moz-placeholder{color:var(--text-soft);font-weight:400}.ios-input::placeholder{color:var(--text-soft);font-weight:400}.ios-input:disabled,.ios-input[readonly]{border-color:var(--border);background:var(--surface-strong);color:var(--text-muted);cursor:not-allowed}.ios-btn-primary{min-height:42px;border-radius:var(--radius-pill);background:var(--brand);color:var(--brand-ink);font-weight:700;border:none;box-shadow:var(--shadow-brand);transition:background-color .15s ease,box-shadow .15s ease,transform .1s ease;cursor:pointer}.ios-btn-primary:hover:not(:disabled){background:var(--brand-hover);box-shadow:0 8px 22px #ffd60073}.ios-btn-primary:active:not(:disabled){background:var(--brand-active);transform:translateY(1px);box-shadow:var(--shadow-sm)}.ios-btn-primary:disabled{background:var(--surface-strong);color:var(--text-soft);box-shadow:none;cursor:not-allowed}.ios-btn-secondary{min-height:42px;border-radius:var(--radius-pill);background:var(--surface);color:var(--text);font-weight:600;border:1px solid var(--border-strong);transition:background-color .15s ease,border-color .15s ease;cursor:pointer}.ios-btn-secondary:hover:not(:disabled){background:var(--surface-hover);border-color:var(--brand)}.ios-btn-secondary:disabled{color:var(--text-soft);cursor:not-allowed}.ios-btn-danger{min-height:42px;border-radius:var(--radius-pill);background:var(--danger-soft);color:var(--danger);font-weight:600;border:1px solid color-mix(in srgb,var(--danger) 38%,var(--border));transition:background-color .15s ease,border-color .15s ease;cursor:pointer}.ios-btn-danger:hover:not(:disabled){background:color-mix(in srgb,var(--danger-soft) 82%,var(--danger));border-color:color-mix(in srgb,var(--danger) 62%,var(--border))}.data-table{width:100%;border-collapse:collapse;text-align:left}.data-table thead{background:var(--surface-subtle);color:var(--text-muted);font-size:11px;font-weight:700}.data-table th{height:46px;padding:0 16px;border-bottom:1px solid var(--border);letter-spacing:0}.data-table td{padding:13px 16px;border-bottom:1px solid var(--border);vertical-align:middle}.data-table tbody tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:var(--surface-hover)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:var(--radius-pill)}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}aside nav::-webkit-scrollbar{width:4px}aside nav::-webkit-scrollbar-thumb{background:transparent}aside nav:hover::-webkit-scrollbar-thumb{background:var(--border-strong)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fadeIn .18s ease-out forwards}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}::-moz-selection{background:var(--brand);color:#000}::selection{background:var(--brand);color:#000}.chat-self-bubble ::-moz-selection{background:var(--selection-bg);color:var(--selection-ink)}.chat-self-bubble ::selection{background:var(--selection-bg);color:var(--selection-ink)}.text-brand{color:#8c7900}.bg-brand{background-color:var(--brand)}.border-brand{border-color:var(--brand)}.status-badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:var(--radius-pill);font-size:12px;font-weight:650}.status-badge-success{background-color:var(--success-soft);color:var(--success-ink)}.status-badge-warning{background-color:var(--brand-100);color:var(--warning-ink)}.status-badge-error{background-color:var(--danger-soft);color:var(--danger-ink)}.status-badge-info{background-color:var(--surface-strong);color:var(--text-muted)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;align-items:center;justify-content:center;background-color:#0006;padding:1rem;overflow-y:auto}.modal-container{position:relative;width:100%;max-width:42rem;max-height:85vh;margin:auto;display:flex;flex-direction:column;background-color:var(--surface);color:var(--text);border-radius:var(--radius-xl);border:1px solid var(--border);box-shadow:var(--shadow-lg);overflow:hidden}.modal-header{flex-shrink:0;padding:20px 22px;border-bottom:1px solid var(--border);background:var(--surface-subtle);z-index:10}.modal-body{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:22px;color:var(--text)}.modal-footer{flex-shrink:0;padding:16px 22px;border-top:1px solid var(--border);background:var(--surface-subtle);z-index:10}.modal-container-lg{max-width:64rem}.modal-overlay-centered{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;justify-content:center;background-color:#0006;padding:1rem;overflow-y:auto}@media(max-width:1023px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-grid--compact{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:639px){.page-stack{gap:16px}.page-header{min-height:0;align-items:flex-start;padding-bottom:14px}.page-header__icon{width:34px;height:34px;flex-basis:34px}.page-title{font-size:20px}.page-actions{width:100%;justify-content:stretch}.page-actions>*{flex:1 1 auto}.toolbar{align-items:stretch}.toolbar,.toolbar__group{flex-direction:column}.toolbar__group>input,.toolbar__group>select,.toolbar__group>button{width:100%}.section-panel__header{flex-direction:column;align-items:flex-start}.section-header__actions{width:100%;justify-content:stretch}.section-header__actions>*{flex:1 1 auto;justify-content:center}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-grid--compact{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-card{padding:12px 14px}.metric-card__label{font-size:11px}.metric-card__value,.metric-grid--compact .metric-card__value{font-size:18px}}.modal-overlay-centered .modal-container{position:relative;width:100%;max-width:42rem;max-height:85vh;margin:auto 0;display:flex;flex-direction:column;background-color:var(--surface);color:var(--text);border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-md);overflow:hidden}@media(max-width:768px){.page-stack{gap:16px}.page-header{min-height:0;flex-direction:column;align-items:stretch;gap:12px;padding-bottom:14px}.page-title{font-size:21px}.page-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));justify-content:stretch}.page-actions>*{min-width:0}.toolbar{flex-direction:column;align-items:stretch}.toolbar__group{display:grid;grid-template-columns:1fr}.page-tabs{display:grid;width:100%;grid-auto-flow:column;grid-auto-columns:minmax(128px,1fr)}.page-tab{min-width:0;white-space:normal}.responsive-data-table{min-width:0!important}.responsive-data-table,.responsive-data-table tbody,.responsive-data-table tr,.responsive-data-table td{display:block;width:100%}.responsive-data-table thead{display:none}.responsive-data-table tbody tr{border-bottom:1px solid var(--border);padding:12px 16px}.responsive-data-table tbody tr:last-child{border-bottom:0}.responsive-data-table td{display:grid;grid-template-columns:minmax(82px,30%) minmax(0,1fr);align-items:center;gap:12px;border:0;padding:7px 0;text-align:left}.responsive-data-table td:before{content:attr(data-label);color:var(--text-muted);font-size:11px;font-weight:700}.responsive-data-table td>*{min-width:0}.responsive-data-table td[data-label=订单信息],.responsive-data-table td[data-label=卡密名称]{align-items:start}.responsive-data-table td[data-label=操作]>div{flex-wrap:wrap;justify-content:flex-start}.responsive-data-table td>.status-badge{justify-self:start}.ios-card{border-radius:var(--radius)}.ios-input{font-size:16px}.modal-container{max-width:calc(100% - 2rem);max-height:90vh;border-radius:var(--radius)}.modal-header,.modal-body,.modal-footer{padding-left:1.5rem;padding-right:1.5rem}}.marquee{overflow:hidden}.marquee__track{display:inline-flex;align-items:center;white-space:nowrap;will-change:transform;animation:marquee-scroll 40s linear infinite}.marquee:hover .marquee__track{animation-play-state:paused}@keyframes marquee-scroll{0%{transform:translate(0)}to{transform:translate(-50%)}}@media(prefers-reduced-motion:reduce){.marquee__track{animation:none}.marquee{overflow-x:auto}}.placeholder\:text-\[var\(--text-soft\)\]::-moz-placeholder{color:var(--text-soft)}.placeholder\:text-\[var\(--text-soft\)\]::placeholder{color:var(--text-soft)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-1\.5:after{content:var(--tw-content);top:-.375rem;right:-.375rem;bottom:-.375rem;left:-.375rem}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.last\:mb-0:last-child{margin-bottom:0}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:border-\[var\(--border-strong\)\]:hover{border-color:var(--border-strong)}.hover\:border-amber-400:hover{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(var(--gray-400) / var(--tw-border-opacity, 1))}.hover\:bg-\[\#ff4400\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 68 0 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#ffd700\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#fffdf0\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.hover\:bg-\[var\(--brand-hover\)\]:hover{background-color:var(--brand-hover)}.hover\:bg-\[var\(--danger-soft\)\]:hover{background-color:var(--danger-soft)}.hover\:bg-\[var\(--surface-hover\)\]:hover{background-color:var(--surface-hover)}.hover\:bg-amber-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-200:hover{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.hover\:bg-black\/5:hover{background-color:#0000000d}.hover\:bg-black\/80:hover{background-color:#000c}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-600:hover{--tw-bg-opacity: 1;background-color:rgb(245 200 0 / var(--tw-bg-opacity, 1))}.hover\:bg-cyan-100:hover{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-200) / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-50) / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\:bg-pink-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 242 248 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-violet-100:hover{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.hover\:bg-yellow-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.hover\:text-\[\#ff4400\]:hover{--tw-text-opacity: 1;color:rgb(255 68 0 / var(--tw-text-opacity, 1))}.hover\:text-\[var\(--danger\)\]:hover{color:var(--danger)}.hover\:text-\[var\(--text\)\]:hover{color:var(--text)}.hover\:text-amber-600:hover{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.hover\:text-amber-700:hover{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(var(--gray-600) / var(--tw-text-opacity, 1))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(var(--gray-800) / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(var(--gray-900) / var(--tw-text-opacity, 1))}.hover\:text-green-700:hover{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.hover\:text-pink-600:hover{--tw-text-opacity: 1;color:rgb(219 39 119 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-\[\#ffe100\]:focus{--tw-border-opacity: 1;border-color:rgb(255 225 0 / var(--tw-border-opacity, 1))}.focus\:border-\[var\(--brand\)\]:focus{border-color:var(--brand)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[var\(--brand\)\]:focus{--tw-ring-color: var(--brand)}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-\[var\(--focus-ring\)\]:focus-visible{outline-color:var(--focus-ring)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:bg-\[var\(--surface\)\]:disabled{background-color:var(--surface)}.disabled\:bg-\[var\(--surface-strong\)\]:disabled{background-color:var(--surface-strong)}.disabled\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.disabled\:text-\[var\(--text-soft\)\]:disabled{color:var(--text-soft)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}.group:focus-within .group-focus-within\:text-\[\#ffe100\]{--tw-text-opacity: 1;color:rgb(255 225 0 / var(--tw-text-opacity, 1))}.group:focus-within .group-focus-within\:text-gray-700{--tw-text-opacity: 1;color:rgb(var(--gray-700) / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-\[var\(--text-muted\)\]{color:var(--text-muted)}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media(prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}.dark\:border-amber-500\/20:is(.dark *){border-color:#f59e0b33}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:bg-amber-500\/10:is(.dark *){background-color:#f59e0b1a}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:from-amber-950\/20:is(.dark *){--tw-gradient-from: rgb(69 26 3 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(69 26 3 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-\[var\(--surface\)\]:is(.dark *){--tw-gradient-to: var(--surface) var(--tw-gradient-to-position)}.dark\:text-amber-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-slate-700\/60:hover:is(.dark *){background-color:#33415599}@media(min-width:640px){.sm\:right-6{right:1.5rem}.sm\:top-6{top:1.5rem}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:inline-flex{display:inline-flex}.sm\:h-16{height:4rem}.sm\:min-h-\[72px\]{min-height:72px}.sm\:min-h-\[92px\]{min-height:92px}.sm\:min-h-\[calc\(100vh-3rem\)\]{min-height:calc(100vh - 3rem)}.sm\:w-16{width:4rem}.sm\:w-64{width:16rem}.sm\:w-72{width:18rem}.sm\:w-auto{width:auto}.sm\:min-w-40{min-width:10rem}.sm\:min-w-44{min-width:11rem}.sm\:min-w-52{min-width:13rem}.sm\:min-w-56{min-width:14rem}.sm\:min-w-64{min-width:16rem}.sm\:min-w-72{min-width:18rem}.sm\:max-w-xs{max-width:20rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[100px_1fr\]{grid-template-columns:100px 1fr}.sm\:grid-cols-\[140px_200px_1fr_auto\]{grid-template-columns:140px 200px 1fr auto}.sm\:grid-cols-\[160px_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:160px minmax(0,1fr) auto auto}.sm\:grid-cols-\[24px_52px_180px_minmax\(0\,1fr\)_44px\]{grid-template-columns:24px 52px 180px minmax(0,1fr) 44px}.sm\:grid-cols-\[minmax\(160px\,0\.7fr\)_minmax\(0\,1\.5fr\)_auto\]{grid-template-columns:minmax(160px,.7fr) minmax(0,1.5fr) auto}.sm\:grid-cols-\[minmax\(180px\,0\.7fr\)_minmax\(0\,1\.4fr\)_auto\]{grid-template-columns:minmax(180px,.7fr) minmax(0,1.4fr) auto}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:border-0{border-width:0px}.sm\:p-10{padding:2.5rem}.sm\:p-5{padding:1.25rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:pt-0{padding-top:0}.sm\:text-right{text-align:right}}@media(min-width:768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:min-h-\[360px\]{min-height:360px}.md\:w-44{width:11rem}.md\:w-72{width:18rem}.md\:w-auto{width:auto}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-\[minmax\(0\,1fr\)_150px_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,1fr) 150px minmax(0,1.4fr)}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:p-6{padding:1.5rem}}@media(min-width:1024px){.lg\:sticky{position:sticky}.lg\:top-2{top:.5rem}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:mb-3{margin-bottom:.75rem}.lg\:ml-\[248px\]{margin-left:248px}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-48{width:12rem}.lg\:w-full{width:100%}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.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\:grid-cols-\[1\.05fr_0\.95fr\]{grid-template-columns:1.05fr .95fr}.lg\:grid-cols-\[165px_80px_180px_minmax\(0\,1fr\)\]{grid-template-columns:165px 80px 180px minmax(0,1fr)}.lg\:grid-cols-\[180px_120px_minmax\(0\,1fr\)_44px\]{grid-template-columns:180px 120px minmax(0,1fr) 44px}.lg\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.lg\:grid-cols-\[220px_180px_minmax\(240px\,1fr\)_auto\]{grid-template-columns:220px 180px minmax(240px,1fr) auto}.lg\:grid-cols-\[356px_minmax\(0\,1fr\)\]{grid-template-columns:356px minmax(0,1fr)}.lg\:grid-cols-\[minmax\(180px\,0\.7fr\)_minmax\(0\,1\.4fr\)_auto\]{grid-template-columns:minmax(180px,.7fr) minmax(0,1.4fr) auto}.lg\:grid-cols-\[minmax\(220px\,1\.2fr\)_minmax\(260px\,1\.5fr\)_180px_auto\]{grid-template-columns:minmax(220px,1.2fr) minmax(260px,1.5fr) 180px auto}.lg\:grid-cols-\[minmax\(220px\,1fr\)_1fr_180px_auto\]{grid-template-columns:minmax(220px,1fr) 1fr 180px auto}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-center{align-items:center}.lg\:gap-0{gap:0px}.lg\:overflow-visible{overflow:visible}.lg\:border-b-0{border-bottom-width:0px}.lg\:border-r{border-right-width:1px}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media(min-width:1280px){.xl\:grid{display:grid}.xl\:min-w-\[1200px\]{min-width:1200px}.xl\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-\[340px_140px_260px_210px_110px\]{grid-template-columns:340px 140px 260px 210px 110px}.xl\:grid-cols-\[minmax\(0\,1\.35fr\)_minmax\(340px\,0\.65fr\)\]{grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr)}.xl\:grid-cols-\[minmax\(230px\,1fr\)_minmax\(360px\,1\.5fr\)_44px\]{grid-template-columns:minmax(230px,1fr) minmax(360px,1.5fr) 44px}.xl\:\!flex-row{flex-direction:row!important}.xl\:items-start{align-items:flex-start}.xl\:items-center{align-items:center}.xl\:items-stretch{align-items:stretch}.xl\:justify-end{justify-content:flex-end}.xl\:gap-0{gap:0px}.xl\:gap-1\.5{gap:.375rem}.xl\:border-0{border-width:0px}.xl\:px-0{padding-left:0;padding-right:0}.xl\:px-2{padding-left:.5rem;padding-right:.5rem}.xl\:pt-0{padding-top:0}.xl\:\[\&\>\*\:first-child\]\:\!flex-row>*:first-child{flex-direction:row!important}.xl\:\[\&\>\*\:first-child\]\:items-center>*:first-child{align-items:center}.xl\:\[\&\>\*\:last-child\]\:border-r-0>*:last-child{border-right-width:0px}.xl\:\[\&\>\*\]\:flex>*{display:flex}.xl\:\[\&\>\*\]\:min-w-0>*{min-width:0px}.xl\:\[\&\>\*\]\:flex-col>*{flex-direction:column}.xl\:\[\&\>\*\]\:justify-center>*{justify-content:center}.xl\:\[\&\>\*\]\:border-r>*{border-right-width:1px}.xl\:\[\&\>\*\]\:border-gray-200>*{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.xl\:\[\&\>\*\]\:px-4>*{padding-left:1rem;padding-right:1rem}.xl\:\[\&\>div\:last-child\]\:border-b-0>div:last-child{border-bottom-width:0px}.xl\:\[\&\>div\]\:border-b>div{border-bottom-width:1px}.xl\:\[\&\>div\]\:border-dashed>div{border-style:dashed}.xl\:\[\&\>div\]\:border-gray-200>div{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.xl\:\[\&\>div\]\:py-1\.5>div{padding-top:.375rem;padding-bottom:.375rem}}.\[\&\>span\:last-child\]\:border-r-0>span:last-child{border-right-width:0px}.\[\&\>span\:nth-child\(2\)\]\:px-2>span:nth-child(2){padding-left:.5rem;padding-right:.5rem}.\[\&\>span\]\:border-r>span{border-right-width:1px}.\[\&\>span\]\:border-gray-300>span{--tw-border-opacity: 1;border-color:rgb(var(--gray-300) / var(--tw-border-opacity, 1))}.\[\&\>span\]\:px-4>span{padding-left:1rem;padding-right:1rem}.\[\&\>span\]\:py-3>span{padding-top:.75rem;padding-bottom:.75rem} diff --git a/static/assets/index-CRJ6TC5_.css b/static/assets/index-CRJ6TC5_.css new file mode 100644 index 0000000..bcc6f9d --- /dev/null +++ b/static/assets/index-CRJ6TC5_.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--gray-200) / 1)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}input::placeholder,textarea::placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-x-3{left:.75rem;right:.75rem}.-bottom-1{bottom:-.25rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.bottom-0{bottom:0}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.bottom-8{bottom:2rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.left-4{left:1rem}.left-5{left:1.25rem}.right-0{right:0}.right-0\.5{right:.125rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-4{top:1rem}.top-8{top:2rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[10000\]{z-index:10000}.col-span-2{grid-column:span 2 / span 2}.m-3{margin:.75rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-ml-2{margin-left:-.5rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-44{height:11rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[280px\]{height:280px}.h-\[300px\]{height:300px}.h-\[340px\]{height:340px}.h-\[68px\]{height:68px}.h-\[76px\]{height:76px}.h-\[calc\(100vh-3\.5rem\)\]{height:calc(100vh - 3.5rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-\[220px\]{max-height:220px}.max-h-\[400px\]{max-height:400px}.max-h-\[460px\]{max-height:460px}.max-h-\[620px\]{max-height:620px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[92vh\]{max-height:92vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-11{min-height:2.75rem}.min-h-20{min-height:5rem}.min-h-24{min-height:6rem}.min-h-28{min-height:7rem}.min-h-36{min-height:9rem}.min-h-64{min-height:16rem}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[320px\]{min-height:320px}.min-h-\[42px\]{min-height:42px}.min-h-\[500px\]{min-height:500px}.min-h-\[560px\]{min-height:560px}.min-h-\[56px\]{min-height:56px}.min-h-\[84px\]{min-height:84px}.min-h-\[calc\(100vh-2rem\)\]{min-height:calc(100vh - 2rem)}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[10\%\]{width:10%}.w-\[11\%\]{width:11%}.w-\[12\%\]{width:12%}.w-\[13\%\]{width:13%}.w-\[15\%\]{width:15%}.w-\[16\%\]{width:16%}.w-\[17\%\]{width:17%}.w-\[18\%\]{width:18%}.w-\[18px\]{width:18px}.w-\[20\%\]{width:20%}.w-\[22\%\]{width:22%}.w-\[248px\]{width:248px}.w-\[25\%\]{width:25%}.w-\[44\%\]{width:44%}.w-\[6\%\]{width:6%}.w-\[min\(22rem\,calc\(100vw-3rem\)\)\]{width:min(22rem,calc(100vw - 3rem))}.w-\[min\(380px\,calc\(100vw-2rem\)\)\]{width:min(380px,calc(100vw - 2rem))}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-5{min-width:1.25rem}.min-w-\[1040px\]{min-width:1040px}.min-w-\[1100px\]{min-width:1100px}.min-w-\[760px\]{min-width:760px}.min-w-\[820px\]{min-width:820px}.min-w-\[860px\]{min-width:860px}.min-w-\[980px\]{min-width:980px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-52{max-width:13rem}.max-w-5xl{max-width:64rem}.max-w-72{max-width:18rem}.max-w-\[10rem\]{max-width:10rem}.max-w-\[1320px\]{max-width:1320px}.max-w-\[1600px\]{max-width:1600px}.max-w-\[220px\]{max-width:220px}.max-w-\[260px\]{max-width:260px}.max-w-\[380px\]{max-width:380px}.max-w-\[680px\]{max-width:680px}.max-w-\[76\%\]{max-width:76%}.max-w-\[86\%\]{max-width:86%}.max-w-\[980px\]{max-width:980px}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.scroll-mt-4{scroll-margin-top:1rem}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[340px_140px_260px_210px_110px\]{grid-template-columns:340px 140px 260px 210px 110px}.grid-cols-\[48px_minmax\(0\,1fr\)_auto\]{grid-template-columns:48px minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-2>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(2px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(2px * var(--tw-divide-y-reverse))}.divide-\[\#eeeeee\]>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(238 238 238 / var(--tw-divide-opacity, 1))}.divide-\[var\(--border\)\]>:not([hidden])~:not([hidden]){border-color:var(--border)}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(var(--gray-100) / var(--tw-divide-opacity, 1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-divide-opacity, 1))}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:8px}.rounded-2xl{border-radius:24px}.rounded-3xl{border-radius:32px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:10px}.rounded-none{border-radius:0}.rounded-xl{border-radius:20px}.rounded-b-md{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-dashed{border-style:dashed}.border-\[\#f5c800\]{--tw-border-opacity: 1;border-color:rgb(245 200 0 / var(--tw-border-opacity, 1))}.border-\[\#ffe100\]{--tw-border-opacity: 1;border-color:rgb(255 225 0 / var(--tw-border-opacity, 1))}.border-\[\#ffe566\]{--tw-border-opacity: 1;border-color:rgb(255 229 102 / var(--tw-border-opacity, 1))}.border-\[var\(--border\)\]{border-color:var(--border)}.border-\[var\(--border-light\)\]{border-color:var(--border-light)}.border-\[var\(--border-strong\)\]{border-color:var(--border-strong)}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-brand-200{--tw-border-opacity: 1;border-color:rgb(255 239 163 / var(--tw-border-opacity, 1))}.border-cyan-100{--tw-border-opacity: 1;border-color:rgb(207 250 254 / var(--tw-border-opacity, 1))}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity, 1))}.border-cyan-600{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(var(--gray-100) / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(var(--gray-300) / var(--tw-border-opacity, 1))}.border-gray-50{--tw-border-opacity: 1;border-color:rgb(var(--gray-50) / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-purple-500{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-violet-100{--tw-border-opacity: 1;border-color:rgb(237 233 254 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity, 1))}.bg-\[\#8fc7a8\]{--tw-bg-opacity: 1;background-color:rgb(143 199 168 / var(--tw-bg-opacity, 1))}.bg-\[\#b8ac8e\]{--tw-bg-opacity: 1;background-color:rgb(184 172 142 / var(--tw-bg-opacity, 1))}.bg-\[\#c9b8e8\]{--tw-bg-opacity: 1;background-color:rgb(201 184 232 / var(--tw-bg-opacity, 1))}.bg-\[\#e8a0a0\]{--tw-bg-opacity: 1;background-color:rgb(232 160 160 / var(--tw-bg-opacity, 1))}.bg-\[\#e8dcbc\]{--tw-bg-opacity: 1;background-color:rgb(232 220 188 / var(--tw-bg-opacity, 1))}.bg-\[\#eef4ff\]{--tw-bg-opacity: 1;background-color:rgb(238 244 255 / var(--tw-bg-opacity, 1))}.bg-\[\#f0f7f3\]{--tw-bg-opacity: 1;background-color:rgb(240 247 243 / var(--tw-bg-opacity, 1))}.bg-\[\#f5c800\]{--tw-bg-opacity: 1;background-color:rgb(245 200 0 / var(--tw-bg-opacity, 1))}.bg-\[\#f7f2fb\]{--tw-bg-opacity: 1;background-color:rgb(247 242 251 / var(--tw-bg-opacity, 1))}.bg-\[\#ff4400\]{--tw-bg-opacity: 1;background-color:rgb(255 68 0 / var(--tw-bg-opacity, 1))}.bg-\[\#ffd700\]{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.bg-\[\#ffe100\]{--tw-bg-opacity: 1;background-color:rgb(255 225 0 / var(--tw-bg-opacity, 1))}.bg-\[\#fff7e6\]{--tw-bg-opacity: 1;background-color:rgb(255 247 230 / var(--tw-bg-opacity, 1))}.bg-\[\#fff8d1\]{--tw-bg-opacity: 1;background-color:rgb(255 248 209 / var(--tw-bg-opacity, 1))}.bg-\[\#fffbe6\]{--tw-bg-opacity: 1;background-color:rgb(255 251 230 / var(--tw-bg-opacity, 1))}.bg-\[\#fffdf0\]{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.bg-\[var\(--app-bg\)\]{background-color:var(--app-bg)}.bg-\[var\(--brand\)\]{background-color:var(--brand)}.bg-\[var\(--brand-50\)\]{background-color:var(--brand-50)}.bg-\[var\(--surface\)\]{background-color:var(--surface)}.bg-\[var\(--surface-hover\)\]{background-color:var(--surface-hover)}.bg-\[var\(--surface-strong\)\]{background-color:var(--surface-strong)}.bg-\[var\(--surface-subtle\)\]{background-color:var(--surface-subtle)}.bg-\[var\(--unread-badge\)\]{background-color:var(--unread-badge)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black\/40{background-color:#0006}.bg-black\/55{background-color:#0000008c}.bg-black\/60{background-color:#0009}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-brand-50{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.bg-brand-500{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.bg-cyan-50{--tw-bg-opacity: 1;background-color:rgb(236 254 255 / var(--tw-bg-opacity, 1))}.bg-cyan-50\/40{background-color:#ecfeff66}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(var(--gray-200) / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(var(--gray-300) / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(var(--gray-50) / var(--tw-bg-opacity, 1))}.bg-gray-50\/60{background-color:rgb(var(--gray-50) / .6)}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-indigo-50\/70{background-color:#eef2ffb3}.bg-orange-300{--tw-bg-opacity: 1;background-color:rgb(253 186 116 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-violet-50{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/20{background-color:#fff3}.bg-white\/70{background-color:#ffffffb3}.bg-white\/95{background-color:#fffffff2}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.px-0{padding-left:0;padding-right:0}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-11{padding-right:2.75rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#2a2416\]{--tw-text-opacity: 1;color:rgb(42 36 22 / var(--tw-text-opacity, 1))}.text-\[\#3f5f8f\]{--tw-text-opacity: 1;color:rgb(63 95 143 / var(--tw-text-opacity, 1))}.text-\[\#3f7a5c\]{--tw-text-opacity: 1;color:rgb(63 122 92 / var(--tw-text-opacity, 1))}.text-\[\#544c39\]{--tw-text-opacity: 1;color:rgb(84 76 57 / var(--tw-text-opacity, 1))}.text-\[\#6b5200\]{--tw-text-opacity: 1;color:rgb(107 82 0 / var(--tw-text-opacity, 1))}.text-\[\#6b5a8a\]{--tw-text-opacity: 1;color:rgb(107 90 138 / var(--tw-text-opacity, 1))}.text-\[\#8a6300\]{--tw-text-opacity: 1;color:rgb(138 99 0 / var(--tw-text-opacity, 1))}.text-\[\#8c7900\]{--tw-text-opacity: 1;color:rgb(140 121 0 / var(--tw-text-opacity, 1))}.text-\[\#999\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity, 1))}.text-\[\#d6b600\]{--tw-text-opacity: 1;color:rgb(214 182 0 / var(--tw-text-opacity, 1))}.text-\[\#d92d20\]{--tw-text-opacity: 1;color:rgb(217 45 32 / var(--tw-text-opacity, 1))}.text-\[\#ff3b30\]{--tw-text-opacity: 1;color:rgb(255 59 48 / var(--tw-text-opacity, 1))}.text-\[\#ff4400\]{--tw-text-opacity: 1;color:rgb(255 68 0 / var(--tw-text-opacity, 1))}.text-\[var\(--brand-ink\)\]{color:var(--brand-ink)}.text-\[var\(--brand-primary\)\]{color:var(--brand-primary)}.text-\[var\(--brand-text\)\]{color:var(--brand-text)}.text-\[var\(--danger-ink\)\]{color:var(--danger-ink)}.text-\[var\(--text\)\]{color:var(--text)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-\[var\(--text-secondary\)\]{color:var(--text-secondary)}.text-\[var\(--text-soft\)\]{color:var(--text-soft)}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-brand-ink{--tw-text-opacity: 1;color:rgb(42 36 22 / var(--tw-text-opacity, 1))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-cyan-800{--tw-text-opacity: 1;color:rgb(21 94 117 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-700\/70{color:#047857b3}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-emerald-900\/80{color:#064e3bcc}.text-gray-400{--tw-text-opacity: 1;color:rgb(var(--gray-400) / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(var(--gray-500) / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(var(--gray-600) / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(var(--gray-700) / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(var(--gray-800) / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(var(--gray-900) / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-indigo-950{--tw-text-opacity: 1;color:rgb(30 27 75 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-violet-900{--tw-text-opacity: 1;color:rgb(76 29 149 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.accent-\[\#f5c400\]{accent-color:#f5c400}.accent-brand-500{accent-color:#FFD700}.accent-yellow-400{accent-color:#facc15}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_12px_40px_rgba\(20\,24\,28\,0\.24\)\]{--tw-shadow: 0 12px 40px rgba(20,24,28,.24);--tw-shadow-colored: 0 12px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_rgba\(20\,24\,28\,0\.10\)\]{--tw-shadow: 0 4px 16px rgba(20,24,28,.1);--tw-shadow-colored: 0 4px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--shadow-card\,0_8px_24px_rgba\(20\,24\,28\,0\.16\)\)\]{--tw-shadow: var(--shadow-card,0 8px 24px rgba(20,24,28,.16));--tw-shadow-colored: 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--shadow-brand\)\]{--tw-shadow-color: var(--shadow-brand);--tw-shadow: var(--tw-shadow-colored)}.shadow-\[var\(--shadow-sm\)\]{--tw-shadow-color: var(--shadow-sm);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(var(--gray-200) / var(--tw-ring-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}*{box-sizing:border-box;margin:0;padding:0}:root,:root[data-theme=light]{color-scheme:light;--app-bg: #f7f6f3;--surface: #ffffff;--surface-subtle: #faf9f7;--surface-strong: #f2f1ed;--surface-hover: #faf9f6;--border: #e9e7e2;--border-strong: #d6d3cc;--border-brand: #ffd400;--text: #23211e;--text-muted: #6b6862;--text-soft: #76716a;--gray-50: 250 250 248;--gray-100: 245 244 240;--gray-200: 235 233 227;--gray-300: 221 217 208;--gray-400: 118 113 106;--gray-500: 107 104 98;--gray-600: 102 98 92;--gray-700: 74 71 66;--gray-800: 51 48 44;--gray-900: 34 32 29;--brand-50: #fffdf0;--brand-100: #fff8d1;--brand-200: #ffefa3;--brand-300: #ffe566;--brand: #ffe100;--brand-hover: #ffd700;--brand-active: #f5c800;--brand-ink: #2a2416;--brand-soft: #fff9c9;--brand-text: #806d00;--selection-bg: #fb923c;--selection-ink: var(--brand-ink);--focus-ring: #806d00;--unread-badge: #dc2626;--danger: #b42318;--danger-ink: #b42318;--danger-soft: #fff0f0;--success: #0f704b;--success-ink: #0f704b;--success-soft: #eefaf3;--warning: #945800;--warning-ink: #945800;--warning-soft: #fff7e6;--info: #2a5f92;--info-ink: #2a5f92;--info-soft: #f0f7ff;--radius-xs: 8px;--radius: 10px;--radius-lg: 16px;--radius-xl: 20px;--radius-pill: 999px;--shadow-sm: 0 1px 2px rgba(35, 33, 30, .05);--shadow-md: 0 6px 20px rgba(35, 33, 30, .08);--shadow-lg: 0 16px 40px rgba(35, 33, 30, .12);--shadow-brand: 0 6px 18px rgba(255, 214, 0, .35);--chart-grid: #ebe9e3;--chart-cursor: rgba(35, 33, 30, .06);--scrollbar-thumb: #d6d3cc;--scrollbar-thumb-hover: #b9b4aa}:root[data-theme=dark]{color-scheme:dark;--app-bg: #11110f;--surface: #191916;--surface-subtle: #20201c;--surface-strong: #292820;--surface-hover: #302e27;--border: #37362f;--border-strong: #504c40;--border-brand: #d9bd19;--text: #f5f2e8;--text-muted: #c2bcae;--text-soft: #aaa59b;--gray-50: 32 32 28;--gray-100: 41 40 34;--gray-200: 56 53 45;--gray-300: 77 72 60;--gray-400: 170 165 155;--gray-500: 174 167 153;--gray-600: 194 188 174;--gray-700: 215 210 198;--gray-800: 234 230 220;--gray-900: 245 242 232;--brand-50: #292617;--brand-100: #373116;--brand-200: #4b4015;--brand-soft: #393216;--brand-text: #f2d85c;--focus-ring: #f2d85c;--danger: #ff8c8c;--danger-ink: #ffaaaa;--danger-soft: #3a1e1e;--success: #75d9a3;--success-ink: #8fe0b5;--success-soft: #173528;--warning: #ffd170;--warning-ink: #f3d77c;--warning-soft: #3a2d16;--info: #91c9ff;--info-ink: #9dccff;--info-soft: #182e45;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);--shadow-md: 0 10px 28px rgba(0, 0, 0, .32);--shadow-lg: 0 22px 60px rgba(0, 0, 0, .42);--shadow-brand: 0 7px 22px rgba(221, 187, 0, .18);--chart-grid: #403d36;--chart-cursor: rgba(255, 255, 255, .06);--scrollbar-thumb: #5b574e;--scrollbar-thumb-hover: #d2bd38}html,body,#root{height:100%;width:100%}html{background:var(--app-bg);scrollbar-color:var(--scrollbar-thumb) transparent}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;background-color:var(--app-bg);color:var(--text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}button,input,select,textarea{font:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}input:disabled,select:disabled,textarea:disabled,input[readonly]{color:var(--text-muted)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill,select:-webkit-autofill{-webkit-text-fill-color:var(--text);caret-color:var(--text);box-shadow:0 0 0 1000px var(--surface) inset;-webkit-transition:background-color 9999s ease-out 0s;transition:background-color 9999s ease-out 0s}.theme-picker{min-width:0;color:var(--text-muted)}.theme-picker__heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;padding:0 2px;font-size:11px;font-weight:700}.theme-picker__status{color:var(--text-soft);font-size:10px;font-weight:600}.theme-switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;border:1px solid var(--border);border-radius:12px;background:var(--surface-strong);padding:3px}.theme-switcher__option{display:inline-flex;min-width:0;min-height:36px;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:8px;color:var(--text-muted);font-size:11px;font-weight:650;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.theme-switcher__option:hover{background:var(--surface-hover);color:var(--text)}.theme-switcher__option--active,.theme-switcher__option--active:hover{border-color:var(--border-brand);background:var(--brand-soft);color:var(--brand-text);font-weight:750}.theme-picker--compact .theme-switcher{grid-template-columns:repeat(3,36px);border-radius:11px}.theme-picker--compact .theme-switcher__option{width:36px;min-height:36px}.media-light-surface{color-scheme:light;background:#fff!important;color:#23211e!important}:root[data-theme=dark] .media-light-surface .bg-white,:root[data-theme=dark] .media-light-surface [class~="bg-white/95"]{background-color:#fffffff5!important}:root[data-theme=dark] .media-light-surface .bg-gray-50,:root[data-theme=dark] .media-light-surface .bg-green-50{background-color:#fafaf8!important}:root[data-theme=dark] .media-light-surface .text-gray-500{color:#6b6862!important}:root[data-theme=dark] .media-light-surface .text-gray-800{color:#33302c!important}:root[data-theme=dark] .media-light-surface .text-green-700{color:#0f704b!important}:root[data-theme=dark] .media-light-surface .text-amber-800{color:#7a5100!important}:root[data-theme=dark] .media-light-surface .text-blue-600{color:#245f9d!important}:root[data-theme=dark] .media-light-surface .text-red-600{color:#c92a2a!important}:root[data-theme=dark] .bg-white{background-color:var(--surface)}:root[data-theme=dark] [class~="bg-white/95"]{background-color:#191916f5}:root[data-theme=dark] [class~="bg-white/90"],:root[data-theme=dark] [class~="bg-white/80"]{background-color:#191916e6}:root[data-theme=dark] [class~="bg-[#fffdf5]"]{background-color:var(--app-bg)}:root[data-theme=dark] [class~="bg-[#fff9e8]"],:root[data-theme=dark] [class~="bg-[#fffdf0]"],:root[data-theme=dark] [class~="bg-[#f5edd6]"]{background-color:var(--surface-strong)}:root[data-theme=dark] [class~="hover:bg-[#fff9e8]"]:hover,:root[data-theme=dark] [class~="hover:bg-[#fffdf5]"]:hover,:root[data-theme=dark] [class~="hover:bg-[#fffdf0]"]:hover{background-color:var(--surface-hover)}:root[data-theme=dark] [class~="disabled:bg-white"]:disabled{background-color:var(--surface)}:root[data-theme=dark] [class~="border-[#f0e6c8]"],:root[data-theme=dark] [class~="border-[#e6d69a]"]{border-color:var(--border)}:root[data-theme=dark] [class~="text-[#111]"],:root[data-theme=dark] [class~="text-[#333]"],:root[data-theme=dark] [class~="text-[#555]"],:root[data-theme=dark] [class~="text-[#666]"]{color:var(--text)}:root[data-theme=dark] [class~="text-[#777]"],:root[data-theme=dark] [class~="text-[#888]"]{color:var(--text-muted)}:root[data-theme=dark] [class~="text-[#999]"],:root[data-theme=dark] [class~="text-[#aaa]"],:root[data-theme=dark] [class~="text-[#a89e83]"],:root[data-theme=dark] [class~="text-[#b8ac8e]"],:root[data-theme=dark] [class~="text-[#d0d0d0]"]{color:var(--text-soft)}:root[data-theme=dark] [class~="text-[#8c7900]"],:root[data-theme=dark] [class~="text-[#8a6300]"],:root[data-theme=dark] [class~="text-[#6b5200]"],:root[data-theme=dark] [class~="text-[#d6b600]"]{color:var(--brand-text)}:root[data-theme=dark] [class~="hover:text-black"]:hover,:root[data-theme=dark] [class~="hover:text-[#111]"]:hover{color:var(--text)}:root[data-theme=dark] button .rounded-full.bg-white{background-color:#f4f1e8}:root[data-theme=dark] .bg-red-50,:root[data-theme=dark] .bg-red-100{background-color:var(--danger-soft)}:root[data-theme=dark] .border-red-200{border-color:#744040}:root[data-theme=dark] .text-red-500,:root[data-theme=dark] .text-red-600,:root[data-theme=dark] .text-red-700,:root[data-theme=dark] .text-red-800,:root[data-theme=dark] .text-red-900{color:#faa}:root[data-theme=dark] .bg-green-50,:root[data-theme=dark] .bg-green-100,:root[data-theme=dark] .bg-emerald-50{background-color:var(--success-soft)}:root[data-theme=dark] .border-green-200,:root[data-theme=dark] .border-emerald-200{border-color:#356b50}:root[data-theme=dark] .text-green-600,:root[data-theme=dark] .text-green-700,:root[data-theme=dark] .text-green-800,:root[data-theme=dark] .text-emerald-600,:root[data-theme=dark] .text-emerald-700,:root[data-theme=dark] .text-emerald-800{color:#8fe0b5}:root[data-theme=dark] .bg-blue-50,:root[data-theme=dark] .bg-blue-100{background-color:var(--info-soft)}:root[data-theme=dark] .border-blue-200{border-color:#3c638c}:root[data-theme=dark] .text-blue-500,:root[data-theme=dark] .text-blue-600,:root[data-theme=dark] .text-blue-700,:root[data-theme=dark] .text-blue-800,:root[data-theme=dark] .text-blue-900{color:#9dccff}:root[data-theme=dark] .bg-yellow-50,:root[data-theme=dark] .bg-yellow-100,:root[data-theme=dark] .bg-amber-50,:root[data-theme=dark] .bg-amber-100,:root[data-theme=dark] .bg-amber-200{background-color:var(--warning-soft)}:root[data-theme=dark] .border-amber-200{border-color:#755f2d}:root[data-theme=dark] .text-yellow-600,:root[data-theme=dark] .text-yellow-700,:root[data-theme=dark] .text-yellow-800,:root[data-theme=dark] .text-amber-500,:root[data-theme=dark] .text-amber-600,:root[data-theme=dark] .text-amber-700,:root[data-theme=dark] .text-amber-800,:root[data-theme=dark] .text-amber-900{color:#f3d77c}:root[data-theme=dark] [class~="bg-[#fff8d1]"]{background-color:#393216}:root[data-theme=dark] [class~="bg-[#eef4ff]"]{background-color:#1c2d45}:root[data-theme=dark] [class~="bg-[#f0f7f3]"]{background-color:#193126}:root[data-theme=dark] [class~="bg-[#f7f2fb]"]{background-color:#2c2438}:root[data-theme=dark] [class~="text-[#3f5f8f]"]{color:#aacbff}:root[data-theme=dark] [class~="text-[#3f7a5c]"]{color:#9bd9b5}:root[data-theme=dark] [class~="text-[#6b5a8a]"]{color:#d1baf2}:root[data-theme=dark] [class~="hover:bg-red-50"]:hover,:root[data-theme=dark] [class~="hover:bg-red-100"]:hover{background-color:var(--danger-soft)}:root[data-theme=dark] [class~="hover:bg-green-50"]:hover,:root[data-theme=dark] [class~="hover:bg-green-100"]:hover,:root[data-theme=dark] [class~="hover:bg-emerald-50"]:hover{background-color:var(--success-soft)}:root[data-theme=dark] [class~="hover:bg-blue-50"]:hover,:root[data-theme=dark] [class~="hover:bg-blue-100"]:hover{background-color:var(--info-soft)}:root[data-theme=dark] [class~="hover:bg-yellow-50"]:hover,:root[data-theme=dark] [class~="hover:bg-yellow-100"]:hover,:root[data-theme=dark] [class~="hover:bg-amber-50"]:hover,:root[data-theme=dark] [class~="hover:bg-amber-100"]:hover{background-color:var(--warning-soft)}:root[data-theme=dark] [class~="hover:bg-black/5"]:hover{background-color:#ffffff14}:root[data-theme=dark] [class~="hover:text-red-600"]:hover,:root[data-theme=dark] [class~="hover:text-red-700"]:hover{color:#faa}:root[data-theme=dark] [class~="hover:text-green-600"]:hover,:root[data-theme=dark] [class~="hover:text-green-700"]:hover,:root[data-theme=dark] [class~="hover:text-emerald-600"]:hover{color:#8fe0b5}:root[data-theme=dark] [class~="hover:text-blue-600"]:hover,:root[data-theme=dark] [class~="hover:text-blue-700"]:hover{color:#9dccff}:root[data-theme=dark] [class~="hover:text-amber-600"]:hover,:root[data-theme=dark] [class~="hover:text-amber-700"]:hover{color:#f3d77c}:root[data-theme=dark] [class~="hover:bg-pink-50"]:hover,:root[data-theme=dark] [class~="hover:bg-pink-100"]:hover{background-color:var(--danger-soft)}:root[data-theme=dark] [class~="hover:text-pink-600"]:hover,:root[data-theme=dark] [class~="hover:text-pink-700"]:hover,:root[data-theme=dark] [class~="hover:text-yellow-600"]:hover{color:var(--warning-ink)}:root[data-theme=dark] [class~="hover:bg-amber-200"]:hover{background-color:var(--warning-soft)}:root[data-theme=dark] .theme-brand-panel [class~="text-[#8a6300]"]{color:#8a6300}:root[data-theme=dark] .theme-brand-panel [class~="text-[#6b5200]"]{color:#6b5200}:root[data-theme=dark] .page-tab:not(.page-tab--active) .page-tab__count{background:#ffffff14}.recharts-pie-label-text,.recharts-text{fill:var(--text-muted)}:root[data-theme=dark] .modal-overlay,:root[data-theme=dark] .modal-overlay-centered{background-color:#000000ad}.page-stack{display:flex;flex-direction:column;gap:20px}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;min-height:62px;padding-bottom:16px;border-bottom:1px solid var(--border)}.page-header__identity{display:flex;min-width:0;align-items:flex-start;gap:12px}.page-header__icon{display:inline-flex;width:42px;height:42px;flex:0 0 42px;align-items:center;justify-content:center;border-radius:var(--radius-lg);background:linear-gradient(140deg,var(--brand-300),var(--brand));color:var(--brand-ink);box-shadow:var(--shadow-brand)}.page-title{color:var(--text);font-size:24px;font-weight:750;line-height:1.25}.page-description{margin-top:5px;max-width:760px;color:var(--text-muted);font-size:13px;line-height:1.6}.page-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.page-tabs{display:inline-flex;max-width:100%;gap:4px;overflow-x:auto;border-radius:var(--radius-pill);background:var(--surface-strong);padding:4px;scrollbar-width:none;-ms-overflow-style:none}.page-tabs::-webkit-scrollbar{display:none}.page-tab{display:inline-flex;min-height:38px;flex:0 0 auto;align-items:center;justify-content:center;gap:7px;border-radius:var(--radius-pill);padding:8px 16px;color:var(--text-muted);font-size:13px;font-weight:650;line-height:1.2;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}.page-tab:hover{background:var(--surface);color:var(--text)}.page-tab--active{background:var(--brand);color:var(--brand-ink);box-shadow:var(--shadow-brand)}.page-tab--active:hover{background:var(--brand)}.page-tab__count{min-width:20px;border-radius:var(--radius-pill);background:#ffffff8c;padding:2px 7px;color:inherit;font-size:11px;font-weight:700;text-align:center}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:14px;box-shadow:var(--shadow-sm)}.toolbar__group{display:flex;min-width:0;flex-wrap:wrap;align-items:center;gap:8px}.section-panel{overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--surface);box-shadow:var(--shadow-sm)}.section-panel__header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px;border-bottom:1px solid var(--border);padding:14px 18px}.section-header__icon{display:inline-flex;width:34px;height:34px;flex:0 0 34px;align-items:center;justify-content:center;border-radius:var(--radius);background:var(--surface-strong);color:var(--text-muted)}.section-header__actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.section-title{color:var(--text);font-size:15px;font-weight:700}.section-description{margin-top:3px;color:var(--text-muted);font-size:12px;line-height:1.5}.notice-banner{display:flex;min-height:46px;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--radius-lg);padding:11px 14px;font-size:13px;font-weight:600;line-height:1.5}.notice-banner button{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;border-radius:var(--radius-pill);padding:5px}.notice-banner--success{border-color:color-mix(in srgb,var(--success) 38%,var(--border));background:var(--success-soft);color:var(--success-ink)}.notice-banner--error{border-color:color-mix(in srgb,var(--danger) 38%,var(--border));background:var(--danger-soft);color:var(--danger-ink)}.notice-banner--warning{border-color:var(--border-strong);background:var(--warning-soft);color:var(--warning-ink)}.notice-banner--info{border-color:color-mix(in srgb,var(--info) 38%,var(--border));background:var(--info-soft);color:var(--info-ink)}.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.metric-card{min-width:0;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:18px;box-shadow:var(--shadow-sm);transition:box-shadow .16s ease,transform .16s ease}.metric-card:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}.metric-card__label{color:var(--text-muted);font-size:12px;font-weight:650}.metric-card__value{margin-top:7px;color:var(--text);font-size:24px;font-weight:750;line-height:1.2}.metric-card__meta{margin-top:6px;color:var(--text-soft);font-size:11px;line-height:1.5}.metric-grid--compact{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.metric-grid--compact .metric-card{padding:10px 12px;border-radius:var(--radius-md)}.metric-grid--compact .metric-card__label{font-size:11px}.metric-grid--compact .metric-card__value{margin-top:2px;font-size:20px}.metric-grid--compact .metric-card__meta{margin-top:1px;font-size:10px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}.field-label{display:block;margin-bottom:6px;color:var(--text-muted);font-size:12px;font-weight:700}.empty-state{display:flex;min-height:260px;flex-direction:column;align-items:center;justify-content:center;border:1px dashed var(--border-strong);border-radius:var(--radius-xl);background:var(--surface);padding:32px;text-align:center}.empty-state--compact{min-height:160px}.empty-state__icon{display:inline-flex;width:52px;height:52px;align-items:center;justify-content:center;border-radius:var(--radius-lg);background:var(--surface-strong);color:var(--text-soft)}.empty-state h3{margin-top:14px;color:var(--text);font-size:15px;font-weight:700}.empty-state p{margin-top:5px;max-width:520px;color:var(--text-muted);font-size:13px;line-height:1.6}.page-loading{display:flex;min-height:260px;align-items:center;justify-content:center;gap:9px;color:var(--text-muted);font-size:13px;font-weight:600}.ios-card{background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);box-shadow:var(--shadow-sm);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}.ios-card:hover{border-color:var(--border-brand);box-shadow:var(--shadow-md)}.ios-input{min-height:42px;background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius);color:var(--text);font-weight:500;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ios-input:hover:not(:disabled):not(:focus){border-color:var(--border-brand)}.ios-input:focus{background:var(--surface);border-color:var(--focus-ring);box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-ring) 28%,transparent);outline:none}.ios-input::-moz-placeholder{color:var(--text-soft);font-weight:400}.ios-input::placeholder{color:var(--text-soft);font-weight:400}.ios-input:disabled,.ios-input[readonly]{border-color:var(--border);background:var(--surface-strong);color:var(--text-muted);cursor:not-allowed}.ios-btn-primary{min-height:42px;border-radius:var(--radius-pill);background:var(--brand);color:var(--brand-ink);font-weight:700;border:none;box-shadow:var(--shadow-brand);transition:background-color .15s ease,box-shadow .15s ease,transform .1s ease;cursor:pointer}.ios-btn-primary:hover:not(:disabled){background:var(--brand-hover);box-shadow:0 8px 22px #ffd60073}.ios-btn-primary:active:not(:disabled){background:var(--brand-active);transform:translateY(1px);box-shadow:var(--shadow-sm)}.ios-btn-primary:disabled{background:var(--surface-strong);color:var(--text-soft);box-shadow:none;cursor:not-allowed}.ios-btn-secondary{min-height:42px;border-radius:var(--radius-pill);background:var(--surface);color:var(--text);font-weight:600;border:1px solid var(--border-strong);transition:background-color .15s ease,border-color .15s ease;cursor:pointer}.ios-btn-secondary:hover:not(:disabled){background:var(--surface-hover);border-color:var(--brand)}.ios-btn-secondary:disabled{color:var(--text-soft);cursor:not-allowed}.ios-btn-danger{min-height:42px;border-radius:var(--radius-pill);background:var(--danger-soft);color:var(--danger);font-weight:600;border:1px solid color-mix(in srgb,var(--danger) 38%,var(--border));transition:background-color .15s ease,border-color .15s ease;cursor:pointer}.ios-btn-danger:hover:not(:disabled){background:color-mix(in srgb,var(--danger-soft) 82%,var(--danger));border-color:color-mix(in srgb,var(--danger) 62%,var(--border))}.data-table{width:100%;border-collapse:collapse;text-align:left}.data-table thead{background:var(--surface-subtle);color:var(--text-muted);font-size:11px;font-weight:700}.data-table th{height:46px;padding:0 16px;border-bottom:1px solid var(--border);letter-spacing:0}.data-table td{padding:13px 16px;border-bottom:1px solid var(--border);vertical-align:middle}.data-table tbody tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:var(--surface-hover)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:var(--radius-pill)}::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}aside nav::-webkit-scrollbar{width:4px}aside nav::-webkit-scrollbar-thumb{background:transparent}aside nav:hover::-webkit-scrollbar-thumb{background:var(--border-strong)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fadeIn .18s ease-out forwards}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}::-moz-selection{background:var(--brand);color:#000}::selection{background:var(--brand);color:#000}.chat-self-bubble ::-moz-selection{background:var(--selection-bg);color:var(--selection-ink)}.chat-self-bubble ::selection{background:var(--selection-bg);color:var(--selection-ink)}.text-brand{color:#8c7900}.bg-brand{background-color:var(--brand)}.border-brand{border-color:var(--brand)}.status-badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:var(--radius-pill);font-size:12px;font-weight:650}.status-badge-success{background-color:var(--success-soft);color:var(--success-ink)}.status-badge-warning{background-color:var(--brand-100);color:var(--warning-ink)}.status-badge-error{background-color:var(--danger-soft);color:var(--danger-ink)}.status-badge-info{background-color:var(--surface-strong);color:var(--text-muted)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;align-items:center;justify-content:center;background-color:#0006;padding:1rem;overflow-y:auto}.modal-container{position:relative;width:100%;max-width:42rem;max-height:85vh;margin:auto;display:flex;flex-direction:column;background-color:var(--surface);color:var(--text);border-radius:var(--radius-xl);border:1px solid var(--border);box-shadow:var(--shadow-lg);overflow:hidden}.modal-header{flex-shrink:0;padding:20px 22px;border-bottom:1px solid var(--border);background:var(--surface-subtle);z-index:10}.modal-body{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:22px;color:var(--text)}.modal-footer{flex-shrink:0;padding:16px 22px;border-top:1px solid var(--border);background:var(--surface-subtle);z-index:10}.modal-container-lg{max-width:64rem}.modal-overlay-centered{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;justify-content:center;background-color:#0006;padding:1rem;overflow-y:auto}@media(max-width:1023px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-grid--compact{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:639px){.page-stack{gap:16px}.page-header{min-height:0;align-items:flex-start;padding-bottom:14px}.page-header__icon{width:34px;height:34px;flex-basis:34px}.page-title{font-size:20px}.page-actions{width:100%;justify-content:stretch}.page-actions>*{flex:1 1 auto}.toolbar{align-items:stretch}.toolbar,.toolbar__group{flex-direction:column}.toolbar__group>input,.toolbar__group>select,.toolbar__group>button{width:100%}.section-panel__header{flex-direction:column;align-items:flex-start}.section-header__actions{width:100%;justify-content:stretch}.section-header__actions>*{flex:1 1 auto;justify-content:center}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-grid--compact{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-card{padding:12px 14px}.metric-card__label{font-size:11px}.metric-card__value,.metric-grid--compact .metric-card__value{font-size:18px}}.modal-overlay-centered .modal-container{position:relative;width:100%;max-width:42rem;max-height:85vh;margin:auto 0;display:flex;flex-direction:column;background-color:var(--surface);color:var(--text);border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow-md);overflow:hidden}@media(max-width:768px){.page-stack{gap:16px}.page-header{min-height:0;flex-direction:column;align-items:stretch;gap:12px;padding-bottom:14px}.page-title{font-size:21px}.page-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));justify-content:stretch}.page-actions>*{min-width:0}.toolbar{flex-direction:column;align-items:stretch}.toolbar__group{display:grid;grid-template-columns:1fr}.page-tabs{display:grid;width:100%;grid-auto-flow:column;grid-auto-columns:minmax(128px,1fr)}.page-tab{min-width:0;white-space:normal}.responsive-data-table{min-width:0!important}.responsive-data-table,.responsive-data-table tbody,.responsive-data-table tr,.responsive-data-table td{display:block;width:100%}.responsive-data-table thead{display:none}.responsive-data-table tbody tr{border-bottom:1px solid var(--border);padding:12px 16px}.responsive-data-table tbody tr:last-child{border-bottom:0}.responsive-data-table td{display:grid;grid-template-columns:minmax(82px,30%) minmax(0,1fr);align-items:center;gap:12px;border:0;padding:7px 0;text-align:left}.responsive-data-table td:before{content:attr(data-label);color:var(--text-muted);font-size:11px;font-weight:700}.responsive-data-table td>*{min-width:0}.responsive-data-table td[data-label=订单信息],.responsive-data-table td[data-label=卡密名称]{align-items:start}.responsive-data-table td[data-label=操作]>div{flex-wrap:wrap;justify-content:flex-start}.responsive-data-table td>.status-badge{justify-self:start}.ios-card{border-radius:var(--radius)}.ios-input{font-size:16px}.modal-container{max-width:calc(100% - 2rem);max-height:90vh;border-radius:var(--radius)}.modal-header,.modal-body,.modal-footer{padding-left:1.5rem;padding-right:1.5rem}}.marquee{overflow:hidden}.marquee__track{display:inline-flex;align-items:center;white-space:nowrap;will-change:transform;animation:marquee-scroll 40s linear infinite}.marquee:hover .marquee__track{animation-play-state:paused}@keyframes marquee-scroll{0%{transform:translate(0)}to{transform:translate(-50%)}}@media(prefers-reduced-motion:reduce){.marquee__track{animation:none}.marquee{overflow-x:auto}}.placeholder\:text-\[var\(--text-soft\)\]::-moz-placeholder{color:var(--text-soft)}.placeholder\:text-\[var\(--text-soft\)\]::placeholder{color:var(--text-soft)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-1\.5:after{content:var(--tw-content);top:-.375rem;right:-.375rem;bottom:-.375rem;left:-.375rem}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.last\:mb-0:last-child{margin-bottom:0}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:border-\[var\(--border-strong\)\]:hover{border-color:var(--border-strong)}.hover\:border-amber-400:hover{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(var(--gray-400) / var(--tw-border-opacity, 1))}.hover\:border-purple-400:hover{--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#ff4400\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 68 0 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#ffd700\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 215 0 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#fffdf0\]:hover{--tw-bg-opacity: 1;background-color:rgb(255 253 240 / var(--tw-bg-opacity, 1))}.hover\:bg-\[var\(--brand-hover\)\]:hover{background-color:var(--brand-hover)}.hover\:bg-\[var\(--danger-soft\)\]:hover{background-color:var(--danger-soft)}.hover\:bg-\[var\(--surface-hover\)\]:hover{background-color:var(--surface-hover)}.hover\:bg-amber-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-200:hover{--tw-bg-opacity: 1;background-color:rgb(253 230 138 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.hover\:bg-black\/5:hover{background-color:#0000000d}.hover\:bg-black\/80:hover{background-color:#000c}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-600:hover{--tw-bg-opacity: 1;background-color:rgb(245 200 0 / var(--tw-bg-opacity, 1))}.hover\:bg-cyan-100:hover{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-200) / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(var(--gray-50) / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\:bg-pink-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 242 248 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-violet-100:hover{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/40:hover{background-color:#fff6}.hover\:bg-yellow-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.hover\:text-\[\#ff4400\]:hover{--tw-text-opacity: 1;color:rgb(255 68 0 / var(--tw-text-opacity, 1))}.hover\:text-\[var\(--danger\)\]:hover{color:var(--danger)}.hover\:text-\[var\(--text\)\]:hover{color:var(--text)}.hover\:text-amber-600:hover{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.hover\:text-amber-700:hover{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(var(--gray-600) / var(--tw-text-opacity, 1))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(var(--gray-800) / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(var(--gray-900) / var(--tw-text-opacity, 1))}.hover\:text-green-700:hover{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.hover\:text-pink-600:hover{--tw-text-opacity: 1;color:rgb(219 39 119 / var(--tw-text-opacity, 1))}.hover\:text-purple-500:hover{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-\[\#ffe100\]:focus{--tw-border-opacity: 1;border-color:rgb(255 225 0 / var(--tw-border-opacity, 1))}.focus\:border-\[var\(--brand\)\]:focus{border-color:var(--brand)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[var\(--brand\)\]:focus{--tw-ring-color: var(--brand)}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-\[var\(--focus-ring\)\]:focus-visible{outline-color:var(--focus-ring)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:bg-\[var\(--surface\)\]:disabled{background-color:var(--surface)}.disabled\:bg-\[var\(--surface-strong\)\]:disabled{background-color:var(--surface-strong)}.disabled\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(var(--gray-100) / var(--tw-bg-opacity, 1))}.disabled\:text-\[var\(--text-soft\)\]:disabled{color:var(--text-soft)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}.group:focus-within .group-focus-within\:text-\[\#ffe100\]{--tw-text-opacity: 1;color:rgb(255 225 0 / var(--tw-text-opacity, 1))}.group:focus-within .group-focus-within\:text-gray-700{--tw-text-opacity: 1;color:rgb(var(--gray-700) / var(--tw-text-opacity, 1))}.group:hover .group-hover\:flex{display:flex}.group:hover .group-hover\:text-\[var\(--text-muted\)\]{color:var(--text-muted)}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media(prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}.dark\:border-amber-500\/20:is(.dark *){border-color:#f59e0b33}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:bg-amber-500\/10:is(.dark *){background-color:#f59e0b1a}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:from-amber-950\/20:is(.dark *){--tw-gradient-from: rgb(69 26 3 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(69 26 3 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-\[var\(--surface\)\]:is(.dark *){--tw-gradient-to: var(--surface) var(--tw-gradient-to-position)}.dark\:text-amber-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-slate-700\/60:hover:is(.dark *){background-color:#33415599}@media(min-width:640px){.sm\:right-6{right:1.5rem}.sm\:top-6{top:1.5rem}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:inline-flex{display:inline-flex}.sm\:h-16{height:4rem}.sm\:min-h-\[72px\]{min-height:72px}.sm\:min-h-\[92px\]{min-height:92px}.sm\:min-h-\[calc\(100vh-3rem\)\]{min-height:calc(100vh - 3rem)}.sm\:w-16{width:4rem}.sm\:w-64{width:16rem}.sm\:w-72{width:18rem}.sm\:w-auto{width:auto}.sm\:min-w-40{min-width:10rem}.sm\:min-w-44{min-width:11rem}.sm\:min-w-52{min-width:13rem}.sm\:min-w-56{min-width:14rem}.sm\:min-w-64{min-width:16rem}.sm\:min-w-72{min-width:18rem}.sm\:max-w-xs{max-width:20rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[100px_1fr\]{grid-template-columns:100px 1fr}.sm\:grid-cols-\[140px_200px_1fr_auto\]{grid-template-columns:140px 200px 1fr auto}.sm\:grid-cols-\[160px_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:160px minmax(0,1fr) auto auto}.sm\:grid-cols-\[24px_52px_180px_minmax\(0\,1fr\)_44px\]{grid-template-columns:24px 52px 180px minmax(0,1fr) 44px}.sm\:grid-cols-\[minmax\(160px\,0\.7fr\)_minmax\(0\,1\.5fr\)_auto\]{grid-template-columns:minmax(160px,.7fr) minmax(0,1.5fr) auto}.sm\:grid-cols-\[minmax\(180px\,0\.7fr\)_minmax\(0\,1\.4fr\)_auto\]{grid-template-columns:minmax(180px,.7fr) minmax(0,1.4fr) auto}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:border-0{border-width:0px}.sm\:p-10{padding:2.5rem}.sm\:p-5{padding:1.25rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:pt-0{padding-top:0}.sm\:text-right{text-align:right}}@media(min-width:768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:min-h-\[360px\]{min-height:360px}.md\:w-44{width:11rem}.md\:w-72{width:18rem}.md\:w-auto{width:auto}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-\[minmax\(0\,1fr\)_150px_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,1fr) 150px minmax(0,1.4fr)}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:p-6{padding:1.5rem}}@media(min-width:1024px){.lg\:sticky{position:sticky}.lg\:top-2{top:.5rem}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:mb-3{margin-bottom:.75rem}.lg\:ml-\[248px\]{margin-left:248px}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-48{width:12rem}.lg\:w-full{width:100%}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.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\:grid-cols-\[1\.05fr_0\.95fr\]{grid-template-columns:1.05fr .95fr}.lg\:grid-cols-\[165px_80px_180px_minmax\(0\,1fr\)\]{grid-template-columns:165px 80px 180px minmax(0,1fr)}.lg\:grid-cols-\[180px_120px_minmax\(0\,1fr\)_44px\]{grid-template-columns:180px 120px minmax(0,1fr) 44px}.lg\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.lg\:grid-cols-\[220px_180px_minmax\(240px\,1fr\)_auto\]{grid-template-columns:220px 180px minmax(240px,1fr) auto}.lg\:grid-cols-\[356px_minmax\(0\,1fr\)\]{grid-template-columns:356px minmax(0,1fr)}.lg\:grid-cols-\[minmax\(180px\,0\.7fr\)_minmax\(0\,1\.4fr\)_auto\]{grid-template-columns:minmax(180px,.7fr) minmax(0,1.4fr) auto}.lg\:grid-cols-\[minmax\(220px\,1\.2fr\)_minmax\(260px\,1\.5fr\)_180px_auto\]{grid-template-columns:minmax(220px,1.2fr) minmax(260px,1.5fr) 180px auto}.lg\:grid-cols-\[minmax\(220px\,1fr\)_1fr_180px_auto\]{grid-template-columns:minmax(220px,1fr) 1fr 180px auto}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-center{align-items:center}.lg\:gap-0{gap:0px}.lg\:overflow-visible{overflow:visible}.lg\:border-b-0{border-bottom-width:0px}.lg\:border-r{border-right-width:1px}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media(min-width:1280px){.xl\:grid{display:grid}.xl\:min-w-\[1200px\]{min-width:1200px}.xl\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-\[340px_140px_260px_210px_110px\]{grid-template-columns:340px 140px 260px 210px 110px}.xl\:grid-cols-\[minmax\(0\,1\.35fr\)_minmax\(340px\,0\.65fr\)\]{grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr)}.xl\:grid-cols-\[minmax\(230px\,1fr\)_minmax\(360px\,1\.5fr\)_44px\]{grid-template-columns:minmax(230px,1fr) minmax(360px,1.5fr) 44px}.xl\:\!flex-row{flex-direction:row!important}.xl\:items-start{align-items:flex-start}.xl\:items-center{align-items:center}.xl\:items-stretch{align-items:stretch}.xl\:justify-end{justify-content:flex-end}.xl\:gap-0{gap:0px}.xl\:gap-1\.5{gap:.375rem}.xl\:border-0{border-width:0px}.xl\:px-0{padding-left:0;padding-right:0}.xl\:px-2{padding-left:.5rem;padding-right:.5rem}.xl\:pt-0{padding-top:0}.xl\:\[\&\>\*\:first-child\]\:\!flex-row>*:first-child{flex-direction:row!important}.xl\:\[\&\>\*\:first-child\]\:items-center>*:first-child{align-items:center}.xl\:\[\&\>\*\:last-child\]\:border-r-0>*:last-child{border-right-width:0px}.xl\:\[\&\>\*\]\:flex>*{display:flex}.xl\:\[\&\>\*\]\:min-w-0>*{min-width:0px}.xl\:\[\&\>\*\]\:flex-col>*{flex-direction:column}.xl\:\[\&\>\*\]\:justify-center>*{justify-content:center}.xl\:\[\&\>\*\]\:border-r>*{border-right-width:1px}.xl\:\[\&\>\*\]\:border-gray-200>*{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.xl\:\[\&\>\*\]\:px-4>*{padding-left:1rem;padding-right:1rem}.xl\:\[\&\>div\:last-child\]\:border-b-0>div:last-child{border-bottom-width:0px}.xl\:\[\&\>div\]\:border-b>div{border-bottom-width:1px}.xl\:\[\&\>div\]\:border-dashed>div{border-style:dashed}.xl\:\[\&\>div\]\:border-gray-200>div{--tw-border-opacity: 1;border-color:rgb(var(--gray-200) / var(--tw-border-opacity, 1))}.xl\:\[\&\>div\]\:py-1\.5>div{padding-top:.375rem;padding-bottom:.375rem}}.\[\&\>span\:last-child\]\:border-r-0>span:last-child{border-right-width:0px}.\[\&\>span\:nth-child\(2\)\]\:px-2>span:nth-child(2){padding-left:.5rem;padding-right:.5rem}.\[\&\>span\]\:border-r>span{border-right-width:1px}.\[\&\>span\]\:border-gray-300>span{--tw-border-opacity: 1;border-color:rgb(var(--gray-300) / var(--tw-border-opacity, 1))}.\[\&\>span\]\:px-4>span{padding-left:1rem;padding-right:1rem}.\[\&\>span\]\:py-3>span{padding-top:.75rem;padding-bottom:.75rem} diff --git a/static/assets/key-DAHJOHIR.js b/static/assets/key-C0msAg8e.js similarity index 90% rename from static/assets/key-DAHJOHIR.js rename to static/assets/key-C0msAg8e.js index 0e7cf6a..5aa55d6 100644 --- a/static/assets/key-DAHJOHIR.js +++ b/static/assets/key-C0msAg8e.js @@ -1,4 +1,4 @@ -import{c}from"./index-BCb9Ylky.js";/** +import{c}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/link-2-DIsiJoFB.js b/static/assets/link-2-CTuWzTfU.js similarity index 89% rename from static/assets/link-2-DIsiJoFB.js rename to static/assets/link-2-CTuWzTfU.js index 711ccd4..77417d3 100644 --- a/static/assets/link-2-DIsiJoFB.js +++ b/static/assets/link-2-CTuWzTfU.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/message-square-text-BMJDYICF.js b/static/assets/message-square-text-Bnj1FXzX.js similarity index 91% rename from static/assets/message-square-text-BMJDYICF.js rename to static/assets/message-square-text-Bnj1FXzX.js index 38feb4e..3528ee1 100644 --- a/static/assets/message-square-text-BMJDYICF.js +++ b/static/assets/message-square-text-Bnj1FXzX.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/package-CbDV2ANe.js b/static/assets/package-CDIx-vGO.js similarity index 91% rename from static/assets/package-CbDV2ANe.js rename to static/assets/package-CDIx-vGO.js index dded81e..b02e748 100644 --- a/static/assets/package-CbDV2ANe.js +++ b/static/assets/package-CDIx-vGO.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCb9Ylky.js";/** +import{c as a}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/package-check-CEUjK1hJ.js b/static/assets/package-check-BKkFNxd0.js similarity index 92% rename from static/assets/package-check-CEUjK1hJ.js rename to static/assets/package-check-BKkFNxd0.js index 1d6ee8e..367867c 100644 --- a/static/assets/package-check-CEUjK1hJ.js +++ b/static/assets/package-check-BKkFNxd0.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/pen-line-CudbazBc.js b/static/assets/pen-line-CmEoWNKp.js similarity index 90% rename from static/assets/pen-line-CudbazBc.js rename to static/assets/pen-line-CmEoWNKp.js index 911a0f7..349c67f 100644 --- a/static/assets/pen-line-CudbazBc.js +++ b/static/assets/pen-line-CmEoWNKp.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/play-IOsY5Rdt.js b/static/assets/play-P9T6ppIo.js similarity index 87% rename from static/assets/play-IOsY5Rdt.js rename to static/assets/play-P9T6ppIo.js index 52f0d7a..68a2c3d 100644 --- a/static/assets/play-IOsY5Rdt.js +++ b/static/assets/play-P9T6ppIo.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCb9Ylky.js";/** +import{c as a}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/plus-DVdQwMrj.js b/static/assets/plus-BljRK6L8.js similarity index 86% rename from static/assets/plus-DVdQwMrj.js rename to static/assets/plus-BljRK6L8.js index 1e7798c..05ac9d6 100644 --- a/static/assets/plus-DVdQwMrj.js +++ b/static/assets/plus-BljRK6L8.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/power-D2SYbVC-.js b/static/assets/power-D9WTjX12.js similarity index 93% rename from static/assets/power-D2SYbVC-.js rename to static/assets/power-D9WTjX12.js index 7f3f6cb..123f491 100644 --- a/static/assets/power-D2SYbVC-.js +++ b/static/assets/power-D9WTjX12.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-BCb9Ylky.js";/** +import{c as o}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/power-off-D3lAodJa.js b/static/assets/power-off-NLH-bTqs.js similarity index 90% rename from static/assets/power-off-D3lAodJa.js rename to static/assets/power-off-NLH-bTqs.js index 06ddc28..a560159 100644 --- a/static/assets/power-off-D3lAodJa.js +++ b/static/assets/power-off-NLH-bTqs.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-BCb9Ylky.js";/** +import{c as o}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/save-cq1qPfv2.js b/static/assets/save-Dxf2dvgb.js similarity index 91% rename from static/assets/save-cq1qPfv2.js rename to static/assets/save-Dxf2dvgb.js index 452f6d0..cb1aa30 100644 --- a/static/assets/save-cq1qPfv2.js +++ b/static/assets/save-Dxf2dvgb.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCb9Ylky.js";/** +import{c as a}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/search-DAVBnJPC.js b/static/assets/search-FaxHcuoK.js similarity index 88% rename from static/assets/search-DAVBnJPC.js rename to static/assets/search-FaxHcuoK.js index e63c06f..539f224 100644 --- a/static/assets/search-DAVBnJPC.js +++ b/static/assets/search-FaxHcuoK.js @@ -1,4 +1,4 @@ -import{c}from"./index-BCb9Ylky.js";/** +import{c}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/send-CYAobdMm.js b/static/assets/send-BjFPcqyQ.js similarity index 90% rename from static/assets/send-CYAobdMm.js rename to static/assets/send-BjFPcqyQ.js index 0e69408..ef1d9df 100644 --- a/static/assets/send-CYAobdMm.js +++ b/static/assets/send-BjFPcqyQ.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCb9Ylky.js";/** +import{c as a}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/settings-2-BanKKh4_.js b/static/assets/settings-2-CRN1TI2k.js similarity index 90% rename from static/assets/settings-2-BanKKh4_.js rename to static/assets/settings-2-CRN1TI2k.js index c81ad0b..8d21072 100644 --- a/static/assets/settings-2-BanKKh4_.js +++ b/static/assets/settings-2-CRN1TI2k.js @@ -1,4 +1,4 @@ -import{c}from"./index-BCb9Ylky.js";/** +import{c}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/shield-alert--Sbe2-vu.js b/static/assets/shield-alert-rM_NVGQr.js similarity index 91% rename from static/assets/shield-alert--Sbe2-vu.js rename to static/assets/shield-alert-rM_NVGQr.js index 928ea95..cb6a44f 100644 --- a/static/assets/shield-alert--Sbe2-vu.js +++ b/static/assets/shield-alert-rM_NVGQr.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/sparkles-Dw_-KUhM.js b/static/assets/sparkles-DVlvGI-3.js similarity index 93% rename from static/assets/sparkles-Dw_-KUhM.js rename to static/assets/sparkles-DVlvGI-3.js index b10d4b6..399a13c 100644 --- a/static/assets/sparkles-Dw_-KUhM.js +++ b/static/assets/sparkles-DVlvGI-3.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCb9Ylky.js";/** +import{c as a}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/square-pen-C-Z-gDiq.js b/static/assets/square-pen-Bmle-FRS.js similarity index 91% rename from static/assets/square-pen-C-Z-gDiq.js rename to static/assets/square-pen-Bmle-FRS.js index ad3ca5a..96b5eb9 100644 --- a/static/assets/square-pen-C-Z-gDiq.js +++ b/static/assets/square-pen-Bmle-FRS.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCb9Ylky.js";/** +import{c as a}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/trash-2-D-oW6aaO.js b/static/assets/trash-2-CmT2n80I.js similarity index 91% rename from static/assets/trash-2-D-oW6aaO.js rename to static/assets/trash-2-CmT2n80I.js index ff50674..57a99b7 100644 --- a/static/assets/trash-2-D-oW6aaO.js +++ b/static/assets/trash-2-CmT2n80I.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCb9Ylky.js";/** +import{c as a}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/trending-up-r2pDWepX.js b/static/assets/trending-up-BLnHDV6T.js similarity index 87% rename from static/assets/trending-up-r2pDWepX.js rename to static/assets/trending-up-BLnHDV6T.js index ce0c1dc..cfd8599 100644 --- a/static/assets/trending-up-r2pDWepX.js +++ b/static/assets/trending-up-BLnHDV6T.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCb9Ylky.js";/** +import{c as e}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/truck-DyCIYGWz.js b/static/assets/truck-3I9pdhz5.js similarity index 93% rename from static/assets/truck-DyCIYGWz.js rename to static/assets/truck-3I9pdhz5.js index 2a228ab..39bd4d8 100644 --- a/static/assets/truck-DyCIYGWz.js +++ b/static/assets/truck-3I9pdhz5.js @@ -1,4 +1,4 @@ -import{c}from"./index-BCb9Ylky.js";/** +import{c}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/assets/ui-DcVZvy8T.js b/static/assets/ui-B9Jzqjf7.js similarity index 89% rename from static/assets/ui-DcVZvy8T.js rename to static/assets/ui-B9Jzqjf7.js index 55c495e..94dbab5 100644 --- a/static/assets/ui-DcVZvy8T.js +++ b/static/assets/ui-B9Jzqjf7.js @@ -1,6 +1,6 @@ -import{c as R,j as e,L as W,aE as $,bR as A,X as H,r as x,b as z}from"./index-BCb9Ylky.js";/** +import{c as W,j as e,L as $,aE as A,bT as H,X as R,r as x,b as z}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const M=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],C=R("inbox",M),D=({title:s,description:a,icon:c,badge:n,actions:t})=>e.jsxs("header",{className:"page-header",children:[e.jsxs("div",{className:"page-header__identity",children:[c&&e.jsx("span",{className:"page-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h1",{className:"page-title",children:s}),n]}),a&&e.jsx("p",{className:"page-description",children:a})]})]}),t&&e.jsx("div",{className:"page-actions",children:t})]}),F=({value:s,onChange:a,items:c,ariaLabel:n="页面分区"})=>e.jsx("div",{className:"page-tabs",role:"tablist","aria-label":n,children:c.map(t=>{const p=t.icon,m=s===t.id;return e.jsxs("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>a(t.id),className:`page-tab ${m?"page-tab--active":""}`,children:[p&&e.jsx(p,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{children:t.label}),t.count!==void 0&&e.jsx("span",{className:"page-tab__count",children:t.count})]},t.id)})}),I=({title:s,description:a,icon:c,actions:n})=>e.jsxs("div",{className:"section-panel__header",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[c&&e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:s}),a&&e.jsx("p",{className:"section-description",children:a})]})]}),n&&e.jsx("div",{className:"section-header__actions",children:n})]}),q=({type:s,message:a,onClose:c,children:n})=>{const t=s==="success"?$:A;return e.jsxs("div",{className:`notice-banner notice-banner--${s}`,role:"status",children:[e.jsx(t,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1",children:a??n}),c&&e.jsx("button",{type:"button",onClick:c,"aria-label":"关闭提示",children:e.jsx(H,{className:"h-4 w-4"})})]})},T=({title:s,description:a,icon:c=C,action:n,compact:t=!1})=>e.jsxs("div",{className:`empty-state ${t?"empty-state--compact":""}`,children:[e.jsx("span",{className:"empty-state__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-6 w-6"})}),e.jsx("h3",{children:s}),a&&e.jsx("p",{children:a}),n&&e.jsx("div",{className:"mt-4",children:n})]}),K=({label:s="正在加载"})=>e.jsxs("div",{className:"page-loading",role:"status",children:[e.jsx(W,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:s})]}),U=({open:s,onClose:a,trigger:c,placement:n="bottom",align:t="left",panelClassName:p="max-h-72 w-80",children:m,portal:h=!1})=>{const f=x.useRef(null),v=x.useRef(null),[j,L]=x.useState(null);x.useEffect(()=>{if(!s)return;const u=o=>{var i,l;const r=o.target;(i=f.current)!=null&&i.contains(r)||(l=v.current)!=null&&l.contains(r)||a()},d=o=>{o.key==="Escape"&&a()};return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[s,a]),x.useLayoutEffect(()=>{if(!s||!h)return;const u=()=>{var y,E,_;const r=(y=f.current)==null?void 0:y.getBoundingClientRect();if(!r)return;const i=8,l=((E=v.current)==null?void 0:E.offsetHeight)??0,w=((_=v.current)==null?void 0:_.offsetWidth)??0,N=window.innerHeight-r.bottom-i,b=r.top-i,k=(n==="top"?b>=l||b>=N?"top":"bottom":N>=l||N>=b?"bottom":"top")==="top"?r.top-l-i:r.bottom+i,P=t==="left"?Math.min(r.left,Math.max(i,window.innerWidth-w-i)):Math.max(i,Math.min(r.right-w,window.innerWidth-w-i));L({top:k,left:P,minWidth:r.width})};u();let d=0;const o=()=>{cancelAnimationFrame(d),d=requestAnimationFrame(u)};return window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[s,h,n,t,m]);const g=e.jsx("div",{ref:v,className:`overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--surface)] p-2 shadow-lg ${h?"fixed z-50":`absolute z-20 ${n==="top"?"bottom-8":"top-8"} ${t==="left"?"left-0":"right-0"}`} ${p}`,style:h&&j?{top:j.top,left:j.left,minWidth:j.minWidth}:void 0,children:m});return e.jsxs("div",{ref:f,className:"relative",children:[c,s&&(h?z.createPortal(g,document.body):g)]})};export{T as E,C as I,q as N,K as P,I as S,D as a,F as b,U as c}; + */const M=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],C=W("inbox",M),D=({title:s,description:a,icon:c,badge:n,actions:t})=>e.jsxs("header",{className:"page-header",children:[e.jsxs("div",{className:"page-header__identity",children:[c&&e.jsx("span",{className:"page-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h1",{className:"page-title",children:s}),n]}),a&&e.jsx("p",{className:"page-description",children:a})]})]}),t&&e.jsx("div",{className:"page-actions",children:t})]}),F=({value:s,onChange:a,items:c,ariaLabel:n="页面分区"})=>e.jsx("div",{className:"page-tabs",role:"tablist","aria-label":n,children:c.map(t=>{const p=t.icon,m=s===t.id;return e.jsxs("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>a(t.id),className:`page-tab ${m?"page-tab--active":""}`,children:[p&&e.jsx(p,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{children:t.label}),t.count!==void 0&&e.jsx("span",{className:"page-tab__count",children:t.count})]},t.id)})}),I=({title:s,description:a,icon:c,actions:n})=>e.jsxs("div",{className:"section-panel__header",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[c&&e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:s}),a&&e.jsx("p",{className:"section-description",children:a})]})]}),n&&e.jsx("div",{className:"section-header__actions",children:n})]}),T=({type:s,message:a,onClose:c,children:n})=>{const t=s==="success"?A:H;return e.jsxs("div",{className:`notice-banner notice-banner--${s}`,role:"status",children:[e.jsx(t,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1",children:a??n}),c&&e.jsx("button",{type:"button",onClick:c,"aria-label":"关闭提示",children:e.jsx(R,{className:"h-4 w-4"})})]})},q=({title:s,description:a,icon:c=C,action:n,compact:t=!1})=>e.jsxs("div",{className:`empty-state ${t?"empty-state--compact":""}`,children:[e.jsx("span",{className:"empty-state__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-6 w-6"})}),e.jsx("h3",{children:s}),a&&e.jsx("p",{children:a}),n&&e.jsx("div",{className:"mt-4",children:n})]}),K=({label:s="正在加载"})=>e.jsxs("div",{className:"page-loading",role:"status",children:[e.jsx($,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:s})]}),U=({open:s,onClose:a,trigger:c,placement:n="bottom",align:t="left",panelClassName:p="max-h-72 w-80",children:m,portal:h=!1})=>{const f=x.useRef(null),v=x.useRef(null),[j,L]=x.useState(null);x.useEffect(()=>{if(!s)return;const u=o=>{var i,l;const r=o.target;(i=f.current)!=null&&i.contains(r)||(l=v.current)!=null&&l.contains(r)||a()},d=o=>{o.key==="Escape"&&a()};return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[s,a]),x.useLayoutEffect(()=>{if(!s||!h)return;const u=()=>{var y,E,_;const r=(y=f.current)==null?void 0:y.getBoundingClientRect();if(!r)return;const i=8,l=((E=v.current)==null?void 0:E.offsetHeight)??0,w=((_=v.current)==null?void 0:_.offsetWidth)??0,N=window.innerHeight-r.bottom-i,b=r.top-i,k=(n==="top"?b>=l||b>=N?"top":"bottom":N>=l||N>=b?"bottom":"top")==="top"?r.top-l-i:r.bottom+i,P=t==="left"?Math.min(r.left,Math.max(i,window.innerWidth-w-i)):Math.max(i,Math.min(r.right-w,window.innerWidth-w-i));L({top:k,left:P,minWidth:r.width})};u();let d=0;const o=()=>{cancelAnimationFrame(d),d=requestAnimationFrame(u)};return window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[s,h,n,t,m]);const g=e.jsx("div",{ref:v,className:`overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--surface)] p-2 shadow-lg ${h?"fixed z-50":`absolute z-20 ${n==="top"?"bottom-8":"top-8"} ${t==="left"?"left-0":"right-0"}`} ${p}`,style:h&&j?{top:j.top,left:j.left,minWidth:j.minWidth}:void 0,children:m});return e.jsxs("div",{ref:f,className:"relative",children:[c,s&&(h?z.createPortal(g,document.body):g)]})};export{q as E,C as I,T as N,K as P,I as S,D as a,F as b,U as c}; diff --git a/static/assets/zap-B162HdXv.js b/static/assets/zap-BWofDPZm.js similarity index 89% rename from static/assets/zap-B162HdXv.js rename to static/assets/zap-BWofDPZm.js index 79e1e07..ae5d76c 100644 --- a/static/assets/zap-B162HdXv.js +++ b/static/assets/zap-BWofDPZm.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCb9Ylky.js";/** +import{c as a}from"./index-BZnqBmwp.js";/** * @license lucide-react v0.562.0 - ISC * * This source code is licensed under the ISC license. diff --git a/static/index.html b/static/index.html index d3e67d5..0c81739 100644 --- a/static/index.html +++ b/static/index.html @@ -24,8 +24,8 @@ } })(); - - + +