From 37589ebdfb2b85e4f5dc2181e8a061bc7598cbdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Tue, 13 Jan 2026 00:42:49 +0800 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=AE=B5?= =?UTF-8?q?=E8=90=BD=E5=86=85=E5=AE=B9=E5=8A=A0=E8=BD=BD=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=8F=8A=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/official_configs.py | 3 + src/webui/knowledge_routes.py | 98 ++++++++++++++++++++++++++++++- template/bot_config_template.toml | 3 +- 3 files changed, 100 insertions(+), 4 deletions(-) diff --git a/src/config/official_configs.py b/src/config/official_configs.py index a6652e0e..24878f7f 100644 --- a/src/config/official_configs.py +++ b/src/config/official_configs.py @@ -697,6 +697,9 @@ class WebUIConfig(ConfigBase): secure_cookie: bool = False """是否启用安全Cookie(仅通过HTTPS传输,默认false)""" + enable_paragraph_content: bool = False + """是否在知识图谱中加载段落完整内容(需要加载embedding store,会占用额外内存)""" + @dataclass class DebugConfig(ConfigBase): diff --git a/src/webui/knowledge_routes.py b/src/webui/knowledge_routes.py index 87b2e7b5..fb540105 100644 --- a/src/webui/knowledge_routes.py +++ b/src/webui/knowledge_routes.py @@ -5,11 +5,83 @@ from fastapi import APIRouter, Query, Depends, Cookie, Header from pydantic import BaseModel import logging from src.webui.auth import verify_auth_token_from_cookie_or_header +from src.config.config import global_config logger = logging.getLogger(__name__) router = APIRouter(prefix="/api/webui/knowledge", tags=["knowledge"]) +# 延迟初始化的轻量级 embedding store(只读,仅用于获取段落完整文本) +_paragraph_store_cache = None + + +def _get_paragraph_store(): + """延迟加载段落 embedding store(只读模式,轻量级) + + Returns: + EmbeddingStore | None: 如果配置启用则返回store,否则返回None + """ + # 检查配置是否启用 + if not global_config.webui.enable_paragraph_content: + return None + + global _paragraph_store_cache + if _paragraph_store_cache is not None: + return _paragraph_store_cache + + try: + from src.chat.knowledge.embedding_store import EmbeddingStore + import os + + # 获取数据路径 + current_dir = os.path.dirname(os.path.abspath(__file__)) + root_path = os.path.abspath(os.path.join(current_dir, "..", "..")) + embedding_dir = os.path.join(root_path, "data/embedding") + + # 只加载段落 embedding store(轻量级) + paragraph_store = EmbeddingStore( + namespace="paragraph", + dir_path=embedding_dir, + max_workers=1, # 只读不需要多线程 + chunk_size=100 + ) + paragraph_store.load_from_file() + + _paragraph_store_cache = paragraph_store + logger.info(f"成功加载段落 embedding store,包含 {len(paragraph_store.store)} 个段落") + return paragraph_store + except Exception as e: + logger.warning(f"加载段落 embedding store 失败: {e}") + return None + + +def _get_paragraph_content(node_id: str) -> tuple[Optional[str], bool]: + """从 embedding store 获取段落完整内容 + + Args: + node_id: 段落节点ID,格式为 'paragraph-{hash}' + + Returns: + tuple[str | None, bool]: (段落完整内容或None, 是否启用了功能) + """ + try: + paragraph_store = _get_paragraph_store() + if paragraph_store is None: + # 功能未启用 + return None, False + + # 从 store 中获取完整内容 + paragraph_item = paragraph_store.store.get(node_id) + if paragraph_item is not None: + # paragraph_item 是 EmbeddingStoreItem,其 str 属性包含完整文本 + content: str = getattr(paragraph_item, 'str', '') + if content: + return content, True + return None, True + except Exception as e: + logger.debug(f"获取段落内容失败: {e}") + return None, True + def require_auth( maibot_session: Optional[str] = Cookie(None), @@ -84,7 +156,14 @@ def _convert_graph_to_json(kg_manager) -> KnowledgeGraph: node_data = graph[node_id] # 节点类型: "ent" -> "entity", "pg" -> "paragraph" node_type = "entity" if ("type" in node_data and node_data["type"] == "ent") else "paragraph" - content = node_data["content"] if "content" in node_data else node_id + + # 对于段落节点,尝试从 embedding store 获取完整内容 + if node_type == "paragraph": + full_content, _ = _get_paragraph_content(node_id) + content = full_content if full_content is not None else (node_data["content"] if "content" in node_data else node_id) + else: + content = node_data["content"] if "content" in node_data else node_id + create_time = node_data["create_time"] if "create_time" in node_data else None nodes.append(KnowledgeNode(id=node_id, type=node_type, content=content, create_time=create_time)) @@ -166,7 +245,14 @@ async def get_knowledge_graph( try: node_data = graph[node_id] node_type_val = "entity" if ("type" in node_data and node_data["type"] == "ent") else "paragraph" - content = node_data["content"] if "content" in node_data else node_id + + # 对于段落节点,尝试从 embedding store 获取完整内容 + if node_type_val == "paragraph": + full_content, _ = _get_paragraph_content(node_id) + content = full_content if full_content is not None else (node_data["content"] if "content" in node_data else node_id) + else: + content = node_data["content"] if "content" in node_data else node_id + create_time = node_data["create_time"] if "create_time" in node_data else None nodes.append(KnowledgeNode(id=node_id, type=node_type_val, content=content, create_time=create_time)) @@ -281,8 +367,14 @@ async def search_knowledge_node(query: str = Query(..., min_length=1), _auth: bo for node_id in node_list: try: node_data = graph[node_id] - content = node_data["content"] if "content" in node_data else node_id node_type = "entity" if ("type" in node_data and node_data["type"] == "ent") else "paragraph" + + # 对于段落节点,尝试从 embedding store 获取完整内容 + if node_type == "paragraph": + full_content, _ = _get_paragraph_content(node_id) + content = full_content if full_content is not None else (node_data["content"] if "content" in node_data else node_id) + else: + content = node_data["content"] if "content" in node_data else node_id if query_lower in content.lower() or query_lower in node_id.lower(): create_time = node_data["create_time"] if "create_time" in node_data else None diff --git a/template/bot_config_template.toml b/template/bot_config_template.toml index 0de42f50..8e4567de 100644 --- a/template/bot_config_template.toml +++ b/template/bot_config_template.toml @@ -1,5 +1,5 @@ [inner] -version = "7.4.0" +version = "7.4.1" #----以下是给开发人员阅读的,如果你只是部署了麦麦,不需要阅读---- # 如果你想要修改配置文件,请递增version的值 @@ -294,6 +294,7 @@ trusted_proxies = "" # 信任的代理IP列表(逗号分隔),只有来自 trust_xff = false # 是否启用X-Forwarded-For代理解析(默认false) # 启用后,仍要求直连IP在trusted_proxies中才会信任XFF头 secure_cookie = false # 是否启用安全Cookie(仅通过HTTPS传输,默认false) +enable_paragraph_content = false # 是否在知识图谱中加载段落完整内容(需要加载embedding store,会占用额外内存) [experimental] #实验性功能 # 麦麦私聊的说话规则,行为风格(实验性功能) From 056b4df2dd6e0342d6f33bdda1daf3115a153c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Tue, 13 Jan 2026 00:43:55 +0800 Subject: [PATCH 02/10] WebUI b2a259fbc4c8477f2ab01eb5e7a75969cda53a1e --- .../{index-DD4VGX3W.js => index-CbKchl83.js} | 50 +++++++++---------- webui/dist/assets/index-DkXVyv8m.css | 1 + webui/dist/assets/index-RB5cYCSR.css | 1 - webui/dist/index.html | 4 +- 4 files changed, 28 insertions(+), 28 deletions(-) rename webui/dist/assets/{index-DD4VGX3W.js => index-CbKchl83.js} (83%) create mode 100644 webui/dist/assets/index-DkXVyv8m.css delete mode 100644 webui/dist/assets/index-RB5cYCSR.css diff --git a/webui/dist/assets/index-DD4VGX3W.js b/webui/dist/assets/index-CbKchl83.js similarity index 83% rename from webui/dist/assets/index-DD4VGX3W.js rename to webui/dist/assets/index-CbKchl83.js index d54d300c..8099353e 100644 --- a/webui/dist/assets/index-DD4VGX3W.js +++ b/webui/dist/assets/index-CbKchl83.js @@ -1,35 +1,35 @@ -import{r as u,j as e,L as Kn,e as ha,R as Bs,b as tw,f as aw,g as lw,h as nw,k as rw,l as lt,m as iw,n as cw,O as xj,o as ow}from"./router-9vIXuQkh.js";import{a as dw,b as uw,g as mw}from"./react-vendor-BmxF9s7Q.js";import{N as xw,c as hw,O as ti,P as fw,g as Em}from"./utils-BqoaXoQ1.js";import{L as hj,T as fj,C as pj,R as pw,a as gj,V as gw,b as jw,S as jj,c as vw,d as vj,I as Nw,e as Nj,f as bw,g as bj,h as yw,i as ww,j as _w,O as yj,P as Sw,k as wj,l as _j,D as Sj,A as kj,m as Cj,n as kw,o as Cw,p as Tj,q as Tw,r as Ej,s as Ew,t as Mw,u as Mj,v as Aw,w as zw,x as Aj,y as zj,F as Rj,z as Dj,B as Rw,E as Dw,G as Oj,H as Ow,J as Lw,K as Uw,M as $w,N as Bw,Q as Iw,U as Pw,W as Fw,X as Hw,Y as qw,Z as Vw,_ as Gw,$ as Kw,a0 as Qw,a1 as Yw,a2 as Lj,a3 as Jw,a4 as Xw}from"./radix-extra-DmmnfeQE.js";import{R as Uj,T as $j,L as Zw,g as Ww,C as Ji,X as Xi,Y as Gr,h as e1,B as Bo,j as Zi,P as s1,k as t1,l as a1}from"./charts-simvewUa.js";import{S as l1,O as Bj,o as n1,C as Ij,p as r1,T as Pj,D as Fj,R as i1,q as c1,H as Hj,I as o1,J as qj,K as d1,L as Vj,M as Gj,N as u1,Q as Kj,V as m1,U as Qj,X as Yj,Y as x1,Z as h1,_ as Jj,$ as f1,a0 as p1,a1 as Xj,a2 as g1,a3 as Zj,a4 as j1,a5 as v1,a6 as N1,e as Wj,f as ad,c as ld,P as ar,d as nd,b as _n,h as b1,l as y1,m as w1,u as Ym,r as _1,a as S1,a7 as ev,a8 as sv,a9 as tv,aa as av,ab as lv,ac as nv,ad as k1}from"./radix-core-DyJi0yyw.js";import{R as dt,a as rc,C as Ut,b as st,L as Fs,X as Sa,c as Ot,d as Ba,e as Xr,f as Pa,g as ra,E as C1,h as rv,Z as sl,i as da,j as ta,S as $t,B as iv,U as Fl,k as Yn,P as pc,l as cv,F as Ua,m as T1,n as Sn,o as E1,M as Ia,A as nx,D as M1,p as Zr,T as rx,q as A1,r as ov,I as Yt,s as Lt,t as qo,u as ic,v as ua,H as z1,w as os,x as na,y as cc,z as ix,G as tc,J as Jm,K as cx,N as ox,O as R1,Q as Io,V as D1,W as rd,Y as O1,_ as L1,$ as id,a0 as $a,a1 as Xs,a2 as dx,a3 as ux,a4 as dv,a5 as gc,a6 as uv,a7 as Zn,a8 as kn,a9 as Cn,aa as mx,ab as mv,ac as xa,ad as Hl,ae as Wn,af as er,ag as cd,ah as U1,ai as $1,aj as B1,ak as I1,al as xx,am as Po,an as sr,ao as Wr,ap as Vo,aq as P1,ar as Go,as as oc,at as xv,au as F1,av as H1,aw as Ko,ax as q1,ay as hx,az as Mg,aA as V1,aB as G1,aC as hv,aD as K1,aE as vn,aF as fv,aG as Mm,aH as Ag,aI as Q1,aJ as Am,aK as Y1,aL as J1,aM as X1,aN as Z1,aO as pv,aP as W1,aQ as ei,aR as e_,aS as s_,aT as gv,aU as jv,aV as t_,aW as a_,aX as zg,aY as l_,aZ as n_,a_ as r_,a$ as i_,b0 as c_}from"./icons-8bdCaZgy.js";import{S as o_,p as d_,j as u_,a as m_,E as zm,R as x_,o as h_}from"./codemirror-TZqPU532.js";import{u as vv,a as Qo,s as Nv,K as bv,P as yv,b as wv,D as _v,c as Sv,S as kv,v as f_,d as Cv,C as Tv,h as p_}from"./dnd-BiPfFtVp.js";import{_ as ka,c as g_,g as Ev,D as j_,z as Oo}from"./misc-CJqnlRwD.js";import{D as v_,U as N_}from"./uppy-DFP_VzYR.js";import{M as b_,r as y_,a as w_,b as __}from"./markdown-CKA5gBQ9.js";import{c as S_,H as Yo,P as Jo,u as k_,d as C_,R as T_,B as E_,e as M_,C as A_,M as z_,f as R_}from"./reactflow-DtsZHOR4.js";(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function r(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(d){if(d.ep)return;d.ep=!0;const m=r(d);fetch(d.href,m)}})();var Rm={exports:{}},Ki={},Dm={exports:{}},Om={};var Rg;function D_(){return Rg||(Rg=1,(function(a){function l(D,Q){var B=D.length;D.push(Q);e:for(;0>>1,Y=D[ue];if(0>>1;ued(Ee,B))Gd($,Ee)?(D[ue]=$,D[G]=B,ue=G):(D[ue]=Ee,D[fe]=B,ue=fe);else if(Gd($,B))D[ue]=$,D[G]=B,ue=G;else break e}}return Q}function d(D,Q){var B=D.sortIndex-Q.sortIndex;return B!==0?B:D.id-Q.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;a.unstable_now=function(){return m.now()}}else{var h=Date,f=h.now();a.unstable_now=function(){return h.now()-f}}var p=[],g=[],N=1,j=null,b=3,y=!1,w=!1,z=!1,M=!1,S=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function C(D){for(var Q=r(g);Q!==null;){if(Q.callback===null)c(g);else if(Q.startTime<=D)c(g),Q.sortIndex=Q.expirationTime,l(p,Q);else break;Q=r(g)}}function R(D){if(z=!1,C(D),!w)if(r(p)!==null)w=!0,H||(H=!0,je());else{var Q=r(g);Q!==null&&pe(R,Q.startTime-D)}}var H=!1,O=-1,X=5,L=-1;function me(){return M?!0:!(a.unstable_now()-LD&&me());){var ue=j.callback;if(typeof ue=="function"){j.callback=null,b=j.priorityLevel;var Y=ue(j.expirationTime<=D);if(D=a.unstable_now(),typeof Y=="function"){j.callback=Y,C(D),Q=!0;break s}j===r(p)&&c(p),C(D)}else c(p);j=r(p)}if(j!==null)Q=!0;else{var we=r(g);we!==null&&pe(R,we.startTime-D),Q=!1}}break e}finally{j=null,b=B,y=!1}Q=void 0}}finally{Q?je():H=!1}}}var je;if(typeof E=="function")je=function(){E(Ne)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,ge=ce.port2;ce.port1.onmessage=Ne,je=function(){ge.postMessage(null)}}else je=function(){S(Ne,0)};function pe(D,Q){O=S(function(){D(a.unstable_now())},Q)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(D){D.callback=null},a.unstable_forceFrameRate=function(D){0>D||125ue?(D.sortIndex=B,l(g,D),r(p)===null&&D===r(g)&&(z?(F(O),O=-1):z=!0,pe(R,B-ue))):(D.sortIndex=Y,l(p,D),w||y||(w=!0,H||(H=!0,je()))),D},a.unstable_shouldYield=me,a.unstable_wrapCallback=function(D){var Q=b;return function(){var B=b;b=Q;try{return D.apply(this,arguments)}finally{b=B}}}})(Om)),Om}var Dg;function O_(){return Dg||(Dg=1,Dm.exports=D_()),Dm.exports}var Og;function L_(){if(Og)return Ki;Og=1;var a=O_(),l=dw(),r=uw();function c(s){var t="https://react.dev/errors/"+s;if(1Y||(s.current=ue[Y],ue[Y]=null,Y--)}function Ee(s,t){Y++,ue[Y]=s.current,s.current=t}var G=we(null),$=we(null),A=we(null),K=we(null);function Re(s,t){switch(Ee(A,t),Ee($,s),Ee(G,null),t.nodeType){case 9:case 11:s=(s=t.documentElement)&&(s=s.namespaceURI)?Wp(s):0;break;default:if(s=t.tagName,t=t.namespaceURI)t=Wp(t),s=eg(t,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}fe(G),Ee(G,s)}function se(){fe(G),fe($),fe(A)}function $e(s){s.memoizedState!==null&&Ee(K,s);var t=G.current,n=eg(t,s.type);t!==n&&(Ee($,s),Ee(G,n))}function cs(s){$.current===s&&(fe(G),fe($)),K.current===s&&(fe(K),Hi._currentValue=B)}var J,Z;function Le(s){if(J===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);J=t&&t[1]||"",Z=-1{for(const m of d)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function r(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(d){if(d.ep)return;d.ep=!0;const m=r(d);fetch(d.href,m)}})();var Rm={exports:{}},Ki={},Dm={exports:{}},Om={};var Rg;function D1(){return Rg||(Rg=1,(function(a){function l(D,Q){var I=D.length;D.push(Q);e:for(;0>>1,Y=D[ue];if(0>>1;ued(Ee,I))Gd($,Ee)?(D[ue]=$,D[G]=I,ue=G):(D[ue]=Ee,D[fe]=I,ue=fe);else if(Gd($,I))D[ue]=$,D[G]=I,ue=G;else break e}}return Q}function d(D,Q){var I=D.sortIndex-Q.sortIndex;return I!==0?I:D.id-Q.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;a.unstable_now=function(){return m.now()}}else{var h=Date,f=h.now();a.unstable_now=function(){return h.now()-f}}var p=[],g=[],N=1,j=null,b=3,y=!1,w=!1,z=!1,M=!1,S=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function C(D){for(var Q=r(g);Q!==null;){if(Q.callback===null)c(g);else if(Q.startTime<=D)c(g),Q.sortIndex=Q.expirationTime,l(p,Q);else break;Q=r(g)}}function R(D){if(z=!1,C(D),!w)if(r(p)!==null)w=!0,H||(H=!0,je());else{var Q=r(g);Q!==null&&pe(R,Q.startTime-D)}}var H=!1,O=-1,X=5,L=-1;function me(){return M?!0:!(a.unstable_now()-LD&&me());){var ue=j.callback;if(typeof ue=="function"){j.callback=null,b=j.priorityLevel;var Y=ue(j.expirationTime<=D);if(D=a.unstable_now(),typeof Y=="function"){j.callback=Y,C(D),Q=!0;break s}j===r(p)&&c(p),C(D)}else c(p);j=r(p)}if(j!==null)Q=!0;else{var we=r(g);we!==null&&pe(R,we.startTime-D),Q=!1}}break e}finally{j=null,b=I,y=!1}Q=void 0}}finally{Q?je():H=!1}}}var je;if(typeof E=="function")je=function(){E(Ne)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,ge=re.port2;re.port1.onmessage=Ne,je=function(){ge.postMessage(null)}}else je=function(){S(Ne,0)};function pe(D,Q){O=S(function(){D(a.unstable_now())},Q)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(D){D.callback=null},a.unstable_forceFrameRate=function(D){0>D||125ue?(D.sortIndex=I,l(g,D),r(p)===null&&D===r(g)&&(z?(F(O),O=-1):z=!0,pe(R,I-ue))):(D.sortIndex=Y,l(p,D),w||y||(w=!0,H||(H=!0,je()))),D},a.unstable_shouldYield=me,a.unstable_wrapCallback=function(D){var Q=b;return function(){var I=b;b=Q;try{return D.apply(this,arguments)}finally{b=I}}}})(Om)),Om}var Dg;function O1(){return Dg||(Dg=1,Dm.exports=D1()),Dm.exports}var Og;function L1(){if(Og)return Ki;Og=1;var a=O1(),l=dw(),r=uw();function c(s){var t="https://react.dev/errors/"+s;if(1Y||(s.current=ue[Y],ue[Y]=null,Y--)}function Ee(s,t){Y++,ue[Y]=s.current,s.current=t}var G=we(null),$=we(null),A=we(null),K=we(null);function Re(s,t){switch(Ee(A,t),Ee($,s),Ee(G,null),t.nodeType){case 9:case 11:s=(s=t.documentElement)&&(s=s.namespaceURI)?Wp(s):0;break;default:if(s=t.tagName,t=t.namespaceURI)t=Wp(t),s=eg(t,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}fe(G),Ee(G,s)}function se(){fe(G),fe($),fe(A)}function $e(s){s.memoizedState!==null&&Ee(K,s);var t=G.current,n=eg(t,s.type);t!==n&&(Ee($,s),Ee(G,n))}function cs(s){$.current===s&&(fe(G),fe($)),K.current===s&&(fe(K),Hi._currentValue=I)}var J,Z;function Le(s){if(J===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);J=t&&t[1]||"",Z=-1)":-1o||I[i]!==ie[o]){var ve=` -`+I[i].replace(" at new "," at ");return s.displayName&&ve.includes("")&&(ve=ve.replace("",s.displayName)),ve}while(1<=i&&0<=o);break}}}finally{le=!1,Error.prepareStackTrace=n}return(n=s?s.displayName||s.name:"")?Le(n):""}function xe(s,t){switch(s.tag){case 26:case 27:case 5:return Le(s.type);case 16:return Le("Lazy");case 13:return s.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return De(s.type,!1);case 11:return De(s.type.render,!1);case 1:return De(s.type,!0);case 31:return Le("Activity");default:return""}}function Me(s){try{var t="",n=null;do t+=xe(s,n),n=s,s=s.return;while(s);return t}catch(i){return` +`+J+s+Z}var ne=!1;function De(s,t){if(!s||ne)return"";ne=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(he){var de=he}Reflect.construct(s,[],ye)}else{try{ye.call()}catch(he){de=he}s.call(ye.prototype)}}else{try{throw Error()}catch(he){de=he}(ye=s())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(he){if(he&&de&&typeof he.stack=="string")return[he.stack,de.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=i.DetermineComponentFrameRoot(),v=x[0],k=x[1];if(v&&k){var B=v.split(` +`),ce=k.split(` +`);for(o=i=0;io||B[i]!==ce[o]){var ve=` +`+B[i].replace(" at new "," at ");return s.displayName&&ve.includes("")&&(ve=ve.replace("",s.displayName)),ve}while(1<=i&&0<=o);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(n=s?s.displayName||s.name:"")?Le(n):""}function xe(s,t){switch(s.tag){case 26:case 27:case 5:return Le(s.type);case 16:return Le("Lazy");case 13:return s.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return De(s.type,!1);case 11:return De(s.type.render,!1);case 1:return De(s.type,!0);case 31:return Le("Activity");default:return""}}function Me(s){try{var t="",n=null;do t+=xe(s,n),n=s,s=s.return;while(s);return t}catch(i){return` Error generating stack: `+i.message+` -`+i.stack}}var ds=Object.prototype.hasOwnProperty,Ts=a.unstable_scheduleCallback,Ct=a.unstable_cancelCallback,ia=a.unstable_shouldYield,ut=a.unstable_requestPaint,Is=a.unstable_now,V=a.unstable_getCurrentPriorityLevel,Ke=a.unstable_ImmediatePriority,He=a.unstable_UserBlockingPriority,Je=a.unstable_NormalPriority,Es=a.unstable_LowPriority,ms=a.unstable_IdlePriority,Ms=a.log,We=a.unstable_setDisableYieldValue,Cs=null,rs=null;function is(s){if(typeof Ms=="function"&&We(s),rs&&typeof rs.setStrictMode=="function")try{rs.setStrictMode(Cs,s)}catch{}}var ys=Math.clz32?Math.clz32:Ae,rt=Math.log,jt=Math.LN2;function Ae(s){return s>>>=0,s===0?32:31-(rt(s)/jt|0)|0}var Qe=256,As=262144,mt=4194304;function Ht(s){var t=s&42;if(t!==0)return t;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ca(s,t,n){var i=s.pendingLanes;if(i===0)return 0;var o=0,x=s.suspendedLanes,v=s.pingedLanes;s=s.warmLanes;var k=i&134217727;return k!==0?(i=k&~x,i!==0?o=Ht(i):(v&=k,v!==0?o=Ht(v):n||(n=k&~s,n!==0&&(o=Ht(n))))):(k=i&~x,k!==0?o=Ht(k):v!==0?o=Ht(v):n||(n=i&~s,n!==0&&(o=Ht(n)))),o===0?0:t!==0&&t!==o&&(t&x)===0&&(x=o&-o,n=t&-t,x>=n||x===32&&(n&4194048)!==0)?t:o}function Fa(s,t){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&t)===0}function Xt(s,t){switch(s){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 te(){var s=mt;return mt<<=1,(mt&62914560)===0&&(mt=4194304),s}function _e(s){for(var t=[],n=0;31>n;n++)t.push(s);return t}function U(s,t){s.pendingLanes|=t,t!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Se(s,t,n,i,o,x){var v=s.pendingLanes;s.pendingLanes=n,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=n,s.entangledLanes&=n,s.errorRecoveryDisabledLanes&=n,s.shellSuspendCounter=0;var k=s.entanglements,I=s.expirationTimes,ie=s.hiddenUpdates;for(n=v&~n;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Jb=/[\n"\\]/g;function qa(s){return s.replace(Jb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function wd(s,t,n,i,o,x,v,k){s.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?s.type=v:s.removeAttribute("type"),t!=null?v==="number"?(t===0&&s.value===""||s.value!=t)&&(s.value=""+Ha(t)):s.value!==""+Ha(t)&&(s.value=""+Ha(t)):v!=="submit"&&v!=="reset"||s.removeAttribute("value"),t!=null?_d(s,v,Ha(t)):n!=null?_d(s,v,Ha(n)):i!=null&&s.removeAttribute("value"),o==null&&x!=null&&(s.defaultChecked=!!x),o!=null&&(s.checked=o&&typeof o!="function"&&typeof o!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?s.name=""+Ha(k):s.removeAttribute("name")}function Gx(s,t,n,i,o,x,v,k){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(s.type=x),t!=null||n!=null){if(!(x!=="submit"&&x!=="reset"||t!=null)){yd(s);return}n=n!=null?""+Ha(n):"",t=t!=null?""+Ha(t):n,k||t===s.value||(s.value=t),s.defaultValue=t}i=i??o,i=typeof i!="function"&&typeof i!="symbol"&&!!i,s.checked=k?s.checked:!!i,s.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(s.name=v),yd(s)}function _d(s,t,n){t==="number"&&_c(s.ownerDocument)===s||s.defaultValue===""+n||(s.defaultValue=""+n)}function dr(s,t,n,i){if(s=s.options,t){t={};for(var o=0;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ed=!1;if(bl)try{var ii={};Object.defineProperty(ii,"passive",{get:function(){Ed=!0}}),window.addEventListener("test",ii,ii),window.removeEventListener("test",ii,ii)}catch{Ed=!1}var Yl=null,Md=null,kc=null;function Wx(){if(kc)return kc;var s,t=Md,n=t.length,i,o="value"in Yl?Yl.value:Yl.textContent,x=o.length;for(s=0;s=di),nh=" ",rh=!1;function ih(s,t){switch(s){case"keyup":return _y.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ch(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var hr=!1;function ky(s,t){switch(s){case"compositionend":return ch(t);case"keypress":return t.which!==32?null:(rh=!0,nh);case"textInput":return s=t.data,s===nh&&rh?null:s;default:return null}}function Cy(s,t){if(hr)return s==="compositionend"||!Od&&ih(s,t)?(s=Wx(),kc=Md=Yl=null,hr=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-s};s=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ph(n)}}function jh(s,t){return s&&t?s===t?!0:s&&s.nodeType===3?!1:t&&t.nodeType===3?jh(s,t.parentNode):"contains"in s?s.contains(t):s.compareDocumentPosition?!!(s.compareDocumentPosition(t)&16):!1:!1}function vh(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var t=_c(s.document);t instanceof s.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)s=t.contentWindow;else break;t=_c(s.document)}return t}function $d(s){var t=s&&s.nodeName&&s.nodeName.toLowerCase();return t&&(t==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||t==="textarea"||s.contentEditable==="true")}var Oy=bl&&"documentMode"in document&&11>=document.documentMode,fr=null,Bd=null,hi=null,Id=!1;function Nh(s,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Id||fr==null||fr!==_c(i)||(i=fr,"selectionStart"in i&&$d(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),hi&&xi(hi,i)||(hi=i,i=No(Bd,"onSelect"),0>=v,o-=v,xl=1<<32-ys(t)+o|n<_s?(Ls=Ye,Ye=null):Ls=Ye.sibling;var Ks=de(ee,Ye,re[_s],be);if(Ks===null){Ye===null&&(Ye=Ls);break}s&&Ye&&Ks.alternate===null&&t(ee,Ye),q=x(Ks,q,_s),Gs===null?ss=Ks:Gs.sibling=Ks,Gs=Ks,Ye=Ls}if(_s===re.length)return n(ee,Ye),Us&&wl(ee,_s),ss;if(Ye===null){for(;_s_s?(Ls=Ye,Ye=null):Ls=Ye.sibling;var jn=de(ee,Ye,Ks.value,be);if(jn===null){Ye===null&&(Ye=Ls);break}s&&Ye&&jn.alternate===null&&t(ee,Ye),q=x(jn,q,_s),Gs===null?ss=jn:Gs.sibling=jn,Gs=jn,Ye=Ls}if(Ks.done)return n(ee,Ye),Us&&wl(ee,_s),ss;if(Ye===null){for(;!Ks.done;_s++,Ks=re.next())Ks=ye(ee,Ks.value,be),Ks!==null&&(q=x(Ks,q,_s),Gs===null?ss=Ks:Gs.sibling=Ks,Gs=Ks);return Us&&wl(ee,_s),ss}for(Ye=i(Ye);!Ks.done;_s++,Ks=re.next())Ks=he(Ye,ee,_s,Ks.value,be),Ks!==null&&(s&&Ks.alternate!==null&&Ye.delete(Ks.key===null?_s:Ks.key),q=x(Ks,q,_s),Gs===null?ss=Ks:Gs.sibling=Ks,Gs=Ks);return s&&Ye.forEach(function(sw){return t(ee,sw)}),Us&&wl(ee,_s),ss}function ot(ee,q,re,be){if(typeof re=="object"&&re!==null&&re.type===z&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case y:e:{for(var ss=re.key;q!==null;){if(q.key===ss){if(ss=re.type,ss===z){if(q.tag===7){n(ee,q.sibling),be=o(q,re.props.children),be.return=ee,ee=be;break e}}else if(q.elementType===ss||typeof ss=="object"&&ss!==null&&ss.$$typeof===X&&In(ss)===q.type){n(ee,q.sibling),be=o(q,re.props),Ni(be,re),be.return=ee,ee=be;break e}n(ee,q);break}else t(ee,q);q=q.sibling}re.type===z?(be=On(re.props.children,ee.mode,be,re.key),be.return=ee,ee=be):(be=Lc(re.type,re.key,re.props,null,ee.mode,be),Ni(be,re),be.return=ee,ee=be)}return v(ee);case w:e:{for(ss=re.key;q!==null;){if(q.key===ss)if(q.tag===4&&q.stateNode.containerInfo===re.containerInfo&&q.stateNode.implementation===re.implementation){n(ee,q.sibling),be=o(q,re.children||[]),be.return=ee,ee=be;break e}else{n(ee,q);break}else t(ee,q);q=q.sibling}be=Kd(re,ee.mode,be),be.return=ee,ee=be}return v(ee);case X:return re=In(re),ot(ee,q,re,be)}if(pe(re))return Ve(ee,q,re,be);if(je(re)){if(ss=je(re),typeof ss!="function")throw Error(c(150));return re=ss.call(re),ls(ee,q,re,be)}if(typeof re.then=="function")return ot(ee,q,Hc(re),be);if(re.$$typeof===E)return ot(ee,q,Bc(ee,re),be);qc(ee,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,q!==null&&q.tag===6?(n(ee,q.sibling),be=o(q,re),be.return=ee,ee=be):(n(ee,q),be=Gd(re,ee.mode,be),be.return=ee,ee=be),v(ee)):n(ee,q)}return function(ee,q,re,be){try{vi=0;var ss=ot(ee,q,re,be);return kr=null,ss}catch(Ye){if(Ye===Sr||Ye===Pc)throw Ye;var Gs=Ea(29,Ye,null,ee.mode);return Gs.lanes=be,Gs.return=ee,Gs}finally{}}}var Fn=Hh(!0),qh=Hh(!1),en=!1;function nu(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ru(s,t){s=s.updateQueue,t.updateQueue===s&&(t.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function sn(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function tn(s,t,n){var i=s.updateQueue;if(i===null)return null;if(i=i.shared,(Js&2)!==0){var o=i.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),i.pending=t,t=Oc(s),Ch(s,null,n),t}return Dc(s,i,t,n),Oc(s)}function bi(s,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=s.pendingLanes,n|=i,t.lanes=n,us(s,n)}}function iu(s,t){var n=s.updateQueue,i=s.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var o=null,x=null;if(n=n.firstBaseUpdate,n!==null){do{var v={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};x===null?o=x=v:x=x.next=v,n=n.next}while(n!==null);x===null?o=x=t:x=x.next=t}else o=x=t;n={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:x,shared:i.shared,callbacks:i.callbacks},s.updateQueue=n;return}s=n.lastBaseUpdate,s===null?n.firstBaseUpdate=t:s.next=t,n.lastBaseUpdate=t}var cu=!1;function yi(){if(cu){var s=_r;if(s!==null)throw s}}function wi(s,t,n,i){cu=!1;var o=s.updateQueue;en=!1;var x=o.firstBaseUpdate,v=o.lastBaseUpdate,k=o.shared.pending;if(k!==null){o.shared.pending=null;var I=k,ie=I.next;I.next=null,v===null?x=ie:v.next=ie,v=I;var ve=s.alternate;ve!==null&&(ve=ve.updateQueue,k=ve.lastBaseUpdate,k!==v&&(k===null?ve.firstBaseUpdate=ie:k.next=ie,ve.lastBaseUpdate=I))}if(x!==null){var ye=o.baseState;v=0,ve=ie=I=null,k=x;do{var de=k.lane&-536870913,he=de!==k.lane;if(he?(Os&de)===de:(i&de)===de){de!==0&&de===wr&&(cu=!0),ve!==null&&(ve=ve.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ve=s,ls=k;de=t;var ot=n;switch(ls.tag){case 1:if(Ve=ls.payload,typeof Ve=="function"){ye=Ve.call(ot,ye,de);break e}ye=Ve;break e;case 3:Ve.flags=Ve.flags&-65537|128;case 0:if(Ve=ls.payload,de=typeof Ve=="function"?Ve.call(ot,ye,de):Ve,de==null)break e;ye=j({},ye,de);break e;case 2:en=!0}}de=k.callback,de!==null&&(s.flags|=64,he&&(s.flags|=8192),he=o.callbacks,he===null?o.callbacks=[de]:he.push(de))}else he={lane:de,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ve===null?(ie=ve=he,I=ye):ve=ve.next=he,v|=de;if(k=k.next,k===null){if(k=o.shared.pending,k===null)break;he=k,k=he.next,he.next=null,o.lastBaseUpdate=he,o.shared.pending=null}}while(!0);ve===null&&(I=ye),o.baseState=I,o.firstBaseUpdate=ie,o.lastBaseUpdate=ve,x===null&&(o.shared.lanes=0),cn|=v,s.lanes=v,s.memoizedState=ye}}function Vh(s,t){if(typeof s!="function")throw Error(c(191,s));s.call(t)}function Gh(s,t){var n=s.callbacks;if(n!==null)for(s.callbacks=null,s=0;sx?x:8;var v=D.T,k={};D.T=k,Cu(s,!1,t,n);try{var I=o(),ie=D.S;if(ie!==null&&ie(k,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ve=qy(I,i);ki(s,t,ve,Da(s))}else ki(s,t,i,Da(s))}catch(ye){ki(s,t,{then:function(){},status:"rejected",reason:ye},Da())}finally{Q.p=x,v!==null&&k.types!==null&&(v.types=k.types),D.T=v}}function Jy(){}function Su(s,t,n,i){if(s.tag!==5)throw Error(c(476));var o=Sf(s).queue;_f(s,o,t,B,n===null?Jy:function(){return kf(s),n(i)})}function Sf(s){var t=s.memoizedState;if(t!==null)return t;t={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:B},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:n},next:null},s.memoizedState=t,s=s.alternate,s!==null&&(s.memoizedState=t),t}function kf(s){var t=Sf(s);t.next===null&&(t=s.alternate.memoizedState),ki(s,t.next.queue,{},Da())}function ku(){return Wt(Hi)}function Cf(){return Dt().memoizedState}function Tf(){return Dt().memoizedState}function Xy(s){for(var t=s.return;t!==null;){switch(t.tag){case 24:case 3:var n=Da();s=sn(n);var i=tn(t,s,n);i!==null&&(ya(i,t,n),bi(i,t,n)),t={cache:su()},s.payload=t;return}t=t.return}}function Zy(s,t,n){var i=Da();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},eo(s)?Mf(t,n):(n=qd(s,t,n,i),n!==null&&(ya(n,s,i),Af(n,t,i)))}function Ef(s,t,n){var i=Da();ki(s,t,n,i)}function ki(s,t,n,i){var o={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(eo(s))Mf(t,o);else{var x=s.alternate;if(s.lanes===0&&(x===null||x.lanes===0)&&(x=t.lastRenderedReducer,x!==null))try{var v=t.lastRenderedState,k=x(v,n);if(o.hasEagerState=!0,o.eagerState=k,Ta(k,v))return Dc(s,t,o,0),xt===null&&Rc(),!1}catch{}finally{}if(n=qd(s,t,o,i),n!==null)return ya(n,s,i),Af(n,t,i),!0}return!1}function Cu(s,t,n,i){if(i={lane:2,revertLane:nm(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},eo(s)){if(t)throw Error(c(479))}else t=qd(s,n,i,2),t!==null&&ya(t,s,2)}function eo(s){var t=s.alternate;return s===ws||t!==null&&t===ws}function Mf(s,t){Tr=Kc=!0;var n=s.pending;n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t}function Af(s,t,n){if((n&4194048)!==0){var i=t.lanes;i&=s.pendingLanes,n|=i,t.lanes=n,us(s,n)}}var Ci={readContext:Wt,use:Jc,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useLayoutEffect:Mt,useInsertionEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useSyncExternalStore:Mt,useId:Mt,useHostTransitionStatus:Mt,useFormState:Mt,useActionState:Mt,useOptimistic:Mt,useMemoCache:Mt,useCacheRefresh:Mt};Ci.useEffectEvent=Mt;var zf={readContext:Wt,use:Jc,useCallback:function(s,t){return ma().memoizedState=[s,t===void 0?null:t],s},useContext:Wt,useEffect:ff,useImperativeHandle:function(s,t,n){n=n!=null?n.concat([s]):null,Zc(4194308,4,vf.bind(null,t,s),n)},useLayoutEffect:function(s,t){return Zc(4194308,4,s,t)},useInsertionEffect:function(s,t){Zc(4,2,s,t)},useMemo:function(s,t){var n=ma();t=t===void 0?null:t;var i=s();if(Hn){is(!0);try{s()}finally{is(!1)}}return n.memoizedState=[i,t],i},useReducer:function(s,t,n){var i=ma();if(n!==void 0){var o=n(t);if(Hn){is(!0);try{n(t)}finally{is(!1)}}}else o=t;return i.memoizedState=i.baseState=o,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:o},i.queue=s,s=s.dispatch=Zy.bind(null,ws,s),[i.memoizedState,s]},useRef:function(s){var t=ma();return s={current:s},t.memoizedState=s},useState:function(s){s=Nu(s);var t=s.queue,n=Ef.bind(null,ws,t);return t.dispatch=n,[s.memoizedState,n]},useDebugValue:wu,useDeferredValue:function(s,t){var n=ma();return _u(n,s,t)},useTransition:function(){var s=Nu(!1);return s=_f.bind(null,ws,s.queue,!0,!1),ma().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,t,n){var i=ws,o=ma();if(Us){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),xt===null)throw Error(c(349));(Os&127)!==0||Zh(i,t,n)}o.memoizedState=n;var x={value:n,getSnapshot:t};return o.queue=x,ff(ef.bind(null,i,x,s),[s]),i.flags|=2048,Mr(9,{destroy:void 0},Wh.bind(null,i,x,n,t),null),n},useId:function(){var s=ma(),t=xt.identifierPrefix;if(Us){var n=hl,i=xl;n=(i&~(1<<32-ys(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Qc++,0<\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof i.is=="string"?v.createElement("select",{is:i.is}):v.createElement("select"),i.multiple?x.multiple=!0:i.size&&(x.size=i.size);break;default:x=typeof i.is=="string"?v.createElement(o,{is:i.is}):v.createElement(o)}}x[oe]=t,x[qe]=i;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)x.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=x;e:switch(sa(x,o,i),o){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&El(t)}}return yt(t),Pu(t,t.type,s===null?null:s.memoizedProps,t.pendingProps,n),null;case 6:if(s&&t.stateNode!=null)s.memoizedProps!==i&&El(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(c(166));if(s=A.current,br(t)){if(s=t.stateNode,n=t.memoizedProps,i=null,o=Zt,o!==null)switch(o.tag){case 27:case 5:i=o.memoizedProps}s[oe]=t,s=!!(s.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Xp(s.nodeValue,n)),s||Zl(t,!0)}else s=bo(s).createTextNode(i),s[oe]=t,t.stateNode=s}return yt(t),null;case 31:if(n=t.memoizedState,s===null||s.memoizedState!==null){if(i=br(t),n!==null){if(s===null){if(!i)throw Error(c(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(c(557));s[oe]=t}else Ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),s=!1}else n=Xd(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=n),s=!0;if(!s)return t.flags&256?(Aa(t),t):(Aa(t),null);if((t.flags&128)!==0)throw Error(c(558))}return yt(t),null;case 13:if(i=t.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(o=br(t),i!==null&&i.dehydrated!==null){if(s===null){if(!o)throw Error(c(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(c(317));o[oe]=t}else Ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),o=!1}else o=Xd(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Aa(t),t):(Aa(t),null)}return Aa(t),(t.flags&128)!==0?(t.lanes=n,t):(n=i!==null,s=s!==null&&s.memoizedState!==null,n&&(i=t.child,o=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(o=i.alternate.memoizedState.cachePool.pool),x=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(x=i.memoizedState.cachePool.pool),x!==o&&(i.flags|=2048)),n!==s&&n&&(t.child.flags|=8192),no(t,t.updateQueue),yt(t),null);case 4:return se(),s===null&&om(t.stateNode.containerInfo),yt(t),null;case 10:return Sl(t.type),yt(t),null;case 19:if(fe(Rt),i=t.memoizedState,i===null)return yt(t),null;if(o=(t.flags&128)!==0,x=i.rendering,x===null)if(o)Ei(i,!1);else{if(At!==0||s!==null&&(s.flags&128)!==0)for(s=t.child;s!==null;){if(x=Gc(s),x!==null){for(t.flags|=128,Ei(i,!1),s=x.updateQueue,t.updateQueue=s,no(t,s),t.subtreeFlags=0,s=n,n=t.child;n!==null;)Th(n,s),n=n.sibling;return Ee(Rt,Rt.current&1|2),Us&&wl(t,i.treeForkCount),t.child}s=s.sibling}i.tail!==null&&Is()>uo&&(t.flags|=128,o=!0,Ei(i,!1),t.lanes=4194304)}else{if(!o)if(s=Gc(x),s!==null){if(t.flags|=128,o=!0,s=s.updateQueue,t.updateQueue=s,no(t,s),Ei(i,!0),i.tail===null&&i.tailMode==="hidden"&&!x.alternate&&!Us)return yt(t),null}else 2*Is()-i.renderingStartTime>uo&&n!==536870912&&(t.flags|=128,o=!0,Ei(i,!1),t.lanes=4194304);i.isBackwards?(x.sibling=t.child,t.child=x):(s=i.last,s!==null?s.sibling=x:t.child=x,i.last=x)}return i.tail!==null?(s=i.tail,i.rendering=s,i.tail=s.sibling,i.renderingStartTime=Is(),s.sibling=null,n=Rt.current,Ee(Rt,o?n&1|2:n&1),Us&&wl(t,i.treeForkCount),s):(yt(t),null);case 22:case 23:return Aa(t),du(),i=t.memoizedState!==null,s!==null?s.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),n=t.updateQueue,n!==null&&no(t,n.retryQueue),n=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),s!==null&&fe(Bn),null;case 24:return n=null,s!==null&&(n=s.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sl(Bt),yt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function a0(s,t){switch(Yd(t),t.tag){case 1:return s=t.flags,s&65536?(t.flags=s&-65537|128,t):null;case 3:return Sl(Bt),se(),s=t.flags,(s&65536)!==0&&(s&128)===0?(t.flags=s&-65537|128,t):null;case 26:case 27:case 5:return cs(t),null;case 31:if(t.memoizedState!==null){if(Aa(t),t.alternate===null)throw Error(c(340));Ln()}return s=t.flags,s&65536?(t.flags=s&-65537|128,t):null;case 13:if(Aa(t),s=t.memoizedState,s!==null&&s.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ln()}return s=t.flags,s&65536?(t.flags=s&-65537|128,t):null;case 19:return fe(Rt),null;case 4:return se(),null;case 10:return Sl(t.type),null;case 22:case 23:return Aa(t),du(),s!==null&&fe(Bn),s=t.flags,s&65536?(t.flags=s&-65537|128,t):null;case 24:return Sl(Bt),null;case 25:return null;default:return null}}function tp(s,t){switch(Yd(t),t.tag){case 3:Sl(Bt),se();break;case 26:case 27:case 5:cs(t);break;case 4:se();break;case 31:t.memoizedState!==null&&Aa(t);break;case 13:Aa(t);break;case 19:fe(Rt);break;case 10:Sl(t.type);break;case 22:case 23:Aa(t),du(),s!==null&&fe(Bn);break;case 24:Sl(Bt)}}function Mi(s,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var o=i.next;n=o;do{if((n.tag&s)===s){i=void 0;var x=n.create,v=n.inst;i=x(),v.destroy=i}n=n.next}while(n!==o)}}catch(k){et(t,t.return,k)}}function nn(s,t,n){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var x=o.next;i=x;do{if((i.tag&s)===s){var v=i.inst,k=v.destroy;if(k!==void 0){v.destroy=void 0,o=t;var I=n,ie=k;try{ie()}catch(ve){et(o,I,ve)}}}i=i.next}while(i!==x)}}catch(ve){et(t,t.return,ve)}}function ap(s){var t=s.updateQueue;if(t!==null){var n=s.stateNode;try{Gh(t,n)}catch(i){et(s,s.return,i)}}}function lp(s,t,n){n.props=qn(s.type,s.memoizedProps),n.state=s.memoizedState;try{n.componentWillUnmount()}catch(i){et(s,t,i)}}function Ai(s,t){try{var n=s.ref;if(n!==null){switch(s.tag){case 26:case 27:case 5:var i=s.stateNode;break;case 30:i=s.stateNode;break;default:i=s.stateNode}typeof n=="function"?s.refCleanup=n(i):n.current=i}}catch(o){et(s,t,o)}}function fl(s,t){var n=s.ref,i=s.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(o){et(s,t,o)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){et(s,t,o)}else n.current=null}function np(s){var t=s.type,n=s.memoizedProps,i=s.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(o){et(s,s.return,o)}}function Fu(s,t,n){try{var i=s.stateNode;S0(i,s.type,n,t),i[qe]=t}catch(o){et(s,s.return,o)}}function rp(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&xn(s.type)||s.tag===4}function Hu(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||rp(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&xn(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function qu(s,t,n){var i=s.tag;if(i===5||i===6)s=s.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(s,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(s),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Nl));else if(i!==4&&(i===27&&xn(s.type)&&(n=s.stateNode,t=null),s=s.child,s!==null))for(qu(s,t,n),s=s.sibling;s!==null;)qu(s,t,n),s=s.sibling}function ro(s,t,n){var i=s.tag;if(i===5||i===6)s=s.stateNode,t?n.insertBefore(s,t):n.appendChild(s);else if(i!==4&&(i===27&&xn(s.type)&&(n=s.stateNode),s=s.child,s!==null))for(ro(s,t,n),s=s.sibling;s!==null;)ro(s,t,n),s=s.sibling}function ip(s){var t=s.stateNode,n=s.memoizedProps;try{for(var i=s.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);sa(t,i,n),t[oe]=s,t[qe]=n}catch(x){et(s,s.return,x)}}var Ml=!1,Ft=!1,Vu=!1,cp=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function l0(s,t){if(s=s.containerInfo,mm=To,s=vh(s),$d(s)){if("selectionStart"in s)var n={start:s.selectionStart,end:s.selectionEnd};else e:{n=(n=s.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var o=i.anchorOffset,x=i.focusNode;i=i.focusOffset;try{n.nodeType,x.nodeType}catch{n=null;break e}var v=0,k=-1,I=-1,ie=0,ve=0,ye=s,de=null;s:for(;;){for(var he;ye!==n||o!==0&&ye.nodeType!==3||(k=v+o),ye!==x||i!==0&&ye.nodeType!==3||(I=v+i),ye.nodeType===3&&(v+=ye.nodeValue.length),(he=ye.firstChild)!==null;)de=ye,ye=he;for(;;){if(ye===s)break s;if(de===n&&++ie===o&&(k=v),de===x&&++ve===i&&(I=v),(he=ye.nextSibling)!==null)break;ye=de,de=ye.parentNode}ye=he}n=k===-1||I===-1?null:{start:k,end:I}}else n=null}n=n||{start:0,end:0}}else n=null;for(xm={focusedElem:s,selectionRange:n},To=!1,Qt=t;Qt!==null;)if(t=Qt,s=t.child,(t.subtreeFlags&1028)!==0&&s!==null)s.return=t,Qt=s;else for(;Qt!==null;){switch(t=Qt,x=t.alternate,s=t.flags,t.tag){case 0:if((s&4)!==0&&(s=t.updateQueue,s=s!==null?s.events:null,s!==null))for(n=0;n title"))),sa(x,i,n),x[oe]=s,Kt(x),i=x;break e;case"link":var v=hg("link","href",o).get(i+(n.href||""));if(v){for(var k=0;kot&&(v=ot,ot=ls,ls=v);var ee=gh(k,ls),q=gh(k,ot);if(ee&&q&&(he.rangeCount!==1||he.anchorNode!==ee.node||he.anchorOffset!==ee.offset||he.focusNode!==q.node||he.focusOffset!==q.offset)){var re=ye.createRange();re.setStart(ee.node,ee.offset),he.removeAllRanges(),ls>ot?(he.addRange(re),he.extend(q.node,q.offset)):(re.setEnd(q.node,q.offset),he.addRange(re))}}}}for(ye=[],he=k;he=he.parentNode;)he.nodeType===1&&ye.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;kn?32:n,D.T=null,n=Zu,Zu=null;var x=dn,v=Ol;if(qt=0,Or=dn=null,Ol=0,(Js&6)!==0)throw Error(c(331));var k=Js;if(Js|=4,vp(x.current),pp(x,x.current,v,n),Js=k,Ui(0,!1),rs&&typeof rs.onPostCommitFiberRoot=="function")try{rs.onPostCommitFiberRoot(Cs,x)}catch{}return!0}finally{Q.p=o,D.T=i,Up(s,t)}}function Bp(s,t,n){t=Ga(n,t),t=Au(s.stateNode,t,2),s=tn(s,t,2),s!==null&&(U(s,2),pl(s))}function et(s,t,n){if(s.tag===3)Bp(s,s,n);else for(;t!==null;){if(t.tag===3){Bp(t,s,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(on===null||!on.has(i))){s=Ga(n,s),n=If(2),i=tn(t,n,2),i!==null&&(Pf(n,i,t,s),U(i,2),pl(i));break}}t=t.return}}function tm(s,t,n){var i=s.pingCache;if(i===null){i=s.pingCache=new i0;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(n)||(Qu=!0,o.add(n),s=m0.bind(null,s,t,n),t.then(s,s))}function m0(s,t,n){var i=s.pingCache;i!==null&&i.delete(t),s.pingedLanes|=s.suspendedLanes&n,s.warmLanes&=~n,xt===s&&(Os&n)===n&&(At===4||At===3&&(Os&62914560)===Os&&300>Is()-oo?(Js&2)===0&&Lr(s,0):Yu|=n,Dr===Os&&(Dr=0)),pl(s)}function Ip(s,t){t===0&&(t=te()),s=Dn(s,t),s!==null&&(U(s,t),pl(s))}function x0(s){var t=s.memoizedState,n=0;t!==null&&(n=t.retryLane),Ip(s,n)}function h0(s,t){var n=0;switch(s.tag){case 31:case 13:var i=s.stateNode,o=s.memoizedState;o!==null&&(n=o.retryLane);break;case 19:i=s.stateNode;break;case 22:i=s.stateNode._retryCache;break;default:throw Error(c(314))}i!==null&&i.delete(t),Ip(s,n)}function f0(s,t){return Ts(s,t)}var go=null,$r=null,am=!1,jo=!1,lm=!1,mn=0;function pl(s){s!==$r&&s.next===null&&($r===null?go=$r=s:$r=$r.next=s),jo=!0,am||(am=!0,g0())}function Ui(s,t){if(!lm&&jo){lm=!0;do for(var n=!1,i=go;i!==null;){if(s!==0){var o=i.pendingLanes;if(o===0)var x=0;else{var v=i.suspendedLanes,k=i.pingedLanes;x=(1<<31-ys(42|s)+1)-1,x&=o&~(v&~k),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(n=!0,qp(i,x))}else x=Os,x=ca(i,i===xt?x:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(x&3)===0||Fa(i,x)||(n=!0,qp(i,x));i=i.next}while(n);lm=!1}}function p0(){Pp()}function Pp(){jo=am=!1;var s=0;mn!==0&&C0()&&(s=mn);for(var t=Is(),n=null,i=go;i!==null;){var o=i.next,x=Fp(i,t);x===0?(i.next=null,n===null?go=o:n.next=o,o===null&&($r=n)):(n=i,(s!==0||(x&3)!==0)&&(jo=!0)),i=o}qt!==0&&qt!==5||Ui(s),mn!==0&&(mn=0)}function Fp(s,t){for(var n=s.suspendedLanes,i=s.pingedLanes,o=s.expirationTimes,x=s.pendingLanes&-62914561;0k)break;var ve=I.transferSize,ye=I.initiatorType;ve&&Zp(ye)&&(I=I.responseEnd,v+=ve*(I"u"?null:document;function dg(s,t,n){var i=Br;if(i&&typeof t=="string"&&t){var o=qa(t);o='link[rel="'+s+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),og.has(o)||(og.add(o),s={rel:s,crossOrigin:n,href:t},i.querySelector(o)===null&&(t=i.createElement("link"),sa(t,"link",s),Kt(t),i.head.appendChild(t)))}}function L0(s){Ll.D(s),dg("dns-prefetch",s,null)}function U0(s,t){Ll.C(s,t),dg("preconnect",s,t)}function $0(s,t,n){Ll.L(s,t,n);var i=Br;if(i&&s&&t){var o='link[rel="preload"][as="'+qa(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+qa(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+qa(n.imageSizes)+'"]')):o+='[href="'+qa(s)+'"]';var x=o;switch(t){case"style":x=Ir(s);break;case"script":x=Pr(s)}Za.has(x)||(s=j({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:s,as:t},n),Za.set(x,s),i.querySelector(o)!==null||t==="style"&&i.querySelector(Pi(x))||t==="script"&&i.querySelector(Fi(x))||(t=i.createElement("link"),sa(t,"link",s),Kt(t),i.head.appendChild(t)))}}function B0(s,t){Ll.m(s,t);var n=Br;if(n&&s){var i=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+qa(i)+'"][href="'+qa(s)+'"]',x=o;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Pr(s)}if(!Za.has(x)&&(s=j({rel:"modulepreload",href:s},t),Za.set(x,s),n.querySelector(o)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Fi(x)))return}i=n.createElement("link"),sa(i,"link",s),Kt(i),n.head.appendChild(i)}}}function I0(s,t,n){Ll.S(s,t,n);var i=Br;if(i&&s){var o=cr(i).hoistableStyles,x=Ir(s);t=t||"default";var v=o.get(x);if(!v){var k={loading:0,preload:null};if(v=i.querySelector(Pi(x)))k.loading=5;else{s=j({rel:"stylesheet",href:s,"data-precedence":t},n),(n=Za.get(x))&&Nm(s,n);var I=v=i.createElement("link");Kt(I),sa(I,"link",s),I._p=new Promise(function(ie,ve){I.onload=ie,I.onerror=ve}),I.addEventListener("load",function(){k.loading|=1}),I.addEventListener("error",function(){k.loading|=2}),k.loading|=4,wo(v,t,i)}v={type:"stylesheet",instance:v,count:1,state:k},o.set(x,v)}}}function P0(s,t){Ll.X(s,t);var n=Br;if(n&&s){var i=cr(n).hoistableScripts,o=Pr(s),x=i.get(o);x||(x=n.querySelector(Fi(o)),x||(s=j({src:s,async:!0},t),(t=Za.get(o))&&bm(s,t),x=n.createElement("script"),Kt(x),sa(x,"link",s),n.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},i.set(o,x))}}function F0(s,t){Ll.M(s,t);var n=Br;if(n&&s){var i=cr(n).hoistableScripts,o=Pr(s),x=i.get(o);x||(x=n.querySelector(Fi(o)),x||(s=j({src:s,async:!0,type:"module"},t),(t=Za.get(o))&&bm(s,t),x=n.createElement("script"),Kt(x),sa(x,"link",s),n.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},i.set(o,x))}}function ug(s,t,n,i){var o=(o=A.current)?yo(o):null;if(!o)throw Error(c(446));switch(s){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ir(n.href),n=cr(o).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){s=Ir(n.href);var x=cr(o).hoistableStyles,v=x.get(s);if(v||(o=o.ownerDocument||o,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(s,v),(x=o.querySelector(Pi(s)))&&!x._p&&(v.instance=x,v.state.loading=5),Za.has(s)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Za.set(s,n),x||H0(o,s,n,v.state))),t&&i===null)throw Error(c(528,""));return v}if(t&&i!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pr(n),n=cr(o).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,s))}}function Ir(s){return'href="'+qa(s)+'"'}function Pi(s){return'link[rel="stylesheet"]['+s+"]"}function mg(s){return j({},s,{"data-precedence":s.precedence,precedence:null})}function H0(s,t,n,i){s.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=s.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),sa(t,"link",n),Kt(t),s.head.appendChild(t))}function Pr(s){return'[src="'+qa(s)+'"]'}function Fi(s){return"script[async]"+s}function xg(s,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=s.querySelector('style[data-href~="'+qa(n.href)+'"]');if(i)return t.instance=i,Kt(i),i;var o=j({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(s.ownerDocument||s).createElement("style"),Kt(i),sa(i,"style",o),wo(i,n.precedence,s),t.instance=i;case"stylesheet":o=Ir(n.href);var x=s.querySelector(Pi(o));if(x)return t.state.loading|=4,t.instance=x,Kt(x),x;i=mg(n),(o=Za.get(o))&&Nm(i,o),x=(s.ownerDocument||s).createElement("link"),Kt(x);var v=x;return v._p=new Promise(function(k,I){v.onload=k,v.onerror=I}),sa(x,"link",i),t.state.loading|=4,wo(x,n.precedence,s),t.instance=x;case"script":return x=Pr(n.src),(o=s.querySelector(Fi(x)))?(t.instance=o,Kt(o),o):(i=n,(o=Za.get(x))&&(i=j({},n),bm(i,o)),s=s.ownerDocument||s,o=s.createElement("script"),Kt(o),sa(o,"link",i),s.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,wo(i,n.precedence,s));return t.instance}function wo(s,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=i.length?i[i.length-1]:null,x=o,v=0;v title"):null)}function q0(s,t,n){if(n===1||t.itemProp!=null)return!1;switch(s){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 s=t.disabled,typeof t.precedence=="string"&&s==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 pg(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function V0(s,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Ir(i.href),x=t.querySelector(Pi(o));if(x){t=x._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(s.count++,s=So.bind(s),t.then(s,s)),n.state.loading|=4,n.instance=x,Kt(x);return}x=t.ownerDocument||t,i=mg(i),(o=Za.get(o))&&Nm(i,o),x=x.createElement("link"),Kt(x);var v=x;v._p=new Promise(function(k,I){v.onload=k,v.onerror=I}),sa(x,"link",i),n.instance=x}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(s.count++,n=So.bind(s),t.addEventListener("load",n),t.addEventListener("error",n))}}var ym=0;function G0(s,t){return s.stylesheets&&s.count===0&&Co(s,s.stylesheets),0ym?50:800)+t);return s.unsuspend=n,function(){s.unsuspend=null,clearTimeout(i),clearTimeout(o)}}:null}function So(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Co(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var ko=null;function Co(s,t){s.stylesheets=null,s.unsuspend!==null&&(s.count++,ko=new Map,t.forEach(K0,s),ko=null,So.call(s))}function K0(s,t){if(!(t.state.loading&4)){var n=ko.get(s);if(n)var i=n.get(null);else{n=new Map,ko.set(s,n);for(var o=s.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),Rm.exports=L_(),Rm.exports}var $_=U_();function P(...a){return xw(hw(a))}const Te=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("rounded-xl border bg-card text-card-foreground shadow",a),...l}));Te.displayName="Card";const Oe=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("flex flex-col space-y-1.5 p-6",a),...l}));Oe.displayName="CardHeader";const Ue=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("font-semibold leading-none tracking-tight",a),...l}));Ue.displayName="CardTitle";const Ns=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("text-sm text-muted-foreground",a),...l}));Ns.displayName="CardDescription";const ze=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("p-6 pt-0",a),...l}));ze.displayName="CardContent";const od=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("flex items-center p-6 pt-0",a),...l}));od.displayName="CardFooter";const Jt=pw,Gt=u.forwardRef(({className:a,...l},r)=>e.jsx(hj,{ref:r,className:P("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...l}));Gt.displayName=hj.displayName;const Xe=u.forwardRef(({className:a,...l},r)=>e.jsx(fj,{ref:r,className:P("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...l}));Xe.displayName=fj.displayName;const Ss=u.forwardRef(({className:a,...l},r)=>e.jsx(pj,{ref:r,className:P("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:animate-in data-[state=active]:fade-in data-[state=active]:duration-300",a),...l}));Ss.displayName=pj.displayName;const ts=u.forwardRef(({className:a,children:l,viewportRef:r,...c},d)=>e.jsxs(gj,{ref:d,className:P("relative overflow-hidden",a),...c,children:[e.jsx(gw,{ref:r,className:"h-full w-full rounded-[inherit]",children:l}),e.jsx(Xm,{}),e.jsx(Xm,{orientation:"horizontal"}),e.jsx(jw,{})]}));ts.displayName=gj.displayName;const Xm=u.forwardRef(({className:a,orientation:l="vertical",...r},c)=>e.jsx(jj,{ref:c,orientation:l,className:P("flex touch-none select-none transition-colors",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",a),...r,children:e.jsx(vw,{className:"relative flex-1 rounded-full bg-border"})}));Xm.displayName=jj.displayName;function ks({className:a,...l}){return e.jsx("div",{className:P("animate-pulse rounded-md bg-primary/10",a),...l})}const tr=u.forwardRef(({className:a,value:l,...r},c)=>e.jsx(vj,{ref:c,className:P("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",a),...r,children:e.jsx(Nw,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(l||0)}%)`}})}));tr.displayName=vj.displayName;async function ke(a,l){const c=l?.body instanceof FormData?{...l?.headers}:{"Content-Type":"application/json",...l?.headers},d={...l,credentials:"include",headers:c},m=await fetch(a,d);if(m.status===401)throw window.location.href="/auth",new Error("认证失败,请重新登录");return m}function Zs(){return{"Content-Type":"application/json"}}async function B_(){try{await fetch("/api/webui/auth/logout",{method:"POST",credentials:"include"})}catch(a){console.error("登出请求失败:",a)}window.location.href="/auth"}async function dc(){try{return(await(await fetch("/api/webui/auth/check",{method:"GET",credentials:"include"})).json()).authenticated===!0}catch{return!1}}const I_={light:"",dark:".dark"},Mv=u.createContext(null);function Av(){const a=u.useContext(Mv);if(!a)throw new Error("useChart must be used within a ");return a}const Kr=u.forwardRef(({id:a,className:l,children:r,config:c,...d},m)=>{const h=u.useId(),f=`chart-${a||h.replace(/:/g,"")}`;return e.jsx(Mv.Provider,{value:{config:c},children:e.jsxs("div",{"data-chart":f,ref:m,className:P("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",l),...d,children:[e.jsx(P_,{id:f,config:c}),e.jsx(Uj,{children:r})]})})});Kr.displayName="Chart";const P_=({id:a,config:l})=>{const r=Object.entries(l).filter(([,c])=>c.theme||c.color);return r.length?e.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(I_).map(([c,d])=>` +`+i.stack}}var ds=Object.prototype.hasOwnProperty,Ts=a.unstable_scheduleCallback,Ct=a.unstable_cancelCallback,ia=a.unstable_shouldYield,ut=a.unstable_requestPaint,Bs=a.unstable_now,V=a.unstable_getCurrentPriorityLevel,Ke=a.unstable_ImmediatePriority,He=a.unstable_UserBlockingPriority,Je=a.unstable_NormalPriority,Es=a.unstable_LowPriority,ms=a.unstable_IdlePriority,Ms=a.log,We=a.unstable_setDisableYieldValue,Cs=null,rs=null;function is(s){if(typeof Ms=="function"&&We(s),rs&&typeof rs.setStrictMode=="function")try{rs.setStrictMode(Cs,s)}catch{}}var ys=Math.clz32?Math.clz32:Ae,rt=Math.log,jt=Math.LN2;function Ae(s){return s>>>=0,s===0?32:31-(rt(s)/jt|0)|0}var Qe=256,As=262144,mt=4194304;function Ht(s){var t=s&42;if(t!==0)return t;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ca(s,t,n){var i=s.pendingLanes;if(i===0)return 0;var o=0,x=s.suspendedLanes,v=s.pingedLanes;s=s.warmLanes;var k=i&134217727;return k!==0?(i=k&~x,i!==0?o=Ht(i):(v&=k,v!==0?o=Ht(v):n||(n=k&~s,n!==0&&(o=Ht(n))))):(k=i&~x,k!==0?o=Ht(k):v!==0?o=Ht(v):n||(n=i&~s,n!==0&&(o=Ht(n)))),o===0?0:t!==0&&t!==o&&(t&x)===0&&(x=o&-o,n=t&-t,x>=n||x===32&&(n&4194048)!==0)?t:o}function Fa(s,t){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&t)===0}function Xt(s,t){switch(s){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 te(){var s=mt;return mt<<=1,(mt&62914560)===0&&(mt=4194304),s}function _e(s){for(var t=[],n=0;31>n;n++)t.push(s);return t}function U(s,t){s.pendingLanes|=t,t!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Se(s,t,n,i,o,x){var v=s.pendingLanes;s.pendingLanes=n,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=n,s.entangledLanes&=n,s.errorRecoveryDisabledLanes&=n,s.shellSuspendCounter=0;var k=s.entanglements,B=s.expirationTimes,ce=s.hiddenUpdates;for(n=v&~n;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Jb=/[\n"\\]/g;function qa(s){return s.replace(Jb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function wd(s,t,n,i,o,x,v,k){s.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?s.type=v:s.removeAttribute("type"),t!=null?v==="number"?(t===0&&s.value===""||s.value!=t)&&(s.value=""+Ha(t)):s.value!==""+Ha(t)&&(s.value=""+Ha(t)):v!=="submit"&&v!=="reset"||s.removeAttribute("value"),t!=null?_d(s,v,Ha(t)):n!=null?_d(s,v,Ha(n)):i!=null&&s.removeAttribute("value"),o==null&&x!=null&&(s.defaultChecked=!!x),o!=null&&(s.checked=o&&typeof o!="function"&&typeof o!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?s.name=""+Ha(k):s.removeAttribute("name")}function Gx(s,t,n,i,o,x,v,k){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(s.type=x),t!=null||n!=null){if(!(x!=="submit"&&x!=="reset"||t!=null)){yd(s);return}n=n!=null?""+Ha(n):"",t=t!=null?""+Ha(t):n,k||t===s.value||(s.value=t),s.defaultValue=t}i=i??o,i=typeof i!="function"&&typeof i!="symbol"&&!!i,s.checked=k?s.checked:!!i,s.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(s.name=v),yd(s)}function _d(s,t,n){t==="number"&&_c(s.ownerDocument)===s||s.defaultValue===""+n||(s.defaultValue=""+n)}function dr(s,t,n,i){if(s=s.options,t){t={};for(var o=0;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ed=!1;if(bl)try{var ii={};Object.defineProperty(ii,"passive",{get:function(){Ed=!0}}),window.addEventListener("test",ii,ii),window.removeEventListener("test",ii,ii)}catch{Ed=!1}var Yl=null,Md=null,kc=null;function Wx(){if(kc)return kc;var s,t=Md,n=t.length,i,o="value"in Yl?Yl.value:Yl.textContent,x=o.length;for(s=0;s=di),nh=" ",rh=!1;function ih(s,t){switch(s){case"keyup":return _y.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ch(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var hr=!1;function ky(s,t){switch(s){case"compositionend":return ch(t);case"keypress":return t.which!==32?null:(rh=!0,nh);case"textInput":return s=t.data,s===nh&&rh?null:s;default:return null}}function Cy(s,t){if(hr)return s==="compositionend"||!Od&&ih(s,t)?(s=Wx(),kc=Md=Yl=null,hr=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-s};s=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ph(n)}}function jh(s,t){return s&&t?s===t?!0:s&&s.nodeType===3?!1:t&&t.nodeType===3?jh(s,t.parentNode):"contains"in s?s.contains(t):s.compareDocumentPosition?!!(s.compareDocumentPosition(t)&16):!1:!1}function vh(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var t=_c(s.document);t instanceof s.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)s=t.contentWindow;else break;t=_c(s.document)}return t}function $d(s){var t=s&&s.nodeName&&s.nodeName.toLowerCase();return t&&(t==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||t==="textarea"||s.contentEditable==="true")}var Oy=bl&&"documentMode"in document&&11>=document.documentMode,fr=null,Id=null,hi=null,Bd=!1;function Nh(s,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bd||fr==null||fr!==_c(i)||(i=fr,"selectionStart"in i&&$d(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),hi&&xi(hi,i)||(hi=i,i=No(Id,"onSelect"),0>=v,o-=v,xl=1<<32-ys(t)+o|n<_s?(Ls=Ye,Ye=null):Ls=Ye.sibling;var Ks=de(ee,Ye,ie[_s],be);if(Ks===null){Ye===null&&(Ye=Ls);break}s&&Ye&&Ks.alternate===null&&t(ee,Ye),q=x(Ks,q,_s),Gs===null?ss=Ks:Gs.sibling=Ks,Gs=Ks,Ye=Ls}if(_s===ie.length)return n(ee,Ye),Us&&wl(ee,_s),ss;if(Ye===null){for(;_s_s?(Ls=Ye,Ye=null):Ls=Ye.sibling;var jn=de(ee,Ye,Ks.value,be);if(jn===null){Ye===null&&(Ye=Ls);break}s&&Ye&&jn.alternate===null&&t(ee,Ye),q=x(jn,q,_s),Gs===null?ss=jn:Gs.sibling=jn,Gs=jn,Ye=Ls}if(Ks.done)return n(ee,Ye),Us&&wl(ee,_s),ss;if(Ye===null){for(;!Ks.done;_s++,Ks=ie.next())Ks=ye(ee,Ks.value,be),Ks!==null&&(q=x(Ks,q,_s),Gs===null?ss=Ks:Gs.sibling=Ks,Gs=Ks);return Us&&wl(ee,_s),ss}for(Ye=i(Ye);!Ks.done;_s++,Ks=ie.next())Ks=he(Ye,ee,_s,Ks.value,be),Ks!==null&&(s&&Ks.alternate!==null&&Ye.delete(Ks.key===null?_s:Ks.key),q=x(Ks,q,_s),Gs===null?ss=Ks:Gs.sibling=Ks,Gs=Ks);return s&&Ye.forEach(function(sw){return t(ee,sw)}),Us&&wl(ee,_s),ss}function ot(ee,q,ie,be){if(typeof ie=="object"&&ie!==null&&ie.type===z&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:e:{for(var ss=ie.key;q!==null;){if(q.key===ss){if(ss=ie.type,ss===z){if(q.tag===7){n(ee,q.sibling),be=o(q,ie.props.children),be.return=ee,ee=be;break e}}else if(q.elementType===ss||typeof ss=="object"&&ss!==null&&ss.$$typeof===X&&Bn(ss)===q.type){n(ee,q.sibling),be=o(q,ie.props),Ni(be,ie),be.return=ee,ee=be;break e}n(ee,q);break}else t(ee,q);q=q.sibling}ie.type===z?(be=On(ie.props.children,ee.mode,be,ie.key),be.return=ee,ee=be):(be=Lc(ie.type,ie.key,ie.props,null,ee.mode,be),Ni(be,ie),be.return=ee,ee=be)}return v(ee);case w:e:{for(ss=ie.key;q!==null;){if(q.key===ss)if(q.tag===4&&q.stateNode.containerInfo===ie.containerInfo&&q.stateNode.implementation===ie.implementation){n(ee,q.sibling),be=o(q,ie.children||[]),be.return=ee,ee=be;break e}else{n(ee,q);break}else t(ee,q);q=q.sibling}be=Kd(ie,ee.mode,be),be.return=ee,ee=be}return v(ee);case X:return ie=Bn(ie),ot(ee,q,ie,be)}if(pe(ie))return Ge(ee,q,ie,be);if(je(ie)){if(ss=je(ie),typeof ss!="function")throw Error(c(150));return ie=ss.call(ie),ls(ee,q,ie,be)}if(typeof ie.then=="function")return ot(ee,q,Hc(ie),be);if(ie.$$typeof===E)return ot(ee,q,Ic(ee,ie),be);qc(ee,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,q!==null&&q.tag===6?(n(ee,q.sibling),be=o(q,ie),be.return=ee,ee=be):(n(ee,q),be=Gd(ie,ee.mode,be),be.return=ee,ee=be),v(ee)):n(ee,q)}return function(ee,q,ie,be){try{vi=0;var ss=ot(ee,q,ie,be);return kr=null,ss}catch(Ye){if(Ye===Sr||Ye===Pc)throw Ye;var Gs=Ea(29,Ye,null,ee.mode);return Gs.lanes=be,Gs.return=ee,Gs}finally{}}}var Fn=Hh(!0),qh=Hh(!1),en=!1;function nu(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ru(s,t){s=s.updateQueue,t.updateQueue===s&&(t.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function sn(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function tn(s,t,n){var i=s.updateQueue;if(i===null)return null;if(i=i.shared,(Js&2)!==0){var o=i.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),i.pending=t,t=Oc(s),Ch(s,null,n),t}return Dc(s,i,t,n),Oc(s)}function bi(s,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=s.pendingLanes,n|=i,t.lanes=n,us(s,n)}}function iu(s,t){var n=s.updateQueue,i=s.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var o=null,x=null;if(n=n.firstBaseUpdate,n!==null){do{var v={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};x===null?o=x=v:x=x.next=v,n=n.next}while(n!==null);x===null?o=x=t:x=x.next=t}else o=x=t;n={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:x,shared:i.shared,callbacks:i.callbacks},s.updateQueue=n;return}s=n.lastBaseUpdate,s===null?n.firstBaseUpdate=t:s.next=t,n.lastBaseUpdate=t}var cu=!1;function yi(){if(cu){var s=_r;if(s!==null)throw s}}function wi(s,t,n,i){cu=!1;var o=s.updateQueue;en=!1;var x=o.firstBaseUpdate,v=o.lastBaseUpdate,k=o.shared.pending;if(k!==null){o.shared.pending=null;var B=k,ce=B.next;B.next=null,v===null?x=ce:v.next=ce,v=B;var ve=s.alternate;ve!==null&&(ve=ve.updateQueue,k=ve.lastBaseUpdate,k!==v&&(k===null?ve.firstBaseUpdate=ce:k.next=ce,ve.lastBaseUpdate=B))}if(x!==null){var ye=o.baseState;v=0,ve=ce=B=null,k=x;do{var de=k.lane&-536870913,he=de!==k.lane;if(he?(Os&de)===de:(i&de)===de){de!==0&&de===wr&&(cu=!0),ve!==null&&(ve=ve.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ge=s,ls=k;de=t;var ot=n;switch(ls.tag){case 1:if(Ge=ls.payload,typeof Ge=="function"){ye=Ge.call(ot,ye,de);break e}ye=Ge;break e;case 3:Ge.flags=Ge.flags&-65537|128;case 0:if(Ge=ls.payload,de=typeof Ge=="function"?Ge.call(ot,ye,de):Ge,de==null)break e;ye=j({},ye,de);break e;case 2:en=!0}}de=k.callback,de!==null&&(s.flags|=64,he&&(s.flags|=8192),he=o.callbacks,he===null?o.callbacks=[de]:he.push(de))}else he={lane:de,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ve===null?(ce=ve=he,B=ye):ve=ve.next=he,v|=de;if(k=k.next,k===null){if(k=o.shared.pending,k===null)break;he=k,k=he.next,he.next=null,o.lastBaseUpdate=he,o.shared.pending=null}}while(!0);ve===null&&(B=ye),o.baseState=B,o.firstBaseUpdate=ce,o.lastBaseUpdate=ve,x===null&&(o.shared.lanes=0),cn|=v,s.lanes=v,s.memoizedState=ye}}function Vh(s,t){if(typeof s!="function")throw Error(c(191,s));s.call(t)}function Gh(s,t){var n=s.callbacks;if(n!==null)for(s.callbacks=null,s=0;sx?x:8;var v=D.T,k={};D.T=k,Cu(s,!1,t,n);try{var B=o(),ce=D.S;if(ce!==null&&ce(k,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var ve=qy(B,i);ki(s,t,ve,Da(s))}else ki(s,t,i,Da(s))}catch(ye){ki(s,t,{then:function(){},status:"rejected",reason:ye},Da())}finally{Q.p=x,v!==null&&k.types!==null&&(v.types=k.types),D.T=v}}function Jy(){}function Su(s,t,n,i){if(s.tag!==5)throw Error(c(476));var o=Sf(s).queue;_f(s,o,t,I,n===null?Jy:function(){return kf(s),n(i)})}function Sf(s){var t=s.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:n},next:null},s.memoizedState=t,s=s.alternate,s!==null&&(s.memoizedState=t),t}function kf(s){var t=Sf(s);t.next===null&&(t=s.alternate.memoizedState),ki(s,t.next.queue,{},Da())}function ku(){return Wt(Hi)}function Cf(){return Dt().memoizedState}function Tf(){return Dt().memoizedState}function Xy(s){for(var t=s.return;t!==null;){switch(t.tag){case 24:case 3:var n=Da();s=sn(n);var i=tn(t,s,n);i!==null&&(ya(i,t,n),bi(i,t,n)),t={cache:su()},s.payload=t;return}t=t.return}}function Zy(s,t,n){var i=Da();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},eo(s)?Mf(t,n):(n=qd(s,t,n,i),n!==null&&(ya(n,s,i),Af(n,t,i)))}function Ef(s,t,n){var i=Da();ki(s,t,n,i)}function ki(s,t,n,i){var o={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(eo(s))Mf(t,o);else{var x=s.alternate;if(s.lanes===0&&(x===null||x.lanes===0)&&(x=t.lastRenderedReducer,x!==null))try{var v=t.lastRenderedState,k=x(v,n);if(o.hasEagerState=!0,o.eagerState=k,Ta(k,v))return Dc(s,t,o,0),xt===null&&Rc(),!1}catch{}finally{}if(n=qd(s,t,o,i),n!==null)return ya(n,s,i),Af(n,t,i),!0}return!1}function Cu(s,t,n,i){if(i={lane:2,revertLane:nm(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},eo(s)){if(t)throw Error(c(479))}else t=qd(s,n,i,2),t!==null&&ya(t,s,2)}function eo(s){var t=s.alternate;return s===ws||t!==null&&t===ws}function Mf(s,t){Tr=Kc=!0;var n=s.pending;n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t}function Af(s,t,n){if((n&4194048)!==0){var i=t.lanes;i&=s.pendingLanes,n|=i,t.lanes=n,us(s,n)}}var Ci={readContext:Wt,use:Jc,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useLayoutEffect:Mt,useInsertionEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useSyncExternalStore:Mt,useId:Mt,useHostTransitionStatus:Mt,useFormState:Mt,useActionState:Mt,useOptimistic:Mt,useMemoCache:Mt,useCacheRefresh:Mt};Ci.useEffectEvent=Mt;var zf={readContext:Wt,use:Jc,useCallback:function(s,t){return ma().memoizedState=[s,t===void 0?null:t],s},useContext:Wt,useEffect:ff,useImperativeHandle:function(s,t,n){n=n!=null?n.concat([s]):null,Zc(4194308,4,vf.bind(null,t,s),n)},useLayoutEffect:function(s,t){return Zc(4194308,4,s,t)},useInsertionEffect:function(s,t){Zc(4,2,s,t)},useMemo:function(s,t){var n=ma();t=t===void 0?null:t;var i=s();if(Hn){is(!0);try{s()}finally{is(!1)}}return n.memoizedState=[i,t],i},useReducer:function(s,t,n){var i=ma();if(n!==void 0){var o=n(t);if(Hn){is(!0);try{n(t)}finally{is(!1)}}}else o=t;return i.memoizedState=i.baseState=o,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:o},i.queue=s,s=s.dispatch=Zy.bind(null,ws,s),[i.memoizedState,s]},useRef:function(s){var t=ma();return s={current:s},t.memoizedState=s},useState:function(s){s=Nu(s);var t=s.queue,n=Ef.bind(null,ws,t);return t.dispatch=n,[s.memoizedState,n]},useDebugValue:wu,useDeferredValue:function(s,t){var n=ma();return _u(n,s,t)},useTransition:function(){var s=Nu(!1);return s=_f.bind(null,ws,s.queue,!0,!1),ma().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,t,n){var i=ws,o=ma();if(Us){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),xt===null)throw Error(c(349));(Os&127)!==0||Zh(i,t,n)}o.memoizedState=n;var x={value:n,getSnapshot:t};return o.queue=x,ff(ef.bind(null,i,x,s),[s]),i.flags|=2048,Mr(9,{destroy:void 0},Wh.bind(null,i,x,n,t),null),n},useId:function(){var s=ma(),t=xt.identifierPrefix;if(Us){var n=hl,i=xl;n=(i&~(1<<32-ys(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Qc++,0<\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof i.is=="string"?v.createElement("select",{is:i.is}):v.createElement("select"),i.multiple?x.multiple=!0:i.size&&(x.size=i.size);break;default:x=typeof i.is=="string"?v.createElement(o,{is:i.is}):v.createElement(o)}}x[oe]=t,x[Ve]=i;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)x.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=x;e:switch(sa(x,o,i),o){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&El(t)}}return yt(t),Pu(t,t.type,s===null?null:s.memoizedProps,t.pendingProps,n),null;case 6:if(s&&t.stateNode!=null)s.memoizedProps!==i&&El(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(c(166));if(s=A.current,br(t)){if(s=t.stateNode,n=t.memoizedProps,i=null,o=Zt,o!==null)switch(o.tag){case 27:case 5:i=o.memoizedProps}s[oe]=t,s=!!(s.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Xp(s.nodeValue,n)),s||Zl(t,!0)}else s=bo(s).createTextNode(i),s[oe]=t,t.stateNode=s}return yt(t),null;case 31:if(n=t.memoizedState,s===null||s.memoizedState!==null){if(i=br(t),n!==null){if(s===null){if(!i)throw Error(c(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(c(557));s[oe]=t}else Ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),s=!1}else n=Xd(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=n),s=!0;if(!s)return t.flags&256?(Aa(t),t):(Aa(t),null);if((t.flags&128)!==0)throw Error(c(558))}return yt(t),null;case 13:if(i=t.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(o=br(t),i!==null&&i.dehydrated!==null){if(s===null){if(!o)throw Error(c(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(c(317));o[oe]=t}else Ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),o=!1}else o=Xd(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Aa(t),t):(Aa(t),null)}return Aa(t),(t.flags&128)!==0?(t.lanes=n,t):(n=i!==null,s=s!==null&&s.memoizedState!==null,n&&(i=t.child,o=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(o=i.alternate.memoizedState.cachePool.pool),x=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(x=i.memoizedState.cachePool.pool),x!==o&&(i.flags|=2048)),n!==s&&n&&(t.child.flags|=8192),no(t,t.updateQueue),yt(t),null);case 4:return se(),s===null&&om(t.stateNode.containerInfo),yt(t),null;case 10:return Sl(t.type),yt(t),null;case 19:if(fe(Rt),i=t.memoizedState,i===null)return yt(t),null;if(o=(t.flags&128)!==0,x=i.rendering,x===null)if(o)Ei(i,!1);else{if(At!==0||s!==null&&(s.flags&128)!==0)for(s=t.child;s!==null;){if(x=Gc(s),x!==null){for(t.flags|=128,Ei(i,!1),s=x.updateQueue,t.updateQueue=s,no(t,s),t.subtreeFlags=0,s=n,n=t.child;n!==null;)Th(n,s),n=n.sibling;return Ee(Rt,Rt.current&1|2),Us&&wl(t,i.treeForkCount),t.child}s=s.sibling}i.tail!==null&&Bs()>uo&&(t.flags|=128,o=!0,Ei(i,!1),t.lanes=4194304)}else{if(!o)if(s=Gc(x),s!==null){if(t.flags|=128,o=!0,s=s.updateQueue,t.updateQueue=s,no(t,s),Ei(i,!0),i.tail===null&&i.tailMode==="hidden"&&!x.alternate&&!Us)return yt(t),null}else 2*Bs()-i.renderingStartTime>uo&&n!==536870912&&(t.flags|=128,o=!0,Ei(i,!1),t.lanes=4194304);i.isBackwards?(x.sibling=t.child,t.child=x):(s=i.last,s!==null?s.sibling=x:t.child=x,i.last=x)}return i.tail!==null?(s=i.tail,i.rendering=s,i.tail=s.sibling,i.renderingStartTime=Bs(),s.sibling=null,n=Rt.current,Ee(Rt,o?n&1|2:n&1),Us&&wl(t,i.treeForkCount),s):(yt(t),null);case 22:case 23:return Aa(t),du(),i=t.memoizedState!==null,s!==null?s.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),n=t.updateQueue,n!==null&&no(t,n.retryQueue),n=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),s!==null&&fe(In),null;case 24:return n=null,s!==null&&(n=s.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sl(It),yt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function a0(s,t){switch(Yd(t),t.tag){case 1:return s=t.flags,s&65536?(t.flags=s&-65537|128,t):null;case 3:return Sl(It),se(),s=t.flags,(s&65536)!==0&&(s&128)===0?(t.flags=s&-65537|128,t):null;case 26:case 27:case 5:return cs(t),null;case 31:if(t.memoizedState!==null){if(Aa(t),t.alternate===null)throw Error(c(340));Ln()}return s=t.flags,s&65536?(t.flags=s&-65537|128,t):null;case 13:if(Aa(t),s=t.memoizedState,s!==null&&s.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ln()}return s=t.flags,s&65536?(t.flags=s&-65537|128,t):null;case 19:return fe(Rt),null;case 4:return se(),null;case 10:return Sl(t.type),null;case 22:case 23:return Aa(t),du(),s!==null&&fe(In),s=t.flags,s&65536?(t.flags=s&-65537|128,t):null;case 24:return Sl(It),null;case 25:return null;default:return null}}function tp(s,t){switch(Yd(t),t.tag){case 3:Sl(It),se();break;case 26:case 27:case 5:cs(t);break;case 4:se();break;case 31:t.memoizedState!==null&&Aa(t);break;case 13:Aa(t);break;case 19:fe(Rt);break;case 10:Sl(t.type);break;case 22:case 23:Aa(t),du(),s!==null&&fe(In);break;case 24:Sl(It)}}function Mi(s,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var o=i.next;n=o;do{if((n.tag&s)===s){i=void 0;var x=n.create,v=n.inst;i=x(),v.destroy=i}n=n.next}while(n!==o)}}catch(k){et(t,t.return,k)}}function nn(s,t,n){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var x=o.next;i=x;do{if((i.tag&s)===s){var v=i.inst,k=v.destroy;if(k!==void 0){v.destroy=void 0,o=t;var B=n,ce=k;try{ce()}catch(ve){et(o,B,ve)}}}i=i.next}while(i!==x)}}catch(ve){et(t,t.return,ve)}}function ap(s){var t=s.updateQueue;if(t!==null){var n=s.stateNode;try{Gh(t,n)}catch(i){et(s,s.return,i)}}}function lp(s,t,n){n.props=qn(s.type,s.memoizedProps),n.state=s.memoizedState;try{n.componentWillUnmount()}catch(i){et(s,t,i)}}function Ai(s,t){try{var n=s.ref;if(n!==null){switch(s.tag){case 26:case 27:case 5:var i=s.stateNode;break;case 30:i=s.stateNode;break;default:i=s.stateNode}typeof n=="function"?s.refCleanup=n(i):n.current=i}}catch(o){et(s,t,o)}}function fl(s,t){var n=s.ref,i=s.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(o){et(s,t,o)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){et(s,t,o)}else n.current=null}function np(s){var t=s.type,n=s.memoizedProps,i=s.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(o){et(s,s.return,o)}}function Fu(s,t,n){try{var i=s.stateNode;S0(i,s.type,n,t),i[Ve]=t}catch(o){et(s,s.return,o)}}function rp(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&xn(s.type)||s.tag===4}function Hu(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||rp(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&xn(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function qu(s,t,n){var i=s.tag;if(i===5||i===6)s=s.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(s,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(s),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Nl));else if(i!==4&&(i===27&&xn(s.type)&&(n=s.stateNode,t=null),s=s.child,s!==null))for(qu(s,t,n),s=s.sibling;s!==null;)qu(s,t,n),s=s.sibling}function ro(s,t,n){var i=s.tag;if(i===5||i===6)s=s.stateNode,t?n.insertBefore(s,t):n.appendChild(s);else if(i!==4&&(i===27&&xn(s.type)&&(n=s.stateNode),s=s.child,s!==null))for(ro(s,t,n),s=s.sibling;s!==null;)ro(s,t,n),s=s.sibling}function ip(s){var t=s.stateNode,n=s.memoizedProps;try{for(var i=s.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);sa(t,i,n),t[oe]=s,t[Ve]=n}catch(x){et(s,s.return,x)}}var Ml=!1,Ft=!1,Vu=!1,cp=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function l0(s,t){if(s=s.containerInfo,mm=To,s=vh(s),$d(s)){if("selectionStart"in s)var n={start:s.selectionStart,end:s.selectionEnd};else e:{n=(n=s.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var o=i.anchorOffset,x=i.focusNode;i=i.focusOffset;try{n.nodeType,x.nodeType}catch{n=null;break e}var v=0,k=-1,B=-1,ce=0,ve=0,ye=s,de=null;s:for(;;){for(var he;ye!==n||o!==0&&ye.nodeType!==3||(k=v+o),ye!==x||i!==0&&ye.nodeType!==3||(B=v+i),ye.nodeType===3&&(v+=ye.nodeValue.length),(he=ye.firstChild)!==null;)de=ye,ye=he;for(;;){if(ye===s)break s;if(de===n&&++ce===o&&(k=v),de===x&&++ve===i&&(B=v),(he=ye.nextSibling)!==null)break;ye=de,de=ye.parentNode}ye=he}n=k===-1||B===-1?null:{start:k,end:B}}else n=null}n=n||{start:0,end:0}}else n=null;for(xm={focusedElem:s,selectionRange:n},To=!1,Qt=t;Qt!==null;)if(t=Qt,s=t.child,(t.subtreeFlags&1028)!==0&&s!==null)s.return=t,Qt=s;else for(;Qt!==null;){switch(t=Qt,x=t.alternate,s=t.flags,t.tag){case 0:if((s&4)!==0&&(s=t.updateQueue,s=s!==null?s.events:null,s!==null))for(n=0;n title"))),sa(x,i,n),x[oe]=s,Kt(x),i=x;break e;case"link":var v=hg("link","href",o).get(i+(n.href||""));if(v){for(var k=0;kot&&(v=ot,ot=ls,ls=v);var ee=gh(k,ls),q=gh(k,ot);if(ee&&q&&(he.rangeCount!==1||he.anchorNode!==ee.node||he.anchorOffset!==ee.offset||he.focusNode!==q.node||he.focusOffset!==q.offset)){var ie=ye.createRange();ie.setStart(ee.node,ee.offset),he.removeAllRanges(),ls>ot?(he.addRange(ie),he.extend(q.node,q.offset)):(ie.setEnd(q.node,q.offset),he.addRange(ie))}}}}for(ye=[],he=k;he=he.parentNode;)he.nodeType===1&&ye.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;kn?32:n,D.T=null,n=Zu,Zu=null;var x=dn,v=Ol;if(qt=0,Or=dn=null,Ol=0,(Js&6)!==0)throw Error(c(331));var k=Js;if(Js|=4,vp(x.current),pp(x,x.current,v,n),Js=k,Ui(0,!1),rs&&typeof rs.onPostCommitFiberRoot=="function")try{rs.onPostCommitFiberRoot(Cs,x)}catch{}return!0}finally{Q.p=o,D.T=i,Up(s,t)}}function Ip(s,t,n){t=Ga(n,t),t=Au(s.stateNode,t,2),s=tn(s,t,2),s!==null&&(U(s,2),pl(s))}function et(s,t,n){if(s.tag===3)Ip(s,s,n);else for(;t!==null;){if(t.tag===3){Ip(t,s,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(on===null||!on.has(i))){s=Ga(n,s),n=Bf(2),i=tn(t,n,2),i!==null&&(Pf(n,i,t,s),U(i,2),pl(i));break}}t=t.return}}function tm(s,t,n){var i=s.pingCache;if(i===null){i=s.pingCache=new i0;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(n)||(Qu=!0,o.add(n),s=m0.bind(null,s,t,n),t.then(s,s))}function m0(s,t,n){var i=s.pingCache;i!==null&&i.delete(t),s.pingedLanes|=s.suspendedLanes&n,s.warmLanes&=~n,xt===s&&(Os&n)===n&&(At===4||At===3&&(Os&62914560)===Os&&300>Bs()-oo?(Js&2)===0&&Lr(s,0):Yu|=n,Dr===Os&&(Dr=0)),pl(s)}function Bp(s,t){t===0&&(t=te()),s=Dn(s,t),s!==null&&(U(s,t),pl(s))}function x0(s){var t=s.memoizedState,n=0;t!==null&&(n=t.retryLane),Bp(s,n)}function h0(s,t){var n=0;switch(s.tag){case 31:case 13:var i=s.stateNode,o=s.memoizedState;o!==null&&(n=o.retryLane);break;case 19:i=s.stateNode;break;case 22:i=s.stateNode._retryCache;break;default:throw Error(c(314))}i!==null&&i.delete(t),Bp(s,n)}function f0(s,t){return Ts(s,t)}var go=null,$r=null,am=!1,jo=!1,lm=!1,mn=0;function pl(s){s!==$r&&s.next===null&&($r===null?go=$r=s:$r=$r.next=s),jo=!0,am||(am=!0,g0())}function Ui(s,t){if(!lm&&jo){lm=!0;do for(var n=!1,i=go;i!==null;){if(s!==0){var o=i.pendingLanes;if(o===0)var x=0;else{var v=i.suspendedLanes,k=i.pingedLanes;x=(1<<31-ys(42|s)+1)-1,x&=o&~(v&~k),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(n=!0,qp(i,x))}else x=Os,x=ca(i,i===xt?x:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(x&3)===0||Fa(i,x)||(n=!0,qp(i,x));i=i.next}while(n);lm=!1}}function p0(){Pp()}function Pp(){jo=am=!1;var s=0;mn!==0&&C0()&&(s=mn);for(var t=Bs(),n=null,i=go;i!==null;){var o=i.next,x=Fp(i,t);x===0?(i.next=null,n===null?go=o:n.next=o,o===null&&($r=n)):(n=i,(s!==0||(x&3)!==0)&&(jo=!0)),i=o}qt!==0&&qt!==5||Ui(s),mn!==0&&(mn=0)}function Fp(s,t){for(var n=s.suspendedLanes,i=s.pingedLanes,o=s.expirationTimes,x=s.pendingLanes&-62914561;0k)break;var ve=B.transferSize,ye=B.initiatorType;ve&&Zp(ye)&&(B=B.responseEnd,v+=ve*(B"u"?null:document;function dg(s,t,n){var i=Ir;if(i&&typeof t=="string"&&t){var o=qa(t);o='link[rel="'+s+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),og.has(o)||(og.add(o),s={rel:s,crossOrigin:n,href:t},i.querySelector(o)===null&&(t=i.createElement("link"),sa(t,"link",s),Kt(t),i.head.appendChild(t)))}}function L0(s){Ll.D(s),dg("dns-prefetch",s,null)}function U0(s,t){Ll.C(s,t),dg("preconnect",s,t)}function $0(s,t,n){Ll.L(s,t,n);var i=Ir;if(i&&s&&t){var o='link[rel="preload"][as="'+qa(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+qa(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+qa(n.imageSizes)+'"]')):o+='[href="'+qa(s)+'"]';var x=o;switch(t){case"style":x=Br(s);break;case"script":x=Pr(s)}Za.has(x)||(s=j({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:s,as:t},n),Za.set(x,s),i.querySelector(o)!==null||t==="style"&&i.querySelector(Pi(x))||t==="script"&&i.querySelector(Fi(x))||(t=i.createElement("link"),sa(t,"link",s),Kt(t),i.head.appendChild(t)))}}function I0(s,t){Ll.m(s,t);var n=Ir;if(n&&s){var i=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+qa(i)+'"][href="'+qa(s)+'"]',x=o;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Pr(s)}if(!Za.has(x)&&(s=j({rel:"modulepreload",href:s},t),Za.set(x,s),n.querySelector(o)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Fi(x)))return}i=n.createElement("link"),sa(i,"link",s),Kt(i),n.head.appendChild(i)}}}function B0(s,t,n){Ll.S(s,t,n);var i=Ir;if(i&&s){var o=cr(i).hoistableStyles,x=Br(s);t=t||"default";var v=o.get(x);if(!v){var k={loading:0,preload:null};if(v=i.querySelector(Pi(x)))k.loading=5;else{s=j({rel:"stylesheet",href:s,"data-precedence":t},n),(n=Za.get(x))&&Nm(s,n);var B=v=i.createElement("link");Kt(B),sa(B,"link",s),B._p=new Promise(function(ce,ve){B.onload=ce,B.onerror=ve}),B.addEventListener("load",function(){k.loading|=1}),B.addEventListener("error",function(){k.loading|=2}),k.loading|=4,wo(v,t,i)}v={type:"stylesheet",instance:v,count:1,state:k},o.set(x,v)}}}function P0(s,t){Ll.X(s,t);var n=Ir;if(n&&s){var i=cr(n).hoistableScripts,o=Pr(s),x=i.get(o);x||(x=n.querySelector(Fi(o)),x||(s=j({src:s,async:!0},t),(t=Za.get(o))&&bm(s,t),x=n.createElement("script"),Kt(x),sa(x,"link",s),n.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},i.set(o,x))}}function F0(s,t){Ll.M(s,t);var n=Ir;if(n&&s){var i=cr(n).hoistableScripts,o=Pr(s),x=i.get(o);x||(x=n.querySelector(Fi(o)),x||(s=j({src:s,async:!0,type:"module"},t),(t=Za.get(o))&&bm(s,t),x=n.createElement("script"),Kt(x),sa(x,"link",s),n.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},i.set(o,x))}}function ug(s,t,n,i){var o=(o=A.current)?yo(o):null;if(!o)throw Error(c(446));switch(s){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Br(n.href),n=cr(o).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){s=Br(n.href);var x=cr(o).hoistableStyles,v=x.get(s);if(v||(o=o.ownerDocument||o,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(s,v),(x=o.querySelector(Pi(s)))&&!x._p&&(v.instance=x,v.state.loading=5),Za.has(s)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Za.set(s,n),x||H0(o,s,n,v.state))),t&&i===null)throw Error(c(528,""));return v}if(t&&i!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pr(n),n=cr(o).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,s))}}function Br(s){return'href="'+qa(s)+'"'}function Pi(s){return'link[rel="stylesheet"]['+s+"]"}function mg(s){return j({},s,{"data-precedence":s.precedence,precedence:null})}function H0(s,t,n,i){s.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=s.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),sa(t,"link",n),Kt(t),s.head.appendChild(t))}function Pr(s){return'[src="'+qa(s)+'"]'}function Fi(s){return"script[async]"+s}function xg(s,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=s.querySelector('style[data-href~="'+qa(n.href)+'"]');if(i)return t.instance=i,Kt(i),i;var o=j({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(s.ownerDocument||s).createElement("style"),Kt(i),sa(i,"style",o),wo(i,n.precedence,s),t.instance=i;case"stylesheet":o=Br(n.href);var x=s.querySelector(Pi(o));if(x)return t.state.loading|=4,t.instance=x,Kt(x),x;i=mg(n),(o=Za.get(o))&&Nm(i,o),x=(s.ownerDocument||s).createElement("link"),Kt(x);var v=x;return v._p=new Promise(function(k,B){v.onload=k,v.onerror=B}),sa(x,"link",i),t.state.loading|=4,wo(x,n.precedence,s),t.instance=x;case"script":return x=Pr(n.src),(o=s.querySelector(Fi(x)))?(t.instance=o,Kt(o),o):(i=n,(o=Za.get(x))&&(i=j({},n),bm(i,o)),s=s.ownerDocument||s,o=s.createElement("script"),Kt(o),sa(o,"link",i),s.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,wo(i,n.precedence,s));return t.instance}function wo(s,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=i.length?i[i.length-1]:null,x=o,v=0;v title"):null)}function q0(s,t,n){if(n===1||t.itemProp!=null)return!1;switch(s){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 s=t.disabled,typeof t.precedence=="string"&&s==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 pg(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function V0(s,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Br(i.href),x=t.querySelector(Pi(o));if(x){t=x._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(s.count++,s=So.bind(s),t.then(s,s)),n.state.loading|=4,n.instance=x,Kt(x);return}x=t.ownerDocument||t,i=mg(i),(o=Za.get(o))&&Nm(i,o),x=x.createElement("link"),Kt(x);var v=x;v._p=new Promise(function(k,B){v.onload=k,v.onerror=B}),sa(x,"link",i),n.instance=x}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(s.count++,n=So.bind(s),t.addEventListener("load",n),t.addEventListener("error",n))}}var ym=0;function G0(s,t){return s.stylesheets&&s.count===0&&Co(s,s.stylesheets),0ym?50:800)+t);return s.unsuspend=n,function(){s.unsuspend=null,clearTimeout(i),clearTimeout(o)}}:null}function So(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Co(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var ko=null;function Co(s,t){s.stylesheets=null,s.unsuspend!==null&&(s.count++,ko=new Map,t.forEach(K0,s),ko=null,So.call(s))}function K0(s,t){if(!(t.state.loading&4)){var n=ko.get(s);if(n)var i=n.get(null);else{n=new Map,ko.set(s,n);for(var o=s.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),Rm.exports=L1(),Rm.exports}var $1=U1();function P(...a){return xw(hw(a))}const Te=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("rounded-xl border bg-card text-card-foreground shadow",a),...l}));Te.displayName="Card";const Oe=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("flex flex-col space-y-1.5 p-6",a),...l}));Oe.displayName="CardHeader";const Ue=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("font-semibold leading-none tracking-tight",a),...l}));Ue.displayName="CardTitle";const Ns=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("text-sm text-muted-foreground",a),...l}));Ns.displayName="CardDescription";const ze=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("p-6 pt-0",a),...l}));ze.displayName="CardContent";const od=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("flex items-center p-6 pt-0",a),...l}));od.displayName="CardFooter";const Jt=pw,Gt=u.forwardRef(({className:a,...l},r)=>e.jsx(hj,{ref:r,className:P("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...l}));Gt.displayName=hj.displayName;const Xe=u.forwardRef(({className:a,...l},r)=>e.jsx(fj,{ref:r,className:P("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...l}));Xe.displayName=fj.displayName;const Ss=u.forwardRef(({className:a,...l},r)=>e.jsx(pj,{ref:r,className:P("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:animate-in data-[state=active]:fade-in data-[state=active]:duration-300",a),...l}));Ss.displayName=pj.displayName;const ts=u.forwardRef(({className:a,children:l,viewportRef:r,...c},d)=>e.jsxs(gj,{ref:d,className:P("relative overflow-hidden",a),...c,children:[e.jsx(gw,{ref:r,className:"h-full w-full rounded-[inherit]",children:l}),e.jsx(Xm,{}),e.jsx(Xm,{orientation:"horizontal"}),e.jsx(jw,{})]}));ts.displayName=gj.displayName;const Xm=u.forwardRef(({className:a,orientation:l="vertical",...r},c)=>e.jsx(jj,{ref:c,orientation:l,className:P("flex touch-none select-none transition-colors",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",a),...r,children:e.jsx(vw,{className:"relative flex-1 rounded-full bg-border"})}));Xm.displayName=jj.displayName;function ks({className:a,...l}){return e.jsx("div",{className:P("animate-pulse rounded-md bg-primary/10",a),...l})}const tr=u.forwardRef(({className:a,value:l,...r},c)=>e.jsx(vj,{ref:c,className:P("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",a),...r,children:e.jsx(Nw,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(l||0)}%)`}})}));tr.displayName=vj.displayName;async function ke(a,l){const c=l?.body instanceof FormData?{...l?.headers}:{"Content-Type":"application/json",...l?.headers},d={...l,credentials:"include",headers:c},m=await fetch(a,d);if(m.status===401)throw window.location.href="/auth",new Error("认证失败,请重新登录");return m}function Zs(){return{"Content-Type":"application/json"}}async function I1(){try{await fetch("/api/webui/auth/logout",{method:"POST",credentials:"include"})}catch(a){console.error("登出请求失败:",a)}window.location.href="/auth"}async function dc(){try{return(await(await fetch("/api/webui/auth/check",{method:"GET",credentials:"include"})).json()).authenticated===!0}catch{return!1}}const B1={light:"",dark:".dark"},Mv=u.createContext(null);function Av(){const a=u.useContext(Mv);if(!a)throw new Error("useChart must be used within a ");return a}const Kr=u.forwardRef(({id:a,className:l,children:r,config:c,...d},m)=>{const h=u.useId(),f=`chart-${a||h.replace(/:/g,"")}`;return e.jsx(Mv.Provider,{value:{config:c},children:e.jsxs("div",{"data-chart":f,ref:m,className:P("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",l),...d,children:[e.jsx(P1,{id:f,config:c}),e.jsx(Uj,{children:r})]})})});Kr.displayName="Chart";const P1=({id:a,config:l})=>{const r=Object.entries(l).filter(([,c])=>c.theme||c.color);return r.length?e.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(B1).map(([c,d])=>` ${d} [data-chart=${a}] { ${r.map(([m,h])=>{const f=h.theme?.[c]||h.color;return f?` --color-${m}: ${f};`:null}).join(` `)} } `).join(` -`)}}):null},Qi=$j,Qr=u.forwardRef(({active:a,payload:l,className:r,indicator:c="dot",hideLabel:d=!1,hideIndicator:m=!1,label:h,labelFormatter:f,labelClassName:p,formatter:g,color:N,nameKey:j,labelKey:b},y)=>{const{config:w}=Av(),z=u.useMemo(()=>{if(d||!l?.length)return null;const[S]=l,F=`${b||S?.dataKey||S?.name||"value"}`,E=Zm(w,S,F),C=!b&&typeof h=="string"?w[h]?.label||h:E?.label;return f?e.jsx("div",{className:P("font-medium",p),children:f(C,l)}):C?e.jsx("div",{className:P("font-medium",p),children:C}):null},[h,f,l,d,p,w,b]);if(!a||!l?.length)return null;const M=l.length===1&&c!=="dot";return e.jsxs("div",{ref:y,className:P("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",r),children:[M?null:z,e.jsx("div",{className:"grid gap-1.5",children:l.filter(S=>S.type!=="none").map((S,F)=>{const E=`${j||S.name||S.dataKey||"value"}`,C=Zm(w,S,E),R=N||S.payload.fill||S.color;return e.jsx("div",{className:P("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",c==="dot"&&"items-center"),children:g&&S?.value!==void 0&&S.name?g(S.value,S.name,S,F,S.payload):e.jsxs(e.Fragment,{children:[C?.icon?e.jsx(C.icon,{}):!m&&e.jsx("div",{className:P("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":c==="dot","w-1":c==="line","w-0 border-[1.5px] border-dashed bg-transparent":c==="dashed","my-0.5":M&&c==="dashed"}),style:{"--color-bg":R,"--color-border":R}}),e.jsxs("div",{className:P("flex flex-1 justify-between leading-none",M?"items-end":"items-center"),children:[e.jsxs("div",{className:"grid gap-1.5",children:[M?z:null,e.jsx("span",{className:"text-muted-foreground",children:C?.label||S.name})]}),S.value&&e.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:S.value.toLocaleString()})]})]})},S.dataKey)})})]})});Qr.displayName="ChartTooltip";const F_=Zw,zv=u.forwardRef(({className:a,hideIcon:l=!1,payload:r,verticalAlign:c="bottom",nameKey:d},m)=>{const{config:h}=Av();return r?.length?e.jsx("div",{ref:m,className:P("flex items-center justify-center gap-4",c==="top"?"pb-3":"pt-3",a),children:r.filter(f=>f.type!=="none").map(f=>{const p=`${d||f.dataKey||"value"}`,g=Zm(h,f,p);return e.jsxs("div",{className:P("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[g?.icon&&!l?e.jsx(g.icon,{}):e.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:f.color}}),g?.label]},f.value)})}):null});zv.displayName="ChartLegend";function Zm(a,l,r){if(typeof l!="object"||l===null)return;const c="payload"in l&&typeof l.payload=="object"&&l.payload!==null?l.payload:void 0;let d=r;return r in l&&typeof l[r]=="string"?d=l[r]:c&&r in c&&typeof c[r]=="string"&&(d=c[r]),d in a?a[d]:a[r]}const si=ti("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),_=u.forwardRef(({className:a,variant:l,size:r,asChild:c=!1,...d},m)=>{const h=c?l1:"button";return e.jsx(h,{className:P(si({variant:l,size:r,className:a})),ref:m,...d})});_.displayName="Button";const H_=ti("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ce({className:a,variant:l,...r}){return e.jsx("div",{className:P(H_({variant:l}),a),...r})}async function q_(){const a=await ke("/api/webui/system/restart",{method:"POST",headers:Zs()});if(!a.ok){const l=await a.json();throw new Error(l.detail||"重启失败")}return await a.json()}async function V_(){const a=await ke("/api/webui/system/status",{method:"GET",headers:Zs()});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取状态失败")}return await a.json()}const Hr={INITIAL_DELAY:3e3,CHECK_INTERVAL:2e3,CHECK_TIMEOUT:3e3,MAX_ATTEMPTS:60,PROGRESS_INTERVAL:200,SUCCESS_REDIRECT_DELAY:1500},Rv=u.createContext(null);function lr({children:a,onRestartComplete:l,onRestartFailed:r,healthCheckUrl:c="/api/webui/system/status",maxAttempts:d=Hr.MAX_ATTEMPTS}){const[m,h]=u.useState({status:"idle",progress:0,elapsedTime:0,checkAttempts:0,maxAttempts:d}),f=u.useRef({}),p=u.useCallback(()=>{const z=f.current;z.progress&&(clearInterval(z.progress),z.progress=void 0),z.elapsed&&(clearInterval(z.elapsed),z.elapsed=void 0),z.check&&(clearTimeout(z.check),z.check=void 0)},[]),g=u.useCallback(()=>{p(),h({status:"idle",progress:0,elapsedTime:0,checkAttempts:0,maxAttempts:d})},[p,d]),N=u.useCallback(async()=>{try{const z=new AbortController,M=setTimeout(()=>z.abort(),Hr.CHECK_TIMEOUT),S=await fetch(c,{method:"GET",headers:{"Content-Type":"application/json"},credentials:"include",signal:z.signal});return clearTimeout(M),S.ok}catch{return!1}},[c]),j=u.useCallback(()=>{let z=0;const M=async()=>{if(z++,h(F=>({...F,status:"checking",checkAttempts:z})),await N())p(),h(F=>({...F,status:"success",progress:100})),setTimeout(()=>{l?.(),window.location.href="/auth"},Hr.SUCCESS_REDIRECT_DELAY);else if(z>=d){p();const F=`健康检查超时 (${z}/${d})`;h(E=>({...E,status:"failed",error:F})),r?.(F)}else{const F=setTimeout(M,Hr.CHECK_INTERVAL);f.current.check=F}};M()},[N,p,d,l,r]),b=u.useCallback(()=>{h(z=>({...z,status:"checking",checkAttempts:0,error:void 0})),j()},[j]),y=u.useCallback(async z=>{const{delay:M=0,skipApiCall:S=!1}=z??{};if(m.status!=="idle"&&m.status!=="failed")return;if(p(),h({status:"requesting",progress:0,elapsedTime:0,checkAttempts:0,maxAttempts:d}),M>0&&await new Promise(C=>setTimeout(C,M)),S)h(C=>({...C,status:"restarting"}));else try{h(C=>({...C,status:"restarting"})),await Promise.race([q_(),new Promise(C=>setTimeout(C,5e3))])}catch{}const F=setInterval(()=>{h(C=>({...C,progress:C.progress>=90?C.progress:C.progress+1}))},Hr.PROGRESS_INTERVAL),E=setInterval(()=>{h(C=>({...C,elapsedTime:C.elapsedTime+1}))},1e3);f.current.progress=F,f.current.elapsed=E,setTimeout(()=>{j()},Hr.INITIAL_DELAY)},[m.status,p,d,j]),w={state:m,isRestarting:m.status!=="idle",triggerRestart:y,resetState:g,retryHealthCheck:b};return e.jsx(Rv.Provider,{value:w,children:a})}function Tn(){const a=u.useContext(Rv);if(!a)throw new Error("useRestart must be used within a RestartProvider");return a}function G_(){try{return Tn()}catch{return null}}const K_=(a,l,r,c,d)=>({idle:{icon:null,title:"",description:"",tip:""},requesting:{icon:e.jsx(Fs,{className:"h-16 w-16 text-primary animate-spin"}),title:c??"准备重启",description:d??"正在发送重启请求...",tip:"🔄 正在准备重启麦麦..."},restarting:{icon:e.jsx(Fs,{className:"h-16 w-16 text-primary animate-spin"}),title:c??"正在重启麦麦",description:d??"请稍候,麦麦正在重启中...",tip:"🔄 配置已保存,正在重启主程序..."},checking:{icon:e.jsx(Fs,{className:"h-16 w-16 text-primary animate-spin"}),title:"检查服务状态",description:`等待服务恢复... (${l}/${r})`,tip:"⏳ 正在等待服务恢复,请勿关闭页面..."},success:{icon:e.jsx(st,{className:"h-16 w-16 text-green-500"}),title:"重启成功",description:"正在跳转到登录页面...",tip:"✅ 配置已生效,服务运行正常"},failed:{icon:e.jsx(Ut,{className:"h-16 w-16 text-destructive"}),title:"重启超时",description:"服务未能在预期时间内恢复",tip:"⚠️ 如果长时间无响应,请尝试手动重启"}})[a];function nr({visible:a,onComplete:l,onFailed:r,title:c,description:d,showAnimation:m=!0,className:h}){const f=G_();return(f?f.isRestarting:a)?f?e.jsx(Dv,{state:f.state,onRetry:f.retryHealthCheck,onComplete:l,onFailed:r,title:c,description:d,showAnimation:m,className:h}):e.jsx(Q_,{onComplete:l,onFailed:r,title:c,description:d,showAnimation:m,className:h}):null}function Dv({state:a,onRetry:l,onComplete:r,onFailed:c,title:d,description:m,showAnimation:h,className:f}){const{status:p,progress:g,elapsedTime:N,checkAttempts:j,maxAttempts:b}=a;u.useEffect(()=>{p==="success"&&r?r():p==="failed"&&c&&c()},[p,r,c]);const y=K_(p,j,b,d,m),w=z=>{const M=Math.floor(z/60),S=z%60;return`${M}:${S.toString().padStart(2,"0")}`};return e.jsxs("div",{className:P("fixed inset-0 bg-background/95 backdrop-blur-sm z-50 flex items-center justify-center",f),children:[h&&e.jsx(Y_,{}),e.jsxs("div",{className:"max-w-md w-full mx-4 space-y-8 relative z-10",children:[e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsxs("div",{className:"relative",children:[y.icon,(p==="restarting"||p==="checking")&&e.jsx("div",{className:"absolute inset-0 rounded-full bg-primary/20 animate-ping"})]}),e.jsx("h2",{className:"text-2xl font-bold",children:y.title}),e.jsx("p",{className:"text-muted-foreground text-center",children:y.description})]}),p!=="failed"&&p!=="idle"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(tr,{value:g,className:"h-2"}),e.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[e.jsxs("span",{children:[g,"%"]}),e.jsxs("span",{children:["已用时: ",w(N)]})]})]}),e.jsx("div",{className:"bg-muted/50 rounded-lg p-4",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:y.tip})}),p==="failed"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(_,{onClick:()=>window.location.reload(),variant:"default",className:"flex-1",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),"刷新页面"]}),e.jsxs(_,{onClick:l,variant:"secondary",className:"flex-1",children:[e.jsx(rc,{className:"mr-2 h-4 w-4"}),"重试检测"]})]})]})]})}function Q_({onComplete:a,onFailed:l,title:r,description:c,showAnimation:d,className:m}){const[h,f]=u.useState({status:"restarting",progress:0,elapsedTime:0,checkAttempts:0,maxAttempts:60}),p=u.useCallback(()=>{let g=0;const N=60,j=async()=>{g++,f(b=>({...b,status:"checking",checkAttempts:g}));try{if((await fetch("/api/webui/system/status",{method:"GET",signal:AbortSignal.timeout(3e3)})).ok){f(y=>({...y,status:"success",progress:100})),setTimeout(()=>{a?.(),window.location.href="/auth"},1500);return}}catch{}g>=N?(f(b=>({...b,status:"failed"})),l?.()):setTimeout(j,2e3)};j()},[a,l]);return u.useEffect(()=>{const g=setInterval(()=>{f(b=>({...b,progress:b.progress>=90?b.progress:b.progress+1}))},200),N=setInterval(()=>{f(b=>({...b,elapsedTime:b.elapsedTime+1}))},1e3),j=setTimeout(()=>{p()},3e3);return()=>{clearInterval(g),clearInterval(N),clearTimeout(j)}},[p]),e.jsx(Dv,{state:h,onRetry:p,onComplete:a,onFailed:l,title:r,description:c,showAnimation:d,className:m})}function Y_(){return e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsxs("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px]",children:[e.jsx("div",{className:"absolute inset-0 rounded-full border border-primary/10 animate-[ping_3s_ease-in-out_infinite]"}),e.jsx("div",{className:"absolute inset-8 rounded-full border border-primary/10 animate-[ping_3s_ease-in-out_infinite_0.5s]"}),e.jsx("div",{className:"absolute inset-16 rounded-full border border-primary/10 animate-[ping_3s_ease-in-out_infinite_1s]"})]}),e.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-primary/20 rounded-full animate-bounce"}),e.jsx("div",{className:"absolute top-3/4 right-1/4 w-3 h-3 bg-primary/15 rounded-full animate-bounce delay-150"}),e.jsx("div",{className:"absolute top-1/2 right-1/3 w-2 h-2 bg-primary/20 rounded-full animate-bounce delay-300"})]})}const Qs=i1,dd=c1,J_=n1,Ov=u.forwardRef(({className:a,...l},r)=>e.jsx(Bj,{ref:r,className:P("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l}));Ov.displayName=Bj.displayName;const Hs=u.forwardRef(({className:a,children:l,preventOutsideClose:r=!1,hideCloseButton:c=!1,...d},m)=>e.jsxs(J_,{children:[e.jsx(Ov,{}),e.jsxs(Ij,{ref:m,className:P("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),onPointerDownOutside:r?h=>h.preventDefault():void 0,onInteractOutside:r?h=>h.preventDefault():void 0,...d,children:[l,!c&&e.jsxs(r1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Sa,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Hs.displayName=Ij.displayName;const qs=({className:a,...l})=>e.jsx("div",{className:P("flex flex-col space-y-1.5 text-center sm:text-left",a),...l});qs.displayName="DialogHeader";const gt=({className:a,...l})=>e.jsx("div",{className:P("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...l});gt.displayName="DialogFooter";const Vs=u.forwardRef(({className:a,...l},r)=>e.jsx(Pj,{ref:r,className:P("text-lg font-semibold leading-none tracking-tight",a),...l}));Vs.displayName=Pj.displayName;const at=u.forwardRef(({className:a,...l},r)=>e.jsx(Fj,{ref:r,className:P("text-sm text-muted-foreground",a),...l}));at.displayName=Fj.displayName;const ne=u.forwardRef(({className:a,type:l,...r},c)=>e.jsx("input",{type:l,className:P("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:c,...r}));ne.displayName="Input";const tt=u.forwardRef(({className:a,...l},r)=>e.jsx(Hj,{ref:r,className:P("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...l,children:e.jsx(o1,{className:P("grid place-content-center text-current"),children:e.jsx(Ot,{className:"h-4 w-4"})})}));tt.displayName=Hj.displayName;const Pe=f1,Fe=p1,Be=u.forwardRef(({className:a,children:l,...r},c)=>e.jsxs(qj,{ref:c,className:P("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...r,children:[l,e.jsx(d1,{asChild:!0,children:e.jsx(Ba,{className:"h-4 w-4 opacity-50"})})]}));Be.displayName=qj.displayName;const Lv=u.forwardRef(({className:a,...l},r)=>e.jsx(Vj,{ref:r,className:P("flex cursor-default items-center justify-center py-1",a),...l,children:e.jsx(Xr,{className:"h-4 w-4"})}));Lv.displayName=Vj.displayName;const Uv=u.forwardRef(({className:a,...l},r)=>e.jsx(Gj,{ref:r,className:P("flex cursor-default items-center justify-center py-1",a),...l,children:e.jsx(Ba,{className:"h-4 w-4"})}));Uv.displayName=Gj.displayName;const Ie=u.forwardRef(({className:a,children:l,position:r="popper",...c},d)=>e.jsx(u1,{children:e.jsxs(Kj,{ref:d,className:P("relative z-[100] max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-hidden rounded-md border border-border bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:r,...c,children:[e.jsx(Lv,{}),e.jsx(m1,{className:P("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l}),e.jsx(Uv,{})]})}));Ie.displayName=Kj.displayName;const X_=u.forwardRef(({className:a,...l},r)=>e.jsx(Qj,{ref:r,className:P("px-2 py-1.5 text-sm font-semibold",a),...l}));X_.displayName=Qj.displayName;const W=u.forwardRef(({className:a,children:l,...r},c)=>e.jsxs(Yj,{ref:c,className:P("relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-2 pr-8 text-sm outline-none bg-white dark:bg-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 focus:bg-gray-100 dark:focus:bg-gray-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...r,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(x1,{children:e.jsx(Ot,{className:"h-4 w-4"})})}),e.jsx(h1,{children:l})]}));W.displayName=Yj.displayName;const Z_=u.forwardRef(({className:a,...l},r)=>e.jsx(Jj,{ref:r,className:P("-mx-1 my-1 h-px bg-muted",a),...l}));Z_.displayName=Jj.displayName;const fx=({className:a,...l})=>e.jsx("nav",{role:"navigation","aria-label":"pagination",className:P("mx-auto flex w-full justify-center",a),...l});fx.displayName="Pagination";const px=u.forwardRef(({className:a,...l},r)=>e.jsx("ul",{ref:r,className:P("flex flex-row items-center gap-1",a),...l}));px.displayName="PaginationContent";const Xn=u.forwardRef(({className:a,...l},r)=>e.jsx("li",{ref:r,className:P("",a),...l}));Xn.displayName="PaginationItem";const jc=({className:a,isActive:l,size:r="icon",...c})=>e.jsx("a",{"aria-current":l?"page":void 0,className:P(si({variant:l?"outline":"ghost",size:r}),a),...c});jc.displayName="PaginationLink";const $v=({className:a,...l})=>e.jsxs(jc,{"aria-label":"Go to previous page",size:"default",className:P("gap-1 pl-2.5",a),...l,children:[e.jsx(Pa,{className:"h-4 w-4"}),e.jsx("span",{children:"上一页"})]});$v.displayName="PaginationPrevious";const Bv=({className:a,...l})=>e.jsxs(jc,{"aria-label":"Go to next page",size:"default",className:P("gap-1 pr-2.5",a),...l,children:[e.jsx("span",{children:"下一页"}),e.jsx(ra,{className:"h-4 w-4"})]});Bv.displayName="PaginationNext";const Iv=({className:a,...l})=>e.jsxs("span",{"aria-hidden":!0,className:P("flex h-9 w-9 items-center justify-center",a),...l,children:[e.jsx(C1,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"More pages"})]});Iv.displayName="PaginationEllipsis";const W_=5,e2=5e3;let Lm=0;function s2(){return Lm=(Lm+1)%Number.MAX_SAFE_INTEGER,Lm.toString()}const Um=new Map,Ug=a=>{if(Um.has(a))return;const l=setTimeout(()=>{Um.delete(a),ac({type:"REMOVE_TOAST",toastId:a})},e2);Um.set(a,l)},t2=(a,l)=>{switch(l.type){case"ADD_TOAST":return{...a,toasts:[l.toast,...a.toasts].slice(0,W_)};case"UPDATE_TOAST":return{...a,toasts:a.toasts.map(r=>r.id===l.toast.id?{...r,...l.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=l;return r?Ug(r):a.toasts.forEach(c=>{Ug(c.id)}),{...a,toasts:a.toasts.map(c=>c.id===r||r===void 0?{...c,open:!1}:c)}}case"REMOVE_TOAST":return l.toastId===void 0?{...a,toasts:[]}:{...a,toasts:a.toasts.filter(r=>r.id!==l.toastId)}}},Fo=[];let Ho={toasts:[]};function ac(a){Ho=t2(Ho,a),Fo.forEach(l=>{l(Ho)})}function aa({...a}){const l=s2(),r=d=>ac({type:"UPDATE_TOAST",toast:{...d,id:l}}),c=()=>ac({type:"DISMISS_TOAST",toastId:l});return ac({type:"ADD_TOAST",toast:{...a,id:l,open:!0,onOpenChange:d=>{d||c()}}}),{id:l,dismiss:c,update:r}}function nt(){const[a,l]=u.useState(Ho);return u.useEffect(()=>(Fo.push(l),()=>{const r=Fo.indexOf(l);r>-1&&Fo.splice(r,1)}),[a]),{...a,toast:aa,dismiss:r=>ac({type:"DISMISS_TOAST",toastId:r})}}const dl="/api/webui/expression";async function gx(){const a=await ke(`${dl}/chats`,{});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取聊天列表失败")}return a.json()}async function a2(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.search&&l.append("search",a.search),a.chat_id&&l.append("chat_id",a.chat_id);const r=await ke(`${dl}/list?${l}`,{});if(!r.ok){const c=await r.json();throw new Error(c.detail||"获取表达方式列表失败")}return r.json()}async function l2(a){const l=await ke(`${dl}/${a}`,{});if(!l.ok){const r=await l.json();throw new Error(r.detail||"获取表达方式详情失败")}return l.json()}async function n2(a){const l=await ke(`${dl}/`,{method:"POST",body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"创建表达方式失败")}return l.json()}async function r2(a,l){const r=await ke(`${dl}/${a}`,{method:"PATCH",body:JSON.stringify(l)});if(!r.ok){const c=await r.json();throw new Error(c.detail||"更新表达方式失败")}return r.json()}async function i2(a){const l=await ke(`${dl}/${a}`,{method:"DELETE"});if(!l.ok){const r=await l.json();throw new Error(r.detail||"删除表达方式失败")}return l.json()}async function c2(a){const l=await ke(`${dl}/batch/delete`,{method:"POST",body:JSON.stringify({ids:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量删除表达方式失败")}return l.json()}async function o2(){const a=await ke(`${dl}/stats/summary`,{});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取统计数据失败")}return a.json()}async function jx(){const a=await ke(`${dl}/review/stats`);if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取审核统计失败")}return a.json()}async function $g(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.filter_type&&l.append("filter_type",a.filter_type),a.search&&l.append("search",a.search),a.chat_id&&l.append("chat_id",a.chat_id);const r=await ke(`${dl}/review/list?${l}`);if(!r.ok){const c=await r.json();throw new Error(c.detail||"获取审核列表失败")}return r.json()}async function $m(a){const l=await ke(`${dl}/review/batch`,{method:"POST",body:JSON.stringify({items:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量审核失败")}return l.json()}function Pv({open:a,onOpenChange:l}){const[r,c]=u.useState("list"),[d,m]=u.useState(null),[h,f]=u.useState([]),[p,g]=u.useState("unchecked"),[N,j]=u.useState([]),[b,y]=u.useState(0),[w,z]=u.useState(!1),[M,S]=u.useState(0),[F,E]=u.useState(1),[C,R]=u.useState(null),[H,O]=u.useState(0),[X,L]=u.useState(!1),[me,Ne]=u.useState(null),je=u.useRef(null),ce=u.useRef(null),ge=u.useRef(!1),[pe,D]=u.useState(!1),[Q,B]=u.useState(!1),[ue,Y]=u.useState(0),[we,fe]=u.useState(1),[Ee,G]=u.useState(20),[$,A]=u.useState(""),[K,Re]=u.useState("unchecked"),[se,$e]=u.useState(""),[cs,J]=u.useState(""),[Z,Le]=u.useState(new Set),[le,De]=u.useState(new Set),[xe,Me]=u.useState(new Map),{toast:ds}=nt(),Ts=u.useCallback(async()=>{try{B(!0);const U=await jx();m(U)}catch(U){console.error("加载统计失败:",U)}finally{B(!1)}},[]),Ct=u.useCallback(async()=>{try{D(!0);const U=await $g({page:we,page_size:Ee,filter_type:K,search:se||void 0});f(U.data),Y(U.total)}catch(U){ds({title:"加载失败",description:U instanceof Error?U.message:"无法加载列表",variant:"destructive"})}finally{D(!1)}},[we,Ee,K,se,ds]),ia=u.useCallback(async()=>{try{const U=await gx();if(U?.data){const Se=new Map;U.data.forEach(as=>{Se.set(as.chat_id,as.chat_name)}),Me(Se)}}catch(U){console.error("加载聊天名称失败:",U)}},[]),ut=u.useCallback(async(U=!0,Se=!1)=>{try{z(!0);const as=Se?F+1:F,us=await $g({page:as,page_size:20,filter_type:p});Se?(j(es=>[...es,...us.data]),E(as)):j(us.data),S(us.total),U&&y(0)}catch(as){ds({title:"加载失败",description:as instanceof Error?as.message:"无法加载列表",variant:"destructive"})}finally{z(!1)}},[F,p,ds]);u.useEffect(()=>{r==="quick"&&(E(1),y(0))},[p,r]),u.useEffect(()=>{a&&r==="quick"&&(ut(),Ts())},[a,r,F,p,ut,Ts]);const Is=u.useCallback(U=>U?p==="unchecked"?{left:!0,right:!0}:p==="passed"?{left:!0,right:!1}:p==="rejected"?{left:!1,right:!0}:U.checked?U.rejected?{left:!1,right:!0}:{left:!0,right:!1}:{left:!0,right:!0}:{left:!1,right:!1},[p]),V=u.useCallback(async U=>{const Se=N[b];if(!Se||X)return;const as=Is(Se);if(!(U&&!as.left||!U&&!as.right)){L(!0),R(U?"left":"right"),O(U?-400:400);try{(await $m([{id:Se.id,rejected:U,require_unchecked:p==="unchecked"}])).results[0]?.success?(ds({title:U?"已拒绝":"已通过",description:`表达方式 #${Se.id} ${U?"已拒绝":"已通过"}`}),setTimeout(()=>{j(es=>es.filter((Tt,$s)=>$s!==b)),S(es=>es-1),b>=N.length-1&&y(Math.max(0,b-1)),R(null),O(0),L(!1),Ts(),N.length<=1&&M>1&&ut(!1)},300)):(Ne(Se.id),ds({title:"数据冲突",description:"该条目已被后台任务处理,正在刷新数据...",variant:"destructive"}),setTimeout(()=>{Ne(null),R(null),O(0),L(!1),ut(!1),Ts()},1500))}catch(us){ds({title:"操作失败",description:us instanceof Error?us.message:"未知错误",variant:"destructive"}),R(null),O(0),L(!1)}}},[N,b,X,Is,p,ds,Ts,M,ut]),Ke=u.useCallback((U,Se)=>{X||(ce.current={x:U,y:Se},ge.current=!1)},[X]),He=u.useCallback(U=>{X||(L(!0),O(U==="left"?-30:30),setTimeout(()=>{O(0),setTimeout(()=>L(!1),300)},150))},[X]),Je=u.useCallback(U=>{if(!ce.current||X)return;const Se=U-ce.current.x,as=N[b],us=Is(as);if(Se<0&&!us.left){O(Se*.2),R(null);return}if(Se>0&&!us.right){O(Se*.2),R(null);return}ge.current=!0,O(Se),Math.abs(Se)>50?R(Se>0?"right":"left"):R(null)},[N,b,Is,X]),Es=u.useCallback(()=>{if(!ce.current)return;Math.abs(H)>100&&C?V(C==="left"):(O(0),R(null)),ce.current=null,ge.current=!1},[H,C,V]),ms=u.useCallback(U=>{Ke(U.clientX,U.clientY)},[Ke]),Ms=u.useCallback(U=>{ce.current&&(U.preventDefault(),Je(U.clientX))},[Je]),We=u.useCallback(()=>{Es()},[Es]),Cs=u.useCallback(()=>{ce.current&&Es()},[Es]),rs=u.useCallback(U=>{const Se=U.touches[0];Ke(Se.clientX,Se.clientY)},[Ke]),is=u.useCallback(U=>{const Se=U.touches[0];Je(Se.clientX)},[Je]),ys=u.useCallback(()=>{Es()},[Es]);u.useEffect(()=>{if(!a||r!=="quick")return;const U=Se=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(Se.key)||(Se.preventDefault(),Se.stopPropagation(),Se.stopImmediatePropagation(),X||w))return;const as=N[b],us=Is(as);Se.key==="ArrowLeft"?us.left?V(!0):He("left"):Se.key==="ArrowRight"?us.right?V(!1):He("right"):Se.key==="ArrowDown"?bes+1):Se.key==="ArrowUp"&&b>0&&y(es=>es-1)};return window.addEventListener("keydown",U,!0),()=>window.removeEventListener("keydown",U,!0)},[a,r,N,b,X,w,Is,V,He]),u.useEffect(()=>{if(!a||r!=="quick"||w)return;const U=N.length-b-1,Se=N.length{a&&(Ts(),Ct(),ia())},[a,Ts,Ct,ia]),u.useEffect(()=>{fe(1),Le(new Set)},[K,se]),u.useEffect(()=>{Le(new Set)},[h]);const rt=()=>{$e(cs),fe(1)},jt=U=>xe.get(U)||U,Ae=async(U,Se)=>{try{De(us=>new Set(us).add(U));const as=await $m([{id:U,rejected:Se,require_unchecked:K==="unchecked"}]);as.results[0]?.success?(ds({title:Se?"已拒绝":"已通过",description:`表达方式 #${U} ${Se?"已拒绝":"已通过"}`}),Ct(),Ts()):ds({title:"操作失败",description:as.results[0]?.message||"未知错误",variant:"destructive"})}catch(as){ds({title:"操作失败",description:as instanceof Error?as.message:"未知错误",variant:"destructive"})}finally{De(as=>{const us=new Set(as);return us.delete(U),us})}},Qe=async U=>{if(Z.size===0){ds({title:"请选择",description:"请先选择要审核的表达方式",variant:"destructive"});return}try{D(!0);const Se=Array.from(Z).map(us=>({id:us,rejected:U,require_unchecked:K==="unchecked"})),as=await $m(Se);ds({title:"批量审核完成",description:`成功 ${as.succeeded} 条,失败 ${as.failed} 条`,variant:as.failed>0?"destructive":"default"}),Le(new Set),Ct(),Ts()}catch(Se){ds({title:"批量审核失败",description:Se instanceof Error?Se.message:"未知错误",variant:"destructive"})}finally{D(!1)}},As=()=>{Z.size===h.length?Le(new Set):Le(new Set(h.map(U=>U.id)))},mt=U=>{Le(Se=>{const as=new Set(Se);return as.has(U)?as.delete(U):as.add(U),as})},Ht=U=>U?new Date(U*1e3).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"-",ca=U=>U.checked?U.rejected?e.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[e.jsx(ta,{className:"h-3 w-3"}),"已拒绝"]}):e.jsxs(Ce,{variant:"default",className:"gap-1 bg-green-600",children:[e.jsx(st,{className:"h-3 w-3"}),"已通过"]}):e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(da,{className:"h-3 w-3"}),"待审核"]}),Fa=U=>U?U==="ai"?e.jsxs(Ce,{variant:"secondary",className:"gap-1 text-xs",children:[e.jsx(Yn,{className:"h-3 w-3"}),"AI"]}):e.jsxs(Ce,{variant:"secondary",className:"gap-1 text-xs",children:[e.jsx(Fl,{className:"h-3 w-3"}),"人工"]}):null,Xt=Math.ceil(ue/Ee),te=()=>{const U=[];if(Xt<=7)for(let Se=1;Se<=Xt;Se++)U.push(Se);else{U.push(1),we>3&&U.push("ellipsis");const Se=Math.max(2,we-1),as=Math.min(Xt-1,we+1);for(let us=Se;us<=as;us++)U.push(us);we1&&U.push(Xt)}return U},_e=()=>{const U=parseInt($,10);!isNaN(U)&&U>=1&&U<=Xt&&(fe(U),A(""))};return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-5xl w-[95vw] sm:w-full h-[90vh] sm:h-[85vh] flex flex-col p-0",hideCloseButton:!0,children:[e.jsxs("div",{className:"flex items-end bg-muted/30 px-2 pt-2 shrink-0",children:[e.jsxs("button",{onClick:()=>c("list"),className:P("group relative flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-t-lg transition-all","hover:bg-background/50",r==="list"?"bg-background text-foreground shadow-sm border border-b-0 border-border":"text-muted-foreground hover:text-foreground"),children:[e.jsx(rv,{className:"h-4 w-4"}),e.jsx("span",{children:"列表模式"}),r==="list"&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-background"})]}),e.jsxs("button",{onClick:()=>c("quick"),className:P("group relative flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-t-lg transition-all","hover:bg-background/50",r==="quick"?"bg-background text-foreground shadow-sm border border-b-0 border-border":"text-muted-foreground hover:text-foreground"),children:[e.jsx(sl,{className:"h-4 w-4"}),e.jsx("span",{children:"快速审核"}),e.jsx(Ce,{variant:"secondary",className:"ml-1 h-5 px-1.5 text-xs",children:"新"}),r==="quick"&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-background"})]}),e.jsx("div",{className:"flex-1 border-b border-border"}),e.jsx("button",{onClick:()=>l(!1),className:"mb-[1px] p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-colors",children:e.jsx(Sa,{className:"h-4 w-4"})})]}),r==="list"&&e.jsxs(e.Fragment,{children:[e.jsxs(qs,{className:"px-4 sm:px-6 pt-4 sm:pt-6 pb-4 border-b shrink-0",children:[e.jsx(Vs,{className:"text-lg sm:text-xl",children:"表达方式审核"}),e.jsx(at,{className:"text-xs sm:text-sm",children:"审核麦麦学习到的表达方式。通过审核的项目才会被使用(可在配置中调整),被拒绝的项目永远不会被使用。"}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 sm:gap-3 mt-4",children:[e.jsxs("div",{className:"rounded-lg border p-2 sm:p-3 text-center",children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold text-orange-500",children:Q?"-":d?.unchecked??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"待审核"})]}),e.jsxs("div",{className:"rounded-lg border p-2 sm:p-3 text-center",children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold text-green-500",children:Q?"-":d?.passed??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"已通过"})]}),e.jsxs("div",{className:"rounded-lg border p-2 sm:p-3 text-center",children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold text-red-500",children:Q?"-":d?.rejected??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"已拒绝"})]}),e.jsxs("div",{className:"rounded-lg border p-2 sm:p-3 text-center",children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold text-blue-500",children:Q?"-":d?.total??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"总计"})]})]})]}),e.jsxs("div",{className:"px-4 sm:px-6 py-3 border-b shrink-0 space-y-3",children:[e.jsx(Jt,{value:K,onValueChange:U=>Re(U),className:"w-full",children:e.jsxs(Gt,{className:"grid w-full grid-cols-4",children:[e.jsxs(Xe,{value:"unchecked",className:"gap-1 text-xs sm:text-sm px-1 sm:px-3",children:[e.jsx(da,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"待审核"}),e.jsx("span",{className:"sm:hidden",children:"待审"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",d?.unchecked??0,")"]})]}),e.jsxs(Xe,{value:"passed",className:"gap-1 text-xs sm:text-sm px-1 sm:px-3",children:[e.jsx(st,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"已通过"}),e.jsx("span",{className:"sm:hidden",children:"通过"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",d?.passed??0,")"]})]}),e.jsxs(Xe,{value:"rejected",className:"gap-1 text-xs sm:text-sm px-1 sm:px-3",children:[e.jsx(ta,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"已拒绝"}),e.jsx("span",{className:"sm:hidden",children:"拒绝"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",d?.rejected??0,")"]})]}),e.jsxs(Xe,{value:"all",className:"gap-1 text-xs sm:text-sm px-1 sm:px-3",children:[e.jsx("span",{children:"全部"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",d?.total??0,")"]})]})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{placeholder:"搜索情景或风格...",value:cs,onChange:U=>J(U.target.value),onKeyDown:U=>U.key==="Enter"&&rt(),className:"pl-9"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"icon",onClick:rt,children:e.jsx($t,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"icon",onClick:()=>{Ct(),Ts()},disabled:pe,children:e.jsx(dt,{className:P("h-4 w-4",pe&&"animate-spin")})})]}),Z.size>0&&e.jsx("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:K==="unchecked"?e.jsxs(e.Fragment,{children:[e.jsxs(_,{variant:"default",size:"sm",className:"bg-green-600 hover:bg-green-700 flex-1 sm:flex-none",onClick:()=>Qe(!1),disabled:pe,children:[e.jsx(st,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量通过"}),e.jsx("span",{className:"sm:hidden",children:"通过"}),"(",Z.size,")"]}),e.jsxs(_,{variant:"destructive",size:"sm",className:"flex-1 sm:flex-none",onClick:()=>Qe(!0),disabled:pe,children:[e.jsx(ta,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量拒绝"}),e.jsx("span",{className:"sm:hidden",children:"拒绝"}),"(",Z.size,")"]})]}):K==="passed"?e.jsxs(_,{variant:"destructive",size:"sm",className:"flex-1 sm:flex-none",onClick:()=>Qe(!0),disabled:pe,children:[e.jsx(ta,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量改为拒绝"}),e.jsx("span",{className:"sm:hidden",children:"改为拒绝"}),"(",Z.size,")"]}):K==="rejected"?e.jsxs(_,{variant:"default",size:"sm",className:"bg-green-600 hover:bg-green-700 flex-1 sm:flex-none",onClick:()=>Qe(!1),disabled:pe,children:[e.jsx(st,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量改为通过"}),e.jsx("span",{className:"sm:hidden",children:"改为通过"}),"(",Z.size,")"]}):e.jsxs(e.Fragment,{children:[e.jsxs(_,{variant:"default",size:"sm",className:"bg-green-600 hover:bg-green-700 flex-1 sm:flex-none",onClick:()=>Qe(!1),disabled:pe,children:[e.jsx(st,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量通过"}),e.jsx("span",{className:"sm:hidden",children:"通过"}),"(",Z.size,")"]}),e.jsxs(_,{variant:"destructive",size:"sm",className:"flex-1 sm:flex-none",onClick:()=>Qe(!0),disabled:pe,children:[e.jsx(ta,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量拒绝"}),e.jsx("span",{className:"sm:hidden",children:"拒绝"}),"(",Z.size,")"]})]})})]})]}),e.jsx(ts,{className:"flex-1 px-4 sm:px-6",children:pe&&h.length===0?e.jsx("div",{className:"flex items-center justify-center h-40",children:e.jsx(dt,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-40 text-muted-foreground",children:[e.jsx(Ut,{className:"h-8 w-8 mb-2"}),e.jsx("p",{children:"没有找到表达方式"})]}):e.jsxs("div",{className:"space-y-2 py-2",children:[h.length>0&&e.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(tt,{checked:Z.size===h.length&&h.length>0,onCheckedChange:As}),e.jsx("span",{className:"text-sm text-muted-foreground",children:Z.size===h.length&&h.length>0?`已全选当前页 (${h.length} 条)`:`全选当前页 (${h.length} 条)`})]}),Z.size>0&&e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>Le(new Set),className:"h-7 text-xs",children:"取消选择"})]}),h.map(U=>e.jsx("div",{className:P("rounded-lg border p-3 sm:p-4 space-y-2 sm:space-y-3 transition-colors",Z.has(U.id)&&"bg-accent border-primary",le.has(U.id)&&"opacity-50"),children:e.jsxs("div",{className:"flex items-start gap-2 sm:gap-3",children:[e.jsx(tt,{checked:Z.has(U.id),onCheckedChange:()=>mt(U.id),disabled:le.has(U.id),className:"mt-1"}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"情景:"}),e.jsx("p",{className:"text-sm font-medium break-words",children:U.situation})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"风格:"}),e.jsx("p",{className:"text-sm text-muted-foreground break-words",children:U.style})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1 sm:gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:["#",U.id]}),e.jsx("span",{children:"·"}),e.jsx("span",{title:jt(U.chat_id),className:"truncate max-w-24 sm:max-w-32",children:jt(U.chat_id)}),e.jsx("span",{children:"·"}),e.jsx("span",{children:Ht(U.create_date)}),e.jsxs("div",{className:"flex items-center gap-1",children:[ca(U),Fa(U.modified_by)]})]})]}),e.jsx("div",{className:"flex flex-col gap-1 sm:gap-2 shrink-0",children:K==="unchecked"?e.jsxs(e.Fragment,{children:[e.jsxs(_,{size:"sm",variant:"outline",className:"text-green-600 hover:text-green-700 hover:bg-green-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!1),disabled:le.has(U.id),children:[e.jsx(st,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"通过"})]}),e.jsxs(_,{size:"sm",variant:"outline",className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!0),disabled:le.has(U.id),children:[e.jsx(ta,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"拒绝"})]})]}):K==="passed"?e.jsxs(_,{size:"sm",variant:"outline",className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!0),disabled:le.has(U.id),children:[e.jsx(ta,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"改为拒绝"})]}):K==="rejected"?e.jsxs(_,{size:"sm",variant:"outline",className:"text-green-600 hover:text-green-700 hover:bg-green-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!1),disabled:le.has(U.id),children:[e.jsx(st,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"改为通过"})]}):e.jsx(e.Fragment,{children:U.rejected?e.jsxs(_,{size:"sm",variant:"outline",className:"text-green-600 hover:text-green-700 hover:bg-green-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!1),disabled:le.has(U.id),children:[e.jsx(st,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"改为通过"})]}):U.checked?e.jsxs(_,{size:"sm",variant:"outline",className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!0),disabled:le.has(U.id),children:[e.jsx(ta,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"改为拒绝"})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_,{size:"sm",variant:"outline",className:"text-green-600 hover:text-green-700 hover:bg-green-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!1),disabled:le.has(U.id),children:[e.jsx(st,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"通过"})]}),e.jsxs(_,{size:"sm",variant:"outline",className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!0),disabled:le.has(U.id),children:[e.jsx(ta,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"拒绝"})]})]})})})]})},U.id))]})}),e.jsxs("div",{className:"px-4 sm:px-6 py-3 border-t shrink-0 flex flex-col sm:flex-row items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx("span",{className:"hidden sm:inline",children:"每页"}),e.jsxs(Pe,{value:Ee.toString(),onValueChange:U=>{G(parseInt(U,10)),fe(1)},children:[e.jsx(Be,{className:"w-[70px] h-8",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]}),e.jsx("span",{className:"hidden sm:inline",children:"条"}),e.jsxs("span",{className:"text-muted-foreground",children:["共 ",ue," 条"]})]}),e.jsx(fx,{className:"mx-0 w-auto",children:e.jsxs(px,{children:[e.jsx(Xn,{children:e.jsx(_,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>fe(U=>Math.max(1,U-1)),disabled:we<=1||pe,children:e.jsx(Pa,{className:"h-4 w-4"})})}),te().map((U,Se)=>e.jsx(Xn,{children:U==="ellipsis"?e.jsx(Iv,{}):e.jsx(jc,{href:"#",isActive:U===we,onClick:as=>{as.preventDefault(),fe(U)},className:"h-8 w-8 cursor-pointer",children:U})},Se)),e.jsx(Xn,{children:e.jsx(_,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>fe(U=>Math.min(Xt,U+1)),disabled:we>=Xt||pe,children:e.jsx(ra,{className:"h-4 w-4"})})})]})}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"跳至"}),e.jsx(ne,{type:"number",min:1,max:Xt,value:$,onChange:U=>A(U.target.value),onKeyDown:U=>U.key==="Enter"&&_e(),className:"w-16 h-8 text-center",placeholder:we.toString()}),e.jsx("span",{className:"text-muted-foreground",children:"页"}),e.jsx(_,{variant:"outline",size:"sm",className:"h-8",onClick:_e,disabled:pe,children:"跳转"})]})]})]}),r==="quick"&&e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 sm:px-6 py-3 border-b shrink-0 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"text-muted-foreground",children:["待审核: ",e.jsx("span",{className:"font-medium text-orange-500",children:d?.unchecked??0})]}),e.jsxs("span",{className:"text-muted-foreground",children:["已通过: ",e.jsx("span",{className:"font-medium text-green-500",children:d?.passed??0})]}),e.jsxs("span",{className:"text-muted-foreground",children:["已拒绝: ",e.jsx("span",{className:"font-medium text-red-500",children:d?.rejected??0})]})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>{ut(),Ts()},disabled:w,children:[e.jsx(dt,{className:P("h-4 w-4 mr-1",w&&"animate-spin")}),"刷新"]})]}),e.jsx(Jt,{value:p,onValueChange:U=>g(U),className:"w-full",children:e.jsxs(Gt,{className:"grid w-full grid-cols-4",children:[e.jsxs(Xe,{value:"unchecked",className:"gap-1 text-xs sm:text-sm",children:[e.jsx(da,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"待审核"}),e.jsx("span",{className:"sm:hidden",children:"待审"})]}),e.jsxs(Xe,{value:"passed",className:"gap-1 text-xs sm:text-sm",children:[e.jsx(st,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"已通过"}),e.jsx("span",{className:"sm:hidden",children:"通过"})]}),e.jsxs(Xe,{value:"rejected",className:"gap-1 text-xs sm:text-sm",children:[e.jsx(ta,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"已拒绝"}),e.jsx("span",{className:"sm:hidden",children:"拒绝"})]}),e.jsx(Xe,{value:"all",className:"gap-1 text-xs sm:text-sm",children:"全部"})]})})]}),e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-8 relative overflow-hidden",children:w&&N.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsx(dt,{className:"h-8 w-8 animate-spin text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"加载中..."})]}):N.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-muted/50 flex items-center justify-center mb-6",children:e.jsx(st,{className:"h-10 w-10 text-green-500"})}),e.jsx("h3",{className:"text-xl font-semibold mb-2",children:"全部审核完成!"}),e.jsx("p",{className:"text-muted-foreground",children:"当前筛选条件下没有待处理的项目"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 text-sm text-muted-foreground z-50",children:[b+1," / ",N.length,M>N.length&&e.jsxs("span",{className:"ml-1",children:["(共 ",M," 条)"]})]}),e.jsx("div",{className:"absolute inset-x-4 top-1/2 -translate-y-1/2 flex justify-between pointer-events-none z-40",children:(()=>{const U=N[b],Se=Is(U);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:P("flex items-center gap-2 px-4 py-2 rounded-lg transition-all duration-300",C==="left"?"bg-red-500/20 text-red-500 scale-110":"bg-muted/50 text-muted-foreground opacity-0",!Se.left&&"invisible"),children:[e.jsx(ta,{className:"h-8 w-8"}),e.jsx("span",{className:"font-bold text-lg hidden sm:inline",children:"拒绝"})]}),e.jsxs("div",{className:P("flex items-center gap-2 px-4 py-2 rounded-lg transition-all duration-300",C==="right"?"bg-green-500/20 text-green-500 scale-110":"bg-muted/50 text-muted-foreground opacity-0",!Se.right&&"invisible"),children:[e.jsx("span",{className:"font-bold text-lg hidden sm:inline",children:"通过"}),e.jsx(st,{className:"h-8 w-8"})]})]})})()}),e.jsx("div",{className:"relative w-full max-w-md h-[400px] flex items-center justify-center",children:N.slice(b,b+5).reverse().map((U,Se,as)=>{const us=as.length-1-Se,es=us===0;let Tt={zIndex:5-us,position:"absolute",width:"100%",transition:es&&!ge.current?"all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)":"none"};if(es)Tt={...Tt,transform:`translateX(${H}px) rotate(${H*.05}deg)`,opacity:Math.max(0,1-Math.abs(H)/500),cursor:"grab"};else{const $s=Math.min(Math.abs(H)/200,1),pa=vt=>{const Ca=vt*7%5,ll=vt*13%7;return{scale:1-vt*.05,translateY:vt*12,rotate:(vt%2===0?1:-1)*(vt*2)+Ca,translateX:(vt%2===0?-1:1)*(vt*4)+ll}},oa=pa(us),ae=pa(us-1),oe=oa.scale+(ae.scale-oa.scale)*$s,qe=oa.translateY+(ae.translateY-oa.translateY)*$s,Ys=oa.rotate+(ae.rotate-oa.rotate)*$s,Ps=oa.translateX+(ae.translateX-oa.translateX)*$s;Tt={...Tt,transform:`translate3d(${Ps}px, ${qe}px, 0) scale(${oe}) rotate(${Ys}deg)`,opacity:1-us*.15,filter:`blur(${Math.max(0,us*1-$s)}px)`,pointerEvents:"none"}}return e.jsxs("div",{ref:es?je:void 0,className:P("bg-card border rounded-xl shadow-xl p-6 select-none h-full flex flex-col",es&&"active:cursor-grabbing shadow-2xl ring-1 ring-border/50",es&&me===U.id&&"ring-4 ring-orange-500/50 bg-orange-50/10"),style:Tt,onMouseDown:es?ms:void 0,onMouseMove:es?Ms:void 0,onMouseUp:es?We:void 0,onMouseLeave:es?Cs:void 0,onTouchStart:es?rs:void 0,onTouchMove:es?is:void 0,onTouchEnd:es?ys:void 0,children:[es&&me===U.id&&e.jsxs("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center bg-background/80 backdrop-blur-sm animate-in fade-in duration-300 rounded-xl",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-orange-500/20 rounded-full animate-ping"}),e.jsx(dt,{className:"relative h-16 w-16 text-orange-500 mb-4 animate-spin duration-1000"})]}),e.jsx("h3",{className:"text-xl font-bold text-foreground animate-in slide-in-from-bottom-2 fade-in duration-500",children:"数据已更新"}),e.jsx("p",{className:"text-muted-foreground mt-2 animate-in slide-in-from-bottom-3 fade-in duration-700",children:"后台任务已处理此条目"})]}),es&&e.jsx("div",{className:P("absolute inset-0 flex items-center justify-center z-20 pointer-events-none transition-opacity duration-200",H<-10&&!Is(U).left||H>10&&!Is(U).right?"opacity-100":"opacity-0"),children:e.jsx("div",{className:"bg-background/80 backdrop-blur-sm p-4 rounded-full shadow-lg border border-border",children:e.jsx(iv,{className:"h-12 w-12 text-muted-foreground"})})}),e.jsxs("div",{className:"space-y-4 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-muted-foreground font-mono",children:["#",U.id]}),e.jsxs("div",{className:"flex items-center gap-2",children:[ca(U),Fa(U.modified_by)]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"情景"}),e.jsx("div",{className:"p-3 bg-muted/30 rounded-lg border border-border/50",children:e.jsx("p",{className:"text-lg font-medium leading-relaxed",children:U.situation})})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"风格"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:U.style.split(/[,,]/).map(($s,pa)=>e.jsx(Ce,{variant:"secondary",className:"font-normal",children:$s.trim()},pa))})]})]}),e.jsxs("div",{className:"mt-auto pt-4 border-t flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/10 flex items-center justify-center text-primary",children:e.jsx(Fl,{className:"h-3 w-3"})}),e.jsx("span",{title:jt(U.chat_id),className:"truncate max-w-[120px] font-medium",children:jt(U.chat_id)})]}),e.jsx("span",{className:"font-mono",children:Ht(U.create_date)})]})]},U.id)})}),e.jsx("div",{className:"flex items-center gap-8 mt-8 sm:hidden z-50",children:(()=>{const U=N[b],Se=Is(U);return e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",size:"lg",className:P("w-16 h-16 rounded-full border-2 shadow-lg transition-all active:scale-95",Se.left?"hover:bg-red-50 hover:text-red-600 hover:border-red-200":"opacity-30 cursor-not-allowed"),onClick:()=>Se.left&&V(!0),disabled:!Se.left||X,children:e.jsx(ta,{className:"h-8 w-8"})}),e.jsx(_,{variant:"outline",size:"lg",className:P("w-16 h-16 rounded-full border-2 shadow-lg transition-all active:scale-95",Se.right?"hover:bg-green-50 hover:text-green-600 hover:border-green-200":"opacity-30 cursor-not-allowed"),onClick:()=>Se.right&&V(!1),disabled:!Se.right||X,children:e.jsx(st,{className:"h-8 w-8"})})]})})()})]})}),e.jsxs("div",{className:"hidden sm:flex items-center justify-center gap-6 px-6 py-3 border-t text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-2 py-1 bg-muted rounded text-xs",children:"←"}),e.jsx("span",{children:"拒绝"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-2 py-1 bg-muted rounded text-xs",children:"→"}),e.jsx("span",{children:"通过"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-2 py-1 bg-muted rounded text-xs",children:"↑"}),e.jsx("span",{children:"上一条"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-2 py-1 bg-muted rounded text-xs",children:"↓"}),e.jsx("span",{children:"下一条"})]}),e.jsx("span",{className:"text-muted-foreground/50",children:"|"}),e.jsx("span",{children:"拖拽卡片滑动审核"})]})]})]})})}function d2(){return e.jsx(lr,{children:e.jsx(m2,{})})}const u2=a=>{const l=[];for(let r=0;r(H.current=!0,()=>{H.current=!1,O.current&&(clearInterval(O.current),O.current=null)}),[]);const X=u.useCallback(async()=>{try{const A=await jx();H.current&&E(A.unchecked)}catch(A){console.error("获取审核统计失败:",A)}},[]),L=u.useCallback(async()=>{try{y(!0);const A=await fw.get("https://v1.hitokoto.cn/?c=a&c=b&c=c&c=d&c=h&c=i&c=k");H.current&&j({hitokoto:A.data.hitokoto,from:A.data.from||A.data.from_who||"未知"})}catch(A){console.error("获取一言失败:",A),H.current&&j({hitokoto:"人生就像一盒巧克力,你永远不知道下一颗是什么味道。",from:"阿甘正传"})}finally{H.current&&y(!1)}},[]),me=u.useCallback(async()=>{try{const A=await ke("/api/webui/system/status");if(!H.current)return;if(A.ok){const K=await A.json();z(K)}else z(null)}catch(A){console.error("获取机器人状态失败:",A),H.current&&z(null)}},[]),Ne=async()=>{await C()},je=u.useCallback(async()=>{try{const A=await ke(`/api/webui/statistics/dashboard?hours=${h}`);if(!H.current)return;if(A.ok){const K=await A.json();l(K)}c(!1),m(100)}catch(A){console.error("Failed to fetch dashboard data:",A),H.current&&(c(!1),m(100))}},[h]);if(u.useEffect(()=>{if(!r)return;m(0);const A=setTimeout(()=>m(15),200),K=setTimeout(()=>m(30),800),Re=setTimeout(()=>m(45),2e3),se=setTimeout(()=>m(60),4e3),$e=setTimeout(()=>m(75),6500),cs=setTimeout(()=>m(85),9e3),J=setTimeout(()=>m(92),11e3);return()=>{clearTimeout(A),clearTimeout(K),clearTimeout(Re),clearTimeout(se),clearTimeout($e),clearTimeout(cs),clearTimeout(J)}},[r]),u.useEffect(()=>{je(),L(),me(),X()},[je,L,me,X]),u.useEffect(()=>{if(O.current&&(clearInterval(O.current),O.current=null),!!p)return O.current=setInterval(()=>{H.current&&(je(),me())},3e4),()=>{O.current&&(clearInterval(O.current),O.current=null)}},[p,je,me]),r||!a)return e.jsx("div",{className:"flex items-center justify-center h-[calc(100vh-200px)]",children:e.jsxs("div",{className:"text-center space-y-6 w-full max-w-md px-4",children:[e.jsx(dt,{className:"h-12 w-12 animate-spin mx-auto text-primary"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-lg font-medium",children:"加载统计数据中..."}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"正在获取麦麦运行数据"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(tr,{value:d,className:"h-2"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[d,"%"]})]})]})});const{summary:ce,model_stats:ge=[],hourly_data:pe=[],daily_data:D=[],recent_activity:Q=[]}=a,B=ce??{total_requests:0,total_cost:0,total_tokens:0,online_time:0,total_messages:0,total_replies:0,avg_response_time:0,cost_per_hour:0,tokens_per_hour:0},ue=A=>{const K=Math.floor(A/3600),Re=Math.floor(A%3600/60);return`${K}小时${Re}分钟`},Y=A=>{const K=A.toLocaleString("zh-CN");return A>=1e9?{display:`${(A/1e9).toFixed(2)}B`,exact:K,needsExact:!0}:A>=1e6?{display:`${(A/1e6).toFixed(2)}M`,exact:K,needsExact:!0}:A>=1e4?{display:`${(A/1e3).toFixed(1)}K`,exact:K,needsExact:!0}:A>=1e3?{display:`${(A/1e3).toFixed(2)}K`,exact:K,needsExact:!0}:{display:K,exact:K,needsExact:!1}},we=A=>{const K=`¥${A.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`;return A>=1e6?{display:`¥${(A/1e6).toFixed(2)}M`,exact:K,needsExact:!0}:A>=1e4?{display:`¥${(A/1e3).toFixed(1)}K`,exact:K,needsExact:!0}:A>=1e3?{display:`¥${(A/1e3).toFixed(2)}K`,exact:K,needsExact:!0}:{display:K,exact:K,needsExact:!1}},fe=A=>new Date(A).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),Ee=u2(ge.length),G=ge.map((A,K)=>({name:A.model_name,value:A.request_count,fill:Ee[K]})),$={requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"},tokens:{label:"Tokens",color:"hsl(var(--chart-3))"}};return e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"实时监控面板"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"麦麦运行状态和统计数据一览"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(Jt,{value:h.toString(),onValueChange:A=>f(Number(A)),children:e.jsxs(Gt,{className:"grid grid-cols-3 w-full sm:w-auto",children:[e.jsx(Xe,{value:"24",children:"24小时"}),e.jsx(Xe,{value:"168",children:"7天"}),e.jsx(Xe,{value:"720",children:"30天"})]})}),e.jsxs(_,{variant:p?"default":"outline",size:"sm",onClick:()=>g(!p),className:"gap-2",children:[e.jsx(dt,{className:`h-4 w-4 ${p?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:"自动刷新"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:je,children:e.jsx(dt,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg border border-dashed border-muted-foreground/30 bg-muted/20",children:[b?e.jsx(ks,{className:"h-5 flex-1"}):N?e.jsxs("p",{className:"flex-1 text-sm text-muted-foreground italic truncate",children:['"',N.hitokoto,'" —— ',N.from]}):null,e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:L,disabled:b,children:e.jsx(dt,{className:`h-3.5 w-3.5 ${b?"animate-spin":""}`})})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-3",children:[e.jsxs(Te,{className:"lg:col-span-1",children:[e.jsx(Oe,{className:"pb-3",children:e.jsxs(Ue,{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(pc,{className:"h-4 w-4"}),"麦麦状态"]})}),e.jsx(ze,{children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:w?.running?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-3 w-3 rounded-full bg-green-500 animate-pulse"}),e.jsxs(Ce,{variant:"outline",className:"text-green-600 border-green-300 bg-green-50",children:[e.jsx(st,{className:"h-3 w-3 mr-1"}),"运行中"]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-3 w-3 rounded-full bg-red-500"}),e.jsxs(Ce,{variant:"outline",className:"text-red-600 border-red-300 bg-red-50",children:[e.jsx(Ut,{className:"h-3 w-3 mr-1"}),"已停止"]})]})}),w&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsxs("span",{children:["v",w.version]}),e.jsx("span",{className:"mx-2",children:"|"}),e.jsxs("span",{children:["运行 ",ue(w.uptime)]})]})]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"pb-3",children:e.jsxs(Ue,{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(sl,{className:"h-4 w-4"}),"快速操作"]})}),e.jsx(ze,{children:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:Ne,disabled:R,className:"gap-2",children:[e.jsx(rc,{className:`h-4 w-4 ${R?"animate-spin":""}`}),R?"重启中...":"重启麦麦"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>S(!0),className:"gap-2",children:[e.jsx(cv,{className:"h-4 w-4"}),"表达审核",F>0&&e.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-xs rounded-full bg-orange-500 text-white",children:F>99?"99+":F})]}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/logs",children:[e.jsx(Ua,{className:"h-4 w-4"}),"查看日志"]})}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/plugins",children:[e.jsx(T1,{className:"h-4 w-4"}),"插件管理"]})}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/settings",children:[e.jsx(Sn,{className:"h-4 w-4"}),"系统设置"]})})]})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"pb-3",children:[e.jsxs(Ue,{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(E1,{className:"h-4 w-4"}),"反馈问卷"]}),e.jsx(Ns,{className:"text-xs",children:"帮助我们改进产品体验"})]}),e.jsx(ze,{children:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/survey/webui-feedback",children:[e.jsx(Ua,{className:"h-4 w-4"}),"WebUI 反馈"]})}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/survey/maibot-feedback",children:[e.jsx(Ia,{className:"h-4 w-4"}),"麦麦反馈"]})})]})})]})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 xs:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"总请求数"}),e.jsx(nx,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[Y(B.total_requests).display,Y(B.total_requests).needsExact&&e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Y(B.total_requests).exact,")"]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["最近",h<48?h+"小时":Math.floor(h/24)+"天"]})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"总花费"}),e.jsx(M1,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[we(B.total_cost).display,we(B.total_cost).needsExact&&e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",we(B.total_cost).exact,")"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:B.cost_per_hour>0?`¥${B.cost_per_hour.toFixed(2)}/小时`:"暂无数据"})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"Token消耗"}),e.jsx(Zr,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[Y(B.total_tokens).display,Y(B.total_tokens).needsExact&&e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Y(B.total_tokens).exact,")"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:B.tokens_per_hour>0?`${Y(B.tokens_per_hour).display}/小时`:"暂无数据"})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"平均响应"}),e.jsx(sl,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[B.avg_response_time.toFixed(2),"s"]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"API平均耗时"})]})]})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-3",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"在线时长"}),e.jsx(da,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:e.jsxs("div",{className:"text-xl font-bold",children:[ue(B.online_time),e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",B.online_time.toLocaleString(),"秒)"]})]})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"消息处理"}),e.jsx(Ia,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-xl font-bold",children:[Y(B.total_messages).display,Y(B.total_messages).needsExact&&e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Y(B.total_messages).exact,")"]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["回复 ",Y(B.total_replies).display,Y(B.total_replies).needsExact&&e.jsxs("span",{children:["(",Y(B.total_replies).exact,")"]})," 条"]})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"成本效率"}),e.jsx(rx,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-xl font-bold",children:B.total_messages>0?`¥${(B.total_cost/B.total_messages*100).toFixed(2)}`:"¥0.00"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"每100条消息"})]})]})]}),e.jsxs(Jt,{defaultValue:"trends",className:"space-y-4",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2 sm:grid-cols-4",children:[e.jsx(Xe,{value:"trends",children:"趋势"}),e.jsx(Xe,{value:"models",children:"模型"}),e.jsx(Xe,{value:"activity",children:"活动"}),e.jsx(Xe,{value:"daily",children:"日统计"})]}),e.jsxs(Ss,{value:"trends",className:"space-y-4",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"请求趋势"}),e.jsxs(Ns,{children:["最近",h,"小时的请求量变化"]})]}),e.jsx(ze,{children:e.jsx(Kr,{config:$,className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:e.jsxs(Ww,{data:pe,children:[e.jsx(Ji,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),e.jsx(Xi,{dataKey:"timestamp",tickFormatter:A=>fe(A),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Qi,{content:e.jsx(Qr,{labelFormatter:A=>fe(A)})}),e.jsx(e1,{type:"monotone",dataKey:"requests",stroke:"var(--color-requests)",strokeWidth:2})]})})})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"花费趋势"}),e.jsx(Ns,{children:"API调用成本变化"})]}),e.jsx(ze,{children:e.jsx(Kr,{config:$,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:e.jsxs(Bo,{data:pe,children:[e.jsx(Ji,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),e.jsx(Xi,{dataKey:"timestamp",tickFormatter:A=>fe(A),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Qi,{content:e.jsx(Qr,{labelFormatter:A=>fe(A)})}),e.jsx(Zi,{dataKey:"cost",fill:"var(--color-cost)"})]})})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"Token消耗"}),e.jsx(Ns,{children:"Token使用量变化"})]}),e.jsx(ze,{children:e.jsx(Kr,{config:$,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:e.jsxs(Bo,{data:pe,children:[e.jsx(Ji,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),e.jsx(Xi,{dataKey:"timestamp",tickFormatter:A=>fe(A),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Qi,{content:e.jsx(Qr,{labelFormatter:A=>fe(A)})}),e.jsx(Zi,{dataKey:"tokens",fill:"var(--color-tokens)"})]})})})]})]})]}),e.jsx(Ss,{value:"models",className:"space-y-4",children:e.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"模型请求分布"}),e.jsxs(Ns,{children:["各模型使用占比 (共 ",ge.length," 个模型)"]})]}),e.jsx(ze,{children:e.jsx(Kr,{config:Object.fromEntries(ge.map((A,K)=>[A.model_name,{label:A.model_name,color:Ee[K]}])),className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:e.jsxs(s1,{children:[e.jsx(Qi,{content:e.jsx(Qr,{})}),e.jsx(t1,{data:G,cx:"50%",cy:"50%",labelLine:!1,label:({name:A,percent:K})=>K&&K<.05?"":`${A} ${K?(K*100).toFixed(0):0}%`,outerRadius:100,dataKey:"value",children:G.map((A,K)=>e.jsx(a1,{fill:A.fill},`cell-${K}`))})]})})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"模型详细统计"}),e.jsx(Ns,{children:"请求数、花费和性能"})]}),e.jsx(ze,{children:e.jsx(ts,{className:"h-[300px] sm:h-[400px]",children:e.jsx("div",{className:"space-y-3",children:ge.map((A,K)=>e.jsxs("div",{className:"p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h4",{className:"font-semibold text-sm truncate flex-1 min-w-0",children:A.model_name}),e.jsx("div",{className:"w-3 h-3 rounded-full ml-2 flex-shrink-0",style:{backgroundColor:`hsl(var(--chart-${K%5+1}))`}})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"请求数:"}),e.jsx("span",{className:"ml-1 font-medium",children:A.request_count.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"花费:"}),e.jsxs("span",{className:"ml-1 font-medium",children:["¥",A.total_cost.toFixed(2)]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),e.jsxs("span",{className:"ml-1 font-medium",children:[(A.total_tokens/1e3).toFixed(1),"K"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"平均耗时:"}),e.jsxs("span",{className:"ml-1 font-medium",children:[A.avg_response_time.toFixed(2),"s"]})]})]})]},K))})})})]})]})}),e.jsx(Ss,{value:"activity",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"最近活动"}),e.jsx(Ns,{children:"最新的API调用记录"})]}),e.jsx(ze,{children:e.jsx(ts,{className:"h-[400px] sm:h-[500px]",children:e.jsx("div",{className:"space-y-2",children:Q.map((A,K)=>e.jsxs("div",{className:"p-3 sm:p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-medium text-sm truncate",children:A.model}),e.jsx("div",{className:"text-xs text-muted-foreground",children:A.request_type})]}),e.jsx("div",{className:"text-xs text-muted-foreground flex-shrink-0",children:fe(A.timestamp)})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),e.jsx("span",{className:"ml-1",children:A.tokens})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"花费:"}),e.jsxs("span",{className:"ml-1",children:["¥",A.cost.toFixed(4)]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"耗时:"}),e.jsxs("span",{className:"ml-1",children:[A.time_cost.toFixed(2),"s"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"状态:"}),e.jsx("span",{className:`ml-1 ${A.status==="success"?"text-green-600":"text-red-600"}`,children:A.status})]})]})]},K))})})})]})}),e.jsx(Ss,{value:"daily",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"每日统计"}),e.jsx(Ns,{children:"最近7天的数据汇总"})]}),e.jsx(ze,{children:e.jsx(Kr,{config:{requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"}},className:"h-[400px] sm:h-[500px] w-full aspect-auto",children:e.jsxs(Bo,{data:D,children:[e.jsx(Ji,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),e.jsx(Xi,{dataKey:"timestamp",tickFormatter:A=>{const K=new Date(A);return`${K.getMonth()+1}/${K.getDate()}`},stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{yAxisId:"left",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{yAxisId:"right",orientation:"right",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Qi,{content:e.jsx(Qr,{labelFormatter:A=>new Date(A).toLocaleDateString("zh-CN")})}),e.jsx(F_,{content:e.jsx(zv,{})}),e.jsx(Zi,{yAxisId:"left",dataKey:"requests",fill:"var(--color-requests)"}),e.jsx(Zi,{yAxisId:"right",dataKey:"cost",fill:"var(--color-cost)"})]})})})]})})]}),e.jsx(nr,{}),e.jsx(Pv,{open:M,onOpenChange:A=>{S(A),A||X()}})]})})}const x2={theme:"system",setTheme:()=>null},Fv=u.createContext(x2),vx=()=>{const a=u.useContext(Fv);if(a===void 0)throw new Error("useTheme must be used within a ThemeProvider");return a},h2=(a,l,r)=>{const c=document.documentElement.classList.contains("no-animations");if(!document.startViewTransition||c){l(a);return}const d=r.clientX,m=r.clientY,h=Math.hypot(Math.max(d,innerWidth-d),Math.max(m,innerHeight-m));document.startViewTransition(()=>{l(a)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${d}px ${m}px)`,`circle(${h}px at ${d}px ${m}px)`]},{duration:500,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})},Hv=u.createContext(void 0),qv=()=>{const a=u.useContext(Hv);if(a===void 0)throw new Error("useAnimation must be used within an AnimationProvider");return a},Ge=u.forwardRef(({className:a,...l},r)=>e.jsx(Nj,{className:P("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...l,ref:r,children:e.jsx(bw,{className:P("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Ge.displayName=Nj.displayName;const f2=ti("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T=u.forwardRef(({className:a,...l},r)=>e.jsx(Xj,{ref:r,className:P(f2(),a),...l}));T.displayName=Xj.displayName;const p2=[{id:"minLength",label:"长度至少 10 位",description:"Token 长度必须大于等于 10 个字符",validate:a=>a.length>=10},{id:"hasUppercase",label:"包含大写字母",description:"至少包含一个大写字母 (A-Z)",validate:a=>/[A-Z]/.test(a)},{id:"hasLowercase",label:"包含小写字母",description:"至少包含一个小写字母 (a-z)",validate:a=>/[a-z]/.test(a)},{id:"hasSpecialChar",label:"包含特殊符号",description:"至少包含一个特殊符号 (!@#$%^&*()_+-=[]{}|;:,.<>?/)",validate:a=>/[!@#$%^&*()_+\-=[\]{}|;:,.<>?/]/.test(a)}];function g2(a){const l=p2.map(c=>({id:c.id,label:c.label,description:c.description,passed:c.validate(a)}));return{isValid:l.every(c=>c.passed),rules:l}}const ud="0.12.2",Nx="MaiBot Dashboard",j2=`${Nx} v${ud}`,v2=(a="v")=>`${a}${ud}`,wa={THEME:"maibot-ui-theme",ACCENT_COLOR:"accent-color",ENABLE_ANIMATIONS:"maibot-animations",ENABLE_WAVES_BACKGROUND:"maibot-waves-background",LOG_CACHE_SIZE:"maibot-log-cache-size",LOG_AUTO_SCROLL:"maibot-log-auto-scroll",LOG_FONT_SIZE:"maibot-log-font-size",LOG_LINE_SPACING:"maibot-log-line-spacing",DATA_SYNC_INTERVAL:"maibot-data-sync-interval",WS_RECONNECT_INTERVAL:"maibot-ws-reconnect-interval",WS_MAX_RECONNECT_ATTEMPTS:"maibot-ws-max-reconnect-attempts",COMPLETED_TOURS:"maibot-completed-tours"},jl={theme:"system",accentColor:"blue",enableAnimations:!0,enableWavesBackground:!0,logCacheSize:1e3,logAutoScroll:!0,logFontSize:"xs",logLineSpacing:4,dataSyncInterval:30,wsReconnectInterval:3e3,wsMaxReconnectAttempts:10};function zt(a){const l=Vv(a),r=localStorage.getItem(l);if(r===null)return jl[a];const c=jl[a];if(typeof c=="boolean")return r==="true";if(typeof c=="number"){const d=parseFloat(r);return isNaN(d)?c:d}return r}function Yr(a,l){const r=Vv(a);localStorage.setItem(r,String(l)),window.dispatchEvent(new CustomEvent("maibot-settings-change",{detail:{key:a,value:l}}))}function N2(){return{theme:zt("theme"),accentColor:zt("accentColor"),enableAnimations:zt("enableAnimations"),enableWavesBackground:zt("enableWavesBackground"),logCacheSize:zt("logCacheSize"),logAutoScroll:zt("logAutoScroll"),logFontSize:zt("logFontSize"),logLineSpacing:zt("logLineSpacing"),dataSyncInterval:zt("dataSyncInterval"),wsReconnectInterval:zt("wsReconnectInterval"),wsMaxReconnectAttempts:zt("wsMaxReconnectAttempts")}}function b2(){const a=N2(),l=localStorage.getItem(wa.COMPLETED_TOURS),r=l?JSON.parse(l):[];return{...a,completedTours:r}}function y2(a){const l=[],r=[];for(const[c,d]of Object.entries(a)){if(c==="completedTours"){Array.isArray(d)?(localStorage.setItem(wa.COMPLETED_TOURS,JSON.stringify(d)),l.push("completedTours")):r.push("completedTours");continue}if(c in jl){const m=c,h=jl[m];if(typeof d==typeof h){if(m==="theme"&&!["light","dark","system"].includes(d)){r.push(c);continue}if(m==="logFontSize"&&!["xs","sm","base"].includes(d)){r.push(c);continue}Yr(m,d),l.push(c)}else r.push(c)}else r.push(c)}return{success:l.length>0,imported:l,skipped:r}}function w2(){for(const a of Object.keys(jl))Yr(a,jl[a]);localStorage.removeItem(wa.COMPLETED_TOURS),window.dispatchEvent(new CustomEvent("maibot-settings-reset"))}function _2(){const a=[],l=[],r=[];for(let c=0;cc.size-r.size),{used:a,items:localStorage.length,details:l}}function S2(a){if(a===0)return"0 B";const l=1024,r=["B","KB","MB"],c=Math.floor(Math.log(a)/Math.log(l));return parseFloat((a/Math.pow(l,c)).toFixed(2))+" "+r[c]}function Vv(a){return{theme:wa.THEME,accentColor:wa.ACCENT_COLOR,enableAnimations:wa.ENABLE_ANIMATIONS,enableWavesBackground:wa.ENABLE_WAVES_BACKGROUND,logCacheSize:wa.LOG_CACHE_SIZE,logAutoScroll:wa.LOG_AUTO_SCROLL,logFontSize:wa.LOG_FONT_SIZE,logLineSpacing:wa.LOG_LINE_SPACING,dataSyncInterval:wa.DATA_SYNC_INTERVAL,wsReconnectInterval:wa.WS_RECONNECT_INTERVAL,wsMaxReconnectAttempts:wa.WS_MAX_RECONNECT_ATTEMPTS}[a]}const el=u.forwardRef(({className:a,...l},r)=>e.jsxs(bj,{ref:r,className:P("relative flex w-full touch-none select-none items-center",a),...l,children:[e.jsx(yw,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:e.jsx(ww,{className:"absolute h-full bg-primary"})}),e.jsx(_w,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));el.displayName=bj.displayName;class k2{ws=null;reconnectTimeout=null;reconnectAttempts=0;heartbeatInterval=null;logCallbacks=new Set;connectionCallbacks=new Set;isConnected=!1;logCache=[];getMaxCacheSize(){return zt("logCacheSize")}getMaxReconnectAttempts(){return zt("wsMaxReconnectAttempts")}getReconnectInterval(){return zt("wsReconnectInterval")}getWebSocketUrl(l){let r;{const c=window.location.protocol==="https:"?"wss:":"ws:",d=window.location.host;r=`${c}//${d}/ws/logs`}return l?`${r}?token=${encodeURIComponent(l)}`:r}async getWsToken(){try{const l=await ke("/api/webui/ws-token",{method:"GET",credentials:"include"});if(!l.ok)return console.error("获取 WebSocket token 失败:",l.status),null;const r=await l.json();return r.success&&r.token?r.token:null}catch(l){return console.error("获取 WebSocket token 失败:",l),null}}async connect(){if(this.ws?.readyState===WebSocket.OPEN||this.ws?.readyState===WebSocket.CONNECTING)return;if(window.location.pathname==="/auth"){console.log("📡 在登录页面,跳过 WebSocket 连接");return}if(!await dc()){console.log("📡 未登录,跳过 WebSocket 连接");return}const r=await this.getWsToken();if(!r){console.log("📡 无法获取 WebSocket token,跳过连接");return}const c=this.getWebSocketUrl(r);try{this.ws=new WebSocket(c),this.ws.onopen=()=>{this.isConnected=!0,this.reconnectAttempts=0,this.notifyConnection(!0),this.startHeartbeat()},this.ws.onmessage=d=>{try{if(d.data==="pong")return;const m=JSON.parse(d.data);this.notifyLog(m)}catch(m){console.error("解析日志消息失败:",m)}},this.ws.onerror=d=>{console.error("❌ WebSocket 错误:",d),this.isConnected=!1,this.notifyConnection(!1)},this.ws.onclose=()=>{this.isConnected=!1,this.notifyConnection(!1),this.stopHeartbeat(),this.attemptReconnect()}}catch(d){console.error("创建 WebSocket 连接失败:",d),this.attemptReconnect()}}attemptReconnect(){const l=this.getMaxReconnectAttempts();if(this.reconnectAttempts>=l)return;this.reconnectAttempts+=1;const r=this.getReconnectInterval(),c=Math.min(r*this.reconnectAttempts,3e4);this.reconnectTimeout=window.setTimeout(()=>{this.connect()},c)}startHeartbeat(){this.heartbeatInterval=window.setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send("ping")},3e4)}stopHeartbeat(){this.heartbeatInterval!==null&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null)}disconnect(){this.reconnectTimeout!==null&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.stopHeartbeat(),this.ws&&(this.ws.close(),this.ws=null),this.isConnected=!1,this.reconnectAttempts=0}onLog(l){return this.logCallbacks.add(l),()=>this.logCallbacks.delete(l)}onConnectionChange(l){return this.connectionCallbacks.add(l),l(this.isConnected),()=>this.connectionCallbacks.delete(l)}notifyLog(l){if(!this.logCache.some(c=>c.id===l.id)){this.logCache.push(l);const c=this.getMaxCacheSize();this.logCache.length>c&&(this.logCache=this.logCache.slice(-c)),this.logCallbacks.forEach(d=>{try{d(l)}catch(m){console.error("日志回调执行失败:",m)}})}}notifyConnection(l){this.connectionCallbacks.forEach(r=>{try{r(l)}catch(c){console.error("连接状态回调执行失败:",c)}})}getAllLogs(){return[...this.logCache]}clearLogs(){this.logCache=[]}getConnectionStatus(){return this.isConnected}}const Qn=new k2;typeof window<"u"&&setTimeout(()=>{Qn.connect()},100);const bs=kw,wt=Cw,C2=Sw,Gv=u.forwardRef(({className:a,...l},r)=>e.jsx(yj,{className:P("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l,ref:r}));Gv.displayName=yj.displayName;const xs=u.forwardRef(({className:a,...l},r)=>e.jsxs(C2,{children:[e.jsx(Gv,{}),e.jsx(wj,{ref:r,className:P("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...l})]}));xs.displayName=wj.displayName;const hs=({className:a,...l})=>e.jsx("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",a),...l});hs.displayName="AlertDialogHeader";const fs=({className:a,...l})=>e.jsx("div",{className:P("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...l});fs.displayName="AlertDialogFooter";const ps=u.forwardRef(({className:a,...l},r)=>e.jsx(_j,{ref:r,className:P("text-lg font-semibold",a),...l}));ps.displayName=_j.displayName;const gs=u.forwardRef(({className:a,...l},r)=>e.jsx(Sj,{ref:r,className:P("text-sm text-muted-foreground",a),...l}));gs.displayName=Sj.displayName;const js=u.forwardRef(({className:a,variant:l,...r},c)=>e.jsx(kj,{ref:c,className:P(si({variant:l}),a),...r}));js.displayName=kj.displayName;const vs=u.forwardRef(({className:a,...l},r)=>e.jsx(Cj,{ref:r,className:P(si({variant:"outline"}),"mt-2 sm:mt-0",a),...l}));vs.displayName=Cj.displayName;function T2(){return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"系统设置"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理您的应用偏好设置"})]})}),e.jsxs(Jt,{defaultValue:"appearance",className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2 sm:grid-cols-4 gap-0.5 sm:gap-1 h-auto p-1",children:[e.jsxs(Xe,{value:"appearance",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(A1,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"外观"})]}),e.jsxs(Xe,{value:"security",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(ov,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"安全"})]}),e.jsxs(Xe,{value:"other",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(Sn,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"其他"})]}),e.jsxs(Xe,{value:"about",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(Yt,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"关于"})]})]}),e.jsxs(ts,{className:"h-[calc(100vh-240px)] sm:h-[calc(100vh-280px)] mt-4 sm:mt-6",children:[e.jsx(Ss,{value:"appearance",className:"mt-0",children:e.jsx(E2,{})}),e.jsx(Ss,{value:"security",className:"mt-0",children:e.jsx(M2,{})}),e.jsx(Ss,{value:"other",className:"mt-0",children:e.jsx(A2,{})}),e.jsx(Ss,{value:"about",className:"mt-0",children:e.jsx(z2,{})})]})]})]})}function Ig(a){const l=document.documentElement,c={blue:{hsl:"221.2 83.2% 53.3%",darkHsl:"217.2 91.2% 59.8%",gradient:null},purple:{hsl:"271 91% 65%",darkHsl:"270 95% 75%",gradient:null},green:{hsl:"142 71% 45%",darkHsl:"142 76% 36%",gradient:null},orange:{hsl:"25 95% 53%",darkHsl:"20 90% 48%",gradient:null},pink:{hsl:"330 81% 60%",darkHsl:"330 85% 70%",gradient:null},red:{hsl:"0 84% 60%",darkHsl:"0 90% 70%",gradient:null},"gradient-sunset":{hsl:"15 95% 60%",darkHsl:"15 95% 65%",gradient:"linear-gradient(135deg, hsl(25 95% 53%) 0%, hsl(330 81% 60%) 100%)"},"gradient-ocean":{hsl:"200 90% 55%",darkHsl:"200 90% 60%",gradient:"linear-gradient(135deg, hsl(221.2 83.2% 53.3%) 0%, hsl(189 94% 43%) 100%)"},"gradient-forest":{hsl:"150 70% 45%",darkHsl:"150 75% 40%",gradient:"linear-gradient(135deg, hsl(142 71% 45%) 0%, hsl(158 64% 52%) 100%)"},"gradient-aurora":{hsl:"310 85% 65%",darkHsl:"310 90% 70%",gradient:"linear-gradient(135deg, hsl(271 91% 65%) 0%, hsl(330 81% 60%) 100%)"},"gradient-fire":{hsl:"15 95% 55%",darkHsl:"15 95% 60%",gradient:"linear-gradient(135deg, hsl(0 84% 60%) 0%, hsl(25 95% 53%) 100%)"},"gradient-twilight":{hsl:"250 90% 60%",darkHsl:"250 95% 65%",gradient:"linear-gradient(135deg, hsl(239 84% 67%) 0%, hsl(271 91% 65%) 100%)"}}[a];if(c)l.style.setProperty("--primary",c.hsl),c.gradient?(l.style.setProperty("--primary-gradient",c.gradient),l.classList.add("has-gradient")):(l.style.removeProperty("--primary-gradient"),l.classList.remove("has-gradient"));else if(a.startsWith("#")){const d=m=>{m=m.replace("#","");const h=parseInt(m.substring(0,2),16)/255,f=parseInt(m.substring(2,4),16)/255,p=parseInt(m.substring(4,6),16)/255,g=Math.max(h,f,p),N=Math.min(h,f,p);let j=0,b=0;const y=(g+N)/2;if(g!==N){const w=g-N;switch(b=y>.5?w/(2-g-N):w/(g+N),g){case h:j=((f-p)/w+(flocalStorage.getItem("accent-color")||"blue");u.useEffect(()=>{const g=localStorage.getItem("accent-color")||"blue";Ig(g)},[]);const p=g=>{f(g),localStorage.setItem("accent-color",g),Ig(g)};return e.jsxs("div",{className:"space-y-6 sm:space-y-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"主题模式"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 sm:gap-4",children:[e.jsx(Bm,{value:"light",current:a,onChange:l,label:"浅色",description:"始终使用浅色主题"}),e.jsx(Bm,{value:"dark",current:a,onChange:l,label:"深色",description:"始终使用深色主题"}),e.jsx(Bm,{value:"system",current:a,onChange:l,label:"跟随系统",description:"根据系统设置自动切换"})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"主题色"}),e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"单色"}),e.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 sm:gap-3",children:[e.jsx(Wa,{value:"blue",current:h,onChange:p,label:"蓝色",colorClass:"bg-blue-500"}),e.jsx(Wa,{value:"purple",current:h,onChange:p,label:"紫色",colorClass:"bg-purple-500"}),e.jsx(Wa,{value:"green",current:h,onChange:p,label:"绿色",colorClass:"bg-green-500"}),e.jsx(Wa,{value:"orange",current:h,onChange:p,label:"橙色",colorClass:"bg-orange-500"}),e.jsx(Wa,{value:"pink",current:h,onChange:p,label:"粉色",colorClass:"bg-pink-500"}),e.jsx(Wa,{value:"red",current:h,onChange:p,label:"红色",colorClass:"bg-red-500"})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"渐变色"}),e.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 sm:gap-3",children:[e.jsx(Wa,{value:"gradient-sunset",current:h,onChange:p,label:"日落",colorClass:"bg-gradient-to-r from-orange-500 to-pink-500"}),e.jsx(Wa,{value:"gradient-ocean",current:h,onChange:p,label:"海洋",colorClass:"bg-gradient-to-r from-blue-500 to-cyan-500"}),e.jsx(Wa,{value:"gradient-forest",current:h,onChange:p,label:"森林",colorClass:"bg-gradient-to-r from-green-500 to-emerald-500"}),e.jsx(Wa,{value:"gradient-aurora",current:h,onChange:p,label:"极光",colorClass:"bg-gradient-to-r from-purple-500 to-pink-500"}),e.jsx(Wa,{value:"gradient-fire",current:h,onChange:p,label:"烈焰",colorClass:"bg-gradient-to-r from-red-500 to-orange-500"}),e.jsx(Wa,{value:"gradient-twilight",current:h,onChange:p,label:"暮光",colorClass:"bg-gradient-to-r from-indigo-500 to-purple-500"})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"自定义颜色"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-4",children:[e.jsx("div",{className:"flex-1",children:e.jsx("input",{type:"color",value:h.startsWith("#")?h:"#3b82f6",onChange:g=>p(g.target.value),className:"h-10 sm:h-12 w-full rounded-lg border-2 border-border cursor-pointer",title:"选择自定义颜色"})}),e.jsx("div",{className:"flex-1",children:e.jsx(ne,{type:"text",value:h,onChange:g=>p(g.target.value),placeholder:"#3b82f6",className:"font-mono text-sm"})})]}),e.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground mt-2",children:"点击色块选择颜色,或手动输入 HEX 颜色代码"})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"动画效果"}),e.jsxs("div",{className:"space-y-2 sm:space-y-3",children:[e.jsx("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5 flex-1",children:[e.jsx(T,{htmlFor:"animations",className:"text-base font-medium cursor-pointer",children:"启用动画效果"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭后将禁用所有过渡动画和特效,提升性能"})]}),e.jsx(Ge,{id:"animations",checked:r,onCheckedChange:c})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5 flex-1",children:[e.jsx(T,{htmlFor:"waves-background",className:"text-base font-medium cursor-pointer",children:"登录页波浪背景"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭后登录页将使用纯色背景,适合低性能设备"})]}),e.jsx(Ge,{id:"waves-background",checked:d,onCheckedChange:m})]})})]})]})]})}function M2(){const a=ha(),[l,r]=u.useState(""),[c,d]=u.useState(""),[m,h]=u.useState(!1),[f,p]=u.useState(!1),[g,N]=u.useState(!1),[j,b]=u.useState(!1),[y,w]=u.useState(!1),[z,M]=u.useState(!1),[S,F]=u.useState(""),[E,C]=u.useState(!1),{toast:R}=nt(),H=u.useMemo(()=>g2(c),[c]),O=async ce=>{if(!l){R({title:"无法复制",description:"Token 存储在安全 Cookie 中,请重新生成以获取新 Token",variant:"destructive"});return}try{await navigator.clipboard.writeText(ce),w(!0),R({title:"复制成功",description:"Token 已复制到剪贴板"}),setTimeout(()=>w(!1),2e3)}catch{R({title:"复制失败",description:"请手动复制 Token",variant:"destructive"})}},X=async()=>{if(!c.trim()){R({title:"输入错误",description:"请输入新的 Token",variant:"destructive"});return}if(!H.isValid){const ce=H.rules.filter(ge=>!ge.passed).map(ge=>ge.label).join(", ");R({title:"格式错误",description:`Token 不符合要求: ${ce}`,variant:"destructive"});return}N(!0);try{const ce=await fetch("/api/webui/auth/update",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({new_token:c.trim()})}),ge=await ce.json();ce.ok&&ge.success?(d(""),r(c.trim()),R({title:"更新成功",description:"Access Token 已更新,即将跳转到登录页"}),setTimeout(()=>{a({to:"/auth"})},1500)):R({title:"更新失败",description:ge.message||"无法更新 Token",variant:"destructive"})}catch(ce){console.error("更新 Token 错误:",ce),R({title:"更新失败",description:"连接服务器失败",variant:"destructive"})}finally{N(!1)}},L=async()=>{b(!0);try{const ce=await fetch("/api/webui/auth/regenerate",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"}),ge=await ce.json();ce.ok&&ge.success?(r(ge.token),F(ge.token),M(!0),C(!1),R({title:"生成成功",description:"新的 Access Token 已生成,请及时保存"})):R({title:"生成失败",description:ge.message||"无法生成新 Token",variant:"destructive"})}catch(ce){console.error("生成 Token 错误:",ce),R({title:"生成失败",description:"连接服务器失败",variant:"destructive"})}finally{b(!1)}},me=async()=>{try{await navigator.clipboard.writeText(S),C(!0),R({title:"复制成功",description:"Token 已复制到剪贴板"})}catch{R({title:"复制失败",description:"请手动复制 Token",variant:"destructive"})}},Ne=()=>{M(!1),setTimeout(()=>{F(""),C(!1)},300),setTimeout(()=>{a({to:"/auth"})},500)},je=ce=>{ce||Ne()};return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsx(Qs,{open:z,onOpenChange:je,children:e.jsxs(Hs,{className:"sm:max-w-md",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Lt,{className:"h-5 w-5 text-yellow-500"}),"新的 Access Token"]}),e.jsx(at,{children:"这是您的新 Token,请立即保存。关闭此窗口后将跳转到登录页面。"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border-2 border-primary/20 bg-primary/5 p-4",children:[e.jsx(T,{className:"text-xs text-muted-foreground mb-2 block",children:"您的新 Token (64位安全令牌)"}),e.jsx("div",{className:"font-mono text-sm break-all select-all bg-background p-3 rounded border",children:S})]}),e.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Lt,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-yellow-800 dark:text-yellow-300 space-y-1",children:[e.jsx("p",{className:"font-semibold",children:"重要提示"}),e.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[e.jsx("li",{children:"此 Token 仅显示一次,关闭后无法再查看"}),e.jsx("li",{children:"请立即复制并保存到安全的位置"}),e.jsx("li",{children:"关闭窗口后将自动跳转到登录页面"}),e.jsx("li",{children:"请使用新 Token 重新登录系统"})]})]})]})})]}),e.jsxs(gt,{className:"gap-2 sm:gap-0",children:[e.jsx(_,{variant:"outline",onClick:me,className:"gap-2",children:E?e.jsxs(e.Fragment,{children:[e.jsx(Ot,{className:"h-4 w-4 text-green-500"}),"已复制"]}):e.jsxs(e.Fragment,{children:[e.jsx(qo,{className:"h-4 w-4"}),"复制 Token"]})}),e.jsx(_,{onClick:Ne,children:"我已保存,关闭"})]})]})}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"当前 Access Token"}),e.jsx("div",{className:"space-y-3 sm:space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"current-token",className:"text-sm",children:"您的访问令牌"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ne,{id:"current-token",type:m?"text":"password",value:l||"••••••••••••••••••••••••••••••••",readOnly:!0,className:"pr-10 font-mono text-sm",placeholder:"Token 存储在安全 Cookie 中"}),e.jsx("button",{onClick:()=>{l?h(!m):R({title:"无法查看",description:'Token 存储在安全 Cookie 中,如需新 Token 请点击"重新生成"'})},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 hover:bg-accent rounded",title:m?"隐藏":"显示",children:m?e.jsx(ic,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ua,{className:"h-4 w-4 text-muted-foreground"})})]}),e.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[e.jsx(_,{variant:"outline",size:"icon",onClick:()=>O(l),title:"复制到剪贴板",className:"flex-shrink-0",disabled:!l,children:y?e.jsx(Ot,{className:"h-4 w-4 text-green-500"}):e.jsx(qo,{className:"h-4 w-4"})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"outline",disabled:j,className:"gap-2 flex-1 sm:flex-none",children:[e.jsx(dt,{className:P("h-4 w-4",j&&"animate-spin")}),e.jsx("span",{className:"hidden sm:inline",children:"重新生成"}),e.jsx("span",{className:"sm:hidden",children:"生成"})]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重新生成 Token"}),e.jsx(gs,{children:"这将生成一个新的 64 位安全令牌,并使当前 Token 立即失效。 您需要使用新 Token 重新登录系统。此操作不可撤销,确定要继续吗?"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:L,children:"确认生成"})]})]})]})]})]}),e.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground",children:"请妥善保管您的 Access Token,不要泄露给他人"})]})})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"自定义 Access Token"}),e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"new-token",className:"text-sm",children:"新的访问令牌"}),e.jsxs("div",{className:"relative",children:[e.jsx(ne,{id:"new-token",type:f?"text":"password",value:c,onChange:ce=>d(ce.target.value),className:"pr-10 font-mono text-sm",placeholder:"输入自定义 Token"}),e.jsx("button",{onClick:()=>p(!f),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 hover:bg-accent rounded",title:f?"隐藏":"显示",children:f?e.jsx(ic,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ua,{className:"h-4 w-4 text-muted-foreground"})})]}),c&&e.jsxs("div",{className:"mt-3 space-y-2 p-3 rounded-lg bg-muted/50",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Token 安全要求:"}),e.jsx("div",{className:"space-y-1.5",children:H.rules.map(ce=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[ce.passed?e.jsx(st,{className:"h-4 w-4 text-green-500 flex-shrink-0"}):e.jsx(ta,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),e.jsx("span",{className:P(ce.passed?"text-green-600 dark:text-green-400":"text-muted-foreground"),children:ce.label})]},ce.id))}),H.isValid&&e.jsx("div",{className:"mt-2 pt-2 border-t border-border",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[e.jsx(Ot,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:"Token 格式正确,可以使用"})]})})]})]}),e.jsx(_,{onClick:X,disabled:g||!H.isValid||!c,className:"w-full sm:w-auto",children:g?"更新中...":"更新自定义 Token"})]})]}),e.jsxs("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3 sm:p-4",children:[e.jsx("h4",{className:"text-sm sm:text-base font-semibold text-yellow-900 dark:text-yellow-200 mb-2",children:"安全提示"}),e.jsxs("ul",{className:"text-xs sm:text-sm text-yellow-800 dark:text-yellow-300 space-y-1 list-disc list-inside",children:[e.jsx("li",{children:"重新生成 Token 会创建系统随机生成的 64 位安全令牌"}),e.jsx("li",{children:"自定义 Token 必须满足所有安全要求才能使用"}),e.jsx("li",{children:"更新 Token 后,旧的 Token 将立即失效"}),e.jsx("li",{children:"请在安全的环境下查看和复制 Token"}),e.jsx("li",{children:"如果怀疑 Token 泄露,请立即重新生成或更新"}),e.jsx("li",{children:"建议使用系统生成的 Token 以获得最高安全性"})]})]})]})}function A2(){const a=ha(),{toast:l}=nt(),[r,c]=u.useState(!1),[d,m]=u.useState(!1),[h,f]=u.useState(()=>zt("logCacheSize")),[p,g]=u.useState(()=>zt("wsReconnectInterval")),[N,j]=u.useState(()=>zt("wsMaxReconnectAttempts")),[b,y]=u.useState(()=>zt("dataSyncInterval")),[w,z]=u.useState(()=>Bg()),[M,S]=u.useState(!1),[F,E]=u.useState(!1),C=u.useRef(null);if(d)throw new Error("这是一个手动触发的测试错误,用于验证错误边界组件是否正常工作。");const R=()=>{z(Bg())},H=D=>{const Q=D[0];f(Q),Yr("logCacheSize",Q)},O=D=>{const Q=D[0];g(Q),Yr("wsReconnectInterval",Q)},X=D=>{const Q=D[0];j(Q),Yr("wsMaxReconnectAttempts",Q)},L=D=>{const Q=D[0];y(Q),Yr("dataSyncInterval",Q)},me=()=>{Qn.clearLogs(),l({title:"日志已清除",description:"日志缓存已清空"})},Ne=()=>{const D=_2();R(),l({title:"缓存已清除",description:`已清除 ${D.clearedKeys.length} 项缓存数据`})},je=()=>{S(!0);try{const D=b2(),Q=JSON.stringify(D,null,2),B=new Blob([Q],{type:"application/json"}),ue=URL.createObjectURL(B),Y=document.createElement("a");Y.href=ue,Y.download=`maibot-webui-settings-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(Y),Y.click(),document.body.removeChild(Y),URL.revokeObjectURL(ue),l({title:"导出成功",description:"设置已导出为 JSON 文件"})}catch(D){console.error("导出设置失败:",D),l({title:"导出失败",description:"无法导出设置",variant:"destructive"})}finally{S(!1)}},ce=D=>{const Q=D.target.files?.[0];if(!Q)return;E(!0);const B=new FileReader;B.onload=ue=>{try{const Y=ue.target?.result,we=JSON.parse(Y),fe=y2(we);fe.success?(f(zt("logCacheSize")),g(zt("wsReconnectInterval")),j(zt("wsMaxReconnectAttempts")),y(zt("dataSyncInterval")),R(),l({title:"导入成功",description:`成功导入 ${fe.imported.length} 项设置${fe.skipped.length>0?`,跳过 ${fe.skipped.length} 项`:""}`}),(fe.imported.includes("theme")||fe.imported.includes("accentColor"))&&l({title:"提示",description:"部分设置需要刷新页面才能完全生效"})):l({title:"导入失败",description:"没有有效的设置项可导入",variant:"destructive"})}catch(Y){console.error("导入设置失败:",Y),l({title:"导入失败",description:"文件格式无效",variant:"destructive"})}finally{E(!1),C.current&&(C.current.value="")}},B.readAsText(Q)},ge=()=>{w2(),f(jl.logCacheSize),g(jl.wsReconnectInterval),j(jl.wsMaxReconnectAttempts),y(jl.dataSyncInterval),R(),l({title:"已重置",description:"所有设置已恢复为默认值,刷新页面以应用更改"})},pe=async()=>{c(!0);try{const D=await ke("/api/webui/setup/reset",{method:"POST"}),Q=await D.json();D.ok&&Q.success?(l({title:"重置成功",description:"即将进入初次配置向导"}),setTimeout(()=>{a({to:"/setup"})},1e3)):l({title:"重置失败",description:Q.message||"无法重置配置状态",variant:"destructive"})}catch(D){console.error("重置配置状态错误:",D),l({title:"重置失败",description:"连接服务器失败",variant:"destructive"})}finally{c(!1)}};return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(Zr,{className:"h-5 w-5"}),"性能与存储"]}),e.jsxs("div",{className:"space-y-4 sm:space-y-5",children:[e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 sm:p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("span",{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(z1,{className:"h-4 w-4"}),"本地存储使用"]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:R,className:"h-7 px-2",children:e.jsx(dt,{className:"h-3 w-3"})})]}),e.jsx("div",{className:"text-2xl font-bold text-primary",children:S2(w.used)}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[w.items," 个存储项"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm font-medium",children:"日志缓存大小"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[h," 条"]})]}),e.jsx(el,{value:[h],onValueChange:H,min:100,max:5e3,step:100,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"控制日志查看器最多缓存的日志条数,较大的值会占用更多内存"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm font-medium",children:"首页数据刷新间隔"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[b," 秒"]})]}),e.jsx(el,{value:[b],onValueChange:L,min:10,max:120,step:5,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"控制首页统计数据的自动刷新间隔"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm font-medium",children:"WebSocket 重连间隔"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[p/1e3," 秒"]})]}),e.jsx(el,{value:[p],onValueChange:O,min:1e3,max:1e4,step:500,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"日志 WebSocket 连接断开后的重连基础间隔"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm font-medium",children:"WebSocket 最大重连次数"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[N," 次"]})]}),e.jsx(el,{value:[N],onValueChange:X,min:3,max:30,step:1,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"连接失败后的最大重连尝试次数"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 pt-2",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:me,className:"gap-2",children:[e.jsx(os,{className:"h-4 w-4"}),"清除日志缓存"]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:"gap-2",children:[e.jsx(os,{className:"h-4 w-4"}),"清除本地缓存"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认清除本地缓存"}),e.jsx(gs,{children:"这将清除所有本地缓存的设置和数据(不包括登录凭证)。 您可能需要重新配置部分偏好设置。确定要继续吗?"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:Ne,children:"确认清除"})]})]})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(na,{className:"h-5 w-5"}),"导入/导出设置"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"导出当前的界面设置以便备份,或从之前导出的文件中恢复设置。"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(_,{variant:"outline",onClick:je,disabled:M,className:"gap-2",children:[e.jsx(na,{className:"h-4 w-4"}),M?"导出中...":"导出设置"]}),e.jsx("input",{ref:C,type:"file",accept:".json",onChange:ce,className:"hidden"}),e.jsxs(_,{variant:"outline",onClick:()=>C.current?.click(),disabled:F,className:"gap-2",children:[e.jsx(cc,{className:"h-4 w-4"}),F?"导入中...":"导入设置"]})]}),e.jsx("div",{className:"pt-2 border-t",children:e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:"gap-2 text-destructive hover:text-destructive",children:[e.jsx(rc,{className:"h-4 w-4"}),"重置所有设置为默认值"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重置所有设置"}),e.jsx(gs,{children:"这将把所有界面设置恢复为默认值,包括主题、颜色、动画等偏好设置。 此操作不会影响您的登录状态。确定要继续吗?"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:ge,children:"确认重置"})]})]})]})})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"配置向导"}),e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsx("div",{className:"space-y-2",children:e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"重新进行初次配置向导,可以帮助您重新设置系统的基础配置。"})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"outline",disabled:r,className:"gap-2",children:[e.jsx(rc,{className:P("h-4 w-4",r&&"animate-spin")}),"重新进行初次配置"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重新配置"}),e.jsx(gs,{children:"这将带您重新进入初次配置向导。您可以重新设置系统的基础配置项。确定要继续吗?"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:pe,children:"确认重置"})]})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border border-dashed border-yellow-500/50 bg-yellow-500/5 p-4 sm:p-6",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(Lt,{className:"h-5 w-5 text-yellow-500"}),"开发者工具"]}),e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsx("div",{className:"space-y-2",children:e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"以下功能仅供开发调试使用,可能会导致页面崩溃或异常。"})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"destructive",className:"gap-2",children:[e.jsx(Lt,{className:"h-4 w-4"}),"触发测试错误"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认触发错误"}),e.jsx(gs,{children:"这将手动触发一个 React 错误,用于测试错误边界组件的显示效果。 页面将显示错误界面,您可以通过刷新页面或点击返回首页来恢复。"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>m(!0),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"确认触发"})]})]})]})]})]})]})}function z2(){return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsx("div",{className:"rounded-lg border-2 border-primary/30 bg-gradient-to-r from-primary/5 to-primary/10 p-4 sm:p-6",children:e.jsxs("div",{className:"flex items-start gap-3 sm:gap-4",children:[e.jsx("div",{className:"flex-shrink-0 rounded-lg bg-primary/10 p-2 sm:p-3",children:e.jsx("svg",{className:"h-6 w-6 sm:h-8 sm:w-8 text-primary",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-lg sm:text-xl font-bold text-foreground mb-2",children:"开源项目"}),e.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mb-3",children:"本项目在 GitHub 开源,欢迎 Star ⭐ 支持!"}),e.jsxs("a",{href:"https://github.com/Mai-with-u/MaiBot-Dashboard",target:"_blank",rel:"noopener noreferrer",className:P("inline-flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground font-medium text-sm","hover:bg-primary/90 transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),children:[e.jsx("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})}),"前往 GitHub",e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]})]})}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:["关于 ",Nx]}),e.jsxs("div",{className:"space-y-2 text-xs sm:text-sm text-muted-foreground",children:[e.jsxs("p",{children:["版本: ",ud]}),e.jsx("p",{children:"麦麦(MaiBot)的现代化 Web 管理界面"})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"作者"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"MaiBot 核心"}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"Mai-with-u"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"WebUI"}),e.jsxs("p",{className:"text-xs sm:text-sm text-muted-foreground",children:["Mai-with-u ",e.jsx("a",{href:"https://github.com/DrSmoothl",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"@MotricSeven"})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"技术栈"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs sm:text-sm text-muted-foreground",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-foreground",children:"前端框架"}),e.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[e.jsx("li",{children:"React 19.2.0"}),e.jsx("li",{children:"TypeScript 5.7.2"}),e.jsx("li",{children:"Vite 6.0.7"}),e.jsx("li",{children:"TanStack Router 1.94.2"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-foreground",children:"UI 组件"}),e.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[e.jsx("li",{children:"shadcn/ui"}),e.jsx("li",{children:"Radix UI"}),e.jsx("li",{children:"Tailwind CSS 3.4.17"}),e.jsx("li",{children:"Lucide Icons"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-foreground",children:"后端"}),e.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[e.jsx("li",{children:"Python 3.12+"}),e.jsx("li",{children:"FastAPI"}),e.jsx("li",{children:"Uvicorn"}),e.jsx("li",{children:"WebSocket"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-foreground",children:"构建工具"}),e.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[e.jsx("li",{children:"Bun / npm"}),e.jsx("li",{children:"ESLint 9.17.0"}),e.jsx("li",{children:"PostCSS"})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"开源库感谢"}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mb-3",children:"本项目使用了以下优秀的开源库,感谢他们的贡献:"}),e.jsx(ts,{className:"h-[300px] sm:h-[400px]",children:e.jsxs("div",{className:"space-y-4 pr-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"UI 框架与组件"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"React",description:"用户界面构建库",license:"MIT"}),e.jsx(Et,{name:"shadcn/ui",description:"优雅的 React 组件库",license:"MIT"}),e.jsx(Et,{name:"Radix UI",description:"无样式的可访问组件库",license:"MIT"}),e.jsx(Et,{name:"Tailwind CSS",description:"实用优先的 CSS 框架",license:"MIT"}),e.jsx(Et,{name:"Lucide React",description:"精美的图标库",license:"ISC"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"路由与状态管理"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"TanStack Router",description:"类型安全的路由库",license:"MIT"}),e.jsx(Et,{name:"Zustand",description:"轻量级状态管理",license:"MIT"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"表单处理"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"React Hook Form",description:"高性能表单库",license:"MIT"}),e.jsx(Et,{name:"Zod",description:"TypeScript 优先的 schema 验证",license:"MIT"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"工具库"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"clsx",description:"条件 className 构建工具",license:"MIT"}),e.jsx(Et,{name:"tailwind-merge",description:"Tailwind 类名合并工具",license:"MIT"}),e.jsx(Et,{name:"class-variance-authority",description:"组件变体管理",license:"Apache-2.0"}),e.jsx(Et,{name:"date-fns",description:"现代化日期处理库",license:"MIT"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"动画效果"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"Framer Motion",description:"React 动画库",license:"MIT"}),e.jsx(Et,{name:"vaul",description:"抽屉组件动画",license:"MIT"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"后端框架"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"FastAPI",description:"现代化 Python Web 框架",license:"MIT"}),e.jsx(Et,{name:"Uvicorn",description:"ASGI 服务器",license:"BSD-3-Clause"}),e.jsx(Et,{name:"Pydantic",description:"数据验证库",license:"MIT"}),e.jsx(Et,{name:"python-multipart",description:"文件上传支持",license:"Apache-2.0"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"开发工具"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"TypeScript",description:"JavaScript 的超集",license:"Apache-2.0"}),e.jsx(Et,{name:"Vite",description:"下一代前端构建工具",license:"MIT"}),e.jsx(Et,{name:"ESLint",description:"JavaScript 代码检查工具",license:"MIT"}),e.jsx(Et,{name:"PostCSS",description:"CSS 转换工具",license:"MIT"})]})]})]})})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"开源许可"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"rounded-lg bg-primary/5 border border-primary/20 p-3 sm:p-4",children:e.jsxs("div",{className:"flex items-start gap-2 sm:gap-3",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("div",{className:"rounded-md bg-primary/10 px-2 py-1",children:e.jsx("span",{className:"text-xs sm:text-sm font-bold text-primary",children:"GPLv3"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm sm:text-base font-semibold text-foreground mb-1",children:"MaiBot WebUI"}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"本项目采用 GNU General Public License v3.0 开源许可证。 您可以自由地使用、修改和分发本软件,但必须保持相同的开源许可。"})]})]})}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"本项目依赖的所有开源库均遵循各自的开源许可证(MIT、Apache-2.0、BSD 等)。 感谢所有开源贡献者的无私奉献。"})]})]})]})}function Et({name:a,description:l,license:r}){return e.jsxs("div",{className:"flex items-start justify-between gap-2 rounded-lg border bg-muted/30 p-2.5 sm:p-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-foreground truncate",children:a}),e.jsx("p",{className:"text-muted-foreground text-xs mt-0.5",children:l})]}),e.jsx("span",{className:"inline-flex items-center rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary flex-shrink-0",children:r})]})}function Bm({value:a,current:l,onChange:r,label:c,description:d}){const m=l===a;return e.jsxs("button",{onClick:()=>r(a),className:P("relative rounded-lg border-2 p-3 sm:p-4 text-left transition-all","hover:border-primary/50 hover:bg-accent/50",m?"border-primary bg-accent":"border-border"),children:[m&&e.jsx("div",{className:"absolute top-2 right-2 sm:top-3 sm:right-3 h-2 w-2 rounded-full bg-primary"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm sm:text-base font-medium",children:c}),e.jsx("div",{className:"text-[10px] sm:text-xs text-muted-foreground",children:d})]}),e.jsxs("div",{className:"mt-2 sm:mt-3 flex gap-1",children:[a==="light"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-200"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-300"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-400"})]}),a==="dark"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-700"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-800"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-900"})]}),a==="system"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-200 to-slate-700"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-300 to-slate-800"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-400 to-slate-900"})]})]})]})}function Wa({value:a,current:l,onChange:r,label:c,colorClass:d}){const m=l===a;return e.jsxs("button",{onClick:()=>r(a),className:P("relative rounded-lg border-2 p-2 sm:p-3 text-left transition-all","hover:border-primary/50 hover:bg-accent/50",m?"border-primary bg-accent":"border-border"),children:[m&&e.jsx("div",{className:"absolute top-1.5 right-1.5 sm:top-2 sm:right-2 h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-primary"}),e.jsxs("div",{className:"flex flex-col items-center gap-1.5 sm:gap-2",children:[e.jsx("div",{className:P("h-8 w-8 sm:h-10 sm:w-10 rounded-full",d)}),e.jsx("div",{className:"text-[10px] sm:text-xs font-medium text-center",children:c})]})]})}const R2=Date.now()%1e6;class D2{grad3;p;perm;constructor(l=0){this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.p=[];for(let r=0;r<256;r++)this.p[r]=Math.floor(Math.random()*256);this.perm=[];for(let r=0;r<512;r++)this.perm[r]=this.p[r&255]}dot(l,r,c){return l[0]*r+l[1]*c}mix(l,r,c){return(1-c)*l+c*r}fade(l){return l*l*l*(l*(l*6-15)+10)}perlin2(l,r){const c=Math.floor(l)&255,d=Math.floor(r)&255;l-=Math.floor(l),r-=Math.floor(r);const m=this.fade(l),h=this.fade(r),f=this.perm[c]+d,p=this.perm[f],g=this.perm[f+1],N=this.perm[c+1]+d,j=this.perm[N],b=this.perm[N+1];return this.mix(this.mix(this.dot(this.grad3[p%12],l,r),this.dot(this.grad3[j%12],l-1,r),m),this.mix(this.dot(this.grad3[g%12],l,r-1),this.dot(this.grad3[b%12],l-1,r-1),m),h)}}function Pg(){const a=u.useRef(null),l=u.useRef(null),r=u.useRef(void 0),[c]=u.useState(()=>new D2(R2)),d=u.useRef({mouse:{x:-10,y:0,lx:0,ly:0,sx:0,sy:0,v:0,vs:0,a:0,set:!1},lines:[],paths:[],noise:c,bounding:null});return u.useEffect(()=>{const m=l.current,h=a.current;if(!m||!h)return;const f=d.current;f.noise=c;const p=()=>{const M=m.getBoundingClientRect();f.bounding=M,h.style.width=`${M.width}px`,h.style.height=`${M.height}px`},g=()=>{if(!f.bounding)return;const{width:M,height:S}=f.bounding;f.lines=[],f.paths.forEach(me=>me.remove()),f.paths=[];const F=10,E=32,C=M+200,R=S+30,H=Math.ceil(C/F),O=Math.ceil(R/E),X=(M-F*H)/2,L=(S-E*O)/2;for(let me=0;me<=H;me++){const Ne=[];for(let ce=0;ce<=O;ce++){const ge={x:X+F*me,y:L+E*ce,wave:{x:0,y:0},cursor:{x:0,y:0,vx:0,vy:0}};Ne.push(ge)}const je=document.createElementNS("http://www.w3.org/2000/svg","path");h.appendChild(je),f.paths.push(je),f.lines.push(Ne)}},N=M=>{const{lines:S,mouse:F,noise:E}=f;S.forEach(C=>{C.forEach(R=>{const H=E.perlin2((R.x+M*.0125)*.002,(R.y+M*.005)*.0015)*12;R.wave.x=Math.cos(H)*32,R.wave.y=Math.sin(H)*16;const O=R.x-F.sx,X=R.y-F.sy,L=Math.hypot(O,X),me=Math.max(175,F.vs);if(L{const F={x:M.x+M.wave.x+(S?M.cursor.x:0),y:M.y+M.wave.y+(S?M.cursor.y:0)};return F.x=Math.round(F.x*10)/10,F.y=Math.round(F.y*10)/10,F},b=()=>{const{lines:M,paths:S}=f;M.forEach((F,E)=>{let C=j(F[0],!1),R=`M ${C.x} ${C.y}`;F.forEach((H,O)=>{const X=O===F.length-1;C=j(H,!X),R+=`L ${C.x} ${C.y}`}),S[E].setAttribute("d",R)})},y=M=>{const{mouse:S}=f;S.sx+=(S.x-S.sx)*.1,S.sy+=(S.y-S.sy)*.1;const F=S.x-S.lx,E=S.y-S.ly,C=Math.hypot(F,E);S.v=C,S.vs+=(C-S.vs)*.1,S.vs=Math.min(100,S.vs),S.lx=S.x,S.ly=S.y,S.a=Math.atan2(E,F),m&&(m.style.setProperty("--x",`${S.sx}px`),m.style.setProperty("--y",`${S.sy}px`)),N(M),b(),r.current=requestAnimationFrame(y)},w=M=>{if(!f.bounding)return;const{mouse:S}=f;S.x=M.pageX-f.bounding.left,S.y=M.pageY-f.bounding.top+window.scrollY,S.set||(S.sx=S.x,S.sy=S.y,S.lx=S.x,S.ly=S.y,S.set=!0)},z=()=>{p(),g()};return p(),g(),window.addEventListener("resize",z),window.addEventListener("mousemove",w),r.current=requestAnimationFrame(y),()=>{window.removeEventListener("resize",z),window.removeEventListener("mousemove",w),r.current&&cancelAnimationFrame(r.current)}},[c]),e.jsxs("div",{ref:l,className:"waves-background",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",pointerEvents:"none"},children:[e.jsx("div",{className:"waves-cursor",style:{position:"absolute",top:0,left:0,width:"0.5rem",height:"0.5rem",background:"hsl(var(--primary) / 0.3)",borderRadius:"50%",transform:"translate3d(calc(var(--x, -0.5rem) - 50%), calc(var(--y, 50%) - 50%), 0)",willChange:"transform",pointerEvents:"none"}}),e.jsx("svg",{ref:a,style:{display:"block",width:"100%",height:"100%"},children:e.jsx("style",{children:` +`)}}):null},Qi=$j,Qr=u.forwardRef(({active:a,payload:l,className:r,indicator:c="dot",hideLabel:d=!1,hideIndicator:m=!1,label:h,labelFormatter:f,labelClassName:p,formatter:g,color:N,nameKey:j,labelKey:b},y)=>{const{config:w}=Av(),z=u.useMemo(()=>{if(d||!l?.length)return null;const[S]=l,F=`${b||S?.dataKey||S?.name||"value"}`,E=Zm(w,S,F),C=!b&&typeof h=="string"?w[h]?.label||h:E?.label;return f?e.jsx("div",{className:P("font-medium",p),children:f(C,l)}):C?e.jsx("div",{className:P("font-medium",p),children:C}):null},[h,f,l,d,p,w,b]);if(!a||!l?.length)return null;const M=l.length===1&&c!=="dot";return e.jsxs("div",{ref:y,className:P("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",r),children:[M?null:z,e.jsx("div",{className:"grid gap-1.5",children:l.filter(S=>S.type!=="none").map((S,F)=>{const E=`${j||S.name||S.dataKey||"value"}`,C=Zm(w,S,E),R=N||S.payload.fill||S.color;return e.jsx("div",{className:P("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",c==="dot"&&"items-center"),children:g&&S?.value!==void 0&&S.name?g(S.value,S.name,S,F,S.payload):e.jsxs(e.Fragment,{children:[C?.icon?e.jsx(C.icon,{}):!m&&e.jsx("div",{className:P("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":c==="dot","w-1":c==="line","w-0 border-[1.5px] border-dashed bg-transparent":c==="dashed","my-0.5":M&&c==="dashed"}),style:{"--color-bg":R,"--color-border":R}}),e.jsxs("div",{className:P("flex flex-1 justify-between leading-none",M?"items-end":"items-center"),children:[e.jsxs("div",{className:"grid gap-1.5",children:[M?z:null,e.jsx("span",{className:"text-muted-foreground",children:C?.label||S.name})]}),S.value&&e.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:S.value.toLocaleString()})]})]})},S.dataKey)})})]})});Qr.displayName="ChartTooltip";const F1=Zw,zv=u.forwardRef(({className:a,hideIcon:l=!1,payload:r,verticalAlign:c="bottom",nameKey:d},m)=>{const{config:h}=Av();return r?.length?e.jsx("div",{ref:m,className:P("flex items-center justify-center gap-4",c==="top"?"pb-3":"pt-3",a),children:r.filter(f=>f.type!=="none").map(f=>{const p=`${d||f.dataKey||"value"}`,g=Zm(h,f,p);return e.jsxs("div",{className:P("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[g?.icon&&!l?e.jsx(g.icon,{}):e.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:f.color}}),g?.label]},f.value)})}):null});zv.displayName="ChartLegend";function Zm(a,l,r){if(typeof l!="object"||l===null)return;const c="payload"in l&&typeof l.payload=="object"&&l.payload!==null?l.payload:void 0;let d=r;return r in l&&typeof l[r]=="string"?d=l[r]:c&&r in c&&typeof c[r]=="string"&&(d=c[r]),d in a?a[d]:a[r]}const si=ti("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),_=u.forwardRef(({className:a,variant:l,size:r,asChild:c=!1,...d},m)=>{const h=c?l_:"button";return e.jsx(h,{className:P(si({variant:l,size:r,className:a})),ref:m,...d})});_.displayName="Button";const H1=ti("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ce({className:a,variant:l,...r}){return e.jsx("div",{className:P(H1({variant:l}),a),...r})}async function q1(){const a=await ke("/api/webui/system/restart",{method:"POST",headers:Zs()});if(!a.ok){const l=await a.json();throw new Error(l.detail||"重启失败")}return await a.json()}async function V1(){const a=await ke("/api/webui/system/status",{method:"GET",headers:Zs()});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取状态失败")}return await a.json()}const Hr={INITIAL_DELAY:3e3,CHECK_INTERVAL:2e3,CHECK_TIMEOUT:3e3,MAX_ATTEMPTS:60,PROGRESS_INTERVAL:200,SUCCESS_REDIRECT_DELAY:1500},Rv=u.createContext(null);function lr({children:a,onRestartComplete:l,onRestartFailed:r,healthCheckUrl:c="/api/webui/system/status",maxAttempts:d=Hr.MAX_ATTEMPTS}){const[m,h]=u.useState({status:"idle",progress:0,elapsedTime:0,checkAttempts:0,maxAttempts:d}),f=u.useRef({}),p=u.useCallback(()=>{const z=f.current;z.progress&&(clearInterval(z.progress),z.progress=void 0),z.elapsed&&(clearInterval(z.elapsed),z.elapsed=void 0),z.check&&(clearTimeout(z.check),z.check=void 0)},[]),g=u.useCallback(()=>{p(),h({status:"idle",progress:0,elapsedTime:0,checkAttempts:0,maxAttempts:d})},[p,d]),N=u.useCallback(async()=>{try{const z=new AbortController,M=setTimeout(()=>z.abort(),Hr.CHECK_TIMEOUT),S=await fetch(c,{method:"GET",headers:{"Content-Type":"application/json"},credentials:"include",signal:z.signal});return clearTimeout(M),S.ok}catch{return!1}},[c]),j=u.useCallback(()=>{let z=0;const M=async()=>{if(z++,h(F=>({...F,status:"checking",checkAttempts:z})),await N())p(),h(F=>({...F,status:"success",progress:100})),setTimeout(()=>{l?.(),window.location.href="/auth"},Hr.SUCCESS_REDIRECT_DELAY);else if(z>=d){p();const F=`健康检查超时 (${z}/${d})`;h(E=>({...E,status:"failed",error:F})),r?.(F)}else{const F=setTimeout(M,Hr.CHECK_INTERVAL);f.current.check=F}};M()},[N,p,d,l,r]),b=u.useCallback(()=>{h(z=>({...z,status:"checking",checkAttempts:0,error:void 0})),j()},[j]),y=u.useCallback(async z=>{const{delay:M=0,skipApiCall:S=!1}=z??{};if(m.status!=="idle"&&m.status!=="failed")return;if(p(),h({status:"requesting",progress:0,elapsedTime:0,checkAttempts:0,maxAttempts:d}),M>0&&await new Promise(C=>setTimeout(C,M)),S)h(C=>({...C,status:"restarting"}));else try{h(C=>({...C,status:"restarting"})),await Promise.race([q1(),new Promise(C=>setTimeout(C,5e3))])}catch{}const F=setInterval(()=>{h(C=>({...C,progress:C.progress>=90?C.progress:C.progress+1}))},Hr.PROGRESS_INTERVAL),E=setInterval(()=>{h(C=>({...C,elapsedTime:C.elapsedTime+1}))},1e3);f.current.progress=F,f.current.elapsed=E,setTimeout(()=>{j()},Hr.INITIAL_DELAY)},[m.status,p,d,j]),w={state:m,isRestarting:m.status!=="idle",triggerRestart:y,resetState:g,retryHealthCheck:b};return e.jsx(Rv.Provider,{value:w,children:a})}function Tn(){const a=u.useContext(Rv);if(!a)throw new Error("useRestart must be used within a RestartProvider");return a}function G1(){try{return Tn()}catch{return null}}const K1=(a,l,r,c,d)=>({idle:{icon:null,title:"",description:"",tip:""},requesting:{icon:e.jsx(Fs,{className:"h-16 w-16 text-primary animate-spin"}),title:c??"准备重启",description:d??"正在发送重启请求...",tip:"🔄 正在准备重启麦麦..."},restarting:{icon:e.jsx(Fs,{className:"h-16 w-16 text-primary animate-spin"}),title:c??"正在重启麦麦",description:d??"请稍候,麦麦正在重启中...",tip:"🔄 配置已保存,正在重启主程序..."},checking:{icon:e.jsx(Fs,{className:"h-16 w-16 text-primary animate-spin"}),title:"检查服务状态",description:`等待服务恢复... (${l}/${r})`,tip:"⏳ 正在等待服务恢复,请勿关闭页面..."},success:{icon:e.jsx(st,{className:"h-16 w-16 text-green-500"}),title:"重启成功",description:"正在跳转到登录页面...",tip:"✅ 配置已生效,服务运行正常"},failed:{icon:e.jsx(Ut,{className:"h-16 w-16 text-destructive"}),title:"重启超时",description:"服务未能在预期时间内恢复",tip:"⚠️ 如果长时间无响应,请尝试手动重启"}})[a];function nr({visible:a,onComplete:l,onFailed:r,title:c,description:d,showAnimation:m=!0,className:h}){const f=G1();return(f?f.isRestarting:a)?f?e.jsx(Dv,{state:f.state,onRetry:f.retryHealthCheck,onComplete:l,onFailed:r,title:c,description:d,showAnimation:m,className:h}):e.jsx(Q1,{onComplete:l,onFailed:r,title:c,description:d,showAnimation:m,className:h}):null}function Dv({state:a,onRetry:l,onComplete:r,onFailed:c,title:d,description:m,showAnimation:h,className:f}){const{status:p,progress:g,elapsedTime:N,checkAttempts:j,maxAttempts:b}=a;u.useEffect(()=>{p==="success"&&r?r():p==="failed"&&c&&c()},[p,r,c]);const y=K1(p,j,b,d,m),w=z=>{const M=Math.floor(z/60),S=z%60;return`${M}:${S.toString().padStart(2,"0")}`};return e.jsxs("div",{className:P("fixed inset-0 bg-background/95 backdrop-blur-sm z-50 flex items-center justify-center",f),children:[h&&e.jsx(Y1,{}),e.jsxs("div",{className:"max-w-md w-full mx-4 space-y-8 relative z-10",children:[e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsxs("div",{className:"relative",children:[y.icon,(p==="restarting"||p==="checking")&&e.jsx("div",{className:"absolute inset-0 rounded-full bg-primary/20 animate-ping"})]}),e.jsx("h2",{className:"text-2xl font-bold",children:y.title}),e.jsx("p",{className:"text-muted-foreground text-center",children:y.description})]}),p!=="failed"&&p!=="idle"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(tr,{value:g,className:"h-2"}),e.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[e.jsxs("span",{children:[g,"%"]}),e.jsxs("span",{children:["已用时: ",w(N)]})]})]}),e.jsx("div",{className:"bg-muted/50 rounded-lg p-4",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:y.tip})}),p==="failed"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(_,{onClick:()=>window.location.reload(),variant:"default",className:"flex-1",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),"刷新页面"]}),e.jsxs(_,{onClick:l,variant:"secondary",className:"flex-1",children:[e.jsx(rc,{className:"mr-2 h-4 w-4"}),"重试检测"]})]})]})]})}function Q1({onComplete:a,onFailed:l,title:r,description:c,showAnimation:d,className:m}){const[h,f]=u.useState({status:"restarting",progress:0,elapsedTime:0,checkAttempts:0,maxAttempts:60}),p=u.useCallback(()=>{let g=0;const N=60,j=async()=>{g++,f(b=>({...b,status:"checking",checkAttempts:g}));try{if((await fetch("/api/webui/system/status",{method:"GET",signal:AbortSignal.timeout(3e3)})).ok){f(y=>({...y,status:"success",progress:100})),setTimeout(()=>{a?.(),window.location.href="/auth"},1500);return}}catch{}g>=N?(f(b=>({...b,status:"failed"})),l?.()):setTimeout(j,2e3)};j()},[a,l]);return u.useEffect(()=>{const g=setInterval(()=>{f(b=>({...b,progress:b.progress>=90?b.progress:b.progress+1}))},200),N=setInterval(()=>{f(b=>({...b,elapsedTime:b.elapsedTime+1}))},1e3),j=setTimeout(()=>{p()},3e3);return()=>{clearInterval(g),clearInterval(N),clearTimeout(j)}},[p]),e.jsx(Dv,{state:h,onRetry:p,onComplete:a,onFailed:l,title:r,description:c,showAnimation:d,className:m})}function Y1(){return e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsxs("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px]",children:[e.jsx("div",{className:"absolute inset-0 rounded-full border border-primary/10 animate-[ping_3s_ease-in-out_infinite]"}),e.jsx("div",{className:"absolute inset-8 rounded-full border border-primary/10 animate-[ping_3s_ease-in-out_infinite_0.5s]"}),e.jsx("div",{className:"absolute inset-16 rounded-full border border-primary/10 animate-[ping_3s_ease-in-out_infinite_1s]"})]}),e.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-primary/20 rounded-full animate-bounce"}),e.jsx("div",{className:"absolute top-3/4 right-1/4 w-3 h-3 bg-primary/15 rounded-full animate-bounce delay-150"}),e.jsx("div",{className:"absolute top-1/2 right-1/3 w-2 h-2 bg-primary/20 rounded-full animate-bounce delay-300"})]})}const Qs=i_,dd=c_,J1=n_,Ov=u.forwardRef(({className:a,...l},r)=>e.jsx(Ij,{ref:r,className:P("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l}));Ov.displayName=Ij.displayName;const Hs=u.forwardRef(({className:a,children:l,preventOutsideClose:r=!1,hideCloseButton:c=!1,...d},m)=>e.jsxs(J1,{children:[e.jsx(Ov,{}),e.jsxs(Bj,{ref:m,className:P("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),onPointerDownOutside:r?h=>h.preventDefault():void 0,onInteractOutside:r?h=>h.preventDefault():void 0,...d,children:[l,!c&&e.jsxs(r_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Sa,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Hs.displayName=Bj.displayName;const qs=({className:a,...l})=>e.jsx("div",{className:P("flex flex-col space-y-1.5 text-center sm:text-left",a),...l});qs.displayName="DialogHeader";const gt=({className:a,...l})=>e.jsx("div",{className:P("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...l});gt.displayName="DialogFooter";const Vs=u.forwardRef(({className:a,...l},r)=>e.jsx(Pj,{ref:r,className:P("text-lg font-semibold leading-none tracking-tight",a),...l}));Vs.displayName=Pj.displayName;const at=u.forwardRef(({className:a,...l},r)=>e.jsx(Fj,{ref:r,className:P("text-sm text-muted-foreground",a),...l}));at.displayName=Fj.displayName;const ae=u.forwardRef(({className:a,type:l,...r},c)=>e.jsx("input",{type:l,className:P("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:c,...r}));ae.displayName="Input";const tt=u.forwardRef(({className:a,...l},r)=>e.jsx(Hj,{ref:r,className:P("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...l,children:e.jsx(o_,{className:P("grid place-content-center text-current"),children:e.jsx(Ot,{className:"h-4 w-4"})})}));tt.displayName=Hj.displayName;const Pe=f_,Fe=p_,Ie=u.forwardRef(({className:a,children:l,...r},c)=>e.jsxs(qj,{ref:c,className:P("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...r,children:[l,e.jsx(d_,{asChild:!0,children:e.jsx(Ia,{className:"h-4 w-4 opacity-50"})})]}));Ie.displayName=qj.displayName;const Lv=u.forwardRef(({className:a,...l},r)=>e.jsx(Vj,{ref:r,className:P("flex cursor-default items-center justify-center py-1",a),...l,children:e.jsx(Xr,{className:"h-4 w-4"})}));Lv.displayName=Vj.displayName;const Uv=u.forwardRef(({className:a,...l},r)=>e.jsx(Gj,{ref:r,className:P("flex cursor-default items-center justify-center py-1",a),...l,children:e.jsx(Ia,{className:"h-4 w-4"})}));Uv.displayName=Gj.displayName;const Be=u.forwardRef(({className:a,children:l,position:r="popper",...c},d)=>e.jsx(u_,{children:e.jsxs(Kj,{ref:d,className:P("relative z-[100] max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-hidden rounded-md border border-border bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:r,...c,children:[e.jsx(Lv,{}),e.jsx(m_,{className:P("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l}),e.jsx(Uv,{})]})}));Be.displayName=Kj.displayName;const X1=u.forwardRef(({className:a,...l},r)=>e.jsx(Qj,{ref:r,className:P("px-2 py-1.5 text-sm font-semibold",a),...l}));X1.displayName=Qj.displayName;const W=u.forwardRef(({className:a,children:l,...r},c)=>e.jsxs(Yj,{ref:c,className:P("relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-2 pr-8 text-sm outline-none bg-white dark:bg-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 focus:bg-gray-100 dark:focus:bg-gray-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...r,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(x_,{children:e.jsx(Ot,{className:"h-4 w-4"})})}),e.jsx(h_,{children:l})]}));W.displayName=Yj.displayName;const Z1=u.forwardRef(({className:a,...l},r)=>e.jsx(Jj,{ref:r,className:P("-mx-1 my-1 h-px bg-muted",a),...l}));Z1.displayName=Jj.displayName;const fx=({className:a,...l})=>e.jsx("nav",{role:"navigation","aria-label":"pagination",className:P("mx-auto flex w-full justify-center",a),...l});fx.displayName="Pagination";const px=u.forwardRef(({className:a,...l},r)=>e.jsx("ul",{ref:r,className:P("flex flex-row items-center gap-1",a),...l}));px.displayName="PaginationContent";const Xn=u.forwardRef(({className:a,...l},r)=>e.jsx("li",{ref:r,className:P("",a),...l}));Xn.displayName="PaginationItem";const jc=({className:a,isActive:l,size:r="icon",...c})=>e.jsx("a",{"aria-current":l?"page":void 0,className:P(si({variant:l?"outline":"ghost",size:r}),a),...c});jc.displayName="PaginationLink";const $v=({className:a,...l})=>e.jsxs(jc,{"aria-label":"Go to previous page",size:"default",className:P("gap-1 pl-2.5",a),...l,children:[e.jsx(Pa,{className:"h-4 w-4"}),e.jsx("span",{children:"上一页"})]});$v.displayName="PaginationPrevious";const Iv=({className:a,...l})=>e.jsxs(jc,{"aria-label":"Go to next page",size:"default",className:P("gap-1 pr-2.5",a),...l,children:[e.jsx("span",{children:"下一页"}),e.jsx(ra,{className:"h-4 w-4"})]});Iv.displayName="PaginationNext";const Bv=({className:a,...l})=>e.jsxs("span",{"aria-hidden":!0,className:P("flex h-9 w-9 items-center justify-center",a),...l,children:[e.jsx(C_,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"More pages"})]});Bv.displayName="PaginationEllipsis";const W1=5,e2=5e3;let Lm=0;function s2(){return Lm=(Lm+1)%Number.MAX_SAFE_INTEGER,Lm.toString()}const Um=new Map,Ug=a=>{if(Um.has(a))return;const l=setTimeout(()=>{Um.delete(a),ac({type:"REMOVE_TOAST",toastId:a})},e2);Um.set(a,l)},t2=(a,l)=>{switch(l.type){case"ADD_TOAST":return{...a,toasts:[l.toast,...a.toasts].slice(0,W1)};case"UPDATE_TOAST":return{...a,toasts:a.toasts.map(r=>r.id===l.toast.id?{...r,...l.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=l;return r?Ug(r):a.toasts.forEach(c=>{Ug(c.id)}),{...a,toasts:a.toasts.map(c=>c.id===r||r===void 0?{...c,open:!1}:c)}}case"REMOVE_TOAST":return l.toastId===void 0?{...a,toasts:[]}:{...a,toasts:a.toasts.filter(r=>r.id!==l.toastId)}}},Fo=[];let Ho={toasts:[]};function ac(a){Ho=t2(Ho,a),Fo.forEach(l=>{l(Ho)})}function aa({...a}){const l=s2(),r=d=>ac({type:"UPDATE_TOAST",toast:{...d,id:l}}),c=()=>ac({type:"DISMISS_TOAST",toastId:l});return ac({type:"ADD_TOAST",toast:{...a,id:l,open:!0,onOpenChange:d=>{d||c()}}}),{id:l,dismiss:c,update:r}}function nt(){const[a,l]=u.useState(Ho);return u.useEffect(()=>(Fo.push(l),()=>{const r=Fo.indexOf(l);r>-1&&Fo.splice(r,1)}),[a]),{...a,toast:aa,dismiss:r=>ac({type:"DISMISS_TOAST",toastId:r})}}const dl="/api/webui/expression";async function gx(){const a=await ke(`${dl}/chats`,{});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取聊天列表失败")}return a.json()}async function a2(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.search&&l.append("search",a.search),a.chat_id&&l.append("chat_id",a.chat_id);const r=await ke(`${dl}/list?${l}`,{});if(!r.ok){const c=await r.json();throw new Error(c.detail||"获取表达方式列表失败")}return r.json()}async function l2(a){const l=await ke(`${dl}/${a}`,{});if(!l.ok){const r=await l.json();throw new Error(r.detail||"获取表达方式详情失败")}return l.json()}async function n2(a){const l=await ke(`${dl}/`,{method:"POST",body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"创建表达方式失败")}return l.json()}async function r2(a,l){const r=await ke(`${dl}/${a}`,{method:"PATCH",body:JSON.stringify(l)});if(!r.ok){const c=await r.json();throw new Error(c.detail||"更新表达方式失败")}return r.json()}async function i2(a){const l=await ke(`${dl}/${a}`,{method:"DELETE"});if(!l.ok){const r=await l.json();throw new Error(r.detail||"删除表达方式失败")}return l.json()}async function c2(a){const l=await ke(`${dl}/batch/delete`,{method:"POST",body:JSON.stringify({ids:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量删除表达方式失败")}return l.json()}async function o2(){const a=await ke(`${dl}/stats/summary`,{});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取统计数据失败")}return a.json()}async function jx(){const a=await ke(`${dl}/review/stats`);if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取审核统计失败")}return a.json()}async function $g(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.filter_type&&l.append("filter_type",a.filter_type),a.search&&l.append("search",a.search),a.chat_id&&l.append("chat_id",a.chat_id);const r=await ke(`${dl}/review/list?${l}`);if(!r.ok){const c=await r.json();throw new Error(c.detail||"获取审核列表失败")}return r.json()}async function $m(a){const l=await ke(`${dl}/review/batch`,{method:"POST",body:JSON.stringify({items:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量审核失败")}return l.json()}function Pv({open:a,onOpenChange:l}){const[r,c]=u.useState("list"),[d,m]=u.useState(null),[h,f]=u.useState([]),[p,g]=u.useState("unchecked"),[N,j]=u.useState([]),[b,y]=u.useState(0),[w,z]=u.useState(!1),[M,S]=u.useState(0),[F,E]=u.useState(1),[C,R]=u.useState(null),[H,O]=u.useState(0),[X,L]=u.useState(!1),[me,Ne]=u.useState(null),je=u.useRef(null),re=u.useRef(null),ge=u.useRef(!1),[pe,D]=u.useState(!1),[Q,I]=u.useState(!1),[ue,Y]=u.useState(0),[we,fe]=u.useState(1),[Ee,G]=u.useState(20),[$,A]=u.useState(""),[K,Re]=u.useState("unchecked"),[se,$e]=u.useState(""),[cs,J]=u.useState(""),[Z,Le]=u.useState(new Set),[ne,De]=u.useState(new Set),[xe,Me]=u.useState(new Map),{toast:ds}=nt(),Ts=u.useCallback(async()=>{try{I(!0);const U=await jx();m(U)}catch(U){console.error("加载统计失败:",U)}finally{I(!1)}},[]),Ct=u.useCallback(async()=>{try{D(!0);const U=await $g({page:we,page_size:Ee,filter_type:K,search:se||void 0});f(U.data),Y(U.total)}catch(U){ds({title:"加载失败",description:U instanceof Error?U.message:"无法加载列表",variant:"destructive"})}finally{D(!1)}},[we,Ee,K,se,ds]),ia=u.useCallback(async()=>{try{const U=await gx();if(U?.data){const Se=new Map;U.data.forEach(as=>{Se.set(as.chat_id,as.chat_name)}),Me(Se)}}catch(U){console.error("加载聊天名称失败:",U)}},[]),ut=u.useCallback(async(U=!0,Se=!1)=>{try{z(!0);const as=Se?F+1:F,us=await $g({page:as,page_size:20,filter_type:p});Se?(j(es=>[...es,...us.data]),E(as)):j(us.data),S(us.total),U&&y(0)}catch(as){ds({title:"加载失败",description:as instanceof Error?as.message:"无法加载列表",variant:"destructive"})}finally{z(!1)}},[F,p,ds]);u.useEffect(()=>{r==="quick"&&(E(1),y(0))},[p,r]),u.useEffect(()=>{a&&r==="quick"&&(ut(),Ts())},[a,r,F,p,ut,Ts]);const Bs=u.useCallback(U=>U?p==="unchecked"?{left:!0,right:!0}:p==="passed"?{left:!0,right:!1}:p==="rejected"?{left:!1,right:!0}:U.checked?U.rejected?{left:!1,right:!0}:{left:!0,right:!1}:{left:!0,right:!0}:{left:!1,right:!1},[p]),V=u.useCallback(async U=>{const Se=N[b];if(!Se||X)return;const as=Bs(Se);if(!(U&&!as.left||!U&&!as.right)){L(!0),R(U?"left":"right"),O(U?-400:400);try{(await $m([{id:Se.id,rejected:U,require_unchecked:p==="unchecked"}])).results[0]?.success?(ds({title:U?"已拒绝":"已通过",description:`表达方式 #${Se.id} ${U?"已拒绝":"已通过"}`}),setTimeout(()=>{j(es=>es.filter((Tt,$s)=>$s!==b)),S(es=>es-1),b>=N.length-1&&y(Math.max(0,b-1)),R(null),O(0),L(!1),Ts(),N.length<=1&&M>1&&ut(!1)},300)):(Ne(Se.id),ds({title:"数据冲突",description:"该条目已被后台任务处理,正在刷新数据...",variant:"destructive"}),setTimeout(()=>{Ne(null),R(null),O(0),L(!1),ut(!1),Ts()},1500))}catch(us){ds({title:"操作失败",description:us instanceof Error?us.message:"未知错误",variant:"destructive"}),R(null),O(0),L(!1)}}},[N,b,X,Bs,p,ds,Ts,M,ut]),Ke=u.useCallback((U,Se)=>{X||(re.current={x:U,y:Se},ge.current=!1)},[X]),He=u.useCallback(U=>{X||(L(!0),O(U==="left"?-30:30),setTimeout(()=>{O(0),setTimeout(()=>L(!1),300)},150))},[X]),Je=u.useCallback(U=>{if(!re.current||X)return;const Se=U-re.current.x,as=N[b],us=Bs(as);if(Se<0&&!us.left){O(Se*.2),R(null);return}if(Se>0&&!us.right){O(Se*.2),R(null);return}ge.current=!0,O(Se),Math.abs(Se)>50?R(Se>0?"right":"left"):R(null)},[N,b,Bs,X]),Es=u.useCallback(()=>{if(!re.current)return;Math.abs(H)>100&&C?V(C==="left"):(O(0),R(null)),re.current=null,ge.current=!1},[H,C,V]),ms=u.useCallback(U=>{Ke(U.clientX,U.clientY)},[Ke]),Ms=u.useCallback(U=>{re.current&&(U.preventDefault(),Je(U.clientX))},[Je]),We=u.useCallback(()=>{Es()},[Es]),Cs=u.useCallback(()=>{re.current&&Es()},[Es]),rs=u.useCallback(U=>{const Se=U.touches[0];Ke(Se.clientX,Se.clientY)},[Ke]),is=u.useCallback(U=>{const Se=U.touches[0];Je(Se.clientX)},[Je]),ys=u.useCallback(()=>{Es()},[Es]);u.useEffect(()=>{if(!a||r!=="quick")return;const U=Se=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(Se.key)||(Se.preventDefault(),Se.stopPropagation(),Se.stopImmediatePropagation(),X||w))return;const as=N[b],us=Bs(as);Se.key==="ArrowLeft"?us.left?V(!0):He("left"):Se.key==="ArrowRight"?us.right?V(!1):He("right"):Se.key==="ArrowDown"?bes+1):Se.key==="ArrowUp"&&b>0&&y(es=>es-1)};return window.addEventListener("keydown",U,!0),()=>window.removeEventListener("keydown",U,!0)},[a,r,N,b,X,w,Bs,V,He]),u.useEffect(()=>{if(!a||r!=="quick"||w)return;const U=N.length-b-1,Se=N.length{a&&(Ts(),Ct(),ia())},[a,Ts,Ct,ia]),u.useEffect(()=>{fe(1),Le(new Set)},[K,se]),u.useEffect(()=>{Le(new Set)},[h]);const rt=()=>{$e(cs),fe(1)},jt=U=>xe.get(U)||U,Ae=async(U,Se)=>{try{De(us=>new Set(us).add(U));const as=await $m([{id:U,rejected:Se,require_unchecked:K==="unchecked"}]);as.results[0]?.success?(ds({title:Se?"已拒绝":"已通过",description:`表达方式 #${U} ${Se?"已拒绝":"已通过"}`}),Ct(),Ts()):ds({title:"操作失败",description:as.results[0]?.message||"未知错误",variant:"destructive"})}catch(as){ds({title:"操作失败",description:as instanceof Error?as.message:"未知错误",variant:"destructive"})}finally{De(as=>{const us=new Set(as);return us.delete(U),us})}},Qe=async U=>{if(Z.size===0){ds({title:"请选择",description:"请先选择要审核的表达方式",variant:"destructive"});return}try{D(!0);const Se=Array.from(Z).map(us=>({id:us,rejected:U,require_unchecked:K==="unchecked"})),as=await $m(Se);ds({title:"批量审核完成",description:`成功 ${as.succeeded} 条,失败 ${as.failed} 条`,variant:as.failed>0?"destructive":"default"}),Le(new Set),Ct(),Ts()}catch(Se){ds({title:"批量审核失败",description:Se instanceof Error?Se.message:"未知错误",variant:"destructive"})}finally{D(!1)}},As=()=>{Z.size===h.length?Le(new Set):Le(new Set(h.map(U=>U.id)))},mt=U=>{Le(Se=>{const as=new Set(Se);return as.has(U)?as.delete(U):as.add(U),as})},Ht=U=>U?new Date(U*1e3).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"-",ca=U=>U.checked?U.rejected?e.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[e.jsx(ta,{className:"h-3 w-3"}),"已拒绝"]}):e.jsxs(Ce,{variant:"default",className:"gap-1 bg-green-600",children:[e.jsx(st,{className:"h-3 w-3"}),"已通过"]}):e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(da,{className:"h-3 w-3"}),"待审核"]}),Fa=U=>U?U==="ai"?e.jsxs(Ce,{variant:"secondary",className:"gap-1 text-xs",children:[e.jsx(Yn,{className:"h-3 w-3"}),"AI"]}):e.jsxs(Ce,{variant:"secondary",className:"gap-1 text-xs",children:[e.jsx(Fl,{className:"h-3 w-3"}),"人工"]}):null,Xt=Math.ceil(ue/Ee),te=()=>{const U=[];if(Xt<=7)for(let Se=1;Se<=Xt;Se++)U.push(Se);else{U.push(1),we>3&&U.push("ellipsis");const Se=Math.max(2,we-1),as=Math.min(Xt-1,we+1);for(let us=Se;us<=as;us++)U.push(us);we1&&U.push(Xt)}return U},_e=()=>{const U=parseInt($,10);!isNaN(U)&&U>=1&&U<=Xt&&(fe(U),A(""))};return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-5xl w-[95vw] sm:w-full h-[90vh] sm:h-[85vh] flex flex-col p-0",hideCloseButton:!0,children:[e.jsxs("div",{className:"flex items-end bg-muted/30 px-2 pt-2 shrink-0",children:[e.jsxs("button",{onClick:()=>c("list"),className:P("group relative flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-t-lg transition-all","hover:bg-background/50",r==="list"?"bg-background text-foreground shadow-sm border border-b-0 border-border":"text-muted-foreground hover:text-foreground"),children:[e.jsx(rv,{className:"h-4 w-4"}),e.jsx("span",{children:"列表模式"}),r==="list"&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-background"})]}),e.jsxs("button",{onClick:()=>c("quick"),className:P("group relative flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-t-lg transition-all","hover:bg-background/50",r==="quick"?"bg-background text-foreground shadow-sm border border-b-0 border-border":"text-muted-foreground hover:text-foreground"),children:[e.jsx(sl,{className:"h-4 w-4"}),e.jsx("span",{children:"快速审核"}),e.jsx(Ce,{variant:"secondary",className:"ml-1 h-5 px-1.5 text-xs",children:"新"}),r==="quick"&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-background"})]}),e.jsx("div",{className:"flex-1 border-b border-border"}),e.jsx("button",{onClick:()=>l(!1),className:"mb-[1px] p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-colors",children:e.jsx(Sa,{className:"h-4 w-4"})})]}),r==="list"&&e.jsxs(e.Fragment,{children:[e.jsxs(qs,{className:"px-4 sm:px-6 pt-4 sm:pt-6 pb-4 border-b shrink-0",children:[e.jsx(Vs,{className:"text-lg sm:text-xl",children:"表达方式审核"}),e.jsx(at,{className:"text-xs sm:text-sm",children:"审核麦麦学习到的表达方式。通过审核的项目才会被使用(可在配置中调整),被拒绝的项目永远不会被使用。"}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 sm:gap-3 mt-4",children:[e.jsxs("div",{className:"rounded-lg border p-2 sm:p-3 text-center",children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold text-orange-500",children:Q?"-":d?.unchecked??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"待审核"})]}),e.jsxs("div",{className:"rounded-lg border p-2 sm:p-3 text-center",children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold text-green-500",children:Q?"-":d?.passed??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"已通过"})]}),e.jsxs("div",{className:"rounded-lg border p-2 sm:p-3 text-center",children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold text-red-500",children:Q?"-":d?.rejected??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"已拒绝"})]}),e.jsxs("div",{className:"rounded-lg border p-2 sm:p-3 text-center",children:[e.jsx("div",{className:"text-xl sm:text-2xl font-bold text-blue-500",children:Q?"-":d?.total??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"总计"})]})]})]}),e.jsxs("div",{className:"px-4 sm:px-6 py-3 border-b shrink-0 space-y-3",children:[e.jsx(Jt,{value:K,onValueChange:U=>Re(U),className:"w-full",children:e.jsxs(Gt,{className:"grid w-full grid-cols-4",children:[e.jsxs(Xe,{value:"unchecked",className:"gap-1 text-xs sm:text-sm px-1 sm:px-3",children:[e.jsx(da,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"待审核"}),e.jsx("span",{className:"sm:hidden",children:"待审"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",d?.unchecked??0,")"]})]}),e.jsxs(Xe,{value:"passed",className:"gap-1 text-xs sm:text-sm px-1 sm:px-3",children:[e.jsx(st,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"已通过"}),e.jsx("span",{className:"sm:hidden",children:"通过"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",d?.passed??0,")"]})]}),e.jsxs(Xe,{value:"rejected",className:"gap-1 text-xs sm:text-sm px-1 sm:px-3",children:[e.jsx(ta,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"已拒绝"}),e.jsx("span",{className:"sm:hidden",children:"拒绝"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",d?.rejected??0,")"]})]}),e.jsxs(Xe,{value:"all",className:"gap-1 text-xs sm:text-sm px-1 sm:px-3",children:[e.jsx("span",{children:"全部"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",d?.total??0,")"]})]})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{placeholder:"搜索情景或风格...",value:cs,onChange:U=>J(U.target.value),onKeyDown:U=>U.key==="Enter"&&rt(),className:"pl-9"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"icon",onClick:rt,children:e.jsx($t,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"icon",onClick:()=>{Ct(),Ts()},disabled:pe,children:e.jsx(dt,{className:P("h-4 w-4",pe&&"animate-spin")})})]}),Z.size>0&&e.jsx("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:K==="unchecked"?e.jsxs(e.Fragment,{children:[e.jsxs(_,{variant:"default",size:"sm",className:"bg-green-600 hover:bg-green-700 flex-1 sm:flex-none",onClick:()=>Qe(!1),disabled:pe,children:[e.jsx(st,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量通过"}),e.jsx("span",{className:"sm:hidden",children:"通过"}),"(",Z.size,")"]}),e.jsxs(_,{variant:"destructive",size:"sm",className:"flex-1 sm:flex-none",onClick:()=>Qe(!0),disabled:pe,children:[e.jsx(ta,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量拒绝"}),e.jsx("span",{className:"sm:hidden",children:"拒绝"}),"(",Z.size,")"]})]}):K==="passed"?e.jsxs(_,{variant:"destructive",size:"sm",className:"flex-1 sm:flex-none",onClick:()=>Qe(!0),disabled:pe,children:[e.jsx(ta,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量改为拒绝"}),e.jsx("span",{className:"sm:hidden",children:"改为拒绝"}),"(",Z.size,")"]}):K==="rejected"?e.jsxs(_,{variant:"default",size:"sm",className:"bg-green-600 hover:bg-green-700 flex-1 sm:flex-none",onClick:()=>Qe(!1),disabled:pe,children:[e.jsx(st,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量改为通过"}),e.jsx("span",{className:"sm:hidden",children:"改为通过"}),"(",Z.size,")"]}):e.jsxs(e.Fragment,{children:[e.jsxs(_,{variant:"default",size:"sm",className:"bg-green-600 hover:bg-green-700 flex-1 sm:flex-none",onClick:()=>Qe(!1),disabled:pe,children:[e.jsx(st,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量通过"}),e.jsx("span",{className:"sm:hidden",children:"通过"}),"(",Z.size,")"]}),e.jsxs(_,{variant:"destructive",size:"sm",className:"flex-1 sm:flex-none",onClick:()=>Qe(!0),disabled:pe,children:[e.jsx(ta,{className:"h-4 w-4 mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"批量拒绝"}),e.jsx("span",{className:"sm:hidden",children:"拒绝"}),"(",Z.size,")"]})]})})]})]}),e.jsx(ts,{className:"flex-1 px-4 sm:px-6",children:pe&&h.length===0?e.jsx("div",{className:"flex items-center justify-center h-40",children:e.jsx(dt,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):h.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-40 text-muted-foreground",children:[e.jsx(Ut,{className:"h-8 w-8 mb-2"}),e.jsx("p",{children:"没有找到表达方式"})]}):e.jsxs("div",{className:"space-y-2 py-2",children:[h.length>0&&e.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(tt,{checked:Z.size===h.length&&h.length>0,onCheckedChange:As}),e.jsx("span",{className:"text-sm text-muted-foreground",children:Z.size===h.length&&h.length>0?`已全选当前页 (${h.length} 条)`:`全选当前页 (${h.length} 条)`})]}),Z.size>0&&e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>Le(new Set),className:"h-7 text-xs",children:"取消选择"})]}),h.map(U=>e.jsx("div",{className:P("rounded-lg border p-3 sm:p-4 space-y-2 sm:space-y-3 transition-colors",Z.has(U.id)&&"bg-accent border-primary",ne.has(U.id)&&"opacity-50"),children:e.jsxs("div",{className:"flex items-start gap-2 sm:gap-3",children:[e.jsx(tt,{checked:Z.has(U.id),onCheckedChange:()=>mt(U.id),disabled:ne.has(U.id),className:"mt-1"}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"情景:"}),e.jsx("p",{className:"text-sm font-medium break-words",children:U.situation})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"风格:"}),e.jsx("p",{className:"text-sm text-muted-foreground break-words",children:U.style})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1 sm:gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:["#",U.id]}),e.jsx("span",{children:"·"}),e.jsx("span",{title:jt(U.chat_id),className:"truncate max-w-24 sm:max-w-32",children:jt(U.chat_id)}),e.jsx("span",{children:"·"}),e.jsx("span",{children:Ht(U.create_date)}),e.jsxs("div",{className:"flex items-center gap-1",children:[ca(U),Fa(U.modified_by)]})]})]}),e.jsx("div",{className:"flex flex-col gap-1 sm:gap-2 shrink-0",children:K==="unchecked"?e.jsxs(e.Fragment,{children:[e.jsxs(_,{size:"sm",variant:"outline",className:"text-green-600 hover:text-green-700 hover:bg-green-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!1),disabled:ne.has(U.id),children:[e.jsx(st,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"通过"})]}),e.jsxs(_,{size:"sm",variant:"outline",className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!0),disabled:ne.has(U.id),children:[e.jsx(ta,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"拒绝"})]})]}):K==="passed"?e.jsxs(_,{size:"sm",variant:"outline",className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!0),disabled:ne.has(U.id),children:[e.jsx(ta,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"改为拒绝"})]}):K==="rejected"?e.jsxs(_,{size:"sm",variant:"outline",className:"text-green-600 hover:text-green-700 hover:bg-green-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!1),disabled:ne.has(U.id),children:[e.jsx(st,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"改为通过"})]}):e.jsx(e.Fragment,{children:U.rejected?e.jsxs(_,{size:"sm",variant:"outline",className:"text-green-600 hover:text-green-700 hover:bg-green-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!1),disabled:ne.has(U.id),children:[e.jsx(st,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"改为通过"})]}):U.checked?e.jsxs(_,{size:"sm",variant:"outline",className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!0),disabled:ne.has(U.id),children:[e.jsx(ta,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"改为拒绝"})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_,{size:"sm",variant:"outline",className:"text-green-600 hover:text-green-700 hover:bg-green-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!1),disabled:ne.has(U.id),children:[e.jsx(st,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"通过"})]}),e.jsxs(_,{size:"sm",variant:"outline",className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8 sm:h-9 px-2 sm:px-3",onClick:()=>Ae(U.id,!0),disabled:ne.has(U.id),children:[e.jsx(ta,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"拒绝"})]})]})})})]})},U.id))]})}),e.jsxs("div",{className:"px-4 sm:px-6 py-3 border-t shrink-0 flex flex-col sm:flex-row items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx("span",{className:"hidden sm:inline",children:"每页"}),e.jsxs(Pe,{value:Ee.toString(),onValueChange:U=>{G(parseInt(U,10)),fe(1)},children:[e.jsx(Ie,{className:"w-[70px] h-8",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]}),e.jsx("span",{className:"hidden sm:inline",children:"条"}),e.jsxs("span",{className:"text-muted-foreground",children:["共 ",ue," 条"]})]}),e.jsx(fx,{className:"mx-0 w-auto",children:e.jsxs(px,{children:[e.jsx(Xn,{children:e.jsx(_,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>fe(U=>Math.max(1,U-1)),disabled:we<=1||pe,children:e.jsx(Pa,{className:"h-4 w-4"})})}),te().map((U,Se)=>e.jsx(Xn,{children:U==="ellipsis"?e.jsx(Bv,{}):e.jsx(jc,{href:"#",isActive:U===we,onClick:as=>{as.preventDefault(),fe(U)},className:"h-8 w-8 cursor-pointer",children:U})},Se)),e.jsx(Xn,{children:e.jsx(_,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>fe(U=>Math.min(Xt,U+1)),disabled:we>=Xt||pe,children:e.jsx(ra,{className:"h-4 w-4"})})})]})}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"跳至"}),e.jsx(ae,{type:"number",min:1,max:Xt,value:$,onChange:U=>A(U.target.value),onKeyDown:U=>U.key==="Enter"&&_e(),className:"w-16 h-8 text-center",placeholder:we.toString()}),e.jsx("span",{className:"text-muted-foreground",children:"页"}),e.jsx(_,{variant:"outline",size:"sm",className:"h-8",onClick:_e,disabled:pe,children:"跳转"})]})]})]}),r==="quick"&&e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 sm:px-6 py-3 border-b shrink-0 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"text-muted-foreground",children:["待审核: ",e.jsx("span",{className:"font-medium text-orange-500",children:d?.unchecked??0})]}),e.jsxs("span",{className:"text-muted-foreground",children:["已通过: ",e.jsx("span",{className:"font-medium text-green-500",children:d?.passed??0})]}),e.jsxs("span",{className:"text-muted-foreground",children:["已拒绝: ",e.jsx("span",{className:"font-medium text-red-500",children:d?.rejected??0})]})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>{ut(),Ts()},disabled:w,children:[e.jsx(dt,{className:P("h-4 w-4 mr-1",w&&"animate-spin")}),"刷新"]})]}),e.jsx(Jt,{value:p,onValueChange:U=>g(U),className:"w-full",children:e.jsxs(Gt,{className:"grid w-full grid-cols-4",children:[e.jsxs(Xe,{value:"unchecked",className:"gap-1 text-xs sm:text-sm",children:[e.jsx(da,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"待审核"}),e.jsx("span",{className:"sm:hidden",children:"待审"})]}),e.jsxs(Xe,{value:"passed",className:"gap-1 text-xs sm:text-sm",children:[e.jsx(st,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"已通过"}),e.jsx("span",{className:"sm:hidden",children:"通过"})]}),e.jsxs(Xe,{value:"rejected",className:"gap-1 text-xs sm:text-sm",children:[e.jsx(ta,{className:"h-3 w-3 sm:h-4 sm:w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"已拒绝"}),e.jsx("span",{className:"sm:hidden",children:"拒绝"})]}),e.jsx(Xe,{value:"all",className:"gap-1 text-xs sm:text-sm",children:"全部"})]})})]}),e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-8 relative overflow-hidden",children:w&&N.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsx(dt,{className:"h-8 w-8 animate-spin text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"加载中..."})]}):N.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-muted/50 flex items-center justify-center mb-6",children:e.jsx(st,{className:"h-10 w-10 text-green-500"})}),e.jsx("h3",{className:"text-xl font-semibold mb-2",children:"全部审核完成!"}),e.jsx("p",{className:"text-muted-foreground",children:"当前筛选条件下没有待处理的项目"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 text-sm text-muted-foreground z-50",children:[b+1," / ",N.length,M>N.length&&e.jsxs("span",{className:"ml-1",children:["(共 ",M," 条)"]})]}),e.jsx("div",{className:"absolute inset-x-4 top-1/2 -translate-y-1/2 flex justify-between pointer-events-none z-40",children:(()=>{const U=N[b],Se=Bs(U);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:P("flex items-center gap-2 px-4 py-2 rounded-lg transition-all duration-300",C==="left"?"bg-red-500/20 text-red-500 scale-110":"bg-muted/50 text-muted-foreground opacity-0",!Se.left&&"invisible"),children:[e.jsx(ta,{className:"h-8 w-8"}),e.jsx("span",{className:"font-bold text-lg hidden sm:inline",children:"拒绝"})]}),e.jsxs("div",{className:P("flex items-center gap-2 px-4 py-2 rounded-lg transition-all duration-300",C==="right"?"bg-green-500/20 text-green-500 scale-110":"bg-muted/50 text-muted-foreground opacity-0",!Se.right&&"invisible"),children:[e.jsx("span",{className:"font-bold text-lg hidden sm:inline",children:"通过"}),e.jsx(st,{className:"h-8 w-8"})]})]})})()}),e.jsx("div",{className:"relative w-full max-w-md h-[400px] flex items-center justify-center",children:N.slice(b,b+5).reverse().map((U,Se,as)=>{const us=as.length-1-Se,es=us===0;let Tt={zIndex:5-us,position:"absolute",width:"100%",transition:es&&!ge.current?"all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)":"none"};if(es)Tt={...Tt,transform:`translateX(${H}px) rotate(${H*.05}deg)`,opacity:Math.max(0,1-Math.abs(H)/500),cursor:"grab"};else{const $s=Math.min(Math.abs(H)/200,1),pa=vt=>{const Ca=vt*7%5,ll=vt*13%7;return{scale:1-vt*.05,translateY:vt*12,rotate:(vt%2===0?1:-1)*(vt*2)+Ca,translateX:(vt%2===0?-1:1)*(vt*4)+ll}},oa=pa(us),le=pa(us-1),oe=oa.scale+(le.scale-oa.scale)*$s,Ve=oa.translateY+(le.translateY-oa.translateY)*$s,Ys=oa.rotate+(le.rotate-oa.rotate)*$s,Ps=oa.translateX+(le.translateX-oa.translateX)*$s;Tt={...Tt,transform:`translate3d(${Ps}px, ${Ve}px, 0) scale(${oe}) rotate(${Ys}deg)`,opacity:1-us*.15,filter:`blur(${Math.max(0,us*1-$s)}px)`,pointerEvents:"none"}}return e.jsxs("div",{ref:es?je:void 0,className:P("bg-card border rounded-xl shadow-xl p-6 select-none h-full flex flex-col",es&&"active:cursor-grabbing shadow-2xl ring-1 ring-border/50",es&&me===U.id&&"ring-4 ring-orange-500/50 bg-orange-50/10"),style:Tt,onMouseDown:es?ms:void 0,onMouseMove:es?Ms:void 0,onMouseUp:es?We:void 0,onMouseLeave:es?Cs:void 0,onTouchStart:es?rs:void 0,onTouchMove:es?is:void 0,onTouchEnd:es?ys:void 0,children:[es&&me===U.id&&e.jsxs("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center bg-background/80 backdrop-blur-sm animate-in fade-in duration-300 rounded-xl",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-orange-500/20 rounded-full animate-ping"}),e.jsx(dt,{className:"relative h-16 w-16 text-orange-500 mb-4 animate-spin duration-1000"})]}),e.jsx("h3",{className:"text-xl font-bold text-foreground animate-in slide-in-from-bottom-2 fade-in duration-500",children:"数据已更新"}),e.jsx("p",{className:"text-muted-foreground mt-2 animate-in slide-in-from-bottom-3 fade-in duration-700",children:"后台任务已处理此条目"})]}),es&&e.jsx("div",{className:P("absolute inset-0 flex items-center justify-center z-20 pointer-events-none transition-opacity duration-200",H<-10&&!Bs(U).left||H>10&&!Bs(U).right?"opacity-100":"opacity-0"),children:e.jsx("div",{className:"bg-background/80 backdrop-blur-sm p-4 rounded-full shadow-lg border border-border",children:e.jsx(iv,{className:"h-12 w-12 text-muted-foreground"})})}),e.jsxs("div",{className:"space-y-4 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-muted-foreground font-mono",children:["#",U.id]}),e.jsxs("div",{className:"flex items-center gap-2",children:[ca(U),Fa(U.modified_by)]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"情景"}),e.jsx("div",{className:"p-3 bg-muted/30 rounded-lg border border-border/50",children:e.jsx("p",{className:"text-lg font-medium leading-relaxed",children:U.situation})})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"风格"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:U.style.split(/[,,]/).map(($s,pa)=>e.jsx(Ce,{variant:"secondary",className:"font-normal",children:$s.trim()},pa))})]})]}),e.jsxs("div",{className:"mt-auto pt-4 border-t flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/10 flex items-center justify-center text-primary",children:e.jsx(Fl,{className:"h-3 w-3"})}),e.jsx("span",{title:jt(U.chat_id),className:"truncate max-w-[120px] font-medium",children:jt(U.chat_id)})]}),e.jsx("span",{className:"font-mono",children:Ht(U.create_date)})]})]},U.id)})}),e.jsx("div",{className:"flex items-center gap-8 mt-8 sm:hidden z-50",children:(()=>{const U=N[b],Se=Bs(U);return e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",size:"lg",className:P("w-16 h-16 rounded-full border-2 shadow-lg transition-all active:scale-95",Se.left?"hover:bg-red-50 hover:text-red-600 hover:border-red-200":"opacity-30 cursor-not-allowed"),onClick:()=>Se.left&&V(!0),disabled:!Se.left||X,children:e.jsx(ta,{className:"h-8 w-8"})}),e.jsx(_,{variant:"outline",size:"lg",className:P("w-16 h-16 rounded-full border-2 shadow-lg transition-all active:scale-95",Se.right?"hover:bg-green-50 hover:text-green-600 hover:border-green-200":"opacity-30 cursor-not-allowed"),onClick:()=>Se.right&&V(!1),disabled:!Se.right||X,children:e.jsx(st,{className:"h-8 w-8"})})]})})()})]})}),e.jsxs("div",{className:"hidden sm:flex items-center justify-center gap-6 px-6 py-3 border-t text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-2 py-1 bg-muted rounded text-xs",children:"←"}),e.jsx("span",{children:"拒绝"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-2 py-1 bg-muted rounded text-xs",children:"→"}),e.jsx("span",{children:"通过"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-2 py-1 bg-muted rounded text-xs",children:"↑"}),e.jsx("span",{children:"上一条"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-2 py-1 bg-muted rounded text-xs",children:"↓"}),e.jsx("span",{children:"下一条"})]}),e.jsx("span",{className:"text-muted-foreground/50",children:"|"}),e.jsx("span",{children:"拖拽卡片滑动审核"})]})]})]})})}function d2(){return e.jsx(lr,{children:e.jsx(m2,{})})}const u2=a=>{const l=[];for(let r=0;r(H.current=!0,()=>{H.current=!1,O.current&&(clearInterval(O.current),O.current=null)}),[]);const X=u.useCallback(async()=>{try{const A=await jx();H.current&&E(A.unchecked)}catch(A){console.error("获取审核统计失败:",A)}},[]),L=u.useCallback(async()=>{try{y(!0);const A=await fw.get("https://v1.hitokoto.cn/?c=a&c=b&c=c&c=d&c=h&c=i&c=k");H.current&&j({hitokoto:A.data.hitokoto,from:A.data.from||A.data.from_who||"未知"})}catch(A){console.error("获取一言失败:",A),H.current&&j({hitokoto:"人生就像一盒巧克力,你永远不知道下一颗是什么味道。",from:"阿甘正传"})}finally{H.current&&y(!1)}},[]),me=u.useCallback(async()=>{try{const A=await ke("/api/webui/system/status");if(!H.current)return;if(A.ok){const K=await A.json();z(K)}else z(null)}catch(A){console.error("获取机器人状态失败:",A),H.current&&z(null)}},[]),Ne=async()=>{await C()},je=u.useCallback(async()=>{try{const A=await ke(`/api/webui/statistics/dashboard?hours=${h}`);if(!H.current)return;if(A.ok){const K=await A.json();l(K)}c(!1),m(100)}catch(A){console.error("Failed to fetch dashboard data:",A),H.current&&(c(!1),m(100))}},[h]);if(u.useEffect(()=>{if(!r)return;m(0);const A=setTimeout(()=>m(15),200),K=setTimeout(()=>m(30),800),Re=setTimeout(()=>m(45),2e3),se=setTimeout(()=>m(60),4e3),$e=setTimeout(()=>m(75),6500),cs=setTimeout(()=>m(85),9e3),J=setTimeout(()=>m(92),11e3);return()=>{clearTimeout(A),clearTimeout(K),clearTimeout(Re),clearTimeout(se),clearTimeout($e),clearTimeout(cs),clearTimeout(J)}},[r]),u.useEffect(()=>{je(),L(),me(),X()},[je,L,me,X]),u.useEffect(()=>{if(O.current&&(clearInterval(O.current),O.current=null),!!p)return O.current=setInterval(()=>{H.current&&(je(),me())},3e4),()=>{O.current&&(clearInterval(O.current),O.current=null)}},[p,je,me]),r||!a)return e.jsx("div",{className:"flex items-center justify-center h-[calc(100vh-200px)]",children:e.jsxs("div",{className:"text-center space-y-6 w-full max-w-md px-4",children:[e.jsx(dt,{className:"h-12 w-12 animate-spin mx-auto text-primary"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-lg font-medium",children:"加载统计数据中..."}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"正在获取麦麦运行数据"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(tr,{value:d,className:"h-2"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[d,"%"]})]})]})});const{summary:re,model_stats:ge=[],hourly_data:pe=[],daily_data:D=[],recent_activity:Q=[]}=a,I=re??{total_requests:0,total_cost:0,total_tokens:0,online_time:0,total_messages:0,total_replies:0,avg_response_time:0,cost_per_hour:0,tokens_per_hour:0},ue=A=>{const K=Math.floor(A/3600),Re=Math.floor(A%3600/60);return`${K}小时${Re}分钟`},Y=A=>{const K=A.toLocaleString("zh-CN");return A>=1e9?{display:`${(A/1e9).toFixed(2)}B`,exact:K,needsExact:!0}:A>=1e6?{display:`${(A/1e6).toFixed(2)}M`,exact:K,needsExact:!0}:A>=1e4?{display:`${(A/1e3).toFixed(1)}K`,exact:K,needsExact:!0}:A>=1e3?{display:`${(A/1e3).toFixed(2)}K`,exact:K,needsExact:!0}:{display:K,exact:K,needsExact:!1}},we=A=>{const K=`¥${A.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`;return A>=1e6?{display:`¥${(A/1e6).toFixed(2)}M`,exact:K,needsExact:!0}:A>=1e4?{display:`¥${(A/1e3).toFixed(1)}K`,exact:K,needsExact:!0}:A>=1e3?{display:`¥${(A/1e3).toFixed(2)}K`,exact:K,needsExact:!0}:{display:K,exact:K,needsExact:!1}},fe=A=>new Date(A).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),Ee=u2(ge.length),G=ge.map((A,K)=>({name:A.model_name,value:A.request_count,fill:Ee[K]})),$={requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"},tokens:{label:"Tokens",color:"hsl(var(--chart-3))"}};return e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"实时监控面板"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"麦麦运行状态和统计数据一览"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(Jt,{value:h.toString(),onValueChange:A=>f(Number(A)),children:e.jsxs(Gt,{className:"grid grid-cols-3 w-full sm:w-auto",children:[e.jsx(Xe,{value:"24",children:"24小时"}),e.jsx(Xe,{value:"168",children:"7天"}),e.jsx(Xe,{value:"720",children:"30天"})]})}),e.jsxs(_,{variant:p?"default":"outline",size:"sm",onClick:()=>g(!p),className:"gap-2",children:[e.jsx(dt,{className:`h-4 w-4 ${p?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:"自动刷新"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:je,children:e.jsx(dt,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg border border-dashed border-muted-foreground/30 bg-muted/20",children:[b?e.jsx(ks,{className:"h-5 flex-1"}):N?e.jsxs("p",{className:"flex-1 text-sm text-muted-foreground italic truncate",children:['"',N.hitokoto,'" —— ',N.from]}):null,e.jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:L,disabled:b,children:e.jsx(dt,{className:`h-3.5 w-3.5 ${b?"animate-spin":""}`})})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-3",children:[e.jsxs(Te,{className:"lg:col-span-1",children:[e.jsx(Oe,{className:"pb-3",children:e.jsxs(Ue,{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(pc,{className:"h-4 w-4"}),"麦麦状态"]})}),e.jsx(ze,{children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:w?.running?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-3 w-3 rounded-full bg-green-500 animate-pulse"}),e.jsxs(Ce,{variant:"outline",className:"text-green-600 border-green-300 bg-green-50",children:[e.jsx(st,{className:"h-3 w-3 mr-1"}),"运行中"]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-3 w-3 rounded-full bg-red-500"}),e.jsxs(Ce,{variant:"outline",className:"text-red-600 border-red-300 bg-red-50",children:[e.jsx(Ut,{className:"h-3 w-3 mr-1"}),"已停止"]})]})}),w&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsxs("span",{children:["v",w.version]}),e.jsx("span",{className:"mx-2",children:"|"}),e.jsxs("span",{children:["运行 ",ue(w.uptime)]})]})]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"pb-3",children:e.jsxs(Ue,{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(sl,{className:"h-4 w-4"}),"快速操作"]})}),e.jsx(ze,{children:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:Ne,disabled:R,className:"gap-2",children:[e.jsx(rc,{className:`h-4 w-4 ${R?"animate-spin":""}`}),R?"重启中...":"重启麦麦"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>S(!0),className:"gap-2",children:[e.jsx(cv,{className:"h-4 w-4"}),"表达审核",F>0&&e.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-xs rounded-full bg-orange-500 text-white",children:F>99?"99+":F})]}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/logs",children:[e.jsx(Ua,{className:"h-4 w-4"}),"查看日志"]})}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/plugins",children:[e.jsx(T_,{className:"h-4 w-4"}),"插件管理"]})}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/settings",children:[e.jsx(Sn,{className:"h-4 w-4"}),"系统设置"]})})]})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"pb-3",children:[e.jsxs(Ue,{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(E_,{className:"h-4 w-4"}),"反馈问卷"]}),e.jsx(Ns,{className:"text-xs",children:"帮助我们改进产品体验"})]}),e.jsx(ze,{children:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/survey/webui-feedback",children:[e.jsx(Ua,{className:"h-4 w-4"}),"WebUI 反馈"]})}),e.jsx(_,{variant:"outline",size:"sm",asChild:!0,className:"gap-2",children:e.jsxs(Kn,{to:"/survey/maibot-feedback",children:[e.jsx(Ba,{className:"h-4 w-4"}),"麦麦反馈"]})})]})})]})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 xs:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"总请求数"}),e.jsx(nx,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[Y(I.total_requests).display,Y(I.total_requests).needsExact&&e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Y(I.total_requests).exact,")"]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["最近",h<48?h+"小时":Math.floor(h/24)+"天"]})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"总花费"}),e.jsx(M_,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[we(I.total_cost).display,we(I.total_cost).needsExact&&e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",we(I.total_cost).exact,")"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:I.cost_per_hour>0?`¥${I.cost_per_hour.toFixed(2)}/小时`:"暂无数据"})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"Token消耗"}),e.jsx(Zr,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[Y(I.total_tokens).display,Y(I.total_tokens).needsExact&&e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Y(I.total_tokens).exact,")"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:I.tokens_per_hour>0?`${Y(I.tokens_per_hour).display}/小时`:"暂无数据"})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"平均响应"}),e.jsx(sl,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:[I.avg_response_time.toFixed(2),"s"]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"API平均耗时"})]})]})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-3",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"在线时长"}),e.jsx(da,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:e.jsxs("div",{className:"text-xl font-bold",children:[ue(I.online_time),e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",I.online_time.toLocaleString(),"秒)"]})]})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"消息处理"}),e.jsx(Ba,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsxs("div",{className:"text-xl font-bold",children:[Y(I.total_messages).display,Y(I.total_messages).needsExact&&e.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["(",Y(I.total_messages).exact,")"]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["回复 ",Y(I.total_replies).display,Y(I.total_replies).needsExact&&e.jsxs("span",{children:["(",Y(I.total_replies).exact,")"]})," 条"]})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"成本效率"}),e.jsx(rx,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-xl font-bold",children:I.total_messages>0?`¥${(I.total_cost/I.total_messages*100).toFixed(2)}`:"¥0.00"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"每100条消息"})]})]})]}),e.jsxs(Jt,{defaultValue:"trends",className:"space-y-4",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2 sm:grid-cols-4",children:[e.jsx(Xe,{value:"trends",children:"趋势"}),e.jsx(Xe,{value:"models",children:"模型"}),e.jsx(Xe,{value:"activity",children:"活动"}),e.jsx(Xe,{value:"daily",children:"日统计"})]}),e.jsxs(Ss,{value:"trends",className:"space-y-4",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"请求趋势"}),e.jsxs(Ns,{children:["最近",h,"小时的请求量变化"]})]}),e.jsx(ze,{children:e.jsx(Kr,{config:$,className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:e.jsxs(Ww,{data:pe,children:[e.jsx(Ji,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),e.jsx(Xi,{dataKey:"timestamp",tickFormatter:A=>fe(A),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Qi,{content:e.jsx(Qr,{labelFormatter:A=>fe(A)})}),e.jsx(e_,{type:"monotone",dataKey:"requests",stroke:"var(--color-requests)",strokeWidth:2})]})})})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"花费趋势"}),e.jsx(Ns,{children:"API调用成本变化"})]}),e.jsx(ze,{children:e.jsx(Kr,{config:$,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:e.jsxs(Io,{data:pe,children:[e.jsx(Ji,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),e.jsx(Xi,{dataKey:"timestamp",tickFormatter:A=>fe(A),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Qi,{content:e.jsx(Qr,{labelFormatter:A=>fe(A)})}),e.jsx(Zi,{dataKey:"cost",fill:"var(--color-cost)"})]})})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"Token消耗"}),e.jsx(Ns,{children:"Token使用量变化"})]}),e.jsx(ze,{children:e.jsx(Kr,{config:$,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:e.jsxs(Io,{data:pe,children:[e.jsx(Ji,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),e.jsx(Xi,{dataKey:"timestamp",tickFormatter:A=>fe(A),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Qi,{content:e.jsx(Qr,{labelFormatter:A=>fe(A)})}),e.jsx(Zi,{dataKey:"tokens",fill:"var(--color-tokens)"})]})})})]})]})]}),e.jsx(Ss,{value:"models",className:"space-y-4",children:e.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"模型请求分布"}),e.jsxs(Ns,{children:["各模型使用占比 (共 ",ge.length," 个模型)"]})]}),e.jsx(ze,{children:e.jsx(Kr,{config:Object.fromEntries(ge.map((A,K)=>[A.model_name,{label:A.model_name,color:Ee[K]}])),className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:e.jsxs(s_,{children:[e.jsx(Qi,{content:e.jsx(Qr,{})}),e.jsx(t_,{data:G,cx:"50%",cy:"50%",labelLine:!1,label:({name:A,percent:K})=>K&&K<.05?"":`${A} ${K?(K*100).toFixed(0):0}%`,outerRadius:100,dataKey:"value",children:G.map((A,K)=>e.jsx(a_,{fill:A.fill},`cell-${K}`))})]})})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"模型详细统计"}),e.jsx(Ns,{children:"请求数、花费和性能"})]}),e.jsx(ze,{children:e.jsx(ts,{className:"h-[300px] sm:h-[400px]",children:e.jsx("div",{className:"space-y-3",children:ge.map((A,K)=>e.jsxs("div",{className:"p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h4",{className:"font-semibold text-sm truncate flex-1 min-w-0",children:A.model_name}),e.jsx("div",{className:"w-3 h-3 rounded-full ml-2 flex-shrink-0",style:{backgroundColor:`hsl(var(--chart-${K%5+1}))`}})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"请求数:"}),e.jsx("span",{className:"ml-1 font-medium",children:A.request_count.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"花费:"}),e.jsxs("span",{className:"ml-1 font-medium",children:["¥",A.total_cost.toFixed(2)]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),e.jsxs("span",{className:"ml-1 font-medium",children:[(A.total_tokens/1e3).toFixed(1),"K"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"平均耗时:"}),e.jsxs("span",{className:"ml-1 font-medium",children:[A.avg_response_time.toFixed(2),"s"]})]})]})]},K))})})})]})]})}),e.jsx(Ss,{value:"activity",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"最近活动"}),e.jsx(Ns,{children:"最新的API调用记录"})]}),e.jsx(ze,{children:e.jsx(ts,{className:"h-[400px] sm:h-[500px]",children:e.jsx("div",{className:"space-y-2",children:Q.map((A,K)=>e.jsxs("div",{className:"p-3 sm:p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-medium text-sm truncate",children:A.model}),e.jsx("div",{className:"text-xs text-muted-foreground",children:A.request_type})]}),e.jsx("div",{className:"text-xs text-muted-foreground flex-shrink-0",children:fe(A.timestamp)})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),e.jsx("span",{className:"ml-1",children:A.tokens})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"花费:"}),e.jsxs("span",{className:"ml-1",children:["¥",A.cost.toFixed(4)]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"耗时:"}),e.jsxs("span",{className:"ml-1",children:[A.time_cost.toFixed(2),"s"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"状态:"}),e.jsx("span",{className:`ml-1 ${A.status==="success"?"text-green-600":"text-red-600"}`,children:A.status})]})]})]},K))})})})]})}),e.jsx(Ss,{value:"daily",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"每日统计"}),e.jsx(Ns,{children:"最近7天的数据汇总"})]}),e.jsx(ze,{children:e.jsx(Kr,{config:{requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"}},className:"h-[400px] sm:h-[500px] w-full aspect-auto",children:e.jsxs(Io,{data:D,children:[e.jsx(Ji,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),e.jsx(Xi,{dataKey:"timestamp",tickFormatter:A=>{const K=new Date(A);return`${K.getMonth()+1}/${K.getDate()}`},stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{yAxisId:"left",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Gr,{yAxisId:"right",orientation:"right",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),e.jsx(Qi,{content:e.jsx(Qr,{labelFormatter:A=>new Date(A).toLocaleDateString("zh-CN")})}),e.jsx(F1,{content:e.jsx(zv,{})}),e.jsx(Zi,{yAxisId:"left",dataKey:"requests",fill:"var(--color-requests)"}),e.jsx(Zi,{yAxisId:"right",dataKey:"cost",fill:"var(--color-cost)"})]})})})]})})]}),e.jsx(nr,{}),e.jsx(Pv,{open:M,onOpenChange:A=>{S(A),A||X()}})]})})}const x2={theme:"system",setTheme:()=>null},Fv=u.createContext(x2),vx=()=>{const a=u.useContext(Fv);if(a===void 0)throw new Error("useTheme must be used within a ThemeProvider");return a},h2=(a,l,r)=>{const c=document.documentElement.classList.contains("no-animations");if(!document.startViewTransition||c){l(a);return}const d=r.clientX,m=r.clientY,h=Math.hypot(Math.max(d,innerWidth-d),Math.max(m,innerHeight-m));document.startViewTransition(()=>{l(a)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${d}px ${m}px)`,`circle(${h}px at ${d}px ${m}px)`]},{duration:500,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})},Hv=u.createContext(void 0),qv=()=>{const a=u.useContext(Hv);if(a===void 0)throw new Error("useAnimation must be used within an AnimationProvider");return a},qe=u.forwardRef(({className:a,...l},r)=>e.jsx(Nj,{className:P("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...l,ref:r,children:e.jsx(bw,{className:P("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));qe.displayName=Nj.displayName;const f2=ti("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T=u.forwardRef(({className:a,...l},r)=>e.jsx(Xj,{ref:r,className:P(f2(),a),...l}));T.displayName=Xj.displayName;const p2=[{id:"minLength",label:"长度至少 10 位",description:"Token 长度必须大于等于 10 个字符",validate:a=>a.length>=10},{id:"hasUppercase",label:"包含大写字母",description:"至少包含一个大写字母 (A-Z)",validate:a=>/[A-Z]/.test(a)},{id:"hasLowercase",label:"包含小写字母",description:"至少包含一个小写字母 (a-z)",validate:a=>/[a-z]/.test(a)},{id:"hasSpecialChar",label:"包含特殊符号",description:"至少包含一个特殊符号 (!@#$%^&*()_+-=[]{}|;:,.<>?/)",validate:a=>/[!@#$%^&*()_+\-=[\]{}|;:,.<>?/]/.test(a)}];function g2(a){const l=p2.map(c=>({id:c.id,label:c.label,description:c.description,passed:c.validate(a)}));return{isValid:l.every(c=>c.passed),rules:l}}const ud="0.12.2",Nx="MaiBot Dashboard",j2=`${Nx} v${ud}`,v2=(a="v")=>`${a}${ud}`,wa={THEME:"maibot-ui-theme",ACCENT_COLOR:"accent-color",ENABLE_ANIMATIONS:"maibot-animations",ENABLE_WAVES_BACKGROUND:"maibot-waves-background",LOG_CACHE_SIZE:"maibot-log-cache-size",LOG_AUTO_SCROLL:"maibot-log-auto-scroll",LOG_FONT_SIZE:"maibot-log-font-size",LOG_LINE_SPACING:"maibot-log-line-spacing",DATA_SYNC_INTERVAL:"maibot-data-sync-interval",WS_RECONNECT_INTERVAL:"maibot-ws-reconnect-interval",WS_MAX_RECONNECT_ATTEMPTS:"maibot-ws-max-reconnect-attempts",COMPLETED_TOURS:"maibot-completed-tours"},jl={theme:"system",accentColor:"blue",enableAnimations:!0,enableWavesBackground:!0,logCacheSize:1e3,logAutoScroll:!0,logFontSize:"xs",logLineSpacing:4,dataSyncInterval:30,wsReconnectInterval:3e3,wsMaxReconnectAttempts:10};function zt(a){const l=Vv(a),r=localStorage.getItem(l);if(r===null)return jl[a];const c=jl[a];if(typeof c=="boolean")return r==="true";if(typeof c=="number"){const d=parseFloat(r);return isNaN(d)?c:d}return r}function Yr(a,l){const r=Vv(a);localStorage.setItem(r,String(l)),window.dispatchEvent(new CustomEvent("maibot-settings-change",{detail:{key:a,value:l}}))}function N2(){return{theme:zt("theme"),accentColor:zt("accentColor"),enableAnimations:zt("enableAnimations"),enableWavesBackground:zt("enableWavesBackground"),logCacheSize:zt("logCacheSize"),logAutoScroll:zt("logAutoScroll"),logFontSize:zt("logFontSize"),logLineSpacing:zt("logLineSpacing"),dataSyncInterval:zt("dataSyncInterval"),wsReconnectInterval:zt("wsReconnectInterval"),wsMaxReconnectAttempts:zt("wsMaxReconnectAttempts")}}function b2(){const a=N2(),l=localStorage.getItem(wa.COMPLETED_TOURS),r=l?JSON.parse(l):[];return{...a,completedTours:r}}function y2(a){const l=[],r=[];for(const[c,d]of Object.entries(a)){if(c==="completedTours"){Array.isArray(d)?(localStorage.setItem(wa.COMPLETED_TOURS,JSON.stringify(d)),l.push("completedTours")):r.push("completedTours");continue}if(c in jl){const m=c,h=jl[m];if(typeof d==typeof h){if(m==="theme"&&!["light","dark","system"].includes(d)){r.push(c);continue}if(m==="logFontSize"&&!["xs","sm","base"].includes(d)){r.push(c);continue}Yr(m,d),l.push(c)}else r.push(c)}else r.push(c)}return{success:l.length>0,imported:l,skipped:r}}function w2(){for(const a of Object.keys(jl))Yr(a,jl[a]);localStorage.removeItem(wa.COMPLETED_TOURS),window.dispatchEvent(new CustomEvent("maibot-settings-reset"))}function _2(){const a=[],l=[],r=[];for(let c=0;cc.size-r.size),{used:a,items:localStorage.length,details:l}}function S2(a){if(a===0)return"0 B";const l=1024,r=["B","KB","MB"],c=Math.floor(Math.log(a)/Math.log(l));return parseFloat((a/Math.pow(l,c)).toFixed(2))+" "+r[c]}function Vv(a){return{theme:wa.THEME,accentColor:wa.ACCENT_COLOR,enableAnimations:wa.ENABLE_ANIMATIONS,enableWavesBackground:wa.ENABLE_WAVES_BACKGROUND,logCacheSize:wa.LOG_CACHE_SIZE,logAutoScroll:wa.LOG_AUTO_SCROLL,logFontSize:wa.LOG_FONT_SIZE,logLineSpacing:wa.LOG_LINE_SPACING,dataSyncInterval:wa.DATA_SYNC_INTERVAL,wsReconnectInterval:wa.WS_RECONNECT_INTERVAL,wsMaxReconnectAttempts:wa.WS_MAX_RECONNECT_ATTEMPTS}[a]}const el=u.forwardRef(({className:a,...l},r)=>e.jsxs(bj,{ref:r,className:P("relative flex w-full touch-none select-none items-center",a),...l,children:[e.jsx(yw,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:e.jsx(ww,{className:"absolute h-full bg-primary"})}),e.jsx(_w,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));el.displayName=bj.displayName;class k2{ws=null;reconnectTimeout=null;reconnectAttempts=0;heartbeatInterval=null;logCallbacks=new Set;connectionCallbacks=new Set;isConnected=!1;logCache=[];getMaxCacheSize(){return zt("logCacheSize")}getMaxReconnectAttempts(){return zt("wsMaxReconnectAttempts")}getReconnectInterval(){return zt("wsReconnectInterval")}getWebSocketUrl(l){let r;{const c=window.location.protocol==="https:"?"wss:":"ws:",d=window.location.host;r=`${c}//${d}/ws/logs`}return l?`${r}?token=${encodeURIComponent(l)}`:r}async getWsToken(){try{const l=await ke("/api/webui/ws-token",{method:"GET",credentials:"include"});if(!l.ok)return console.error("获取 WebSocket token 失败:",l.status),null;const r=await l.json();return r.success&&r.token?r.token:null}catch(l){return console.error("获取 WebSocket token 失败:",l),null}}async connect(){if(this.ws?.readyState===WebSocket.OPEN||this.ws?.readyState===WebSocket.CONNECTING)return;if(window.location.pathname==="/auth"){console.log("📡 在登录页面,跳过 WebSocket 连接");return}if(!await dc()){console.log("📡 未登录,跳过 WebSocket 连接");return}const r=await this.getWsToken();if(!r){console.log("📡 无法获取 WebSocket token,跳过连接");return}const c=this.getWebSocketUrl(r);try{this.ws=new WebSocket(c),this.ws.onopen=()=>{this.isConnected=!0,this.reconnectAttempts=0,this.notifyConnection(!0),this.startHeartbeat()},this.ws.onmessage=d=>{try{if(d.data==="pong")return;const m=JSON.parse(d.data);this.notifyLog(m)}catch(m){console.error("解析日志消息失败:",m)}},this.ws.onerror=d=>{console.error("❌ WebSocket 错误:",d),this.isConnected=!1,this.notifyConnection(!1)},this.ws.onclose=()=>{this.isConnected=!1,this.notifyConnection(!1),this.stopHeartbeat(),this.attemptReconnect()}}catch(d){console.error("创建 WebSocket 连接失败:",d),this.attemptReconnect()}}attemptReconnect(){const l=this.getMaxReconnectAttempts();if(this.reconnectAttempts>=l)return;this.reconnectAttempts+=1;const r=this.getReconnectInterval(),c=Math.min(r*this.reconnectAttempts,3e4);this.reconnectTimeout=window.setTimeout(()=>{this.connect()},c)}startHeartbeat(){this.heartbeatInterval=window.setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send("ping")},3e4)}stopHeartbeat(){this.heartbeatInterval!==null&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null)}disconnect(){this.reconnectTimeout!==null&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.stopHeartbeat(),this.ws&&(this.ws.close(),this.ws=null),this.isConnected=!1,this.reconnectAttempts=0}onLog(l){return this.logCallbacks.add(l),()=>this.logCallbacks.delete(l)}onConnectionChange(l){return this.connectionCallbacks.add(l),l(this.isConnected),()=>this.connectionCallbacks.delete(l)}notifyLog(l){if(!this.logCache.some(c=>c.id===l.id)){this.logCache.push(l);const c=this.getMaxCacheSize();this.logCache.length>c&&(this.logCache=this.logCache.slice(-c)),this.logCallbacks.forEach(d=>{try{d(l)}catch(m){console.error("日志回调执行失败:",m)}})}}notifyConnection(l){this.connectionCallbacks.forEach(r=>{try{r(l)}catch(c){console.error("连接状态回调执行失败:",c)}})}getAllLogs(){return[...this.logCache]}clearLogs(){this.logCache=[]}getConnectionStatus(){return this.isConnected}}const Qn=new k2;typeof window<"u"&&setTimeout(()=>{Qn.connect()},100);const bs=kw,wt=Cw,C2=Sw,Gv=u.forwardRef(({className:a,...l},r)=>e.jsx(yj,{className:P("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l,ref:r}));Gv.displayName=yj.displayName;const xs=u.forwardRef(({className:a,...l},r)=>e.jsxs(C2,{children:[e.jsx(Gv,{}),e.jsx(wj,{ref:r,className:P("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...l})]}));xs.displayName=wj.displayName;const hs=({className:a,...l})=>e.jsx("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",a),...l});hs.displayName="AlertDialogHeader";const fs=({className:a,...l})=>e.jsx("div",{className:P("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...l});fs.displayName="AlertDialogFooter";const ps=u.forwardRef(({className:a,...l},r)=>e.jsx(_j,{ref:r,className:P("text-lg font-semibold",a),...l}));ps.displayName=_j.displayName;const gs=u.forwardRef(({className:a,...l},r)=>e.jsx(Sj,{ref:r,className:P("text-sm text-muted-foreground",a),...l}));gs.displayName=Sj.displayName;const js=u.forwardRef(({className:a,variant:l,...r},c)=>e.jsx(kj,{ref:c,className:P(si({variant:l}),a),...r}));js.displayName=kj.displayName;const vs=u.forwardRef(({className:a,...l},r)=>e.jsx(Cj,{ref:r,className:P(si({variant:"outline"}),"mt-2 sm:mt-0",a),...l}));vs.displayName=Cj.displayName;function T2(){return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"系统设置"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理您的应用偏好设置"})]})}),e.jsxs(Jt,{defaultValue:"appearance",className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2 sm:grid-cols-4 gap-0.5 sm:gap-1 h-auto p-1",children:[e.jsxs(Xe,{value:"appearance",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(A_,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"外观"})]}),e.jsxs(Xe,{value:"security",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(ov,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"安全"})]}),e.jsxs(Xe,{value:"other",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(Sn,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"其他"})]}),e.jsxs(Xe,{value:"about",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(Yt,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"关于"})]})]}),e.jsxs(ts,{className:"h-[calc(100vh-240px)] sm:h-[calc(100vh-280px)] mt-4 sm:mt-6",children:[e.jsx(Ss,{value:"appearance",className:"mt-0",children:e.jsx(E2,{})}),e.jsx(Ss,{value:"security",className:"mt-0",children:e.jsx(M2,{})}),e.jsx(Ss,{value:"other",className:"mt-0",children:e.jsx(A2,{})}),e.jsx(Ss,{value:"about",className:"mt-0",children:e.jsx(z2,{})})]})]})]})}function Bg(a){const l=document.documentElement,c={blue:{hsl:"221.2 83.2% 53.3%",darkHsl:"217.2 91.2% 59.8%",gradient:null},purple:{hsl:"271 91% 65%",darkHsl:"270 95% 75%",gradient:null},green:{hsl:"142 71% 45%",darkHsl:"142 76% 36%",gradient:null},orange:{hsl:"25 95% 53%",darkHsl:"20 90% 48%",gradient:null},pink:{hsl:"330 81% 60%",darkHsl:"330 85% 70%",gradient:null},red:{hsl:"0 84% 60%",darkHsl:"0 90% 70%",gradient:null},"gradient-sunset":{hsl:"15 95% 60%",darkHsl:"15 95% 65%",gradient:"linear-gradient(135deg, hsl(25 95% 53%) 0%, hsl(330 81% 60%) 100%)"},"gradient-ocean":{hsl:"200 90% 55%",darkHsl:"200 90% 60%",gradient:"linear-gradient(135deg, hsl(221.2 83.2% 53.3%) 0%, hsl(189 94% 43%) 100%)"},"gradient-forest":{hsl:"150 70% 45%",darkHsl:"150 75% 40%",gradient:"linear-gradient(135deg, hsl(142 71% 45%) 0%, hsl(158 64% 52%) 100%)"},"gradient-aurora":{hsl:"310 85% 65%",darkHsl:"310 90% 70%",gradient:"linear-gradient(135deg, hsl(271 91% 65%) 0%, hsl(330 81% 60%) 100%)"},"gradient-fire":{hsl:"15 95% 55%",darkHsl:"15 95% 60%",gradient:"linear-gradient(135deg, hsl(0 84% 60%) 0%, hsl(25 95% 53%) 100%)"},"gradient-twilight":{hsl:"250 90% 60%",darkHsl:"250 95% 65%",gradient:"linear-gradient(135deg, hsl(239 84% 67%) 0%, hsl(271 91% 65%) 100%)"}}[a];if(c)l.style.setProperty("--primary",c.hsl),c.gradient?(l.style.setProperty("--primary-gradient",c.gradient),l.classList.add("has-gradient")):(l.style.removeProperty("--primary-gradient"),l.classList.remove("has-gradient"));else if(a.startsWith("#")){const d=m=>{m=m.replace("#","");const h=parseInt(m.substring(0,2),16)/255,f=parseInt(m.substring(2,4),16)/255,p=parseInt(m.substring(4,6),16)/255,g=Math.max(h,f,p),N=Math.min(h,f,p);let j=0,b=0;const y=(g+N)/2;if(g!==N){const w=g-N;switch(b=y>.5?w/(2-g-N):w/(g+N),g){case h:j=((f-p)/w+(flocalStorage.getItem("accent-color")||"blue");u.useEffect(()=>{const g=localStorage.getItem("accent-color")||"blue";Bg(g)},[]);const p=g=>{f(g),localStorage.setItem("accent-color",g),Bg(g)};return e.jsxs("div",{className:"space-y-6 sm:space-y-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"主题模式"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 sm:gap-4",children:[e.jsx(Im,{value:"light",current:a,onChange:l,label:"浅色",description:"始终使用浅色主题"}),e.jsx(Im,{value:"dark",current:a,onChange:l,label:"深色",description:"始终使用深色主题"}),e.jsx(Im,{value:"system",current:a,onChange:l,label:"跟随系统",description:"根据系统设置自动切换"})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"主题色"}),e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"单色"}),e.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 sm:gap-3",children:[e.jsx(Wa,{value:"blue",current:h,onChange:p,label:"蓝色",colorClass:"bg-blue-500"}),e.jsx(Wa,{value:"purple",current:h,onChange:p,label:"紫色",colorClass:"bg-purple-500"}),e.jsx(Wa,{value:"green",current:h,onChange:p,label:"绿色",colorClass:"bg-green-500"}),e.jsx(Wa,{value:"orange",current:h,onChange:p,label:"橙色",colorClass:"bg-orange-500"}),e.jsx(Wa,{value:"pink",current:h,onChange:p,label:"粉色",colorClass:"bg-pink-500"}),e.jsx(Wa,{value:"red",current:h,onChange:p,label:"红色",colorClass:"bg-red-500"})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"渐变色"}),e.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 sm:gap-3",children:[e.jsx(Wa,{value:"gradient-sunset",current:h,onChange:p,label:"日落",colorClass:"bg-gradient-to-r from-orange-500 to-pink-500"}),e.jsx(Wa,{value:"gradient-ocean",current:h,onChange:p,label:"海洋",colorClass:"bg-gradient-to-r from-blue-500 to-cyan-500"}),e.jsx(Wa,{value:"gradient-forest",current:h,onChange:p,label:"森林",colorClass:"bg-gradient-to-r from-green-500 to-emerald-500"}),e.jsx(Wa,{value:"gradient-aurora",current:h,onChange:p,label:"极光",colorClass:"bg-gradient-to-r from-purple-500 to-pink-500"}),e.jsx(Wa,{value:"gradient-fire",current:h,onChange:p,label:"烈焰",colorClass:"bg-gradient-to-r from-red-500 to-orange-500"}),e.jsx(Wa,{value:"gradient-twilight",current:h,onChange:p,label:"暮光",colorClass:"bg-gradient-to-r from-indigo-500 to-purple-500"})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"自定义颜色"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-4",children:[e.jsx("div",{className:"flex-1",children:e.jsx("input",{type:"color",value:h.startsWith("#")?h:"#3b82f6",onChange:g=>p(g.target.value),className:"h-10 sm:h-12 w-full rounded-lg border-2 border-border cursor-pointer",title:"选择自定义颜色"})}),e.jsx("div",{className:"flex-1",children:e.jsx(ae,{type:"text",value:h,onChange:g=>p(g.target.value),placeholder:"#3b82f6",className:"font-mono text-sm"})})]}),e.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground mt-2",children:"点击色块选择颜色,或手动输入 HEX 颜色代码"})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"动画效果"}),e.jsxs("div",{className:"space-y-2 sm:space-y-3",children:[e.jsx("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5 flex-1",children:[e.jsx(T,{htmlFor:"animations",className:"text-base font-medium cursor-pointer",children:"启用动画效果"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭后将禁用所有过渡动画和特效,提升性能"})]}),e.jsx(qe,{id:"animations",checked:r,onCheckedChange:c})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5 flex-1",children:[e.jsx(T,{htmlFor:"waves-background",className:"text-base font-medium cursor-pointer",children:"登录页波浪背景"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭后登录页将使用纯色背景,适合低性能设备"})]}),e.jsx(qe,{id:"waves-background",checked:d,onCheckedChange:m})]})})]})]})]})}function M2(){const a=ha(),[l,r]=u.useState(""),[c,d]=u.useState(""),[m,h]=u.useState(!1),[f,p]=u.useState(!1),[g,N]=u.useState(!1),[j,b]=u.useState(!1),[y,w]=u.useState(!1),[z,M]=u.useState(!1),[S,F]=u.useState(""),[E,C]=u.useState(!1),{toast:R}=nt(),H=u.useMemo(()=>g2(c),[c]),O=async re=>{if(!l){R({title:"无法复制",description:"Token 存储在安全 Cookie 中,请重新生成以获取新 Token",variant:"destructive"});return}try{await navigator.clipboard.writeText(re),w(!0),R({title:"复制成功",description:"Token 已复制到剪贴板"}),setTimeout(()=>w(!1),2e3)}catch{R({title:"复制失败",description:"请手动复制 Token",variant:"destructive"})}},X=async()=>{if(!c.trim()){R({title:"输入错误",description:"请输入新的 Token",variant:"destructive"});return}if(!H.isValid){const re=H.rules.filter(ge=>!ge.passed).map(ge=>ge.label).join(", ");R({title:"格式错误",description:`Token 不符合要求: ${re}`,variant:"destructive"});return}N(!0);try{const re=await fetch("/api/webui/auth/update",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({new_token:c.trim()})}),ge=await re.json();re.ok&&ge.success?(d(""),r(c.trim()),R({title:"更新成功",description:"Access Token 已更新,即将跳转到登录页"}),setTimeout(()=>{a({to:"/auth"})},1500)):R({title:"更新失败",description:ge.message||"无法更新 Token",variant:"destructive"})}catch(re){console.error("更新 Token 错误:",re),R({title:"更新失败",description:"连接服务器失败",variant:"destructive"})}finally{N(!1)}},L=async()=>{b(!0);try{const re=await fetch("/api/webui/auth/regenerate",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"}),ge=await re.json();re.ok&&ge.success?(r(ge.token),F(ge.token),M(!0),C(!1),R({title:"生成成功",description:"新的 Access Token 已生成,请及时保存"})):R({title:"生成失败",description:ge.message||"无法生成新 Token",variant:"destructive"})}catch(re){console.error("生成 Token 错误:",re),R({title:"生成失败",description:"连接服务器失败",variant:"destructive"})}finally{b(!1)}},me=async()=>{try{await navigator.clipboard.writeText(S),C(!0),R({title:"复制成功",description:"Token 已复制到剪贴板"})}catch{R({title:"复制失败",description:"请手动复制 Token",variant:"destructive"})}},Ne=()=>{M(!1),setTimeout(()=>{F(""),C(!1)},300),setTimeout(()=>{a({to:"/auth"})},500)},je=re=>{re||Ne()};return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsx(Qs,{open:z,onOpenChange:je,children:e.jsxs(Hs,{className:"sm:max-w-md",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Lt,{className:"h-5 w-5 text-yellow-500"}),"新的 Access Token"]}),e.jsx(at,{children:"这是您的新 Token,请立即保存。关闭此窗口后将跳转到登录页面。"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border-2 border-primary/20 bg-primary/5 p-4",children:[e.jsx(T,{className:"text-xs text-muted-foreground mb-2 block",children:"您的新 Token (64位安全令牌)"}),e.jsx("div",{className:"font-mono text-sm break-all select-all bg-background p-3 rounded border",children:S})]}),e.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Lt,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-yellow-800 dark:text-yellow-300 space-y-1",children:[e.jsx("p",{className:"font-semibold",children:"重要提示"}),e.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[e.jsx("li",{children:"此 Token 仅显示一次,关闭后无法再查看"}),e.jsx("li",{children:"请立即复制并保存到安全的位置"}),e.jsx("li",{children:"关闭窗口后将自动跳转到登录页面"}),e.jsx("li",{children:"请使用新 Token 重新登录系统"})]})]})]})})]}),e.jsxs(gt,{className:"gap-2 sm:gap-0",children:[e.jsx(_,{variant:"outline",onClick:me,className:"gap-2",children:E?e.jsxs(e.Fragment,{children:[e.jsx(Ot,{className:"h-4 w-4 text-green-500"}),"已复制"]}):e.jsxs(e.Fragment,{children:[e.jsx(qo,{className:"h-4 w-4"}),"复制 Token"]})}),e.jsx(_,{onClick:Ne,children:"我已保存,关闭"})]})]})}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"当前 Access Token"}),e.jsx("div",{className:"space-y-3 sm:space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"current-token",className:"text-sm",children:"您的访问令牌"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ae,{id:"current-token",type:m?"text":"password",value:l||"••••••••••••••••••••••••••••••••",readOnly:!0,className:"pr-10 font-mono text-sm",placeholder:"Token 存储在安全 Cookie 中"}),e.jsx("button",{onClick:()=>{l?h(!m):R({title:"无法查看",description:'Token 存储在安全 Cookie 中,如需新 Token 请点击"重新生成"'})},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 hover:bg-accent rounded",title:m?"隐藏":"显示",children:m?e.jsx(ic,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ua,{className:"h-4 w-4 text-muted-foreground"})})]}),e.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[e.jsx(_,{variant:"outline",size:"icon",onClick:()=>O(l),title:"复制到剪贴板",className:"flex-shrink-0",disabled:!l,children:y?e.jsx(Ot,{className:"h-4 w-4 text-green-500"}):e.jsx(qo,{className:"h-4 w-4"})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"outline",disabled:j,className:"gap-2 flex-1 sm:flex-none",children:[e.jsx(dt,{className:P("h-4 w-4",j&&"animate-spin")}),e.jsx("span",{className:"hidden sm:inline",children:"重新生成"}),e.jsx("span",{className:"sm:hidden",children:"生成"})]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重新生成 Token"}),e.jsx(gs,{children:"这将生成一个新的 64 位安全令牌,并使当前 Token 立即失效。 您需要使用新 Token 重新登录系统。此操作不可撤销,确定要继续吗?"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:L,children:"确认生成"})]})]})]})]})]}),e.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground",children:"请妥善保管您的 Access Token,不要泄露给他人"})]})})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"自定义 Access Token"}),e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"new-token",className:"text-sm",children:"新的访问令牌"}),e.jsxs("div",{className:"relative",children:[e.jsx(ae,{id:"new-token",type:f?"text":"password",value:c,onChange:re=>d(re.target.value),className:"pr-10 font-mono text-sm",placeholder:"输入自定义 Token"}),e.jsx("button",{onClick:()=>p(!f),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 hover:bg-accent rounded",title:f?"隐藏":"显示",children:f?e.jsx(ic,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ua,{className:"h-4 w-4 text-muted-foreground"})})]}),c&&e.jsxs("div",{className:"mt-3 space-y-2 p-3 rounded-lg bg-muted/50",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Token 安全要求:"}),e.jsx("div",{className:"space-y-1.5",children:H.rules.map(re=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[re.passed?e.jsx(st,{className:"h-4 w-4 text-green-500 flex-shrink-0"}):e.jsx(ta,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),e.jsx("span",{className:P(re.passed?"text-green-600 dark:text-green-400":"text-muted-foreground"),children:re.label})]},re.id))}),H.isValid&&e.jsx("div",{className:"mt-2 pt-2 border-t border-border",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[e.jsx(Ot,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:"Token 格式正确,可以使用"})]})})]})]}),e.jsx(_,{onClick:X,disabled:g||!H.isValid||!c,className:"w-full sm:w-auto",children:g?"更新中...":"更新自定义 Token"})]})]}),e.jsxs("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3 sm:p-4",children:[e.jsx("h4",{className:"text-sm sm:text-base font-semibold text-yellow-900 dark:text-yellow-200 mb-2",children:"安全提示"}),e.jsxs("ul",{className:"text-xs sm:text-sm text-yellow-800 dark:text-yellow-300 space-y-1 list-disc list-inside",children:[e.jsx("li",{children:"重新生成 Token 会创建系统随机生成的 64 位安全令牌"}),e.jsx("li",{children:"自定义 Token 必须满足所有安全要求才能使用"}),e.jsx("li",{children:"更新 Token 后,旧的 Token 将立即失效"}),e.jsx("li",{children:"请在安全的环境下查看和复制 Token"}),e.jsx("li",{children:"如果怀疑 Token 泄露,请立即重新生成或更新"}),e.jsx("li",{children:"建议使用系统生成的 Token 以获得最高安全性"})]})]})]})}function A2(){const a=ha(),{toast:l}=nt(),[r,c]=u.useState(!1),[d,m]=u.useState(!1),[h,f]=u.useState(()=>zt("logCacheSize")),[p,g]=u.useState(()=>zt("wsReconnectInterval")),[N,j]=u.useState(()=>zt("wsMaxReconnectAttempts")),[b,y]=u.useState(()=>zt("dataSyncInterval")),[w,z]=u.useState(()=>Ig()),[M,S]=u.useState(!1),[F,E]=u.useState(!1),C=u.useRef(null);if(d)throw new Error("这是一个手动触发的测试错误,用于验证错误边界组件是否正常工作。");const R=()=>{z(Ig())},H=D=>{const Q=D[0];f(Q),Yr("logCacheSize",Q)},O=D=>{const Q=D[0];g(Q),Yr("wsReconnectInterval",Q)},X=D=>{const Q=D[0];j(Q),Yr("wsMaxReconnectAttempts",Q)},L=D=>{const Q=D[0];y(Q),Yr("dataSyncInterval",Q)},me=()=>{Qn.clearLogs(),l({title:"日志已清除",description:"日志缓存已清空"})},Ne=()=>{const D=_2();R(),l({title:"缓存已清除",description:`已清除 ${D.clearedKeys.length} 项缓存数据`})},je=()=>{S(!0);try{const D=b2(),Q=JSON.stringify(D,null,2),I=new Blob([Q],{type:"application/json"}),ue=URL.createObjectURL(I),Y=document.createElement("a");Y.href=ue,Y.download=`maibot-webui-settings-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(Y),Y.click(),document.body.removeChild(Y),URL.revokeObjectURL(ue),l({title:"导出成功",description:"设置已导出为 JSON 文件"})}catch(D){console.error("导出设置失败:",D),l({title:"导出失败",description:"无法导出设置",variant:"destructive"})}finally{S(!1)}},re=D=>{const Q=D.target.files?.[0];if(!Q)return;E(!0);const I=new FileReader;I.onload=ue=>{try{const Y=ue.target?.result,we=JSON.parse(Y),fe=y2(we);fe.success?(f(zt("logCacheSize")),g(zt("wsReconnectInterval")),j(zt("wsMaxReconnectAttempts")),y(zt("dataSyncInterval")),R(),l({title:"导入成功",description:`成功导入 ${fe.imported.length} 项设置${fe.skipped.length>0?`,跳过 ${fe.skipped.length} 项`:""}`}),(fe.imported.includes("theme")||fe.imported.includes("accentColor"))&&l({title:"提示",description:"部分设置需要刷新页面才能完全生效"})):l({title:"导入失败",description:"没有有效的设置项可导入",variant:"destructive"})}catch(Y){console.error("导入设置失败:",Y),l({title:"导入失败",description:"文件格式无效",variant:"destructive"})}finally{E(!1),C.current&&(C.current.value="")}},I.readAsText(Q)},ge=()=>{w2(),f(jl.logCacheSize),g(jl.wsReconnectInterval),j(jl.wsMaxReconnectAttempts),y(jl.dataSyncInterval),R(),l({title:"已重置",description:"所有设置已恢复为默认值,刷新页面以应用更改"})},pe=async()=>{c(!0);try{const D=await ke("/api/webui/setup/reset",{method:"POST"}),Q=await D.json();D.ok&&Q.success?(l({title:"重置成功",description:"即将进入初次配置向导"}),setTimeout(()=>{a({to:"/setup"})},1e3)):l({title:"重置失败",description:Q.message||"无法重置配置状态",variant:"destructive"})}catch(D){console.error("重置配置状态错误:",D),l({title:"重置失败",description:"连接服务器失败",variant:"destructive"})}finally{c(!1)}};return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(Zr,{className:"h-5 w-5"}),"性能与存储"]}),e.jsxs("div",{className:"space-y-4 sm:space-y-5",children:[e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3 sm:p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("span",{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(z_,{className:"h-4 w-4"}),"本地存储使用"]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:R,className:"h-7 px-2",children:e.jsx(dt,{className:"h-3 w-3"})})]}),e.jsx("div",{className:"text-2xl font-bold text-primary",children:S2(w.used)}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[w.items," 个存储项"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm font-medium",children:"日志缓存大小"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[h," 条"]})]}),e.jsx(el,{value:[h],onValueChange:H,min:100,max:5e3,step:100,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"控制日志查看器最多缓存的日志条数,较大的值会占用更多内存"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm font-medium",children:"首页数据刷新间隔"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[b," 秒"]})]}),e.jsx(el,{value:[b],onValueChange:L,min:10,max:120,step:5,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"控制首页统计数据的自动刷新间隔"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm font-medium",children:"WebSocket 重连间隔"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[p/1e3," 秒"]})]}),e.jsx(el,{value:[p],onValueChange:O,min:1e3,max:1e4,step:500,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"日志 WebSocket 连接断开后的重连基础间隔"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm font-medium",children:"WebSocket 最大重连次数"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[N," 次"]})]}),e.jsx(el,{value:[N],onValueChange:X,min:3,max:30,step:1,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"连接失败后的最大重连尝试次数"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 pt-2",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:me,className:"gap-2",children:[e.jsx(os,{className:"h-4 w-4"}),"清除日志缓存"]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:"gap-2",children:[e.jsx(os,{className:"h-4 w-4"}),"清除本地缓存"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认清除本地缓存"}),e.jsx(gs,{children:"这将清除所有本地缓存的设置和数据(不包括登录凭证)。 您可能需要重新配置部分偏好设置。确定要继续吗?"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:Ne,children:"确认清除"})]})]})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(na,{className:"h-5 w-5"}),"导入/导出设置"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"导出当前的界面设置以便备份,或从之前导出的文件中恢复设置。"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(_,{variant:"outline",onClick:je,disabled:M,className:"gap-2",children:[e.jsx(na,{className:"h-4 w-4"}),M?"导出中...":"导出设置"]}),e.jsx("input",{ref:C,type:"file",accept:".json",onChange:re,className:"hidden"}),e.jsxs(_,{variant:"outline",onClick:()=>C.current?.click(),disabled:F,className:"gap-2",children:[e.jsx(cc,{className:"h-4 w-4"}),F?"导入中...":"导入设置"]})]}),e.jsx("div",{className:"pt-2 border-t",children:e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:"gap-2 text-destructive hover:text-destructive",children:[e.jsx(rc,{className:"h-4 w-4"}),"重置所有设置为默认值"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重置所有设置"}),e.jsx(gs,{children:"这将把所有界面设置恢复为默认值,包括主题、颜色、动画等偏好设置。 此操作不会影响您的登录状态。确定要继续吗?"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:ge,children:"确认重置"})]})]})]})})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"配置向导"}),e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsx("div",{className:"space-y-2",children:e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"重新进行初次配置向导,可以帮助您重新设置系统的基础配置。"})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"outline",disabled:r,className:"gap-2",children:[e.jsx(rc,{className:P("h-4 w-4",r&&"animate-spin")}),"重新进行初次配置"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重新配置"}),e.jsx(gs,{children:"这将带您重新进入初次配置向导。您可以重新设置系统的基础配置项。确定要继续吗?"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:pe,children:"确认重置"})]})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border border-dashed border-yellow-500/50 bg-yellow-500/5 p-4 sm:p-6",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(Lt,{className:"h-5 w-5 text-yellow-500"}),"开发者工具"]}),e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsx("div",{className:"space-y-2",children:e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"以下功能仅供开发调试使用,可能会导致页面崩溃或异常。"})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{variant:"destructive",className:"gap-2",children:[e.jsx(Lt,{className:"h-4 w-4"}),"触发测试错误"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认触发错误"}),e.jsx(gs,{children:"这将手动触发一个 React 错误,用于测试错误边界组件的显示效果。 页面将显示错误界面,您可以通过刷新页面或点击返回首页来恢复。"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>m(!0),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"确认触发"})]})]})]})]})]})]})}function z2(){return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsx("div",{className:"rounded-lg border-2 border-primary/30 bg-gradient-to-r from-primary/5 to-primary/10 p-4 sm:p-6",children:e.jsxs("div",{className:"flex items-start gap-3 sm:gap-4",children:[e.jsx("div",{className:"flex-shrink-0 rounded-lg bg-primary/10 p-2 sm:p-3",children:e.jsx("svg",{className:"h-6 w-6 sm:h-8 sm:w-8 text-primary",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-lg sm:text-xl font-bold text-foreground mb-2",children:"开源项目"}),e.jsx("p",{className:"text-sm sm:text-base text-muted-foreground mb-3",children:"本项目在 GitHub 开源,欢迎 Star ⭐ 支持!"}),e.jsxs("a",{href:"https://github.com/Mai-with-u/MaiBot-Dashboard",target:"_blank",rel:"noopener noreferrer",className:P("inline-flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground font-medium text-sm","hover:bg-primary/90 transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),children:[e.jsx("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})}),"前往 GitHub",e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]})]})}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:["关于 ",Nx]}),e.jsxs("div",{className:"space-y-2 text-xs sm:text-sm text-muted-foreground",children:[e.jsxs("p",{children:["版本: ",ud]}),e.jsx("p",{children:"麦麦(MaiBot)的现代化 Web 管理界面"})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"作者"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"MaiBot 核心"}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"Mai-with-u"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"WebUI"}),e.jsxs("p",{className:"text-xs sm:text-sm text-muted-foreground",children:["Mai-with-u ",e.jsx("a",{href:"https://github.com/DrSmoothl",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"@MotricSeven"})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"技术栈"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs sm:text-sm text-muted-foreground",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-foreground",children:"前端框架"}),e.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[e.jsx("li",{children:"React 19.2.0"}),e.jsx("li",{children:"TypeScript 5.7.2"}),e.jsx("li",{children:"Vite 6.0.7"}),e.jsx("li",{children:"TanStack Router 1.94.2"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-foreground",children:"UI 组件"}),e.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[e.jsx("li",{children:"shadcn/ui"}),e.jsx("li",{children:"Radix UI"}),e.jsx("li",{children:"Tailwind CSS 3.4.17"}),e.jsx("li",{children:"Lucide Icons"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-foreground",children:"后端"}),e.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[e.jsx("li",{children:"Python 3.12+"}),e.jsx("li",{children:"FastAPI"}),e.jsx("li",{children:"Uvicorn"}),e.jsx("li",{children:"WebSocket"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-foreground",children:"构建工具"}),e.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[e.jsx("li",{children:"Bun / npm"}),e.jsx("li",{children:"ESLint 9.17.0"}),e.jsx("li",{children:"PostCSS"})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"开源库感谢"}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mb-3",children:"本项目使用了以下优秀的开源库,感谢他们的贡献:"}),e.jsx(ts,{className:"h-[300px] sm:h-[400px]",children:e.jsxs("div",{className:"space-y-4 pr-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"UI 框架与组件"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"React",description:"用户界面构建库",license:"MIT"}),e.jsx(Et,{name:"shadcn/ui",description:"优雅的 React 组件库",license:"MIT"}),e.jsx(Et,{name:"Radix UI",description:"无样式的可访问组件库",license:"MIT"}),e.jsx(Et,{name:"Tailwind CSS",description:"实用优先的 CSS 框架",license:"MIT"}),e.jsx(Et,{name:"Lucide React",description:"精美的图标库",license:"ISC"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"路由与状态管理"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"TanStack Router",description:"类型安全的路由库",license:"MIT"}),e.jsx(Et,{name:"Zustand",description:"轻量级状态管理",license:"MIT"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"表单处理"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"React Hook Form",description:"高性能表单库",license:"MIT"}),e.jsx(Et,{name:"Zod",description:"TypeScript 优先的 schema 验证",license:"MIT"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"工具库"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"clsx",description:"条件 className 构建工具",license:"MIT"}),e.jsx(Et,{name:"tailwind-merge",description:"Tailwind 类名合并工具",license:"MIT"}),e.jsx(Et,{name:"class-variance-authority",description:"组件变体管理",license:"Apache-2.0"}),e.jsx(Et,{name:"date-fns",description:"现代化日期处理库",license:"MIT"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"动画效果"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"Framer Motion",description:"React 动画库",license:"MIT"}),e.jsx(Et,{name:"vaul",description:"抽屉组件动画",license:"MIT"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"后端框架"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"FastAPI",description:"现代化 Python Web 框架",license:"MIT"}),e.jsx(Et,{name:"Uvicorn",description:"ASGI 服务器",license:"BSD-3-Clause"}),e.jsx(Et,{name:"Pydantic",description:"数据验证库",license:"MIT"}),e.jsx(Et,{name:"python-multipart",description:"文件上传支持",license:"Apache-2.0"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"开发工具"}),e.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[e.jsx(Et,{name:"TypeScript",description:"JavaScript 的超集",license:"Apache-2.0"}),e.jsx(Et,{name:"Vite",description:"下一代前端构建工具",license:"MIT"}),e.jsx(Et,{name:"ESLint",description:"JavaScript 代码检查工具",license:"MIT"}),e.jsx(Et,{name:"PostCSS",description:"CSS 转换工具",license:"MIT"})]})]})]})})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"开源许可"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"rounded-lg bg-primary/5 border border-primary/20 p-3 sm:p-4",children:e.jsxs("div",{className:"flex items-start gap-2 sm:gap-3",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("div",{className:"rounded-md bg-primary/10 px-2 py-1",children:e.jsx("span",{className:"text-xs sm:text-sm font-bold text-primary",children:"GPLv3"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm sm:text-base font-semibold text-foreground mb-1",children:"MaiBot WebUI"}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"本项目采用 GNU General Public License v3.0 开源许可证。 您可以自由地使用、修改和分发本软件,但必须保持相同的开源许可。"})]})]})}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"本项目依赖的所有开源库均遵循各自的开源许可证(MIT、Apache-2.0、BSD 等)。 感谢所有开源贡献者的无私奉献。"})]})]})]})}function Et({name:a,description:l,license:r}){return e.jsxs("div",{className:"flex items-start justify-between gap-2 rounded-lg border bg-muted/30 p-2.5 sm:p-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-foreground truncate",children:a}),e.jsx("p",{className:"text-muted-foreground text-xs mt-0.5",children:l})]}),e.jsx("span",{className:"inline-flex items-center rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary flex-shrink-0",children:r})]})}function Im({value:a,current:l,onChange:r,label:c,description:d}){const m=l===a;return e.jsxs("button",{onClick:()=>r(a),className:P("relative rounded-lg border-2 p-3 sm:p-4 text-left transition-all","hover:border-primary/50 hover:bg-accent/50",m?"border-primary bg-accent":"border-border"),children:[m&&e.jsx("div",{className:"absolute top-2 right-2 sm:top-3 sm:right-3 h-2 w-2 rounded-full bg-primary"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm sm:text-base font-medium",children:c}),e.jsx("div",{className:"text-[10px] sm:text-xs text-muted-foreground",children:d})]}),e.jsxs("div",{className:"mt-2 sm:mt-3 flex gap-1",children:[a==="light"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-200"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-300"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-400"})]}),a==="dark"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-700"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-800"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-900"})]}),a==="system"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-200 to-slate-700"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-300 to-slate-800"}),e.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-400 to-slate-900"})]})]})]})}function Wa({value:a,current:l,onChange:r,label:c,colorClass:d}){const m=l===a;return e.jsxs("button",{onClick:()=>r(a),className:P("relative rounded-lg border-2 p-2 sm:p-3 text-left transition-all","hover:border-primary/50 hover:bg-accent/50",m?"border-primary bg-accent":"border-border"),children:[m&&e.jsx("div",{className:"absolute top-1.5 right-1.5 sm:top-2 sm:right-2 h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-primary"}),e.jsxs("div",{className:"flex flex-col items-center gap-1.5 sm:gap-2",children:[e.jsx("div",{className:P("h-8 w-8 sm:h-10 sm:w-10 rounded-full",d)}),e.jsx("div",{className:"text-[10px] sm:text-xs font-medium text-center",children:c})]})]})}const R2=Date.now()%1e6;class D2{grad3;p;perm;constructor(l=0){this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.p=[];for(let r=0;r<256;r++)this.p[r]=Math.floor(Math.random()*256);this.perm=[];for(let r=0;r<512;r++)this.perm[r]=this.p[r&255]}dot(l,r,c){return l[0]*r+l[1]*c}mix(l,r,c){return(1-c)*l+c*r}fade(l){return l*l*l*(l*(l*6-15)+10)}perlin2(l,r){const c=Math.floor(l)&255,d=Math.floor(r)&255;l-=Math.floor(l),r-=Math.floor(r);const m=this.fade(l),h=this.fade(r),f=this.perm[c]+d,p=this.perm[f],g=this.perm[f+1],N=this.perm[c+1]+d,j=this.perm[N],b=this.perm[N+1];return this.mix(this.mix(this.dot(this.grad3[p%12],l,r),this.dot(this.grad3[j%12],l-1,r),m),this.mix(this.dot(this.grad3[g%12],l,r-1),this.dot(this.grad3[b%12],l-1,r-1),m),h)}}function Pg(){const a=u.useRef(null),l=u.useRef(null),r=u.useRef(void 0),[c]=u.useState(()=>new D2(R2)),d=u.useRef({mouse:{x:-10,y:0,lx:0,ly:0,sx:0,sy:0,v:0,vs:0,a:0,set:!1},lines:[],paths:[],noise:c,bounding:null});return u.useEffect(()=>{const m=l.current,h=a.current;if(!m||!h)return;const f=d.current;f.noise=c;const p=()=>{const M=m.getBoundingClientRect();f.bounding=M,h.style.width=`${M.width}px`,h.style.height=`${M.height}px`},g=()=>{if(!f.bounding)return;const{width:M,height:S}=f.bounding;f.lines=[],f.paths.forEach(me=>me.remove()),f.paths=[];const F=10,E=32,C=M+200,R=S+30,H=Math.ceil(C/F),O=Math.ceil(R/E),X=(M-F*H)/2,L=(S-E*O)/2;for(let me=0;me<=H;me++){const Ne=[];for(let re=0;re<=O;re++){const ge={x:X+F*me,y:L+E*re,wave:{x:0,y:0},cursor:{x:0,y:0,vx:0,vy:0}};Ne.push(ge)}const je=document.createElementNS("http://www.w3.org/2000/svg","path");h.appendChild(je),f.paths.push(je),f.lines.push(Ne)}},N=M=>{const{lines:S,mouse:F,noise:E}=f;S.forEach(C=>{C.forEach(R=>{const H=E.perlin2((R.x+M*.0125)*.002,(R.y+M*.005)*.0015)*12;R.wave.x=Math.cos(H)*32,R.wave.y=Math.sin(H)*16;const O=R.x-F.sx,X=R.y-F.sy,L=Math.hypot(O,X),me=Math.max(175,F.vs);if(L{const F={x:M.x+M.wave.x+(S?M.cursor.x:0),y:M.y+M.wave.y+(S?M.cursor.y:0)};return F.x=Math.round(F.x*10)/10,F.y=Math.round(F.y*10)/10,F},b=()=>{const{lines:M,paths:S}=f;M.forEach((F,E)=>{let C=j(F[0],!1),R=`M ${C.x} ${C.y}`;F.forEach((H,O)=>{const X=O===F.length-1;C=j(H,!X),R+=`L ${C.x} ${C.y}`}),S[E].setAttribute("d",R)})},y=M=>{const{mouse:S}=f;S.sx+=(S.x-S.sx)*.1,S.sy+=(S.y-S.sy)*.1;const F=S.x-S.lx,E=S.y-S.ly,C=Math.hypot(F,E);S.v=C,S.vs+=(C-S.vs)*.1,S.vs=Math.min(100,S.vs),S.lx=S.x,S.ly=S.y,S.a=Math.atan2(E,F),m&&(m.style.setProperty("--x",`${S.sx}px`),m.style.setProperty("--y",`${S.sy}px`)),N(M),b(),r.current=requestAnimationFrame(y)},w=M=>{if(!f.bounding)return;const{mouse:S}=f;S.x=M.pageX-f.bounding.left,S.y=M.pageY-f.bounding.top+window.scrollY,S.set||(S.sx=S.x,S.sy=S.y,S.lx=S.x,S.ly=S.y,S.set=!0)},z=()=>{p(),g()};return p(),g(),window.addEventListener("resize",z),window.addEventListener("mousemove",w),r.current=requestAnimationFrame(y),()=>{window.removeEventListener("resize",z),window.removeEventListener("mousemove",w),r.current&&cancelAnimationFrame(r.current)}},[c]),e.jsxs("div",{ref:l,className:"waves-background",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",pointerEvents:"none"},children:[e.jsx("div",{className:"waves-cursor",style:{position:"absolute",top:0,left:0,width:"0.5rem",height:"0.5rem",background:"hsl(var(--primary) / 0.3)",borderRadius:"50%",transform:"translate3d(calc(var(--x, -0.5rem) - 50%), calc(var(--y, 50%) - 50%), 0)",willChange:"transform",pointerEvents:"none"}}),e.jsx("svg",{ref:a,style:{display:"block",width:"100%",height:"100%"},children:e.jsx("style",{children:` path { fill: none; stroke: hsl(var(--primary) / 0.20); stroke-width: 1px; } - `})})]})}function O2(){const[a,l]=u.useState(""),[r,c]=u.useState(!1),[d,m]=u.useState(""),[h,f]=u.useState(!0),p=ha(),{enableWavesBackground:g,setEnableWavesBackground:N}=qv(),{theme:j,setTheme:b}=vx();u.useEffect(()=>{(async()=>{try{await dc()&&p({to:"/"})}catch{}finally{f(!1)}})()},[p]);const w=j==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":j,z=()=>{b(w==="dark"?"light":"dark")},M=async S=>{if(S.preventDefault(),m(""),!a.trim()){m("请输入 Access Token");return}c(!0),console.log("开始验证 token...");try{const F=await fetch("/api/webui/auth/verify",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:a.trim()})});console.log("Token 验证响应状态:",F.status);const E=await F.json();if(console.log("Token 验证响应数据:",E),F.ok&&E.valid){console.log("Token 验证成功,准备跳转..."),console.log("is_first_setup:",E.is_first_setup),await new Promise(R=>setTimeout(R,100));const C=await dc();console.log("跳转前认证状态检查:",C),E.is_first_setup?(console.log("跳转到首次配置页面"),p({to:"/setup"})):(console.log("跳转到首页"),p({to:"/"}))}else console.error("Token 验证失败:",E.message),m(E.message||"Token 验证失败,请检查后重试")}catch(F){console.error("Token 验证错误:",F),m("连接服务器失败,请检查网络连接")}finally{c(!1)}};return h?e.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background p-4",children:[g&&e.jsx(Pg,{}),e.jsx("div",{className:"text-muted-foreground",children:"正在检查登录状态..."})]}):e.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background p-4",children:[g&&e.jsx(Pg,{}),e.jsxs(Te,{className:"relative z-10 w-full max-w-md shadow-2xl backdrop-blur-xl bg-card/80 border-border/50",children:[e.jsx("button",{onClick:z,className:"absolute right-4 top-4 rounded-lg p-2 hover:bg-accent transition-colors z-10 text-foreground",title:w==="dark"?"切换到浅色模式":"切换到深色模式",children:w==="dark"?e.jsx(ix,{className:"h-5 w-5",strokeWidth:2.5,fill:"none"}):e.jsx(tc,{className:"h-5 w-5",strokeWidth:2.5,fill:"none"})}),e.jsxs(Oe,{className:"space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-2xl bg-primary/10",children:e.jsx(Jm,{className:"h-8 w-8 text-primary",strokeWidth:2,fill:"none"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ue,{className:"text-2xl font-bold",children:"欢迎使用 MaiBot"}),e.jsx(Ns,{className:"text-base",children:"请输入您的 Access Token 以继续访问系统"})]})]}),e.jsx(ze,{children:e.jsxs("form",{onSubmit:M,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"token",className:"text-sm font-medium",children:"Access Token"}),e.jsxs("div",{className:"relative",children:[e.jsx(cx,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",strokeWidth:2,fill:"none"}),e.jsx(ne,{id:"token",type:"password",placeholder:"请输入您的 Access Token",value:a,onChange:S=>l(S.target.value),className:P("pl-10",d&&"border-red-500 focus-visible:ring-red-500"),disabled:r,autoFocus:!0,autoComplete:"off"})]})]}),d&&e.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-red-50 p-3 text-sm text-red-600 dark:bg-red-950/50 dark:text-red-400",children:[e.jsx(Ut,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2,fill:"none"}),e.jsx("span",{children:d})]}),e.jsx(_,{type:"submit",className:"w-full",disabled:r,children:r?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),"验证中..."]}):"验证并进入"}),e.jsxs(Qs,{children:[e.jsx(dd,{asChild:!0,children:e.jsxs("button",{className:"w-full text-center text-sm text-primary hover:text-primary/80 transition-colors underline-offset-4 hover:underline flex items-center justify-center gap-1",children:[e.jsx(ox,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"我没有 Token,我该去哪里获得 Token?"]})}),e.jsxs(Hs,{className:"sm:max-w-md",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Jm,{className:"h-5 w-5 text-primary",strokeWidth:2,fill:"none"}),"如何获取 Access Token"]}),e.jsx(at,{children:"Access Token 是访问 MaiBot WebUI 的唯一凭证,请按以下方式获取"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(R1,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("h4",{className:"font-semibold text-sm",children:"方式一:查看启动日志"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"在 MaiBot 启动时,控制台会显示 WebUI Access Token。"}),e.jsxs("div",{className:"rounded bg-background p-2 font-mono text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"🔑 WebUI Access Token: abc123..."}),e.jsx("p",{className:"text-muted-foreground",children:"💡 请使用此 Token 登录 WebUI"})]})]})]})}),e.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Ua,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("h4",{className:"font-semibold text-sm",children:"方式二:查看配置文件"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Token 保存在项目根目录的配置文件中:"}),e.jsx("div",{className:"rounded bg-background p-2 font-mono text-xs break-all",children:e.jsx("code",{className:"text-primary",children:"data/webui.json"})}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["打开此文件,复制 ",e.jsx("code",{className:"px-1 py-0.5 bg-background rounded",children:"access_token"})," 字段的值"]})]})]})}),e.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Ut,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),e.jsxs("div",{className:"text-sm text-yellow-800 dark:text-yellow-300 space-y-1",children:[e.jsx("p",{className:"font-semibold",children:"安全提示"}),e.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[e.jsx("li",{children:"请妥善保管您的 Token,不要泄露给他人"}),e.jsx("li",{children:"如需重置 Token,请在登录后前往系统设置"})]})]})]})})]})]})]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs("button",{className:"w-full text-center text-sm text-muted-foreground hover:text-foreground transition-colors underline-offset-4 hover:underline flex items-center justify-center gap-1",children:[e.jsx(sl,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"我觉得这个界面很卡怎么办?"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsxs(ps,{className:"flex items-center gap-2",children:[e.jsx(sl,{className:"h-5 w-5 text-primary",strokeWidth:2,fill:"none"}),"关闭背景动画"]}),e.jsx(gs,{children:"背景动画可能会在低性能设备上造成卡顿。关闭动画可以显著提升界面流畅度。"})]}),e.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭动画后,背景将变为纯色,但不影响任何功能的使用。您可以随时在系统设置中重新开启动画。"})}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>N(!1),children:"关闭动画"})]})]})]})]})})]}),e.jsx("div",{className:"absolute bottom-4 left-0 right-0 text-center text-xs text-muted-foreground",children:e.jsx("p",{children:j2})})]})}const pt=u.forwardRef(({className:a,autoResize:l=!0,minHeight:r=60,maxHeight:c,value:d,onChange:m,...h},f)=>{const p=u.useRef(null),[g,N]=u.useState(!1);u.useImperativeHandle(f,()=>p.current),u.useEffect(()=>{if(a){const y=/\b(h-\d+|h-\[[\d.]+(?:px|rem|em)\]|min-h-\[[\d.]+(?:px|rem|em)\])\b/.test(a);N(y)}},[a]);const j=u.useCallback(()=>{const y=p.current;if(!y||!l||g)return;y.style.height="auto";const w=y.scrollHeight;let z=Math.max(w,r);c&&c>0&&(z=Math.min(z,c)),y.style.height=`${z}px`,c&&c>0&&w>c?y.style.overflowY="auto":y.style.overflowY="hidden"},[l,g,r,c]);u.useEffect(()=>{j()},[d,j]),u.useEffect(()=>{j()},[j]);const b=u.useCallback(y=>{m?.(y),requestAnimationFrame(()=>{j()})},[m,j]);return e.jsx("textarea",{className:P("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","custom-scrollbar",l&&!g&&"resize-none overflow-hidden",a),ref:p,value:d,onChange:b,style:{minHeight:l&&!g?`${r}px`:void 0},...h})});pt.displayName="Textarea";const la=u.forwardRef(({className:a,orientation:l="horizontal",decorative:r=!0,...c},d)=>e.jsx(Tj,{ref:d,decorative:r,orientation:l,className:P("shrink-0 bg-border",l==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",a),...c}));la.displayName=Tj.displayName;function L2({config:a,onChange:l}){const r=d=>{d.trim()&&!a.alias_names.includes(d.trim())&&l({...a,alias_names:[...a.alias_names,d.trim()]})},c=d=>{l({...a,alias_names:a.alias_names.filter((m,h)=>h!==d)})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"qq_account",children:"QQ账号 *"}),e.jsx(ne,{id:"qq_account",type:"number",placeholder:"请输入机器人的QQ账号",value:a.qq_account||"",onChange:d=>l({...a,qq_account:Number(d.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人登录使用的QQ账号"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"nickname",children:"昵称 *"}),e.jsx(ne,{id:"nickname",placeholder:"请输入机器人的昵称",value:a.nickname,onChange:d=>l({...a,nickname:d.target.value})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人的主要称呼名称"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{children:"别名"}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:a.alias_names.map((d,m)=>e.jsxs(Ce,{variant:"secondary",className:"gap-1",children:[d,e.jsx("button",{type:"button",onClick:()=>c(m),className:"ml-1 hover:text-destructive",children:e.jsx(Sa,{className:"h-3 w-3"})})]},m))}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{id:"alias_input",placeholder:"输入别名后按回车添加",onKeyPress:d=>{d.key==="Enter"&&(r(d.target.value),d.target.value="")}}),e.jsx(_,{type:"button",variant:"outline",onClick:()=>{const d=document.getElementById("alias_input");d&&(r(d.value),d.value="")},children:"添加"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人的其他称呼,可以添加多个"})]})]})}function U2({config:a,onChange:l}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"personality",children:"人格特征 *"}),e.jsx(pt,{id:"personality",placeholder:"描述机器人的人格特质和身份特征(建议120字以内)",value:a.personality,onChange:r=>l({...a,personality:r.target.value}),rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"例如:是一个女大学生,现在在读大二,会刷贴吧"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"reply_style",children:"表达风格 *"}),e.jsx(pt,{id:"reply_style",placeholder:"描述机器人说话的表达风格、表达习惯",value:a.reply_style,onChange:r=>l({...a,reply_style:r.target.value}),rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"例如:回复平淡一些,简短一些,说中文,参考贴吧、知乎和微博的回复风格"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"interest",children:"兴趣 *"}),e.jsx(pt,{id:"interest",placeholder:"描述机器人感兴趣的话题",value:a.interest,onChange:r=>l({...a,interest:r.target.value}),rows:2}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"会影响机器人对什么话题进行回复"})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"plan_style",children:"群聊说话规则 *"}),e.jsx(pt,{id:"plan_style",placeholder:"机器人在群聊中的行为风格和规则",value:a.plan_style,onChange:r=>l({...a,plan_style:r.target.value}),rows:4}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"定义机器人在群聊中如何行动,例如回复频率、条件等"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"private_plan_style",children:"私聊说话规则 *"}),e.jsx(pt,{id:"private_plan_style",placeholder:"机器人在私聊中的行为风格和规则",value:a.private_plan_style,onChange:r=>l({...a,private_plan_style:r.target.value}),rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"定义机器人在私聊中的行为方式"})]})]})}function $2({config:a,onChange:l}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{htmlFor:"emoji_chance",children:"表情包激活概率"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[(a.emoji_chance*100).toFixed(0),"%"]})]}),e.jsx(ne,{id:"emoji_chance",type:"range",min:"0",max:"1",step:"0.1",value:a.emoji_chance,onChange:r=>l({...a,emoji_chance:Number(r.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人发送表情包的概率"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"max_reg_num",children:"最大表情包数量"}),e.jsx(ne,{id:"max_reg_num",type:"number",min:"1",max:"200",value:a.max_reg_num,onChange:r=>l({...a,max_reg_num:Number(r.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人最多保存的表情包数量"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"do_replace",children:"达到最大数量时替换"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"开启后会删除旧表情包,关闭则不再收集新表情包"})]}),e.jsx(Ge,{id:"do_replace",checked:a.do_replace,onCheckedChange:r=>l({...a,do_replace:r})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"check_interval",children:"检查间隔(分钟)"}),e.jsx(ne,{id:"check_interval",type:"number",min:"1",max:"120",value:a.check_interval,onChange:r=>l({...a,check_interval:Number(r.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"检查表情包注册、破损、删除的时间间隔"})]}),e.jsx(la,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"steal_emoji",children:"偷取表情包"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人将一些表情包据为己有"})]}),e.jsx(Ge,{id:"steal_emoji",checked:a.steal_emoji,onCheckedChange:r=>l({...a,steal_emoji:r})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"content_filtration",children:"启用表情包过滤"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"只保存符合要求的表情包"})]}),e.jsx(Ge,{id:"content_filtration",checked:a.content_filtration,onCheckedChange:r=>l({...a,content_filtration:r})})]}),a.content_filtration&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"filtration_prompt",children:"过滤要求"}),e.jsx(ne,{id:"filtration_prompt",placeholder:"例如:符合公序良俗",value:a.filtration_prompt,onChange:r=>l({...a,filtration_prompt:r.target.value})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"描述表情包应该符合的要求"})]})]})}function B2({config:a,onChange:l}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"enable_tool",children:"启用工具系统"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人使用各种工具增强功能"})]}),e.jsx(Ge,{id:"enable_tool",checked:a.enable_tool,onCheckedChange:r=>l({...a,enable_tool:r})})]}),e.jsx(la,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"all_global",children:"启用全局黑话模式"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人学习和使用群组黑话"})]}),e.jsx(Ge,{id:"all_global",checked:a.all_global,onCheckedChange:r=>l({...a,all_global:r})})]})]})}function I2({config:a,onChange:l}){const[r,c]=u.useState(!1);return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"rounded-lg bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5",children:e.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsxs("div",{className:"flex-1 text-sm",children:[e.jsx("p",{className:"font-medium text-blue-900 dark:text-blue-100 mb-1",children:"关于硅基流动 (SiliconFlow)"}),e.jsx("p",{className:"text-blue-700 dark:text-blue-300 mb-2",children:"硅基流动提供了完整的模型覆盖,包括 DeepSeek V3、Qwen、视觉模型、语音识别和嵌入模型。 只需一个 API Key 即可使用麦麦的所有功能!"}),e.jsxs("a",{href:"https://cloud.siliconflow.cn",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:underline font-medium",children:["前往硅基流动获取 API Key",e.jsx(Io,{className:"h-3 w-3"})]})]})]})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"siliconflow_api_key",children:"SiliconFlow API Key *"}),e.jsxs("div",{className:"relative",children:[e.jsx(ne,{id:"siliconflow_api_key",type:r?"text":"password",placeholder:"sk-...",value:a.api_key,onChange:d=>l({api_key:d.target.value}),className:"font-mono pr-10"}),e.jsx(_,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 hover:bg-transparent",onClick:()=>c(!r),children:r?e.jsx(ic,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ua,{className:"h-4 w-4 text-muted-foreground"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"请输入您的硅基流动 API 密钥。获取后,麦麦将自动配置所有必需的模型。"})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-4 text-sm space-y-2",children:[e.jsx("p",{className:"font-medium",children:"将自动配置以下模型:"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-muted-foreground ml-2",children:[e.jsx("li",{children:"DeepSeek V3 - 主要对话和工具模型"}),e.jsx("li",{children:"Qwen3 30B - 高频小任务和工具调用"}),e.jsx("li",{children:"Qwen3 VL 30B - 图像识别"}),e.jsx("li",{children:"SenseVoice - 语音识别"}),e.jsx("li",{children:"BGE-M3 - 文本嵌入"}),e.jsx("li",{children:"知识库相关模型 (LPMM)"})]})]}),e.jsx("div",{className:"rounded-lg border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-950/30 p-4",children:e.jsxs("p",{className:"text-sm text-amber-900 dark:text-amber-100",children:[e.jsx("span",{className:"font-medium",children:"💡 提示:"}),'完成向导后,您可以在"系统设置 → 模型配置"中添加更多 API 提供商和模型。']})})]})}async function P2(){const a=await ke("/api/webui/config/bot",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取Bot配置失败");const r=(await a.json()).config.bot||{};return{qq_account:r.qq_account||0,nickname:r.nickname||"",alias_names:r.alias_names||[]}}async function F2(){const a=await ke("/api/webui/config/bot",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取人格配置失败");const r=(await a.json()).config.personality||{};return{personality:r.personality||"",reply_style:r.reply_style||"",interest:r.interest||"",plan_style:r.plan_style||"",private_plan_style:r.private_plan_style||""}}async function H2(){const a=await ke("/api/webui/config/bot",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取表情包配置失败");const r=(await a.json()).config.emoji||{};return{emoji_chance:r.emoji_chance??.4,max_reg_num:r.max_reg_num??40,do_replace:r.do_replace??!0,check_interval:r.check_interval??10,steal_emoji:r.steal_emoji??!0,content_filtration:r.content_filtration??!1,filtration_prompt:r.filtration_prompt||""}}async function q2(){const a=await ke("/api/webui/config/bot",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取其他配置失败");const r=(await a.json()).config,c=r.tool||{},d=r.expression||{};return{enable_tool:c.enable_tool??!0,all_global:d.all_global_jargon??!0}}async function V2(){const a=await ke("/api/webui/config/model",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取模型配置失败");return{api_key:((await a.json()).config.api_providers||[]).find(m=>m.name==="SiliconFlow")?.api_key||""}}async function G2(a){const l=await ke("/api/webui/config/bot/section/bot",{method:"POST",headers:Zs(),body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"保存Bot基础配置失败")}return await l.json()}async function K2(a){const l=await ke("/api/webui/config/bot/section/personality",{method:"POST",headers:Zs(),body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"保存人格配置失败")}return await l.json()}async function Q2(a){const l=await ke("/api/webui/config/bot/section/emoji",{method:"POST",headers:Zs(),body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"保存表情包配置失败")}return await l.json()}async function Y2(a){const l=[];l.push(ke("/api/webui/config/bot/section/tool",{method:"POST",headers:Zs(),body:JSON.stringify({enable_tool:a.enable_tool})})),l.push(ke("/api/webui/config/bot/section/expression",{method:"POST",headers:Zs(),body:JSON.stringify({all_global_jargon:a.all_global})}));const r=await Promise.all(l);for(const c of r)if(!c.ok){const d=await c.json();throw new Error(d.detail||"保存其他配置失败")}return{success:!0}}async function J2(a){const l=await ke("/api/webui/config/model",{method:"GET",headers:Zs()});if(!l.ok)throw new Error("读取模型配置失败");const c=(await l.json()).config,d=c.api_providers||[],m=d.findIndex(p=>p.name==="SiliconFlow");m>=0?d[m]={...d[m],api_key:a.api_key}:d.push({name:"SiliconFlow",base_url:"https://api.siliconflow.cn/v1",api_key:a.api_key,client_type:"openai",max_retry:3,timeout:120,retry_interval:5});const h={...c,api_providers:d},f=await ke("/api/webui/config/model",{method:"POST",headers:Zs(),body:JSON.stringify(h)});if(!f.ok){const p=await f.json();throw new Error(p.detail||"保存模型配置失败")}return await f.json()}async function Fg(){const a=await ke("/api/webui/setup/complete",{method:"POST"});if(!a.ok){const l=await a.json();throw new Error(l.message||"标记配置完成失败")}return await a.json()}function X2(){return e.jsx(lr,{children:e.jsx(Z2,{})})}function Z2(){const a=ha(),{toast:l}=nt(),{triggerRestart:r}=Tn(),[c,d]=u.useState(0),[m,h]=u.useState(!1),[f,p]=u.useState(!1),[g,N]=u.useState(!0),[j,b]=u.useState({qq_account:0,nickname:"",alias_names:[]}),[y,w]=u.useState({personality:"是一个女大学生,现在在读大二,会刷贴吧。",reply_style:"请回复的平淡一些,简短一些,说中文,不要刻意突出自身学科背景。可以参考贴吧,知乎和微博的回复风格。",interest:"对技术相关话题,游戏和动漫相关话题感兴趣,也对日常话题感兴趣,不喜欢太过沉重严肃的话题",plan_style:`1.思考**所有**的可用的action中的**每个动作**是否符合当下条件,如果动作使用条件符合聊天内容就使用 + `})})]})}function O2(){const[a,l]=u.useState(""),[r,c]=u.useState(!1),[d,m]=u.useState(""),[h,f]=u.useState(!0),p=ha(),{enableWavesBackground:g,setEnableWavesBackground:N}=qv(),{theme:j,setTheme:b}=vx();u.useEffect(()=>{(async()=>{try{await dc()&&p({to:"/"})}catch{}finally{f(!1)}})()},[p]);const w=j==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":j,z=()=>{b(w==="dark"?"light":"dark")},M=async S=>{if(S.preventDefault(),m(""),!a.trim()){m("请输入 Access Token");return}c(!0),console.log("开始验证 token...");try{const F=await fetch("/api/webui/auth/verify",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:a.trim()})});console.log("Token 验证响应状态:",F.status);const E=await F.json();if(console.log("Token 验证响应数据:",E),F.ok&&E.valid){console.log("Token 验证成功,准备跳转..."),console.log("is_first_setup:",E.is_first_setup),await new Promise(R=>setTimeout(R,100));const C=await dc();console.log("跳转前认证状态检查:",C),E.is_first_setup?(console.log("跳转到首次配置页面"),p({to:"/setup"})):(console.log("跳转到首页"),p({to:"/"}))}else console.error("Token 验证失败:",E.message),m(E.message||"Token 验证失败,请检查后重试")}catch(F){console.error("Token 验证错误:",F),m("连接服务器失败,请检查网络连接")}finally{c(!1)}};return h?e.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background p-4",children:[g&&e.jsx(Pg,{}),e.jsx("div",{className:"text-muted-foreground",children:"正在检查登录状态..."})]}):e.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background p-4",children:[g&&e.jsx(Pg,{}),e.jsxs(Te,{className:"relative z-10 w-full max-w-md shadow-2xl backdrop-blur-xl bg-card/80 border-border/50",children:[e.jsx("button",{onClick:z,className:"absolute right-4 top-4 rounded-lg p-2 hover:bg-accent transition-colors z-10 text-foreground",title:w==="dark"?"切换到浅色模式":"切换到深色模式",children:w==="dark"?e.jsx(ix,{className:"h-5 w-5",strokeWidth:2.5,fill:"none"}):e.jsx(tc,{className:"h-5 w-5",strokeWidth:2.5,fill:"none"})}),e.jsxs(Oe,{className:"space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-2xl bg-primary/10",children:e.jsx(Jm,{className:"h-8 w-8 text-primary",strokeWidth:2,fill:"none"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ue,{className:"text-2xl font-bold",children:"欢迎使用 MaiBot"}),e.jsx(Ns,{className:"text-base",children:"请输入您的 Access Token 以继续访问系统"})]})]}),e.jsx(ze,{children:e.jsxs("form",{onSubmit:M,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"token",className:"text-sm font-medium",children:"Access Token"}),e.jsxs("div",{className:"relative",children:[e.jsx(cx,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",strokeWidth:2,fill:"none"}),e.jsx(ae,{id:"token",type:"password",placeholder:"请输入您的 Access Token",value:a,onChange:S=>l(S.target.value),className:P("pl-10",d&&"border-red-500 focus-visible:ring-red-500"),disabled:r,autoFocus:!0,autoComplete:"off"})]})]}),d&&e.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-red-50 p-3 text-sm text-red-600 dark:bg-red-950/50 dark:text-red-400",children:[e.jsx(Ut,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2,fill:"none"}),e.jsx("span",{children:d})]}),e.jsx(_,{type:"submit",className:"w-full",disabled:r,children:r?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),"验证中..."]}):"验证并进入"}),e.jsxs(Qs,{children:[e.jsx(dd,{asChild:!0,children:e.jsxs("button",{className:"w-full text-center text-sm text-primary hover:text-primary/80 transition-colors underline-offset-4 hover:underline flex items-center justify-center gap-1",children:[e.jsx(ox,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"我没有 Token,我该去哪里获得 Token?"]})}),e.jsxs(Hs,{className:"sm:max-w-md",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Jm,{className:"h-5 w-5 text-primary",strokeWidth:2,fill:"none"}),"如何获取 Access Token"]}),e.jsx(at,{children:"Access Token 是访问 MaiBot WebUI 的唯一凭证,请按以下方式获取"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(R_,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("h4",{className:"font-semibold text-sm",children:"方式一:查看启动日志"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"在 MaiBot 启动时,控制台会显示 WebUI Access Token。"}),e.jsxs("div",{className:"rounded bg-background p-2 font-mono text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"🔑 WebUI Access Token: abc123..."}),e.jsx("p",{className:"text-muted-foreground",children:"💡 请使用此 Token 登录 WebUI"})]})]})]})}),e.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Ua,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("h4",{className:"font-semibold text-sm",children:"方式二:查看配置文件"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Token 保存在项目根目录的配置文件中:"}),e.jsx("div",{className:"rounded bg-background p-2 font-mono text-xs break-all",children:e.jsx("code",{className:"text-primary",children:"data/webui.json"})}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["打开此文件,复制 ",e.jsx("code",{className:"px-1 py-0.5 bg-background rounded",children:"access_token"})," 字段的值"]})]})]})}),e.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Ut,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),e.jsxs("div",{className:"text-sm text-yellow-800 dark:text-yellow-300 space-y-1",children:[e.jsx("p",{className:"font-semibold",children:"安全提示"}),e.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[e.jsx("li",{children:"请妥善保管您的 Token,不要泄露给他人"}),e.jsx("li",{children:"如需重置 Token,请在登录后前往系统设置"})]})]})]})})]})]})]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs("button",{className:"w-full text-center text-sm text-muted-foreground hover:text-foreground transition-colors underline-offset-4 hover:underline flex items-center justify-center gap-1",children:[e.jsx(sl,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"我觉得这个界面很卡怎么办?"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsxs(ps,{className:"flex items-center gap-2",children:[e.jsx(sl,{className:"h-5 w-5 text-primary",strokeWidth:2,fill:"none"}),"关闭背景动画"]}),e.jsx(gs,{children:"背景动画可能会在低性能设备上造成卡顿。关闭动画可以显著提升界面流畅度。"})]}),e.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭动画后,背景将变为纯色,但不影响任何功能的使用。您可以随时在系统设置中重新开启动画。"})}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>N(!1),children:"关闭动画"})]})]})]})]})})]}),e.jsx("div",{className:"absolute bottom-4 left-0 right-0 text-center text-xs text-muted-foreground",children:e.jsx("p",{children:j2})})]})}const pt=u.forwardRef(({className:a,autoResize:l=!0,minHeight:r=60,maxHeight:c,value:d,onChange:m,...h},f)=>{const p=u.useRef(null),[g,N]=u.useState(!1);u.useImperativeHandle(f,()=>p.current),u.useEffect(()=>{if(a){const y=/\b(h-\d+|h-\[[\d.]+(?:px|rem|em)\]|min-h-\[[\d.]+(?:px|rem|em)\])\b/.test(a);N(y)}},[a]);const j=u.useCallback(()=>{const y=p.current;if(!y||!l||g)return;y.style.height="auto";const w=y.scrollHeight;let z=Math.max(w,r);c&&c>0&&(z=Math.min(z,c)),y.style.height=`${z}px`,c&&c>0&&w>c?y.style.overflowY="auto":y.style.overflowY="hidden"},[l,g,r,c]);u.useEffect(()=>{j()},[d,j]),u.useEffect(()=>{j()},[j]);const b=u.useCallback(y=>{m?.(y),requestAnimationFrame(()=>{j()})},[m,j]);return e.jsx("textarea",{className:P("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","custom-scrollbar",l&&!g&&"resize-none overflow-hidden",a),ref:p,value:d,onChange:b,style:{minHeight:l&&!g?`${r}px`:void 0},...h})});pt.displayName="Textarea";const la=u.forwardRef(({className:a,orientation:l="horizontal",decorative:r=!0,...c},d)=>e.jsx(Tj,{ref:d,decorative:r,orientation:l,className:P("shrink-0 bg-border",l==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",a),...c}));la.displayName=Tj.displayName;function L2({config:a,onChange:l}){const r=d=>{d.trim()&&!a.alias_names.includes(d.trim())&&l({...a,alias_names:[...a.alias_names,d.trim()]})},c=d=>{l({...a,alias_names:a.alias_names.filter((m,h)=>h!==d)})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"qq_account",children:"QQ账号 *"}),e.jsx(ae,{id:"qq_account",type:"number",placeholder:"请输入机器人的QQ账号",value:a.qq_account||"",onChange:d=>l({...a,qq_account:Number(d.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人登录使用的QQ账号"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"nickname",children:"昵称 *"}),e.jsx(ae,{id:"nickname",placeholder:"请输入机器人的昵称",value:a.nickname,onChange:d=>l({...a,nickname:d.target.value})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人的主要称呼名称"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{children:"别名"}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:a.alias_names.map((d,m)=>e.jsxs(Ce,{variant:"secondary",className:"gap-1",children:[d,e.jsx("button",{type:"button",onClick:()=>c(m),className:"ml-1 hover:text-destructive",children:e.jsx(Sa,{className:"h-3 w-3"})})]},m))}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{id:"alias_input",placeholder:"输入别名后按回车添加",onKeyPress:d=>{d.key==="Enter"&&(r(d.target.value),d.target.value="")}}),e.jsx(_,{type:"button",variant:"outline",onClick:()=>{const d=document.getElementById("alias_input");d&&(r(d.value),d.value="")},children:"添加"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人的其他称呼,可以添加多个"})]})]})}function U2({config:a,onChange:l}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"personality",children:"人格特征 *"}),e.jsx(pt,{id:"personality",placeholder:"描述机器人的人格特质和身份特征(建议120字以内)",value:a.personality,onChange:r=>l({...a,personality:r.target.value}),rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"例如:是一个女大学生,现在在读大二,会刷贴吧"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"reply_style",children:"表达风格 *"}),e.jsx(pt,{id:"reply_style",placeholder:"描述机器人说话的表达风格、表达习惯",value:a.reply_style,onChange:r=>l({...a,reply_style:r.target.value}),rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"例如:回复平淡一些,简短一些,说中文,参考贴吧、知乎和微博的回复风格"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"interest",children:"兴趣 *"}),e.jsx(pt,{id:"interest",placeholder:"描述机器人感兴趣的话题",value:a.interest,onChange:r=>l({...a,interest:r.target.value}),rows:2}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"会影响机器人对什么话题进行回复"})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"plan_style",children:"群聊说话规则 *"}),e.jsx(pt,{id:"plan_style",placeholder:"机器人在群聊中的行为风格和规则",value:a.plan_style,onChange:r=>l({...a,plan_style:r.target.value}),rows:4}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"定义机器人在群聊中如何行动,例如回复频率、条件等"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"private_plan_style",children:"私聊说话规则 *"}),e.jsx(pt,{id:"private_plan_style",placeholder:"机器人在私聊中的行为风格和规则",value:a.private_plan_style,onChange:r=>l({...a,private_plan_style:r.target.value}),rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"定义机器人在私聊中的行为方式"})]})]})}function $2({config:a,onChange:l}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{htmlFor:"emoji_chance",children:"表情包激活概率"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[(a.emoji_chance*100).toFixed(0),"%"]})]}),e.jsx(ae,{id:"emoji_chance",type:"range",min:"0",max:"1",step:"0.1",value:a.emoji_chance,onChange:r=>l({...a,emoji_chance:Number(r.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人发送表情包的概率"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"max_reg_num",children:"最大表情包数量"}),e.jsx(ae,{id:"max_reg_num",type:"number",min:"1",max:"200",value:a.max_reg_num,onChange:r=>l({...a,max_reg_num:Number(r.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人最多保存的表情包数量"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"do_replace",children:"达到最大数量时替换"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"开启后会删除旧表情包,关闭则不再收集新表情包"})]}),e.jsx(qe,{id:"do_replace",checked:a.do_replace,onCheckedChange:r=>l({...a,do_replace:r})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"check_interval",children:"检查间隔(分钟)"}),e.jsx(ae,{id:"check_interval",type:"number",min:"1",max:"120",value:a.check_interval,onChange:r=>l({...a,check_interval:Number(r.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"检查表情包注册、破损、删除的时间间隔"})]}),e.jsx(la,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"steal_emoji",children:"偷取表情包"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人将一些表情包据为己有"})]}),e.jsx(qe,{id:"steal_emoji",checked:a.steal_emoji,onCheckedChange:r=>l({...a,steal_emoji:r})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"content_filtration",children:"启用表情包过滤"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"只保存符合要求的表情包"})]}),e.jsx(qe,{id:"content_filtration",checked:a.content_filtration,onCheckedChange:r=>l({...a,content_filtration:r})})]}),a.content_filtration&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"filtration_prompt",children:"过滤要求"}),e.jsx(ae,{id:"filtration_prompt",placeholder:"例如:符合公序良俗",value:a.filtration_prompt,onChange:r=>l({...a,filtration_prompt:r.target.value})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"描述表情包应该符合的要求"})]})]})}function I2({config:a,onChange:l}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"enable_tool",children:"启用工具系统"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人使用各种工具增强功能"})]}),e.jsx(qe,{id:"enable_tool",checked:a.enable_tool,onCheckedChange:r=>l({...a,enable_tool:r})})]}),e.jsx(la,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"all_global",children:"启用全局黑话模式"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人学习和使用群组黑话"})]}),e.jsx(qe,{id:"all_global",checked:a.all_global,onCheckedChange:r=>l({...a,all_global:r})})]})]})}function B2({config:a,onChange:l}){const[r,c]=u.useState(!1);return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"rounded-lg bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5",children:e.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsxs("div",{className:"flex-1 text-sm",children:[e.jsx("p",{className:"font-medium text-blue-900 dark:text-blue-100 mb-1",children:"关于硅基流动 (SiliconFlow)"}),e.jsx("p",{className:"text-blue-700 dark:text-blue-300 mb-2",children:"硅基流动提供了完整的模型覆盖,包括 DeepSeek V3、Qwen、视觉模型、语音识别和嵌入模型。 只需一个 API Key 即可使用麦麦的所有功能!"}),e.jsxs("a",{href:"https://cloud.siliconflow.cn",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:underline font-medium",children:["前往硅基流动获取 API Key",e.jsx(Bo,{className:"h-3 w-3"})]})]})]})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{htmlFor:"siliconflow_api_key",children:"SiliconFlow API Key *"}),e.jsxs("div",{className:"relative",children:[e.jsx(ae,{id:"siliconflow_api_key",type:r?"text":"password",placeholder:"sk-...",value:a.api_key,onChange:d=>l({api_key:d.target.value}),className:"font-mono pr-10"}),e.jsx(_,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 hover:bg-transparent",onClick:()=>c(!r),children:r?e.jsx(ic,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ua,{className:"h-4 w-4 text-muted-foreground"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"请输入您的硅基流动 API 密钥。获取后,麦麦将自动配置所有必需的模型。"})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-4 text-sm space-y-2",children:[e.jsx("p",{className:"font-medium",children:"将自动配置以下模型:"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-muted-foreground ml-2",children:[e.jsx("li",{children:"DeepSeek V3 - 主要对话和工具模型"}),e.jsx("li",{children:"Qwen3 30B - 高频小任务和工具调用"}),e.jsx("li",{children:"Qwen3 VL 30B - 图像识别"}),e.jsx("li",{children:"SenseVoice - 语音识别"}),e.jsx("li",{children:"BGE-M3 - 文本嵌入"}),e.jsx("li",{children:"知识库相关模型 (LPMM)"})]})]}),e.jsx("div",{className:"rounded-lg border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-950/30 p-4",children:e.jsxs("p",{className:"text-sm text-amber-900 dark:text-amber-100",children:[e.jsx("span",{className:"font-medium",children:"💡 提示:"}),'完成向导后,您可以在"系统设置 → 模型配置"中添加更多 API 提供商和模型。']})})]})}async function P2(){const a=await ke("/api/webui/config/bot",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取Bot配置失败");const r=(await a.json()).config.bot||{};return{qq_account:r.qq_account||0,nickname:r.nickname||"",alias_names:r.alias_names||[]}}async function F2(){const a=await ke("/api/webui/config/bot",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取人格配置失败");const r=(await a.json()).config.personality||{};return{personality:r.personality||"",reply_style:r.reply_style||"",interest:r.interest||"",plan_style:r.plan_style||"",private_plan_style:r.private_plan_style||""}}async function H2(){const a=await ke("/api/webui/config/bot",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取表情包配置失败");const r=(await a.json()).config.emoji||{};return{emoji_chance:r.emoji_chance??.4,max_reg_num:r.max_reg_num??40,do_replace:r.do_replace??!0,check_interval:r.check_interval??10,steal_emoji:r.steal_emoji??!0,content_filtration:r.content_filtration??!1,filtration_prompt:r.filtration_prompt||""}}async function q2(){const a=await ke("/api/webui/config/bot",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取其他配置失败");const r=(await a.json()).config,c=r.tool||{},d=r.expression||{};return{enable_tool:c.enable_tool??!0,all_global:d.all_global_jargon??!0}}async function V2(){const a=await ke("/api/webui/config/model",{method:"GET",headers:Zs()});if(!a.ok)throw new Error("读取模型配置失败");return{api_key:((await a.json()).config.api_providers||[]).find(m=>m.name==="SiliconFlow")?.api_key||""}}async function G2(a){const l=await ke("/api/webui/config/bot/section/bot",{method:"POST",headers:Zs(),body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"保存Bot基础配置失败")}return await l.json()}async function K2(a){const l=await ke("/api/webui/config/bot/section/personality",{method:"POST",headers:Zs(),body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"保存人格配置失败")}return await l.json()}async function Q2(a){const l=await ke("/api/webui/config/bot/section/emoji",{method:"POST",headers:Zs(),body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"保存表情包配置失败")}return await l.json()}async function Y2(a){const l=[];l.push(ke("/api/webui/config/bot/section/tool",{method:"POST",headers:Zs(),body:JSON.stringify({enable_tool:a.enable_tool})})),l.push(ke("/api/webui/config/bot/section/expression",{method:"POST",headers:Zs(),body:JSON.stringify({all_global_jargon:a.all_global})}));const r=await Promise.all(l);for(const c of r)if(!c.ok){const d=await c.json();throw new Error(d.detail||"保存其他配置失败")}return{success:!0}}async function J2(a){const l=await ke("/api/webui/config/model",{method:"GET",headers:Zs()});if(!l.ok)throw new Error("读取模型配置失败");const c=(await l.json()).config,d=c.api_providers||[],m=d.findIndex(p=>p.name==="SiliconFlow");m>=0?d[m]={...d[m],api_key:a.api_key}:d.push({name:"SiliconFlow",base_url:"https://api.siliconflow.cn/v1",api_key:a.api_key,client_type:"openai",max_retry:3,timeout:120,retry_interval:5});const h={...c,api_providers:d},f=await ke("/api/webui/config/model",{method:"POST",headers:Zs(),body:JSON.stringify(h)});if(!f.ok){const p=await f.json();throw new Error(p.detail||"保存模型配置失败")}return await f.json()}async function Fg(){const a=await ke("/api/webui/setup/complete",{method:"POST"});if(!a.ok){const l=await a.json();throw new Error(l.message||"标记配置完成失败")}return await a.json()}function X2(){return e.jsx(lr,{children:e.jsx(Z2,{})})}function Z2(){const a=ha(),{toast:l}=nt(),{triggerRestart:r}=Tn(),[c,d]=u.useState(0),[m,h]=u.useState(!1),[f,p]=u.useState(!1),[g,N]=u.useState(!0),[j,b]=u.useState({qq_account:0,nickname:"",alias_names:[]}),[y,w]=u.useState({personality:"是一个女大学生,现在在读大二,会刷贴吧。",reply_style:"请回复的平淡一些,简短一些,说中文,不要刻意突出自身学科背景。可以参考贴吧,知乎和微博的回复风格。",interest:"对技术相关话题,游戏和动漫相关话题感兴趣,也对日常话题感兴趣,不喜欢太过沉重严肃的话题",plan_style:`1.思考**所有**的可用的action中的**每个动作**是否符合当下条件,如果动作使用条件符合聊天内容就使用 2.如果相同的内容已经被执行,请不要重复执行 3.请控制你的发言频率,不要太过频繁的发言 4.如果有人对你感到厌烦,请减少回复 5.如果有人对你进行攻击,或者情绪激动,请你以合适的方法应对`,private_plan_style:`1.思考**所有**的可用的action中的**每个动作**是否符合当下条件,如果动作使用条件符合聊天内容就使用 2.如果相同的内容已经被执行,请不要重复执行 -3.某句话如果已经被回复过,不要重复回复`}),[z,M]=u.useState({emoji_chance:.4,max_reg_num:40,do_replace:!0,check_interval:10,steal_emoji:!0,content_filtration:!1,filtration_prompt:"符合公序良俗"}),[S,F]=u.useState({enable_tool:!0,all_global:!0}),[E,C]=u.useState({api_key:""}),R=[{id:"bot-basic",title:"Bot基础",description:"配置机器人的基本信息",icon:Yn},{id:"personality",title:"人格配置",description:"定义机器人的性格和说话风格",icon:Fl},{id:"emoji",title:"表情包",description:"配置表情包相关设置",icon:rd},{id:"other",title:"其他设置",description:"工具、情绪系统等配置",icon:Sn},{id:"siliconflow",title:"API配置",description:"配置硅基流动API密钥",icon:cx}],H=(c+1)/R.length*100;u.useEffect(()=>{(async()=>{try{N(!0);const[ge,pe,D,Q,B]=await Promise.all([P2(),F2(),H2(),q2(),V2()]);b(ge),w(pe),M(D),F(Q),C(B)}catch(ge){l({title:"加载配置失败",description:ge instanceof Error?ge.message:"无法加载现有配置,将使用默认值",variant:"destructive"})}finally{N(!1)}})()},[l]);const O=async()=>{p(!0);try{switch(c){case 0:await G2(j);break;case 1:await K2(y);break;case 2:await Q2(z);break;case 3:await Y2(S);break;case 4:await J2(E);break}return l({title:"保存成功",description:`${R[c].title}配置已保存`}),!0}catch(ce){return l({title:"保存失败",description:ce instanceof Error?ce.message:"未知错误",variant:"destructive"}),!1}finally{p(!1)}},X=async()=>{await O()&&c{c>0&&d(c-1)},me=async()=>{h(!0);try{if(!await O()){h(!1);return}await Fg(),l({title:"配置完成",description:"麦麦正在重启以应用新配置..."}),await r()}catch(ce){l({title:"配置失败",description:ce instanceof Error?ce.message:"未知错误",variant:"destructive"})}finally{h(!1)}},Ne=async()=>{try{await Fg(),a({to:"/"})}catch(ce){l({title:"跳过失败",description:ce instanceof Error?ce.message:"未知错误",variant:"destructive"})}},je=()=>{switch(c){case 0:return e.jsx(L2,{config:j,onChange:b});case 1:return e.jsx(U2,{config:y,onChange:w});case 2:return e.jsx($2,{config:z,onChange:M});case 3:return e.jsx(B2,{config:S,onChange:F});case 4:return e.jsx(I2,{config:E,onChange:C});default:return null}};return e.jsxs("div",{className:"relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-gradient-to-br from-primary/5 via-background to-secondary/5 p-4 md:p-6",children:[e.jsx(nr,{}),e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute left-1/4 top-1/4 h-64 w-64 md:h-96 md:w-96 rounded-full bg-primary/5 blur-3xl"}),e.jsx("div",{className:"absolute right-1/4 bottom-1/4 h-64 w-64 md:h-96 md:w-96 rounded-full bg-secondary/5 blur-3xl"})]}),g?e.jsxs("div",{className:"relative z-10 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center",children:e.jsx("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),e.jsx("p",{className:"text-lg font-medium",children:"加载配置中..."}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"正在读取现有配置"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative z-10 w-full max-w-4xl",children:[e.jsxs("div",{className:"mb-6 md:mb-8 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 md:h-16 md:w-16 items-center justify-center rounded-2xl bg-primary/10",children:e.jsx(D1,{className:"h-6 w-6 md:h-8 md:w-8 text-primary",strokeWidth:2,fill:"none"})}),e.jsx("h1",{className:"mb-2 text-2xl md:text-3xl font-bold",children:"首次配置向导"}),e.jsxs("p",{className:"text-sm md:text-base text-muted-foreground",children:["让我们一起完成 ",Nx," 的初始配置"]})]}),e.jsxs("div",{className:"mb-6 md:mb-8",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between text-xs md:text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:["步骤 ",c+1," / ",R.length]}),e.jsxs("span",{className:"font-medium text-primary",children:[Math.round(H),"%"]})]}),e.jsx(tr,{value:H,className:"h-2"})]}),e.jsx("div",{className:"mb-6 md:mb-8 flex justify-between",children:R.map((ce,ge)=>{const pe=ce.icon;return e.jsxs("div",{className:P("flex flex-1 flex-col items-center gap-1 md:gap-2",gea({to:"/"}),className:"gap-2 w-full sm:w-auto",children:[e.jsx(id,{className:"h-4 w-4"}),"返回首页"]}),e.jsxs(_,{size:"lg",variant:"outline",onClick:()=>window.history.back(),className:"gap-2 w-full sm:w-auto",children:[e.jsx($a,{className:"h-4 w-4"}),"返回上一页"]})]}),e.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"如果您认为这是一个错误,请联系系统管理员"})})]})})}const W2=Bs.memo(function({config:l,onChange:r}){const c=l.platforms||[],d=l.alias_names||[],m=()=>{r({...l,platforms:[...c,""]})},h=j=>{r({...l,platforms:c.filter((b,y)=>y!==j)})},f=(j,b)=>{const y=[...c];y[j]=b,r({...l,platforms:y})},p=()=>{r({...l,alias_names:[...d,""]})},g=j=>{r({...l,alias_names:d.filter((b,y)=>y!==j)})},N=(j,b)=>{const y=[...d];y[j]=b,r({...l,alias_names:y})};return e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"基本信息"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"platform",children:"平台"}),e.jsx(ne,{id:"platform",value:l.platform,onChange:j=>r({...l,platform:j.target.value}),placeholder:"qq"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"qq_account",children:"QQ账号"}),e.jsx(ne,{id:"qq_account",value:l.qq_account,onChange:j=>r({...l,qq_account:j.target.value}),placeholder:"123456789"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"nickname",children:"昵称"}),e.jsx(ne,{id:"nickname",value:l.nickname,onChange:j=>r({...l,nickname:j.target.value}),placeholder:"麦麦"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"别名"}),e.jsxs(_,{onClick:p,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加"]})]}),e.jsxs("div",{className:"space-y-2",children:[d.map((j,b)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{value:j,onChange:y=>N(b,y.target.value),placeholder:"小麦"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除别名 "',j||"(空)",'" 吗?此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>g(b),children:"删除"})]})]})]})]},b)),d.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无别名"})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"其他平台账号"}),e.jsxs(_,{onClick:m,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加"]})]}),e.jsxs("div",{className:"space-y-2",children:[c.map((j,b)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{value:j,onChange:y=>f(b,y.target.value),placeholder:"wx:114514"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除平台账号 "',j||"(空)",'" 吗?此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>h(b),children:"删除"})]})]})]})]},b)),c.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无其他平台账号"})]})]})]})]})})}),eS=Bs.memo(function({config:l,onChange:r}){const c=()=>{r({...l,states:[...l.states,""]})},d=h=>{r({...l,states:l.states.filter((f,p)=>p!==h)})},m=(h,f)=>{const p=[...l.states];p[h]=f,r({...l,states:p})};return e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"人格设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"personality",children:"人格特质"}),e.jsx(pt,{id:"personality",value:l.personality,onChange:h=>r({...l,personality:h.target.value}),placeholder:"描述人格特质和身份特征(建议120字以内)",rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"建议120字以内,描述人格特质和身份特征"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"多重人格"}),e.jsxs(_,{onClick:c,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加人格"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"可以定义多个不同的人格状态,麦麦会随机切换"}),e.jsx("div",{className:"space-y-2",children:l.states.map((h,f)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pt,{value:h,onChange:p=>m(f,p.target.value),placeholder:"描述一个人格状态",rows:2}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsx(gs,{children:"确定要删除这个人格状态吗?此操作无法撤销。"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>d(f),children:"删除"})]})]})]})]},f))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"state_probability",children:"替换为多重人格概率"}),e.jsx(ne,{id:"state_probability",type:"number",step:"0.1",min:"0",max:"1",value:l.state_probability,onChange:h=>r({...l,state_probability:parseFloat(h.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"每次构建人格时,用多重人格替换主人格的概率(0.0-1.0)"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"reply_style",children:"表达风格"}),e.jsx(pt,{id:"reply_style",value:l.reply_style,onChange:h=>r({...l,reply_style:h.target.value}),placeholder:"描述说话的表达风格和习惯",rows:3})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"plan_style",children:"说话规则与行为风格"}),e.jsx(pt,{id:"plan_style",value:l.plan_style,onChange:h=>r({...l,plan_style:h.target.value}),placeholder:"麦麦的说话规则和行为风格",rows:5})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"visual_style",children:"识图规则"}),e.jsx(pt,{id:"visual_style",value:l.visual_style,onChange:h=>r({...l,visual_style:h.target.value}),placeholder:"识图时的处理规则",rows:3})]})]})]})})}),cl=Ew,ol=Mw,tl=u.forwardRef(({className:a,align:l="center",sideOffset:r=4,...c},d)=>e.jsx(Tw,{children:e.jsx(Ej,{ref:d,align:l,sideOffset:r,className:P("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",a),...c})}));tl.displayName=Ej.displayName;const sS=Bs.memo(function({value:l,onChange:r}){const c=u.useMemo(()=>{const y=l.split("-");if(y.length===2){const[w,z]=y,[M,S]=w.split(":"),[F,E]=z.split(":");return{startHour:M?M.padStart(2,"0"):"00",startMinute:S?S.padStart(2,"0"):"00",endHour:F?F.padStart(2,"0"):"23",endMinute:E?E.padStart(2,"0"):"59"}}return{startHour:"00",startMinute:"00",endHour:"23",endMinute:"59"}},[l]),[d,m]=u.useState(c.startHour),[h,f]=u.useState(c.startMinute),[p,g]=u.useState(c.endHour),[N,j]=u.useState(c.endMinute);u.useEffect(()=>{m(c.startHour),f(c.startMinute),g(c.endHour),j(c.endMinute)},[c]);const b=(y,w,z,M)=>{const S=`${y}:${w}-${z}:${M}`;r(S)};return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",className:"w-full justify-start font-mono text-sm",children:[e.jsx(da,{className:"h-4 w-4 mr-2"}),l||"选择时间段"]})}),e.jsx(tl,{className:"w-72 sm:w-80",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-sm mb-3",children:"开始时间"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs",children:"小时"}),e.jsxs(Pe,{value:d,onValueChange:y=>{m(y),b(y,h,p,N)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:Array.from({length:24},(y,w)=>w).map(y=>e.jsx(W,{value:y.toString().padStart(2,"0"),children:y.toString().padStart(2,"0")},y))})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs",children:"分钟"}),e.jsxs(Pe,{value:h,onValueChange:y=>{f(y),b(d,y,p,N)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:Array.from({length:60},(y,w)=>w).map(y=>e.jsx(W,{value:y.toString().padStart(2,"0"),children:y.toString().padStart(2,"0")},y))})]})]})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-sm mb-3",children:"结束时间"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs",children:"小时"}),e.jsxs(Pe,{value:p,onValueChange:y=>{g(y),b(d,h,y,N)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:Array.from({length:24},(y,w)=>w).map(y=>e.jsx(W,{value:y.toString().padStart(2,"0"),children:y.toString().padStart(2,"0")},y))})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs",children:"分钟"}),e.jsxs(Pe,{value:N,onValueChange:y=>{j(y),b(d,h,p,y)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:Array.from({length:60},(y,w)=>w).map(y=>e.jsx(W,{value:y.toString().padStart(2,"0"),children:y.toString().padStart(2,"0")},y))})]})]})]})]})]})})]})}),tS=Bs.memo(function({rule:l}){const r=`{ target = "${l.target}", time = "${l.time}", value = ${l.value.toFixed(1)} }`;return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-80 sm:w-96",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:r}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})}),aS=Bs.memo(function({config:l,onChange:r}){const c=()=>{r({...l,talk_value_rules:[...l.talk_value_rules,{target:"",time:"00:00-23:59",value:1}]})},d=h=>{r({...l,talk_value_rules:l.talk_value_rules.filter((f,p)=>p!==h)})},m=(h,f,p)=>{const g=[...l.talk_value_rules];g[h]={...g[h],[f]:p},r({...l,talk_value_rules:g})};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"聊天设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"talk_value",children:"聊天频率(基础值)"}),e.jsx(ne,{id:"talk_value",type:"number",step:"0.1",min:"0",max:"1",value:l.talk_value,onChange:h=>r({...l,talk_value:parseFloat(h.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"越小越沉默,范围 0-1"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"think_mode",children:"思考模式"}),e.jsxs(Pe,{value:l.think_mode||"classic",onValueChange:h=>r({...l,think_mode:h}),children:[e.jsx(Be,{id:"think_mode",children:e.jsx(Fe,{placeholder:"选择思考模式"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"classic",children:"经典模式 - 浅度思考和回复"}),e.jsx(W,{value:"deep",children:"深度模式 - 进行深度思考和回复"}),e.jsx(W,{value:"dynamic",children:"动态模式 - 自动选择思考深度"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"控制麦麦的思考深度。经典模式回复快但简单;深度模式更深入但较慢;动态模式根据情况自动选择"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"mentioned_bot_reply",checked:l.mentioned_bot_reply,onCheckedChange:h=>r({...l,mentioned_bot_reply:h})}),e.jsx(T,{htmlFor:"mentioned_bot_reply",className:"cursor-pointer",children:"启用提及必回复"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_context_size",children:"上下文长度"}),e.jsx(ne,{id:"max_context_size",type:"number",min:"1",value:l.max_context_size,onChange:h=>r({...l,max_context_size:parseInt(h.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"planner_smooth",children:"规划器平滑"}),e.jsx(ne,{id:"planner_smooth",type:"number",step:"1",min:"0",value:l.planner_smooth,onChange:h=>r({...l,planner_smooth:parseFloat(h.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"增大数值会减小 planner 负荷,推荐 1-5,0 为关闭"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"plan_reply_log_max_per_chat",children:"每个聊天流最大日志数量"}),e.jsx(ne,{id:"plan_reply_log_max_per_chat",type:"number",step:"1",min:"100",value:l.plan_reply_log_max_per_chat??1024,onChange:h=>r({...l,plan_reply_log_max_per_chat:parseInt(h.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"每个聊天流保存的 Plan/Reply 日志最大数量,超过此数量时会自动删除最老的日志"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"llm_quote",checked:l.llm_quote??!1,onCheckedChange:h=>r({...l,llm_quote:h})}),e.jsx(T,{htmlFor:"llm_quote",className:"cursor-pointer",children:"启用 LLM 控制引用"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2 ml-10",children:"启用后,LLM 可以决定是否在回复时引用消息"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"enable_talk_value_rules",checked:l.enable_talk_value_rules,onCheckedChange:h=>r({...l,enable_talk_value_rules:h})}),e.jsx(T,{htmlFor:"enable_talk_value_rules",className:"cursor-pointer",children:"启用动态发言频率规则"})]})]})]}),l.enable_talk_value_rules&&e.jsxs("div",{className:"border-t pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold",children:"动态发言频率规则"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"按时段或聊天流ID调整发言频率,优先匹配具体聊天,再匹配全局规则"})]}),e.jsxs(_,{onClick:c,size:"sm",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加规则"]})]}),l.talk_value_rules&&l.talk_value_rules.length>0?e.jsx("div",{className:"space-y-4",children:l.talk_value_rules.map((h,f)=>e.jsxs("div",{className:"rounded-lg border p-4 bg-muted/50 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["规则 #",f+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(tS,{rule:h}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"sm",children:e.jsx(os,{className:"h-4 w-4 text-destructive"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除规则 #",f+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>d(f),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"配置类型"}),e.jsxs(Pe,{value:h.target===""?"global":"specific",onValueChange:p=>{p==="global"?m(f,"target",""):m(f,"target","qq::group")},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"global",children:"全局配置"}),e.jsx(W,{value:"specific",children:"详细配置"})]})]})]}),h.target!==""&&(()=>{const p=h.target.split(":"),g=p[0]||"qq",N=p[1]||"",j=p[2]||"group";return e.jsxs("div",{className:"grid gap-4 p-3 sm:p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"平台"}),e.jsxs(Pe,{value:g,onValueChange:b=>{m(f,"target",`${b}:${N}:${j}`)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"群 ID"}),e.jsx(ne,{value:N,onChange:b=>{m(f,"target",`${g}:${b.target.value}:${j}`)},placeholder:"输入群 ID",className:"font-mono text-sm"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"类型"}),e.jsxs(Pe,{value:j,onValueChange:b=>{m(f,"target",`${g}:${N}:${b}`)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"group",children:"群组(group)"}),e.jsx(W,{value:"private",children:"私聊(private)"})]})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前聊天流 ID:",h.target||"(未设置)"]})]})})(),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"时间段 (Time)"}),e.jsx(sS,{value:h.time,onChange:p=>m(f,"time",p)}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"支持跨夜区间,例如 23:00-02:00"})]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{htmlFor:`rule-value-${f}`,className:"text-xs font-medium",children:"发言频率值 (Value)"}),e.jsx(ne,{id:`rule-value-${f}`,type:"number",step:"0.01",min:"0.01",max:"1",value:h.value,onChange:p=>{const g=parseFloat(p.target.value);isNaN(g)||m(f,"value",Math.max(.01,Math.min(1,g)))},className:"w-20 h-8 text-xs"})]}),e.jsx(el,{value:[h.value],onValueChange:p=>m(f,"value",p[0]),min:.01,max:1,step:.01,className:"w-full"}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:"0.01 (极少发言)"}),e.jsx("span",{children:"0.5"}),e.jsx("span",{children:"1.0 (正常)"})]})]})]})]},f))}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:e.jsx("p",{className:"text-sm",children:'暂无规则,点击"添加规则"按钮创建'})}),e.jsxs("div",{className:"mt-4 p-4 bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg",children:[e.jsx("h5",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"📝 规则说明"}),e.jsxs("ul",{className:"text-xs text-blue-800 dark:text-blue-200 space-y-1",children:[e.jsxs("li",{children:["• ",e.jsx("strong",{children:"Target 为空"}),":全局规则,对所有聊天生效"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"Target 指定"}),":仅对特定聊天流生效(格式:platform:id:type)"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"优先级"}),":先匹配具体聊天流规则,再匹配全局规则"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"时间支持跨夜"}),":例如 23:00-02:00 表示晚上11点到次日凌晨2点"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"数值范围"}),":建议 0-1,0 表示完全沉默,1 表示正常发言"]})]})]})]})]})}),lS=Bs.memo(function({config:l,onChange:r}){const c=S=>{if(!S||!S.includes(":"))return{platform:"qq",userId:""};const[F,E]=S.split(":");return{platform:F,userId:E}},{platform:d,userId:m}=c(l.dream_send),[h,f]=u.useState(d),[p,g]=u.useState(m),N=S=>{const[F,E]=S.split("-");return{startTime:F||"09:00",endTime:E||"22:00"}},j=(S,F)=>{const E=F?`${S}:${F}`:"";r({...l,dream_send:E})},b=S=>{f(S),j(S,p)},y=S=>{g(S),j(h,S)},w=()=>{r({...l,dream_time_ranges:[...l.dream_time_ranges,"09:00-22:00"]})},z=S=>{r({...l,dream_time_ranges:l.dream_time_ranges.filter((F,E)=>E!==S)})},M=(S,F,E)=>{const C=[...l.dream_time_ranges],R=N(C[S]);F==="startTime"?R.startTime=E:R.endTime=E,C[S]=`${R.startTime}-${R.endTime}`,r({...l,dream_time_ranges:C})};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"做梦配置"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"interval_minutes",children:"做梦时间间隔(分钟)"}),e.jsx(ne,{id:"interval_minutes",type:"number",min:"1",value:l.interval_minutes,onChange:S=>r({...l,interval_minutes:Number(S.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"默认30分钟"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"max_iterations",children:"做梦最大轮次"}),e.jsx(ne,{id:"max_iterations",type:"number",min:"1",value:l.max_iterations,onChange:S=>r({...l,max_iterations:Number(S.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"默认20轮"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"first_delay_seconds",children:"首次做梦延迟(秒)"}),e.jsx(ne,{id:"first_delay_seconds",type:"number",min:"0",value:l.first_delay_seconds,onChange:S=>r({...l,first_delay_seconds:Number(S.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"程序启动后首次做梦前的延迟时间,默认60秒"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"做梦结果推送目标"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(Pe,{value:h,onValueChange:b,children:[e.jsx(Be,{className:"w-[120px]",children:e.jsx(Fe,{placeholder:"选择平台"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"}),e.jsx(W,{value:"webui",children:"WebUI"})]})]}),e.jsx(ne,{type:"text",placeholder:"输入用户ID (例如: 123456)",value:p,onChange:S=>y(S.target.value),className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"选择平台并输入用户ID,做梦结束后将梦境发送给该用户。用户ID为空则不推送"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"做梦时间段配置"}),e.jsx(_,{type:"button",size:"sm",onClick:w,children:"添加时间段"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"设置允许做梦的时间段,支持跨夜区间(如 23:00 到次日 02:00)。列表为空则全天允许做梦"}),e.jsxs("div",{className:"space-y-2",children:[l.dream_time_ranges.map((S,F)=>{const{startTime:E,endTime:C}=N(S);return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{type:"time",value:E,onChange:R=>M(F,"startTime",R.target.value),className:"w-[140px]"}),e.jsx("span",{className:"text-muted-foreground",children:"至"}),e.jsx(ne,{type:"time",value:C,onChange:R=>M(F,"endTime",R.target.value),className:"w-[140px]"}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",onClick:()=>z(F),children:e.jsx(Sa,{className:"h-4 w-4"})})]},F)}),l.dream_time_ranges.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"当前配置为全天允许做梦"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"dream_visible",checked:l.dream_visible,onCheckedChange:S=>r({...l,dream_visible:S})}),e.jsx(T,{htmlFor:"dream_visible",className:"cursor-pointer",children:"梦境结果存储到上下文"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"开启后,梦境发送给配置的用户后,也会存储到聊天上下文中,在后续对话中可见"})]})]})}),nS=Bs.memo(function({config:l,onChange:r}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"LPMM 知识库设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{checked:l.enable,onCheckedChange:c=>r({...l,enable:c})}),e.jsx(T,{className:"cursor-pointer",children:"启用 LPMM 知识库"})]}),l.enable&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"LPMM 模式"}),e.jsxs(Pe,{value:l.lpmm_mode,onValueChange:c=>r({...l,lpmm_mode:c}),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择 LPMM 模式"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"classic",children:"经典模式"}),e.jsx(W,{value:"agent",children:"Agent 模式"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"同义词搜索 TopK"}),e.jsx(ne,{type:"number",min:"1",value:l.rag_synonym_search_top_k,onChange:c=>r({...l,rag_synonym_search_top_k:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"同义词阈值"}),e.jsx(ne,{type:"number",step:"0.1",min:"0",max:"1",value:l.rag_synonym_threshold,onChange:c=>r({...l,rag_synonym_threshold:parseFloat(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"实体提取线程数"}),e.jsx(ne,{type:"number",min:"1",value:l.info_extraction_workers,onChange:c=>r({...l,info_extraction_workers:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"嵌入向量维度"}),e.jsx(ne,{type:"number",min:"1",value:l.embedding_dimension,onChange:c=>r({...l,embedding_dimension:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"嵌入并发线程数"}),e.jsx(ne,{type:"number",min:"1",value:l.max_embedding_workers,onChange:c=>r({...l,max_embedding_workers:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"每批嵌入条数"}),e.jsx(ne,{type:"number",min:"1",value:l.embedding_chunk_size,onChange:c=>r({...l,embedding_chunk_size:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"同义实体数上限"}),e.jsx(ne,{type:"number",min:"1",value:l.max_synonym_entities,onChange:c=>r({...l,max_synonym_entities:parseInt(c.target.value)})})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{checked:l.enable_ppr,onCheckedChange:c=>r({...l,enable_ppr:c})}),e.jsx(T,{className:"cursor-pointer",children:"启用 PPR (低配机器可关闭)"})]})]})]})]})}),rS=Bs.memo(function({config:l,onChange:r}){const[c,d]=u.useState(""),[m,h]=u.useState("WARNING"),f=()=>{c&&!l.suppress_libraries.includes(c)&&(r({...l,suppress_libraries:[...l.suppress_libraries,c]}),d(""))},p=w=>{r({...l,suppress_libraries:l.suppress_libraries.filter(z=>z!==w)})},g=()=>{c&&!l.library_log_levels[c]&&(r({...l,library_log_levels:{...l.library_log_levels,[c]:m}}),d(""),h("WARNING"))},N=w=>{const z={...l.library_log_levels};delete z[w],r({...l,library_log_levels:z})},j=["DEBUG","INFO","WARNING","ERROR","CRITICAL"],b=["FULL","compact","lite"],y=["none","title","full"];return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"日志配置"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"日期格式"}),e.jsx(ne,{value:l.date_style,onChange:w=>r({...l,date_style:w.target.value}),placeholder:"例如: m-d H:i:s"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"m=月, d=日, H=时, i=分, s=秒"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"日志级别样式"}),e.jsxs(Pe,{value:l.log_level_style,onValueChange:w=>r({...l,log_level_style:w}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:b.map(w=>e.jsx(W,{value:w,children:w},w))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"日志文本颜色"}),e.jsxs(Pe,{value:l.color_text,onValueChange:w=>r({...l,color_text:w}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:y.map(w=>e.jsx(W,{value:w,children:w},w))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"全局日志级别"}),e.jsxs(Pe,{value:l.log_level,onValueChange:w=>r({...l,log_level:w}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:j.map(w=>e.jsx(W,{value:w,children:w},w))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"控制台日志级别"}),e.jsxs(Pe,{value:l.console_log_level,onValueChange:w=>r({...l,console_log_level:w}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:j.map(w=>e.jsx(W,{value:w,children:w},w))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"文件日志级别"}),e.jsxs(Pe,{value:l.file_log_level,onValueChange:w=>r({...l,file_log_level:w}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsx(Ie,{children:j.map(w=>e.jsx(W,{value:w,children:w},w))})]})]})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"mb-2 block",children:"完全屏蔽的库"}),e.jsxs("div",{className:"flex gap-2 mb-2",children:[e.jsx(ne,{value:c,onChange:w=>d(w.target.value),placeholder:"输入库名",className:"flex-1",onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),f())}}),e.jsx(_,{onClick:f,size:"sm",className:"flex-shrink-0",children:e.jsx(Xs,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:l.suppress_libraries.map(w=>e.jsxs("div",{className:"flex items-center gap-1 bg-secondary px-3 py-1 rounded-md",children:[e.jsx("span",{className:"text-sm",children:w}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>p(w),children:e.jsx(os,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},w))})]}),e.jsxs("div",{children:[e.jsx(T,{className:"mb-2 block",children:"特定库的日志级别"}),e.jsxs("div",{className:"flex gap-2 mb-2",children:[e.jsx(ne,{value:c,onChange:w=>d(w.target.value),placeholder:"输入库名",className:"flex-1"}),e.jsxs(Pe,{value:m,onValueChange:h,children:[e.jsx(Be,{className:"w-32",children:e.jsx(Fe,{})}),e.jsx(Ie,{children:j.map(w=>e.jsx(W,{value:w,children:w},w))})]}),e.jsx(_,{onClick:g,size:"sm",children:e.jsx(Xs,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),e.jsx("div",{className:"space-y-2",children:Object.entries(l.library_log_levels).map(([w,z])=>e.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[e.jsx("span",{className:"text-sm font-medium",children:w}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:z}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>N(w),children:e.jsx(os,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]})]},w))})]})]})}),iS=Bs.memo(function({config:l,onChange:r}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"调试配置"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示 Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否在日志中显示提示词"})]}),e.jsx(Ge,{checked:l.show_prompt,onCheckedChange:c=>r({...l,show_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示回复器 Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示回复器的提示词"})]}),e.jsx(Ge,{checked:l.show_replyer_prompt,onCheckedChange:c=>r({...l,show_replyer_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示回复器推理"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示回复器的推理过程"})]}),e.jsx(Ge,{checked:l.show_replyer_reasoning,onCheckedChange:c=>r({...l,show_replyer_reasoning:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示 Jargon Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示术语相关的提示词"})]}),e.jsx(Ge,{checked:l.show_jargon_prompt,onCheckedChange:c=>r({...l,show_jargon_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示记忆检索 Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示记忆检索相关的提示词"})]}),e.jsx(Ge,{checked:l.show_memory_prompt,onCheckedChange:c=>r({...l,show_memory_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示 Planner Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示 Planner 的提示词和原始返回结果"})]}),e.jsx(Ge,{checked:l.show_planner_prompt,onCheckedChange:c=>r({...l,show_planner_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示 LPMM 相关文段"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示 LPMM 知识库找到的相关文段日志"})]}),e.jsx(Ge,{checked:l.show_lpmm_paragraph,onCheckedChange:c=>r({...l,show_lpmm_paragraph:c})})]})]})]})}),cS=Bs.memo(function({config:l,onChange:r}){const c=g=>{const N=g.split(":");if(N.length>=4){const j=N[0],b=N[1],y=N[2],w=N.slice(3).join(":");return{platform:j,id:b,type:y,prompt:w}}return{platform:"qq",id:"",type:"group",prompt:""}},d=g=>`${g.platform}:${g.id}:${g.type}:${g.prompt}`,m=()=>{r({...l,chat_prompts:[...l.chat_prompts,"qq::group:"]})},h=g=>{r({...l,chat_prompts:l.chat_prompts.filter((N,j)=>j!==g)})},f=(g,N)=>{const b={...c(l.chat_prompts[g]),...N},y=[...l.chat_prompts];y[g]=d(b),r({...l,chat_prompts:y})},p=({promptStr:g})=>e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-80 sm:w-96",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsxs("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:['"',g,'"']}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]});return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-orange-500/10 border border-orange-500/20",children:[e.jsx(Lt,{className:"h-5 w-5 text-orange-500 shrink-0 mt-0.5"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-medium text-orange-500",children:"实验性功能"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"此部分包含实验性功能,可能不稳定或在未来版本中发生变化。请谨慎使用,并注意不推荐在生产环境中修改私聊规则。"})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"实验性设置"}),e.jsxs("div",{className:"grid gap-6",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"private_plan_style",children:"私聊规则(实验性)"}),e.jsx(pt,{id:"private_plan_style",value:l.private_plan_style,onChange:g=>r({...l,private_plan_style:g.target.value}),placeholder:"私聊的说话规则和行为风格(不推荐修改)",rows:4}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"⚠️ 不推荐修改此项,可能会影响私聊对话的稳定性"})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{children:"特定聊天 Prompt 配置"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"为指定聊天添加额外的 prompt,用于定制特定场景的对话行为"})]}),e.jsxs(_,{onClick:m,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加配置"]})]}),e.jsxs("div",{className:"space-y-4",children:[l.chat_prompts.map((g,N)=>{const j=c(g);return e.jsxs("div",{className:"rounded-lg border p-4 space-y-4 bg-card",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["Prompt 配置 ",N+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{promptStr:g}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsx(gs,{children:"确定要删除这个 prompt 配置吗?此操作无法撤销。"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>h(N),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"平台"}),e.jsxs(Pe,{value:j.platform,onValueChange:b=>f(N,{platform:b}),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择平台"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"}),e.jsx(W,{value:"webui",children:"WebUI"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:j.type==="group"?"群号":"用户ID"}),e.jsx(ne,{value:j.id,onChange:b=>f(N,{id:b.target.value}),placeholder:j.type==="group"?"输入群号":"输入用户ID",className:"font-mono"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"类型"}),e.jsxs(Pe,{value:j.type,onValueChange:b=>f(N,{type:b}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"group",children:"群聊 (group)"}),e.jsx(W,{value:"private",children:"私聊 (private)"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"Prompt 内容"}),e.jsx(pt,{value:j.prompt,onChange:b=>f(N,{prompt:b.target.value}),placeholder:"输入额外的 prompt 内容,例如:这是一个摄影群,你精通摄影知识",rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这段文本会作为系统提示添加到该聊天的上下文中"})]}),e.jsxs("div",{className:"rounded-md bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(dx,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"原始格式"})]}),e.jsx("code",{className:"text-xs font-mono text-muted-foreground break-all",children:g||"(未配置)"})]})]})]},N)}),l.chat_prompts.length===0&&e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx("p",{className:"text-sm",children:"暂无特定聊天 prompt 配置"}),e.jsx("p",{className:"text-xs mt-1",children:'点击上方"添加配置"按钮创建新配置'})]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 p-4 rounded-lg bg-muted/30 border",children:[e.jsx("p",{className:"font-medium text-foreground",children:"💡 使用说明"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 pl-2",children:[e.jsx("li",{children:"为不同的聊天环境配置专属的行为提示"}),e.jsx("li",{children:"支持多个平台:QQ、微信、WebUI"}),e.jsx("li",{children:"可为群聊或私聊分别配置"}),e.jsx("li",{children:"Prompt 会自动注入到该聊天的上下文中"})]}),e.jsx("p",{className:"font-medium text-foreground mt-3",children:"📝 配置示例"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 pl-2",children:[e.jsxs("li",{children:["摄影群:",e.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"这是一个摄影群,你精通摄影知识"})]}),e.jsxs("li",{children:["二次元群:",e.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"这是一个二次元交流群"})]}),e.jsxs("li",{children:["好友私聊:",e.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"这是你与好朋友的私聊"})]})]})]})]})]})]})]})}),oS=Bs.memo(function({config:l,onChange:r}){const[c,d]=u.useState(""),[m,h]=u.useState(""),f=()=>{c&&!l.auth_token.includes(c)&&(r({...l,auth_token:[...l.auth_token,c]}),d(""))},p=j=>{r({...l,auth_token:l.auth_token.filter((b,y)=>y!==j)})},g=()=>{m&&!l.api_server_allowed_api_keys.includes(m)&&(r({...l,api_server_allowed_api_keys:[...l.api_server_allowed_api_keys,m]}),h(""))},N=j=>{r({...l,api_server_allowed_api_keys:l.api_server_allowed_api_keys.filter((b,y)=>y!==j)})};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"旧版 API 认证令牌"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"用于旧版 API 验证,为空则不启用验证"}),e.jsxs("div",{className:"flex gap-2 mb-2",children:[e.jsx(ne,{value:c,onChange:j=>d(j.target.value),placeholder:"输入认证令牌",onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),f())}}),e.jsx(_,{onClick:f,size:"sm",children:e.jsx(Xs,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),e.jsx("div",{className:"space-y-2",children:l.auth_token.map((j,b)=>e.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[e.jsx("span",{className:"text-sm font-mono",children:j}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>p(b),children:e.jsx(os,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},b))})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"新版 API Server 配置"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"启用新版 API Server"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否启用额外的新版 API Server(额外监听端口)"})]}),e.jsx(Ge,{checked:l.enable_api_server,onCheckedChange:j=>r({...l,enable_api_server:j})})]}),l.enable_api_server&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"主机地址"}),e.jsx(ne,{value:l.api_server_host,onChange:j=>r({...l,api_server_host:j.target.value}),placeholder:"0.0.0.0"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"端口号"}),e.jsx(ne,{type:"number",value:l.api_server_port,onChange:j=>r({...l,api_server_port:parseInt(j.target.value)}),placeholder:"8090"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{checked:l.api_server_use_wss,onCheckedChange:j=>r({...l,api_server_use_wss:j})}),e.jsx(T,{children:"启用 WSS 安全连接"})]}),l.api_server_use_wss&&e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"SSL 证书文件路径"}),e.jsx(ne,{value:l.api_server_cert_file,onChange:j=>r({...l,api_server_cert_file:j.target.value}),placeholder:"cert.pem"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"SSL 密钥文件路径"}),e.jsx(ne,{value:l.api_server_key_file,onChange:j=>r({...l,api_server_key_file:j.target.value}),placeholder:"key.pem"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"mb-2 block",children:"允许的 API Key 列表"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"为空则允许所有连接"}),e.jsxs("div",{className:"flex gap-2 mb-2",children:[e.jsx(ne,{value:m,onChange:j=>h(j.target.value),placeholder:"输入 API Key",onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),g())}}),e.jsx(_,{onClick:g,size:"sm",children:e.jsx(Xs,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),e.jsx("div",{className:"space-y-2",children:l.api_server_allowed_api_keys.map((j,b)=>e.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[e.jsx("span",{className:"text-sm font-mono",children:j}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>N(b),children:e.jsx(os,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},b))})]})]})]})]})]})}),dS=Bs.memo(function({config:l,onChange:r}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"统计信息"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"启用统计信息发送"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"发送匿名统计信息,帮助我们了解全球有多少只麦麦在运行"})]}),e.jsx(Ge,{checked:l.enable,onCheckedChange:c=>r({...l,enable:c})})]})]})}),uS=Bs.memo(function({emojiConfig:l,memoryConfig:r,toolConfig:c,voiceConfig:d,onEmojiChange:m,onMemoryChange:h,onToolChange:f,onVoiceChange:p}){return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"工具设置"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"enable_tool",checked:c.enable_tool,onCheckedChange:g=>f({...c,enable_tool:g})}),e.jsx(T,{htmlFor:"enable_tool",className:"cursor-pointer",children:"启用工具系统"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"允许麦麦使用各种工具来增强功能"}),e.jsxs("div",{className:"flex items-center space-x-2 pt-2",children:[e.jsx(Ge,{id:"enable_asr",checked:d.enable_asr,onCheckedChange:g=>p({...d,enable_asr:g})}),e.jsx(T,{htmlFor:"enable_asr",className:"cursor-pointer",children:"启用语音识别"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"启用后麦麦可以识别语音消息,需要配置语音识别模型"})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"记忆设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_agent_iterations",children:"记忆思考深度"}),e.jsx(ne,{id:"max_agent_iterations",type:"number",min:"1",value:r.max_agent_iterations,onChange:g=>h({...r,max_agent_iterations:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"最低为 1(不深入思考)"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"agent_timeout_seconds",children:"最长回忆时间(秒)"}),e.jsx(ne,{id:"agent_timeout_seconds",type:"number",min:"1",step:"0.1",value:r.agent_timeout_seconds??120,onChange:g=>h({...r,agent_timeout_seconds:parseFloat(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"记忆检索的超时时间,避免过长的等待"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"enable_jargon_detection",checked:r.enable_jargon_detection??!0,onCheckedChange:g=>h({...r,enable_jargon_detection:g})}),e.jsx(T,{htmlFor:"enable_jargon_detection",className:"cursor-pointer",children:"启用黑话识别"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"记忆检索过程中是否启用黑话识别"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"global_memory",checked:r.global_memory??!1,onCheckedChange:g=>h({...r,global_memory:g})}),e.jsx(T,{htmlFor:"global_memory",className:"cursor-pointer",children:"全局记忆查询"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"允许记忆检索在所有聊天记录中进行全局查询(忽略当前聊天流)"})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"表情包设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"emoji_chance",children:"表情包激活概率"}),e.jsx(ne,{id:"emoji_chance",type:"number",step:"0.1",min:"0",max:"1",value:l.emoji_chance,onChange:g=>m({...l,emoji_chance:parseFloat(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"范围 0-1,越大越容易发送表情包"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_reg_num",children:"最大注册数量"}),e.jsx(ne,{id:"max_reg_num",type:"number",min:"1",value:l.max_reg_num,onChange:g=>m({...l,max_reg_num:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦最多可以注册的表情包数量"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"check_interval",children:"检查间隔(分钟)"}),e.jsx(ne,{id:"check_interval",type:"number",min:"1",value:l.check_interval,onChange:g=>m({...l,check_interval:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"检查表情包(注册、破损、删除)的时间间隔"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"do_replace",checked:l.do_replace,onCheckedChange:g=>m({...l,do_replace:g})}),e.jsx(T,{htmlFor:"do_replace",className:"cursor-pointer",children:"达到最大数量时替换表情包"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"steal_emoji",checked:l.steal_emoji,onCheckedChange:g=>m({...l,steal_emoji:g})}),e.jsx(T,{htmlFor:"steal_emoji",className:"cursor-pointer",children:"偷取表情包"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"允许麦麦将看到的表情包据为己有"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"content_filtration",checked:l.content_filtration,onCheckedChange:g=>m({...l,content_filtration:g})}),e.jsx(T,{htmlFor:"content_filtration",className:"cursor-pointer",children:"启用表情包过滤"})]}),l.content_filtration&&e.jsxs("div",{className:"grid gap-2 pl-6 border-l-2 border-primary/20",children:[e.jsx(T,{htmlFor:"filtration_prompt",children:"过滤要求"}),e.jsx(ne,{id:"filtration_prompt",value:l.filtration_prompt,onChange:g=>m({...l,filtration_prompt:g.target.value}),placeholder:"符合公序良俗"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"只有符合此要求的表情包才会被保存"})]})]})]})})]})}),mS=Bs.memo(function({member:l,groupIndex:r,memberIndex:c,availableChatIds:d,onUpdate:m,onRemove:h}){const f=d.includes(l)||l==="*",[p,g]=u.useState(!f);return e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"flex-1 flex gap-2",children:p?e.jsxs(e.Fragment,{children:[e.jsx(ne,{value:l,onChange:N=>m(r,c,N.target.value),placeholder:'输入 "*" 或 "qq:123456:group"',className:"flex-1"}),d.length>0&&e.jsx(_,{size:"sm",variant:"outline",onClick:()=>g(!1),title:"切换到下拉选择",children:"下拉"})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{value:l,onValueChange:N=>m(r,c,N),children:[e.jsx(Be,{className:"flex-1",children:e.jsx(Fe,{placeholder:"选择聊天流"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"*",children:"* (全局共享)"}),d.map((N,j)=>e.jsx(W,{value:N,children:N},j))]})]}),e.jsx(_,{size:"sm",variant:"outline",onClick:()=>g(!0),title:"切换到手动输入",children:"输入"})]})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除组成员 "',l||"(空)",'" 吗?此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>h(r,c),children:"删除"})]})]})]})]})}),xS=Bs.memo(function({config:l,onChange:r}){const c=()=>{r({...l,learning_list:[...l.learning_list,["","enable","enable","1.0"]]})},d=b=>{r({...l,learning_list:l.learning_list.filter((y,w)=>w!==b)})},m=(b,y,w)=>{const z=[...l.learning_list];z[b][y]=w,r({...l,learning_list:z})},h=({rule:b})=>{const y=`["${b[0]}", "${b[1]}", "${b[2]}", "${b[3]}"]`;return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-80 sm:w-96",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:y}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})},f=()=>{r({...l,expression_groups:[...l.expression_groups,[]]})},p=b=>{r({...l,expression_groups:l.expression_groups.filter((y,w)=>w!==b)})},g=b=>{const y=[...l.expression_groups];y[b]=[...y[b],""],r({...l,expression_groups:y})},N=(b,y)=>{const w=[...l.expression_groups];w[b]=w[b].filter((z,M)=>M!==y),r({...l,expression_groups:w})},j=(b,y,w)=>{const z=[...l.expression_groups];z[b][y]=w,r({...l,expression_groups:z})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"黑话设置"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"all_global_jargon",checked:l.all_global_jargon??!1,onCheckedChange:b=>r({...l,all_global_jargon:b})}),e.jsx(T,{htmlFor:"all_global_jargon",className:"cursor-pointer",children:"全局黑话模式"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"开启后,新增的黑话将默认设为全局(所有聊天流共享)。关闭后,已记录的全局黑话不会改变,需要手动删除。"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"enable_jargon_explanation",checked:l.enable_jargon_explanation??!0,onCheckedChange:b=>r({...l,enable_jargon_explanation:b})}),e.jsx(T,{htmlFor:"enable_jargon_explanation",className:"cursor-pointer",children:"启用黑话解释"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"在回复前尝试对上下文中的黑话进行解释。关闭可减少一次LLM调用,仅影响回复前的黑话匹配与解释,不影响黑话学习。"})]}),e.jsxs("div",{children:[e.jsx(T,{htmlFor:"jargon_mode",children:"黑话解释来源模式"}),e.jsxs(Pe,{value:l.jargon_mode??"context",onValueChange:b=>r({...l,jargon_mode:b}),children:[e.jsx(Be,{id:"jargon_mode",className:"mt-2",children:e.jsx(Fe,{placeholder:"选择黑话解释来源"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"context",children:"上下文模式(自动匹配黑话)"}),e.jsx(W,{value:"planner",children:"Planner模式(使用unknown_words列表)"})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["上下文模式:使用上下文自动匹配黑话并解释",e.jsx("br",{}),"Planner模式:仅使用Planner在reply动作中给出的unknown_words列表进行黑话检索"]})]})]}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",children:"表达学习配置"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置麦麦如何学习和使用表达方式"})]}),e.jsxs(_,{onClick:c,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加规则"]})]}),e.jsxs("div",{className:"space-y-4",children:[l.learning_list.map((b,y)=>{const w=l.learning_list.some((C,R)=>R!==y&&C[0]===""),z=b[0]==="",M=b[0].split(":"),S=M[0]||"qq",F=M[1]||"",E=M[2]||"group";return e.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["规则 ",y+1," ",z&&"(全局配置)"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{rule:b}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除学习规则 ",y+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>d(y),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"配置类型"}),e.jsxs(Pe,{value:z?"global":"specific",onValueChange:C=>{C==="global"?m(y,0,""):m(y,0,"qq::group")},disabled:w&&!z,children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"global",children:"全局配置"}),e.jsx(W,{value:"specific",disabled:w&&!z,children:"详细配置"})]})]}),w&&!z&&e.jsx("p",{className:"text-xs text-amber-600",children:"已存在全局配置,无法创建新的全局配置"})]}),!z&&e.jsxs("div",{className:"grid gap-4 p-3 sm:p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"平台"}),e.jsxs(Pe,{value:S,onValueChange:C=>{m(y,0,`${C}:${F}:${E}`)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"群 ID"}),e.jsx(ne,{value:F,onChange:C=>{m(y,0,`${S}:${C.target.value}:${E}`)},placeholder:"输入群 ID",className:"font-mono text-sm"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"类型"}),e.jsxs(Pe,{value:E,onValueChange:C=>{m(y,0,`${S}:${F}:${C}`)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"group",children:"群组(group)"}),e.jsx(W,{value:"private",children:"私聊(private)"})]})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前聊天流 ID:",b[0]||"(未设置)"]})]}),e.jsx("div",{className:"grid gap-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs font-medium",children:"使用学到的表达"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦使用从聊天中学到的表达方式"})]}),e.jsx(Ge,{checked:b[1]==="enable",onCheckedChange:C=>m(y,1,C?"enable":"disable")})]})}),e.jsx("div",{className:"grid gap-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs font-medium",children:"学习表达"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦从聊天中学习新的表达方式"})]}),e.jsx(Ge,{checked:b[2]==="enable",onCheckedChange:C=>m(y,2,C?"enable":"disable")})]})}),e.jsx("div",{className:"grid gap-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs font-medium",children:"启用黑话学习"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦在此聊天流中学习和记录黑话"})]}),e.jsx(Ge,{checked:b[3]==="true"||b[3]==="enable",onCheckedChange:C=>m(y,3,C?"true":"false")})]})})]})]},y)}),l.learning_list.length===0&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无学习规则,点击"添加规则"开始配置'})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",children:"表达优化配置"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置麦麦如何优化和改进表达方式"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"expression_self_reflect",className:"cursor-pointer font-medium",children:"自动表达优化"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后,麦麦会自动检查并优化表达方式,无需管理员手动干预"})]}),e.jsx(Ge,{id:"expression_self_reflect",checked:l.expression_self_reflect??!1,onCheckedChange:b=>r({...l,expression_self_reflect:b})})]}),l.expression_self_reflect&&e.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary/20",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"expression_auto_check_interval",children:"自动检查间隔(秒)"}),e.jsx(ne,{id:"expression_auto_check_interval",type:"number",min:"60",value:l.expression_auto_check_interval??3600,onChange:b=>r({...l,expression_auto_check_interval:parseInt(b.target.value)||3600})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"表达方式自动检查的间隔时间(单位:秒),默认值:3600秒(1小时)"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"expression_auto_check_count",children:"每次检查数量"}),e.jsx(ne,{id:"expression_auto_check_count",type:"number",min:"1",max:"100",value:l.expression_auto_check_count??10,onChange:b=>r({...l,expression_auto_check_count:parseInt(b.target.value)||10})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"每次自动检查时随机选取的表达方式数量,默认值:10条"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"自定义评估标准"}),e.jsxs(_,{onClick:()=>{r({...l,expression_auto_check_custom_criteria:[...l.expression_auto_check_custom_criteria||[],""]})},size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加标准"]})]}),e.jsxs("div",{className:"space-y-2",children:[(l.expression_auto_check_custom_criteria||[]).map((b,y)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{value:b,onChange:w=>{const z=[...l.expression_auto_check_custom_criteria||[]];z[y]=w.target.value,r({...l,expression_auto_check_custom_criteria:z})},placeholder:"输入评估标准,例如:是否符合角色人设",className:"flex-1"}),e.jsx(_,{onClick:()=>{r({...l,expression_auto_check_custom_criteria:(l.expression_auto_check_custom_criteria||[]).filter((w,z)=>z!==y)})},size:"icon",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})]},y)),(!l.expression_auto_check_custom_criteria||l.expression_auto_check_custom_criteria.length===0)&&e.jsx("div",{className:"text-center py-4 text-muted-foreground text-sm",children:'暂无自定义标准,点击"添加标准"开始配置'})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这些标准会被添加到评估提示词中,作为额外的评估要求"})]})]})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"expression_checked_only",className:"cursor-pointer font-medium",children:"仅使用已审核通过的表达方式"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"开启后,只有通过审核(已检查)的项目会被使用;关闭时,未审核的项目也会被使用。无论开关状态,被拒绝的项目永远不会被使用。"})]}),e.jsx(Ge,{id:"expression_checked_only",checked:l.expression_checked_only??!1,onCheckedChange:b=>r({...l,expression_checked_only:b})})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"expression_manual_reflect",className:"cursor-pointer font-medium",children:"手动表达优化"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后,麦麦会主动向管理员询问表达方式是否合适"})]}),e.jsx(Ge,{id:"expression_manual_reflect",checked:l.expression_manual_reflect??!1,onCheckedChange:b=>r({...l,expression_manual_reflect:b})})]}),l.expression_manual_reflect&&e.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary/20",children:[e.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("span",{className:"text-sm font-medium",children:"反思操作员"})}),e.jsx("div",{className:"space-y-4",children:(()=>{const y=(l.manual_reflect_operator_id||"").split(":"),w=y[0]||"qq",z=y[1]||"",M=y[2]||"private";return e.jsxs("div",{className:"grid gap-4 p-3 sm:p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"平台"}),e.jsxs(Pe,{value:w,onValueChange:S=>{r({...l,manual_reflect_operator_id:`${S}:${z}:${M}`})},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"用户/群 ID"}),e.jsx(ne,{value:z,onChange:S=>{r({...l,manual_reflect_operator_id:`${w}:${S.target.value}:${M}`})},placeholder:"输入 ID",className:"font-mono text-sm"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"类型"}),e.jsxs(Pe,{value:M,onValueChange:S=>{r({...l,manual_reflect_operator_id:`${w}:${z}:${S}`})},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"private",children:"私聊(private)"}),e.jsx(W,{value:"group",children:"群组(group)"})]})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前操作员 ID:",l.manual_reflect_operator_id||"(未设置)"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:'手动表达优化操作员ID,格式:platform:id:type (例如 "qq:123456:private" 或 "qq:654321:group")'})]})})()})]}),e.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-medium",children:"允许进行表达反思的聊天流"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"只有在此列表中的聊天流才会提出问题并跟踪。如果列表为空,则所有聊天流都可以进行表达反思(前提是启用了手动表达优化)"})]}),e.jsxs(_,{onClick:()=>{r({...l,allow_reflect:[...l.allow_reflect||[],"qq::group"]})},size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加聊天流"]})]}),e.jsxs("div",{className:"space-y-2",children:[(l.allow_reflect||[]).map((b,y)=>{const w=b.split(":"),z=w[0]||"qq",M=w[1]||"",S=w[2]||"group";return e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-muted/50",children:[e.jsxs(Pe,{value:z,onValueChange:F=>{const E=[...l.allow_reflect];E[y]=`${F}:${M}:${S}`,r({...l,allow_reflect:E})},children:[e.jsx(Be,{className:"w-24",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"})]})]}),e.jsx(ne,{value:M,onChange:F=>{const E=[...l.allow_reflect];E[y]=`${z}:${F.target.value}:${S}`,r({...l,allow_reflect:E})},placeholder:"ID",className:"flex-1 font-mono text-sm"}),e.jsxs(Pe,{value:S,onValueChange:F=>{const E=[...l.allow_reflect];E[y]=`${z}:${M}:${F}`,r({...l,allow_reflect:E})},children:[e.jsx(Be,{className:"w-32",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"group",children:"群组"}),e.jsx(W,{value:"private",children:"私聊"})]})]}),e.jsx(_,{onClick:()=>{r({...l,allow_reflect:l.allow_reflect.filter((F,E)=>E!==y)})},size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})]},y)}),(!l.allow_reflect||l.allow_reflect.length===0)&&e.jsx("div",{className:"text-center py-4 text-muted-foreground text-sm",children:"列表为空,所有聊天流都可以进行表达反思"})]})]})]})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",children:"表达共享组配置"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置不同聊天流之间如何共享学到的表达方式"})]}),e.jsxs(_,{onClick:f,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加共享组"]})]}),e.jsxs("div",{className:"space-y-4",children:[l.expression_groups.map((b,y)=>{const w=l.learning_list.map(z=>z[0]).filter(z=>z!=="");return e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["共享组 ",y+1,b.length===1&&b[0]==="*"&&"(全局共享)"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(_,{onClick:()=>g(y),size:"sm",variant:"outline",children:e.jsx(Xs,{className:"h-4 w-4"})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除共享组 ",y+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>p(y),children:"删除"})]})]})]})]})]}),e.jsx("div",{className:"space-y-2",children:b.map((z,M)=>e.jsx(mS,{member:z,groupIndex:y,memberIndex:M,availableChatIds:w,onUpdate:j,onRemove:N},`${y}-${M}`))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:'提示:可以从下拉框选择已配置的聊天流,或手动输入。输入 "*" 启用全局共享'})]},y)}),l.expression_groups.length===0&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无共享组,点击"添加共享组"开始配置'})]})]})})]})});function hS({regex:a,reaction:l,onRegexChange:r,onReactionChange:c}){const[d,m]=u.useState(!1),[h,f]=u.useState(""),[p,g]=u.useState(null),[N,j]=u.useState(""),[b,y]=u.useState({}),[w,z]=u.useState(""),M=u.useRef(null),[S,F]=u.useState("build"),E=O=>O.replace(/\(\?P<([^>]+)>/g,"(?<$1>"),C=(O,X=0)=>{const L=M.current;if(!L)return;const me=L.selectionStart||0,Ne=L.selectionEnd||0,je=a.substring(0,me)+O+a.substring(Ne);r(je),setTimeout(()=>{const ce=me+O.length+X;L.setSelectionRange(ce,ce),L.focus()},0)};u.useEffect(()=>{if(!a||!h){p!==null&&g(null),Object.keys(b).length>0&&y({}),w!==l&&z(l),N!==""&&j("");return}try{const O=E(a),X=new RegExp(O,"g"),L=h.match(X);g(L),j("");const Ne=new RegExp(O).exec(h);if(Ne&&Ne.groups){y(Ne.groups);let je=l;Object.entries(Ne.groups).forEach(([ce,ge])=>{je=je.replace(new RegExp(`\\[${ce}\\]`,"g"),ge||"")}),z(je)}else y({}),z(l)}catch(O){j(O.message),g(null),y({}),z(l)}},[a,h,l,p,b,w,N]);const R=()=>{if(!h||!p||p.length===0)return e.jsx("span",{className:"text-muted-foreground",children:h||"请输入测试文本"});try{const O=E(a),X=new RegExp(O,"g");let L=0;const me=[];let Ne;for(;(Ne=X.exec(h))!==null;)Ne.index>L&&me.push(e.jsx("span",{children:h.substring(L,Ne.index)},`text-${L}`)),me.push(e.jsx("span",{className:"bg-yellow-200 dark:bg-yellow-900 font-semibold",children:Ne[0]},`match-${Ne.index}`)),L=Ne.index+Ne[0].length;return L)",desc:"Python风格命名捕获组",moveCursor:-1},{label:"非捕获组",pattern:"(?:)",desc:"分组但不保存匹配结果",moveCursor:-1}]},{category:"字符类",items:[{label:"字符集",pattern:"[]",desc:"匹配括号内的任意字符",moveCursor:-1},{label:"排除字符",pattern:"[^]",desc:"匹配不在括号内的字符",moveCursor:-1},{label:"范围",pattern:"[a-z]",desc:"匹配a到z的字符"},{label:"中文字符",pattern:"[\\u4e00-\\u9fa5]",desc:"匹配中文汉字"}]},{category:"常用模板",items:[{label:"捕获词语",pattern:"(?P\\S+)",desc:"捕获一个词语"},{label:"捕获句子",pattern:"(?P.+)",desc:"捕获整个句子"},{label:"捕获数字",pattern:"(?P\\d+)",desc:"捕获一个或多个数字"},{label:"可选词语",pattern:"(?:词语1|词语2)",desc:"匹配多个可选项之一"}]}];return e.jsxs(Qs,{open:d,onOpenChange:m,children:[e.jsx(dd,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ux,{className:"h-4 w-4 mr-1"}),"正则编辑器"]})}),e.jsxs(Hs,{className:"max-w-[95vw] sm:max-w-[900px] max-h-[90vh]",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"正则表达式编辑器"}),e.jsx(at,{className:"text-sm",children:"使用可视化工具构建正则表达式,并实时测试效果"})]}),e.jsx(ts,{className:"max-h-[calc(90vh-120px)]",children:e.jsxs(Jt,{value:S,onValueChange:O=>F(O),className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2",children:[e.jsx(Xe,{value:"build",children:"🔧 构建器"}),e.jsx(Xe,{value:"test",children:"🧪 测试器"})]}),e.jsxs(Ss,{value:"build",className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"正则表达式"}),e.jsx(ne,{ref:M,value:a,onChange:O=>r(O.target.value),className:"font-mono text-sm",placeholder:"点击下方按钮构建正则表达式..."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"Reaction 内容"}),e.jsx(pt,{value:l,onChange:O=>c(O.target.value),placeholder:"使用 [捕获组名] 引用捕获的内容...",rows:3,className:"text-sm"})]}),e.jsxs("div",{className:"space-y-4 border-t pt-4",children:[H.map(O=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("h5",{className:"text-xs font-semibold text-primary",children:O.category}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:O.items.map(X=>e.jsx(_,{variant:"outline",size:"sm",className:"justify-start h-auto py-2 px-3",onClick:()=>C(X.pattern,X.moveCursor||0),children:e.jsxs("div",{className:"flex flex-col items-start w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 w-full",children:[e.jsx("span",{className:"text-xs font-medium",children:X.label}),e.jsx("code",{className:"ml-auto text-xs bg-muted px-1.5 py-0.5 rounded font-mono",children:X.pattern})]}),e.jsx("span",{className:"text-xs text-muted-foreground mt-0.5",children:X.desc})]})},X.label))})]},O.category)),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx("h5",{className:"text-xs font-semibold text-primary",children:"完整示例模板"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(_,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>r("^(?P\\S{1,20})是这样的$"),children:e.jsxs("div",{className:"flex flex-col items-start w-full",children:[e.jsxs("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:["^(?P\\S","{1,20}",")是这样的$"]}),e.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"匹配「某事物是这样的」并捕获事物名称"})]})}),e.jsx(_,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>r("(?:[^,。.\\s]+,\\s*)?我(?:也)?[没沒]要求你\\s*(?P.+?)[.。,,]?$"),children:e.jsxs("div",{className:"flex flex-col items-start w-full",children:[e.jsx("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:"(?:[^,。.\\s]+,\\s*)?我(?:也)?[没沒]要求你\\s*(?P.+?)[.。,,]?$"}),e.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"匹配「我没要求你做某事」并捕获具体行为"})]})}),e.jsx(_,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>r("(?P.+?)(?:是|为什么|怎么)"),children:e.jsxs("div",{className:"flex flex-col items-start w-full",children:[e.jsx("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:"(?P.+?)(?:是|为什么|怎么)"}),e.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"捕获问题主题词"})]})})]})]})]}),e.jsxs("div",{className:"rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3 space-y-1",children:[e.jsx("p",{className:"text-xs font-medium text-blue-900 dark:text-blue-100",children:"💡 使用提示"}),e.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-300 space-y-1 list-disc list-inside",children:[e.jsx("li",{children:"点击输入框设置光标位置,然后点击按钮插入模式"}),e.jsxs("li",{children:["命名捕获组格式:",e.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"(?P<名称>模式)"})]}),e.jsxs("li",{children:["在 reaction 中使用 ",e.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"[名称]"})," 引用捕获的内容"]}),e.jsx("li",{children:"切换到测试器标签页验证正则表达式效果"})]})]})]}),e.jsxs(Ss,{value:"test",className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"当前正则表达式"}),e.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:a||"(未设置)"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"test-text",className:"text-sm font-medium",children:"测试文本"}),e.jsx(pt,{id:"test-text",value:h,onChange:O=>f(O.target.value),placeholder:`在此输入要测试的文本... -例如:打游戏是这样的`,className:"min-h-[100px] text-sm"})]}),N&&e.jsxs("div",{className:"rounded-md bg-destructive/10 border border-destructive/20 p-3",children:[e.jsx("p",{className:"text-sm text-destructive font-medium",children:"正则表达式错误"}),e.jsx("p",{className:"text-xs text-destructive/80 mt-1",children:N})]}),!N&&h&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"flex items-center gap-2",children:p&&p.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),e.jsxs("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:["匹配成功 (",p.length," 处)"]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-gray-400"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"无匹配"})]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"匹配高亮"}),e.jsx(ts,{className:"h-40 rounded-md bg-muted p-3",children:e.jsx("div",{className:"text-sm break-words",children:R()})})]}),Object.keys(b).length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"命名捕获组"}),e.jsx(ts,{className:"h-32 rounded-md border p-3",children:e.jsx("div",{className:"space-y-2",children:Object.entries(b).map(([O,X])=>e.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[e.jsxs("span",{className:"font-mono font-semibold text-primary min-w-[80px]",children:["[",O,"]"]}),e.jsx("span",{className:"text-muted-foreground",children:"="}),e.jsx("span",{className:"font-mono bg-muted px-2 py-0.5 rounded",children:X})]},O))})})]}),Object.keys(b).length>0&&l&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"Reaction 替换预览"}),e.jsx(ts,{className:"h-48 rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3",children:e.jsx("div",{className:"text-sm break-words",children:w})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"reaction 中的 [name] 已被替换为对应的捕获组值"})]})]}),e.jsxs("div",{className:"rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3 space-y-1",children:[e.jsx("p",{className:"text-xs font-medium text-blue-900 dark:text-blue-100",children:"💡 测试说明"}),e.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-300 space-y-1 list-disc list-inside",children:[e.jsx("li",{children:"匹配的文本会以黄色背景高亮显示"}),e.jsx("li",{children:"命名捕获组的值会显示在下方列表中"}),e.jsx("li",{children:"Reaction 替换预览显示最终生成的反应内容"}),e.jsx("li",{children:"如需修改正则,切换回构建器标签页"})]})]})]})]})})]})]})}const fS=Bs.memo(function({keywordReactionConfig:l,responsePostProcessConfig:r,chineseTypoConfig:c,responseSplitterConfig:d,onKeywordReactionChange:m,onResponsePostProcessChange:h,onChineseTypoChange:f,onResponseSplitterChange:p}){const g=()=>{m({...l,regex_rules:[...l.regex_rules,{regex:[""],reaction:""}]})},N=C=>{m({...l,regex_rules:l.regex_rules.filter((R,H)=>H!==C)})},j=(C,R,H)=>{const O=[...l.regex_rules];R==="regex"&&typeof H=="string"?O[C]={...O[C],regex:[H]}:R==="reaction"&&typeof H=="string"&&(O[C]={...O[C],reaction:H}),m({...l,regex_rules:O})},b=()=>{m({...l,keyword_rules:[...l.keyword_rules,{keywords:[],reaction:""}]})},y=C=>{m({...l,keyword_rules:l.keyword_rules.filter((R,H)=>H!==C)})},w=(C,R,H)=>{const O=[...l.keyword_rules];typeof H=="string"&&(O[C]={...O[C],reaction:H}),m({...l,keyword_rules:O})},z=C=>{const R=[...l.keyword_rules];R[C]={...R[C],keywords:[...R[C].keywords||[],""]},m({...l,keyword_rules:R})},M=(C,R)=>{const H=[...l.keyword_rules];H[C]={...H[C],keywords:(H[C].keywords||[]).filter((O,X)=>X!==R)},m({...l,keyword_rules:H})},S=(C,R,H)=>{const O=[...l.keyword_rules],X=[...O[C].keywords||[]];X[R]=H,O[C]={...O[C],keywords:X},m({...l,keyword_rules:O})},F=({rule:C})=>{const R=`{ regex = [${(C.regex||[]).map(H=>`"${H}"`).join(", ")}], reaction = "${C.reaction}" }`;return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-[95vw] sm:w-[500px]",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsx(ts,{className:"h-60 rounded-md bg-muted p-3",children:e.jsx("pre",{className:"font-mono text-xs break-all",children:R})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})},E=({rule:C})=>{const R=`[[keyword_reaction.keyword_rules]] +3.某句话如果已经被回复过,不要重复回复`}),[z,M]=u.useState({emoji_chance:.4,max_reg_num:40,do_replace:!0,check_interval:10,steal_emoji:!0,content_filtration:!1,filtration_prompt:"符合公序良俗"}),[S,F]=u.useState({enable_tool:!0,all_global:!0}),[E,C]=u.useState({api_key:""}),R=[{id:"bot-basic",title:"Bot基础",description:"配置机器人的基本信息",icon:Yn},{id:"personality",title:"人格配置",description:"定义机器人的性格和说话风格",icon:Fl},{id:"emoji",title:"表情包",description:"配置表情包相关设置",icon:rd},{id:"other",title:"其他设置",description:"工具、情绪系统等配置",icon:Sn},{id:"siliconflow",title:"API配置",description:"配置硅基流动API密钥",icon:cx}],H=(c+1)/R.length*100;u.useEffect(()=>{(async()=>{try{N(!0);const[ge,pe,D,Q,I]=await Promise.all([P2(),F2(),H2(),q2(),V2()]);b(ge),w(pe),M(D),F(Q),C(I)}catch(ge){l({title:"加载配置失败",description:ge instanceof Error?ge.message:"无法加载现有配置,将使用默认值",variant:"destructive"})}finally{N(!1)}})()},[l]);const O=async()=>{p(!0);try{switch(c){case 0:await G2(j);break;case 1:await K2(y);break;case 2:await Q2(z);break;case 3:await Y2(S);break;case 4:await J2(E);break}return l({title:"保存成功",description:`${R[c].title}配置已保存`}),!0}catch(re){return l({title:"保存失败",description:re instanceof Error?re.message:"未知错误",variant:"destructive"}),!1}finally{p(!1)}},X=async()=>{await O()&&c{c>0&&d(c-1)},me=async()=>{h(!0);try{if(!await O()){h(!1);return}await Fg(),l({title:"配置完成",description:"麦麦正在重启以应用新配置..."}),await r()}catch(re){l({title:"配置失败",description:re instanceof Error?re.message:"未知错误",variant:"destructive"})}finally{h(!1)}},Ne=async()=>{try{await Fg(),a({to:"/"})}catch(re){l({title:"跳过失败",description:re instanceof Error?re.message:"未知错误",variant:"destructive"})}},je=()=>{switch(c){case 0:return e.jsx(L2,{config:j,onChange:b});case 1:return e.jsx(U2,{config:y,onChange:w});case 2:return e.jsx($2,{config:z,onChange:M});case 3:return e.jsx(I2,{config:S,onChange:F});case 4:return e.jsx(B2,{config:E,onChange:C});default:return null}};return e.jsxs("div",{className:"relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-gradient-to-br from-primary/5 via-background to-secondary/5 p-4 md:p-6",children:[e.jsx(nr,{}),e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute left-1/4 top-1/4 h-64 w-64 md:h-96 md:w-96 rounded-full bg-primary/5 blur-3xl"}),e.jsx("div",{className:"absolute right-1/4 bottom-1/4 h-64 w-64 md:h-96 md:w-96 rounded-full bg-secondary/5 blur-3xl"})]}),g?e.jsxs("div",{className:"relative z-10 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center",children:e.jsx("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),e.jsx("p",{className:"text-lg font-medium",children:"加载配置中..."}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"正在读取现有配置"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative z-10 w-full max-w-4xl",children:[e.jsxs("div",{className:"mb-6 md:mb-8 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 md:h-16 md:w-16 items-center justify-center rounded-2xl bg-primary/10",children:e.jsx(D_,{className:"h-6 w-6 md:h-8 md:w-8 text-primary",strokeWidth:2,fill:"none"})}),e.jsx("h1",{className:"mb-2 text-2xl md:text-3xl font-bold",children:"首次配置向导"}),e.jsxs("p",{className:"text-sm md:text-base text-muted-foreground",children:["让我们一起完成 ",Nx," 的初始配置"]})]}),e.jsxs("div",{className:"mb-6 md:mb-8",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between text-xs md:text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:["步骤 ",c+1," / ",R.length]}),e.jsxs("span",{className:"font-medium text-primary",children:[Math.round(H),"%"]})]}),e.jsx(tr,{value:H,className:"h-2"})]}),e.jsx("div",{className:"mb-6 md:mb-8 flex justify-between",children:R.map((re,ge)=>{const pe=re.icon;return e.jsxs("div",{className:P("flex flex-1 flex-col items-center gap-1 md:gap-2",gea({to:"/"}),className:"gap-2 w-full sm:w-auto",children:[e.jsx(id,{className:"h-4 w-4"}),"返回首页"]}),e.jsxs(_,{size:"lg",variant:"outline",onClick:()=>window.history.back(),className:"gap-2 w-full sm:w-auto",children:[e.jsx($a,{className:"h-4 w-4"}),"返回上一页"]})]}),e.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"如果您认为这是一个错误,请联系系统管理员"})})]})})}const W2=Is.memo(function({config:l,onChange:r}){const c=l.platforms||[],d=l.alias_names||[],m=()=>{r({...l,platforms:[...c,""]})},h=j=>{r({...l,platforms:c.filter((b,y)=>y!==j)})},f=(j,b)=>{const y=[...c];y[j]=b,r({...l,platforms:y})},p=()=>{r({...l,alias_names:[...d,""]})},g=j=>{r({...l,alias_names:d.filter((b,y)=>y!==j)})},N=(j,b)=>{const y=[...d];y[j]=b,r({...l,alias_names:y})};return e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"基本信息"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"platform",children:"平台"}),e.jsx(ae,{id:"platform",value:l.platform,onChange:j=>r({...l,platform:j.target.value}),placeholder:"qq"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"qq_account",children:"QQ账号"}),e.jsx(ae,{id:"qq_account",value:l.qq_account,onChange:j=>r({...l,qq_account:j.target.value}),placeholder:"123456789"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"nickname",children:"昵称"}),e.jsx(ae,{id:"nickname",value:l.nickname,onChange:j=>r({...l,nickname:j.target.value}),placeholder:"麦麦"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"别名"}),e.jsxs(_,{onClick:p,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加"]})]}),e.jsxs("div",{className:"space-y-2",children:[d.map((j,b)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{value:j,onChange:y=>N(b,y.target.value),placeholder:"小麦"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除别名 "',j||"(空)",'" 吗?此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>g(b),children:"删除"})]})]})]})]},b)),d.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无别名"})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"其他平台账号"}),e.jsxs(_,{onClick:m,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加"]})]}),e.jsxs("div",{className:"space-y-2",children:[c.map((j,b)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{value:j,onChange:y=>f(b,y.target.value),placeholder:"wx:114514"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除平台账号 "',j||"(空)",'" 吗?此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>h(b),children:"删除"})]})]})]})]},b)),c.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无其他平台账号"})]})]})]})]})})}),eS=Is.memo(function({config:l,onChange:r}){const c=()=>{r({...l,states:[...l.states,""]})},d=h=>{r({...l,states:l.states.filter((f,p)=>p!==h)})},m=(h,f)=>{const p=[...l.states];p[h]=f,r({...l,states:p})};return e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"人格设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"personality",children:"人格特质"}),e.jsx(pt,{id:"personality",value:l.personality,onChange:h=>r({...l,personality:h.target.value}),placeholder:"描述人格特质和身份特征(建议120字以内)",rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"建议120字以内,描述人格特质和身份特征"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"多重人格"}),e.jsxs(_,{onClick:c,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加人格"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"可以定义多个不同的人格状态,麦麦会随机切换"}),e.jsx("div",{className:"space-y-2",children:l.states.map((h,f)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pt,{value:h,onChange:p=>m(f,p.target.value),placeholder:"描述一个人格状态",rows:2}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsx(gs,{children:"确定要删除这个人格状态吗?此操作无法撤销。"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>d(f),children:"删除"})]})]})]})]},f))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"state_probability",children:"替换为多重人格概率"}),e.jsx(ae,{id:"state_probability",type:"number",step:"0.1",min:"0",max:"1",value:l.state_probability,onChange:h=>r({...l,state_probability:parseFloat(h.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"每次构建人格时,用多重人格替换主人格的概率(0.0-1.0)"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"reply_style",children:"表达风格"}),e.jsx(pt,{id:"reply_style",value:l.reply_style,onChange:h=>r({...l,reply_style:h.target.value}),placeholder:"描述说话的表达风格和习惯",rows:3})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"plan_style",children:"说话规则与行为风格"}),e.jsx(pt,{id:"plan_style",value:l.plan_style,onChange:h=>r({...l,plan_style:h.target.value}),placeholder:"麦麦的说话规则和行为风格",rows:5})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"visual_style",children:"识图规则"}),e.jsx(pt,{id:"visual_style",value:l.visual_style,onChange:h=>r({...l,visual_style:h.target.value}),placeholder:"识图时的处理规则",rows:3})]})]})]})})}),cl=Ew,ol=Mw,tl=u.forwardRef(({className:a,align:l="center",sideOffset:r=4,...c},d)=>e.jsx(Tw,{children:e.jsx(Ej,{ref:d,align:l,sideOffset:r,className:P("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",a),...c})}));tl.displayName=Ej.displayName;const sS=Is.memo(function({value:l,onChange:r}){const c=u.useMemo(()=>{const y=l.split("-");if(y.length===2){const[w,z]=y,[M,S]=w.split(":"),[F,E]=z.split(":");return{startHour:M?M.padStart(2,"0"):"00",startMinute:S?S.padStart(2,"0"):"00",endHour:F?F.padStart(2,"0"):"23",endMinute:E?E.padStart(2,"0"):"59"}}return{startHour:"00",startMinute:"00",endHour:"23",endMinute:"59"}},[l]),[d,m]=u.useState(c.startHour),[h,f]=u.useState(c.startMinute),[p,g]=u.useState(c.endHour),[N,j]=u.useState(c.endMinute);u.useEffect(()=>{m(c.startHour),f(c.startMinute),g(c.endHour),j(c.endMinute)},[c]);const b=(y,w,z,M)=>{const S=`${y}:${w}-${z}:${M}`;r(S)};return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",className:"w-full justify-start font-mono text-sm",children:[e.jsx(da,{className:"h-4 w-4 mr-2"}),l||"选择时间段"]})}),e.jsx(tl,{className:"w-72 sm:w-80",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-sm mb-3",children:"开始时间"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs",children:"小时"}),e.jsxs(Pe,{value:d,onValueChange:y=>{m(y),b(y,h,p,N)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:Array.from({length:24},(y,w)=>w).map(y=>e.jsx(W,{value:y.toString().padStart(2,"0"),children:y.toString().padStart(2,"0")},y))})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs",children:"分钟"}),e.jsxs(Pe,{value:h,onValueChange:y=>{f(y),b(d,y,p,N)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:Array.from({length:60},(y,w)=>w).map(y=>e.jsx(W,{value:y.toString().padStart(2,"0"),children:y.toString().padStart(2,"0")},y))})]})]})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-sm mb-3",children:"结束时间"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs",children:"小时"}),e.jsxs(Pe,{value:p,onValueChange:y=>{g(y),b(d,h,y,N)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:Array.from({length:24},(y,w)=>w).map(y=>e.jsx(W,{value:y.toString().padStart(2,"0"),children:y.toString().padStart(2,"0")},y))})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs",children:"分钟"}),e.jsxs(Pe,{value:N,onValueChange:y=>{j(y),b(d,h,p,y)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:Array.from({length:60},(y,w)=>w).map(y=>e.jsx(W,{value:y.toString().padStart(2,"0"),children:y.toString().padStart(2,"0")},y))})]})]})]})]})]})})]})}),tS=Is.memo(function({rule:l}){const r=`{ target = "${l.target}", time = "${l.time}", value = ${l.value.toFixed(1)} }`;return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-80 sm:w-96",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:r}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})}),aS=Is.memo(function({config:l,onChange:r}){const c=()=>{r({...l,talk_value_rules:[...l.talk_value_rules,{target:"",time:"00:00-23:59",value:1}]})},d=h=>{r({...l,talk_value_rules:l.talk_value_rules.filter((f,p)=>p!==h)})},m=(h,f,p)=>{const g=[...l.talk_value_rules];g[h]={...g[h],[f]:p},r({...l,talk_value_rules:g})};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"聊天设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"talk_value",children:"聊天频率(基础值)"}),e.jsx(ae,{id:"talk_value",type:"number",step:"0.1",min:"0",max:"1",value:l.talk_value,onChange:h=>r({...l,talk_value:parseFloat(h.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"越小越沉默,范围 0-1"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"think_mode",children:"思考模式"}),e.jsxs(Pe,{value:l.think_mode||"classic",onValueChange:h=>r({...l,think_mode:h}),children:[e.jsx(Ie,{id:"think_mode",children:e.jsx(Fe,{placeholder:"选择思考模式"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"classic",children:"经典模式 - 浅度思考和回复"}),e.jsx(W,{value:"deep",children:"深度模式 - 进行深度思考和回复"}),e.jsx(W,{value:"dynamic",children:"动态模式 - 自动选择思考深度"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"控制麦麦的思考深度。经典模式回复快但简单;深度模式更深入但较慢;动态模式根据情况自动选择"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"mentioned_bot_reply",checked:l.mentioned_bot_reply,onCheckedChange:h=>r({...l,mentioned_bot_reply:h})}),e.jsx(T,{htmlFor:"mentioned_bot_reply",className:"cursor-pointer",children:"启用提及必回复"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_context_size",children:"上下文长度"}),e.jsx(ae,{id:"max_context_size",type:"number",min:"1",value:l.max_context_size,onChange:h=>r({...l,max_context_size:parseInt(h.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"planner_smooth",children:"规划器平滑"}),e.jsx(ae,{id:"planner_smooth",type:"number",step:"1",min:"0",value:l.planner_smooth,onChange:h=>r({...l,planner_smooth:parseFloat(h.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"增大数值会减小 planner 负荷,推荐 1-5,0 为关闭"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"plan_reply_log_max_per_chat",children:"每个聊天流最大日志数量"}),e.jsx(ae,{id:"plan_reply_log_max_per_chat",type:"number",step:"1",min:"100",value:l.plan_reply_log_max_per_chat??1024,onChange:h=>r({...l,plan_reply_log_max_per_chat:parseInt(h.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"每个聊天流保存的 Plan/Reply 日志最大数量,超过此数量时会自动删除最老的日志"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"llm_quote",checked:l.llm_quote??!1,onCheckedChange:h=>r({...l,llm_quote:h})}),e.jsx(T,{htmlFor:"llm_quote",className:"cursor-pointer",children:"启用 LLM 控制引用"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2 ml-10",children:"启用后,LLM 可以决定是否在回复时引用消息"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"enable_talk_value_rules",checked:l.enable_talk_value_rules,onCheckedChange:h=>r({...l,enable_talk_value_rules:h})}),e.jsx(T,{htmlFor:"enable_talk_value_rules",className:"cursor-pointer",children:"启用动态发言频率规则"})]})]})]}),l.enable_talk_value_rules&&e.jsxs("div",{className:"border-t pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold",children:"动态发言频率规则"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"按时段或聊天流ID调整发言频率,优先匹配具体聊天,再匹配全局规则"})]}),e.jsxs(_,{onClick:c,size:"sm",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加规则"]})]}),l.talk_value_rules&&l.talk_value_rules.length>0?e.jsx("div",{className:"space-y-4",children:l.talk_value_rules.map((h,f)=>e.jsxs("div",{className:"rounded-lg border p-4 bg-muted/50 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["规则 #",f+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(tS,{rule:h}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"sm",children:e.jsx(os,{className:"h-4 w-4 text-destructive"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除规则 #",f+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>d(f),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"配置类型"}),e.jsxs(Pe,{value:h.target===""?"global":"specific",onValueChange:p=>{p==="global"?m(f,"target",""):m(f,"target","qq::group")},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"global",children:"全局配置"}),e.jsx(W,{value:"specific",children:"详细配置"})]})]})]}),h.target!==""&&(()=>{const p=h.target.split(":"),g=p[0]||"qq",N=p[1]||"",j=p[2]||"group";return e.jsxs("div",{className:"grid gap-4 p-3 sm:p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"平台"}),e.jsxs(Pe,{value:g,onValueChange:b=>{m(f,"target",`${b}:${N}:${j}`)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"群 ID"}),e.jsx(ae,{value:N,onChange:b=>{m(f,"target",`${g}:${b.target.value}:${j}`)},placeholder:"输入群 ID",className:"font-mono text-sm"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"类型"}),e.jsxs(Pe,{value:j,onValueChange:b=>{m(f,"target",`${g}:${N}:${b}`)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"group",children:"群组(group)"}),e.jsx(W,{value:"private",children:"私聊(private)"})]})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前聊天流 ID:",h.target||"(未设置)"]})]})})(),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"时间段 (Time)"}),e.jsx(sS,{value:h.time,onChange:p=>m(f,"time",p)}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"支持跨夜区间,例如 23:00-02:00"})]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{htmlFor:`rule-value-${f}`,className:"text-xs font-medium",children:"发言频率值 (Value)"}),e.jsx(ae,{id:`rule-value-${f}`,type:"number",step:"0.01",min:"0.01",max:"1",value:h.value,onChange:p=>{const g=parseFloat(p.target.value);isNaN(g)||m(f,"value",Math.max(.01,Math.min(1,g)))},className:"w-20 h-8 text-xs"})]}),e.jsx(el,{value:[h.value],onValueChange:p=>m(f,"value",p[0]),min:.01,max:1,step:.01,className:"w-full"}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:"0.01 (极少发言)"}),e.jsx("span",{children:"0.5"}),e.jsx("span",{children:"1.0 (正常)"})]})]})]})]},f))}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:e.jsx("p",{className:"text-sm",children:'暂无规则,点击"添加规则"按钮创建'})}),e.jsxs("div",{className:"mt-4 p-4 bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg",children:[e.jsx("h5",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"📝 规则说明"}),e.jsxs("ul",{className:"text-xs text-blue-800 dark:text-blue-200 space-y-1",children:[e.jsxs("li",{children:["• ",e.jsx("strong",{children:"Target 为空"}),":全局规则,对所有聊天生效"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"Target 指定"}),":仅对特定聊天流生效(格式:platform:id:type)"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"优先级"}),":先匹配具体聊天流规则,再匹配全局规则"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"时间支持跨夜"}),":例如 23:00-02:00 表示晚上11点到次日凌晨2点"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"数值范围"}),":建议 0-1,0 表示完全沉默,1 表示正常发言"]})]})]})]})]})}),lS=Is.memo(function({config:l,onChange:r}){const c=S=>{if(!S||!S.includes(":"))return{platform:"qq",userId:""};const[F,E]=S.split(":");return{platform:F,userId:E}},{platform:d,userId:m}=c(l.dream_send),[h,f]=u.useState(d),[p,g]=u.useState(m),N=S=>{const[F,E]=S.split("-");return{startTime:F||"09:00",endTime:E||"22:00"}},j=(S,F)=>{const E=F?`${S}:${F}`:"";r({...l,dream_send:E})},b=S=>{f(S),j(S,p)},y=S=>{g(S),j(h,S)},w=()=>{r({...l,dream_time_ranges:[...l.dream_time_ranges,"09:00-22:00"]})},z=S=>{r({...l,dream_time_ranges:l.dream_time_ranges.filter((F,E)=>E!==S)})},M=(S,F,E)=>{const C=[...l.dream_time_ranges],R=N(C[S]);F==="startTime"?R.startTime=E:R.endTime=E,C[S]=`${R.startTime}-${R.endTime}`,r({...l,dream_time_ranges:C})};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"做梦配置"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"interval_minutes",children:"做梦时间间隔(分钟)"}),e.jsx(ae,{id:"interval_minutes",type:"number",min:"1",value:l.interval_minutes,onChange:S=>r({...l,interval_minutes:Number(S.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"默认30分钟"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"max_iterations",children:"做梦最大轮次"}),e.jsx(ae,{id:"max_iterations",type:"number",min:"1",value:l.max_iterations,onChange:S=>r({...l,max_iterations:Number(S.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"默认20轮"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"first_delay_seconds",children:"首次做梦延迟(秒)"}),e.jsx(ae,{id:"first_delay_seconds",type:"number",min:"0",value:l.first_delay_seconds,onChange:S=>r({...l,first_delay_seconds:Number(S.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"程序启动后首次做梦前的延迟时间,默认60秒"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"做梦结果推送目标"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(Pe,{value:h,onValueChange:b,children:[e.jsx(Ie,{className:"w-[120px]",children:e.jsx(Fe,{placeholder:"选择平台"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"}),e.jsx(W,{value:"webui",children:"WebUI"})]})]}),e.jsx(ae,{type:"text",placeholder:"输入用户ID (例如: 123456)",value:p,onChange:S=>y(S.target.value),className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"选择平台并输入用户ID,做梦结束后将梦境发送给该用户。用户ID为空则不推送"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"做梦时间段配置"}),e.jsx(_,{type:"button",size:"sm",onClick:w,children:"添加时间段"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"设置允许做梦的时间段,支持跨夜区间(如 23:00 到次日 02:00)。列表为空则全天允许做梦"}),e.jsxs("div",{className:"space-y-2",children:[l.dream_time_ranges.map((S,F)=>{const{startTime:E,endTime:C}=N(S);return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{type:"time",value:E,onChange:R=>M(F,"startTime",R.target.value),className:"w-[140px]"}),e.jsx("span",{className:"text-muted-foreground",children:"至"}),e.jsx(ae,{type:"time",value:C,onChange:R=>M(F,"endTime",R.target.value),className:"w-[140px]"}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",onClick:()=>z(F),children:e.jsx(Sa,{className:"h-4 w-4"})})]},F)}),l.dream_time_ranges.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"当前配置为全天允许做梦"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"dream_visible",checked:l.dream_visible,onCheckedChange:S=>r({...l,dream_visible:S})}),e.jsx(T,{htmlFor:"dream_visible",className:"cursor-pointer",children:"梦境结果存储到上下文"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"开启后,梦境发送给配置的用户后,也会存储到聊天上下文中,在后续对话中可见"})]})]})}),nS=Is.memo(function({config:l,onChange:r}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"LPMM 知识库设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{checked:l.enable,onCheckedChange:c=>r({...l,enable:c})}),e.jsx(T,{className:"cursor-pointer",children:"启用 LPMM 知识库"})]}),l.enable&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"LPMM 模式"}),e.jsxs(Pe,{value:l.lpmm_mode,onValueChange:c=>r({...l,lpmm_mode:c}),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择 LPMM 模式"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"classic",children:"经典模式"}),e.jsx(W,{value:"agent",children:"Agent 模式"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"同义词搜索 TopK"}),e.jsx(ae,{type:"number",min:"1",value:l.rag_synonym_search_top_k,onChange:c=>r({...l,rag_synonym_search_top_k:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"同义词阈值"}),e.jsx(ae,{type:"number",step:"0.1",min:"0",max:"1",value:l.rag_synonym_threshold,onChange:c=>r({...l,rag_synonym_threshold:parseFloat(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"实体提取线程数"}),e.jsx(ae,{type:"number",min:"1",value:l.info_extraction_workers,onChange:c=>r({...l,info_extraction_workers:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"嵌入向量维度"}),e.jsx(ae,{type:"number",min:"1",value:l.embedding_dimension,onChange:c=>r({...l,embedding_dimension:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"嵌入并发线程数"}),e.jsx(ae,{type:"number",min:"1",value:l.max_embedding_workers,onChange:c=>r({...l,max_embedding_workers:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"每批嵌入条数"}),e.jsx(ae,{type:"number",min:"1",value:l.embedding_chunk_size,onChange:c=>r({...l,embedding_chunk_size:parseInt(c.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"同义实体数上限"}),e.jsx(ae,{type:"number",min:"1",value:l.max_synonym_entities,onChange:c=>r({...l,max_synonym_entities:parseInt(c.target.value)})})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{checked:l.enable_ppr,onCheckedChange:c=>r({...l,enable_ppr:c})}),e.jsx(T,{className:"cursor-pointer",children:"启用 PPR (低配机器可关闭)"})]})]})]})]})}),rS=Is.memo(function({config:l,onChange:r}){const[c,d]=u.useState(""),[m,h]=u.useState("WARNING"),f=()=>{c&&!l.suppress_libraries.includes(c)&&(r({...l,suppress_libraries:[...l.suppress_libraries,c]}),d(""))},p=w=>{r({...l,suppress_libraries:l.suppress_libraries.filter(z=>z!==w)})},g=()=>{c&&!l.library_log_levels[c]&&(r({...l,library_log_levels:{...l.library_log_levels,[c]:m}}),d(""),h("WARNING"))},N=w=>{const z={...l.library_log_levels};delete z[w],r({...l,library_log_levels:z})},j=["DEBUG","INFO","WARNING","ERROR","CRITICAL"],b=["FULL","compact","lite"],y=["none","title","full"];return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"日志配置"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"日期格式"}),e.jsx(ae,{value:l.date_style,onChange:w=>r({...l,date_style:w.target.value}),placeholder:"例如: m-d H:i:s"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"m=月, d=日, H=时, i=分, s=秒"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"日志级别样式"}),e.jsxs(Pe,{value:l.log_level_style,onValueChange:w=>r({...l,log_level_style:w}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:b.map(w=>e.jsx(W,{value:w,children:w},w))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"日志文本颜色"}),e.jsxs(Pe,{value:l.color_text,onValueChange:w=>r({...l,color_text:w}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:y.map(w=>e.jsx(W,{value:w,children:w},w))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"全局日志级别"}),e.jsxs(Pe,{value:l.log_level,onValueChange:w=>r({...l,log_level:w}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:j.map(w=>e.jsx(W,{value:w,children:w},w))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"控制台日志级别"}),e.jsxs(Pe,{value:l.console_log_level,onValueChange:w=>r({...l,console_log_level:w}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:j.map(w=>e.jsx(W,{value:w,children:w},w))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"文件日志级别"}),e.jsxs(Pe,{value:l.file_log_level,onValueChange:w=>r({...l,file_log_level:w}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsx(Be,{children:j.map(w=>e.jsx(W,{value:w,children:w},w))})]})]})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"mb-2 block",children:"完全屏蔽的库"}),e.jsxs("div",{className:"flex gap-2 mb-2",children:[e.jsx(ae,{value:c,onChange:w=>d(w.target.value),placeholder:"输入库名",className:"flex-1",onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),f())}}),e.jsx(_,{onClick:f,size:"sm",className:"flex-shrink-0",children:e.jsx(Xs,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:l.suppress_libraries.map(w=>e.jsxs("div",{className:"flex items-center gap-1 bg-secondary px-3 py-1 rounded-md",children:[e.jsx("span",{className:"text-sm",children:w}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>p(w),children:e.jsx(os,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},w))})]}),e.jsxs("div",{children:[e.jsx(T,{className:"mb-2 block",children:"特定库的日志级别"}),e.jsxs("div",{className:"flex gap-2 mb-2",children:[e.jsx(ae,{value:c,onChange:w=>d(w.target.value),placeholder:"输入库名",className:"flex-1"}),e.jsxs(Pe,{value:m,onValueChange:h,children:[e.jsx(Ie,{className:"w-32",children:e.jsx(Fe,{})}),e.jsx(Be,{children:j.map(w=>e.jsx(W,{value:w,children:w},w))})]}),e.jsx(_,{onClick:g,size:"sm",children:e.jsx(Xs,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),e.jsx("div",{className:"space-y-2",children:Object.entries(l.library_log_levels).map(([w,z])=>e.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[e.jsx("span",{className:"text-sm font-medium",children:w}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:z}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>N(w),children:e.jsx(os,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]})]},w))})]})]})}),iS=Is.memo(function({config:l,onChange:r}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"调试配置"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示 Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否在日志中显示提示词"})]}),e.jsx(qe,{checked:l.show_prompt,onCheckedChange:c=>r({...l,show_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示回复器 Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示回复器的提示词"})]}),e.jsx(qe,{checked:l.show_replyer_prompt,onCheckedChange:c=>r({...l,show_replyer_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示回复器推理"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示回复器的推理过程"})]}),e.jsx(qe,{checked:l.show_replyer_reasoning,onCheckedChange:c=>r({...l,show_replyer_reasoning:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示 Jargon Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示术语相关的提示词"})]}),e.jsx(qe,{checked:l.show_jargon_prompt,onCheckedChange:c=>r({...l,show_jargon_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示记忆检索 Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示记忆检索相关的提示词"})]}),e.jsx(qe,{checked:l.show_memory_prompt,onCheckedChange:c=>r({...l,show_memory_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示 Planner Prompt"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示 Planner 的提示词和原始返回结果"})]}),e.jsx(qe,{checked:l.show_planner_prompt,onCheckedChange:c=>r({...l,show_planner_prompt:c})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"显示 LPMM 相关文段"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示 LPMM 知识库找到的相关文段日志"})]}),e.jsx(qe,{checked:l.show_lpmm_paragraph,onCheckedChange:c=>r({...l,show_lpmm_paragraph:c})})]})]})]})}),cS=Is.memo(function({config:l,onChange:r}){const c=g=>{const N=g.split(":");if(N.length>=4){const j=N[0],b=N[1],y=N[2],w=N.slice(3).join(":");return{platform:j,id:b,type:y,prompt:w}}return{platform:"qq",id:"",type:"group",prompt:""}},d=g=>`${g.platform}:${g.id}:${g.type}:${g.prompt}`,m=()=>{r({...l,chat_prompts:[...l.chat_prompts,"qq::group:"]})},h=g=>{r({...l,chat_prompts:l.chat_prompts.filter((N,j)=>j!==g)})},f=(g,N)=>{const b={...c(l.chat_prompts[g]),...N},y=[...l.chat_prompts];y[g]=d(b),r({...l,chat_prompts:y})},p=({promptStr:g})=>e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-80 sm:w-96",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsxs("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:['"',g,'"']}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]});return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-orange-500/10 border border-orange-500/20",children:[e.jsx(Lt,{className:"h-5 w-5 text-orange-500 shrink-0 mt-0.5"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-medium text-orange-500",children:"实验性功能"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"此部分包含实验性功能,可能不稳定或在未来版本中发生变化。请谨慎使用,并注意不推荐在生产环境中修改私聊规则。"})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"实验性设置"}),e.jsxs("div",{className:"grid gap-6",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"lpmm_memory",checked:l.lpmm_memory??!1,onCheckedChange:g=>r({...l,lpmm_memory:g})}),e.jsx(T,{htmlFor:"lpmm_memory",className:"cursor-pointer",children:"将聊天历史总结导入到 LPMM 知识库"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-4",children:"开启后,chat_history_summarizer 总结出的历史记录会同时导入到知识库"}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"private_plan_style",children:"私聊规则(实验性)"}),e.jsx(pt,{id:"private_plan_style",value:l.private_plan_style,onChange:g=>r({...l,private_plan_style:g.target.value}),placeholder:"私聊的说话规则和行为风格(不推荐修改)",rows:4}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"⚠️ 不推荐修改此项,可能会影响私聊对话的稳定性"})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{children:"特定聊天 Prompt 配置"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"为指定聊天添加额外的 prompt,用于定制特定场景的对话行为"})]}),e.jsxs(_,{onClick:m,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加配置"]})]}),e.jsxs("div",{className:"space-y-4",children:[l.chat_prompts.map((g,N)=>{const j=c(g);return e.jsxs("div",{className:"rounded-lg border p-4 space-y-4 bg-card",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["Prompt 配置 ",N+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{promptStr:g}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsx(gs,{children:"确定要删除这个 prompt 配置吗?此操作无法撤销。"})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>h(N),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"平台"}),e.jsxs(Pe,{value:j.platform,onValueChange:b=>f(N,{platform:b}),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择平台"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"}),e.jsx(W,{value:"webui",children:"WebUI"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:j.type==="group"?"群号":"用户ID"}),e.jsx(ae,{value:j.id,onChange:b=>f(N,{id:b.target.value}),placeholder:j.type==="group"?"输入群号":"输入用户ID",className:"font-mono"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"类型"}),e.jsxs(Pe,{value:j.type,onValueChange:b=>f(N,{type:b}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"group",children:"群聊 (group)"}),e.jsx(W,{value:"private",children:"私聊 (private)"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"Prompt 内容"}),e.jsx(pt,{value:j.prompt,onChange:b=>f(N,{prompt:b.target.value}),placeholder:"输入额外的 prompt 内容,例如:这是一个摄影群,你精通摄影知识",rows:3}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这段文本会作为系统提示添加到该聊天的上下文中"})]}),e.jsxs("div",{className:"rounded-md bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(dx,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"原始格式"})]}),e.jsx("code",{className:"text-xs font-mono text-muted-foreground break-all",children:g||"(未配置)"})]})]})]},N)}),l.chat_prompts.length===0&&e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx("p",{className:"text-sm",children:"暂无特定聊天 prompt 配置"}),e.jsx("p",{className:"text-xs mt-1",children:'点击上方"添加配置"按钮创建新配置'})]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 p-4 rounded-lg bg-muted/30 border",children:[e.jsx("p",{className:"font-medium text-foreground",children:"💡 使用说明"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 pl-2",children:[e.jsx("li",{children:"为不同的聊天环境配置专属的行为提示"}),e.jsx("li",{children:"支持多个平台:QQ、微信、WebUI"}),e.jsx("li",{children:"可为群聊或私聊分别配置"}),e.jsx("li",{children:"Prompt 会自动注入到该聊天的上下文中"})]}),e.jsx("p",{className:"font-medium text-foreground mt-3",children:"📝 配置示例"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 pl-2",children:[e.jsxs("li",{children:["摄影群:",e.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"这是一个摄影群,你精通摄影知识"})]}),e.jsxs("li",{children:["二次元群:",e.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"这是一个二次元交流群"})]}),e.jsxs("li",{children:["好友私聊:",e.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"这是你与好朋友的私聊"})]})]})]})]})]})]})]})}),oS=Is.memo(function({config:l,onChange:r}){const[c,d]=u.useState(""),[m,h]=u.useState(""),f=()=>{c&&!l.auth_token.includes(c)&&(r({...l,auth_token:[...l.auth_token,c]}),d(""))},p=j=>{r({...l,auth_token:l.auth_token.filter((b,y)=>y!==j)})},g=()=>{m&&!l.api_server_allowed_api_keys.includes(m)&&(r({...l,api_server_allowed_api_keys:[...l.api_server_allowed_api_keys,m]}),h(""))},N=j=>{r({...l,api_server_allowed_api_keys:l.api_server_allowed_api_keys.filter((b,y)=>y!==j)})};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"旧版 API 认证令牌"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"用于旧版 API 验证,为空则不启用验证"}),e.jsxs("div",{className:"flex gap-2 mb-2",children:[e.jsx(ae,{value:c,onChange:j=>d(j.target.value),placeholder:"输入认证令牌",onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),f())}}),e.jsx(_,{onClick:f,size:"sm",children:e.jsx(Xs,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),e.jsx("div",{className:"space-y-2",children:l.auth_token.map((j,b)=>e.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[e.jsx("span",{className:"text-sm font-mono",children:j}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>p(b),children:e.jsx(os,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},b))})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"新版 API Server 配置"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"启用新版 API Server"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"是否启用额外的新版 API Server(额外监听端口)"})]}),e.jsx(qe,{checked:l.enable_api_server,onCheckedChange:j=>r({...l,enable_api_server:j})})]}),l.enable_api_server&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"主机地址"}),e.jsx(ae,{value:l.api_server_host,onChange:j=>r({...l,api_server_host:j.target.value}),placeholder:"0.0.0.0"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"端口号"}),e.jsx(ae,{type:"number",value:l.api_server_port,onChange:j=>r({...l,api_server_port:parseInt(j.target.value)}),placeholder:"8090"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{checked:l.api_server_use_wss,onCheckedChange:j=>r({...l,api_server_use_wss:j})}),e.jsx(T,{children:"启用 WSS 安全连接"})]}),l.api_server_use_wss&&e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"SSL 证书文件路径"}),e.jsx(ae,{value:l.api_server_cert_file,onChange:j=>r({...l,api_server_cert_file:j.target.value}),placeholder:"cert.pem"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"SSL 密钥文件路径"}),e.jsx(ae,{value:l.api_server_key_file,onChange:j=>r({...l,api_server_key_file:j.target.value}),placeholder:"key.pem"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"mb-2 block",children:"允许的 API Key 列表"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"为空则允许所有连接"}),e.jsxs("div",{className:"flex gap-2 mb-2",children:[e.jsx(ae,{value:m,onChange:j=>h(j.target.value),placeholder:"输入 API Key",onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),g())}}),e.jsx(_,{onClick:g,size:"sm",children:e.jsx(Xs,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),e.jsx("div",{className:"space-y-2",children:l.api_server_allowed_api_keys.map((j,b)=>e.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[e.jsx("span",{className:"text-sm font-mono",children:j}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>N(b),children:e.jsx(os,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},b))})]})]})]})]})]})}),dS=Is.memo(function({config:l,onChange:r}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"统计信息"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:"启用统计信息发送"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"发送匿名统计信息,帮助我们了解全球有多少只麦麦在运行"})]}),e.jsx(qe,{checked:l.enable,onCheckedChange:c=>r({...l,enable:c})})]})]})}),uS=Is.memo(function({emojiConfig:l,memoryConfig:r,toolConfig:c,voiceConfig:d,onEmojiChange:m,onMemoryChange:h,onToolChange:f,onVoiceChange:p}){return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"工具设置"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"enable_tool",checked:c.enable_tool,onCheckedChange:g=>f({...c,enable_tool:g})}),e.jsx(T,{htmlFor:"enable_tool",className:"cursor-pointer",children:"启用工具系统"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"允许麦麦使用各种工具来增强功能"}),e.jsxs("div",{className:"flex items-center space-x-2 pt-2",children:[e.jsx(qe,{id:"enable_asr",checked:d.enable_asr,onCheckedChange:g=>p({...d,enable_asr:g})}),e.jsx(T,{htmlFor:"enable_asr",className:"cursor-pointer",children:"启用语音识别"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"启用后麦麦可以识别语音消息,需要配置语音识别模型"})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"记忆设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_agent_iterations",children:"记忆思考深度"}),e.jsx(ae,{id:"max_agent_iterations",type:"number",min:"1",value:r.max_agent_iterations,onChange:g=>h({...r,max_agent_iterations:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"最低为 1(不深入思考)"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"agent_timeout_seconds",children:"最长回忆时间(秒)"}),e.jsx(ae,{id:"agent_timeout_seconds",type:"number",min:"1",step:"0.1",value:r.agent_timeout_seconds??120,onChange:g=>h({...r,agent_timeout_seconds:parseFloat(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"记忆检索的超时时间,避免过长的等待"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"enable_jargon_detection",checked:r.enable_jargon_detection??!0,onCheckedChange:g=>h({...r,enable_jargon_detection:g})}),e.jsx(T,{htmlFor:"enable_jargon_detection",className:"cursor-pointer",children:"启用黑话识别"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"记忆检索过程中是否启用黑话识别"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"global_memory",checked:r.global_memory??!1,onCheckedChange:g=>h({...r,global_memory:g})}),e.jsx(T,{htmlFor:"global_memory",className:"cursor-pointer",children:"全局记忆查询"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"允许记忆检索在所有聊天记录中进行全局查询(忽略当前聊天流)"}),e.jsxs("div",{className:"border-t pt-4 mt-4",children:[e.jsx("h4",{className:"text-sm font-semibold mb-3",children:"聊天历史总结配置"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"chat_history_topic_check_message_threshold",children:"话题检查消息数阈值"}),e.jsx(ae,{id:"chat_history_topic_check_message_threshold",type:"number",min:"1",value:r.chat_history_topic_check_message_threshold??80,onChange:g=>h({...r,chat_history_topic_check_message_threshold:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"当累积消息数达到此值时触发话题检查"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"chat_history_topic_check_time_hours",children:"话题检查时间阈值(小时)"}),e.jsx(ae,{id:"chat_history_topic_check_time_hours",type:"number",min:"0.1",step:"0.1",value:r.chat_history_topic_check_time_hours??8,onChange:g=>h({...r,chat_history_topic_check_time_hours:parseFloat(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"当距离上次检查超过此时间且消息数达到最小阈值时触发话题检查"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"chat_history_topic_check_min_messages",children:"时间触发最小消息数"}),e.jsx(ae,{id:"chat_history_topic_check_min_messages",type:"number",min:"1",value:r.chat_history_topic_check_min_messages??20,onChange:g=>h({...r,chat_history_topic_check_min_messages:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"时间触发模式下的最小消息数阈值"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"chat_history_finalize_no_update_checks",children:"打包存储连续无更新次数"}),e.jsx(ae,{id:"chat_history_finalize_no_update_checks",type:"number",min:"1",value:r.chat_history_finalize_no_update_checks??3,onChange:g=>h({...r,chat_history_finalize_no_update_checks:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"当话题连续N次检查无新增内容时触发打包存储"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"chat_history_finalize_message_count",children:"打包存储消息条数阈值"}),e.jsx(ae,{id:"chat_history_finalize_message_count",type:"number",min:"1",value:r.chat_history_finalize_message_count??5,onChange:g=>h({...r,chat_history_finalize_message_count:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"当话题的消息条数超过此值时触发打包存储"})]})]})]})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"表情包设置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"emoji_chance",children:"表情包激活概率"}),e.jsx(ae,{id:"emoji_chance",type:"number",step:"0.1",min:"0",max:"1",value:l.emoji_chance,onChange:g=>m({...l,emoji_chance:parseFloat(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"范围 0-1,越大越容易发送表情包"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_reg_num",children:"最大注册数量"}),e.jsx(ae,{id:"max_reg_num",type:"number",min:"1",value:l.max_reg_num,onChange:g=>m({...l,max_reg_num:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦最多可以注册的表情包数量"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"check_interval",children:"检查间隔(分钟)"}),e.jsx(ae,{id:"check_interval",type:"number",min:"1",value:l.check_interval,onChange:g=>m({...l,check_interval:parseInt(g.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"检查表情包(注册、破损、删除)的时间间隔"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"do_replace",checked:l.do_replace,onCheckedChange:g=>m({...l,do_replace:g})}),e.jsx(T,{htmlFor:"do_replace",className:"cursor-pointer",children:"达到最大数量时替换表情包"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"steal_emoji",checked:l.steal_emoji,onCheckedChange:g=>m({...l,steal_emoji:g})}),e.jsx(T,{htmlFor:"steal_emoji",className:"cursor-pointer",children:"偷取表情包"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"允许麦麦将看到的表情包据为己有"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"content_filtration",checked:l.content_filtration,onCheckedChange:g=>m({...l,content_filtration:g})}),e.jsx(T,{htmlFor:"content_filtration",className:"cursor-pointer",children:"启用表情包过滤"})]}),l.content_filtration&&e.jsxs("div",{className:"grid gap-2 pl-6 border-l-2 border-primary/20",children:[e.jsx(T,{htmlFor:"filtration_prompt",children:"过滤要求"}),e.jsx(ae,{id:"filtration_prompt",value:l.filtration_prompt,onChange:g=>m({...l,filtration_prompt:g.target.value}),placeholder:"符合公序良俗"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"只有符合此要求的表情包才会被保存"})]})]})]})})]})}),mS=Is.memo(function({member:l,groupIndex:r,memberIndex:c,availableChatIds:d,onUpdate:m,onRemove:h}){const f=d.includes(l)||l==="*",[p,g]=u.useState(!f);return e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"flex-1 flex gap-2",children:p?e.jsxs(e.Fragment,{children:[e.jsx(ae,{value:l,onChange:N=>m(r,c,N.target.value),placeholder:'输入 "*" 或 "qq:123456:group"',className:"flex-1"}),d.length>0&&e.jsx(_,{size:"sm",variant:"outline",onClick:()=>g(!1),title:"切换到下拉选择",children:"下拉"})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{value:l,onValueChange:N=>m(r,c,N),children:[e.jsx(Ie,{className:"flex-1",children:e.jsx(Fe,{placeholder:"选择聊天流"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"*",children:"* (全局共享)"}),d.map((N,j)=>e.jsx(W,{value:N,children:N},j))]})]}),e.jsx(_,{size:"sm",variant:"outline",onClick:()=>g(!0),title:"切换到手动输入",children:"输入"})]})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除组成员 "',l||"(空)",'" 吗?此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>h(r,c),children:"删除"})]})]})]})]})}),xS=Is.memo(function({config:l,onChange:r}){const c=()=>{r({...l,learning_list:[...l.learning_list,["","enable","enable","1.0"]]})},d=b=>{r({...l,learning_list:l.learning_list.filter((y,w)=>w!==b)})},m=(b,y,w)=>{const z=[...l.learning_list];z[b][y]=w,r({...l,learning_list:z})},h=({rule:b})=>{const y=`["${b[0]}", "${b[1]}", "${b[2]}", "${b[3]}"]`;return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-80 sm:w-96",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:y}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})},f=()=>{r({...l,expression_groups:[...l.expression_groups,[]]})},p=b=>{r({...l,expression_groups:l.expression_groups.filter((y,w)=>w!==b)})},g=b=>{const y=[...l.expression_groups];y[b]=[...y[b],""],r({...l,expression_groups:y})},N=(b,y)=>{const w=[...l.expression_groups];w[b]=w[b].filter((z,M)=>M!==y),r({...l,expression_groups:w})},j=(b,y,w)=>{const z=[...l.expression_groups];z[b][y]=w,r({...l,expression_groups:z})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"黑话设置"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"all_global_jargon",checked:l.all_global_jargon??!1,onCheckedChange:b=>r({...l,all_global_jargon:b})}),e.jsx(T,{htmlFor:"all_global_jargon",className:"cursor-pointer",children:"全局黑话模式"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"开启后,新增的黑话将默认设为全局(所有聊天流共享)。关闭后,已记录的全局黑话不会改变,需要手动删除。"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"enable_jargon_explanation",checked:l.enable_jargon_explanation??!0,onCheckedChange:b=>r({...l,enable_jargon_explanation:b})}),e.jsx(T,{htmlFor:"enable_jargon_explanation",className:"cursor-pointer",children:"启用黑话解释"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"在回复前尝试对上下文中的黑话进行解释。关闭可减少一次LLM调用,仅影响回复前的黑话匹配与解释,不影响黑话学习。"})]}),e.jsxs("div",{children:[e.jsx(T,{htmlFor:"jargon_mode",children:"黑话解释来源模式"}),e.jsxs(Pe,{value:l.jargon_mode??"context",onValueChange:b=>r({...l,jargon_mode:b}),children:[e.jsx(Ie,{id:"jargon_mode",className:"mt-2",children:e.jsx(Fe,{placeholder:"选择黑话解释来源"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"context",children:"上下文模式(自动匹配黑话)"}),e.jsx(W,{value:"planner",children:"Planner模式(使用unknown_words列表)"})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["上下文模式:使用上下文自动匹配黑话并解释",e.jsx("br",{}),"Planner模式:仅使用Planner在reply动作中给出的unknown_words列表进行黑话检索"]})]})]}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",children:"表达学习配置"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置麦麦如何学习和使用表达方式"})]}),e.jsxs(_,{onClick:c,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加规则"]})]}),e.jsxs("div",{className:"space-y-4",children:[l.learning_list.map((b,y)=>{const w=l.learning_list.some((C,R)=>R!==y&&C[0]===""),z=b[0]==="",M=b[0].split(":"),S=M[0]||"qq",F=M[1]||"",E=M[2]||"group";return e.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["规则 ",y+1," ",z&&"(全局配置)"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{rule:b}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除学习规则 ",y+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>d(y),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"配置类型"}),e.jsxs(Pe,{value:z?"global":"specific",onValueChange:C=>{C==="global"?m(y,0,""):m(y,0,"qq::group")},disabled:w&&!z,children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"global",children:"全局配置"}),e.jsx(W,{value:"specific",disabled:w&&!z,children:"详细配置"})]})]}),w&&!z&&e.jsx("p",{className:"text-xs text-amber-600",children:"已存在全局配置,无法创建新的全局配置"})]}),!z&&e.jsxs("div",{className:"grid gap-4 p-3 sm:p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"平台"}),e.jsxs(Pe,{value:S,onValueChange:C=>{m(y,0,`${C}:${F}:${E}`)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"群 ID"}),e.jsx(ae,{value:F,onChange:C=>{m(y,0,`${S}:${C.target.value}:${E}`)},placeholder:"输入群 ID",className:"font-mono text-sm"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"类型"}),e.jsxs(Pe,{value:E,onValueChange:C=>{m(y,0,`${S}:${F}:${C}`)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"group",children:"群组(group)"}),e.jsx(W,{value:"private",children:"私聊(private)"})]})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前聊天流 ID:",b[0]||"(未设置)"]})]}),e.jsx("div",{className:"grid gap-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs font-medium",children:"使用学到的表达"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦使用从聊天中学到的表达方式"})]}),e.jsx(qe,{checked:b[1]==="enable",onCheckedChange:C=>m(y,1,C?"enable":"disable")})]})}),e.jsx("div",{className:"grid gap-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs font-medium",children:"学习表达"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦从聊天中学习新的表达方式"})]}),e.jsx(qe,{checked:b[2]==="enable",onCheckedChange:C=>m(y,2,C?"enable":"disable")})]})}),e.jsx("div",{className:"grid gap-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs font-medium",children:"启用黑话学习"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦在此聊天流中学习和记录黑话"})]}),e.jsx(qe,{checked:b[3]==="true"||b[3]==="enable",onCheckedChange:C=>m(y,3,C?"true":"false")})]})})]})]},y)}),l.learning_list.length===0&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无学习规则,点击"添加规则"开始配置'})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",children:"表达优化配置"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置麦麦如何优化和改进表达方式"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"expression_self_reflect",className:"cursor-pointer font-medium",children:"自动表达优化"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后,麦麦会自动检查并优化表达方式,无需管理员手动干预"})]}),e.jsx(qe,{id:"expression_self_reflect",checked:l.expression_self_reflect??!1,onCheckedChange:b=>r({...l,expression_self_reflect:b})})]}),l.expression_self_reflect&&e.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary/20",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"expression_auto_check_interval",children:"自动检查间隔(秒)"}),e.jsx(ae,{id:"expression_auto_check_interval",type:"number",min:"60",value:l.expression_auto_check_interval??3600,onChange:b=>r({...l,expression_auto_check_interval:parseInt(b.target.value)||3600})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"表达方式自动检查的间隔时间(单位:秒),默认值:3600秒(1小时)"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"expression_auto_check_count",children:"每次检查数量"}),e.jsx(ae,{id:"expression_auto_check_count",type:"number",min:"1",max:"100",value:l.expression_auto_check_count??10,onChange:b=>r({...l,expression_auto_check_count:parseInt(b.target.value)||10})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"每次自动检查时随机选取的表达方式数量,默认值:10条"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"自定义评估标准"}),e.jsxs(_,{onClick:()=>{r({...l,expression_auto_check_custom_criteria:[...l.expression_auto_check_custom_criteria||[],""]})},size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加标准"]})]}),e.jsxs("div",{className:"space-y-2",children:[(l.expression_auto_check_custom_criteria||[]).map((b,y)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{value:b,onChange:w=>{const z=[...l.expression_auto_check_custom_criteria||[]];z[y]=w.target.value,r({...l,expression_auto_check_custom_criteria:z})},placeholder:"输入评估标准,例如:是否符合角色人设",className:"flex-1"}),e.jsx(_,{onClick:()=>{r({...l,expression_auto_check_custom_criteria:(l.expression_auto_check_custom_criteria||[]).filter((w,z)=>z!==y)})},size:"icon",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})]},y)),(!l.expression_auto_check_custom_criteria||l.expression_auto_check_custom_criteria.length===0)&&e.jsx("div",{className:"text-center py-4 text-muted-foreground text-sm",children:'暂无自定义标准,点击"添加标准"开始配置'})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这些标准会被添加到评估提示词中,作为额外的评估要求"})]})]})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"expression_checked_only",className:"cursor-pointer font-medium",children:"仅使用已审核通过的表达方式"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"开启后,只有通过审核(已检查)的项目会被使用;关闭时,未审核的项目也会被使用。无论开关状态,被拒绝的项目永远不会被使用。"})]}),e.jsx(qe,{id:"expression_checked_only",checked:l.expression_checked_only??!1,onCheckedChange:b=>r({...l,expression_checked_only:b})})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{htmlFor:"expression_manual_reflect",className:"cursor-pointer font-medium",children:"手动表达优化"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后,麦麦会主动向管理员询问表达方式是否合适"})]}),e.jsx(qe,{id:"expression_manual_reflect",checked:l.expression_manual_reflect??!1,onCheckedChange:b=>r({...l,expression_manual_reflect:b})})]}),l.expression_manual_reflect&&e.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary/20",children:[e.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("span",{className:"text-sm font-medium",children:"反思操作员"})}),e.jsx("div",{className:"space-y-4",children:(()=>{const y=(l.manual_reflect_operator_id||"").split(":"),w=y[0]||"qq",z=y[1]||"",M=y[2]||"private";return e.jsxs("div",{className:"grid gap-4 p-3 sm:p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"平台"}),e.jsxs(Pe,{value:w,onValueChange:S=>{r({...l,manual_reflect_operator_id:`${S}:${z}:${M}`})},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"用户/群 ID"}),e.jsx(ae,{value:z,onChange:S=>{r({...l,manual_reflect_operator_id:`${w}:${S.target.value}:${M}`})},placeholder:"输入 ID",className:"font-mono text-sm"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"类型"}),e.jsxs(Pe,{value:M,onValueChange:S=>{r({...l,manual_reflect_operator_id:`${w}:${z}:${S}`})},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"private",children:"私聊(private)"}),e.jsx(W,{value:"group",children:"群组(group)"})]})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前操作员 ID:",l.manual_reflect_operator_id||"(未设置)"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:'手动表达优化操作员ID,格式:platform:id:type (例如 "qq:123456:private" 或 "qq:654321:group")'})]})})()})]}),e.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-medium",children:"允许进行表达反思的聊天流"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"只有在此列表中的聊天流才会提出问题并跟踪。如果列表为空,则所有聊天流都可以进行表达反思(前提是启用了手动表达优化)"})]}),e.jsxs(_,{onClick:()=>{r({...l,allow_reflect:[...l.allow_reflect||[],"qq::group"]})},size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加聊天流"]})]}),e.jsxs("div",{className:"space-y-2",children:[(l.allow_reflect||[]).map((b,y)=>{const w=b.split(":"),z=w[0]||"qq",M=w[1]||"",S=w[2]||"group";return e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-muted/50",children:[e.jsxs(Pe,{value:z,onValueChange:F=>{const E=[...l.allow_reflect];E[y]=`${F}:${M}:${S}`,r({...l,allow_reflect:E})},children:[e.jsx(Ie,{className:"w-24",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"qq",children:"QQ"}),e.jsx(W,{value:"wx",children:"微信"})]})]}),e.jsx(ae,{value:M,onChange:F=>{const E=[...l.allow_reflect];E[y]=`${z}:${F.target.value}:${S}`,r({...l,allow_reflect:E})},placeholder:"ID",className:"flex-1 font-mono text-sm"}),e.jsxs(Pe,{value:S,onValueChange:F=>{const E=[...l.allow_reflect];E[y]=`${z}:${M}:${F}`,r({...l,allow_reflect:E})},children:[e.jsx(Ie,{className:"w-32",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"group",children:"群组"}),e.jsx(W,{value:"private",children:"私聊"})]})]}),e.jsx(_,{onClick:()=>{r({...l,allow_reflect:l.allow_reflect.filter((F,E)=>E!==y)})},size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})]},y)}),(!l.allow_reflect||l.allow_reflect.length===0)&&e.jsx("div",{className:"text-center py-4 text-muted-foreground text-sm",children:"列表为空,所有聊天流都可以进行表达反思"})]})]})]})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",children:"表达共享组配置"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置不同聊天流之间如何共享学到的表达方式"})]}),e.jsxs(_,{onClick:f,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加共享组"]})]}),e.jsxs("div",{className:"space-y-4",children:[l.expression_groups.map((b,y)=>{const w=l.learning_list.map(z=>z[0]).filter(z=>z!=="");return e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["共享组 ",y+1,b.length===1&&b[0]==="*"&&"(全局共享)"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(_,{onClick:()=>g(y),size:"sm",variant:"outline",children:e.jsx(Xs,{className:"h-4 w-4"})}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除共享组 ",y+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>p(y),children:"删除"})]})]})]})]})]}),e.jsx("div",{className:"space-y-2",children:b.map((z,M)=>e.jsx(mS,{member:z,groupIndex:y,memberIndex:M,availableChatIds:w,onUpdate:j,onRemove:N},`${y}-${M}`))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:'提示:可以从下拉框选择已配置的聊天流,或手动输入。输入 "*" 启用全局共享'})]},y)}),l.expression_groups.length===0&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无共享组,点击"添加共享组"开始配置'})]})]})})]})});function hS({regex:a,reaction:l,onRegexChange:r,onReactionChange:c}){const[d,m]=u.useState(!1),[h,f]=u.useState(""),[p,g]=u.useState(null),[N,j]=u.useState(""),[b,y]=u.useState({}),[w,z]=u.useState(""),M=u.useRef(null),[S,F]=u.useState("build"),E=O=>O.replace(/\(\?P<([^>]+)>/g,"(?<$1>"),C=(O,X=0)=>{const L=M.current;if(!L)return;const me=L.selectionStart||0,Ne=L.selectionEnd||0,je=a.substring(0,me)+O+a.substring(Ne);r(je),setTimeout(()=>{const re=me+O.length+X;L.setSelectionRange(re,re),L.focus()},0)};u.useEffect(()=>{if(!a||!h){p!==null&&g(null),Object.keys(b).length>0&&y({}),w!==l&&z(l),N!==""&&j("");return}try{const O=E(a),X=new RegExp(O,"g"),L=h.match(X);g(L),j("");const Ne=new RegExp(O).exec(h);if(Ne&&Ne.groups){y(Ne.groups);let je=l;Object.entries(Ne.groups).forEach(([re,ge])=>{je=je.replace(new RegExp(`\\[${re}\\]`,"g"),ge||"")}),z(je)}else y({}),z(l)}catch(O){j(O.message),g(null),y({}),z(l)}},[a,h,l,p,b,w,N]);const R=()=>{if(!h||!p||p.length===0)return e.jsx("span",{className:"text-muted-foreground",children:h||"请输入测试文本"});try{const O=E(a),X=new RegExp(O,"g");let L=0;const me=[];let Ne;for(;(Ne=X.exec(h))!==null;)Ne.index>L&&me.push(e.jsx("span",{children:h.substring(L,Ne.index)},`text-${L}`)),me.push(e.jsx("span",{className:"bg-yellow-200 dark:bg-yellow-900 font-semibold",children:Ne[0]},`match-${Ne.index}`)),L=Ne.index+Ne[0].length;return L)",desc:"Python风格命名捕获组",moveCursor:-1},{label:"非捕获组",pattern:"(?:)",desc:"分组但不保存匹配结果",moveCursor:-1}]},{category:"字符类",items:[{label:"字符集",pattern:"[]",desc:"匹配括号内的任意字符",moveCursor:-1},{label:"排除字符",pattern:"[^]",desc:"匹配不在括号内的字符",moveCursor:-1},{label:"范围",pattern:"[a-z]",desc:"匹配a到z的字符"},{label:"中文字符",pattern:"[\\u4e00-\\u9fa5]",desc:"匹配中文汉字"}]},{category:"常用模板",items:[{label:"捕获词语",pattern:"(?P\\S+)",desc:"捕获一个词语"},{label:"捕获句子",pattern:"(?P.+)",desc:"捕获整个句子"},{label:"捕获数字",pattern:"(?P\\d+)",desc:"捕获一个或多个数字"},{label:"可选词语",pattern:"(?:词语1|词语2)",desc:"匹配多个可选项之一"}]}];return e.jsxs(Qs,{open:d,onOpenChange:m,children:[e.jsx(dd,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ux,{className:"h-4 w-4 mr-1"}),"正则编辑器"]})}),e.jsxs(Hs,{className:"max-w-[95vw] sm:max-w-[900px] max-h-[90vh]",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"正则表达式编辑器"}),e.jsx(at,{className:"text-sm",children:"使用可视化工具构建正则表达式,并实时测试效果"})]}),e.jsx(ts,{className:"max-h-[calc(90vh-120px)]",children:e.jsxs(Jt,{value:S,onValueChange:O=>F(O),className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2",children:[e.jsx(Xe,{value:"build",children:"🔧 构建器"}),e.jsx(Xe,{value:"test",children:"🧪 测试器"})]}),e.jsxs(Ss,{value:"build",className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"正则表达式"}),e.jsx(ae,{ref:M,value:a,onChange:O=>r(O.target.value),className:"font-mono text-sm",placeholder:"点击下方按钮构建正则表达式..."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"Reaction 内容"}),e.jsx(pt,{value:l,onChange:O=>c(O.target.value),placeholder:"使用 [捕获组名] 引用捕获的内容...",rows:3,className:"text-sm"})]}),e.jsxs("div",{className:"space-y-4 border-t pt-4",children:[H.map(O=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("h5",{className:"text-xs font-semibold text-primary",children:O.category}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:O.items.map(X=>e.jsx(_,{variant:"outline",size:"sm",className:"justify-start h-auto py-2 px-3",onClick:()=>C(X.pattern,X.moveCursor||0),children:e.jsxs("div",{className:"flex flex-col items-start w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 w-full",children:[e.jsx("span",{className:"text-xs font-medium",children:X.label}),e.jsx("code",{className:"ml-auto text-xs bg-muted px-1.5 py-0.5 rounded font-mono",children:X.pattern})]}),e.jsx("span",{className:"text-xs text-muted-foreground mt-0.5",children:X.desc})]})},X.label))})]},O.category)),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx("h5",{className:"text-xs font-semibold text-primary",children:"完整示例模板"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(_,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>r("^(?P\\S{1,20})是这样的$"),children:e.jsxs("div",{className:"flex flex-col items-start w-full",children:[e.jsxs("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:["^(?P\\S","{1,20}",")是这样的$"]}),e.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"匹配「某事物是这样的」并捕获事物名称"})]})}),e.jsx(_,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>r("(?:[^,。.\\s]+,\\s*)?我(?:也)?[没沒]要求你\\s*(?P.+?)[.。,,]?$"),children:e.jsxs("div",{className:"flex flex-col items-start w-full",children:[e.jsx("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:"(?:[^,。.\\s]+,\\s*)?我(?:也)?[没沒]要求你\\s*(?P.+?)[.。,,]?$"}),e.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"匹配「我没要求你做某事」并捕获具体行为"})]})}),e.jsx(_,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>r("(?P.+?)(?:是|为什么|怎么)"),children:e.jsxs("div",{className:"flex flex-col items-start w-full",children:[e.jsx("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:"(?P.+?)(?:是|为什么|怎么)"}),e.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"捕获问题主题词"})]})})]})]})]}),e.jsxs("div",{className:"rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3 space-y-1",children:[e.jsx("p",{className:"text-xs font-medium text-blue-900 dark:text-blue-100",children:"💡 使用提示"}),e.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-300 space-y-1 list-disc list-inside",children:[e.jsx("li",{children:"点击输入框设置光标位置,然后点击按钮插入模式"}),e.jsxs("li",{children:["命名捕获组格式:",e.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"(?P<名称>模式)"})]}),e.jsxs("li",{children:["在 reaction 中使用 ",e.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"[名称]"})," 引用捕获的内容"]}),e.jsx("li",{children:"切换到测试器标签页验证正则表达式效果"})]})]})]}),e.jsxs(Ss,{value:"test",className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"当前正则表达式"}),e.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:a||"(未设置)"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"test-text",className:"text-sm font-medium",children:"测试文本"}),e.jsx(pt,{id:"test-text",value:h,onChange:O=>f(O.target.value),placeholder:`在此输入要测试的文本... +例如:打游戏是这样的`,className:"min-h-[100px] text-sm"})]}),N&&e.jsxs("div",{className:"rounded-md bg-destructive/10 border border-destructive/20 p-3",children:[e.jsx("p",{className:"text-sm text-destructive font-medium",children:"正则表达式错误"}),e.jsx("p",{className:"text-xs text-destructive/80 mt-1",children:N})]}),!N&&h&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"flex items-center gap-2",children:p&&p.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),e.jsxs("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:["匹配成功 (",p.length," 处)"]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-gray-400"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"无匹配"})]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"匹配高亮"}),e.jsx(ts,{className:"h-40 rounded-md bg-muted p-3",children:e.jsx("div",{className:"text-sm break-words",children:R()})})]}),Object.keys(b).length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"命名捕获组"}),e.jsx(ts,{className:"h-32 rounded-md border p-3",children:e.jsx("div",{className:"space-y-2",children:Object.entries(b).map(([O,X])=>e.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[e.jsxs("span",{className:"font-mono font-semibold text-primary min-w-[80px]",children:["[",O,"]"]}),e.jsx("span",{className:"text-muted-foreground",children:"="}),e.jsx("span",{className:"font-mono bg-muted px-2 py-0.5 rounded",children:X})]},O))})})]}),Object.keys(b).length>0&&l&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"Reaction 替换预览"}),e.jsx(ts,{className:"h-48 rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3",children:e.jsx("div",{className:"text-sm break-words",children:w})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"reaction 中的 [name] 已被替换为对应的捕获组值"})]})]}),e.jsxs("div",{className:"rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3 space-y-1",children:[e.jsx("p",{className:"text-xs font-medium text-blue-900 dark:text-blue-100",children:"💡 测试说明"}),e.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-300 space-y-1 list-disc list-inside",children:[e.jsx("li",{children:"匹配的文本会以黄色背景高亮显示"}),e.jsx("li",{children:"命名捕获组的值会显示在下方列表中"}),e.jsx("li",{children:"Reaction 替换预览显示最终生成的反应内容"}),e.jsx("li",{children:"如需修改正则,切换回构建器标签页"})]})]})]})]})})]})]})}const fS=Is.memo(function({keywordReactionConfig:l,responsePostProcessConfig:r,chineseTypoConfig:c,responseSplitterConfig:d,onKeywordReactionChange:m,onResponsePostProcessChange:h,onChineseTypoChange:f,onResponseSplitterChange:p}){const g=()=>{m({...l,regex_rules:[...l.regex_rules,{regex:[""],reaction:""}]})},N=C=>{m({...l,regex_rules:l.regex_rules.filter((R,H)=>H!==C)})},j=(C,R,H)=>{const O=[...l.regex_rules];R==="regex"&&typeof H=="string"?O[C]={...O[C],regex:[H]}:R==="reaction"&&typeof H=="string"&&(O[C]={...O[C],reaction:H}),m({...l,regex_rules:O})},b=()=>{m({...l,keyword_rules:[...l.keyword_rules,{keywords:[],reaction:""}]})},y=C=>{m({...l,keyword_rules:l.keyword_rules.filter((R,H)=>H!==C)})},w=(C,R,H)=>{const O=[...l.keyword_rules];typeof H=="string"&&(O[C]={...O[C],reaction:H}),m({...l,keyword_rules:O})},z=C=>{const R=[...l.keyword_rules];R[C]={...R[C],keywords:[...R[C].keywords||[],""]},m({...l,keyword_rules:R})},M=(C,R)=>{const H=[...l.keyword_rules];H[C]={...H[C],keywords:(H[C].keywords||[]).filter((O,X)=>X!==R)},m({...l,keyword_rules:H})},S=(C,R,H)=>{const O=[...l.keyword_rules],X=[...O[C].keywords||[]];X[R]=H,O[C]={...O[C],keywords:X},m({...l,keyword_rules:O})},F=({rule:C})=>{const R=`{ regex = [${(C.regex||[]).map(H=>`"${H}"`).join(", ")}], reaction = "${C.reaction}" }`;return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-[95vw] sm:w-[500px]",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsx(ts,{className:"h-60 rounded-md bg-muted p-3",children:e.jsx("pre",{className:"font-mono text-xs break-all",children:R})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})},E=({rule:C})=>{const R=`[[keyword_reaction.keyword_rules]] keywords = [${(C.keywords||[]).map(H=>`"${H}"`).join(", ")}] -reaction = "${C.reaction}"`;return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-[95vw] sm:w-[500px]",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsx(ts,{className:"h-60 rounded-md bg-muted p-3",children:e.jsx("pre",{className:"font-mono text-xs whitespace-pre-wrap break-all",children:R})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"关键词反应配置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置触发特定反应的关键词和正则表达式规则"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold",children:"正则表达式规则"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"使用正则表达式匹配消息内容"})]}),e.jsxs(_,{onClick:g,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加正则规则"]})]}),e.jsxs("div",{className:"space-y-3",children:[l.regex_rules.map((C,R)=>e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["正则规则 ",R+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(hS,{regex:C.regex&&C.regex[0]||"",reaction:C.reaction,onRegexChange:H=>j(R,"regex",H),onReactionChange:H=>j(R,"reaction",H)}),e.jsx(F,{rule:C}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除正则规则 ",R+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>N(R),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"正则表达式(Python 语法)"}),e.jsx(ne,{value:C.regex&&C.regex[0]||"",onChange:H=>j(R,"regex",H.target.value),placeholder:"例如:^(?P\\\\S{1,20})是这样的$ (点击正则编辑器按钮可视化构建)",className:"font-mono text-sm"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:'支持命名捕获组 (?Ppattern),可在 reaction 中使用 [name] 引用。点击"正则编辑器"可视化构建和测试!'})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"反应内容"}),e.jsx(pt,{value:C.reaction,onChange:H=>j(R,"reaction",H.target.value),placeholder:`触发后麦麦的反应... -可以使用 [捕获组名] 来引用正则表达式中的内容`,rows:3,className:"text-sm"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"使用 [捕获组名] 引用正则表达式中的命名捕获组,例如 [n] 会被替换为捕获的内容"})]})]})]},R)),l.regex_rules.length===0&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无正则规则,点击"添加正则规则"开始配置'})]})]}),e.jsxs("div",{className:"space-y-4 border-t pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold",children:"关键词规则"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"使用关键词列表匹配消息内容"})]}),e.jsxs(_,{onClick:b,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加关键词规则"]})]}),e.jsxs("div",{className:"space-y-3",children:[l.keyword_rules.map((C,R)=>e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["关键词规则 ",R+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{rule:C}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除关键词规则 ",R+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>y(R),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-xs font-medium",children:"关键词列表"}),e.jsxs(_,{onClick:()=>z(R),size:"sm",variant:"ghost",children:[e.jsx(Xs,{className:"h-3 w-3 mr-1"}),"添加关键词"]})]}),e.jsxs("div",{className:"space-y-2",children:[(C.keywords||[]).map((H,O)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{value:H,onChange:X=>S(R,O,X.target.value),placeholder:"关键词",className:"flex-1"}),e.jsx(_,{onClick:()=>M(R,O),size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})]},O)),(!C.keywords||C.keywords.length===0)&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-2",children:'暂无关键词,点击"添加关键词"开始配置'})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"反应内容"}),e.jsx(pt,{value:C.reaction,onChange:H=>w(R,"reaction",H.target.value),placeholder:"触发后麦麦的反应...",rows:3,className:"text-sm"})]})]})]},R)),l.keyword_rules.length===0&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无关键词规则,点击"添加关键词规则"开始配置'})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"回复后处理配置"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"enable_response_post_process",checked:r.enable_response_post_process,onCheckedChange:C=>h({...r,enable_response_post_process:C})}),e.jsx(T,{htmlFor:"enable_response_post_process",className:"cursor-pointer",children:"启用回复后处理"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"包括错别字生成器和回复分割器"})]}),r.enable_response_post_process&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"border-t pt-6 space-y-4",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[e.jsx(Ge,{id:"enable_chinese_typo",checked:c.enable,onCheckedChange:C=>f({...c,enable:C})}),e.jsx(T,{htmlFor:"enable_chinese_typo",className:"cursor-pointer font-semibold",children:"中文错别字生成器"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"为回复添加随机错别字,让麦麦的回复更自然"}),c.enable&&e.jsxs("div",{className:"grid gap-4 pl-6 border-l-2 border-primary/20",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"error_rate",className:"text-xs font-medium",children:"单字替换概率"}),e.jsx(ne,{id:"error_rate",type:"number",step:"0.001",min:"0",max:"1",value:c.error_rate,onChange:C=>f({...c,error_rate:parseFloat(C.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"min_freq",className:"text-xs font-medium",children:"最小字频阈值"}),e.jsx(ne,{id:"min_freq",type:"number",min:"0",value:c.min_freq,onChange:C=>f({...c,min_freq:parseInt(C.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"tone_error_rate",className:"text-xs font-medium",children:"声调错误概率"}),e.jsx(ne,{id:"tone_error_rate",type:"number",step:"0.01",min:"0",max:"1",value:c.tone_error_rate,onChange:C=>f({...c,tone_error_rate:parseFloat(C.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"word_replace_rate",className:"text-xs font-medium",children:"整词替换概率"}),e.jsx(ne,{id:"word_replace_rate",type:"number",step:"0.001",min:"0",max:"1",value:c.word_replace_rate,onChange:C=>f({...c,word_replace_rate:parseFloat(C.target.value)})})]})]})]})}),e.jsx("div",{className:"border-t pt-6 space-y-4",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[e.jsx(Ge,{id:"enable_response_splitter",checked:d.enable,onCheckedChange:C=>p({...d,enable:C})}),e.jsx(T,{htmlFor:"enable_response_splitter",className:"cursor-pointer font-semibold",children:"回复分割器"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"控制回复的长度和句子数量"}),d.enable&&e.jsxs("div",{className:"grid gap-4 pl-6 border-l-2 border-primary/20",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_length",className:"text-xs font-medium",children:"最大长度"}),e.jsx(ne,{id:"max_length",type:"number",min:"1",value:d.max_length,onChange:C=>p({...d,max_length:parseInt(C.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"回复允许的最大字符数"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_sentence_num",className:"text-xs font-medium",children:"最大句子数"}),e.jsx(ne,{id:"max_sentence_num",type:"number",min:"1",value:d.max_sentence_num,onChange:C=>p({...d,max_sentence_num:parseInt(C.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"回复允许的最大句子数量"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"enable_kaomoji_protection",checked:d.enable_kaomoji_protection,onCheckedChange:C=>p({...d,enable_kaomoji_protection:C})}),e.jsx(T,{htmlFor:"enable_kaomoji_protection",className:"cursor-pointer",children:"启用颜文字保护"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"enable_overflow_return_all",checked:d.enable_overflow_return_all,onCheckedChange:C=>p({...d,enable_overflow_return_all:C})}),e.jsx(T,{htmlFor:"enable_overflow_return_all",className:"cursor-pointer",children:"超出时一次性返回全部"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"当句子数量超出限制时,合并后一次性返回所有内容"})]})]})})]})]})]})});function pS({config:a,onChange:l}){const[r,c]=u.useState(""),[d,m]=u.useState(""),h=()=>{const b=r.trim();b&&!a.ban_words.includes(b)&&(l({...a,ban_words:[...a.ban_words,b]}),c(""))},f=b=>{l({...a,ban_words:a.ban_words.filter((y,w)=>w!==b)})},p=b=>{b.key==="Enter"&&(b.preventDefault(),h())},g=()=>{const b=d.trim();if(b&&!a.ban_msgs_regex.includes(b))try{new RegExp(b),l({...a,ban_msgs_regex:[...a.ban_msgs_regex,b]}),m("")}catch(y){alert(`正则表达式语法错误:${y.message}`)}},N=b=>{l({...a,ban_msgs_regex:a.ban_msgs_regex.filter((y,w)=>w!==b)})},j=b=>{b.key==="Enter"&&(b.preventDefault(),g())};return e.jsx("div",{className:"space-y-6",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"消息过滤配置"}),e.jsx(Ns,{children:"配置消息过滤规则,过滤特定消息或在特定群组启用静默模式"})]}),e.jsx(ze,{children:e.jsxs(Jt,{defaultValue:"ban_words",className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2",children:[e.jsx(Xe,{value:"ban_words",children:"禁用关键词"}),e.jsx(Xe,{value:"ban_regex",children:"禁用正则"})]}),e.jsx(Ss,{value:"ban_words",className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Lt,{className:"h-4 w-4 text-yellow-500 mt-1 flex-shrink-0"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"包含以下关键词的消息将被过滤,Bot 不会读取这些消息"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{placeholder:"输入要禁用的关键词(按回车添加)",value:r,onChange:b=>c(b.target.value),onKeyDown:p}),e.jsx(_,{onClick:h,size:"icon",children:e.jsx(Xs,{className:"h-4 w-4"})})]}),a.ban_words.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-8 text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无禁用关键词,点击上方添加"})}):e.jsx("div",{className:"space-y-2",children:a.ban_words.map((b,y)=>e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsx("code",{className:"text-sm",children:b}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"icon",children:e.jsx(os,{className:"h-4 w-4 text-destructive"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除关键词 ",e.jsxs("code",{children:['"',b,'"']})," 吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>f(y),children:"删除"})]})]})]})]},y))})]})}),e.jsx(Ss,{value:"ban_regex",className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Lt,{className:"h-4 w-4 text-yellow-500 mt-1 flex-shrink-0"}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:"匹配以下正则表达式的消息将被过滤"}),e.jsx("p",{className:"text-xs",children:"⚠️ 若不了解正则表达式,请勿随意修改"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pt,{placeholder:`输入正则表达式(按回车添加) -示例:https?://[^\\s]+ 匹配链接`,value:d,onChange:b=>m(b.target.value),onKeyDown:j,className:"min-h-[60px] font-mono text-sm"}),e.jsx(_,{onClick:g,size:"icon",children:e.jsx(Xs,{className:"h-4 w-4"})})]}),a.ban_msgs_regex.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-8 text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无禁用正则表达式,点击上方添加"})}):e.jsx("div",{className:"space-y-2",children:a.ban_msgs_regex.map((b,y)=>e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsx("code",{className:"text-sm font-mono flex-1 break-all",children:b}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"icon",className:"ml-2 flex-shrink-0",children:e.jsx(os,{className:"h-4 w-4 text-destructive"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除正则表达式 ",e.jsxs("code",{children:['"',b,'"']})," 吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>N(y),children:"删除"})]})]})]})]},y))})]})})]})})]})})}const gS=Bs.memo(function({config:l,onChange:r}){const[c,d]=u.useState(""),[m,h]=u.useState(""),[f,p]=u.useState(!1),g=l.allowed_ips?l.allowed_ips.split(",").map(S=>S.trim()).filter(S=>S):[],N=l.trusted_proxies?l.trusted_proxies.split(",").map(S=>S.trim()).filter(S=>S):[],j=()=>{if(!c.trim())return;const S=[...g,c.trim()];r({...l,allowed_ips:S.join(",")}),d("")},b=S=>{const F=g.filter((E,C)=>C!==S);r({...l,allowed_ips:F.join(",")})},y=()=>{if(!m.trim())return;const S=[...N,m.trim()];r({...l,trusted_proxies:S.join(",")}),h("")},w=S=>{const F=N.filter((E,C)=>C!==S);r({...l,trusted_proxies:F.join(",")})},z=S=>{!S&&l.enabled?p(!0):r({...l,enabled:S})},M=()=>{r({...l,enabled:!1}),p(!1)};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"WebUI 服务配置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{checked:l.enabled,onCheckedChange:z}),e.jsx(T,{className:"cursor-pointer",children:"启用 WebUI"})]}),l.enabled&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"运行模式"}),e.jsxs(Pe,{value:l.mode,onValueChange:S=>r({...l,mode:S}),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择运行模式"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"development",children:"开发模式"}),e.jsx(W,{value:"production",children:"生产模式"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"注意: WebUI 的监听地址和端口请在 .env 文件中配置 WEBUI_HOST 和 WEBUI_PORT"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"防爬虫模式"}),e.jsxs(Pe,{value:l.anti_crawler_mode,onValueChange:S=>r({...l,anti_crawler_mode:S}),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择防爬虫模式"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"false",children:"禁用"}),e.jsx(W,{value:"basic",children:"基础(只记录不阻止)"}),e.jsx(W,{value:"loose",children:"宽松"}),e.jsx(W,{value:"strict",children:"严格"})]})]})]}),e.jsxs("div",{className:"grid gap-2 sm:col-span-2",children:[e.jsx(T,{children:"IP 白名单"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{value:c,onChange:S=>d(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),j())},placeholder:"输入IP地址后按回车或点击添加"}),e.jsx(_,{type:"button",size:"sm",onClick:j,disabled:!c.trim(),children:e.jsx(Xs,{className:"h-4 w-4"})})]}),g.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:g.map((S,F)=>e.jsxs(Ce,{variant:"secondary",className:"flex items-center gap-1",children:[S,e.jsx("button",{type:"button",onClick:()=>b(F),className:"ml-1 hover:bg-destructive/20 rounded-full p-0.5",children:e.jsx(Sa,{className:"h-3 w-3"})})]},F))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"支持精确IP、CIDR格式和通配符(如:127.0.0.1、192.168.1.0/24)"})]}),e.jsxs("div",{className:"grid gap-2 sm:col-span-2",children:[e.jsx(T,{children:"信任的代理 IP"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{value:m,onChange:S=>h(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),y())},placeholder:"输入代理IP后按回车或点击添加"}),e.jsx(_,{type:"button",size:"sm",onClick:y,disabled:!m.trim(),children:e.jsx(Xs,{className:"h-4 w-4"})})]}),N.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:N.map((S,F)=>e.jsxs(Ce,{variant:"secondary",className:"flex items-center gap-1",children:[S,e.jsx("button",{type:"button",onClick:()=>w(F),className:"ml-1 hover:bg-destructive/20 rounded-full p-0.5",children:e.jsx(Sa,{className:"h-3 w-3"})})]},F))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"只有来自这些IP的X-Forwarded-For头才被信任"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{checked:l.trust_xff,onCheckedChange:S=>r({...l,trust_xff:S})}),e.jsx(T,{className:"cursor-pointer",children:"启用 X-Forwarded-For 代理解析"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{checked:l.secure_cookie,onCheckedChange:S=>r({...l,secure_cookie:S})}),e.jsx(T,{className:"cursor-pointer",children:"启用安全 Cookie(仅 HTTPS)"})]})]})]}),e.jsx(bs,{open:f,onOpenChange:p,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"警告:即将关闭 WebUI"}),e.jsxs(gs,{children:["关闭 WebUI 后,在您下次重启麦麦之前,WebUI 界面将无法访问。",e.jsx("br",{}),e.jsx("br",{}),"您需要通过修改配置文件或命令行重新启用 WebUI 才能再次访问此界面。",e.jsx("br",{}),e.jsx("br",{}),"确定要关闭 WebUI 吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{variant:"destructive",onClick:M,children:"确认关闭"})]})]})})]})}),En="/api/webui/config";async function Hg(){const l=await(await ke(`${En}/bot`)).json();if(!l.success)throw new Error("获取配置数据失败");return l.config}async function Nn(){const l=await(await ke(`${En}/model`)).json();if(!l.success)throw new Error("获取模型配置数据失败");return l.config}async function qg(a){const r=await(await ke(`${En}/bot`,{method:"POST",body:JSON.stringify(a)})).json();if(!r.success)throw new Error(r.message||"保存配置失败")}async function jS(){const l=await(await ke(`${En}/bot/raw`)).json();if(!l.success)throw new Error("获取配置源代码失败");return l.content}async function vS(a){const r=await(await ke(`${En}/bot/raw`,{method:"POST",body:JSON.stringify({raw_content:a})})).json();if(!r.success)throw new Error(r.message||"保存配置失败")}async function lc(a){const r=await(await ke(`${En}/model`,{method:"POST",body:JSON.stringify(a)})).json();if(!r.success)throw new Error(r.message||"保存配置失败")}async function NS(a,l){const c=await(await ke(`${En}/bot/section/${a}`,{method:"POST",body:JSON.stringify(l)})).json();if(!c.success)throw new Error(c.message||`保存配置节 ${a} 失败`)}async function Wm(a,l){const c=await(await ke(`${En}/model/section/${a}`,{method:"POST",body:JSON.stringify(l)})).json();if(!c.success)throw new Error(c.message||`保存配置节 ${a} 失败`)}async function bS(a,l="openai",r="/models"){const c=new URLSearchParams({provider_name:a,parser:l,endpoint:r}),d=await ke(`/api/webui/models/list?${c}`);if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.detail||`获取模型列表失败 (${d.status})`)}const m=await d.json();if(!m.success)throw new Error("获取模型列表失败");return m.models}async function yS(a){const l=new URLSearchParams({provider_name:a}),r=await ke(`/api/webui/models/test-connection-by-name?${l}`,{method:"POST"});if(!r.ok){const c=await r.json().catch(()=>({}));throw new Error(c.detail||`测试连接失败 (${r.status})`)}return await r.json()}const wS=ti("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ht=u.forwardRef(({className:a,variant:l,...r},c)=>e.jsx("div",{ref:c,role:"alert",className:P(wS({variant:l}),a),...r}));ht.displayName="Alert";const Jn=u.forwardRef(({className:a,...l},r)=>e.jsx("h5",{ref:r,className:P("mb-1 font-medium leading-none tracking-tight",a),...l}));Jn.displayName="AlertTitle";const ft=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("text-sm [&_p]:leading-relaxed",a),...l}));ft.displayName="AlertDescription";const _S={name:"toml",startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(a,l){let r;if(!l.inString&&(r=a.match(/^('''|"""|'|")/))&&(l.stringType=r[0],l.inString=!0),a.sol()&&!l.inString&&l.inArray===0&&(l.lhs=!0),l.inString){for(;l.inString;)if(a.match(l.stringType))l.inString=!1;else if(a.peek()==="\\")a.next(),a.next();else{if(a.eol())break;a.match(/^.[^\\\"\']*/)}return l.lhs?"property":"string"}else{if(l.inArray&&a.peek()==="]")return a.next(),l.inArray--,"bracket";if(l.lhs&&a.peek()==="["&&a.skipTo("]"))return a.next(),a.peek()==="]"&&a.next(),"atom";if(a.peek()==="#")return a.skipToEnd(),"comment";if(a.eatSpace())return null;if(l.lhs&&a.eatWhile(function(c){return c!="="&&c!=" "}))return"property";if(l.lhs&&a.peek()==="=")return a.next(),l.lhs=!1,null;if(!l.lhs&&a.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!l.lhs&&(a.match("true")||a.match("false")))return"atom";if(!l.lhs&&a.peek()==="[")return l.inArray++,a.next(),"bracket";if(!l.lhs&&a.match(/^\-?\d+(?:\.\d+)?/))return"number";a.eatSpace()||a.next()}return null},languageData:{commentTokens:{line:"#"}}},SS={python:[d_()],json:[u_(),m_()],toml:[o_.define(_S)],text:[]};function Qv({value:a,onChange:l,language:r="text",readOnly:c=!1,height:d="400px",minHeight:m,maxHeight:h,placeholder:f,theme:p="dark",className:g=""}){const[N,j]=u.useState(!1);if(u.useEffect(()=>{j(!0)},[]),!N)return e.jsx("div",{className:`rounded-md border bg-muted animate-pulse ${g}`,style:{height:d,minHeight:m,maxHeight:h}});const b=[...SS[r]||[],zm.lineWrapping,zm.theme({"&":{fontFamily:'"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace'},".cm-content":{fontFamily:'"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace'},".cm-gutters":{fontFamily:'"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace'},".cm-scroller":{fontFamily:'"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace'}})];return c&&b.push(zm.editable.of(!1)),e.jsx("div",{className:`rounded-md overflow-hidden border custom-scrollbar ${g}`,children:e.jsx(x_,{value:a,height:d,minHeight:m,maxHeight:h,theme:p==="dark"?h_:void 0,extensions:b,onChange:l,placeholder:f,basicSetup:{lineNumbers:!0,highlightActiveLineGutter:!0,highlightSpecialChars:!0,history:!0,foldGutter:!0,drawSelection:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,syntaxHighlighting:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,defaultKeymap:!0,searchKeymap:!0,historyKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0}})})}function kS({id:a,index:l,itemType:r,itemFields:c,value:d,onChange:m,onRemove:h,disabled:f,canRemove:p,placeholder:g}){const{attributes:N,listeners:j,setNodeRef:b,transform:y,transition:w,isDragging:z}=Cv({id:a,disabled:f}),M={transform:Tv.Transform.toString(y),transition:w};return e.jsxs("div",{ref:b,style:M,className:P("flex items-start gap-2 group",z&&"opacity-50 z-50"),children:[e.jsx("button",{type:"button",className:P("flex-shrink-0 p-2 cursor-grab active:cursor-grabbing","text-muted-foreground hover:text-foreground transition-colors","opacity-0 group-hover:opacity-100 focus:opacity-100",f&&"cursor-not-allowed opacity-30"),...N,...j,children:e.jsx(dv,{className:"h-4 w-4"})}),e.jsx("div",{className:"flex-1 min-w-0",children:r==="object"&&c?e.jsx(CS,{value:d,onChange:m,fields:c,disabled:f}):r==="number"?e.jsx(ne,{type:"number",value:d??"",onChange:S=>m(parseFloat(S.target.value)||0),placeholder:g??`第 ${l+1} 项`,disabled:f,className:"font-mono"}):e.jsx(ne,{type:"text",value:d??"",onChange:S=>m(S.target.value),placeholder:g??`第 ${l+1} 项`,disabled:f})}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",onClick:h,disabled:f||!p,className:P("flex-shrink-0 text-muted-foreground hover:text-destructive","opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity"),children:e.jsx(os,{className:"h-4 w-4"})})]})}function CS({value:a,onChange:l,fields:r,disabled:c}){const d=u.useCallback((h,f)=>{l({...a,[h]:f})},[a,l]),m=(h,f)=>{const p=a?.[h];if(f.type==="boolean"||f.type==="switch")return e.jsxs("div",{className:"flex items-center justify-between py-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsx(Ge,{checked:!!(p??f.default),onCheckedChange:g=>d(h,g),disabled:c})]});if(f.type==="slider"||f.type==="number"&&f.min!=null&&f.max!=null){const g=p??f.default??f.min??0;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e.jsx(el,{value:[g],onValueChange:N=>d(h,N[0]),min:f.min??0,max:f.max??100,step:f.step??1,disabled:c,className:"py-1"})]})}return f.type==="select"&&f.choices?e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsxs(Pe,{value:String(p??f.default??""),onValueChange:g=>d(h,g),disabled:c,children:[e.jsx(Be,{className:"h-8 text-sm",children:e.jsx(Fe,{placeholder:f.placeholder??"请选择"})}),e.jsx(Ie,{children:f.choices.map(g=>e.jsx(W,{value:String(g),children:String(g)},String(g)))})]})]}):f.type==="number"?e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsx(ne,{type:"number",value:p??f.default??"",onChange:g=>d(h,parseFloat(g.target.value)||0),placeholder:f.placeholder,disabled:c,className:"h-8 text-sm"})]}):e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsx(ne,{type:"text",value:p??f.default??"",onChange:g=>d(h,g.target.value),placeholder:f.placeholder,disabled:c,className:"h-8 text-sm"})]})};return e.jsx(Te,{className:"p-3 space-y-2 bg-muted/30",children:Object.entries(r).map(([h,f])=>e.jsx("div",{children:m(h,f)},h))})}function TS({value:a,onChange:l,itemType:r="string",itemFields:c,minItems:d,maxItems:m,disabled:h,placeholder:f}){const p=u.useMemo(()=>Array.isArray(a)?a:typeof a=="string"&&a.trim()?a.split(",").map(E=>E.trim()):[],[a]),[g]=u.useState(()=>new Map),N=u.useCallback(E=>(g.has(E)||g.set(E,`item-${Date.now()}-${E}-${Math.random().toString(36).slice(2)}`),g.get(E)),[g]),j=u.useMemo(()=>{const E=[];for(let C=0;C{const{active:C,over:R}=E;if(R&&C.id!==R.id){const H=j.indexOf(C.id),O=j.indexOf(R.id),X=wv(p,H,O);l(X)}},[p,j,l]),w=u.useCallback(()=>{if(m!=null&&p.length>=m)return;let E;r==="object"&&c?E=Object.fromEntries(Object.entries(c).map(([C,R])=>[C,R.default??""])):r==="number"?E=0:E="",l([...p,E])},[p,m,r,c,l]),z=u.useCallback((E,C)=>{const R=[...p];R[E]=C,l(R)},[p,l]),M=u.useCallback(E=>{if(d!=null&&p.length<=d)return;const C=p.filter((R,H)=>H!==E);g.delete(E),l(C)},[p,d,g,l]),S=m==null||p.lengthd;return e.jsxs("div",{className:"space-y-2",children:[p.length===0?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground py-4 justify-center border border-dashed rounded-md",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx("span",{children:"暂无数据,点击下方按钮添加"})]}):e.jsx(_v,{sensors:b,collisionDetection:Sv,onDragEnd:y,children:e.jsx(kv,{items:j,strategy:f_,children:e.jsx("div",{className:"space-y-2",children:p.map((E,C)=>e.jsx(kS,{id:j[C],index:C,itemType:r,itemFields:c,value:E,onChange:R=>z(C,R),onRemove:()=>M(C),disabled:h,canRemove:F,placeholder:f},j[C]))})})}),e.jsxs(_,{type:"button",variant:"outline",size:"sm",onClick:w,disabled:h||!S,className:"w-full",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加项目",m!==void 0&&e.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",p.length,"/",m,")"]})]}),(d!=null||m!=null)&&(d!==null||m!==null)&&e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:d!=null&&m!=null?`允许 ${d} - ${m} 项`:d!=null?`至少 ${d} 项`:`最多 ${m} 项`})]})}function bx({content:a,className:l=""}){return e.jsx("div",{className:`prose prose-sm dark:prose-invert max-w-none ${l}`,children:e.jsx(b_,{remarkPlugins:[w_,__],rehypePlugins:[y_],components:{code({inline:r,className:c,children:d,...m}){return r?e.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",...m,children:d}):e.jsx("code",{className:`${c} block bg-muted p-4 rounded-lg overflow-x-auto`,...m,children:d})},table({children:r,...c}){return e.jsx("div",{className:"overflow-x-auto",children:e.jsx("table",{className:"border-collapse border border-border",...c,children:r})})},th({children:r,...c}){return e.jsx("th",{className:"border border-border bg-muted px-4 py-2 text-left font-semibold",...c,children:r})},td({children:r,...c}){return e.jsx("td",{className:"border border-border px-4 py-2",...c,children:r})},a({children:r,...c}){return e.jsx("a",{className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",...c,children:r})},blockquote({children:r,...c}){return e.jsx("blockquote",{className:"border-l-4 border-primary pl-4 italic text-muted-foreground",...c,children:r})},h1({children:r,...c}){return e.jsx("h1",{className:"text-3xl font-bold mt-6 mb-4",...c,children:r})},h2({children:r,...c}){return e.jsx("h2",{className:"text-2xl font-bold mt-5 mb-3",...c,children:r})},h3({children:r,...c}){return e.jsx("h3",{className:"text-xl font-bold mt-4 mb-2",...c,children:r})},h4({children:r,...c}){return e.jsx("h4",{className:"text-lg font-semibold mt-3 mb-2",...c,children:r})},ul({children:r,...c}){return e.jsx("ul",{className:"list-disc list-inside space-y-1 my-2",...c,children:r})},ol({children:r,...c}){return e.jsx("ol",{className:"list-decimal list-inside space-y-1 my-2",...c,children:r})},p({children:r,...c}){return e.jsx("p",{className:"my-2 leading-relaxed",...c,children:r})},hr({...r}){return e.jsx("hr",{className:"my-4 border-border",...r})}},children:a})})}function ES(a,l){let r=a.slice(0,l).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}function MS(a,l,r){let c=a.split(/\r\n|\n|\r/g),d="",m=(Math.log10(l+1)|0)+1;for(let h=l-1;h<=l+1;h++){let f=c[h-1];f&&(d+=h.toString().padEnd(m," "),d+=": ",d+=f,d+=` +reaction = "${C.reaction}"`;return e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"预览"]})}),e.jsx(tl,{className:"w-[95vw] sm:w-[500px]",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),e.jsx(ts,{className:"h-60 rounded-md bg-muted p-3",children:e.jsx("pre",{className:"font-mono text-xs whitespace-pre-wrap break-all",children:R})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"关键词反应配置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置触发特定反应的关键词和正则表达式规则"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold",children:"正则表达式规则"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"使用正则表达式匹配消息内容"})]}),e.jsxs(_,{onClick:g,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加正则规则"]})]}),e.jsxs("div",{className:"space-y-3",children:[l.regex_rules.map((C,R)=>e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["正则规则 ",R+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(hS,{regex:C.regex&&C.regex[0]||"",reaction:C.reaction,onRegexChange:H=>j(R,"regex",H),onReactionChange:H=>j(R,"reaction",H)}),e.jsx(F,{rule:C}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除正则规则 ",R+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>N(R),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"正则表达式(Python 语法)"}),e.jsx(ae,{value:C.regex&&C.regex[0]||"",onChange:H=>j(R,"regex",H.target.value),placeholder:"例如:^(?P\\\\S{1,20})是这样的$ (点击正则编辑器按钮可视化构建)",className:"font-mono text-sm"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:'支持命名捕获组 (?Ppattern),可在 reaction 中使用 [name] 引用。点击"正则编辑器"可视化构建和测试!'})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"反应内容"}),e.jsx(pt,{value:C.reaction,onChange:H=>j(R,"reaction",H.target.value),placeholder:`触发后麦麦的反应... +可以使用 [捕获组名] 来引用正则表达式中的内容`,rows:3,className:"text-sm"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"使用 [捕获组名] 引用正则表达式中的命名捕获组,例如 [n] 会被替换为捕获的内容"})]})]})]},R)),l.regex_rules.length===0&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无正则规则,点击"添加正则规则"开始配置'})]})]}),e.jsxs("div",{className:"space-y-4 border-t pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold",children:"关键词规则"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"使用关键词列表匹配消息内容"})]}),e.jsxs(_,{onClick:b,size:"sm",variant:"outline",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加关键词规则"]})]}),e.jsxs("div",{className:"space-y-3",children:[l.keyword_rules.map((C,R)=>e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm font-medium",children:["关键词规则 ",R+1]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{rule:C}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除关键词规则 ",R+1," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>y(R),children:"删除"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-xs font-medium",children:"关键词列表"}),e.jsxs(_,{onClick:()=>z(R),size:"sm",variant:"ghost",children:[e.jsx(Xs,{className:"h-3 w-3 mr-1"}),"添加关键词"]})]}),e.jsxs("div",{className:"space-y-2",children:[(C.keywords||[]).map((H,O)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{value:H,onChange:X=>S(R,O,X.target.value),placeholder:"关键词",className:"flex-1"}),e.jsx(_,{onClick:()=>M(R,O),size:"sm",variant:"ghost",children:e.jsx(os,{className:"h-4 w-4"})})]},O)),(!C.keywords||C.keywords.length===0)&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-2",children:'暂无关键词,点击"添加关键词"开始配置'})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-xs font-medium",children:"反应内容"}),e.jsx(pt,{value:C.reaction,onChange:H=>w(R,"reaction",H.target.value),placeholder:"触发后麦麦的反应...",rows:3,className:"text-sm"})]})]})]},R)),l.keyword_rules.length===0&&e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无关键词规则,点击"添加关键词规则"开始配置'})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"回复后处理配置"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"enable_response_post_process",checked:r.enable_response_post_process,onCheckedChange:C=>h({...r,enable_response_post_process:C})}),e.jsx(T,{htmlFor:"enable_response_post_process",className:"cursor-pointer",children:"启用回复后处理"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"包括错别字生成器和回复分割器"})]}),r.enable_response_post_process&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"border-t pt-6 space-y-4",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[e.jsx(qe,{id:"enable_chinese_typo",checked:c.enable,onCheckedChange:C=>f({...c,enable:C})}),e.jsx(T,{htmlFor:"enable_chinese_typo",className:"cursor-pointer font-semibold",children:"中文错别字生成器"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"为回复添加随机错别字,让麦麦的回复更自然"}),c.enable&&e.jsxs("div",{className:"grid gap-4 pl-6 border-l-2 border-primary/20",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"error_rate",className:"text-xs font-medium",children:"单字替换概率"}),e.jsx(ae,{id:"error_rate",type:"number",step:"0.001",min:"0",max:"1",value:c.error_rate,onChange:C=>f({...c,error_rate:parseFloat(C.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"min_freq",className:"text-xs font-medium",children:"最小字频阈值"}),e.jsx(ae,{id:"min_freq",type:"number",min:"0",value:c.min_freq,onChange:C=>f({...c,min_freq:parseInt(C.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"tone_error_rate",className:"text-xs font-medium",children:"声调错误概率"}),e.jsx(ae,{id:"tone_error_rate",type:"number",step:"0.01",min:"0",max:"1",value:c.tone_error_rate,onChange:C=>f({...c,tone_error_rate:parseFloat(C.target.value)})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"word_replace_rate",className:"text-xs font-medium",children:"整词替换概率"}),e.jsx(ae,{id:"word_replace_rate",type:"number",step:"0.001",min:"0",max:"1",value:c.word_replace_rate,onChange:C=>f({...c,word_replace_rate:parseFloat(C.target.value)})})]})]})]})}),e.jsx("div",{className:"border-t pt-6 space-y-4",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[e.jsx(qe,{id:"enable_response_splitter",checked:d.enable,onCheckedChange:C=>p({...d,enable:C})}),e.jsx(T,{htmlFor:"enable_response_splitter",className:"cursor-pointer font-semibold",children:"回复分割器"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"控制回复的长度和句子数量"}),d.enable&&e.jsxs("div",{className:"grid gap-4 pl-6 border-l-2 border-primary/20",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_length",className:"text-xs font-medium",children:"最大长度"}),e.jsx(ae,{id:"max_length",type:"number",min:"1",value:d.max_length,onChange:C=>p({...d,max_length:parseInt(C.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"回复允许的最大字符数"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"max_sentence_num",className:"text-xs font-medium",children:"最大句子数"}),e.jsx(ae,{id:"max_sentence_num",type:"number",min:"1",value:d.max_sentence_num,onChange:C=>p({...d,max_sentence_num:parseInt(C.target.value)})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"回复允许的最大句子数量"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"enable_kaomoji_protection",checked:d.enable_kaomoji_protection,onCheckedChange:C=>p({...d,enable_kaomoji_protection:C})}),e.jsx(T,{htmlFor:"enable_kaomoji_protection",className:"cursor-pointer",children:"启用颜文字保护"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"enable_overflow_return_all",checked:d.enable_overflow_return_all,onCheckedChange:C=>p({...d,enable_overflow_return_all:C})}),e.jsx(T,{htmlFor:"enable_overflow_return_all",className:"cursor-pointer",children:"超出时一次性返回全部"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"当句子数量超出限制时,合并后一次性返回所有内容"})]})]})})]})]})]})});function pS({config:a,onChange:l}){const[r,c]=u.useState(""),[d,m]=u.useState(""),h=()=>{const b=r.trim();b&&!a.ban_words.includes(b)&&(l({...a,ban_words:[...a.ban_words,b]}),c(""))},f=b=>{l({...a,ban_words:a.ban_words.filter((y,w)=>w!==b)})},p=b=>{b.key==="Enter"&&(b.preventDefault(),h())},g=()=>{const b=d.trim();if(b&&!a.ban_msgs_regex.includes(b))try{new RegExp(b),l({...a,ban_msgs_regex:[...a.ban_msgs_regex,b]}),m("")}catch(y){alert(`正则表达式语法错误:${y.message}`)}},N=b=>{l({...a,ban_msgs_regex:a.ban_msgs_regex.filter((y,w)=>w!==b)})},j=b=>{b.key==="Enter"&&(b.preventDefault(),g())};return e.jsx("div",{className:"space-y-6",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"消息过滤配置"}),e.jsx(Ns,{children:"配置消息过滤规则,过滤特定消息或在特定群组启用静默模式"})]}),e.jsx(ze,{children:e.jsxs(Jt,{defaultValue:"ban_words",className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2",children:[e.jsx(Xe,{value:"ban_words",children:"禁用关键词"}),e.jsx(Xe,{value:"ban_regex",children:"禁用正则"})]}),e.jsx(Ss,{value:"ban_words",className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Lt,{className:"h-4 w-4 text-yellow-500 mt-1 flex-shrink-0"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"包含以下关键词的消息将被过滤,Bot 不会读取这些消息"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{placeholder:"输入要禁用的关键词(按回车添加)",value:r,onChange:b=>c(b.target.value),onKeyDown:p}),e.jsx(_,{onClick:h,size:"icon",children:e.jsx(Xs,{className:"h-4 w-4"})})]}),a.ban_words.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-8 text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无禁用关键词,点击上方添加"})}):e.jsx("div",{className:"space-y-2",children:a.ban_words.map((b,y)=>e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsx("code",{className:"text-sm",children:b}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"icon",children:e.jsx(os,{className:"h-4 w-4 text-destructive"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除关键词 ",e.jsxs("code",{children:['"',b,'"']})," 吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>f(y),children:"删除"})]})]})]})]},y))})]})}),e.jsx(Ss,{value:"ban_regex",className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Lt,{className:"h-4 w-4 text-yellow-500 mt-1 flex-shrink-0"}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:"匹配以下正则表达式的消息将被过滤"}),e.jsx("p",{className:"text-xs",children:"⚠️ 若不了解正则表达式,请勿随意修改"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pt,{placeholder:`输入正则表达式(按回车添加) +示例:https?://[^\\s]+ 匹配链接`,value:d,onChange:b=>m(b.target.value),onKeyDown:j,className:"min-h-[60px] font-mono text-sm"}),e.jsx(_,{onClick:g,size:"icon",children:e.jsx(Xs,{className:"h-4 w-4"})})]}),a.ban_msgs_regex.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-8 text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无禁用正则表达式,点击上方添加"})}):e.jsx("div",{className:"space-y-2",children:a.ban_msgs_regex.map((b,y)=>e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsx("code",{className:"text-sm font-mono flex-1 break-all",children:b}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"icon",className:"ml-2 flex-shrink-0",children:e.jsx(os,{className:"h-4 w-4 text-destructive"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除正则表达式 ",e.jsxs("code",{children:['"',b,'"']})," 吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>N(y),children:"删除"})]})]})]})]},y))})]})})]})})]})})}const gS=Is.memo(function({config:l,onChange:r}){const[c,d]=u.useState(""),[m,h]=u.useState(""),[f,p]=u.useState(!1),g=l.allowed_ips?l.allowed_ips.split(",").map(S=>S.trim()).filter(S=>S):[],N=l.trusted_proxies?l.trusted_proxies.split(",").map(S=>S.trim()).filter(S=>S):[],j=()=>{if(!c.trim())return;const S=[...g,c.trim()];r({...l,allowed_ips:S.join(",")}),d("")},b=S=>{const F=g.filter((E,C)=>C!==S);r({...l,allowed_ips:F.join(",")})},y=()=>{if(!m.trim())return;const S=[...N,m.trim()];r({...l,trusted_proxies:S.join(",")}),h("")},w=S=>{const F=N.filter((E,C)=>C!==S);r({...l,trusted_proxies:F.join(",")})},z=S=>{!S&&l.enabled?p(!0):r({...l,enabled:S})},M=()=>{r({...l,enabled:!1}),p(!1)};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"WebUI 服务配置"}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{checked:l.enabled,onCheckedChange:z}),e.jsx(T,{className:"cursor-pointer",children:"启用 WebUI"})]}),l.enabled&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"运行模式"}),e.jsxs(Pe,{value:l.mode,onValueChange:S=>r({...l,mode:S}),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择运行模式"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"development",children:"开发模式"}),e.jsx(W,{value:"production",children:"生产模式"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"注意: WebUI 的监听地址和端口请在 .env 文件中配置 WEBUI_HOST 和 WEBUI_PORT"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"防爬虫模式"}),e.jsxs(Pe,{value:l.anti_crawler_mode,onValueChange:S=>r({...l,anti_crawler_mode:S}),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择防爬虫模式"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"false",children:"禁用"}),e.jsx(W,{value:"basic",children:"基础(只记录不阻止)"}),e.jsx(W,{value:"loose",children:"宽松"}),e.jsx(W,{value:"strict",children:"严格"})]})]})]}),e.jsxs("div",{className:"grid gap-2 sm:col-span-2",children:[e.jsx(T,{children:"IP 白名单"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{value:c,onChange:S=>d(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),j())},placeholder:"输入IP地址后按回车或点击添加"}),e.jsx(_,{type:"button",size:"sm",onClick:j,disabled:!c.trim(),children:e.jsx(Xs,{className:"h-4 w-4"})})]}),g.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:g.map((S,F)=>e.jsxs(Ce,{variant:"secondary",className:"flex items-center gap-1",children:[S,e.jsx("button",{type:"button",onClick:()=>b(F),className:"ml-1 hover:bg-destructive/20 rounded-full p-0.5",children:e.jsx(Sa,{className:"h-3 w-3"})})]},F))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"支持精确IP、CIDR格式和通配符(如:127.0.0.1、192.168.1.0/24)"})]}),e.jsxs("div",{className:"grid gap-2 sm:col-span-2",children:[e.jsx(T,{children:"信任的代理 IP"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{value:m,onChange:S=>h(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),y())},placeholder:"输入代理IP后按回车或点击添加"}),e.jsx(_,{type:"button",size:"sm",onClick:y,disabled:!m.trim(),children:e.jsx(Xs,{className:"h-4 w-4"})})]}),N.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:N.map((S,F)=>e.jsxs(Ce,{variant:"secondary",className:"flex items-center gap-1",children:[S,e.jsx("button",{type:"button",onClick:()=>w(F),className:"ml-1 hover:bg-destructive/20 rounded-full p-0.5",children:e.jsx(Sa,{className:"h-3 w-3"})})]},F))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"只有来自这些IP的X-Forwarded-For头才被信任"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{checked:l.trust_xff,onCheckedChange:S=>r({...l,trust_xff:S})}),e.jsx(T,{className:"cursor-pointer",children:"启用 X-Forwarded-For 代理解析"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{checked:l.secure_cookie,onCheckedChange:S=>r({...l,secure_cookie:S})}),e.jsx(T,{className:"cursor-pointer",children:"启用安全 Cookie(仅 HTTPS)"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{checked:l.enable_paragraph_content,onCheckedChange:S=>r({...l,enable_paragraph_content:S})}),e.jsx(T,{className:"cursor-pointer",children:"在知识图谱中加载段落完整内容"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后,知识图谱可视化界面会显示段落节点的完整内容。需要加载 embedding store,会占用额外内存(约数百MB)。"})]})]})]}),e.jsx(bs,{open:f,onOpenChange:p,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"警告:即将关闭 WebUI"}),e.jsxs(gs,{children:["关闭 WebUI 后,在您下次重启麦麦之前,WebUI 界面将无法访问。",e.jsx("br",{}),e.jsx("br",{}),"您需要通过修改配置文件或命令行重新启用 WebUI 才能再次访问此界面。",e.jsx("br",{}),e.jsx("br",{}),"确定要关闭 WebUI 吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{variant:"destructive",onClick:M,children:"确认关闭"})]})]})})]})}),En="/api/webui/config";async function Hg(){const l=await(await ke(`${En}/bot`)).json();if(!l.success)throw new Error("获取配置数据失败");return l.config}async function Nn(){const l=await(await ke(`${En}/model`)).json();if(!l.success)throw new Error("获取模型配置数据失败");return l.config}async function qg(a){const r=await(await ke(`${En}/bot`,{method:"POST",body:JSON.stringify(a)})).json();if(!r.success)throw new Error(r.message||"保存配置失败")}async function jS(){const l=await(await ke(`${En}/bot/raw`)).json();if(!l.success)throw new Error("获取配置源代码失败");return l.content}async function vS(a){const r=await(await ke(`${En}/bot/raw`,{method:"POST",body:JSON.stringify({raw_content:a})})).json();if(!r.success)throw new Error(r.message||"保存配置失败")}async function lc(a){const r=await(await ke(`${En}/model`,{method:"POST",body:JSON.stringify(a)})).json();if(!r.success)throw new Error(r.message||"保存配置失败")}async function NS(a,l){const c=await(await ke(`${En}/bot/section/${a}`,{method:"POST",body:JSON.stringify(l)})).json();if(!c.success)throw new Error(c.message||`保存配置节 ${a} 失败`)}async function Wm(a,l){const c=await(await ke(`${En}/model/section/${a}`,{method:"POST",body:JSON.stringify(l)})).json();if(!c.success)throw new Error(c.message||`保存配置节 ${a} 失败`)}async function bS(a,l="openai",r="/models"){const c=new URLSearchParams({provider_name:a,parser:l,endpoint:r}),d=await ke(`/api/webui/models/list?${c}`);if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.detail||`获取模型列表失败 (${d.status})`)}const m=await d.json();if(!m.success)throw new Error("获取模型列表失败");return m.models}async function yS(a){const l=new URLSearchParams({provider_name:a}),r=await ke(`/api/webui/models/test-connection-by-name?${l}`,{method:"POST"});if(!r.ok){const c=await r.json().catch(()=>({}));throw new Error(c.detail||`测试连接失败 (${r.status})`)}return await r.json()}const wS=ti("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ht=u.forwardRef(({className:a,variant:l,...r},c)=>e.jsx("div",{ref:c,role:"alert",className:P(wS({variant:l}),a),...r}));ht.displayName="Alert";const Jn=u.forwardRef(({className:a,...l},r)=>e.jsx("h5",{ref:r,className:P("mb-1 font-medium leading-none tracking-tight",a),...l}));Jn.displayName="AlertTitle";const ft=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{ref:r,className:P("text-sm [&_p]:leading-relaxed",a),...l}));ft.displayName="AlertDescription";const _S={name:"toml",startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(a,l){let r;if(!l.inString&&(r=a.match(/^('''|"""|'|")/))&&(l.stringType=r[0],l.inString=!0),a.sol()&&!l.inString&&l.inArray===0&&(l.lhs=!0),l.inString){for(;l.inString;)if(a.match(l.stringType))l.inString=!1;else if(a.peek()==="\\")a.next(),a.next();else{if(a.eol())break;a.match(/^.[^\\\"\']*/)}return l.lhs?"property":"string"}else{if(l.inArray&&a.peek()==="]")return a.next(),l.inArray--,"bracket";if(l.lhs&&a.peek()==="["&&a.skipTo("]"))return a.next(),a.peek()==="]"&&a.next(),"atom";if(a.peek()==="#")return a.skipToEnd(),"comment";if(a.eatSpace())return null;if(l.lhs&&a.eatWhile(function(c){return c!="="&&c!=" "}))return"property";if(l.lhs&&a.peek()==="=")return a.next(),l.lhs=!1,null;if(!l.lhs&&a.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!l.lhs&&(a.match("true")||a.match("false")))return"atom";if(!l.lhs&&a.peek()==="[")return l.inArray++,a.next(),"bracket";if(!l.lhs&&a.match(/^\-?\d+(?:\.\d+)?/))return"number";a.eatSpace()||a.next()}return null},languageData:{commentTokens:{line:"#"}}},SS={python:[d1()],json:[u1(),m1()],toml:[o1.define(_S)],text:[]};function Qv({value:a,onChange:l,language:r="text",readOnly:c=!1,height:d="400px",minHeight:m,maxHeight:h,placeholder:f,theme:p="dark",className:g=""}){const[N,j]=u.useState(!1);if(u.useEffect(()=>{j(!0)},[]),!N)return e.jsx("div",{className:`rounded-md border bg-muted animate-pulse ${g}`,style:{height:d,minHeight:m,maxHeight:h}});const b=[...SS[r]||[],zm.lineWrapping,zm.theme({"&":{fontFamily:'"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace'},".cm-content":{fontFamily:'"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace'},".cm-gutters":{fontFamily:'"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace'},".cm-scroller":{fontFamily:'"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace'}})];return c&&b.push(zm.editable.of(!1)),e.jsx("div",{className:`rounded-md overflow-hidden border custom-scrollbar ${g}`,children:e.jsx(x1,{value:a,height:d,minHeight:m,maxHeight:h,theme:p==="dark"?h1:void 0,extensions:b,onChange:l,placeholder:f,basicSetup:{lineNumbers:!0,highlightActiveLineGutter:!0,highlightSpecialChars:!0,history:!0,foldGutter:!0,drawSelection:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,syntaxHighlighting:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,defaultKeymap:!0,searchKeymap:!0,historyKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0}})})}function kS({id:a,index:l,itemType:r,itemFields:c,value:d,onChange:m,onRemove:h,disabled:f,canRemove:p,placeholder:g}){const{attributes:N,listeners:j,setNodeRef:b,transform:y,transition:w,isDragging:z}=Cv({id:a,disabled:f}),M={transform:Tv.Transform.toString(y),transition:w};return e.jsxs("div",{ref:b,style:M,className:P("flex items-start gap-2 group",z&&"opacity-50 z-50"),children:[e.jsx("button",{type:"button",className:P("flex-shrink-0 p-2 cursor-grab active:cursor-grabbing","text-muted-foreground hover:text-foreground transition-colors","opacity-0 group-hover:opacity-100 focus:opacity-100",f&&"cursor-not-allowed opacity-30"),...N,...j,children:e.jsx(dv,{className:"h-4 w-4"})}),e.jsx("div",{className:"flex-1 min-w-0",children:r==="object"&&c?e.jsx(CS,{value:d,onChange:m,fields:c,disabled:f}):r==="number"?e.jsx(ae,{type:"number",value:d??"",onChange:S=>m(parseFloat(S.target.value)||0),placeholder:g??`第 ${l+1} 项`,disabled:f,className:"font-mono"}):e.jsx(ae,{type:"text",value:d??"",onChange:S=>m(S.target.value),placeholder:g??`第 ${l+1} 项`,disabled:f})}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",onClick:h,disabled:f||!p,className:P("flex-shrink-0 text-muted-foreground hover:text-destructive","opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity"),children:e.jsx(os,{className:"h-4 w-4"})})]})}function CS({value:a,onChange:l,fields:r,disabled:c}){const d=u.useCallback((h,f)=>{l({...a,[h]:f})},[a,l]),m=(h,f)=>{const p=a?.[h];if(f.type==="boolean"||f.type==="switch")return e.jsxs("div",{className:"flex items-center justify-between py-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsx(qe,{checked:!!(p??f.default),onCheckedChange:g=>d(h,g),disabled:c})]});if(f.type==="slider"||f.type==="number"&&f.min!=null&&f.max!=null){const g=p??f.default??f.min??0;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e.jsx(el,{value:[g],onValueChange:N=>d(h,N[0]),min:f.min??0,max:f.max??100,step:f.step??1,disabled:c,className:"py-1"})]})}return f.type==="select"&&f.choices?e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsxs(Pe,{value:String(p??f.default??""),onValueChange:g=>d(h,g),disabled:c,children:[e.jsx(Ie,{className:"h-8 text-sm",children:e.jsx(Fe,{placeholder:f.placeholder??"请选择"})}),e.jsx(Be,{children:f.choices.map(g=>e.jsx(W,{value:String(g),children:String(g)},String(g)))})]})]}):f.type==="number"?e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsx(ae,{type:"number",value:p??f.default??"",onChange:g=>d(h,parseFloat(g.target.value)||0),placeholder:f.placeholder,disabled:c,className:"h-8 text-sm"})]}):e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:f.label??h}),e.jsx(ae,{type:"text",value:p??f.default??"",onChange:g=>d(h,g.target.value),placeholder:f.placeholder,disabled:c,className:"h-8 text-sm"})]})};return e.jsx(Te,{className:"p-3 space-y-2 bg-muted/30",children:Object.entries(r).map(([h,f])=>e.jsx("div",{children:m(h,f)},h))})}function TS({value:a,onChange:l,itemType:r="string",itemFields:c,minItems:d,maxItems:m,disabled:h,placeholder:f}){const p=u.useMemo(()=>Array.isArray(a)?a:typeof a=="string"&&a.trim()?a.split(",").map(E=>E.trim()):[],[a]),[g]=u.useState(()=>new Map),N=u.useCallback(E=>(g.has(E)||g.set(E,`item-${Date.now()}-${E}-${Math.random().toString(36).slice(2)}`),g.get(E)),[g]),j=u.useMemo(()=>{const E=[];for(let C=0;C{const{active:C,over:R}=E;if(R&&C.id!==R.id){const H=j.indexOf(C.id),O=j.indexOf(R.id),X=wv(p,H,O);l(X)}},[p,j,l]),w=u.useCallback(()=>{if(m!=null&&p.length>=m)return;let E;r==="object"&&c?E=Object.fromEntries(Object.entries(c).map(([C,R])=>[C,R.default??""])):r==="number"?E=0:E="",l([...p,E])},[p,m,r,c,l]),z=u.useCallback((E,C)=>{const R=[...p];R[E]=C,l(R)},[p,l]),M=u.useCallback(E=>{if(d!=null&&p.length<=d)return;const C=p.filter((R,H)=>H!==E);g.delete(E),l(C)},[p,d,g,l]),S=m==null||p.lengthd;return e.jsxs("div",{className:"space-y-2",children:[p.length===0?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground py-4 justify-center border border-dashed rounded-md",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx("span",{children:"暂无数据,点击下方按钮添加"})]}):e.jsx(_v,{sensors:b,collisionDetection:Sv,onDragEnd:y,children:e.jsx(kv,{items:j,strategy:f1,children:e.jsx("div",{className:"space-y-2",children:p.map((E,C)=>e.jsx(kS,{id:j[C],index:C,itemType:r,itemFields:c,value:E,onChange:R=>z(C,R),onRemove:()=>M(C),disabled:h,canRemove:F,placeholder:f},j[C]))})})}),e.jsxs(_,{type:"button",variant:"outline",size:"sm",onClick:w,disabled:h||!S,className:"w-full",children:[e.jsx(Xs,{className:"h-4 w-4 mr-1"}),"添加项目",m!==void 0&&e.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",p.length,"/",m,")"]})]}),(d!=null||m!=null)&&(d!==null||m!==null)&&e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:d!=null&&m!=null?`允许 ${d} - ${m} 项`:d!=null?`至少 ${d} 项`:`最多 ${m} 项`})]})}function bx({content:a,className:l=""}){return e.jsx("div",{className:`prose prose-sm dark:prose-invert max-w-none ${l}`,children:e.jsx(b1,{remarkPlugins:[w1,_1],rehypePlugins:[y1],components:{code({inline:r,className:c,children:d,...m}){return r?e.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",...m,children:d}):e.jsx("code",{className:`${c} block bg-muted p-4 rounded-lg overflow-x-auto`,...m,children:d})},table({children:r,...c}){return e.jsx("div",{className:"overflow-x-auto",children:e.jsx("table",{className:"border-collapse border border-border",...c,children:r})})},th({children:r,...c}){return e.jsx("th",{className:"border border-border bg-muted px-4 py-2 text-left font-semibold",...c,children:r})},td({children:r,...c}){return e.jsx("td",{className:"border border-border px-4 py-2",...c,children:r})},a({children:r,...c}){return e.jsx("a",{className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",...c,children:r})},blockquote({children:r,...c}){return e.jsx("blockquote",{className:"border-l-4 border-primary pl-4 italic text-muted-foreground",...c,children:r})},h1({children:r,...c}){return e.jsx("h1",{className:"text-3xl font-bold mt-6 mb-4",...c,children:r})},h2({children:r,...c}){return e.jsx("h2",{className:"text-2xl font-bold mt-5 mb-3",...c,children:r})},h3({children:r,...c}){return e.jsx("h3",{className:"text-xl font-bold mt-4 mb-2",...c,children:r})},h4({children:r,...c}){return e.jsx("h4",{className:"text-lg font-semibold mt-3 mb-2",...c,children:r})},ul({children:r,...c}){return e.jsx("ul",{className:"list-disc list-inside space-y-1 my-2",...c,children:r})},ol({children:r,...c}){return e.jsx("ol",{className:"list-decimal list-inside space-y-1 my-2",...c,children:r})},p({children:r,...c}){return e.jsx("p",{className:"my-2 leading-relaxed",...c,children:r})},hr({...r}){return e.jsx("hr",{className:"my-4 border-border",...r})}},children:a})})}function ES(a,l){let r=a.slice(0,l).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}function MS(a,l,r){let c=a.split(/\r\n|\n|\r/g),d="",m=(Math.log10(l+1)|0)+1;for(let h=l-1;h<=l+1;h++){let f=c[h-1];f&&(d+=h.toString().padEnd(m," "),d+=": ",d+=f,d+=` `,h===l&&(d+=" ".repeat(m+r+2),d+=`^ `))}return d}class Ds extends Error{line;column;codeblock;constructor(l,r){const[c,d]=ES(r.toml,r.ptr),m=MS(r.toml,c,d);super(`Invalid TOML document: ${l} @@ -47,8 +47,8 @@ ${m}`,r),this.line=c,this.column=d,this.codeblock=m}}function AS(a,l){let r=0;fo `){if(!d)throw new Ds("newlines are not allowed in strings",{toml:a,ptr:l-1})}else if(g<" "&&g!==" "||g==="")throw new Ds("control characters are not allowed in strings",{toml:a,ptr:l-1});if(h){if(h=!1,g==="u"||g==="U"){let N=a.slice(l,l+=g==="u"?4:8);if(!LS.test(N))throw new Ds("invalid unicode escape",{toml:a,ptr:m});try{f+=String.fromCodePoint(parseInt(N,16))}catch{throw new Ds("invalid unicode escape",{toml:a,ptr:m})}}else if(d&&(g===` `||g===" "||g===" "||g==="\r")){if(l=Pl(a,l-1,!0),a[l]!==` `&&a[l]!=="\r")throw new Ds("invalid escape: only line-ending whitespace may be escaped",{toml:a,ptr:m});l=Pl(a,l)}else if(g in Gg)f+=Gg[g];else throw new Ds("unrecognized escape sequence",{toml:a,ptr:m});p=l}else!c&&g==="\\"&&(m=l-1,h=!0,f+=a.slice(p,m))}return f+a.slice(p,r-1)}function US(a,l,r,c){if(a==="true")return!0;if(a==="false")return!1;if(a==="-inf")return-1/0;if(a==="inf"||a==="+inf")return 1/0;if(a==="nan"||a==="+nan"||a==="-nan")return NaN;if(a==="-0")return c?0n:0;let d=RS.test(a);if(d||DS.test(a)){if(OS.test(a))throw new Ds("leading zeroes are not allowed",{toml:l,ptr:r});a=a.replace(/_/g,"");let h=+a;if(isNaN(h))throw new Ds("invalid number",{toml:l,ptr:r});if(d){if((d=!Number.isSafeInteger(h))&&!c)throw new Ds("integer value cannot be represented losslessly",{toml:l,ptr:r});(d||c===!0)&&(h=BigInt(a))}return h}const m=new Jr(a);if(!m.isValid())throw new Ds("invalid value",{toml:l,ptr:r});return m}function $S(a,l,r,c){let d=a.slice(l,r),m=d.indexOf("#");m>-1&&(yx(a,m),d=d.slice(0,m));let h=d.trimEnd();if(!c){let f=d.indexOf(` -`,h.length);if(f>-1)throw new Ds("newlines are not allowed in inline tables",{toml:a,ptr:l+f})}return[h,m]}function wx(a,l,r,c,d){if(c===0)throw new Ds("document contains excessively nested structures. aborting.",{toml:a,ptr:l});let m=a[l];if(m==="["||m==="{"){let[p,g]=m==="["?PS(a,l,c,d):IS(a,l,c,d),N=r?Vg(a,g,",",r):g;if(g-N&&r==="}"){let j=Xo(a,g,N);if(j>-1)throw new Ds("newlines are not allowed in inline tables",{toml:a,ptr:j})}return[p,N]}let h;if(m==='"'||m==="'"){h=Yv(a,l);let p=Jv(a,l,h);if(r){if(h=Pl(a,h,r!=="]"),a[h]&&a[h]!==","&&a[h]!==r&&a[h]!==` -`&&a[h]!=="\r")throw new Ds("unexpected character encountered",{toml:a,ptr:h});h+=+(a[h]===",")}return[p,h]}h=Vg(a,l,",",r);let f=$S(a,l,h-+(a[h-1]===","),r==="]");if(!f[0])throw new Ds("incomplete key-value declaration: no value specified",{toml:a,ptr:l});return r&&f[1]>-1&&(h=Pl(a,l+f[1]),h+=+(a[h]===",")),[US(f[0],a,l,d),h]}let BS=/^[a-zA-Z0-9-_]+[ \t]*$/;function ex(a,l,r="="){let c=l-1,d=[],m=a.indexOf(r,l);if(m<0)throw new Ds("incomplete key-value: cannot find end of key",{toml:a,ptr:l});do{let h=a[l=++c];if(h!==" "&&h!==" ")if(h==='"'||h==="'"){if(h===a[l+1]&&h===a[l+2])throw new Ds("multiline strings are not allowed in keys",{toml:a,ptr:l});let f=Yv(a,l);if(f<0)throw new Ds("unfinished string encountered",{toml:a,ptr:l});c=a.indexOf(".",f);let p=a.slice(f,c<0||c>m?m:c),g=Xo(p);if(g>-1)throw new Ds("newlines are not allowed in keys",{toml:a,ptr:l+c+g});if(p.trimStart())throw new Ds("found extra tokens after the string part",{toml:a,ptr:f});if(mm?m:c);if(!BS.test(f))throw new Ds("only letter, numbers, dashes and underscores are allowed in keys",{toml:a,ptr:l});d.push(f.trimEnd())}}while(c+1&&c-1)throw new Ds("newlines are not allowed in inline tables",{toml:a,ptr:l+f})}return[h,m]}function wx(a,l,r,c,d){if(c===0)throw new Ds("document contains excessively nested structures. aborting.",{toml:a,ptr:l});let m=a[l];if(m==="["||m==="{"){let[p,g]=m==="["?PS(a,l,c,d):BS(a,l,c,d),N=r?Vg(a,g,",",r):g;if(g-N&&r==="}"){let j=Xo(a,g,N);if(j>-1)throw new Ds("newlines are not allowed in inline tables",{toml:a,ptr:j})}return[p,N]}let h;if(m==='"'||m==="'"){h=Yv(a,l);let p=Jv(a,l,h);if(r){if(h=Pl(a,h,r!=="]"),a[h]&&a[h]!==","&&a[h]!==r&&a[h]!==` +`&&a[h]!=="\r")throw new Ds("unexpected character encountered",{toml:a,ptr:h});h+=+(a[h]===",")}return[p,h]}h=Vg(a,l,",",r);let f=$S(a,l,h-+(a[h-1]===","),r==="]");if(!f[0])throw new Ds("incomplete key-value declaration: no value specified",{toml:a,ptr:l});return r&&f[1]>-1&&(h=Pl(a,l+f[1]),h+=+(a[h]===",")),[US(f[0],a,l,d),h]}let IS=/^[a-zA-Z0-9-_]+[ \t]*$/;function ex(a,l,r="="){let c=l-1,d=[],m=a.indexOf(r,l);if(m<0)throw new Ds("incomplete key-value: cannot find end of key",{toml:a,ptr:l});do{let h=a[l=++c];if(h!==" "&&h!==" ")if(h==='"'||h==="'"){if(h===a[l+1]&&h===a[l+2])throw new Ds("multiline strings are not allowed in keys",{toml:a,ptr:l});let f=Yv(a,l);if(f<0)throw new Ds("unfinished string encountered",{toml:a,ptr:l});c=a.indexOf(".",f);let p=a.slice(f,c<0||c>m?m:c),g=Xo(p);if(g>-1)throw new Ds("newlines are not allowed in keys",{toml:a,ptr:l+c+g});if(p.trimStart())throw new Ds("found extra tokens after the string part",{toml:a,ptr:f});if(mm?m:c);if(!IS.test(f))throw new Ds("only letter, numbers, dashes and underscores are allowed in keys",{toml:a,ptr:l});d.push(f.trimEnd())}}while(c+1&&c{try{l(!0),await NS(b,y),r(!1),m?.()}catch(w){console.error(`自动保存 ${b} 失败:`,w),r(!0),h?.(w instanceof Error?w:new Error(String(w)))}finally{l(!1)}},[l,r,m,h]),g=u.useCallback((b,y)=>{a||(r(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{p(b,y)},d))},[a,r,p,d]),N=u.useCallback(async(b,y)=>{f.current&&(clearTimeout(f.current),f.current=null),await p(b,y)},[p]),j=u.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]);return u.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),{triggerAutoSave:g,saveNow:N,cancelPendingAutoSave:j}}function Vt(a,l,r,c){u.useEffect(()=>{a&&!r&&c(l,a)},[a])}const QS=500;function YS(){return e.jsx(lr,{children:e.jsx(JS,{})})}function JS(){const[a,l]=u.useState(!0),[r,c]=u.useState(!1),[d,m]=u.useState(!1),[h,f]=u.useState(!1),[p,g]=u.useState("visual"),[N,j]=u.useState(""),[b,y]=u.useState(!1),[w,z]=u.useState(""),{toast:M}=nt(),{triggerRestart:S,isRestarting:F}=Tn(),[E,C]=u.useState(null),[R,H]=u.useState(null),[O,X]=u.useState(null),[L,me]=u.useState(null),[Ne,je]=u.useState(null),[ce,ge]=u.useState(null),[pe,D]=u.useState(null),[Q,B]=u.useState(null),[ue,Y]=u.useState(null),[we,fe]=u.useState(null),[Ee,G]=u.useState(null),[$,A]=u.useState(null),[K,Re]=u.useState(null),[se,$e]=u.useState(null),[cs,J]=u.useState(null),[Z,Le]=u.useState(null),[le,De]=u.useState(null),[xe,Me]=u.useState(null),[ds,Ts]=u.useState(null),[Ct,ia]=u.useState(null),[ut,Is]=u.useState(null),V=u.useRef(!0),Ke=u.useRef({}),He=Ae=>{const Qe=Ae.split(` +`:c}function KS(a,l,r,c={}){const{debounceMs:d=2e3,onSaveSuccess:m,onSaveError:h}=c,f=u.useRef(null),p=u.useCallback(async(b,y)=>{try{l(!0),await NS(b,y),r(!1),m?.()}catch(w){console.error(`自动保存 ${b} 失败:`,w),r(!0),h?.(w instanceof Error?w:new Error(String(w)))}finally{l(!1)}},[l,r,m,h]),g=u.useCallback((b,y)=>{a||(r(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{p(b,y)},d))},[a,r,p,d]),N=u.useCallback(async(b,y)=>{f.current&&(clearTimeout(f.current),f.current=null),await p(b,y)},[p]),j=u.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]);return u.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),{triggerAutoSave:g,saveNow:N,cancelPendingAutoSave:j}}function Vt(a,l,r,c){u.useEffect(()=>{a&&!r&&c(l,a)},[a])}const QS=500;function YS(){return e.jsx(lr,{children:e.jsx(JS,{})})}function JS(){const[a,l]=u.useState(!0),[r,c]=u.useState(!1),[d,m]=u.useState(!1),[h,f]=u.useState(!1),[p,g]=u.useState("visual"),[N,j]=u.useState(""),[b,y]=u.useState(!1),[w,z]=u.useState(""),{toast:M}=nt(),{triggerRestart:S,isRestarting:F}=Tn(),[E,C]=u.useState(null),[R,H]=u.useState(null),[O,X]=u.useState(null),[L,me]=u.useState(null),[Ne,je]=u.useState(null),[re,ge]=u.useState(null),[pe,D]=u.useState(null),[Q,I]=u.useState(null),[ue,Y]=u.useState(null),[we,fe]=u.useState(null),[Ee,G]=u.useState(null),[$,A]=u.useState(null),[K,Re]=u.useState(null),[se,$e]=u.useState(null),[cs,J]=u.useState(null),[Z,Le]=u.useState(null),[ne,De]=u.useState(null),[xe,Me]=u.useState(null),[ds,Ts]=u.useState(null),[Ct,ia]=u.useState(null),[ut,Bs]=u.useState(null),V=u.useRef(!0),Ke=u.useRef({}),He=Ae=>{const Qe=Ae.split(` `);let As=Qe[0];As=As.replace(/^Error:\s*/,"");const mt=[[/Invalid TOML document: unrecognized escape sequence/,"TOML 文档错误:无法识别的转义序列(提示:在双引号字符串中使用 \\\\ 转义反斜杠,或使用单引号字符串)"],[/Invalid TOML document: only letter, numbers, dashes and underscores are allowed in keys/,"TOML 文档错误:键名只能包含字母、数字、短横线和下划线"],[/Invalid TOML document: (.+)/,"TOML 文档错误:$1"],[/Unexpected character.*at line (\d+), column (\d+)/,"第 $1 行第 $2 列:意外的字符"],[/Expected.*at line (\d+), column (\d+)/,"第 $1 行第 $2 列:缺少必要的字符"],[/Invalid.*at line (\d+), column (\d+)/,"第 $1 行第 $2 列:无效的语法"],[/Unterminated string at line (\d+)/,"第 $1 行:字符串未正常结束(缺少引号)"],[/Duplicate key.*at line (\d+)/,"第 $1 行:重复的键名"],[/Invalid escape sequence at line (\d+)/,"第 $1 行:无效的转义序列(提示:在双引号字符串中使用 \\\\ 转义反斜杠)"],[/Expected.*but got.*at line (\d+)/,"第 $1 行:类型不匹配"],[/line (\d+), column (\d+)/,"第 $1 行第 $2 列"],[/Unexpected end of input/,"意外的文件结束(可能缺少闭合符号)"],[/Unexpected token/,"意外的标记"],[/Invalid number/,"无效的数字"],[/Invalid date/,"无效的日期格式"],[/Invalid boolean/,"无效的布尔值(应为 true 或 false)"],[/Unexpected character/,"意外的字符"],[/unrecognized escape sequence/,"无法识别的转义序列"]];for(const[Ht,ca]of mt)if(Ht.test(As)){As=As.replace(Ht,ca);break}return Qe.length>1?(Qe[0]=As,Qe.join(` -`)):As},Je=u.useCallback(Ae=>{Ke.current=Ae,C(Ae.bot),H(Ae.personality);const Qe=Ae.chat;Qe.talk_value_rules||(Qe.talk_value_rules=[]),X(Qe),me(Ae.expression),je(Ae.emoji),ge(Ae.memory),D(Ae.tool),B(Ae.voice),Y(Ae.message_receive),fe(Ae.dream),G(Ae.lpmm_knowledge),A(Ae.keyword_reaction),Re(Ae.response_post_process),$e(Ae.chinese_typo),J(Ae.response_splitter),Le(Ae.log),De(Ae.debug),Me(Ae.experimental),Ts(Ae.maim_message),ia(Ae.telemetry),Is(Ae.webui)},[]),Es=u.useCallback(()=>({...Ke.current,bot:E,personality:R,chat:O,expression:L,emoji:Ne,memory:ce,tool:pe,voice:Q,message_receive:ue,dream:we,lpmm_knowledge:Ee,keyword_reaction:$,response_post_process:K,chinese_typo:se,response_splitter:cs,log:Z,debug:le,experimental:xe,maim_message:ds,telemetry:Ct,webui:ut}),[E,R,O,L,Ne,ce,pe,Q,ue,we,Ee,$,K,se,cs,Z,le,xe,ds,Ct,ut]),ms=u.useCallback(async()=>{try{const Qe=(await jS()).replace(/"([^"]*)"/g,(As,mt)=>`"${mt.replace(/\\n/g,` -`).replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}"`);j(Qe),y(!1)}catch(Ae){M({variant:"destructive",title:"加载失败",description:Ae instanceof Error?Ae.message:"加载源代码失败"})}},[M]),Ms=u.useCallback(async()=>{try{l(!0);const Ae=await Hg();Je(Ae),f(!1),V.current=!1,await ms()}catch(Ae){console.error("加载配置失败:",Ae),M({title:"加载失败",description:"无法加载配置文件",variant:"destructive"})}finally{l(!1)}},[M,ms,Je]);u.useEffect(()=>{Ms()},[Ms]);const{triggerAutoSave:We,cancelPendingAutoSave:Cs}=KS(V.current,m,f);Vt(E,"bot",V.current,We),Vt(R,"personality",V.current,We),Vt(O,"chat",V.current,We),Vt(L,"expression",V.current,We),Vt(Ne,"emoji",V.current,We),Vt(ce,"memory",V.current,We),Vt(pe,"tool",V.current,We),Vt(Q,"voice",V.current,We),Vt(we,"dream",V.current,We),Vt(Ee,"lpmm_knowledge",V.current,We),Vt($,"keyword_reaction",V.current,We),Vt(K,"response_post_process",V.current,We),Vt(se,"chinese_typo",V.current,We),Vt(cs,"response_splitter",V.current,We),Vt(Z,"log",V.current,We),Vt(le,"debug",V.current,We),Vt(ds,"maim_message",V.current,We),Vt(Ct,"telemetry",V.current,We),Vt(ut,"webui",V.current,We);const rs=async()=>{try{c(!0);try{_x(N)}catch(Qe){const As=Qe instanceof Error?Qe.message:"TOML 格式错误",mt=He(As);y(!0),z(mt),M({variant:"destructive",title:"TOML 格式错误",description:mt}),c(!1);return}const Ae=N.replace(/"([^"]*)"/g,(Qe,As)=>`"${As.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}"`);await vS(Ae),f(!1),y(!1),z(""),M({title:"保存成功",description:"配置已保存"}),await Ms()}catch(Ae){y(!0);const Qe=Ae instanceof Error?Ae.message:"保存配置失败";z(Qe),M({variant:"destructive",title:"保存失败",description:Qe})}finally{c(!1)}},is=async Ae=>{if(h){M({variant:"destructive",title:"切换失败",description:"请先保存当前更改"});return}if(g(Ae),Ae==="source")await ms();else try{const Qe=await Hg();Je(Qe),f(!1)}catch(Qe){console.error("加载配置失败:",Qe),M({title:"加载失败",description:"无法加载配置文件",variant:"destructive"})}},ys=async()=>{try{c(!0),Cs(),await qg(Es()),f(!1),M({title:"保存成功",description:"麦麦主程序配置已保存"})}catch(Ae){console.error("保存配置失败:",Ae),M({title:"保存失败",description:Ae.message,variant:"destructive"})}finally{c(!1)}},rt=async()=>{await S()},jt=async()=>{try{c(!0),Cs(),await qg(Es()),f(!1),M({title:"保存成功",description:"配置已保存,即将重启麦麦..."}),await new Promise(Ae=>setTimeout(Ae,QS)),await rt()}catch(Ae){console.error("保存失败:",Ae),M({title:"保存失败",description:Ae.message,variant:"destructive"})}finally{c(!1)}};return a?e.jsx(ts,{className:"h-full",children:e.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})})}):e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl font-bold",children:"麦麦主程序配置"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs sm:text-sm",children:"管理麦麦的核心功能和行为设置"})]}),e.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[e.jsxs(_,{onClick:p==="visual"?ys:rs,disabled:r||d||!h||F,size:"sm",variant:"outline",className:"w-20 sm:w-24",children:[e.jsx(gc,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2,fill:"none"}),e.jsx("span",{className:"ml-1 truncate text-xs sm:text-sm",children:r?"保存中":d?"自动":h?"保存":"已保存"})]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{disabled:r||d||F,size:"sm",className:"w-20 sm:w-28",children:[e.jsx(pc,{className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"ml-1 truncate text-xs sm:text-sm",children:F?"重启中":h?"保存重启":"重启"})]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重启麦麦?"}),e.jsx(gs,{asChild:!0,children:e.jsx("div",{children:e.jsx("p",{children:h?"当前有未保存的配置更改。点击确认将先保存配置,然后重启麦麦使新配置生效。重启过程中麦麦将暂时离线。":"即将重启麦麦主程序。重启过程中麦麦将暂时离线,配置将在重启后生效。"})})})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:h?jt:rt,children:h?"保存并重启":"确认重启"})]})]})]})]})]}),e.jsx("div",{className:"flex",children:e.jsx(Jt,{value:p,onValueChange:Ae=>is(Ae),className:"w-full",children:e.jsxs(Gt,{className:"h-8 sm:h-9 w-full grid grid-cols-2",children:[e.jsxs(Xe,{value:"visual",className:"text-xs sm:text-sm",children:[e.jsx(uv,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),"可视化编辑"]}),e.jsxs(Xe,{value:"source",className:"text-xs sm:text-sm",children:[e.jsx(dx,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),"源代码编辑"]})]})})})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:["配置更新后需要",e.jsx("strong",{children:"重启麦麦"}),'才能生效。你可以点击右上角的"保存并重启"按钮一键完成保存和重启。']})]}),p==="source"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:[e.jsx("strong",{children:"源代码模式(高级功能):"}),"直接编辑 TOML 配置文件。此功能仅适用于熟悉 TOML 语法的高级用户。保存时会在前端验证格式,只有格式完全正确才能保存。",b&&w&&e.jsxs("div",{className:"text-destructive font-semibold mt-3 p-3 bg-destructive/10 rounded-md",children:[e.jsx("div",{className:"font-bold mb-2",children:"⚠️ TOML 格式错误:"}),e.jsx("pre",{className:"text-sm font-mono whitespace-pre-wrap break-words",children:w})]})]})]}),e.jsx(Qv,{value:N,onChange:Ae=>{j(Ae),f(!0),b&&(y(!1),z(""))},language:"toml",theme:"dark",height:"calc(100vh - 280px)",minHeight:"500px",placeholder:"TOML 配置内容"})]}),p==="visual"&&e.jsx(e.Fragment,{children:e.jsxs(Jt,{defaultValue:"bot",className:"w-full",children:[e.jsxs(Gt,{className:"flex flex-wrap h-auto gap-1 p-1 sm:grid sm:grid-cols-5 lg:grid-cols-10",children:[e.jsx(Xe,{value:"bot",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"基本信息"}),e.jsx(Xe,{value:"personality",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"人格"}),e.jsx(Xe,{value:"chat",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"聊天"}),e.jsx(Xe,{value:"expression",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"表达"}),e.jsx(Xe,{value:"features",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"功能"}),e.jsx(Xe,{value:"processing",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"处理"}),e.jsx(Xe,{value:"dream",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"做梦"}),e.jsx(Xe,{value:"lpmm",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"知识库"}),e.jsx(Xe,{value:"webui",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"WebUI"}),e.jsx(Xe,{value:"other",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"其他"})]}),e.jsx(Ss,{value:"bot",className:"space-y-4",children:E&&e.jsx(W2,{config:E,onChange:C})}),e.jsx(Ss,{value:"personality",className:"space-y-4",children:R&&e.jsx(eS,{config:R,onChange:H})}),e.jsx(Ss,{value:"chat",className:"space-y-4",children:O&&e.jsx(aS,{config:O,onChange:X})}),e.jsx(Ss,{value:"expression",className:"space-y-4",children:L&&e.jsx(xS,{config:L,onChange:me})}),e.jsx(Ss,{value:"features",className:"space-y-4",children:Ne&&ce&&pe&&Q&&e.jsx(uS,{emojiConfig:Ne,memoryConfig:ce,toolConfig:pe,voiceConfig:Q,onEmojiChange:je,onMemoryChange:ge,onToolChange:D,onVoiceChange:B})}),e.jsxs(Ss,{value:"processing",className:"space-y-4",children:[$&&K&&se&&cs&&e.jsx(fS,{keywordReactionConfig:$,responsePostProcessConfig:K,chineseTypoConfig:se,responseSplitterConfig:cs,onKeywordReactionChange:A,onResponsePostProcessChange:Re,onChineseTypoChange:$e,onResponseSplitterChange:J}),ue&&e.jsx(pS,{config:ue,onChange:Y})]}),e.jsx(Ss,{value:"dream",className:"space-y-4",children:we&&e.jsx(lS,{config:we,onChange:fe})}),e.jsx(Ss,{value:"lpmm",className:"space-y-4",children:Ee&&e.jsx(nS,{config:Ee,onChange:G})}),e.jsx(Ss,{value:"webui",className:"space-y-4",children:ut&&e.jsx(gS,{config:ut,onChange:Is})}),e.jsxs(Ss,{value:"other",className:"space-y-4",children:[Z&&e.jsx(rS,{config:Z,onChange:Le}),le&&e.jsx(iS,{config:le,onChange:De}),xe&&e.jsx(cS,{config:xe,onChange:Me}),ds&&e.jsx(oS,{config:ds,onChange:Ts}),Ct&&e.jsx(dS,{config:Ct,onChange:ia})]})]})}),e.jsx(nr,{})]})})}const ql=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:r,className:P("w-full caption-bottom text-sm",a),...l})}));ql.displayName="Table";const Vl=u.forwardRef(({className:a,...l},r)=>e.jsx("thead",{ref:r,className:P("[&_tr]:border-b",a),...l}));Vl.displayName="TableHeader";const Gl=u.forwardRef(({className:a,...l},r)=>e.jsx("tbody",{ref:r,className:P("[&_tr:last-child]:border-0",a),...l}));Gl.displayName="TableBody";const XS=u.forwardRef(({className:a,...l},r)=>e.jsx("tfoot",{ref:r,className:P("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",a),...l}));XS.displayName="TableFooter";const _t=u.forwardRef(({className:a,...l},r)=>e.jsx("tr",{ref:r,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...l}));_t.displayName="TableRow";const ns=u.forwardRef(({className:a,...l},r)=>e.jsx("th",{ref:r,className:P("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...l}));ns.displayName="TableHead";const Ze=u.forwardRef(({className:a,...l},r)=>e.jsx("td",{ref:r,className:P("px-4 py-3 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...l}));Ze.displayName="TableCell";const ZS=u.forwardRef(({className:a,...l},r)=>e.jsx("caption",{ref:r,className:P("mt-4 text-sm text-muted-foreground",a),...l}));ZS.displayName="TableCaption";const md=u.forwardRef(({className:a,...l},r)=>e.jsx(ka,{ref:r,className:P("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),...l}));md.displayName=ka.displayName;const xd=u.forwardRef(({className:a,...l},r)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx($t,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(ka.Input,{ref:r,className:P("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...l})]}));xd.displayName=ka.Input.displayName;const hd=u.forwardRef(({className:a,...l},r)=>e.jsx(ka.List,{ref:r,className:P("max-h-[300px] overflow-y-auto overflow-x-hidden",a),...l}));hd.displayName=ka.List.displayName;const fd=u.forwardRef((a,l)=>e.jsx(ka.Empty,{ref:l,className:"py-6 text-center text-sm",...a}));fd.displayName=ka.Empty.displayName;const uc=u.forwardRef(({className:a,...l},r)=>e.jsx(ka.Group,{ref:r,className:P("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...l}));uc.displayName=ka.Group.displayName;const WS=u.forwardRef(({className:a,...l},r)=>e.jsx(ka.Separator,{ref:r,className:P("-mx-1 h-px bg-border",a),...l}));WS.displayName=ka.Separator.displayName;const mc=u.forwardRef(({className:a,...l},r)=>e.jsx(ka.Item,{ref:r,className:P("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a),...l}));mc.displayName=ka.Item.displayName;const Zv=j1,Wv=v1,eN=N1,Tx=u.forwardRef(({className:a,sideOffset:l=4,...r},c)=>e.jsx(g1,{children:e.jsx(Zj,{ref:c,sideOffset:l,className:P("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",a),...r})}));Tx.displayName=Zj.displayName;function Bl({content:a,className:l,iconClassName:r,side:c="top",align:d="center",maxWidth:m="300px"}){return e.jsx(Zv,{delayDuration:200,children:e.jsxs(Wv,{children:[e.jsx(eN,{asChild:!0,children:e.jsxs("button",{type:"button",className:P("inline-flex items-center justify-center rounded-full","text-muted-foreground hover:text-foreground","transition-colors cursor-help","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",l),onClick:h=>h.preventDefault(),children:[e.jsx(ox,{className:P("h-4 w-4",r)}),e.jsx("span",{className:"sr-only",children:"帮助信息"})]})}),e.jsx(Tx,{side:c,align:d,className:P("max-w-[var(--max-width)] text-sm leading-relaxed","bg-background text-foreground","border-2 border-primary shadow-lg","p-4"),style:{"--max-width":m},children:a})]})})}const sN=u.createContext(null),tN="maibot-completed-tours";function e4(){try{const a=localStorage.getItem(tN);return a?new Set(JSON.parse(a)):new Set}catch{return new Set}}function Qg(a){localStorage.setItem(tN,JSON.stringify([...a]))}function s4({children:a}){const[l,r]=u.useState({activeTourId:null,stepIndex:0,isRunning:!1}),[c]=u.useState(()=>new Map),[d,m]=u.useState(e4),[,h]=u.useState(0),f=u.useCallback((E,C)=>{c.set(E,C),h(R=>R+1)},[c]),p=u.useCallback(E=>{c.delete(E),r(C=>C.activeTourId===E?{...C,activeTourId:null,isRunning:!1,stepIndex:0}:C)},[c]),g=u.useCallback((E,C=0)=>{c.has(E)&&r({activeTourId:E,stepIndex:C,isRunning:!0})},[c]),N=u.useCallback(()=>{r(E=>({...E,isRunning:!1}))},[]),j=u.useCallback(E=>{r(C=>({...C,stepIndex:E}))},[]),b=u.useCallback(()=>{r(E=>({...E,stepIndex:E.stepIndex+1}))},[]),y=u.useCallback(()=>{r(E=>({...E,stepIndex:Math.max(0,E.stepIndex-1)}))},[]),w=u.useCallback(()=>l.activeTourId?c.get(l.activeTourId)||[]:[],[l.activeTourId,c]),z=u.useCallback(E=>{m(C=>{const R=new Set(C);return R.add(E),Qg(R),R})},[]),M=u.useCallback(E=>{const{action:C,index:R,status:H,type:O}=E,X=["finished","skipped"];if(C==="close"){r(L=>({...L,isRunning:!1,stepIndex:0}));return}X.includes(H)?r(L=>(H==="finished"&&L.activeTourId&&setTimeout(()=>z(L.activeTourId),0),{...L,isRunning:!1,stepIndex:0})):O==="step:after"&&(C==="next"?r(L=>({...L,stepIndex:R+1})):C==="prev"&&r(L=>({...L,stepIndex:R-1})))},[z]),S=u.useCallback(E=>d.has(E),[d]),F=u.useCallback(E=>{m(C=>{const R=new Set(C);return R.delete(E),Qg(R),R})},[]);return e.jsx(sN.Provider,{value:{state:l,tours:c,registerTour:f,unregisterTour:p,startTour:g,stopTour:N,goToStep:j,nextStep:b,prevStep:y,getCurrentSteps:w,handleJoyrideCallback:M,isTourCompleted:S,markTourCompleted:z,resetTourCompleted:F},children:a})}function Ex(){const a=u.useContext(sN);if(!a)throw new Error("useTour must be used within a TourProvider");return a}const t4={options:{zIndex:1e4,primaryColor:"hsl(var(--primary))",textColor:"hsl(var(--foreground))",backgroundColor:"hsl(var(--background))",arrowColor:"hsl(var(--background))",overlayColor:"rgba(0, 0, 0, 0.5)"},tooltip:{borderRadius:"var(--radius)",padding:"1rem"},tooltipContainer:{textAlign:"left"},tooltipTitle:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem"},tooltipContent:{fontSize:"0.875rem",padding:"0.5rem 0"},buttonNext:{backgroundColor:"hsl(var(--primary))",color:"hsl(var(--primary-foreground))",borderRadius:"calc(var(--radius) - 2px)",fontSize:"0.875rem",padding:"0.5rem 1rem"},buttonBack:{color:"hsl(var(--muted-foreground))",fontSize:"0.875rem",marginRight:"0.5rem"},buttonSkip:{color:"hsl(var(--muted-foreground))",fontSize:"0.875rem"},buttonClose:{color:"hsl(var(--muted-foreground))"},spotlight:{borderRadius:"var(--radius)"}},a4={back:"上一步",close:"关闭",last:"完成",next:"下一步",nextLabelWithProgress:"下一步 ({step}/{steps})",open:"打开对话框",skip:"跳过"};function l4(){const{state:a,getCurrentSteps:l,handleJoyrideCallback:r}=Ex(),c=l(),[d,m]=u.useState(!1),h=u.useRef(a.stepIndex),f=u.useRef(null);u.useEffect(()=>{h.current!==a.stepIndex&&(m(!1),h.current=a.stepIndex)},[a.stepIndex]),u.useEffect(()=>{if(!a.isRunning||c.length===0){m(!1);return}const j=c[a.stepIndex];if(!j){m(!1);return}const b=j.target;if(b==="body"){m(!0);return}m(!1);const y=setTimeout(()=>{const w=()=>{const F=document.querySelector(b);if(F){const E=F.getBoundingClientRect();if(E.width>0&&E.height>0)return!0}return!1};if(w()){setTimeout(()=>m(!0),100);return}const z=setInterval(()=>{w()&&(clearInterval(z),setTimeout(()=>m(!0),100))},100),M=setTimeout(()=>{clearInterval(z),m(!0)},5e3),S=()=>{clearInterval(z),clearTimeout(M)};f.current=S},150);return()=>{clearTimeout(y),f.current&&(f.current(),f.current=null)}},[a.isRunning,a.stepIndex,c]);const[p,g]=u.useState(null);if(u.useEffect(()=>{let j=document.getElementById("tour-portal-container");return j||(j=document.createElement("div"),j.id="tour-portal-container",j.style.cssText="position: fixed; top: 0; left: 0; z-index: 99999; pointer-events: none;",document.body.appendChild(j)),g(j),()=>{}},[]),!a.isRunning||c.length===0||!d)return null;const N=e.jsx(g_,{steps:c,stepIndex:a.stepIndex,run:a.isRunning,continuous:!0,showSkipButton:!0,showProgress:!0,disableOverlayClose:!0,disableScrolling:!1,disableScrollParentFix:!1,callback:r,styles:t4,locale:a4,scrollOffset:80,scrollToFirstStep:!0,floaterProps:{styles:{floater:{zIndex:99999}},disableAnimation:!0}},`tour-step-${a.stepIndex}`);return p?tw.createPortal(N,p):N}const gl="model-assignment-tour",aN=[{target:"body",content:"本引导旨在帮助你配置模型提供商和对应的模型,并为麦麦的各个组件分配合适的模型。",placement:"center",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="sidebar-model-provider"]',content:'第一步,你需要配置模型提供商。模型提供商决定了你要使用谁家的模型,无论是单一厂商(如 DeepSeek),还是模型平台(如 Siliconflow),都可以在这里进行配置。点击"下一步"进入配置页面。',placement:"right",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="add-provider-button"]',content:'点击"添加提供商"按钮,开始配置你的模型提供商。',placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="provider-dialog"]',content:"在这里,你可以选择你想要配置的模型提供商,填写相关信息后保存即可。",placement:"left",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-name-input"]',content:"这里的名称是你为这个模型提供商起的一个名字,方便你在后续使用时识别它。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-apikey-input"]',content:"这里需要填写你从模型提供商那里获取的 API 密钥,用于验证和调用模型服务。对于不同的提供商,获取 API 密钥的方式可能有所不同,请参考对应提供商的文档。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-url-input"]',content:"这里需要填写模型提供商的 API 访问地址,确保填写正确以便系统能够连接到模型服务。对于不同的提供商,API 地址可能有所不同,请参考对应提供商的文档。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-template-select"]',content:"当然,如果你不知道如何填写这些信息,很多模型提供商在这里都提供了预设的模板供你选择,选择对应的模板后,相关信息会自动填充。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-save-button"]',content:"填写完所有信息后,点击保存按钮,模型提供商就配置完成了。",placement:"top",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-cancel-button"]',content:"因为这次咱们什么都没有填写,所以点击取消按钮退出吧。",placement:"top",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="sidebar-model-management"]',content:'配置好模型提供商后,接下来我们需要为麦麦添加模型并分配功能。点击"下一步"进入模型管理页面。',placement:"right",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="add-model-button"]',content:'在为麦麦的组件分配模型之前,首先需要添加你想要分配的模型,点击"添加模型"按钮开始添加。',placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="model-dialog"]',content:"在这里,你可以选择你之前配置好的模型提供商,然后选择对应的模型来添加。",placement:"left",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-name-input"]',content:"这里的模型名称是你为这个模型起的一个名字,方便你在后续使用时识别它。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-provider-select"]',content:"在这里选择你之前配置好的模型提供商,这样系统才能知道你要添加哪个提供商的模型。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-identifier-input"]',content:"这里需要填写你想要添加的模型的标识符,不同的模型提供商可能有不同的标识符格式,请参考对应提供商的文档。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-save-button"]',content:"填写完所有信息后,点击保存按钮,模型就添加完成了。",placement:"top",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-cancel-button"]',content:"当然,因为这次咱们什么都没有填写,所以直接点击取消按钮退出吧,等你准备好了再来添加模型。",placement:"top",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="tasks-tab-trigger"]',content:'最后一步,添加好模型后,切换到"为模型分配功能"标签页,为麦麦的各个组件分配合适的模型。',placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="task-model-select"]',content:"在这里,你可以为每个组件选择一个或多个合适的模型,选择完成后配置会自动保存。恭喜你完成了模型配置的学习!",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1}],lN={0:"/config/model",1:"/config/model",2:"/config/modelProvider",3:"/config/modelProvider",4:"/config/modelProvider",5:"/config/modelProvider",6:"/config/modelProvider",7:"/config/modelProvider",8:"/config/modelProvider",9:"/config/modelProvider",10:"/config/modelProvider",11:"/config/model",12:"/config/model",13:"/config/model",14:"/config/model",15:"/config/model",16:"/config/model",17:"/config/model",18:"/config/model",19:"/config/model"},Wi=[{id:"siliconflow",name:"SiliconFlow",base_url:"https://api.siliconflow.cn/v1",client_type:"openai",display_name:"硅基流动 (SiliconFlow)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"deepseek",name:"DeepSeek",base_url:"https://api.deepseek.com",client_type:"openai",display_name:"DeepSeek",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"rinkoai",name:"RinkoAI",base_url:"https://rinkoai.com/v1",client_type:"openai",display_name:"RinkoAI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"zhipu",name:"ZhipuAI",base_url:"https://open.bigmodel.cn/api/paas/v4",client_type:"openai",display_name:"智谱 AI (ZhipuAI / GLM)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"moonshot",name:"Moonshot",base_url:"https://api.moonshot.cn/v1",client_type:"openai",display_name:"月之暗面 (Moonshot / Kimi)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"doubao",name:"Doubao",base_url:"https://ark.cn-beijing.volces.com/api/v3",client_type:"openai",display_name:"字节豆包 (Doubao)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"alibaba",name:"Alibaba",base_url:"https://dashscope.aliyuncs.com/compatible-mode/v1",client_type:"openai",display_name:"阿里云百炼 (Alibaba Qwen)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"baichuan",name:"Baichuan",base_url:"https://api.baichuan-ai.com/v1",client_type:"openai",display_name:"百川智能 (Baichuan)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"minimax",name:"MiniMax",base_url:"https://api.minimax.chat/v1",client_type:"openai",display_name:"MiniMax (海螺 AI)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"stepfun",name:"StepFun",base_url:"https://api.stepfun.com/v1",client_type:"openai",display_name:"阶跃星辰 (StepFun)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"lingyi",name:"Lingyi",base_url:"https://api.lingyiwanwu.com/v1",client_type:"openai",display_name:"零一万物 (Lingyi / Yi)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"openai",name:"OpenAI",base_url:"https://api.openai.com/v1",client_type:"openai",display_name:"OpenAI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"xai",name:"xAI",base_url:"https://api.x.ai/v1",client_type:"openai",display_name:"xAI (Grok)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"anthropic",name:"Anthropic",base_url:"https://api.anthropic.com/v1",client_type:"openai",display_name:"Anthropic (Claude)"},{id:"gemini",name:"Gemini",base_url:"https://generativelanguage.googleapis.com/v1beta",client_type:"gemini",display_name:"Google Gemini",modelFetcher:{endpoint:"/models",parser:"gemini"}},{id:"cohere",name:"Cohere",base_url:"https://api.cohere.ai/v1",client_type:"openai",display_name:"Cohere"},{id:"groq",name:"Groq",base_url:"https://api.groq.com/openai/v1",client_type:"openai",display_name:"Groq",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"together",name:"Together AI",base_url:"https://api.together.xyz/v1",client_type:"openai",display_name:"Together AI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"fireworks",name:"Fireworks",base_url:"https://api.fireworks.ai/inference/v1",client_type:"openai",display_name:"Fireworks AI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"mistral",name:"Mistral",base_url:"https://api.mistral.ai/v1",client_type:"openai",display_name:"Mistral AI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"perplexity",name:"Perplexity",base_url:"https://api.perplexity.ai",client_type:"openai",display_name:"Perplexity AI"},{id:"custom",name:"",base_url:"",client_type:"openai",display_name:"自定义"}];function Yg(a){return a?a.replace(/\/+$/,"").toLowerCase():""}function n4(a){if(!a)return null;const l=Yg(a);return Wi.find(r=>r.id!=="custom"&&Yg(r.base_url)===l)||null}const Lo=a=>({...a,max_retry:a.max_retry??2,timeout:a.timeout??30,retry_interval:a.retry_interval??10}),r4=(a,l=[],r=null)=>{const c={};return a?(a.name?.trim()?l.some((m,h)=>r!==null&&h===r?!1:m.name.trim().toLowerCase()===a.name.trim().toLowerCase())&&(c.name="提供商名称已存在,请使用其他名称"):c.name="请输入提供商名称",a.base_url?.trim()||(c.base_url="请输入基础 URL"),a.api_key?.trim()||(c.api_key="请输入 API Key"),{isValid:Object.keys(c).length===0,errors:c}):{isValid:!1,errors:{name:"提供商数据为空"}}};function i4(){return e.jsx(lr,{children:e.jsx(c4,{})})}function c4(){const[a,l]=u.useState([]),[r,c]=u.useState(!0),[d,m]=u.useState(!1),[h,f]=u.useState(!1),[p,g]=u.useState(!1),[N,j]=u.useState(!1),[b,y]=u.useState(null),[w,z]=u.useState(null),[M,S]=u.useState("custom"),[F,E]=u.useState(!1),[C,R]=u.useState(!1),[H,O]=u.useState(null),[X,L]=u.useState(!1),[me,Ne]=u.useState(""),[je,ce]=u.useState(new Set),[ge,pe]=u.useState(!1),[D,Q]=u.useState(1),[B,ue]=u.useState(20),[Y,we]=u.useState(""),[fe,Ee]=u.useState({isOpen:!1,providersToDelete:[],affectedModels:[],pendingProviders:[],context:"auto",oldProviders:[]}),[G,$]=u.useState({}),[A,K]=u.useState(new Set),[Re,se]=u.useState(new Map),{toast:$e}=nt(),cs=ha(),{state:J,goToStep:Z,registerTour:Le}=Ex(),{triggerRestart:le,isRestarting:De}=Tn(),xe=u.useRef(null),Me=u.useRef(!0);u.useEffect(()=>{Le(gl,aN)},[Le]),u.useEffect(()=>{if(J.activeTourId===gl&&J.isRunning){const te=lN[J.stepIndex];te&&!window.location.pathname.endsWith(te.replace("/config/",""))&&cs({to:te})}},[J.stepIndex,J.activeTourId,J.isRunning,cs]);const ds=u.useRef(J.stepIndex);u.useEffect(()=>{if(J.activeTourId===gl&&J.isRunning){const te=ds.current,_e=J.stepIndex;te>=3&&te<=9&&_e<3&&j(!1),te>=10&&_e>=3&&_e<=9&&($({}),S("custom"),y({name:"",base_url:"",api_key:"",client_type:"openai",max_retry:2,timeout:30,retry_interval:10}),z(null),L(!1),j(!0)),ds.current=_e}},[J.stepIndex,J.activeTourId,J.isRunning]),u.useEffect(()=>{if(J.activeTourId!==gl||!J.isRunning)return;const te=_e=>{const U=_e.target,Se=J.stepIndex;Se===2&&U.closest('[data-tour="add-provider-button"]')?setTimeout(()=>Z(3),300):Se===9&&U.closest('[data-tour="provider-cancel-button"]')&&setTimeout(()=>Z(10),300)};return document.addEventListener("click",te,!0),()=>document.removeEventListener("click",te,!0)},[J,Z]),u.useEffect(()=>{Ts()},[]);const Ts=async()=>{try{c(!0);const te=await Nn();l(te.api_providers||[]),g(!1),Me.current=!1}catch(te){console.error("加载配置失败:",te)}finally{c(!1)}},Ct=async()=>{await le()},ia=async()=>{try{m(!0),xe.current&&clearTimeout(xe.current);const te=a.map(es=>({...es,max_retry:es.max_retry??2,timeout:es.timeout??30,retry_interval:es.retry_interval??10})),{shouldProceed:_e}=await ut(te,"restart");if(!_e){m(!1);return}const U=await Nn(),Se=new Set(te.map(es=>es.name)),us=(U.models||[]).filter(es=>Se.has(es.api_provider));U.api_providers=te,U.models=us,await lc(U),g(!1),$e({title:"保存成功",description:"正在重启麦麦..."}),await Ct()}catch(te){console.error("保存配置失败:",te),$e({title:"保存失败",description:te.message,variant:"destructive"}),m(!1)}},ut=u.useCallback(async(te,_e="auto")=>{try{const U=await Nn(),Se=new Set(a.map($s=>$s.name)),as=new Set(te.map($s=>$s.name)),us=Array.from(Se).filter($s=>!as.has($s));if(us.length===0)return{shouldProceed:!0,providers:te};const Tt=(U.models||[]).filter($s=>us.includes($s.api_provider));return Tt.length===0?{shouldProceed:!0,providers:te}:(Ee({isOpen:!0,providersToDelete:us,affectedModels:Tt,pendingProviders:te,context:_e,oldProviders:[...a]}),{shouldProceed:!1,providers:te})}catch(U){return console.error("检查删除影响失败:",U),{shouldProceed:!0,providers:te}}},[a]),Is=async()=>{try{(fe.context==="auto"?f:m)(!0),Ee($s=>({...$s,isOpen:!1}));const _e=await Nn(),U=fe.pendingProviders.map(Lo),Se=new Set(U.map($s=>$s.name)),us=(_e.models||[]).filter($s=>Se.has($s.api_provider)),es=new Set(fe.affectedModels.map($s=>$s.name)),Tt=_e.model_task_config;Tt&&Object.keys(Tt).forEach($s=>{const pa=Tt[$s];pa&&Array.isArray(pa.model_list)&&(pa.model_list=pa.model_list.filter(oa=>!es.has(oa)))}),_e.api_providers=U,_e.models=us,_e.model_task_config=Tt,await lc(_e),l(fe.pendingProviders),g(!1),$e({title:"删除成功",description:`已删除 ${fe.providersToDelete.length} 个提供商和 ${fe.affectedModels.length} 个关联模型`}),Ee({isOpen:!1,providersToDelete:[],affectedModels:[],pendingProviders:[],context:"auto",oldProviders:[]}),ce(new Set),fe.context==="restart"&&await Ct()}catch(te){console.error("删除失败:",te),$e({title:"删除失败",description:te.message,variant:"destructive"})}finally{fe.context==="auto"?f(!1):m(!1)}},V=()=>{fe.oldProviders.length>0&&l(fe.oldProviders),Ee({isOpen:!1,providersToDelete:[],affectedModels:[],pendingProviders:[],context:"auto",oldProviders:[]}),g(!1)},Ke=u.useCallback(async te=>{if(Me.current)return;const{shouldProceed:_e}=await ut(te,"auto");if(!_e){g(!0);return}try{f(!0);const U=te.map(Lo);await Wm("api_providers",U),g(!1)}catch(U){console.error("自动保存失败:",U),$e({title:"自动保存失败",description:U.message,variant:"destructive"}),g(!0)}finally{f(!1)}},[a,ut]);u.useEffect(()=>{if(!Me.current)return g(!0),xe.current&&clearTimeout(xe.current),xe.current=setTimeout(()=>{Ke(a)},2e3),()=>{xe.current&&clearTimeout(xe.current)}},[a,Ke]);const He=async()=>{try{m(!0),xe.current&&clearTimeout(xe.current);const te=a.map(Lo),{shouldProceed:_e}=await ut(te,"manual");if(!_e){m(!1);return}const U=await Nn(),Se=new Set(te.map(es=>es.name)),as=U.models||[],us=as.filter(es=>{const Tt=Se.has(es.api_provider);return Tt||console.warn(`模型 "${es.name}" 引用了已删除的提供商 "${es.api_provider}",将被移除`),Tt});if(as.length!==us.length){const es=as.length-us.length;$e({title:"注意",description:`已自动移除 ${es} 个引用已删除提供商的模型`,variant:"default"})}console.log("发送的 providers 数据:",te),U.api_providers=te,U.models=us,console.log("完整配置数据:",U),await lc(U),g(!1),$e({title:"保存成功",description:"模型提供商配置已保存"})}catch(te){console.error("保存配置失败:",te),$e({title:"保存失败",description:te.message,variant:"destructive"})}finally{m(!1)}},Je=(te,_e)=>{if($({}),te){const U=Wi.find(Se=>Se.base_url===te.base_url&&Se.client_type===te.client_type);S(U?.id||"custom"),y(te)}else S("custom"),y({name:"",base_url:"",api_key:"",client_type:"openai",max_retry:2,timeout:30,retry_interval:10});z(_e),L(!1),j(!0)},Es=u.useCallback(te=>{S(te),E(!1);const _e=Wi.find(U=>U.id===te);_e&&_e.id!=="custom"?y(U=>({...U,name:_e.name,base_url:_e.base_url,client_type:_e.client_type})):_e?.id==="custom"&&y(U=>({...U,name:"",base_url:"",client_type:"openai"}))},[]),ms=u.useMemo(()=>M!=="custom",[M]),Ms=u.useCallback(async()=>{if(b?.api_key)try{await navigator.clipboard.writeText(b.api_key),$e({title:"复制成功",description:"API Key 已复制到剪贴板"})}catch{$e({title:"复制失败",description:"无法访问剪贴板",variant:"destructive"})}},[b?.api_key,$e]),We=()=>{if(!b)return;const{isValid:te,errors:_e}=r4(b,a,w);if(!te){$(_e);return}$({});const U=Lo(b);if(w!==null){const Se=[...a];Se[w]=U,l(Se)}else l([...a,U]);j(!1),y(null),z(null)},Cs=te=>{if(!te&&b){const _e={...b,max_retry:b.max_retry??2,timeout:b.timeout??30,retry_interval:b.retry_interval??10};y(_e)}j(te)},rs=te=>{O(te),R(!0)},is=async()=>{if(H!==null){const te=a.filter((U,Se)=>Se!==H),{shouldProceed:_e}=await ut(te,"manual");_e&&(l(te),$e({title:"删除成功",description:"提供商已从列表中移除"}))}R(!1),O(null)},ys=te=>{const _e=new Set(je);_e.has(te)?_e.delete(te):_e.add(te),ce(_e)},rt=()=>{if(je.size===Qe.length)ce(new Set);else{const te=Qe.map((_e,U)=>a.findIndex(Se=>Se===Qe[U]));ce(new Set(te))}},jt=()=>{if(je.size===0){$e({title:"提示",description:"请先选择要删除的提供商",variant:"default"});return}pe(!0)},Ae=async()=>{const te=a.filter((U,Se)=>!je.has(Se)),{shouldProceed:_e}=await ut(te,"manual");_e&&(l(te),ce(new Set),$e({title:"批量删除成功",description:`已删除 ${je.size} 个提供商`})),pe(!1)},Qe=u.useMemo(()=>{if(!me)return a;const te=me.toLowerCase();return a.filter(_e=>_e.name.toLowerCase().includes(te)||_e.base_url.toLowerCase().includes(te)||_e.client_type.toLowerCase().includes(te))},[a,me]),{totalPages:As,paginatedProviders:mt}=u.useMemo(()=>{const te=Math.ceil(Qe.length/B),_e=Qe.slice((D-1)*B,D*B);return{totalPages:te,paginatedProviders:_e}},[Qe,D,B]),Ht=u.useCallback(()=>{const te=parseInt(Y);te>=1&&te<=As&&(Q(te),we(""))},[Y,As]),ca=async te=>{K(_e=>new Set(_e).add(te));try{const _e=await yS(te);se(U=>new Map(U).set(te,_e)),_e.network_ok?_e.api_key_valid===!0?$e({title:"连接正常",description:`${te} 网络连接正常,API Key 有效 (${_e.latency_ms}ms)`}):_e.api_key_valid===!1?$e({title:"连接正常但 Key 无效",description:`${te} 网络连接正常,但 API Key 无效或已过期`,variant:"destructive"}):$e({title:"网络连接正常",description:`${te} 可以访问 (${_e.latency_ms}ms)`}):$e({title:"连接失败",description:_e.error||"无法连接到提供商",variant:"destructive"})}catch(_e){$e({title:"测试失败",description:_e.message,variant:"destructive"})}finally{K(_e=>{const U=new Set(_e);return U.delete(te),U})}},Fa=async()=>{for(const te of a)await ca(te.name)},Xt=te=>{const _e=A.has(te),U=Re.get(te);return _e?e.jsxs(Ce,{variant:"secondary",className:"gap-1",children:[e.jsx(Fs,{className:"h-3 w-3 animate-spin"}),"测试中"]}):U?U.network_ok?U.api_key_valid===!0?e.jsxs(Ce,{className:"gap-1 bg-green-600 hover:bg-green-700",children:[e.jsx(st,{className:"h-3 w-3"}),"正常"]}):U.api_key_valid===!1?e.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[e.jsx(Ut,{className:"h-3 w-3"}),"Key无效"]}):e.jsxs(Ce,{className:"gap-1 bg-blue-600 hover:bg-blue-700",children:[e.jsx(st,{className:"h-3 w-3"}),"可访问"]}):e.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[e.jsx(ta,{className:"h-3 w-3"}),"离线"]}):null};return r?e.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})}):e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"AI模型厂商配置"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理 AI 模型厂商的 API 配置"})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[je.size>0&&e.jsxs(_,{onClick:jt,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[e.jsx(os,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"批量删除 (",je.size,")"]}),e.jsxs(_,{onClick:Fa,size:"sm",variant:"outline",className:"w-full sm:w-auto",disabled:a.length===0||A.size>0,children:[e.jsx(sl,{className:"mr-2 h-4 w-4"}),A.size>0?`测试中 (${A.size})`:"测试全部"]}),e.jsxs(_,{onClick:()=>Je(null,null),size:"sm",className:"w-full sm:w-auto","data-tour":"add-provider-button",children:[e.jsx(Xs,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"添加提供商"]}),e.jsxs(_,{onClick:He,disabled:d||h||!p||De,size:"sm",variant:"outline",className:"w-full sm:w-auto sm:min-w-[120px]",children:[e.jsx(gc,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),d?"保存中...":h?"自动保存中...":p?"保存配置":"已保存"]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{disabled:d||h||De,size:"sm",className:"w-full sm:w-auto sm:min-w-[120px]",children:[e.jsx(pc,{className:"mr-2 h-4 w-4"}),De?"重启中...":p?"保存并重启":"重启麦麦"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重启麦麦?"}),e.jsx(gs,{asChild:!0,children:e.jsx("div",{children:e.jsx("p",{children:p?"当前有未保存的配置更改。点击确认将先保存配置,然后重启麦麦使新配置生效。重启过程中麦麦将暂时离线。":"即将重启麦麦主程序。重启过程中麦麦将暂时离线,配置将在重启后生效。"})})})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:p?ia:Ct,children:p?"保存并重启":"确认重启"})]})]})]})]})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:["配置更新后需要",e.jsx("strong",{children:"重启麦麦"}),'才能生效。你可以点击右上角的"保存并重启"按钮一键完成保存和重启。']})]}),e.jsxs(ts,{className:"h-[calc(100vh-260px)]",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 mb-4",children:[e.jsxs("div",{className:"relative w-full sm:flex-1 sm:max-w-sm",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{placeholder:"搜索提供商名称、URL 或类型...",value:me,onChange:te=>Ne(te.target.value),className:"pl-9"})]}),me&&e.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["找到 ",Qe.length," 个结果"]})]}),e.jsx("div",{className:"md:hidden space-y-3",children:Qe.length===0?e.jsx("div",{className:"text-center text-muted-foreground py-8 rounded-lg border bg-card",children:me?"未找到匹配的提供商":'暂无提供商配置,点击"添加提供商"开始配置'}):mt.map((te,_e)=>{const U=a.findIndex(Se=>Se===te);return e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-base truncate",children:te.name}),Xt(te.name)]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 break-all",children:te.base_url})]}),e.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>ca(te.name),disabled:A.has(te.name),title:"测试连接",children:A.has(te.name)?e.jsx(Fs,{className:"h-4 w-4 animate-spin"}):e.jsx(sl,{className:"h-4 w-4"})}),e.jsx(_,{variant:"default",size:"sm",onClick:()=>Je(te,U),children:e.jsx(Zn,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),e.jsx(_,{size:"sm",onClick:()=>rs(U),className:"bg-red-600 hover:bg-red-700 text-white",children:e.jsx(os,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"客户端类型"}),e.jsx("p",{className:"font-medium",children:te.client_type})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"最大重试"}),e.jsx("p",{className:"font-medium",children:te.max_retry})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"超时(秒)"}),e.jsx("p",{className:"font-medium",children:te.timeout})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"重试间隔(秒)"}),e.jsx("p",{className:"font-medium",children:te.retry_interval})]})]})]},_e)})}),e.jsx("div",{className:"hidden md:block rounded-lg border bg-card overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:je.size===Qe.length&&Qe.length>0,onCheckedChange:rt})}),e.jsx(ns,{children:"状态"}),e.jsx(ns,{children:"名称"}),e.jsx(ns,{children:"基础URL"}),e.jsx(ns,{children:"客户端类型"}),e.jsx(ns,{className:"text-right",children:"最大重试"}),e.jsx(ns,{className:"text-right",children:"超时(秒)"}),e.jsx(ns,{className:"text-right",children:"重试间隔(秒)"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:mt.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:9,className:"text-center text-muted-foreground py-8",children:me?"未找到匹配的提供商":'暂无提供商配置,点击"添加提供商"开始配置'})}):mt.map((te,_e)=>{const U=a.findIndex(Se=>Se===te);return e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:je.has(U),onCheckedChange:()=>ys(U)})}),e.jsx(Ze,{children:Xt(te.name)||e.jsx(Ce,{variant:"outline",className:"text-muted-foreground",children:"未测试"})}),e.jsx(Ze,{className:"font-medium",children:te.name}),e.jsx(Ze,{className:"max-w-xs truncate",title:te.base_url,children:te.base_url}),e.jsx(Ze,{children:te.client_type}),e.jsx(Ze,{className:"text-right",children:te.max_retry}),e.jsx(Ze,{className:"text-right",children:te.timeout}),e.jsx(Ze,{className:"text-right",children:te.retry_interval}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>ca(te.name),disabled:A.has(te.name),title:"测试连接",children:A.has(te.name)?e.jsx(Fs,{className:"h-4 w-4 animate-spin"}):e.jsx(sl,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"default",size:"sm",onClick:()=>Je(te,U),children:[e.jsx(Zn,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"编辑"]}),e.jsxs(_,{size:"sm",onClick:()=>rs(U),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"删除"]})]})})]},_e)})})]})})}),Qe.length>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"page-size-provider",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:B.toString(),onValueChange:te=>{ue(parseInt(te)),Q(1),ce(new Set)},children:[e.jsx(Be,{id:"page-size-provider",className:"w-20",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["显示 ",(D-1)*B+1," 到"," ",Math.min(D*B,Qe.length)," 条,共 ",Qe.length," 条"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Q(1),disabled:D===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>Q(te=>Math.max(1,te-1)),disabled:D===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{type:"number",value:Y,onChange:te=>we(te.target.value),onKeyDown:te=>te.key==="Enter"&&Ht(),placeholder:D.toString(),className:"w-16 h-8 text-center",min:1,max:As}),e.jsx(_,{variant:"outline",size:"sm",onClick:Ht,disabled:!Y,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>Q(te=>te+1),disabled:D>=As,children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Q(As),disabled:D>=As,className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]}),e.jsx(Qs,{open:N,onOpenChange:Cs,children:e.jsxs(Hs,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh] overflow-y-auto","data-tour":"provider-dialog",preventOutsideClose:J.isRunning,children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:w!==null?"编辑提供商":"添加提供商"}),e.jsx(at,{children:"配置 API 提供商的连接信息和参数"})]}),e.jsxs("form",{onSubmit:te=>{te.preventDefault(),We()},autoComplete:"off",children:[e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2","data-tour":"provider-template-select",children:[e.jsx(T,{htmlFor:"template",children:"提供商模板"}),e.jsxs(cl,{open:F,onOpenChange:E,children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",role:"combobox","aria-expanded":F,className:"w-full justify-between",children:[M?Wi.find(te=>te.id===M)?.display_name:"选择提供商模板...",e.jsx(mx,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(tl,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:e.jsxs(md,{children:[e.jsx(xd,{placeholder:"搜索提供商模板..."}),e.jsx(ts,{className:"h-[300px]",children:e.jsxs(hd,{className:"max-h-none overflow-visible",children:[e.jsx(fd,{children:"未找到匹配的模板"}),e.jsx(uc,{children:Wi.map(te=>e.jsxs(mc,{value:te.display_name,onSelect:()=>Es(te.id),children:[e.jsx(Ot,{className:`mr-2 h-4 w-4 ${M===te.id?"opacity-100":"opacity-0"}`}),te.display_name]},te.id))})]})})]})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"选择预设模板可自动填充 URL 和客户端类型,支持搜索"})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"provider-name-input",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"name",className:G.name?"text-destructive":"",children:"名称 *"}),e.jsx(Bl,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"提供商名称"}),e.jsx("p",{children:"为这个 API 提供商设置一个便于识别的名称,用于在模型配置中引用。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsx("li",{children:"推荐使用厂商官方名称,如 DeepSeek、OpenAI"}),e.jsx("li",{children:"名称需要唯一,不能与现有提供商重复"})]})]}),side:"right",maxWidth:"350px"})]}),e.jsx(ne,{id:"name",value:b?.name||"",onChange:te=>{y(_e=>_e?{..._e,name:te.target.value}:null),G.name&&$(_e=>({..._e,name:void 0}))},placeholder:"例如: DeepSeek, SiliconFlow",className:G.name?"border-destructive focus-visible:ring-destructive":""}),G.name&&e.jsx("p",{className:"text-xs text-destructive",children:G.name})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"provider-url-input",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"base_url",className:G.base_url?"text-destructive":"",children:"基础 URL *"}),e.jsx(Bl,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"API 基础地址"}),e.jsx("p",{children:"提供商的 API 端点基础 URL,通常以 /v1 结尾。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"OpenAI 格式:"}),"https://api.openai.com/v1"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"DeepSeek:"}),"https://api.deepseek.com"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"硅基流动:"}),"https://api.siliconflow.cn/v1"]}),e.jsx("li",{children:"选择模板会自动填充正确的 URL"})]})]}),side:"right",maxWidth:"400px"})]}),e.jsx(ne,{id:"base_url",value:b?.base_url||"",onChange:te=>{y(_e=>_e?{..._e,base_url:te.target.value}:null),G.base_url&&$(_e=>({..._e,base_url:void 0}))},placeholder:"https://api.example.com/v1",disabled:ms,className:`${ms?"bg-muted cursor-not-allowed":""} ${G.base_url?"border-destructive focus-visible:ring-destructive":""}`}),G.base_url&&e.jsx("p",{className:"text-xs text-destructive",children:G.base_url}),ms&&!G.base_url&&e.jsx("p",{className:"text-xs text-muted-foreground",children:'使用模板时 URL 不可编辑,切换到"自定义"以手动配置'})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"provider-apikey-input",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"api_key",className:G.api_key?"text-destructive":"",children:"API Key *"}),e.jsx(Bl,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"API 密钥"}),e.jsx("p",{children:"从提供商平台获取的身份验证密钥。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:["通常以 ",e.jsx("code",{children:"sk-"})," 开头"]}),e.jsx("li",{children:"请妥善保管,不要泄露给他人"}),e.jsx("li",{children:"可以点击眼睛图标切换显示/隐藏"}),e.jsx("li",{children:"点击复制图标可快速复制密钥"})]})]}),side:"right",maxWidth:"350px"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{id:"api_key",type:X?"text":"password",value:b?.api_key||"",onChange:te=>{y(_e=>_e?{..._e,api_key:te.target.value}:null),G.api_key&&$(_e=>({..._e,api_key:void 0}))},placeholder:"sk-...",className:`flex-1 ${G.api_key?"border-destructive focus-visible:ring-destructive":""}`}),e.jsx(_,{type:"button",variant:"outline",size:"icon",onClick:()=>L(!X),title:X?"隐藏密钥":"显示密钥",children:X?e.jsx(ic,{className:"h-4 w-4"}):e.jsx(ua,{className:"h-4 w-4"})}),e.jsx(_,{type:"button",variant:"outline",size:"icon",onClick:Ms,title:"复制密钥",children:e.jsx(qo,{className:"h-4 w-4"})})]}),G.api_key&&e.jsx("p",{className:"text-xs text-destructive",children:G.api_key})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"client_type",children:"客户端类型"}),e.jsx(Bl,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"API 客户端类型"}),e.jsx("p",{children:"指定与提供商通信时使用的 API 协议格式。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"OpenAI:"}),"兼容 OpenAI API 格式的提供商"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Gemini:"}),"Google Gemini 专用格式"]}),e.jsx("li",{children:"大部分第三方提供商都兼容 OpenAI 格式"})]})]}),side:"right",maxWidth:"350px"})]}),e.jsxs(Pe,{value:b?.client_type||"openai",onValueChange:te=>y(_e=>_e?{..._e,client_type:te}:null),disabled:ms,children:[e.jsx(Be,{id:"client_type",className:ms?"bg-muted cursor-not-allowed":"",children:e.jsx(Fe,{placeholder:"选择客户端类型"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"openai",children:"OpenAI"}),e.jsx(W,{value:"gemini",children:"Gemini"})]})]}),ms&&e.jsx("p",{className:"text-xs text-muted-foreground",children:'使用模板时客户端类型不可编辑,切换到"自定义"以手动配置'})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"max_retry",children:"最大重试"}),e.jsx(Bl,{content:"API 请求失败时的最大重试次数。设置为 0 表示不重试。默认值:2",side:"top",maxWidth:"250px"})]}),e.jsx(ne,{id:"max_retry",type:"number",min:"0",value:b?.max_retry??"",onChange:te=>{const _e=te.target.value===""?null:parseInt(te.target.value);y(U=>U?{...U,max_retry:_e}:null)},placeholder:"默认: 2"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"timeout",children:"超时(秒)"}),e.jsx(Bl,{content:"单次 API 请求的超时时间(秒)。超时后会触发重试或报错。默认值:30 秒",side:"top",maxWidth:"250px"})]}),e.jsx(ne,{id:"timeout",type:"number",min:"1",value:b?.timeout??"",onChange:te=>{const _e=te.target.value===""?null:parseInt(te.target.value);y(U=>U?{...U,timeout:_e}:null)},placeholder:"默认: 30"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"retry_interval",children:"重试间隔(秒)"}),e.jsx(Bl,{content:"两次重试之间的等待时间(秒)。适当的间隔可以避免触发 API 限流。默认值:10 秒",side:"top",maxWidth:"250px"})]}),e.jsx(ne,{id:"retry_interval",type:"number",min:"1",value:b?.retry_interval??"",onChange:te=>{const _e=te.target.value===""?null:parseInt(te.target.value);y(U=>U?{...U,retry_interval:_e}:null)},placeholder:"默认: 10"})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{type:"button",variant:"outline",onClick:()=>j(!1),"data-tour":"provider-cancel-button",children:"取消"}),e.jsx(_,{type:"submit","data-tour":"provider-save-button",children:"保存"})]})]})]})}),e.jsx(bs,{open:C,onOpenChange:R,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除提供商 "',H!==null?a[H]?.name:"",'" 吗? 此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:is,children:"删除"})]})]})}),e.jsx(bs,{open:ge,onOpenChange:pe,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["确定要删除选中的 ",je.size," 个提供商吗? 此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:Ae,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})}),e.jsx(bs,{open:fe.isOpen,onOpenChange:te=>Ee(_e=>({..._e,isOpen:te})),children:e.jsxs(xs,{className:"max-w-2xl",children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除提供商"}),e.jsx(gs,{asChild:!0,children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["您即将删除以下提供商:",e.jsx("strong",{className:"text-foreground ml-1",children:fe.providersToDelete.join(", ")})]}),e.jsxs("p",{className:"text-yellow-600 dark:text-yellow-500 font-medium",children:["⚠️ 此操作将同时删除 ",fe.affectedModels.length," 个关联的模型:"]}),e.jsx(ts,{className:"h-32 w-full rounded border p-3",children:e.jsx("div",{className:"space-y-1",children:fe.affectedModels.map((te,_e)=>e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"font-mono text-muted-foreground",children:"•"}),e.jsx("span",{className:"ml-2 font-medium",children:te.name}),e.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",te.model_identifier,")"]})]},_e))})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"这些模型将从模型列表和所有任务分配中移除。此操作无法撤销。"})]})})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:V,children:"取消"}),e.jsx(js,{onClick:Is,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"确认删除"})]})]})}),e.jsx(nr,{})]})}function nc(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).substring(2,11)}`}function Im(a){return a===null?"null":Array.isArray(a)?"array":typeof a=="object"?"object":typeof a=="boolean"?"boolean":typeof a=="number"?"number":"string"}function sx(a){return Object.entries(a).map(([l,r])=>{const c=Im(r),d={id:nc(),key:l,value:r,type:c,expanded:!0};return c==="object"&&r&&typeof r=="object"?d.children=sx(r):c==="array"&&Array.isArray(r)&&(d.children=r.map((m,h)=>{const f=Im(m),p={id:nc(),key:String(h),value:m,type:f,expanded:!0};return f==="object"&&m&&typeof m=="object"?p.children=sx(m):f==="array"&&Array.isArray(m)&&(p.children=m.map((g,N)=>({id:nc(),key:String(N),value:g,type:Im(g),expanded:!0}))),p})),d})}function tx(a){const l={};for(const r of a)r.key.trim()&&(r.type==="object"&&r.children?l[r.key]=tx(r.children):r.type==="array"&&r.children?l[r.key]=r.children.map(c=>c.type==="object"&&c.children?tx(c.children):c.type==="array"&&c.children?c.children.map(d=>d.value):c.value):r.type==="null"?l[r.key]=null:l[r.key]=r.value);return l}function Jg(a,l){switch(l){case"boolean":return a==="true";case"number":{const r=parseFloat(a);return isNaN(r)?0:r}case"null":return null;default:return a}}function nN({node:a,level:l,onUpdate:r,onRemove:c,onAddChild:d,onToggleExpand:m}){const h=a.type==="object"||a.type==="array",f=a.children&&a.children.length>0;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"grid gap-2 items-center",style:{gridTemplateColumns:h?"32px 1fr 90px 64px":"32px 1fr 1fr 90px 32px",paddingLeft:`${l*20}px`},children:[e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>m(a.id),disabled:!h||!f,children:h&&f?a.expanded?e.jsx(Ba,{className:"h-4 w-4"}):e.jsx(ra,{className:"h-4 w-4"}):e.jsx("span",{className:"w-4"})}),e.jsx(ne,{value:a.key,onChange:p=>r(a.id,"key",p.target.value),placeholder:"key",className:"h-8 text-sm"}),!h&&e.jsx(e.Fragment,{children:a.type==="boolean"?e.jsxs("div",{className:"flex items-center h-8 px-3 border rounded-md bg-background",children:[e.jsx(Ge,{checked:a.value===!0,onCheckedChange:p=>r(a.id,"value",p)}),e.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:a.value?"true":"false"})]}):a.type==="null"?e.jsx("div",{className:"flex items-center h-8 px-3 border rounded-md bg-muted text-sm text-muted-foreground",children:"null"}):e.jsx(ne,{type:a.type==="number"?"number":"text",value:a.value,onChange:p=>r(a.id,"value",p.target.value),placeholder:"value",className:"h-8 text-sm",step:a.type==="number"?"any":void 0})}),e.jsxs(Pe,{value:a.type,onValueChange:p=>r(a.id,"type",p),children:[e.jsx(Be,{className:"h-8 text-xs",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"string",children:"字符串"}),e.jsx(W,{value:"number",children:"数字"}),e.jsx(W,{value:"boolean",children:"布尔"}),e.jsx(W,{value:"null",children:"Null"}),e.jsx(W,{value:"object",children:"对象"}),e.jsx(W,{value:"array",children:"数组"})]})]}),e.jsxs("div",{className:"flex gap-1 justify-end",children:[h&&e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-primary",onClick:()=>d(a.id),title:"添加子项",children:e.jsx(Xs,{className:"h-4 w-4"})}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:()=>c(a.id),title:"删除",children:e.jsx(os,{className:"h-4 w-4"})})]})]}),h&&a.expanded&&a.children&&a.children.length>0&&e.jsx("div",{className:"space-y-1",children:a.children.map(p=>e.jsx(nN,{node:p,level:l+1,onUpdate:r,onRemove:c,onAddChild:d,onToggleExpand:m},p.id))})]})}function o4({value:a,onChange:l,placeholder:r="添加参数..."}){const[c,d]=u.useState(()=>sx(a||{})),m=u.useCallback(j=>{d(j),l(tx(j))},[l]),h=u.useCallback(()=>{const j={id:nc(),key:"",value:"",type:"string",expanded:!1};m([...c,j])},[c,m]),f=u.useCallback((j,b,y)=>{const w=z=>z.map(M=>{if(M.id===j)if(b==="type"){const S=y;if(S==="object")return{...M,type:S,value:{},children:[]};if(S==="array")return{...M,type:S,value:[],children:[]};if(S==="null")return{...M,type:S,value:null};{const F=Jg(String(M.value),S);return{...M,type:S,value:F,children:void 0}}}else if(b==="value"){const S=Jg(String(y),M.type);return{...M,value:S}}else return{...M,[b]:String(y)};return M.children?{...M,children:w(M.children)}:M});m(w(c))},[c,m]),p=u.useCallback(j=>{const b=y=>y.filter(w=>w.id!==j).map(w=>w.children?{...w,children:b(w.children)}:w);m(b(c))},[c,m]),g=u.useCallback(j=>{const b=y=>y.map(w=>{if(w.id===j){const z={id:nc(),key:w.type==="array"?String(w.children?.length||0):"",value:"",type:"string",expanded:!0};return{...w,children:[...w.children||[],z]}}return w.children?{...w,children:b(w.children)}:w});m(b(c))},[c,m]),N=u.useCallback(j=>{const b=y=>y.map(w=>w.id===j?{...w,expanded:!w.expanded}:w.children?{...w,children:b(w.children)}:w);d(b(c))},[c]);return e.jsxs("div",{className:"h-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[c.length," 个参数"]}),e.jsxs(_,{type:"button",size:"sm",variant:"outline",onClick:h,className:"h-7 text-xs",children:[e.jsx(Xs,{className:"h-3 w-3 mr-1"}),"添加参数"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto space-y-1",children:c.length===0?e.jsx("div",{className:"text-sm text-muted-foreground text-center py-4 border border-dashed rounded-md",children:r}):e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"grid gap-2 text-xs text-muted-foreground px-1 sticky top-0 bg-background z-10",style:{gridTemplateColumns:"32px 1fr 1fr 90px 32px"},children:[e.jsx("span",{}),e.jsx("span",{children:"键名"}),e.jsx("span",{children:"值"}),e.jsx("span",{children:"类型"}),e.jsx("span",{})]}),c.map(j=>e.jsx(nN,{node:j,level:0,onUpdate:f,onRemove:p,onAddChild:g,onToggleExpand:N},j.id))]})})]})}function Xg(a){if(!a.trim())return{valid:!0,parsed:{}};try{const l=JSON.parse(a);return typeof l!="object"||l===null||Array.isArray(l)?{valid:!1,error:"必须是一个 JSON 对象 {}"}:{valid:!0,parsed:l}}catch{return{valid:!1,error:"JSON 格式错误"}}}function d4({value:a,onChange:l,className:r,placeholder:c="添加额外参数..."}){const[d,m]=u.useState("list"),h=u.useMemo(()=>Object.keys(a||{}).length>0?JSON.stringify(a,null,2):"",[a]),[f,p]=u.useState(h),[g,N]=u.useState(null);u.useEffect(()=>{p(h)},[h]);const j=u.useMemo(()=>{const w=Xg(f);return w.valid&&w.parsed?{success:!0,data:w.parsed}:{success:!1,data:{}}},[f]),b=u.useCallback(w=>{const z=w;z==="json"&&d==="list"&&(p(Object.keys(a).length>0?JSON.stringify(a,null,2):""),N(null)),m(z)},[d,a]),y=u.useCallback(w=>{p(w);const z=Xg(w);z.valid&&z.parsed?(N(null),l(z.parsed)):N(z.error||"JSON 格式错误")},[l]);return e.jsx("div",{className:P("h-full flex flex-col",r),children:e.jsxs(Jt,{value:d,onValueChange:b,className:"w-full flex-1 flex flex-col",children:[e.jsxs(Gt,{className:"h-8 p-0.5 bg-muted/60 w-fit",children:[e.jsx(Xe,{value:"list",className:"h-7 px-3 text-xs data-[state=active]:bg-background data-[state=active]:shadow-sm",children:"可视化编辑"}),e.jsx(Xe,{value:"json",className:"h-7 px-3 text-xs data-[state=active]:bg-background data-[state=active]:shadow-sm",children:"JSON 编辑"})]}),e.jsx(Ss,{value:"list",className:"mt-2 flex-1 flex flex-col overflow-hidden data-[state=inactive]:hidden data-[state=inactive]:h-0",children:e.jsx(o4,{value:a,onChange:l,placeholder:c})}),e.jsx(Ss,{value:"json",className:"mt-2 flex-1 flex flex-col overflow-hidden data-[state=inactive]:hidden data-[state=inactive]:h-0",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col gap-2 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"编辑"}),g?e.jsxs("div",{className:"flex items-center gap-1 text-xs text-destructive",children:[e.jsx(Ut,{className:"h-3 w-3"}),e.jsx("span",{className:"truncate max-w-[150px]",children:g})]}):f.trim()&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[e.jsx(Ot,{className:"h-3 w-3"}),e.jsx("span",{children:"有效"})]})]}),e.jsx(pt,{value:f,onChange:w=>y(w.target.value),placeholder:`{ +`)):As},Je=u.useCallback(Ae=>{Ke.current=Ae,C(Ae.bot),H(Ae.personality);const Qe=Ae.chat;Qe.talk_value_rules||(Qe.talk_value_rules=[]),X(Qe),me(Ae.expression),je(Ae.emoji),ge(Ae.memory),D(Ae.tool),I(Ae.voice),Y(Ae.message_receive),fe(Ae.dream),G(Ae.lpmm_knowledge),A(Ae.keyword_reaction),Re(Ae.response_post_process),$e(Ae.chinese_typo),J(Ae.response_splitter),Le(Ae.log),De(Ae.debug),Me(Ae.experimental),Ts(Ae.maim_message),ia(Ae.telemetry),Bs(Ae.webui)},[]),Es=u.useCallback(()=>({...Ke.current,bot:E,personality:R,chat:O,expression:L,emoji:Ne,memory:re,tool:pe,voice:Q,message_receive:ue,dream:we,lpmm_knowledge:Ee,keyword_reaction:$,response_post_process:K,chinese_typo:se,response_splitter:cs,log:Z,debug:ne,experimental:xe,maim_message:ds,telemetry:Ct,webui:ut}),[E,R,O,L,Ne,re,pe,Q,ue,we,Ee,$,K,se,cs,Z,ne,xe,ds,Ct,ut]),ms=u.useCallback(async()=>{try{const Qe=(await jS()).replace(/"([^"]*)"/g,(As,mt)=>`"${mt.replace(/\\n/g,` +`).replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}"`);j(Qe),y(!1)}catch(Ae){M({variant:"destructive",title:"加载失败",description:Ae instanceof Error?Ae.message:"加载源代码失败"})}},[M]),Ms=u.useCallback(async()=>{try{l(!0);const Ae=await Hg();Je(Ae),f(!1),V.current=!1,await ms()}catch(Ae){console.error("加载配置失败:",Ae),M({title:"加载失败",description:"无法加载配置文件",variant:"destructive"})}finally{l(!1)}},[M,ms,Je]);u.useEffect(()=>{Ms()},[Ms]);const{triggerAutoSave:We,cancelPendingAutoSave:Cs}=KS(V.current,m,f);Vt(E,"bot",V.current,We),Vt(R,"personality",V.current,We),Vt(O,"chat",V.current,We),Vt(L,"expression",V.current,We),Vt(Ne,"emoji",V.current,We),Vt(re,"memory",V.current,We),Vt(pe,"tool",V.current,We),Vt(Q,"voice",V.current,We),Vt(we,"dream",V.current,We),Vt(Ee,"lpmm_knowledge",V.current,We),Vt($,"keyword_reaction",V.current,We),Vt(K,"response_post_process",V.current,We),Vt(se,"chinese_typo",V.current,We),Vt(cs,"response_splitter",V.current,We),Vt(Z,"log",V.current,We),Vt(ne,"debug",V.current,We),Vt(ds,"maim_message",V.current,We),Vt(Ct,"telemetry",V.current,We),Vt(ut,"webui",V.current,We);const rs=async()=>{try{c(!0);try{_x(N)}catch(Qe){const As=Qe instanceof Error?Qe.message:"TOML 格式错误",mt=He(As);y(!0),z(mt),M({variant:"destructive",title:"TOML 格式错误",description:mt}),c(!1);return}const Ae=N.replace(/"([^"]*)"/g,(Qe,As)=>`"${As.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}"`);await vS(Ae),f(!1),y(!1),z(""),M({title:"保存成功",description:"配置已保存"}),await Ms()}catch(Ae){y(!0);const Qe=Ae instanceof Error?Ae.message:"保存配置失败";z(Qe),M({variant:"destructive",title:"保存失败",description:Qe})}finally{c(!1)}},is=async Ae=>{if(h){M({variant:"destructive",title:"切换失败",description:"请先保存当前更改"});return}if(g(Ae),Ae==="source")await ms();else try{const Qe=await Hg();Je(Qe),f(!1)}catch(Qe){console.error("加载配置失败:",Qe),M({title:"加载失败",description:"无法加载配置文件",variant:"destructive"})}},ys=async()=>{try{c(!0),Cs(),await qg(Es()),f(!1),M({title:"保存成功",description:"麦麦主程序配置已保存"})}catch(Ae){console.error("保存配置失败:",Ae),M({title:"保存失败",description:Ae.message,variant:"destructive"})}finally{c(!1)}},rt=async()=>{await S()},jt=async()=>{try{c(!0),Cs(),await qg(Es()),f(!1),M({title:"保存成功",description:"配置已保存,即将重启麦麦..."}),await new Promise(Ae=>setTimeout(Ae,QS)),await rt()}catch(Ae){console.error("保存失败:",Ae),M({title:"保存失败",description:Ae.message,variant:"destructive"})}finally{c(!1)}};return a?e.jsx(ts,{className:"h-full",children:e.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})})}):e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl font-bold",children:"麦麦主程序配置"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs sm:text-sm",children:"管理麦麦的核心功能和行为设置"})]}),e.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[e.jsxs(_,{onClick:p==="visual"?ys:rs,disabled:r||d||!h||F,size:"sm",variant:"outline",className:"w-20 sm:w-24",children:[e.jsx(gc,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2,fill:"none"}),e.jsx("span",{className:"ml-1 truncate text-xs sm:text-sm",children:r?"保存中":d?"自动":h?"保存":"已保存"})]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{disabled:r||d||F,size:"sm",className:"w-20 sm:w-28",children:[e.jsx(pc,{className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"ml-1 truncate text-xs sm:text-sm",children:F?"重启中":h?"保存重启":"重启"})]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重启麦麦?"}),e.jsx(gs,{asChild:!0,children:e.jsx("div",{children:e.jsx("p",{children:h?"当前有未保存的配置更改。点击确认将先保存配置,然后重启麦麦使新配置生效。重启过程中麦麦将暂时离线。":"即将重启麦麦主程序。重启过程中麦麦将暂时离线,配置将在重启后生效。"})})})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:h?jt:rt,children:h?"保存并重启":"确认重启"})]})]})]})]})]}),e.jsx("div",{className:"flex",children:e.jsx(Jt,{value:p,onValueChange:Ae=>is(Ae),className:"w-full",children:e.jsxs(Gt,{className:"h-8 sm:h-9 w-full grid grid-cols-2",children:[e.jsxs(Xe,{value:"visual",className:"text-xs sm:text-sm",children:[e.jsx(uv,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),"可视化编辑"]}),e.jsxs(Xe,{value:"source",className:"text-xs sm:text-sm",children:[e.jsx(dx,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),"源代码编辑"]})]})})})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:["配置更新后需要",e.jsx("strong",{children:"重启麦麦"}),'才能生效。你可以点击右上角的"保存并重启"按钮一键完成保存和重启。']})]}),p==="source"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:[e.jsx("strong",{children:"源代码模式(高级功能):"}),"直接编辑 TOML 配置文件。此功能仅适用于熟悉 TOML 语法的高级用户。保存时会在前端验证格式,只有格式完全正确才能保存。",b&&w&&e.jsxs("div",{className:"text-destructive font-semibold mt-3 p-3 bg-destructive/10 rounded-md",children:[e.jsx("div",{className:"font-bold mb-2",children:"⚠️ TOML 格式错误:"}),e.jsx("pre",{className:"text-sm font-mono whitespace-pre-wrap break-words",children:w})]})]})]}),e.jsx(Qv,{value:N,onChange:Ae=>{j(Ae),f(!0),b&&(y(!1),z(""))},language:"toml",theme:"dark",height:"calc(100vh - 280px)",minHeight:"500px",placeholder:"TOML 配置内容"})]}),p==="visual"&&e.jsx(e.Fragment,{children:e.jsxs(Jt,{defaultValue:"bot",className:"w-full",children:[e.jsxs(Gt,{className:"flex flex-wrap h-auto gap-1 p-1 sm:grid sm:grid-cols-5 lg:grid-cols-10",children:[e.jsx(Xe,{value:"bot",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"基本信息"}),e.jsx(Xe,{value:"personality",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"人格"}),e.jsx(Xe,{value:"chat",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"聊天"}),e.jsx(Xe,{value:"expression",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"表达"}),e.jsx(Xe,{value:"features",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"功能"}),e.jsx(Xe,{value:"processing",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"处理"}),e.jsx(Xe,{value:"dream",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"做梦"}),e.jsx(Xe,{value:"lpmm",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"知识库"}),e.jsx(Xe,{value:"webui",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"WebUI"}),e.jsx(Xe,{value:"other",className:"text-xs px-2 py-1.5 sm:px-3 sm:py-2 data-[state=active]:shadow-sm",children:"其他"})]}),e.jsx(Ss,{value:"bot",className:"space-y-4",children:E&&e.jsx(W2,{config:E,onChange:C})}),e.jsx(Ss,{value:"personality",className:"space-y-4",children:R&&e.jsx(eS,{config:R,onChange:H})}),e.jsx(Ss,{value:"chat",className:"space-y-4",children:O&&e.jsx(aS,{config:O,onChange:X})}),e.jsx(Ss,{value:"expression",className:"space-y-4",children:L&&e.jsx(xS,{config:L,onChange:me})}),e.jsx(Ss,{value:"features",className:"space-y-4",children:Ne&&re&&pe&&Q&&e.jsx(uS,{emojiConfig:Ne,memoryConfig:re,toolConfig:pe,voiceConfig:Q,onEmojiChange:je,onMemoryChange:ge,onToolChange:D,onVoiceChange:I})}),e.jsxs(Ss,{value:"processing",className:"space-y-4",children:[$&&K&&se&&cs&&e.jsx(fS,{keywordReactionConfig:$,responsePostProcessConfig:K,chineseTypoConfig:se,responseSplitterConfig:cs,onKeywordReactionChange:A,onResponsePostProcessChange:Re,onChineseTypoChange:$e,onResponseSplitterChange:J}),ue&&e.jsx(pS,{config:ue,onChange:Y})]}),e.jsx(Ss,{value:"dream",className:"space-y-4",children:we&&e.jsx(lS,{config:we,onChange:fe})}),e.jsx(Ss,{value:"lpmm",className:"space-y-4",children:Ee&&e.jsx(nS,{config:Ee,onChange:G})}),e.jsx(Ss,{value:"webui",className:"space-y-4",children:ut&&e.jsx(gS,{config:ut,onChange:Bs})}),e.jsxs(Ss,{value:"other",className:"space-y-4",children:[Z&&e.jsx(rS,{config:Z,onChange:Le}),ne&&e.jsx(iS,{config:ne,onChange:De}),xe&&e.jsx(cS,{config:xe,onChange:Me}),ds&&e.jsx(oS,{config:ds,onChange:Ts}),Ct&&e.jsx(dS,{config:Ct,onChange:ia})]})]})}),e.jsx(nr,{})]})})}const ql=u.forwardRef(({className:a,...l},r)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:r,className:P("w-full caption-bottom text-sm",a),...l})}));ql.displayName="Table";const Vl=u.forwardRef(({className:a,...l},r)=>e.jsx("thead",{ref:r,className:P("[&_tr]:border-b",a),...l}));Vl.displayName="TableHeader";const Gl=u.forwardRef(({className:a,...l},r)=>e.jsx("tbody",{ref:r,className:P("[&_tr:last-child]:border-0",a),...l}));Gl.displayName="TableBody";const XS=u.forwardRef(({className:a,...l},r)=>e.jsx("tfoot",{ref:r,className:P("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",a),...l}));XS.displayName="TableFooter";const _t=u.forwardRef(({className:a,...l},r)=>e.jsx("tr",{ref:r,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...l}));_t.displayName="TableRow";const ns=u.forwardRef(({className:a,...l},r)=>e.jsx("th",{ref:r,className:P("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...l}));ns.displayName="TableHead";const Ze=u.forwardRef(({className:a,...l},r)=>e.jsx("td",{ref:r,className:P("px-4 py-3 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...l}));Ze.displayName="TableCell";const ZS=u.forwardRef(({className:a,...l},r)=>e.jsx("caption",{ref:r,className:P("mt-4 text-sm text-muted-foreground",a),...l}));ZS.displayName="TableCaption";const md=u.forwardRef(({className:a,...l},r)=>e.jsx(ka,{ref:r,className:P("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),...l}));md.displayName=ka.displayName;const xd=u.forwardRef(({className:a,...l},r)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx($t,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(ka.Input,{ref:r,className:P("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...l})]}));xd.displayName=ka.Input.displayName;const hd=u.forwardRef(({className:a,...l},r)=>e.jsx(ka.List,{ref:r,className:P("max-h-[300px] overflow-y-auto overflow-x-hidden",a),...l}));hd.displayName=ka.List.displayName;const fd=u.forwardRef((a,l)=>e.jsx(ka.Empty,{ref:l,className:"py-6 text-center text-sm",...a}));fd.displayName=ka.Empty.displayName;const uc=u.forwardRef(({className:a,...l},r)=>e.jsx(ka.Group,{ref:r,className:P("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...l}));uc.displayName=ka.Group.displayName;const WS=u.forwardRef(({className:a,...l},r)=>e.jsx(ka.Separator,{ref:r,className:P("-mx-1 h-px bg-border",a),...l}));WS.displayName=ka.Separator.displayName;const mc=u.forwardRef(({className:a,...l},r)=>e.jsx(ka.Item,{ref:r,className:P("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a),...l}));mc.displayName=ka.Item.displayName;const Zv=j_,Wv=v_,eN=N_,Tx=u.forwardRef(({className:a,sideOffset:l=4,...r},c)=>e.jsx(g_,{children:e.jsx(Zj,{ref:c,sideOffset:l,className:P("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",a),...r})}));Tx.displayName=Zj.displayName;function Il({content:a,className:l,iconClassName:r,side:c="top",align:d="center",maxWidth:m="300px"}){return e.jsx(Zv,{delayDuration:200,children:e.jsxs(Wv,{children:[e.jsx(eN,{asChild:!0,children:e.jsxs("button",{type:"button",className:P("inline-flex items-center justify-center rounded-full","text-muted-foreground hover:text-foreground","transition-colors cursor-help","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",l),onClick:h=>h.preventDefault(),children:[e.jsx(ox,{className:P("h-4 w-4",r)}),e.jsx("span",{className:"sr-only",children:"帮助信息"})]})}),e.jsx(Tx,{side:c,align:d,className:P("max-w-[var(--max-width)] text-sm leading-relaxed","bg-background text-foreground","border-2 border-primary shadow-lg","p-4"),style:{"--max-width":m},children:a})]})})}const sN=u.createContext(null),tN="maibot-completed-tours";function e4(){try{const a=localStorage.getItem(tN);return a?new Set(JSON.parse(a)):new Set}catch{return new Set}}function Qg(a){localStorage.setItem(tN,JSON.stringify([...a]))}function s4({children:a}){const[l,r]=u.useState({activeTourId:null,stepIndex:0,isRunning:!1}),[c]=u.useState(()=>new Map),[d,m]=u.useState(e4),[,h]=u.useState(0),f=u.useCallback((E,C)=>{c.set(E,C),h(R=>R+1)},[c]),p=u.useCallback(E=>{c.delete(E),r(C=>C.activeTourId===E?{...C,activeTourId:null,isRunning:!1,stepIndex:0}:C)},[c]),g=u.useCallback((E,C=0)=>{c.has(E)&&r({activeTourId:E,stepIndex:C,isRunning:!0})},[c]),N=u.useCallback(()=>{r(E=>({...E,isRunning:!1}))},[]),j=u.useCallback(E=>{r(C=>({...C,stepIndex:E}))},[]),b=u.useCallback(()=>{r(E=>({...E,stepIndex:E.stepIndex+1}))},[]),y=u.useCallback(()=>{r(E=>({...E,stepIndex:Math.max(0,E.stepIndex-1)}))},[]),w=u.useCallback(()=>l.activeTourId?c.get(l.activeTourId)||[]:[],[l.activeTourId,c]),z=u.useCallback(E=>{m(C=>{const R=new Set(C);return R.add(E),Qg(R),R})},[]),M=u.useCallback(E=>{const{action:C,index:R,status:H,type:O}=E,X=["finished","skipped"];if(C==="close"){r(L=>({...L,isRunning:!1,stepIndex:0}));return}X.includes(H)?r(L=>(H==="finished"&&L.activeTourId&&setTimeout(()=>z(L.activeTourId),0),{...L,isRunning:!1,stepIndex:0})):O==="step:after"&&(C==="next"?r(L=>({...L,stepIndex:R+1})):C==="prev"&&r(L=>({...L,stepIndex:R-1})))},[z]),S=u.useCallback(E=>d.has(E),[d]),F=u.useCallback(E=>{m(C=>{const R=new Set(C);return R.delete(E),Qg(R),R})},[]);return e.jsx(sN.Provider,{value:{state:l,tours:c,registerTour:f,unregisterTour:p,startTour:g,stopTour:N,goToStep:j,nextStep:b,prevStep:y,getCurrentSteps:w,handleJoyrideCallback:M,isTourCompleted:S,markTourCompleted:z,resetTourCompleted:F},children:a})}function Ex(){const a=u.useContext(sN);if(!a)throw new Error("useTour must be used within a TourProvider");return a}const t4={options:{zIndex:1e4,primaryColor:"hsl(var(--primary))",textColor:"hsl(var(--foreground))",backgroundColor:"hsl(var(--background))",arrowColor:"hsl(var(--background))",overlayColor:"rgba(0, 0, 0, 0.5)"},tooltip:{borderRadius:"var(--radius)",padding:"1rem"},tooltipContainer:{textAlign:"left"},tooltipTitle:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem"},tooltipContent:{fontSize:"0.875rem",padding:"0.5rem 0"},buttonNext:{backgroundColor:"hsl(var(--primary))",color:"hsl(var(--primary-foreground))",borderRadius:"calc(var(--radius) - 2px)",fontSize:"0.875rem",padding:"0.5rem 1rem"},buttonBack:{color:"hsl(var(--muted-foreground))",fontSize:"0.875rem",marginRight:"0.5rem"},buttonSkip:{color:"hsl(var(--muted-foreground))",fontSize:"0.875rem"},buttonClose:{color:"hsl(var(--muted-foreground))"},spotlight:{borderRadius:"var(--radius)"}},a4={back:"上一步",close:"关闭",last:"完成",next:"下一步",nextLabelWithProgress:"下一步 ({step}/{steps})",open:"打开对话框",skip:"跳过"};function l4(){const{state:a,getCurrentSteps:l,handleJoyrideCallback:r}=Ex(),c=l(),[d,m]=u.useState(!1),h=u.useRef(a.stepIndex),f=u.useRef(null);u.useEffect(()=>{h.current!==a.stepIndex&&(m(!1),h.current=a.stepIndex)},[a.stepIndex]),u.useEffect(()=>{if(!a.isRunning||c.length===0){m(!1);return}const j=c[a.stepIndex];if(!j){m(!1);return}const b=j.target;if(b==="body"){m(!0);return}m(!1);const y=setTimeout(()=>{const w=()=>{const F=document.querySelector(b);if(F){const E=F.getBoundingClientRect();if(E.width>0&&E.height>0)return!0}return!1};if(w()){setTimeout(()=>m(!0),100);return}const z=setInterval(()=>{w()&&(clearInterval(z),setTimeout(()=>m(!0),100))},100),M=setTimeout(()=>{clearInterval(z),m(!0)},5e3),S=()=>{clearInterval(z),clearTimeout(M)};f.current=S},150);return()=>{clearTimeout(y),f.current&&(f.current(),f.current=null)}},[a.isRunning,a.stepIndex,c]);const[p,g]=u.useState(null);if(u.useEffect(()=>{let j=document.getElementById("tour-portal-container");return j||(j=document.createElement("div"),j.id="tour-portal-container",j.style.cssText="position: fixed; top: 0; left: 0; z-index: 99999; pointer-events: none;",document.body.appendChild(j)),g(j),()=>{}},[]),!a.isRunning||c.length===0||!d)return null;const N=e.jsx(g1,{steps:c,stepIndex:a.stepIndex,run:a.isRunning,continuous:!0,showSkipButton:!0,showProgress:!0,disableOverlayClose:!0,disableScrolling:!1,disableScrollParentFix:!1,callback:r,styles:t4,locale:a4,scrollOffset:80,scrollToFirstStep:!0,floaterProps:{styles:{floater:{zIndex:99999}},disableAnimation:!0}},`tour-step-${a.stepIndex}`);return p?tw.createPortal(N,p):N}const gl="model-assignment-tour",aN=[{target:"body",content:"本引导旨在帮助你配置模型提供商和对应的模型,并为麦麦的各个组件分配合适的模型。",placement:"center",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="sidebar-model-provider"]',content:'第一步,你需要配置模型提供商。模型提供商决定了你要使用谁家的模型,无论是单一厂商(如 DeepSeek),还是模型平台(如 Siliconflow),都可以在这里进行配置。点击"下一步"进入配置页面。',placement:"right",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="add-provider-button"]',content:'点击"添加提供商"按钮,开始配置你的模型提供商。',placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="provider-dialog"]',content:"在这里,你可以选择你想要配置的模型提供商,填写相关信息后保存即可。",placement:"left",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-name-input"]',content:"这里的名称是你为这个模型提供商起的一个名字,方便你在后续使用时识别它。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-apikey-input"]',content:"这里需要填写你从模型提供商那里获取的 API 密钥,用于验证和调用模型服务。对于不同的提供商,获取 API 密钥的方式可能有所不同,请参考对应提供商的文档。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-url-input"]',content:"这里需要填写模型提供商的 API 访问地址,确保填写正确以便系统能够连接到模型服务。对于不同的提供商,API 地址可能有所不同,请参考对应提供商的文档。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-template-select"]',content:"当然,如果你不知道如何填写这些信息,很多模型提供商在这里都提供了预设的模板供你选择,选择对应的模板后,相关信息会自动填充。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-save-button"]',content:"填写完所有信息后,点击保存按钮,模型提供商就配置完成了。",placement:"top",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="provider-cancel-button"]',content:"因为这次咱们什么都没有填写,所以点击取消按钮退出吧。",placement:"top",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="sidebar-model-management"]',content:'配置好模型提供商后,接下来我们需要为麦麦添加模型并分配功能。点击"下一步"进入模型管理页面。',placement:"right",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="add-model-button"]',content:'在为麦麦的组件分配模型之前,首先需要添加你想要分配的模型,点击"添加模型"按钮开始添加。',placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="model-dialog"]',content:"在这里,你可以选择你之前配置好的模型提供商,然后选择对应的模型来添加。",placement:"left",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-name-input"]',content:"这里的模型名称是你为这个模型起的一个名字,方便你在后续使用时识别它。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-provider-select"]',content:"在这里选择你之前配置好的模型提供商,这样系统才能知道你要添加哪个提供商的模型。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-identifier-input"]',content:"这里需要填写你想要添加的模型的标识符,不同的模型提供商可能有不同的标识符格式,请参考对应提供商的文档。",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-save-button"]',content:"填写完所有信息后,点击保存按钮,模型就添加完成了。",placement:"top",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1},{target:'[data-tour="model-cancel-button"]',content:"当然,因为这次咱们什么都没有填写,所以直接点击取消按钮退出吧,等你准备好了再来添加模型。",placement:"top",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="tasks-tab-trigger"]',content:'最后一步,添加好模型后,切换到"为模型分配功能"标签页,为麦麦的各个组件分配合适的模型。',placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!0,hideFooter:!0},{target:'[data-tour="task-model-select"]',content:"在这里,你可以为每个组件选择一个或多个合适的模型,选择完成后配置会自动保存。恭喜你完成了模型配置的学习!",placement:"bottom",disableBeacon:!0,disableOverlayClose:!0,hideCloseButton:!1,spotlightClicks:!1}],lN={0:"/config/model",1:"/config/model",2:"/config/modelProvider",3:"/config/modelProvider",4:"/config/modelProvider",5:"/config/modelProvider",6:"/config/modelProvider",7:"/config/modelProvider",8:"/config/modelProvider",9:"/config/modelProvider",10:"/config/modelProvider",11:"/config/model",12:"/config/model",13:"/config/model",14:"/config/model",15:"/config/model",16:"/config/model",17:"/config/model",18:"/config/model",19:"/config/model"},Wi=[{id:"siliconflow",name:"SiliconFlow",base_url:"https://api.siliconflow.cn/v1",client_type:"openai",display_name:"硅基流动 (SiliconFlow)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"deepseek",name:"DeepSeek",base_url:"https://api.deepseek.com",client_type:"openai",display_name:"DeepSeek",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"rinkoai",name:"RinkoAI",base_url:"https://rinkoai.com/v1",client_type:"openai",display_name:"RinkoAI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"zhipu",name:"ZhipuAI",base_url:"https://open.bigmodel.cn/api/paas/v4",client_type:"openai",display_name:"智谱 AI (ZhipuAI / GLM)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"moonshot",name:"Moonshot",base_url:"https://api.moonshot.cn/v1",client_type:"openai",display_name:"月之暗面 (Moonshot / Kimi)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"doubao",name:"Doubao",base_url:"https://ark.cn-beijing.volces.com/api/v3",client_type:"openai",display_name:"字节豆包 (Doubao)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"alibaba",name:"Alibaba",base_url:"https://dashscope.aliyuncs.com/compatible-mode/v1",client_type:"openai",display_name:"阿里云百炼 (Alibaba Qwen)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"baichuan",name:"Baichuan",base_url:"https://api.baichuan-ai.com/v1",client_type:"openai",display_name:"百川智能 (Baichuan)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"minimax",name:"MiniMax",base_url:"https://api.minimax.chat/v1",client_type:"openai",display_name:"MiniMax (海螺 AI)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"stepfun",name:"StepFun",base_url:"https://api.stepfun.com/v1",client_type:"openai",display_name:"阶跃星辰 (StepFun)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"lingyi",name:"Lingyi",base_url:"https://api.lingyiwanwu.com/v1",client_type:"openai",display_name:"零一万物 (Lingyi / Yi)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"openai",name:"OpenAI",base_url:"https://api.openai.com/v1",client_type:"openai",display_name:"OpenAI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"xai",name:"xAI",base_url:"https://api.x.ai/v1",client_type:"openai",display_name:"xAI (Grok)",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"anthropic",name:"Anthropic",base_url:"https://api.anthropic.com/v1",client_type:"openai",display_name:"Anthropic (Claude)"},{id:"gemini",name:"Gemini",base_url:"https://generativelanguage.googleapis.com/v1beta",client_type:"gemini",display_name:"Google Gemini",modelFetcher:{endpoint:"/models",parser:"gemini"}},{id:"cohere",name:"Cohere",base_url:"https://api.cohere.ai/v1",client_type:"openai",display_name:"Cohere"},{id:"groq",name:"Groq",base_url:"https://api.groq.com/openai/v1",client_type:"openai",display_name:"Groq",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"together",name:"Together AI",base_url:"https://api.together.xyz/v1",client_type:"openai",display_name:"Together AI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"fireworks",name:"Fireworks",base_url:"https://api.fireworks.ai/inference/v1",client_type:"openai",display_name:"Fireworks AI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"mistral",name:"Mistral",base_url:"https://api.mistral.ai/v1",client_type:"openai",display_name:"Mistral AI",modelFetcher:{endpoint:"/models",parser:"openai"}},{id:"perplexity",name:"Perplexity",base_url:"https://api.perplexity.ai",client_type:"openai",display_name:"Perplexity AI"},{id:"custom",name:"",base_url:"",client_type:"openai",display_name:"自定义"}];function Yg(a){return a?a.replace(/\/+$/,"").toLowerCase():""}function n4(a){if(!a)return null;const l=Yg(a);return Wi.find(r=>r.id!=="custom"&&Yg(r.base_url)===l)||null}const Lo=a=>({...a,max_retry:a.max_retry??2,timeout:a.timeout??30,retry_interval:a.retry_interval??10}),r4=(a,l=[],r=null)=>{const c={};return a?(a.name?.trim()?l.some((m,h)=>r!==null&&h===r?!1:m.name.trim().toLowerCase()===a.name.trim().toLowerCase())&&(c.name="提供商名称已存在,请使用其他名称"):c.name="请输入提供商名称",a.base_url?.trim()||(c.base_url="请输入基础 URL"),a.api_key?.trim()||(c.api_key="请输入 API Key"),{isValid:Object.keys(c).length===0,errors:c}):{isValid:!1,errors:{name:"提供商数据为空"}}};function i4(){return e.jsx(lr,{children:e.jsx(c4,{})})}function c4(){const[a,l]=u.useState([]),[r,c]=u.useState(!0),[d,m]=u.useState(!1),[h,f]=u.useState(!1),[p,g]=u.useState(!1),[N,j]=u.useState(!1),[b,y]=u.useState(null),[w,z]=u.useState(null),[M,S]=u.useState("custom"),[F,E]=u.useState(!1),[C,R]=u.useState(!1),[H,O]=u.useState(null),[X,L]=u.useState(!1),[me,Ne]=u.useState(""),[je,re]=u.useState(new Set),[ge,pe]=u.useState(!1),[D,Q]=u.useState(1),[I,ue]=u.useState(20),[Y,we]=u.useState(""),[fe,Ee]=u.useState({isOpen:!1,providersToDelete:[],affectedModels:[],pendingProviders:[],context:"auto",oldProviders:[]}),[G,$]=u.useState({}),[A,K]=u.useState(new Set),[Re,se]=u.useState(new Map),{toast:$e}=nt(),cs=ha(),{state:J,goToStep:Z,registerTour:Le}=Ex(),{triggerRestart:ne,isRestarting:De}=Tn(),xe=u.useRef(null),Me=u.useRef(!0);u.useEffect(()=>{Le(gl,aN)},[Le]),u.useEffect(()=>{if(J.activeTourId===gl&&J.isRunning){const te=lN[J.stepIndex];te&&!window.location.pathname.endsWith(te.replace("/config/",""))&&cs({to:te})}},[J.stepIndex,J.activeTourId,J.isRunning,cs]);const ds=u.useRef(J.stepIndex);u.useEffect(()=>{if(J.activeTourId===gl&&J.isRunning){const te=ds.current,_e=J.stepIndex;te>=3&&te<=9&&_e<3&&j(!1),te>=10&&_e>=3&&_e<=9&&($({}),S("custom"),y({name:"",base_url:"",api_key:"",client_type:"openai",max_retry:2,timeout:30,retry_interval:10}),z(null),L(!1),j(!0)),ds.current=_e}},[J.stepIndex,J.activeTourId,J.isRunning]),u.useEffect(()=>{if(J.activeTourId!==gl||!J.isRunning)return;const te=_e=>{const U=_e.target,Se=J.stepIndex;Se===2&&U.closest('[data-tour="add-provider-button"]')?setTimeout(()=>Z(3),300):Se===9&&U.closest('[data-tour="provider-cancel-button"]')&&setTimeout(()=>Z(10),300)};return document.addEventListener("click",te,!0),()=>document.removeEventListener("click",te,!0)},[J,Z]),u.useEffect(()=>{Ts()},[]);const Ts=async()=>{try{c(!0);const te=await Nn();l(te.api_providers||[]),g(!1),Me.current=!1}catch(te){console.error("加载配置失败:",te)}finally{c(!1)}},Ct=async()=>{await ne()},ia=async()=>{try{m(!0),xe.current&&clearTimeout(xe.current);const te=a.map(es=>({...es,max_retry:es.max_retry??2,timeout:es.timeout??30,retry_interval:es.retry_interval??10})),{shouldProceed:_e}=await ut(te,"restart");if(!_e){m(!1);return}const U=await Nn(),Se=new Set(te.map(es=>es.name)),us=(U.models||[]).filter(es=>Se.has(es.api_provider));U.api_providers=te,U.models=us,await lc(U),g(!1),$e({title:"保存成功",description:"正在重启麦麦..."}),await Ct()}catch(te){console.error("保存配置失败:",te),$e({title:"保存失败",description:te.message,variant:"destructive"}),m(!1)}},ut=u.useCallback(async(te,_e="auto")=>{try{const U=await Nn(),Se=new Set(a.map($s=>$s.name)),as=new Set(te.map($s=>$s.name)),us=Array.from(Se).filter($s=>!as.has($s));if(us.length===0)return{shouldProceed:!0,providers:te};const Tt=(U.models||[]).filter($s=>us.includes($s.api_provider));return Tt.length===0?{shouldProceed:!0,providers:te}:(Ee({isOpen:!0,providersToDelete:us,affectedModels:Tt,pendingProviders:te,context:_e,oldProviders:[...a]}),{shouldProceed:!1,providers:te})}catch(U){return console.error("检查删除影响失败:",U),{shouldProceed:!0,providers:te}}},[a]),Bs=async()=>{try{(fe.context==="auto"?f:m)(!0),Ee($s=>({...$s,isOpen:!1}));const _e=await Nn(),U=fe.pendingProviders.map(Lo),Se=new Set(U.map($s=>$s.name)),us=(_e.models||[]).filter($s=>Se.has($s.api_provider)),es=new Set(fe.affectedModels.map($s=>$s.name)),Tt=_e.model_task_config;Tt&&Object.keys(Tt).forEach($s=>{const pa=Tt[$s];pa&&Array.isArray(pa.model_list)&&(pa.model_list=pa.model_list.filter(oa=>!es.has(oa)))}),_e.api_providers=U,_e.models=us,_e.model_task_config=Tt,await lc(_e),l(fe.pendingProviders),g(!1),$e({title:"删除成功",description:`已删除 ${fe.providersToDelete.length} 个提供商和 ${fe.affectedModels.length} 个关联模型`}),Ee({isOpen:!1,providersToDelete:[],affectedModels:[],pendingProviders:[],context:"auto",oldProviders:[]}),re(new Set),fe.context==="restart"&&await Ct()}catch(te){console.error("删除失败:",te),$e({title:"删除失败",description:te.message,variant:"destructive"})}finally{fe.context==="auto"?f(!1):m(!1)}},V=()=>{fe.oldProviders.length>0&&l(fe.oldProviders),Ee({isOpen:!1,providersToDelete:[],affectedModels:[],pendingProviders:[],context:"auto",oldProviders:[]}),g(!1)},Ke=u.useCallback(async te=>{if(Me.current)return;const{shouldProceed:_e}=await ut(te,"auto");if(!_e){g(!0);return}try{f(!0);const U=te.map(Lo);await Wm("api_providers",U),g(!1)}catch(U){console.error("自动保存失败:",U),$e({title:"自动保存失败",description:U.message,variant:"destructive"}),g(!0)}finally{f(!1)}},[a,ut]);u.useEffect(()=>{if(!Me.current)return g(!0),xe.current&&clearTimeout(xe.current),xe.current=setTimeout(()=>{Ke(a)},2e3),()=>{xe.current&&clearTimeout(xe.current)}},[a,Ke]);const He=async()=>{try{m(!0),xe.current&&clearTimeout(xe.current);const te=a.map(Lo),{shouldProceed:_e}=await ut(te,"manual");if(!_e){m(!1);return}const U=await Nn(),Se=new Set(te.map(es=>es.name)),as=U.models||[],us=as.filter(es=>{const Tt=Se.has(es.api_provider);return Tt||console.warn(`模型 "${es.name}" 引用了已删除的提供商 "${es.api_provider}",将被移除`),Tt});if(as.length!==us.length){const es=as.length-us.length;$e({title:"注意",description:`已自动移除 ${es} 个引用已删除提供商的模型`,variant:"default"})}console.log("发送的 providers 数据:",te),U.api_providers=te,U.models=us,console.log("完整配置数据:",U),await lc(U),g(!1),$e({title:"保存成功",description:"模型提供商配置已保存"})}catch(te){console.error("保存配置失败:",te),$e({title:"保存失败",description:te.message,variant:"destructive"})}finally{m(!1)}},Je=(te,_e)=>{if($({}),te){const U=Wi.find(Se=>Se.base_url===te.base_url&&Se.client_type===te.client_type);S(U?.id||"custom"),y(te)}else S("custom"),y({name:"",base_url:"",api_key:"",client_type:"openai",max_retry:2,timeout:30,retry_interval:10});z(_e),L(!1),j(!0)},Es=u.useCallback(te=>{S(te),E(!1);const _e=Wi.find(U=>U.id===te);_e&&_e.id!=="custom"?y(U=>({...U,name:_e.name,base_url:_e.base_url,client_type:_e.client_type})):_e?.id==="custom"&&y(U=>({...U,name:"",base_url:"",client_type:"openai"}))},[]),ms=u.useMemo(()=>M!=="custom",[M]),Ms=u.useCallback(async()=>{if(b?.api_key)try{await navigator.clipboard.writeText(b.api_key),$e({title:"复制成功",description:"API Key 已复制到剪贴板"})}catch{$e({title:"复制失败",description:"无法访问剪贴板",variant:"destructive"})}},[b?.api_key,$e]),We=()=>{if(!b)return;const{isValid:te,errors:_e}=r4(b,a,w);if(!te){$(_e);return}$({});const U=Lo(b);if(w!==null){const Se=[...a];Se[w]=U,l(Se)}else l([...a,U]);j(!1),y(null),z(null)},Cs=te=>{if(!te&&b){const _e={...b,max_retry:b.max_retry??2,timeout:b.timeout??30,retry_interval:b.retry_interval??10};y(_e)}j(te)},rs=te=>{O(te),R(!0)},is=async()=>{if(H!==null){const te=a.filter((U,Se)=>Se!==H),{shouldProceed:_e}=await ut(te,"manual");_e&&(l(te),$e({title:"删除成功",description:"提供商已从列表中移除"}))}R(!1),O(null)},ys=te=>{const _e=new Set(je);_e.has(te)?_e.delete(te):_e.add(te),re(_e)},rt=()=>{if(je.size===Qe.length)re(new Set);else{const te=Qe.map((_e,U)=>a.findIndex(Se=>Se===Qe[U]));re(new Set(te))}},jt=()=>{if(je.size===0){$e({title:"提示",description:"请先选择要删除的提供商",variant:"default"});return}pe(!0)},Ae=async()=>{const te=a.filter((U,Se)=>!je.has(Se)),{shouldProceed:_e}=await ut(te,"manual");_e&&(l(te),re(new Set),$e({title:"批量删除成功",description:`已删除 ${je.size} 个提供商`})),pe(!1)},Qe=u.useMemo(()=>{if(!me)return a;const te=me.toLowerCase();return a.filter(_e=>_e.name.toLowerCase().includes(te)||_e.base_url.toLowerCase().includes(te)||_e.client_type.toLowerCase().includes(te))},[a,me]),{totalPages:As,paginatedProviders:mt}=u.useMemo(()=>{const te=Math.ceil(Qe.length/I),_e=Qe.slice((D-1)*I,D*I);return{totalPages:te,paginatedProviders:_e}},[Qe,D,I]),Ht=u.useCallback(()=>{const te=parseInt(Y);te>=1&&te<=As&&(Q(te),we(""))},[Y,As]),ca=async te=>{K(_e=>new Set(_e).add(te));try{const _e=await yS(te);se(U=>new Map(U).set(te,_e)),_e.network_ok?_e.api_key_valid===!0?$e({title:"连接正常",description:`${te} 网络连接正常,API Key 有效 (${_e.latency_ms}ms)`}):_e.api_key_valid===!1?$e({title:"连接正常但 Key 无效",description:`${te} 网络连接正常,但 API Key 无效或已过期`,variant:"destructive"}):$e({title:"网络连接正常",description:`${te} 可以访问 (${_e.latency_ms}ms)`}):$e({title:"连接失败",description:_e.error||"无法连接到提供商",variant:"destructive"})}catch(_e){$e({title:"测试失败",description:_e.message,variant:"destructive"})}finally{K(_e=>{const U=new Set(_e);return U.delete(te),U})}},Fa=async()=>{for(const te of a)await ca(te.name)},Xt=te=>{const _e=A.has(te),U=Re.get(te);return _e?e.jsxs(Ce,{variant:"secondary",className:"gap-1",children:[e.jsx(Fs,{className:"h-3 w-3 animate-spin"}),"测试中"]}):U?U.network_ok?U.api_key_valid===!0?e.jsxs(Ce,{className:"gap-1 bg-green-600 hover:bg-green-700",children:[e.jsx(st,{className:"h-3 w-3"}),"正常"]}):U.api_key_valid===!1?e.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[e.jsx(Ut,{className:"h-3 w-3"}),"Key无效"]}):e.jsxs(Ce,{className:"gap-1 bg-blue-600 hover:bg-blue-700",children:[e.jsx(st,{className:"h-3 w-3"}),"可访问"]}):e.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[e.jsx(ta,{className:"h-3 w-3"}),"离线"]}):null};return r?e.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})}):e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"AI模型厂商配置"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理 AI 模型厂商的 API 配置"})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[je.size>0&&e.jsxs(_,{onClick:jt,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[e.jsx(os,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"批量删除 (",je.size,")"]}),e.jsxs(_,{onClick:Fa,size:"sm",variant:"outline",className:"w-full sm:w-auto",disabled:a.length===0||A.size>0,children:[e.jsx(sl,{className:"mr-2 h-4 w-4"}),A.size>0?`测试中 (${A.size})`:"测试全部"]}),e.jsxs(_,{onClick:()=>Je(null,null),size:"sm",className:"w-full sm:w-auto","data-tour":"add-provider-button",children:[e.jsx(Xs,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"添加提供商"]}),e.jsxs(_,{onClick:He,disabled:d||h||!p||De,size:"sm",variant:"outline",className:"w-full sm:w-auto sm:min-w-[120px]",children:[e.jsx(gc,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),d?"保存中...":h?"自动保存中...":p?"保存配置":"已保存"]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{disabled:d||h||De,size:"sm",className:"w-full sm:w-auto sm:min-w-[120px]",children:[e.jsx(pc,{className:"mr-2 h-4 w-4"}),De?"重启中...":p?"保存并重启":"重启麦麦"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重启麦麦?"}),e.jsx(gs,{asChild:!0,children:e.jsx("div",{children:e.jsx("p",{children:p?"当前有未保存的配置更改。点击确认将先保存配置,然后重启麦麦使新配置生效。重启过程中麦麦将暂时离线。":"即将重启麦麦主程序。重启过程中麦麦将暂时离线,配置将在重启后生效。"})})})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:p?ia:Ct,children:p?"保存并重启":"确认重启"})]})]})]})]})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:["配置更新后需要",e.jsx("strong",{children:"重启麦麦"}),'才能生效。你可以点击右上角的"保存并重启"按钮一键完成保存和重启。']})]}),e.jsxs(ts,{className:"h-[calc(100vh-260px)]",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 mb-4",children:[e.jsxs("div",{className:"relative w-full sm:flex-1 sm:max-w-sm",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{placeholder:"搜索提供商名称、URL 或类型...",value:me,onChange:te=>Ne(te.target.value),className:"pl-9"})]}),me&&e.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["找到 ",Qe.length," 个结果"]})]}),e.jsx("div",{className:"md:hidden space-y-3",children:Qe.length===0?e.jsx("div",{className:"text-center text-muted-foreground py-8 rounded-lg border bg-card",children:me?"未找到匹配的提供商":'暂无提供商配置,点击"添加提供商"开始配置'}):mt.map((te,_e)=>{const U=a.findIndex(Se=>Se===te);return e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-base truncate",children:te.name}),Xt(te.name)]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 break-all",children:te.base_url})]}),e.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>ca(te.name),disabled:A.has(te.name),title:"测试连接",children:A.has(te.name)?e.jsx(Fs,{className:"h-4 w-4 animate-spin"}):e.jsx(sl,{className:"h-4 w-4"})}),e.jsx(_,{variant:"default",size:"sm",onClick:()=>Je(te,U),children:e.jsx(Zn,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),e.jsx(_,{size:"sm",onClick:()=>rs(U),className:"bg-red-600 hover:bg-red-700 text-white",children:e.jsx(os,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"客户端类型"}),e.jsx("p",{className:"font-medium",children:te.client_type})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"最大重试"}),e.jsx("p",{className:"font-medium",children:te.max_retry})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"超时(秒)"}),e.jsx("p",{className:"font-medium",children:te.timeout})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"重试间隔(秒)"}),e.jsx("p",{className:"font-medium",children:te.retry_interval})]})]})]},_e)})}),e.jsx("div",{className:"hidden md:block rounded-lg border bg-card overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:je.size===Qe.length&&Qe.length>0,onCheckedChange:rt})}),e.jsx(ns,{children:"状态"}),e.jsx(ns,{children:"名称"}),e.jsx(ns,{children:"基础URL"}),e.jsx(ns,{children:"客户端类型"}),e.jsx(ns,{className:"text-right",children:"最大重试"}),e.jsx(ns,{className:"text-right",children:"超时(秒)"}),e.jsx(ns,{className:"text-right",children:"重试间隔(秒)"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:mt.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:9,className:"text-center text-muted-foreground py-8",children:me?"未找到匹配的提供商":'暂无提供商配置,点击"添加提供商"开始配置'})}):mt.map((te,_e)=>{const U=a.findIndex(Se=>Se===te);return e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:je.has(U),onCheckedChange:()=>ys(U)})}),e.jsx(Ze,{children:Xt(te.name)||e.jsx(Ce,{variant:"outline",className:"text-muted-foreground",children:"未测试"})}),e.jsx(Ze,{className:"font-medium",children:te.name}),e.jsx(Ze,{className:"max-w-xs truncate",title:te.base_url,children:te.base_url}),e.jsx(Ze,{children:te.client_type}),e.jsx(Ze,{className:"text-right",children:te.max_retry}),e.jsx(Ze,{className:"text-right",children:te.timeout}),e.jsx(Ze,{className:"text-right",children:te.retry_interval}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>ca(te.name),disabled:A.has(te.name),title:"测试连接",children:A.has(te.name)?e.jsx(Fs,{className:"h-4 w-4 animate-spin"}):e.jsx(sl,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"default",size:"sm",onClick:()=>Je(te,U),children:[e.jsx(Zn,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"编辑"]}),e.jsxs(_,{size:"sm",onClick:()=>rs(U),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"删除"]})]})})]},_e)})})]})})}),Qe.length>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"page-size-provider",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:I.toString(),onValueChange:te=>{ue(parseInt(te)),Q(1),re(new Set)},children:[e.jsx(Ie,{id:"page-size-provider",className:"w-20",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["显示 ",(D-1)*I+1," 到"," ",Math.min(D*I,Qe.length)," 条,共 ",Qe.length," 条"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Q(1),disabled:D===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>Q(te=>Math.max(1,te-1)),disabled:D===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{type:"number",value:Y,onChange:te=>we(te.target.value),onKeyDown:te=>te.key==="Enter"&&Ht(),placeholder:D.toString(),className:"w-16 h-8 text-center",min:1,max:As}),e.jsx(_,{variant:"outline",size:"sm",onClick:Ht,disabled:!Y,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>Q(te=>te+1),disabled:D>=As,children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Q(As),disabled:D>=As,className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]}),e.jsx(Qs,{open:N,onOpenChange:Cs,children:e.jsxs(Hs,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh] overflow-y-auto","data-tour":"provider-dialog",preventOutsideClose:J.isRunning,children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:w!==null?"编辑提供商":"添加提供商"}),e.jsx(at,{children:"配置 API 提供商的连接信息和参数"})]}),e.jsxs("form",{onSubmit:te=>{te.preventDefault(),We()},autoComplete:"off",children:[e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2","data-tour":"provider-template-select",children:[e.jsx(T,{htmlFor:"template",children:"提供商模板"}),e.jsxs(cl,{open:F,onOpenChange:E,children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",role:"combobox","aria-expanded":F,className:"w-full justify-between",children:[M?Wi.find(te=>te.id===M)?.display_name:"选择提供商模板...",e.jsx(mx,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(tl,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:e.jsxs(md,{children:[e.jsx(xd,{placeholder:"搜索提供商模板..."}),e.jsx(ts,{className:"h-[300px]",children:e.jsxs(hd,{className:"max-h-none overflow-visible",children:[e.jsx(fd,{children:"未找到匹配的模板"}),e.jsx(uc,{children:Wi.map(te=>e.jsxs(mc,{value:te.display_name,onSelect:()=>Es(te.id),children:[e.jsx(Ot,{className:`mr-2 h-4 w-4 ${M===te.id?"opacity-100":"opacity-0"}`}),te.display_name]},te.id))})]})})]})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"选择预设模板可自动填充 URL 和客户端类型,支持搜索"})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"provider-name-input",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"name",className:G.name?"text-destructive":"",children:"名称 *"}),e.jsx(Il,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"提供商名称"}),e.jsx("p",{children:"为这个 API 提供商设置一个便于识别的名称,用于在模型配置中引用。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsx("li",{children:"推荐使用厂商官方名称,如 DeepSeek、OpenAI"}),e.jsx("li",{children:"名称需要唯一,不能与现有提供商重复"})]})]}),side:"right",maxWidth:"350px"})]}),e.jsx(ae,{id:"name",value:b?.name||"",onChange:te=>{y(_e=>_e?{..._e,name:te.target.value}:null),G.name&&$(_e=>({..._e,name:void 0}))},placeholder:"例如: DeepSeek, SiliconFlow",className:G.name?"border-destructive focus-visible:ring-destructive":""}),G.name&&e.jsx("p",{className:"text-xs text-destructive",children:G.name})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"provider-url-input",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"base_url",className:G.base_url?"text-destructive":"",children:"基础 URL *"}),e.jsx(Il,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"API 基础地址"}),e.jsx("p",{children:"提供商的 API 端点基础 URL,通常以 /v1 结尾。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"OpenAI 格式:"}),"https://api.openai.com/v1"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"DeepSeek:"}),"https://api.deepseek.com"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"硅基流动:"}),"https://api.siliconflow.cn/v1"]}),e.jsx("li",{children:"选择模板会自动填充正确的 URL"})]})]}),side:"right",maxWidth:"400px"})]}),e.jsx(ae,{id:"base_url",value:b?.base_url||"",onChange:te=>{y(_e=>_e?{..._e,base_url:te.target.value}:null),G.base_url&&$(_e=>({..._e,base_url:void 0}))},placeholder:"https://api.example.com/v1",disabled:ms,className:`${ms?"bg-muted cursor-not-allowed":""} ${G.base_url?"border-destructive focus-visible:ring-destructive":""}`}),G.base_url&&e.jsx("p",{className:"text-xs text-destructive",children:G.base_url}),ms&&!G.base_url&&e.jsx("p",{className:"text-xs text-muted-foreground",children:'使用模板时 URL 不可编辑,切换到"自定义"以手动配置'})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"provider-apikey-input",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"api_key",className:G.api_key?"text-destructive":"",children:"API Key *"}),e.jsx(Il,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"API 密钥"}),e.jsx("p",{children:"从提供商平台获取的身份验证密钥。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:["通常以 ",e.jsx("code",{children:"sk-"})," 开头"]}),e.jsx("li",{children:"请妥善保管,不要泄露给他人"}),e.jsx("li",{children:"可以点击眼睛图标切换显示/隐藏"}),e.jsx("li",{children:"点击复制图标可快速复制密钥"})]})]}),side:"right",maxWidth:"350px"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{id:"api_key",type:X?"text":"password",value:b?.api_key||"",onChange:te=>{y(_e=>_e?{..._e,api_key:te.target.value}:null),G.api_key&&$(_e=>({..._e,api_key:void 0}))},placeholder:"sk-...",className:`flex-1 ${G.api_key?"border-destructive focus-visible:ring-destructive":""}`}),e.jsx(_,{type:"button",variant:"outline",size:"icon",onClick:()=>L(!X),title:X?"隐藏密钥":"显示密钥",children:X?e.jsx(ic,{className:"h-4 w-4"}):e.jsx(ua,{className:"h-4 w-4"})}),e.jsx(_,{type:"button",variant:"outline",size:"icon",onClick:Ms,title:"复制密钥",children:e.jsx(qo,{className:"h-4 w-4"})})]}),G.api_key&&e.jsx("p",{className:"text-xs text-destructive",children:G.api_key})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"client_type",children:"客户端类型"}),e.jsx(Il,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"API 客户端类型"}),e.jsx("p",{children:"指定与提供商通信时使用的 API 协议格式。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"OpenAI:"}),"兼容 OpenAI API 格式的提供商"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Gemini:"}),"Google Gemini 专用格式"]}),e.jsx("li",{children:"大部分第三方提供商都兼容 OpenAI 格式"})]})]}),side:"right",maxWidth:"350px"})]}),e.jsxs(Pe,{value:b?.client_type||"openai",onValueChange:te=>y(_e=>_e?{..._e,client_type:te}:null),disabled:ms,children:[e.jsx(Ie,{id:"client_type",className:ms?"bg-muted cursor-not-allowed":"",children:e.jsx(Fe,{placeholder:"选择客户端类型"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"openai",children:"OpenAI"}),e.jsx(W,{value:"gemini",children:"Gemini"})]})]}),ms&&e.jsx("p",{className:"text-xs text-muted-foreground",children:'使用模板时客户端类型不可编辑,切换到"自定义"以手动配置'})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"max_retry",children:"最大重试"}),e.jsx(Il,{content:"API 请求失败时的最大重试次数。设置为 0 表示不重试。默认值:2",side:"top",maxWidth:"250px"})]}),e.jsx(ae,{id:"max_retry",type:"number",min:"0",value:b?.max_retry??"",onChange:te=>{const _e=te.target.value===""?null:parseInt(te.target.value);y(U=>U?{...U,max_retry:_e}:null)},placeholder:"默认: 2"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"timeout",children:"超时(秒)"}),e.jsx(Il,{content:"单次 API 请求的超时时间(秒)。超时后会触发重试或报错。默认值:30 秒",side:"top",maxWidth:"250px"})]}),e.jsx(ae,{id:"timeout",type:"number",min:"1",value:b?.timeout??"",onChange:te=>{const _e=te.target.value===""?null:parseInt(te.target.value);y(U=>U?{...U,timeout:_e}:null)},placeholder:"默认: 30"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"retry_interval",children:"重试间隔(秒)"}),e.jsx(Il,{content:"两次重试之间的等待时间(秒)。适当的间隔可以避免触发 API 限流。默认值:10 秒",side:"top",maxWidth:"250px"})]}),e.jsx(ae,{id:"retry_interval",type:"number",min:"1",value:b?.retry_interval??"",onChange:te=>{const _e=te.target.value===""?null:parseInt(te.target.value);y(U=>U?{...U,retry_interval:_e}:null)},placeholder:"默认: 10"})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{type:"button",variant:"outline",onClick:()=>j(!1),"data-tour":"provider-cancel-button",children:"取消"}),e.jsx(_,{type:"submit","data-tour":"provider-save-button",children:"保存"})]})]})]})}),e.jsx(bs,{open:C,onOpenChange:R,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除提供商 "',H!==null?a[H]?.name:"",'" 吗? 此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:is,children:"删除"})]})]})}),e.jsx(bs,{open:ge,onOpenChange:pe,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["确定要删除选中的 ",je.size," 个提供商吗? 此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:Ae,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})}),e.jsx(bs,{open:fe.isOpen,onOpenChange:te=>Ee(_e=>({..._e,isOpen:te})),children:e.jsxs(xs,{className:"max-w-2xl",children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除提供商"}),e.jsx(gs,{asChild:!0,children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["您即将删除以下提供商:",e.jsx("strong",{className:"text-foreground ml-1",children:fe.providersToDelete.join(", ")})]}),e.jsxs("p",{className:"text-yellow-600 dark:text-yellow-500 font-medium",children:["⚠️ 此操作将同时删除 ",fe.affectedModels.length," 个关联的模型:"]}),e.jsx(ts,{className:"h-32 w-full rounded border p-3",children:e.jsx("div",{className:"space-y-1",children:fe.affectedModels.map((te,_e)=>e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"font-mono text-muted-foreground",children:"•"}),e.jsx("span",{className:"ml-2 font-medium",children:te.name}),e.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",te.model_identifier,")"]})]},_e))})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"这些模型将从模型列表和所有任务分配中移除。此操作无法撤销。"})]})})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:V,children:"取消"}),e.jsx(js,{onClick:Bs,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"确认删除"})]})]})}),e.jsx(nr,{})]})}function nc(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).substring(2,11)}`}function Bm(a){return a===null?"null":Array.isArray(a)?"array":typeof a=="object"?"object":typeof a=="boolean"?"boolean":typeof a=="number"?"number":"string"}function sx(a){return Object.entries(a).map(([l,r])=>{const c=Bm(r),d={id:nc(),key:l,value:r,type:c,expanded:!0};return c==="object"&&r&&typeof r=="object"?d.children=sx(r):c==="array"&&Array.isArray(r)&&(d.children=r.map((m,h)=>{const f=Bm(m),p={id:nc(),key:String(h),value:m,type:f,expanded:!0};return f==="object"&&m&&typeof m=="object"?p.children=sx(m):f==="array"&&Array.isArray(m)&&(p.children=m.map((g,N)=>({id:nc(),key:String(N),value:g,type:Bm(g),expanded:!0}))),p})),d})}function tx(a){const l={};for(const r of a)r.key.trim()&&(r.type==="object"&&r.children?l[r.key]=tx(r.children):r.type==="array"&&r.children?l[r.key]=r.children.map(c=>c.type==="object"&&c.children?tx(c.children):c.type==="array"&&c.children?c.children.map(d=>d.value):c.value):r.type==="null"?l[r.key]=null:l[r.key]=r.value);return l}function Jg(a,l){switch(l){case"boolean":return a==="true";case"number":{const r=parseFloat(a);return isNaN(r)?0:r}case"null":return null;default:return a}}function nN({node:a,level:l,onUpdate:r,onRemove:c,onAddChild:d,onToggleExpand:m}){const h=a.type==="object"||a.type==="array",f=a.children&&a.children.length>0;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"grid gap-2 items-center",style:{gridTemplateColumns:h?"32px 1fr 90px 64px":"32px 1fr 1fr 90px 32px",paddingLeft:`${l*20}px`},children:[e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>m(a.id),disabled:!h||!f,children:h&&f?a.expanded?e.jsx(Ia,{className:"h-4 w-4"}):e.jsx(ra,{className:"h-4 w-4"}):e.jsx("span",{className:"w-4"})}),e.jsx(ae,{value:a.key,onChange:p=>r(a.id,"key",p.target.value),placeholder:"key",className:"h-8 text-sm"}),!h&&e.jsx(e.Fragment,{children:a.type==="boolean"?e.jsxs("div",{className:"flex items-center h-8 px-3 border rounded-md bg-background",children:[e.jsx(qe,{checked:a.value===!0,onCheckedChange:p=>r(a.id,"value",p)}),e.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:a.value?"true":"false"})]}):a.type==="null"?e.jsx("div",{className:"flex items-center h-8 px-3 border rounded-md bg-muted text-sm text-muted-foreground",children:"null"}):e.jsx(ae,{type:a.type==="number"?"number":"text",value:a.value,onChange:p=>r(a.id,"value",p.target.value),placeholder:"value",className:"h-8 text-sm",step:a.type==="number"?"any":void 0})}),e.jsxs(Pe,{value:a.type,onValueChange:p=>r(a.id,"type",p),children:[e.jsx(Ie,{className:"h-8 text-xs",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"string",children:"字符串"}),e.jsx(W,{value:"number",children:"数字"}),e.jsx(W,{value:"boolean",children:"布尔"}),e.jsx(W,{value:"null",children:"Null"}),e.jsx(W,{value:"object",children:"对象"}),e.jsx(W,{value:"array",children:"数组"})]})]}),e.jsxs("div",{className:"flex gap-1 justify-end",children:[h&&e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-primary",onClick:()=>d(a.id),title:"添加子项",children:e.jsx(Xs,{className:"h-4 w-4"})}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:()=>c(a.id),title:"删除",children:e.jsx(os,{className:"h-4 w-4"})})]})]}),h&&a.expanded&&a.children&&a.children.length>0&&e.jsx("div",{className:"space-y-1",children:a.children.map(p=>e.jsx(nN,{node:p,level:l+1,onUpdate:r,onRemove:c,onAddChild:d,onToggleExpand:m},p.id))})]})}function o4({value:a,onChange:l,placeholder:r="添加参数..."}){const[c,d]=u.useState(()=>sx(a||{})),m=u.useCallback(j=>{d(j),l(tx(j))},[l]),h=u.useCallback(()=>{const j={id:nc(),key:"",value:"",type:"string",expanded:!1};m([...c,j])},[c,m]),f=u.useCallback((j,b,y)=>{const w=z=>z.map(M=>{if(M.id===j)if(b==="type"){const S=y;if(S==="object")return{...M,type:S,value:{},children:[]};if(S==="array")return{...M,type:S,value:[],children:[]};if(S==="null")return{...M,type:S,value:null};{const F=Jg(String(M.value),S);return{...M,type:S,value:F,children:void 0}}}else if(b==="value"){const S=Jg(String(y),M.type);return{...M,value:S}}else return{...M,[b]:String(y)};return M.children?{...M,children:w(M.children)}:M});m(w(c))},[c,m]),p=u.useCallback(j=>{const b=y=>y.filter(w=>w.id!==j).map(w=>w.children?{...w,children:b(w.children)}:w);m(b(c))},[c,m]),g=u.useCallback(j=>{const b=y=>y.map(w=>{if(w.id===j){const z={id:nc(),key:w.type==="array"?String(w.children?.length||0):"",value:"",type:"string",expanded:!0};return{...w,children:[...w.children||[],z]}}return w.children?{...w,children:b(w.children)}:w});m(b(c))},[c,m]),N=u.useCallback(j=>{const b=y=>y.map(w=>w.id===j?{...w,expanded:!w.expanded}:w.children?{...w,children:b(w.children)}:w);d(b(c))},[c]);return e.jsxs("div",{className:"h-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[c.length," 个参数"]}),e.jsxs(_,{type:"button",size:"sm",variant:"outline",onClick:h,className:"h-7 text-xs",children:[e.jsx(Xs,{className:"h-3 w-3 mr-1"}),"添加参数"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto space-y-1",children:c.length===0?e.jsx("div",{className:"text-sm text-muted-foreground text-center py-4 border border-dashed rounded-md",children:r}):e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"grid gap-2 text-xs text-muted-foreground px-1 sticky top-0 bg-background z-10",style:{gridTemplateColumns:"32px 1fr 1fr 90px 32px"},children:[e.jsx("span",{}),e.jsx("span",{children:"键名"}),e.jsx("span",{children:"值"}),e.jsx("span",{children:"类型"}),e.jsx("span",{})]}),c.map(j=>e.jsx(nN,{node:j,level:0,onUpdate:f,onRemove:p,onAddChild:g,onToggleExpand:N},j.id))]})})]})}function Xg(a){if(!a.trim())return{valid:!0,parsed:{}};try{const l=JSON.parse(a);return typeof l!="object"||l===null||Array.isArray(l)?{valid:!1,error:"必须是一个 JSON 对象 {}"}:{valid:!0,parsed:l}}catch{return{valid:!1,error:"JSON 格式错误"}}}function d4({value:a,onChange:l,className:r,placeholder:c="添加额外参数..."}){const[d,m]=u.useState("list"),h=u.useMemo(()=>Object.keys(a||{}).length>0?JSON.stringify(a,null,2):"",[a]),[f,p]=u.useState(h),[g,N]=u.useState(null);u.useEffect(()=>{p(h)},[h]);const j=u.useMemo(()=>{const w=Xg(f);return w.valid&&w.parsed?{success:!0,data:w.parsed}:{success:!1,data:{}}},[f]),b=u.useCallback(w=>{const z=w;z==="json"&&d==="list"&&(p(Object.keys(a).length>0?JSON.stringify(a,null,2):""),N(null)),m(z)},[d,a]),y=u.useCallback(w=>{p(w);const z=Xg(w);z.valid&&z.parsed?(N(null),l(z.parsed)):N(z.error||"JSON 格式错误")},[l]);return e.jsx("div",{className:P("h-full flex flex-col",r),children:e.jsxs(Jt,{value:d,onValueChange:b,className:"w-full flex-1 flex flex-col",children:[e.jsxs(Gt,{className:"h-8 p-0.5 bg-muted/60 w-fit",children:[e.jsx(Xe,{value:"list",className:"h-7 px-3 text-xs data-[state=active]:bg-background data-[state=active]:shadow-sm",children:"可视化编辑"}),e.jsx(Xe,{value:"json",className:"h-7 px-3 text-xs data-[state=active]:bg-background data-[state=active]:shadow-sm",children:"JSON 编辑"})]}),e.jsx(Ss,{value:"list",className:"mt-2 flex-1 flex flex-col overflow-hidden data-[state=inactive]:hidden data-[state=inactive]:h-0",children:e.jsx(o4,{value:a,onChange:l,placeholder:c})}),e.jsx(Ss,{value:"json",className:"mt-2 flex-1 flex flex-col overflow-hidden data-[state=inactive]:hidden data-[state=inactive]:h-0",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col gap-2 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"编辑"}),g?e.jsxs("div",{className:"flex items-center gap-1 text-xs text-destructive",children:[e.jsx(Ut,{className:"h-3 w-3"}),e.jsx("span",{className:"truncate max-w-[150px]",children:g})]}):f.trim()&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[e.jsx(Ot,{className:"h-3 w-3"}),e.jsx("span",{children:"有效"})]})]}),e.jsx(pt,{value:f,onChange:w=>y(w.target.value),placeholder:`{ "key": "value" }`,className:P("font-mono text-sm flex-1 resize-none",g&&"border-destructive focus-visible:ring-destructive")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"支持任意 JSON 类型(包括嵌套对象和数组)"})]}),e.jsxs("div",{className:"flex flex-col gap-2 overflow-hidden",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"预览"}),e.jsx("div",{className:"flex-1 rounded-md border bg-muted/30 p-3 overflow-auto",children:j.success&&Object.keys(j.data).length>0?e.jsx("pre",{className:"font-mono text-xs whitespace-pre-wrap break-words",children:JSON.stringify(j.data,null,2)}):j.success?e.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"暂无参数"}):e.jsx("div",{className:"flex items-center justify-center h-full text-sm text-destructive",children:"JSON 格式错误"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"实时预览解析结果"})]})]})})]})})}function u4({open:a,onOpenChange:l,value:r,onChange:c}){const[d,m]=u.useState(r),h=g=>{g&&m(r),l(g)},f=()=>{c(d),l(!1)},p=()=>{m(r),l(!1)};return e.jsx(Qs,{open:a,onOpenChange:h,children:e.jsxs(Hs,{className:"max-w-3xl h-[70vh] flex flex-col",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑额外参数"}),e.jsx(at,{children:"配置模型调用时的额外参数,支持嵌套对象和数组"})]}),e.jsx("div",{className:"flex-1 overflow-hidden min-h-0",children:e.jsx(d4,{value:d,onChange:m,placeholder:"添加额外参数(如 thinking、top_p 等)..."})}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:p,children:"取消"}),e.jsx(_,{onClick:f,children:"保存"})]})]})})}const ai="https://maibot-plugin-stats.maibot-webui.workers.dev";async function m4(a){const l=new URLSearchParams;a?.status&&l.set("status",a.status),a?.page&&l.set("page",a.page.toString()),a?.page_size&&l.set("page_size",a.page_size.toString()),a?.search&&l.set("search",a.search),a?.sort_by&&l.set("sort_by",a.sort_by),a?.sort_order&&l.set("sort_order",a.sort_order);const r=await fetch(`${ai}/pack?${l.toString()}`);if(!r.ok)throw new Error(`获取 Pack 列表失败: ${r.status}`);return r.json()}async function x4(a){const l=await fetch(`${ai}/pack/${a}`);if(!l.ok)throw new Error(`获取 Pack 失败: ${l.status}`);const r=await l.json();if(!r.success)throw new Error(r.error||"获取 Pack 失败");return r.pack}async function h4(a){const r=await(await fetch(`${ai}/pack`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).json();if(!r.success)throw new Error(r.error||"创建 Pack 失败");return r}async function f4(a,l){await fetch(`${ai}/pack/download`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pack_id:a,user_id:l})})}async function rN(a,l){const c=await(await fetch(`${ai}/pack/like`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pack_id:a,user_id:l})})).json();if(!c.success)throw new Error(c.error||"点赞失败");return{likes:c.likes,liked:c.liked}}async function iN(a,l){return(await(await fetch(`${ai}/pack/like/check?pack_id=${a}&user_id=${l}`)).json()).liked||!1}async function p4(a){const l=await ke("/api/webui/config/model");if(!l.ok)throw new Error("获取当前模型配置失败");const r=await l.json(),c=r.config||r;console.log("=== Pack Conflict Detection ==="),console.log("Pack providers:",a.providers),console.log("Local providers:",c.api_providers);const d={existing_providers:[],new_providers:[],conflicting_models:[]},m=c.api_providers||[];for(const f of a.providers){console.log(` Checking pack provider: ${f.name}`),console.log(` Pack URL: ${f.base_url}`),console.log(` Normalized: ${Pm(f.base_url)}`);const p=m.filter(g=>{const N=Pm(g.base_url),j=Pm(f.base_url);return console.log(` Comparing with local "${g.name}": ${g.base_url}`),console.log(` Local normalized: ${N}`),console.log(` Match: ${N===j}`),N===j});p.length>0?(console.log(` ✓ Matched with ${p.length} local provider(s):`,p.map(g=>g.name).join(", ")),d.existing_providers.push({pack_provider:f,local_providers:p.map(g=>({name:g.name,base_url:g.base_url}))})):(console.log(" ✗ No match found - will need API key"),d.new_providers.push(f))}const h=c.models||[];console.log(` === Model Conflict Detection ===`);for(const f of a.models){const p=h.find(g=>g.name===f.name);p&&(console.log(`Model conflict: ${f.name}`),d.conflicting_models.push({pack_model:f.name,local_model:p.name}))}return console.log(` === Detection Summary ===`),console.log(`Existing providers: ${d.existing_providers.length}`),console.log(`New providers: ${d.new_providers.length}`),console.log(`Conflicting models: ${d.conflicting_models.length}`),console.log(`=========================== -`),d}async function g4(a,l,r,c){const d=await ke("/api/webui/config/model");if(!d.ok)throw new Error("获取当前模型配置失败");const m=await d.json(),h=m.config||m;if(l.apply_providers){const p=l.selected_providers?a.providers.filter(g=>l.selected_providers.includes(g.name)):a.providers;for(const g of p){if(r[g.name])continue;const N=c[g.name];if(!N)throw new Error(`提供商 "${g.name}" 缺少 API Key`);const j={...g,api_key:N},b=h.api_providers.findIndex(y=>y.name===g.name);b>=0?h.api_providers[b]=j:h.api_providers.push(j)}}if(l.apply_models){const p=l.selected_models?a.models.filter(g=>l.selected_models.includes(g.name)):a.models;for(const g of p){const N=r[g.api_provider]||g.api_provider,j={...g,api_provider:N},b=h.models.findIndex(y=>y.name===g.name);b>=0?h.models[b]=j:h.models.push(j)}}if(l.apply_task_config){const p=l.selected_tasks||Object.keys(a.task_config);for(const g of p){const N=a.task_config[g];if(!N)continue;const j=new Set(l.selected_models||a.models.map(w=>w.name)),b=N.model_list.filter(w=>j.has(w));if(b.length===0)continue;const y={...N,model_list:b};if(l.task_mode==="replace")h.model_task_config[g]=y;else{const w=h.model_task_config[g];if(w){const z=[...new Set([...w.model_list,...b])];h.model_task_config[g]={...w,model_list:z}}else h.model_task_config[g]=y}}}if(!(await ke("/api/webui/config/model",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)})).ok)throw new Error("保存配置失败")}async function j4(a){const l=await ke("/api/webui/config/model");if(!l.ok)throw new Error("获取当前模型配置失败");const r=await l.json();if(!r.success||!r.config)throw new Error("获取配置失败");const c=r.config;let d=(c.api_providers||[]).map(g=>({name:g.name,base_url:g.base_url,client_type:g.client_type,max_retry:g.max_retry,timeout:g.timeout,retry_interval:g.retry_interval}));a.selectedProviders&&(d=d.filter(g=>a.selectedProviders.includes(g.name)));let m=c.models||[];a.selectedModels&&(m=m.filter(g=>a.selectedModels.includes(g.name)));const h={},f=c.model_task_config||{},p=a.selectedTasks||Object.keys(f);for(const g of p)f[g]&&(h[g]=f[g]);return{providers:d,models:m,task_config:h}}function Pm(a){try{const l=new URL(a);return`${l.protocol}//${l.host}${l.pathname}`.replace(/\/$/,"").toLowerCase()}catch{return a.toLowerCase().replace(/\/$/,"")}}function cN(){const a="maibot_pack_user_id";let l=localStorage.getItem(a);return l||(l="pack_user_"+Math.random().toString(36).substring(2,15),localStorage.setItem(a,l)),l}const v4={utils:"通用工具",utils_small:"轻量工具",tool_use:"工具调用",replyer:"回复生成",planner:"规划推理",vlm:"视觉模型",voice:"语音处理",embedding:"向量嵌入",lpmm_entity_extract:"实体提取",lpmm_rdf_build:"RDF构建",lpmm_qa:"问答模型"},N4=["官方推荐","性价比","高性能","免费模型","国内可用","海外模型","OpenAI","Claude","Gemini","国产模型","多模态","轻量级"];function b4({trigger:a}){const[l,r]=u.useState(!1),[c,d]=u.useState(1),[m,h]=u.useState(!1),[f,p]=u.useState(!1),[g,N]=u.useState([]),[j,b]=u.useState([]),[y,w]=u.useState({}),[z,M]=u.useState(new Set),[S,F]=u.useState(new Set),[E,C]=u.useState(new Set),[R,H]=u.useState(""),[O,X]=u.useState(""),[L,me]=u.useState(""),[Ne,je]=u.useState([]);u.useEffect(()=>{l&&c===1&&ce()},[l,c]);const ce=async()=>{h(!0);try{const G=await j4({name:"",description:"",author:""});N(G.providers),b(G.models),w(G.task_config),M(new Set(G.providers.map($=>$.name))),F(new Set(G.models.map($=>$.name))),C(new Set(Object.keys(G.task_config)))}catch(G){console.error("加载配置失败:",G),aa({title:"加载当前配置失败",variant:"destructive"})}finally{h(!1)}},ge=G=>{const $=new Set(z),A=new Set(S),K=new Set(E);$.has(G)?($.delete(G),j.filter(se=>se.api_provider===G).forEach(se=>A.delete(se.name)),Object.entries(y).forEach(([se,$e])=>{$e.model_list&&($e.model_list.some(J=>A.has(J))||K.delete(se))})):($.add(G),j.filter(se=>se.api_provider===G).forEach(se=>A.add(se.name)),Object.entries(y).forEach(([se,$e])=>{$e.model_list&&$e.model_list.some(J=>{const Z=j.find(Le=>Le.name===J);return Z&&Z.api_provider===G})&&K.add(se)})),M($),F(A),C(K)},pe=G=>{const $=new Set(S),A=new Set(E);$.has(G)?($.delete(G),Object.entries(y).forEach(([K,Re])=>{Re.model_list&&(Re.model_list.some($e=>$.has($e))||A.delete(K))})):($.add(G),Object.entries(y).forEach(([K,Re])=>{Re.model_list&&Re.model_list.includes(G)&&A.add(K)})),F($),C(A)},D=G=>{const $=new Set(E);$.has(G)?$.delete(G):$.add(G),C($)},Q=G=>{Ne.includes(G)?je(Ne.filter($=>$!==G)):Ne.length<5?je([...Ne,G]):aa({title:"最多选择 5 个标签",variant:"destructive"})},B=()=>{z.size===g.length?M(new Set):M(new Set(g.map(G=>G.name)))},ue=()=>{S.size===j.length?F(new Set):F(new Set(j.map(G=>G.name)))},Y=()=>{const G=Object.keys(y);E.size===G.length?C(new Set):C(new Set(G))},we=async()=>{if(!R.trim()){aa({title:"请输入模板名称",variant:"destructive"});return}if(!O.trim()){aa({title:"请输入模板描述",variant:"destructive"});return}if(!L.trim()){aa({title:"请输入作者名称",variant:"destructive"});return}if(z.size===0&&S.size===0&&E.size===0){aa({title:"请至少选择一项配置",variant:"destructive"});return}p(!0);try{const G=g.filter(K=>z.has(K.name)),$=j.filter(K=>S.has(K.name)),A={};for(const[K,Re]of Object.entries(y))E.has(K)&&(A[K]=Re);await h4({name:R.trim(),description:O.trim(),author:L.trim(),tags:Ne,providers:G,models:$,task_config:A}),aa({title:"模板已提交审核,审核通过后将显示在市场中"}),r(!1),fe()}catch(G){console.error("提交失败:",G),aa({title:G instanceof Error?G.message:"提交失败",variant:"destructive"})}finally{p(!1)}},fe=()=>{d(1),H(""),X(""),me(""),je([]),M(new Set),F(new Set),C(new Set)},Ee=2;return e.jsxs(Qs,{open:l,onOpenChange:r,children:[e.jsx(dd,{asChild:!0,children:a||e.jsxs(_,{variant:"outline",children:[e.jsx(mv,{className:"w-4 h-4 mr-2"}),"分享配置"]})}),e.jsxs(Hs,{className:"max-w-2xl max-h-[85vh] flex flex-col",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(xa,{className:"w-5 h-5"}),"分享配置模板"]}),e.jsxs(at,{children:["步骤 ",c," / ",Ee,":",c===1&&"选择要分享的配置",c===2&&"填写模板信息"]})]}),e.jsx(ts,{className:"h-[calc(85vh-220px)] pr-4",children:m?e.jsxs("div",{className:"py-8 text-center",children:[e.jsx(Fs,{className:"w-8 h-8 mx-auto animate-spin text-primary"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"正在加载当前配置..."})]}):e.jsxs(e.Fragment,{children:[c===1&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"安全提示"}),e.jsxs(ft,{children:["分享的配置将",e.jsx("strong",{children:"不包含"})," API Key,其他用户需要自行配置。"]})]}),e.jsxs(Jt,{defaultValue:"providers",className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-3",children:[e.jsxs(Xe,{value:"providers",children:[e.jsx(Hl,{className:"w-4 h-4 mr-2"}),"API 提供商",e.jsxs(Ce,{variant:"secondary",className:"ml-2",children:[z.size,"/",g.length]})]}),e.jsxs(Xe,{value:"models",children:[e.jsx(Wn,{className:"w-4 h-4 mr-2"}),"模型配置",e.jsxs(Ce,{variant:"secondary",className:"ml-2",children:[S.size,"/",j.length]})]}),e.jsxs(Xe,{value:"tasks",children:[e.jsx(er,{className:"w-4 h-4 mr-2"}),"任务配置",e.jsxs(Ce,{variant:"secondary",className:"ml-2",children:[E.size,"/",Object.keys(y).length]})]})]}),e.jsx(Ss,{value:"providers",className:"space-y-2 mt-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(_,{variant:"ghost",size:"sm",onClick:B,children:z.size===g.length?"取消全选":"全选"})}),g.length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"暂无提供商配置"}):g.map(G=>e.jsxs("div",{className:"flex items-center space-x-2 p-2 rounded hover:bg-muted",children:[e.jsx(tt,{id:`provider-${G.name}`,checked:z.has(G.name),onCheckedChange:()=>ge(G.name)}),e.jsxs(T,{htmlFor:`provider-${G.name}`,className:"flex-1 cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:G.name}),e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:G.base_url})]}),e.jsx(Ce,{variant:"outline",className:"text-xs",children:G.client_type})]},G.name))]})}),e.jsx(Ss,{value:"models",className:"space-y-2 mt-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(_,{variant:"ghost",size:"sm",onClick:ue,children:S.size===j.length?"取消全选":"全选"})}),j.length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"暂无模型配置"}):j.map(G=>e.jsxs("div",{className:"flex items-center space-x-2 p-2 rounded hover:bg-muted",children:[e.jsx(tt,{id:`model-${G.name}`,checked:S.has(G.name),onCheckedChange:()=>pe(G.name)}),e.jsxs(T,{htmlFor:`model-${G.name}`,className:"flex-1 cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:G.name}),e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:G.model_identifier})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:G.api_provider})]},G.name))]})}),e.jsx(Ss,{value:"tasks",className:"space-y-2 mt-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(_,{variant:"ghost",size:"sm",onClick:Y,children:E.size===Object.keys(y).length?"取消全选":"全选"})}),Object.keys(y).length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"暂无任务配置"}):Object.entries(y).map(([G,$])=>e.jsxs("div",{className:"space-y-2 p-2 rounded hover:bg-muted",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:`task-${G}`,checked:E.has(G),onCheckedChange:()=>D(G)}),e.jsx(T,{htmlFor:`task-${G}`,className:"flex-1 cursor-pointer",children:e.jsx("span",{className:"font-medium",children:v4[G]||G})}),e.jsxs(Ce,{variant:"outline",className:"text-xs",children:[$.model_list.length," 个模型"]})]}),$.model_list&&$.model_list.length>0&&e.jsx("div",{className:"ml-6 flex flex-wrap gap-1",children:$.model_list.map(A=>{const K=j.find(se=>se.name===A),Re=S.has(A);return e.jsxs(Ce,{variant:Re?"default":"outline",className:"text-xs cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>pe(A),children:[A,K&&e.jsxs("span",{className:"ml-1 opacity-70",children:["(",K.api_provider,")"]})]},A)})})]},G))]})})]})]}),c===2&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-4 text-sm p-3 bg-muted rounded-lg",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Hl,{className:"w-4 h-4"}),z.size," 个提供商"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Wn,{className:"w-4 h-4"}),S.size," 个模型"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(er,{className:"w-4 h-4"}),E.size," 个任务"]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"pack-name",children:"模板名称 *"}),e.jsx(ne,{id:"pack-name",placeholder:"例如:高性价比国产模型配置",value:R,onChange:G=>H(G.target.value),maxLength:50}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[R.length,"/50"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"pack-description",children:"模板描述 *"}),e.jsx(pt,{id:"pack-description",placeholder:"详细描述这个配置模板的特点、适用场景等...",value:O,onChange:G=>X(G.target.value),rows:4,maxLength:500}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[O.length,"/500"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"pack-author",children:"作者名称 *"}),e.jsx(ne,{id:"pack-author",placeholder:"你的昵称或 ID",value:L,onChange:G=>me(G.target.value),maxLength:30})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"标签(可选,最多 5 个)"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:N4.map(G=>e.jsxs(Ce,{variant:Ne.includes(G)?"default":"outline",className:"cursor-pointer transition-colors",onClick:()=>Q(G),children:[Ne.includes(G)&&e.jsx(Ot,{className:"w-3 h-3 mr-1"}),e.jsx(cd,{className:"w-3 h-3 mr-1"}),G]},G))})]})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"审核说明"}),e.jsx(ft,{children:"提交后需要经过审核才能在市场中展示。审核通常在 1-3 个工作日内完成。"})]})]})]})}),e.jsxs(gt,{className:"flex justify-between pt-4 border-t",children:[e.jsx("div",{children:c>1&&e.jsx(_,{variant:"outline",onClick:()=>d(c-1),disabled:f,children:"上一步"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(_,{variant:"outline",onClick:()=>{r(!1),fe()},disabled:f,children:"取消"}),cd(c+1),disabled:m||z.size===0&&S.size===0&&E.size===0,children:"下一步"}):e.jsxs(_,{onClick:we,disabled:f,children:[f&&e.jsx(Fs,{className:"w-4 h-4 mr-2 animate-spin"}),"提交审核"]})]})]})]})]})}function y4({value:a,label:l,onRemove:r}){const{attributes:c,listeners:d,setNodeRef:m,transform:h,transition:f,isDragging:p}=Cv({id:a}),g={transform:Tv.Transform.toString(h),transition:f,opacity:p?.5:1},N=b=>{b.preventDefault(),b.stopPropagation(),r(a)},j=b=>{b.stopPropagation()};return e.jsx("div",{ref:m,style:g,className:P("inline-flex items-center gap-1",p&&"shadow-lg"),children:e.jsxs(Ce,{variant:"secondary",className:"cursor-move hover:bg-secondary/80 flex items-center gap-1",children:[e.jsx("div",{...c,...d,className:"cursor-grab active:cursor-grabbing flex items-center",children:e.jsx(dv,{className:"h-3 w-3 text-muted-foreground"})}),e.jsx("span",{children:l}),e.jsx("span",{role:"button",tabIndex:0,className:"ml-1 rounded-sm hover:bg-destructive/20 focus:outline-none focus:ring-1 focus:ring-destructive cursor-pointer",onClick:N,onPointerDown:j,onMouseDown:b=>b.stopPropagation(),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),N(b))},children:e.jsx(Sa,{className:"h-3 w-3 hover:text-destructive",strokeWidth:2,fill:"none"})})]})})}function w4({options:a,selected:l,onChange:r,placeholder:c="选择选项...",emptyText:d="未找到选项",className:m}){const[h,f]=u.useState(!1),p=vv(Qo(yv,{activationConstraint:{distance:8}}),Qo(bv,{coordinateGetter:Nv})),g=b=>{l.includes(b)?r(l.filter(y=>y!==b)):r([...l,b])},N=b=>{r(l.filter(y=>y!==b))},j=b=>{const{active:y,over:w}=b;if(w&&y.id!==w.id){const z=l.indexOf(y.id),M=l.indexOf(w.id);r(wv(l,z,M))}};return e.jsxs(cl,{open:h,onOpenChange:f,children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",role:"combobox","aria-expanded":h,className:P("w-full justify-between min-h-10 h-auto",m),children:[e.jsx(_v,{sensors:p,collisionDetection:Sv,onDragEnd:j,children:e.jsx(kv,{items:l,strategy:p_,children:e.jsx("div",{className:"flex gap-1 flex-wrap flex-1",children:l.length===0?e.jsx("span",{className:"text-muted-foreground",children:c}):l.map(b=>{const y=a.find(w=>w.value===b);return e.jsx(y4,{value:b,label:y?.label||b,onRemove:N},b)})})})}),e.jsx(mx,{className:"ml-2 h-4 w-4 shrink-0 opacity-50",strokeWidth:2,fill:"none"})]})}),e.jsx(tl,{className:"w-full p-0",align:"start",children:e.jsxs(md,{children:[e.jsx(xd,{placeholder:"搜索...",className:"h-9"}),e.jsxs(hd,{children:[e.jsx(fd,{children:d}),e.jsx(uc,{children:a.map(b=>{const y=l.includes(b.value);return e.jsxs(mc,{value:b.value,onSelect:()=>g(b.value),children:[e.jsx("div",{className:P("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",y?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ot,{className:"h-3 w-3",strokeWidth:2,fill:"none"})}),e.jsx("span",{children:b.label})]},b.value)})})]})]})})]})}const Ul=Bs.memo(function({title:l,description:r,taskConfig:c,modelNames:d,onChange:m,hideTemperature:h=!1,hideMaxTokens:f=!1,dataTour:p}){const g=N=>{m("model_list",N)};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-base sm:text-lg",children:l}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mt-1",children:r})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2","data-tour":p,children:[e.jsx(T,{children:"模型列表"}),e.jsx(w4,{options:d.map(N=>({label:N,value:N})),selected:c.model_list||[],onChange:g,placeholder:"选择模型...",emptyText:"暂无可用模型"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[!h&&e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"温度"}),e.jsx(ne,{type:"number",step:"0.1",min:"0",max:"1",value:c.temperature??.3,onChange:N=>{const j=parseFloat(N.target.value);!isNaN(j)&&j>=0&&j<=1&&m("temperature",j)},className:"w-20 h-8 text-sm"})]}),e.jsx(el,{value:[c.temperature??.3],onValueChange:N=>m("temperature",N[0]),min:0,max:1,step:.1,className:"w-full"})]}),!f&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"最大 Token"}),e.jsx(ne,{type:"number",step:"1",min:"1",value:c.max_tokens??1024,onChange:N=>m("max_tokens",parseInt(N.target.value))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"慢请求阈值 (秒)"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"超时警告"})]}),e.jsx(ne,{type:"number",step:"1",min:"1",value:c.slow_threshold??15,onChange:N=>{const j=parseInt(N.target.value);!isNaN(j)&&j>=1&&m("slow_threshold",j)},placeholder:"15"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"模型响应时间超过此阈值将输出警告日志"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"模型选择策略"}),e.jsxs(Pe,{value:c.selection_strategy??"balance",onValueChange:N=>m("selection_strategy",N),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择模型选择策略"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"balance",children:"负载均衡(balance)"}),e.jsx(W,{value:"random",children:"随机选择(random)"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"负载均衡:优先选择使用次数少的模型。随机选择:完全随机从模型列表中选择"})]})]})]})}),_4=Bs.memo(function({paginatedModels:l,allModels:r,onEdit:c,onDelete:d,isModelUsed:m,searchQuery:h}){return l.length===0?e.jsx("div",{className:"md:hidden text-center text-muted-foreground py-8 rounded-lg border bg-card",children:h?"未找到匹配的模型":"暂无模型配置"}):e.jsx("div",{className:"md:hidden space-y-3",children:l.map((f,p)=>{const g=r.findIndex(j=>j===f),N=m(f.name);return e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{className:"font-semibold text-base",children:f.name}),e.jsx(Ce,{variant:N?"default":"secondary",className:N?"bg-green-600 hover:bg-green-700":"",children:N?"已使用":"未使用"})]}),e.jsx("p",{className:"text-xs text-muted-foreground break-all",title:f.model_identifier,children:f.model_identifier})]}),e.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>c(f,g),children:[e.jsx(Zn,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"编辑"]}),e.jsxs(_,{size:"sm",onClick:()=>d(g),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"删除"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"提供商"}),e.jsx("p",{className:"font-medium",children:f.api_provider})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"模型温度"}),e.jsx("p",{className:"font-medium",children:f.temperature!=null?f.temperature:e.jsx("span",{className:"text-muted-foreground",children:"默认"})})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"输入价格"}),e.jsxs("p",{className:"font-medium",children:["¥",f.price_in,"/M"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"输出价格"}),e.jsxs("p",{className:"font-medium",children:["¥",f.price_out,"/M"]})]})]})]},p)})})}),S4=Bs.memo(function({paginatedModels:l,allModels:r,filteredModels:c,selectedModels:d,onEdit:m,onDelete:h,onToggleSelection:f,onToggleSelectAll:p,isModelUsed:g,searchQuery:N}){return e.jsx("div",{className:"hidden md:block rounded-lg border bg-card overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:d.size===c.length&&c.length>0,onCheckedChange:p})}),e.jsx(ns,{className:"w-24",children:"使用状态"}),e.jsx(ns,{children:"模型名称"}),e.jsx(ns,{children:"模型标识符"}),e.jsx(ns,{children:"提供商"}),e.jsx(ns,{className:"text-center",children:"温度"}),e.jsx(ns,{className:"text-right",children:"输入价格"}),e.jsx(ns,{className:"text-right",children:"输出价格"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:l.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:9,className:"text-center text-muted-foreground py-8",children:N?"未找到匹配的模型":"暂无模型配置"})}):l.map((j,b)=>{const y=r.findIndex(z=>z===j),w=g(j.name);return e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:d.has(y),onCheckedChange:()=>f(y)})}),e.jsx(Ze,{children:e.jsx(Ce,{variant:w?"default":"secondary",className:w?"bg-green-600 hover:bg-green-700":"",children:w?"已使用":"未使用"})}),e.jsx(Ze,{className:"font-medium",children:j.name}),e.jsx(Ze,{className:"max-w-xs truncate",title:j.model_identifier,children:j.model_identifier}),e.jsx(Ze,{children:j.api_provider}),e.jsx(Ze,{className:"text-center",children:j.temperature!=null?j.temperature:e.jsx("span",{className:"text-muted-foreground",children:"-"})}),e.jsxs(Ze,{className:"text-right",children:["¥",j.price_in,"/M"]}),e.jsxs(Ze,{className:"text-right",children:["¥",j.price_out,"/M"]}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>m(j,y),children:[e.jsx(Zn,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"编辑"]}),e.jsxs(_,{size:"sm",onClick:()=>h(y),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"删除"]})]})})]},b)})})]})})})}),k4=300*1e3,Zg=new Map,C4=[10,20,50,100],T4=Bs.memo(function({page:l,pageSize:r,totalItems:c,jumpToPage:d,onPageChange:m,onPageSizeChange:h,onJumpToPageChange:f,onJumpToPage:p,onSelectionClear:g}){const N=Math.ceil(c/r),j=y=>{h(parseInt(y)),m(1),g?.()},b=y=>{y.key==="Enter"&&p()};return c===0?null:e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"page-size-model",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:r.toString(),onValueChange:j,children:[e.jsx(Be,{id:"page-size-model",className:"w-20",children:e.jsx(Fe,{})}),e.jsx(Ie,{children:C4.map(y=>e.jsx(W,{value:y.toString(),children:y},y))})]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["显示 ",(l-1)*r+1," 到"," ",Math.min(l*r,c)," 条,共 ",c," 条"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>m(1),disabled:l===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>m(Math.max(1,l-1)),disabled:l===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{type:"number",value:d,onChange:y=>f(y.target.value),onKeyDown:b,placeholder:l.toString(),className:"w-16 h-8 text-center",min:1,max:N}),e.jsx(_,{variant:"outline",size:"sm",onClick:p,disabled:!d,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>m(l+1),disabled:l>=N,children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>m(N),disabled:l>=N,className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})});function E4(a){const{models:l,taskConfig:r,debounceMs:c=2e3,onSavingChange:d,onUnsavedChange:m}=a,h=u.useRef(null),f=u.useRef(null),p=u.useRef(!0),g=u.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),N=u.useCallback(y=>{const w={model_identifier:y.model_identifier,name:y.name,api_provider:y.api_provider,price_in:y.price_in??0,price_out:y.price_out??0,force_stream_mode:y.force_stream_mode??!1,extra_params:y.extra_params??{}};return y.temperature!=null&&(w.temperature=y.temperature),y.max_tokens!=null&&(w.max_tokens=y.max_tokens),w},[]),j=u.useCallback(async y=>{try{d?.(!0);const w=y.map(N);await Wm("models",w),m?.(!1)}catch(w){console.error("自动保存模型列表失败:",w),m?.(!0)}finally{d?.(!1)}},[d,m,N]),b=u.useCallback(async y=>{try{d?.(!0),await Wm("model_task_config",y),m?.(!1)}catch(w){console.error("自动保存任务配置失败:",w),m?.(!0)}finally{d?.(!1)}},[d,m]);return u.useEffect(()=>{if(!p.current)return m?.(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{j(l)},c),()=>{h.current&&clearTimeout(h.current)}},[l,j,c,m]),u.useEffect(()=>{if(!(p.current||!r))return m?.(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{b(r)},c),()=>{f.current&&clearTimeout(f.current)}},[r,b,c,m]),u.useEffect(()=>()=>{g()},[g]),{clearTimers:g,initialLoadRef:p}}function M4(a={}){const{onCloseEditDialog:l}=a,r=ha(),{registerTour:c,startTour:d,state:m,goToStep:h}=Ex(),f=u.useRef(m.stepIndex);return u.useEffect(()=>{c(gl,aN)},[c]),u.useEffect(()=>{if(m.activeTourId===gl&&m.isRunning){const g=lN[m.stepIndex];g&&!window.location.pathname.endsWith(g.replace("/config/",""))&&r({to:g})}},[m.stepIndex,m.activeTourId,m.isRunning,r]),u.useEffect(()=>{if(m.activeTourId===gl&&m.isRunning){const g=f.current,N=m.stepIndex;g>=12&&g<=17&&N<12&&l?.(),f.current=N}},[m.stepIndex,m.activeTourId,m.isRunning,l]),u.useEffect(()=>{if(m.activeTourId!==gl||!m.isRunning)return;const g=N=>{const j=N.target,b=m.stepIndex;b===2&&j.closest('[data-tour="add-provider-button"]')?setTimeout(()=>h(3),300):b===9&&j.closest('[data-tour="provider-cancel-button"]')?setTimeout(()=>h(10),300):b===11&&j.closest('[data-tour="add-model-button"]')?setTimeout(()=>h(12),300):b===17&&j.closest('[data-tour="model-cancel-button"]')?setTimeout(()=>h(18),300):b===18&&j.closest('[data-tour="tasks-tab-trigger"]')&&setTimeout(()=>h(19),300)};return document.addEventListener("click",g,!0),()=>document.removeEventListener("click",g,!0)},[m,h]),{startTour:u.useCallback(()=>{d(gl)},[d]),isRunning:m.isRunning&&m.activeTourId===gl,stepIndex:m.stepIndex}}function A4(a){const{getProviderConfig:l}=a,[r,c]=u.useState([]),[d,m]=u.useState(!1),[h,f]=u.useState(null),[p,g]=u.useState(null),N=u.useCallback(()=>{c([]),f(null),g(null)},[]),j=u.useCallback(async(b,y=!1)=>{const w=l(b);if(!w?.base_url){c([]),g(null),f('提供商配置不完整,请先在"模型提供商配置"中配置');return}if(!w.api_key){c([]),g(null),f('该提供商未配置 API Key,请先在"模型提供商配置"中填写');return}const z=n4(w.base_url);if(g(z),!z?.modelFetcher){c([]),f(null);return}const M=`${b}:${w.base_url}`,S=Zg.get(M);if(!y&&S&&Date.now()-S.timestampE(!1)}),{clearTimers:V,initialLoadRef:Ke}=E4({models:a,taskConfig:p,onSavingChange:z,onUnsavedChange:S}),He=u.useCallback((ae,oe)=>{if(!ae)return;const qe=new Set(oe.map(Ca=>Ca.name)),Ys=[],Ps=[],vt=[{key:"utils",label:"工具模型"},{key:"tool_use",label:"工具调用模型"},{key:"replyer",label:"回复模型"},{key:"planner",label:"规划器模型"},{key:"vlm",label:"视觉模型"},{key:"voice",label:"语音模型"},{key:"embedding",label:"嵌入模型"},{key:"lpmm_entity_extract",label:"LPMM实体抽取"},{key:"lpmm_rdf_build",label:"LPMM关系构建"}];for(const{key:Ca,label:ll}of vt){const ml=ae[Ca];if(!ml)continue;if(!ml.model_list||ml.model_list.length===0){Ps.push(ll);continue}const rr=ml.model_list.filter(Ql=>!qe.has(Ql));rr.length>0&&Ys.push({taskName:ll,invalidModels:rr})}le(Ys),xe(Ps)},[]),Je=u.useCallback(async()=>{try{j(!0);const ae=await Nn(),oe=ae.models||[];l(oe),f(oe.map(vt=>vt.name));const qe=ae.api_providers||[];c(qe.map(vt=>vt.name)),m(qe);const Ys=ae.model_task_config||null;g(Ys),He(Ys,oe);const Ps=Ys?.embedding?.model_list||[];J.current=[...Ps],S(!1),Ke.current=!1}catch(ae){console.error("加载配置失败:",ae)}finally{j(!1)}},[Ke,He]);u.useEffect(()=>{Je()},[Je]);const Es=u.useCallback(ae=>d.find(oe=>oe.name===ae),[d]),{availableModels:ms,fetchingModels:Ms,modelFetchError:We,matchedTemplate:Cs,fetchModelsForProvider:rs,clearModels:is}=A4({getProviderConfig:Es});u.useEffect(()=>{F&&C?.api_provider&&rs(C.api_provider)},[F,C?.api_provider,rs]);const ys=async()=>{await Ct()},rt=u.useCallback(()=>{if(!p)return;const ae=new Set(a.map(Ys=>Ys.name)),oe={...p},qe=Object.keys(oe);for(const Ys of qe){const Ps=oe[Ys];Ps&&Ps.model_list&&(Ps.model_list=Ps.model_list.filter(vt=>ae.has(vt)))}g(oe),le([]),Ts({title:"清理完成",description:"已删除所有无效的模型引用"})},[p,a,Ts]),jt=ae=>{const oe={model_identifier:ae.model_identifier,name:ae.name,api_provider:ae.api_provider,price_in:ae.price_in??0,price_out:ae.price_out??0,force_stream_mode:ae.force_stream_mode??!1,extra_params:ae.extra_params??{}};return ae.temperature!=null&&(oe.temperature=ae.temperature),ae.max_tokens!=null&&(oe.max_tokens=ae.max_tokens),oe},Ae=async()=>{try{y(!0),V();const ae=await Nn();ae.models=a.map(jt),ae.model_task_config=p,await lc(ae),S(!1),Ts({title:"保存成功",description:"正在重启麦麦..."}),await ys()}catch(ae){console.error("保存配置失败:",ae),Ts({title:"保存失败",description:ae.message,variant:"destructive"}),y(!1)}},Qe=async()=>{try{y(!0),V();const ae=await Nn();ae.models=a.map(jt),ae.model_task_config=p,await lc(ae),S(!1),Ts({title:"保存成功",description:"模型配置已保存"}),await Je()}catch(ae){console.error("保存配置失败:",ae),Ts({title:"保存失败",description:ae.message,variant:"destructive"})}finally{y(!1)}},As=(ae,oe)=>{ds({}),R(ae||{model_identifier:"",name:"",api_provider:r[0]||"",price_in:0,price_out:0,temperature:null,max_tokens:null,force_stream_mode:!1,extra_params:{}}),O(oe),E(!0)},mt=()=>{if(!C)return;const ae={};if(C.name?.trim()?a.some((vt,Ca)=>H!==null&&Ca===H?!1:vt.name.trim().toLowerCase()===C.name.trim().toLowerCase())&&(ae.name="模型名称已存在,请使用其他名称"):ae.name="请输入模型名称",C.api_provider?.trim()||(ae.api_provider="请选择 API 提供商"),C.model_identifier?.trim()||(ae.model_identifier="请输入模型标识符"),Object.keys(ae).length>0){ds(ae);return}ds({});const oe={model_identifier:C.model_identifier,name:C.name,api_provider:C.api_provider,price_in:C.price_in??0,price_out:C.price_out??0,force_stream_mode:C.force_stream_mode??!1,extra_params:C.extra_params??{}};C.temperature!=null&&(oe.temperature=C.temperature),C.max_tokens!=null&&(oe.max_tokens=C.max_tokens);let qe,Ys=null;if(H!==null?(Ys=a[H].name,qe=[...a],qe[H]=oe):qe=[...a,oe],l(qe),f(qe.map(Ps=>Ps.name)),Ys&&Ys!==oe.name&&p){const Ps=vt=>vt.map(Ca=>Ca===Ys?oe.name:Ca);g({...p,utils:{...p.utils,model_list:Ps(p.utils?.model_list||[])},tool_use:{...p.tool_use,model_list:Ps(p.tool_use?.model_list||[])},replyer:{...p.replyer,model_list:Ps(p.replyer?.model_list||[])},planner:{...p.planner,model_list:Ps(p.planner?.model_list||[])},vlm:{...p.vlm,model_list:Ps(p.vlm?.model_list||[])},voice:{...p.voice,model_list:Ps(p.voice?.model_list||[])},embedding:{...p.embedding,model_list:Ps(p.embedding?.model_list||[])},lpmm_entity_extract:{...p.lpmm_entity_extract,model_list:Ps(p.lpmm_entity_extract?.model_list||[])},lpmm_rdf_build:{...p.lpmm_rdf_build,model_list:Ps(p.lpmm_rdf_build?.model_list||[])}})}E(!1),R(null),O(null),Ts({title:H!==null?"模型已更新":"模型已添加",description:'配置将在 2 秒后自动保存,或点击右上角"保存配置"按钮立即保存'})},Ht=ae=>{if(!ae&&C){const oe={...C,price_in:C.price_in??0,price_out:C.price_out??0};R(oe)}E(ae)},ca=ae=>{ce(ae),Ne(!0)},Fa=()=>{if(je!==null){const ae=a.filter((oe,qe)=>qe!==je);l(ae),f(ae.map(oe=>oe.name)),He(p,ae),Ts({title:"删除成功",description:'配置将在 2 秒后自动保存,或点击右上角"保存配置"按钮立即保存'})}Ne(!1),ce(null)},Xt=ae=>{const oe=new Set(D);oe.has(ae)?oe.delete(ae):oe.add(ae),Q(oe)},te=()=>{if(D.size===es.length)Q(new Set);else{const ae=es.map((oe,qe)=>a.findIndex(Ys=>Ys===es[qe]));Q(new Set(ae))}},_e=()=>{if(D.size===0){Ts({title:"提示",description:"请先选择要删除的模型",variant:"default"});return}ue(!0)},U=()=>{const ae=D.size,oe=a.filter((qe,Ys)=>!D.has(Ys));l(oe),f(oe.map(qe=>qe.name)),He(p,oe),Q(new Set),ue(!1),Ts({title:"批量删除成功",description:`已删除 ${ae} 个模型,配置将在 2 秒后自动保存`})},Se=(ae,oe,qe)=>{if(!p)return;if(ae==="embedding"&&oe==="model_list"&&Array.isArray(qe)){const Ps=J.current,vt=qe;if((Ps.length!==vt.length||Ps.some(ll=>!vt.includes(ll))||vt.some(ll=>!Ps.includes(ll)))&&Ps.length>0){Z.current={field:oe,value:qe},cs(!0);return}}const Ys={...p,[ae]:{...p[ae],[oe]:qe}};g(Ys),He(Ys,a),ae==="embedding"&&oe==="model_list"&&Array.isArray(qe)&&(J.current=[...qe])},as=()=>{if(!p||!Z.current)return;const{field:ae,value:oe}=Z.current,qe={...p,embedding:{...p.embedding,[ae]:oe}};g(qe),He(qe,a),ae==="model_list"&&Array.isArray(oe)&&(J.current=[...oe]),Z.current=null,cs(!1),Ts({title:"嵌入模型已更新",description:"建议重新生成知识库向量以确保最佳匹配精度"})},us=()=>{Z.current=null,cs(!1)},es=a.filter(ae=>{if(!ge)return!0;const oe=ge.toLowerCase();return ae.name.toLowerCase().includes(oe)||ae.model_identifier.toLowerCase().includes(oe)||ae.api_provider.toLowerCase().includes(oe)}),Tt=Math.ceil(es.length/fe),$s=es.slice((Y-1)*fe,Y*fe),pa=()=>{const ae=parseInt(G);ae>=1&&ae<=Tt&&(we(ae),$(""))},oa=ae=>p?[p.utils?.model_list||[],p.tool_use?.model_list||[],p.replyer?.model_list||[],p.planner?.model_list||[],p.vlm?.model_list||[],p.voice?.model_list||[],p.embedding?.model_list||[],p.lpmm_entity_extract?.model_list||[],p.lpmm_rdf_build?.model_list||[]].some(qe=>qe.includes(ae)):!1;return N?e.jsx(ts,{className:"h-full",children:e.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})})}):e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"模型管理与分配"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"添加模型并为模型分配功能"})]}),e.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[e.jsx(b4,{trigger:e.jsxs(_,{variant:"outline",size:"sm",className:"flex-1 sm:flex-none",children:[e.jsx(mv,{className:"mr-2 h-4 w-4"}),"分享配置"]})}),e.jsxs(_,{onClick:Qe,disabled:b||w||!M||ia,size:"sm",variant:"outline",className:"flex-1 sm:flex-none sm:min-w-[120px]",children:[e.jsx(gc,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),b?"保存中...":w?"自动保存中...":M?"保存配置":"已保存"]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{disabled:b||w||ia,size:"sm",className:"flex-1 sm:flex-none sm:min-w-[120px]",children:[e.jsx(pc,{className:"mr-2 h-4 w-4"}),ia?"重启中...":M?"保存并重启":"重启麦麦"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重启麦麦?"}),e.jsx(gs,{asChild:!0,children:e.jsx("div",{children:e.jsx("p",{children:M?"当前有未保存的配置更改。点击确认将先保存配置,然后重启麦麦使新配置生效。重启过程中麦麦将暂时离线。":"即将重启麦麦主程序。重启过程中麦麦将暂时离线,配置将在重启后生效。"})})})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:M?Ae:ys,children:M?"保存并重启":"确认重启"})]})]})]})]})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:["配置更新后需要",e.jsx("strong",{children:"重启麦麦"}),'才能生效。你可以点击右上角的"保存并重启"按钮一键完成保存和重启。']})]}),Le.length>0&&e.jsxs(ht,{variant:"destructive",children:[e.jsx(Lt,{className:"h-4 w-4"}),e.jsxs(ft,{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("strong",{children:"检测到无效的模型引用"}),e.jsx("div",{className:"mt-2 space-y-1",children:Le.map(({taskName:ae,invalidModels:oe})=>e.jsxs("div",{className:"text-sm",children:[e.jsx("strong",{children:ae})," 引用了不存在的模型: ",oe.join(", ")]},ae))})]}),e.jsx(_,{variant:"outline",size:"sm",className:"shrink-0 bg-background hover:bg-accent",onClick:rt,children:"一键清理"})]})]}),De.length>0&&e.jsxs(ht,{variant:"default",className:"border-yellow-500/50 bg-yellow-500/10",children:[e.jsx(Lt,{className:"h-4 w-4 text-yellow-600"}),e.jsxs(ft,{children:[e.jsx("strong",{className:"text-yellow-600",children:"以下任务未配置模型"}),e.jsxs("div",{className:"mt-2 text-sm",children:[De.join("、")," 还未分配模型,这些功能将无法正常工作。"]})]})]}),e.jsxs(ht,{className:"hidden lg:flex border-primary/30 bg-primary/5 cursor-pointer hover:bg-primary/10 transition-colors",onClick:ut,children:[e.jsx(U1,{className:"h-4 w-4 text-primary"}),e.jsxs(ft,{className:"flex items-center justify-between",children:[e.jsxs("span",{children:[e.jsx("strong",{className:"text-primary",children:"新手引导:"}),"不知道如何配置模型?点击这里开始学习如何为麦麦的组件分配模型。"]}),e.jsx(_,{variant:"outline",size:"sm",className:"ml-4 shrink-0",children:"开始引导"})]})]}),e.jsxs(Jt,{defaultValue:"models",className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full max-w-full sm:max-w-md grid-cols-2",children:[e.jsx(Xe,{value:"models",children:"添加模型"}),e.jsx(Xe,{value:"tasks","data-tour":"tasks-tab-trigger",children:"为模型分配功能"})]}),e.jsxs(Ss,{value:"models",className:"space-y-4 mt-0",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-2",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置可用的模型列表"}),e.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[D.size>0&&e.jsxs(_,{onClick:_e,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[e.jsx(os,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"批量删除 (",D.size,")"]}),e.jsxs(_,{onClick:()=>As(null,null),size:"sm",variant:"outline",className:"w-full sm:w-auto","data-tour":"add-model-button",children:[e.jsx(Xs,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"添加模型"]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2",children:[e.jsxs("div",{className:"relative w-full sm:flex-1 sm:max-w-sm",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{placeholder:"搜索模型名称、标识符或提供商...",value:ge,onChange:ae=>pe(ae.target.value),className:"pl-9"})]}),ge&&e.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["找到 ",es.length," 个结果"]})]}),e.jsx(_4,{paginatedModels:$s,allModels:a,onEdit:As,onDelete:ca,isModelUsed:oa,searchQuery:ge}),e.jsx(S4,{paginatedModels:$s,allModels:a,filteredModels:es,selectedModels:D,onEdit:As,onDelete:ca,onToggleSelection:Xt,onToggleSelectAll:te,isModelUsed:oa,searchQuery:ge}),e.jsx(T4,{page:Y,pageSize:fe,totalItems:es.length,jumpToPage:G,onPageChange:we,onPageSizeChange:Ee,onJumpToPageChange:$,onJumpToPage:pa,onSelectionClear:()=>Q(new Set)})]}),e.jsxs(Ss,{value:"tasks",className:"space-y-6 mt-0",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"为不同的任务配置使用的模型和参数"}),p&&e.jsxs("div",{className:"grid gap-4 sm:gap-6",children:[e.jsx(Ul,{title:"组件模型 (utils)",description:"用于表情包、取名、关系、情绪变化等组件",taskConfig:p.utils,modelNames:h,onChange:(ae,oe)=>Se("utils",ae,oe),dataTour:"task-model-select"}),e.jsx(Ul,{title:"工具调用模型 (tool_use)",description:"需要使用支持工具调用的模型",taskConfig:p.tool_use,modelNames:h,onChange:(ae,oe)=>Se("tool_use",ae,oe)}),e.jsx(Ul,{title:"首要回复模型 (replyer)",description:"用于表达器和表达方式学习",taskConfig:p.replyer,modelNames:h,onChange:(ae,oe)=>Se("replyer",ae,oe)}),e.jsx(Ul,{title:"决策模型 (planner)",description:"负责决定麦麦该什么时候回复",taskConfig:p.planner,modelNames:h,onChange:(ae,oe)=>Se("planner",ae,oe)}),e.jsx(Ul,{title:"图像识别模型 (vlm)",description:"视觉语言模型",taskConfig:p.vlm,modelNames:h,onChange:(ae,oe)=>Se("vlm",ae,oe),hideTemperature:!0}),e.jsx(Ul,{title:"语音识别模型 (voice)",description:"语音转文字",taskConfig:p.voice,modelNames:h,onChange:(ae,oe)=>Se("voice",ae,oe),hideTemperature:!0,hideMaxTokens:!0}),e.jsx(Ul,{title:"嵌入模型 (embedding)",description:"用于向量化",taskConfig:p.embedding,modelNames:h,onChange:(ae,oe)=>Se("embedding",ae,oe),hideTemperature:!0,hideMaxTokens:!0}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"LPMM 知识库模型"}),e.jsx(Ul,{title:"实体提取模型 (lpmm_entity_extract)",description:"从文本中提取实体",taskConfig:p.lpmm_entity_extract,modelNames:h,onChange:(ae,oe)=>Se("lpmm_entity_extract",ae,oe)}),e.jsx(Ul,{title:"RDF 构建模型 (lpmm_rdf_build)",description:"构建知识图谱",taskConfig:p.lpmm_rdf_build,modelNames:h,onChange:(ae,oe)=>Se("lpmm_rdf_build",ae,oe)})]})]})]})]}),e.jsx(Qs,{open:F,onOpenChange:Ht,children:e.jsxs(Hs,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh] overflow-y-auto","data-tour":"model-dialog",preventOutsideClose:Is,children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:H!==null?"编辑模型":"添加模型"}),e.jsx(at,{children:"配置模型的基本信息和参数"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2","data-tour":"model-name-input",children:[e.jsx(T,{htmlFor:"model_name",className:Me.name?"text-destructive":"",children:"模型名称 *"}),e.jsx(ne,{id:"model_name",value:C?.name||"",onChange:ae=>{R(oe=>oe?{...oe,name:ae.target.value}:null),Me.name&&ds(oe=>({...oe,name:void 0}))},placeholder:"例如: qwen3-30b",className:Me.name?"border-destructive focus-visible:ring-destructive":""}),Me.name?e.jsx("p",{className:"text-xs text-destructive",children:Me.name}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"用于在任务配置中引用此模型"})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"model-provider-select",children:[e.jsx(T,{htmlFor:"api_provider",className:Me.api_provider?"text-destructive":"",children:"API 提供商 *"}),e.jsxs(Pe,{value:C?.api_provider||"",onValueChange:ae=>{R(oe=>oe?{...oe,api_provider:ae}:null),is(),Me.api_provider&&ds(oe=>({...oe,api_provider:void 0}))},children:[e.jsx(Be,{id:"api_provider",className:Me.api_provider?"border-destructive focus-visible:ring-destructive":"",children:e.jsx(Fe,{placeholder:"选择提供商"})}),e.jsx(Ie,{children:r.map(ae=>e.jsx(W,{value:ae,children:ae},ae))})]}),Me.api_provider&&e.jsx("p",{className:"text-xs text-destructive",children:Me.api_provider})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"model-identifier-input",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{htmlFor:"model_identifier",className:Me.model_identifier?"text-destructive":"",children:"模型标识符 *"}),Cs?.modelFetcher&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{variant:"secondary",className:"text-xs",children:Cs.display_name}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-6 px-2",onClick:()=>C?.api_provider&&rs(C.api_provider,!0),disabled:Ms,children:Ms?e.jsx(Fs,{className:"h-3 w-3 animate-spin"}):e.jsx(dt,{className:"h-3 w-3"})})]})]}),Cs?.modelFetcher?e.jsxs(cl,{open:Re,onOpenChange:se,children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",role:"combobox","aria-expanded":Re,className:"w-full justify-between font-normal",disabled:Ms||!!We,children:[Ms?e.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(Fs,{className:"h-4 w-4 animate-spin"}),"正在获取模型列表..."]}):We?e.jsx("span",{className:"text-muted-foreground text-sm",children:"点击下方输入框手动填写"}):C?.model_identifier?e.jsx("span",{className:"truncate",children:C.model_identifier}):e.jsx("span",{className:"text-muted-foreground",children:"搜索或选择模型..."}),e.jsx(mx,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(tl,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:e.jsxs(md,{children:[e.jsx(xd,{placeholder:"搜索模型..."}),e.jsx(ts,{className:"h-[300px]",children:e.jsxs(hd,{className:"max-h-none overflow-visible",children:[e.jsx(fd,{children:We?e.jsxs("div",{className:"py-4 px-2 text-center space-y-2",children:[e.jsx("p",{className:"text-sm text-destructive",children:We}),!We.includes("API Key")&&e.jsx(_,{variant:"link",size:"sm",onClick:()=>C?.api_provider&&rs(C.api_provider,!0),children:"重试"})]}):"未找到匹配的模型"}),e.jsx(uc,{heading:"可用模型",children:ms.map(ae=>e.jsxs(mc,{value:ae.id,onSelect:()=>{R(oe=>oe?{...oe,model_identifier:ae.id}:null),se(!1)},children:[e.jsx(Ot,{className:`mr-2 h-4 w-4 ${C?.model_identifier===ae.id?"opacity-100":"opacity-0"}`}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{children:ae.id}),ae.name!==ae.id&&e.jsx("span",{className:"text-xs text-muted-foreground",children:ae.name})]})]},ae.id))}),e.jsx(uc,{heading:"手动输入",children:e.jsxs(mc,{value:"__manual_input__",onSelect:()=>{se(!1)},children:[e.jsx(Zn,{className:"mr-2 h-4 w-4"}),"手动输入模型标识符..."]})})]})})]})})]}):e.jsx(ne,{id:"model_identifier",value:C?.model_identifier||"",onChange:ae=>{R(oe=>oe?{...oe,model_identifier:ae.target.value}:null),Me.model_identifier&&ds(oe=>({...oe,model_identifier:void 0}))},placeholder:"Qwen/Qwen3-30B-A3B-Instruct-2507",className:Me.model_identifier?"border-destructive focus-visible:ring-destructive":""}),Me.model_identifier&&e.jsx("p",{className:"text-xs text-destructive",children:Me.model_identifier}),We&&Cs?.modelFetcher&&!Me.model_identifier&&e.jsxs(ht,{variant:"destructive",className:"mt-2 py-2",children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(ft,{className:"text-xs",children:We})]}),Cs?.modelFetcher&&e.jsx(ne,{value:C?.model_identifier||"",onChange:ae=>{R(oe=>oe?{...oe,model_identifier:ae.target.value}:null),Me.model_identifier&&ds(oe=>({...oe,model_identifier:void 0}))},placeholder:"或手动输入模型标识符",className:`mt-2 ${Me.model_identifier?"border-destructive focus-visible:ring-destructive":""}`}),!Me.model_identifier&&e.jsx("p",{className:"text-xs text-muted-foreground",children:We?'请手动输入模型标识符,或前往"模型提供商配置"检查 API Key':Cs?.modelFetcher?`已识别为 ${Cs.display_name},支持自动获取模型列表`:"API 提供商提供的模型 ID"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"price_in",children:"输入价格 (¥/M token)"}),e.jsx(ne,{id:"price_in",type:"number",step:"0.1",min:"0",value:C?.price_in??"",onChange:ae=>{const oe=ae.target.value===""?null:parseFloat(ae.target.value);R(qe=>qe?{...qe,price_in:oe}:null)},placeholder:"默认: 0"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"price_out",children:"输出价格 (¥/M token)"}),e.jsx(ne,{id:"price_out",type:"number",step:"0.1",min:"0",value:C?.price_out??"",onChange:ae=>{const oe=ae.target.value===""?null:parseFloat(ae.target.value);R(qe=>qe?{...qe,price_out:oe}:null)},placeholder:"默认: 0"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"enable_model_temperature",className:"cursor-pointer",children:"自定义模型温度"}),e.jsx(Bl,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"什么是温度(Temperature)?"}),e.jsx("p",{children:"温度控制模型输出的随机性和创造性:"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"低温度(0.1-0.3)"}),":更确定、更保守的输出,适合事实性任务"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"中温度(0.5-0.7)"}),":平衡创造性与可控性"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"高温度(0.8-1.0)"}),":更有创意、更多样化的输出"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"极高温度(1.0-2.0)"}),":极度随机,可能产生不可预测的结果"]})]})]}),side:"right",maxWidth:"400px"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后将覆盖「为模型分配功能」中的任务温度配置"})]}),e.jsx(Ge,{id:"enable_model_temperature",checked:C?.temperature!=null,onCheckedChange:ae=>{R(ae?oe=>oe?{...oe,temperature:.5}:null:oe=>oe?{...oe,temperature:null}:null)}})]}),C?.temperature!=null&&e.jsxs("div",{className:"space-y-3 pt-2 border-t",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(T,{className:"text-sm",children:"温度值"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{type:"number",value:C.temperature,onChange:ae=>{const oe=parseFloat(ae.target.value);!isNaN(oe)&&oe>=0&&oe<=2&&R(qe=>qe?{...qe,temperature:oe}:null)},onBlur:ae=>{const oe=parseFloat(ae.target.value);isNaN(oe)||oe<0?R(qe=>qe?{...qe,temperature:0}:null):oe>2&&R(qe=>qe?{...qe,temperature:2}:null)},step:.01,min:0,max:2,className:"w-20 h-8 text-sm text-right tabular-nums"}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>K(!A),className:"h-8 px-2",title:A?"切换到基础模式 (0-1)":"解锁高级范围 (0-2)",children:A?e.jsx($1,{className:"h-4 w-4"}):e.jsx(Jm,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:"0"}),e.jsx(el,{value:[C.temperature],onValueChange:ae=>R(oe=>oe?{...oe,temperature:ae[0]}:null),min:0,max:A?2:1,step:A?.05:.1,className:"flex-1"}),e.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:A?"2":"1"})]}),A&&e.jsxs(ht,{className:"bg-amber-500/10 border-amber-500/20 [&>svg+div]:translate-y-0",children:[e.jsx(Lt,{className:"h-4 w-4 text-amber-500"}),e.jsx(ft,{className:"text-xs text-amber-600 dark:text-amber-400",children:"高级模式:温度 > 1 会产生更随机、更不可预测的输出,请谨慎使用"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:A?"较低(0.1-0.5)产生确定输出,中等(0.5-1.0)平衡创造性,较高(1.0-2.0)产生极度随机输出":"较低的温度(0.1-0.3)产生更确定的输出,较高的温度(0.7-1.0)产生更多样化的输出"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"enable_model_max_tokens",className:"cursor-pointer",children:"自定义最大 Token"}),e.jsx(Bl,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"什么是最大 Token?"}),e.jsx("p",{children:"控制模型单次回复的最大长度。1 token ≈ 0.75 个英文单词或 0.5 个中文字符。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"较小值(512-1024)"}),":简短回复,节省成本"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"中等值(2048-4096)"}),":正常对话长度"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"较大值(8192+)"}),":长文本生成,成本较高"]})]})]}),side:"right",maxWidth:"400px"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后将覆盖「为模型分配功能」中的任务最大 Token 配置"})]}),e.jsx(Ge,{id:"enable_model_max_tokens",checked:C?.max_tokens!=null,onCheckedChange:ae=>{R(ae?oe=>oe?{...oe,max_tokens:2048}:null:oe=>oe?{...oe,max_tokens:null}:null)}})]}),C?.max_tokens!=null&&e.jsxs("div",{className:"space-y-2 pt-2 border-t",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm",children:"最大 Token 数"}),e.jsx(ne,{type:"number",min:"1",max:"128000",value:C.max_tokens,onChange:ae=>{const oe=parseInt(ae.target.value);!isNaN(oe)&&oe>=1&&R(qe=>qe?{...qe,max_tokens:oe}:null)},className:"w-28 h-8 text-sm"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"限制模型单次输出的最大 token 数量,不同模型支持的上限不同"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"force_stream_mode",checked:C?.force_stream_mode||!1,onCheckedChange:ae=>R(oe=>oe?{...oe,force_stream_mode:ae}:null)}),e.jsx(T,{htmlFor:"force_stream_mode",className:"cursor-pointer",children:"强制流式输出模式"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"额外参数"}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(_,{type:"button",variant:"outline",size:"sm",className:"flex-1 justify-start h-9",onClick:()=>L(!0),children:[e.jsx(Sn,{className:"h-4 w-4 mr-2"}),Object.keys(C?.extra_params||{}).length>0?e.jsxs("span",{children:["已配置 ",Object.keys(C?.extra_params||{}).length," 个参数"]}):e.jsx("span",{className:"text-muted-foreground",children:"未配置额外参数"})]})}),Object.keys(C?.extra_params||{}).length>0&&e.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:[Object.keys(C?.extra_params||{}).slice(0,3).map(ae=>e.jsx("span",{className:"inline-block mr-2",children:e.jsx("code",{className:"px-1.5 py-0.5 bg-muted rounded",children:ae})},ae)),Object.keys(C?.extra_params||{}).length>3&&e.jsx("span",{children:"..."})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>E(!1),"data-tour":"model-cancel-button",children:"取消"}),e.jsx(_,{onClick:mt,"data-tour":"model-save-button",children:"保存"})]})]})}),e.jsx(bs,{open:me,onOpenChange:Ne,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除模型 "',je!==null?a[je]?.name:"",'" 吗? 此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:Fa,children:"删除"})]})]})}),e.jsx(bs,{open:B,onOpenChange:ue,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["确定要删除选中的 ",D.size," 个模型吗? 此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:U,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})}),e.jsx(bs,{open:$e,onOpenChange:cs,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsxs(ps,{className:"flex items-center gap-2",children:[e.jsx(Lt,{className:"h-5 w-5 text-amber-500"}),"更换嵌入模型警告"]}),e.jsx(gs,{asChild:!0,children:e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-foreground",children:"注意:"}),"更换嵌入模型可能会影响知识库的匹配精度!"]}),e.jsxs("ul",{className:"space-y-2 ml-4 list-disc text-muted-foreground",children:[e.jsx("li",{children:"不同的嵌入模型会产生不同的向量表示"}),e.jsx("li",{children:"这可能导致现有知识库的检索结果不准确"}),e.jsx("li",{children:"建议更换嵌入模型后重新生成所有知识库的向量"})]}),e.jsx("p",{className:"text-foreground font-medium",children:"确定要更换嵌入模型吗?"})]})})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:us,children:"取消"}),e.jsx(js,{onClick:as,className:"bg-amber-600 hover:bg-amber-700",children:"确认更换"})]})]})}),e.jsx(u4,{open:X,onOpenChange:L,value:C?.extra_params||{},onChange:ae=>R(oe=>oe?{...oe,extra_params:ae}:null)}),e.jsx(nr,{})]})})}const xc=Mj,hc=Aw,fc=zw,pd="/api/webui/config";async function D4(){const l=await(await ke(`${pd}/adapter-config/path`)).json();return!l.success||!l.path?null:{path:l.path,lastModified:l.lastModified}}async function Wg(a){const r=await(await ke(`${pd}/adapter-config/path`,{method:"POST",headers:Zs(),body:JSON.stringify({path:a})})).json();if(!r.success)throw new Error(r.message||"保存路径失败")}async function ej(a){const r=await(await ke(`${pd}/adapter-config?path=${encodeURIComponent(a)}`)).json();if(!r.success)throw new Error("读取配置文件失败");return r.content}async function sj(a,l){const c=await(await ke(`${pd}/adapter-config`,{method:"POST",headers:Zs(),body:JSON.stringify({path:a,content:l})})).json();if(!c.success)throw new Error(c.message||"保存配置失败")}const kt={inner:{version:"0.1.2"},nickname:{nickname:""},napcat_server:{host:"localhost",port:8095,token:"",heartbeat_interval:30},maibot_server:{host:"localhost",port:8e3},chat:{group_list_type:"whitelist",group_list:[],private_list_type:"whitelist",private_list:[],ban_user_id:[],ban_qq_bot:!1,enable_poke:!0},voice:{use_tts:!1},forward:{image_threshold:30},debug:{level:"INFO"}},Fm={oneclick:{name:"一键包",description:"使用一键包部署的适配器配置",path:"../MaiBot-Napcat-Adapter/config.toml",icon:xa},docker:{name:"Docker",description:"Docker Compose 部署的适配器配置",path:"/MaiMBot/adapters-config/config.toml",icon:B1}};function Hm(a){try{const l=_x(a);return{inner:{...kt.inner,...l.inner},nickname:{...kt.nickname,...l.nickname},napcat_server:{...kt.napcat_server,...l.napcat_server},maibot_server:{...kt.maibot_server,...l.maibot_server},chat:{...kt.chat,...l.chat},voice:{...kt.voice,...l.voice},forward:{...kt.forward,...l.forward},debug:{...kt.debug,...l.debug}}}catch(l){throw console.error("TOML 解析失败:",l),new Error(`无法解析 TOML 文件: ${l instanceof Error?l.message:"未知错误"}`)}}function qm(a){try{const l=(d,m)=>d===""||d===null||d===void 0?m:d,r={inner:{version:l(a.inner.version,kt.inner.version)},nickname:{nickname:l(a.nickname.nickname,kt.nickname.nickname)},napcat_server:{host:l(a.napcat_server.host,kt.napcat_server.host),port:l(a.napcat_server.port||0,kt.napcat_server.port),token:l(a.napcat_server.token,kt.napcat_server.token),heartbeat_interval:l(a.napcat_server.heartbeat_interval||0,kt.napcat_server.heartbeat_interval)},maibot_server:{host:l(a.maibot_server.host,kt.maibot_server.host),port:l(a.maibot_server.port||0,kt.maibot_server.port)},chat:{group_list_type:l(a.chat.group_list_type,kt.chat.group_list_type),group_list:a.chat.group_list||[],private_list_type:l(a.chat.private_list_type,kt.chat.private_list_type),private_list:a.chat.private_list||[],ban_user_id:a.chat.ban_user_id||[],ban_qq_bot:a.chat.ban_qq_bot??kt.chat.ban_qq_bot,enable_poke:a.chat.enable_poke??kt.chat.enable_poke},voice:{use_tts:a.voice.use_tts??kt.voice.use_tts},forward:{image_threshold:l(a.forward.image_threshold||0,kt.forward.image_threshold)},debug:{level:l(a.debug.level,kt.debug.level)}};let c=GS(r);return c=O4(c),c}catch(l){throw console.error("TOML 生成失败:",l),new Error(`无法生成 TOML 文件: ${l instanceof Error?l.message:"未知错误"}`)}}function O4(a){const l=a.split(` +`),d}async function g4(a,l,r,c){const d=await ke("/api/webui/config/model");if(!d.ok)throw new Error("获取当前模型配置失败");const m=await d.json(),h=m.config||m;if(l.apply_providers){const p=l.selected_providers?a.providers.filter(g=>l.selected_providers.includes(g.name)):a.providers;for(const g of p){if(r[g.name])continue;const N=c[g.name];if(!N)throw new Error(`提供商 "${g.name}" 缺少 API Key`);const j={...g,api_key:N},b=h.api_providers.findIndex(y=>y.name===g.name);b>=0?h.api_providers[b]=j:h.api_providers.push(j)}}if(l.apply_models){const p=l.selected_models?a.models.filter(g=>l.selected_models.includes(g.name)):a.models;for(const g of p){const N=r[g.api_provider]||g.api_provider,j={...g,api_provider:N},b=h.models.findIndex(y=>y.name===g.name);b>=0?h.models[b]=j:h.models.push(j)}}if(l.apply_task_config){const p=l.selected_tasks||Object.keys(a.task_config);for(const g of p){const N=a.task_config[g];if(!N)continue;const j=new Set(l.selected_models||a.models.map(w=>w.name)),b=N.model_list.filter(w=>j.has(w));if(b.length===0)continue;const y={...N,model_list:b};if(l.task_mode==="replace")h.model_task_config[g]=y;else{const w=h.model_task_config[g];if(w){const z=[...new Set([...w.model_list,...b])];h.model_task_config[g]={...w,model_list:z}}else h.model_task_config[g]=y}}}if(!(await ke("/api/webui/config/model",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)})).ok)throw new Error("保存配置失败")}async function j4(a){const l=await ke("/api/webui/config/model");if(!l.ok)throw new Error("获取当前模型配置失败");const r=await l.json();if(!r.success||!r.config)throw new Error("获取配置失败");const c=r.config;let d=(c.api_providers||[]).map(g=>({name:g.name,base_url:g.base_url,client_type:g.client_type,max_retry:g.max_retry,timeout:g.timeout,retry_interval:g.retry_interval}));a.selectedProviders&&(d=d.filter(g=>a.selectedProviders.includes(g.name)));let m=c.models||[];a.selectedModels&&(m=m.filter(g=>a.selectedModels.includes(g.name)));const h={},f=c.model_task_config||{},p=a.selectedTasks||Object.keys(f);for(const g of p)f[g]&&(h[g]=f[g]);return{providers:d,models:m,task_config:h}}function Pm(a){try{const l=new URL(a);return`${l.protocol}//${l.host}${l.pathname}`.replace(/\/$/,"").toLowerCase()}catch{return a.toLowerCase().replace(/\/$/,"")}}function cN(){const a="maibot_pack_user_id";let l=localStorage.getItem(a);return l||(l="pack_user_"+Math.random().toString(36).substring(2,15),localStorage.setItem(a,l)),l}const v4={utils:"通用工具",utils_small:"轻量工具",tool_use:"工具调用",replyer:"回复生成",planner:"规划推理",vlm:"视觉模型",voice:"语音处理",embedding:"向量嵌入",lpmm_entity_extract:"实体提取",lpmm_rdf_build:"RDF构建",lpmm_qa:"问答模型"},N4=["官方推荐","性价比","高性能","免费模型","国内可用","海外模型","OpenAI","Claude","Gemini","国产模型","多模态","轻量级"];function b4({trigger:a}){const[l,r]=u.useState(!1),[c,d]=u.useState(1),[m,h]=u.useState(!1),[f,p]=u.useState(!1),[g,N]=u.useState([]),[j,b]=u.useState([]),[y,w]=u.useState({}),[z,M]=u.useState(new Set),[S,F]=u.useState(new Set),[E,C]=u.useState(new Set),[R,H]=u.useState(""),[O,X]=u.useState(""),[L,me]=u.useState(""),[Ne,je]=u.useState([]);u.useEffect(()=>{l&&c===1&&re()},[l,c]);const re=async()=>{h(!0);try{const G=await j4({name:"",description:"",author:""});N(G.providers),b(G.models),w(G.task_config),M(new Set(G.providers.map($=>$.name))),F(new Set(G.models.map($=>$.name))),C(new Set(Object.keys(G.task_config)))}catch(G){console.error("加载配置失败:",G),aa({title:"加载当前配置失败",variant:"destructive"})}finally{h(!1)}},ge=G=>{const $=new Set(z),A=new Set(S),K=new Set(E);$.has(G)?($.delete(G),j.filter(se=>se.api_provider===G).forEach(se=>A.delete(se.name)),Object.entries(y).forEach(([se,$e])=>{$e.model_list&&($e.model_list.some(J=>A.has(J))||K.delete(se))})):($.add(G),j.filter(se=>se.api_provider===G).forEach(se=>A.add(se.name)),Object.entries(y).forEach(([se,$e])=>{$e.model_list&&$e.model_list.some(J=>{const Z=j.find(Le=>Le.name===J);return Z&&Z.api_provider===G})&&K.add(se)})),M($),F(A),C(K)},pe=G=>{const $=new Set(S),A=new Set(E);$.has(G)?($.delete(G),Object.entries(y).forEach(([K,Re])=>{Re.model_list&&(Re.model_list.some($e=>$.has($e))||A.delete(K))})):($.add(G),Object.entries(y).forEach(([K,Re])=>{Re.model_list&&Re.model_list.includes(G)&&A.add(K)})),F($),C(A)},D=G=>{const $=new Set(E);$.has(G)?$.delete(G):$.add(G),C($)},Q=G=>{Ne.includes(G)?je(Ne.filter($=>$!==G)):Ne.length<5?je([...Ne,G]):aa({title:"最多选择 5 个标签",variant:"destructive"})},I=()=>{z.size===g.length?M(new Set):M(new Set(g.map(G=>G.name)))},ue=()=>{S.size===j.length?F(new Set):F(new Set(j.map(G=>G.name)))},Y=()=>{const G=Object.keys(y);E.size===G.length?C(new Set):C(new Set(G))},we=async()=>{if(!R.trim()){aa({title:"请输入模板名称",variant:"destructive"});return}if(!O.trim()){aa({title:"请输入模板描述",variant:"destructive"});return}if(!L.trim()){aa({title:"请输入作者名称",variant:"destructive"});return}if(z.size===0&&S.size===0&&E.size===0){aa({title:"请至少选择一项配置",variant:"destructive"});return}p(!0);try{const G=g.filter(K=>z.has(K.name)),$=j.filter(K=>S.has(K.name)),A={};for(const[K,Re]of Object.entries(y))E.has(K)&&(A[K]=Re);await h4({name:R.trim(),description:O.trim(),author:L.trim(),tags:Ne,providers:G,models:$,task_config:A}),aa({title:"模板已提交审核,审核通过后将显示在市场中"}),r(!1),fe()}catch(G){console.error("提交失败:",G),aa({title:G instanceof Error?G.message:"提交失败",variant:"destructive"})}finally{p(!1)}},fe=()=>{d(1),H(""),X(""),me(""),je([]),M(new Set),F(new Set),C(new Set)},Ee=2;return e.jsxs(Qs,{open:l,onOpenChange:r,children:[e.jsx(dd,{asChild:!0,children:a||e.jsxs(_,{variant:"outline",children:[e.jsx(mv,{className:"w-4 h-4 mr-2"}),"分享配置"]})}),e.jsxs(Hs,{className:"max-w-2xl max-h-[85vh] flex flex-col",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(xa,{className:"w-5 h-5"}),"分享配置模板"]}),e.jsxs(at,{children:["步骤 ",c," / ",Ee,":",c===1&&"选择要分享的配置",c===2&&"填写模板信息"]})]}),e.jsx(ts,{className:"h-[calc(85vh-220px)] pr-4",children:m?e.jsxs("div",{className:"py-8 text-center",children:[e.jsx(Fs,{className:"w-8 h-8 mx-auto animate-spin text-primary"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"正在加载当前配置..."})]}):e.jsxs(e.Fragment,{children:[c===1&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"安全提示"}),e.jsxs(ft,{children:["分享的配置将",e.jsx("strong",{children:"不包含"})," API Key,其他用户需要自行配置。"]})]}),e.jsxs(Jt,{defaultValue:"providers",className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-3",children:[e.jsxs(Xe,{value:"providers",children:[e.jsx(Hl,{className:"w-4 h-4 mr-2"}),"API 提供商",e.jsxs(Ce,{variant:"secondary",className:"ml-2",children:[z.size,"/",g.length]})]}),e.jsxs(Xe,{value:"models",children:[e.jsx(Wn,{className:"w-4 h-4 mr-2"}),"模型配置",e.jsxs(Ce,{variant:"secondary",className:"ml-2",children:[S.size,"/",j.length]})]}),e.jsxs(Xe,{value:"tasks",children:[e.jsx(er,{className:"w-4 h-4 mr-2"}),"任务配置",e.jsxs(Ce,{variant:"secondary",className:"ml-2",children:[E.size,"/",Object.keys(y).length]})]})]}),e.jsx(Ss,{value:"providers",className:"space-y-2 mt-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(_,{variant:"ghost",size:"sm",onClick:I,children:z.size===g.length?"取消全选":"全选"})}),g.length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"暂无提供商配置"}):g.map(G=>e.jsxs("div",{className:"flex items-center space-x-2 p-2 rounded hover:bg-muted",children:[e.jsx(tt,{id:`provider-${G.name}`,checked:z.has(G.name),onCheckedChange:()=>ge(G.name)}),e.jsxs(T,{htmlFor:`provider-${G.name}`,className:"flex-1 cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:G.name}),e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:G.base_url})]}),e.jsx(Ce,{variant:"outline",className:"text-xs",children:G.client_type})]},G.name))]})}),e.jsx(Ss,{value:"models",className:"space-y-2 mt-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(_,{variant:"ghost",size:"sm",onClick:ue,children:S.size===j.length?"取消全选":"全选"})}),j.length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"暂无模型配置"}):j.map(G=>e.jsxs("div",{className:"flex items-center space-x-2 p-2 rounded hover:bg-muted",children:[e.jsx(tt,{id:`model-${G.name}`,checked:S.has(G.name),onCheckedChange:()=>pe(G.name)}),e.jsxs(T,{htmlFor:`model-${G.name}`,className:"flex-1 cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:G.name}),e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:G.model_identifier})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:G.api_provider})]},G.name))]})}),e.jsx(Ss,{value:"tasks",className:"space-y-2 mt-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(_,{variant:"ghost",size:"sm",onClick:Y,children:E.size===Object.keys(y).length?"取消全选":"全选"})}),Object.keys(y).length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"暂无任务配置"}):Object.entries(y).map(([G,$])=>e.jsxs("div",{className:"space-y-2 p-2 rounded hover:bg-muted",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:`task-${G}`,checked:E.has(G),onCheckedChange:()=>D(G)}),e.jsx(T,{htmlFor:`task-${G}`,className:"flex-1 cursor-pointer",children:e.jsx("span",{className:"font-medium",children:v4[G]||G})}),e.jsxs(Ce,{variant:"outline",className:"text-xs",children:[$.model_list.length," 个模型"]})]}),$.model_list&&$.model_list.length>0&&e.jsx("div",{className:"ml-6 flex flex-wrap gap-1",children:$.model_list.map(A=>{const K=j.find(se=>se.name===A),Re=S.has(A);return e.jsxs(Ce,{variant:Re?"default":"outline",className:"text-xs cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>pe(A),children:[A,K&&e.jsxs("span",{className:"ml-1 opacity-70",children:["(",K.api_provider,")"]})]},A)})})]},G))]})})]})]}),c===2&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-4 text-sm p-3 bg-muted rounded-lg",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Hl,{className:"w-4 h-4"}),z.size," 个提供商"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Wn,{className:"w-4 h-4"}),S.size," 个模型"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(er,{className:"w-4 h-4"}),E.size," 个任务"]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"pack-name",children:"模板名称 *"}),e.jsx(ae,{id:"pack-name",placeholder:"例如:高性价比国产模型配置",value:R,onChange:G=>H(G.target.value),maxLength:50}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[R.length,"/50"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"pack-description",children:"模板描述 *"}),e.jsx(pt,{id:"pack-description",placeholder:"详细描述这个配置模板的特点、适用场景等...",value:O,onChange:G=>X(G.target.value),rows:4,maxLength:500}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[O.length,"/500"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"pack-author",children:"作者名称 *"}),e.jsx(ae,{id:"pack-author",placeholder:"你的昵称或 ID",value:L,onChange:G=>me(G.target.value),maxLength:30})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"标签(可选,最多 5 个)"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:N4.map(G=>e.jsxs(Ce,{variant:Ne.includes(G)?"default":"outline",className:"cursor-pointer transition-colors",onClick:()=>Q(G),children:[Ne.includes(G)&&e.jsx(Ot,{className:"w-3 h-3 mr-1"}),e.jsx(cd,{className:"w-3 h-3 mr-1"}),G]},G))})]})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"审核说明"}),e.jsx(ft,{children:"提交后需要经过审核才能在市场中展示。审核通常在 1-3 个工作日内完成。"})]})]})]})}),e.jsxs(gt,{className:"flex justify-between pt-4 border-t",children:[e.jsx("div",{children:c>1&&e.jsx(_,{variant:"outline",onClick:()=>d(c-1),disabled:f,children:"上一步"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(_,{variant:"outline",onClick:()=>{r(!1),fe()},disabled:f,children:"取消"}),cd(c+1),disabled:m||z.size===0&&S.size===0&&E.size===0,children:"下一步"}):e.jsxs(_,{onClick:we,disabled:f,children:[f&&e.jsx(Fs,{className:"w-4 h-4 mr-2 animate-spin"}),"提交审核"]})]})]})]})]})}function y4({value:a,label:l,onRemove:r}){const{attributes:c,listeners:d,setNodeRef:m,transform:h,transition:f,isDragging:p}=Cv({id:a}),g={transform:Tv.Transform.toString(h),transition:f,opacity:p?.5:1},N=b=>{b.preventDefault(),b.stopPropagation(),r(a)},j=b=>{b.stopPropagation()};return e.jsx("div",{ref:m,style:g,className:P("inline-flex items-center gap-1",p&&"shadow-lg"),children:e.jsxs(Ce,{variant:"secondary",className:"cursor-move hover:bg-secondary/80 flex items-center gap-1",children:[e.jsx("div",{...c,...d,className:"cursor-grab active:cursor-grabbing flex items-center",children:e.jsx(dv,{className:"h-3 w-3 text-muted-foreground"})}),e.jsx("span",{children:l}),e.jsx("span",{role:"button",tabIndex:0,className:"ml-1 rounded-sm hover:bg-destructive/20 focus:outline-none focus:ring-1 focus:ring-destructive cursor-pointer",onClick:N,onPointerDown:j,onMouseDown:b=>b.stopPropagation(),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),N(b))},children:e.jsx(Sa,{className:"h-3 w-3 hover:text-destructive",strokeWidth:2,fill:"none"})})]})})}function w4({options:a,selected:l,onChange:r,placeholder:c="选择选项...",emptyText:d="未找到选项",className:m}){const[h,f]=u.useState(!1),p=vv(Qo(yv,{activationConstraint:{distance:8}}),Qo(bv,{coordinateGetter:Nv})),g=b=>{l.includes(b)?r(l.filter(y=>y!==b)):r([...l,b])},N=b=>{r(l.filter(y=>y!==b))},j=b=>{const{active:y,over:w}=b;if(w&&y.id!==w.id){const z=l.indexOf(y.id),M=l.indexOf(w.id);r(wv(l,z,M))}};return e.jsxs(cl,{open:h,onOpenChange:f,children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",role:"combobox","aria-expanded":h,className:P("w-full justify-between min-h-10 h-auto",m),children:[e.jsx(_v,{sensors:p,collisionDetection:Sv,onDragEnd:j,children:e.jsx(kv,{items:l,strategy:p1,children:e.jsx("div",{className:"flex gap-1 flex-wrap flex-1",children:l.length===0?e.jsx("span",{className:"text-muted-foreground",children:c}):l.map(b=>{const y=a.find(w=>w.value===b);return e.jsx(y4,{value:b,label:y?.label||b,onRemove:N},b)})})})}),e.jsx(mx,{className:"ml-2 h-4 w-4 shrink-0 opacity-50",strokeWidth:2,fill:"none"})]})}),e.jsx(tl,{className:"w-full p-0",align:"start",children:e.jsxs(md,{children:[e.jsx(xd,{placeholder:"搜索...",className:"h-9"}),e.jsxs(hd,{children:[e.jsx(fd,{children:d}),e.jsx(uc,{children:a.map(b=>{const y=l.includes(b.value);return e.jsxs(mc,{value:b.value,onSelect:()=>g(b.value),children:[e.jsx("div",{className:P("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",y?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ot,{className:"h-3 w-3",strokeWidth:2,fill:"none"})}),e.jsx("span",{children:b.label})]},b.value)})})]})]})})]})}const Ul=Is.memo(function({title:l,description:r,taskConfig:c,modelNames:d,onChange:m,hideTemperature:h=!1,hideMaxTokens:f=!1,dataTour:p}){const g=N=>{m("model_list",N)};return e.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-base sm:text-lg",children:l}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mt-1",children:r})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2","data-tour":p,children:[e.jsx(T,{children:"模型列表"}),e.jsx(w4,{options:d.map(N=>({label:N,value:N})),selected:c.model_list||[],onChange:g,placeholder:"选择模型...",emptyText:"暂无可用模型"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[!h&&e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"温度"}),e.jsx(ae,{type:"number",step:"0.1",min:"0",max:"1",value:c.temperature??.3,onChange:N=>{const j=parseFloat(N.target.value);!isNaN(j)&&j>=0&&j<=1&&m("temperature",j)},className:"w-20 h-8 text-sm"})]}),e.jsx(el,{value:[c.temperature??.3],onValueChange:N=>m("temperature",N[0]),min:0,max:1,step:.1,className:"w-full"})]}),!f&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"最大 Token"}),e.jsx(ae,{type:"number",step:"1",min:"1",value:c.max_tokens??1024,onChange:N=>m("max_tokens",parseInt(N.target.value))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:"慢请求阈值 (秒)"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"超时警告"})]}),e.jsx(ae,{type:"number",step:"1",min:"1",value:c.slow_threshold??15,onChange:N=>{const j=parseInt(N.target.value);!isNaN(j)&&j>=1&&m("slow_threshold",j)},placeholder:"15"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"模型响应时间超过此阈值将输出警告日志"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{children:"模型选择策略"}),e.jsxs(Pe,{value:c.selection_strategy??"balance",onValueChange:N=>m("selection_strategy",N),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择模型选择策略"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"balance",children:"负载均衡(balance)"}),e.jsx(W,{value:"random",children:"随机选择(random)"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"负载均衡:优先选择使用次数少的模型。随机选择:完全随机从模型列表中选择"})]})]})]})}),_4=Is.memo(function({paginatedModels:l,allModels:r,onEdit:c,onDelete:d,isModelUsed:m,searchQuery:h}){return l.length===0?e.jsx("div",{className:"md:hidden text-center text-muted-foreground py-8 rounded-lg border bg-card",children:h?"未找到匹配的模型":"暂无模型配置"}):e.jsx("div",{className:"md:hidden space-y-3",children:l.map((f,p)=>{const g=r.findIndex(j=>j===f),N=m(f.name);return e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{className:"font-semibold text-base",children:f.name}),e.jsx(Ce,{variant:N?"default":"secondary",className:N?"bg-green-600 hover:bg-green-700":"",children:N?"已使用":"未使用"})]}),e.jsx("p",{className:"text-xs text-muted-foreground break-all",title:f.model_identifier,children:f.model_identifier})]}),e.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>c(f,g),children:[e.jsx(Zn,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"编辑"]}),e.jsxs(_,{size:"sm",onClick:()=>d(g),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"删除"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"提供商"}),e.jsx("p",{className:"font-medium",children:f.api_provider})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"模型温度"}),e.jsx("p",{className:"font-medium",children:f.temperature!=null?f.temperature:e.jsx("span",{className:"text-muted-foreground",children:"默认"})})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"输入价格"}),e.jsxs("p",{className:"font-medium",children:["¥",f.price_in,"/M"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"输出价格"}),e.jsxs("p",{className:"font-medium",children:["¥",f.price_out,"/M"]})]})]})]},p)})})}),S4=Is.memo(function({paginatedModels:l,allModels:r,filteredModels:c,selectedModels:d,onEdit:m,onDelete:h,onToggleSelection:f,onToggleSelectAll:p,isModelUsed:g,searchQuery:N}){return e.jsx("div",{className:"hidden md:block rounded-lg border bg-card overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:d.size===c.length&&c.length>0,onCheckedChange:p})}),e.jsx(ns,{className:"w-24",children:"使用状态"}),e.jsx(ns,{children:"模型名称"}),e.jsx(ns,{children:"模型标识符"}),e.jsx(ns,{children:"提供商"}),e.jsx(ns,{className:"text-center",children:"温度"}),e.jsx(ns,{className:"text-right",children:"输入价格"}),e.jsx(ns,{className:"text-right",children:"输出价格"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:l.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:9,className:"text-center text-muted-foreground py-8",children:N?"未找到匹配的模型":"暂无模型配置"})}):l.map((j,b)=>{const y=r.findIndex(z=>z===j),w=g(j.name);return e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:d.has(y),onCheckedChange:()=>f(y)})}),e.jsx(Ze,{children:e.jsx(Ce,{variant:w?"default":"secondary",className:w?"bg-green-600 hover:bg-green-700":"",children:w?"已使用":"未使用"})}),e.jsx(Ze,{className:"font-medium",children:j.name}),e.jsx(Ze,{className:"max-w-xs truncate",title:j.model_identifier,children:j.model_identifier}),e.jsx(Ze,{children:j.api_provider}),e.jsx(Ze,{className:"text-center",children:j.temperature!=null?j.temperature:e.jsx("span",{className:"text-muted-foreground",children:"-"})}),e.jsxs(Ze,{className:"text-right",children:["¥",j.price_in,"/M"]}),e.jsxs(Ze,{className:"text-right",children:["¥",j.price_out,"/M"]}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>m(j,y),children:[e.jsx(Zn,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"编辑"]}),e.jsxs(_,{size:"sm",onClick:()=>h(y),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1",strokeWidth:2,fill:"none"}),"删除"]})]})})]},b)})})]})})})}),k4=300*1e3,Zg=new Map,C4=[10,20,50,100],T4=Is.memo(function({page:l,pageSize:r,totalItems:c,jumpToPage:d,onPageChange:m,onPageSizeChange:h,onJumpToPageChange:f,onJumpToPage:p,onSelectionClear:g}){const N=Math.ceil(c/r),j=y=>{h(parseInt(y)),m(1),g?.()},b=y=>{y.key==="Enter"&&p()};return c===0?null:e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 mt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"page-size-model",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:r.toString(),onValueChange:j,children:[e.jsx(Ie,{id:"page-size-model",className:"w-20",children:e.jsx(Fe,{})}),e.jsx(Be,{children:C4.map(y=>e.jsx(W,{value:y.toString(),children:y},y))})]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["显示 ",(l-1)*r+1," 到"," ",Math.min(l*r,c)," 条,共 ",c," 条"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>m(1),disabled:l===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>m(Math.max(1,l-1)),disabled:l===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{type:"number",value:d,onChange:y=>f(y.target.value),onKeyDown:b,placeholder:l.toString(),className:"w-16 h-8 text-center",min:1,max:N}),e.jsx(_,{variant:"outline",size:"sm",onClick:p,disabled:!d,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>m(l+1),disabled:l>=N,children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>m(N),disabled:l>=N,className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})});function E4(a){const{models:l,taskConfig:r,debounceMs:c=2e3,onSavingChange:d,onUnsavedChange:m}=a,h=u.useRef(null),f=u.useRef(null),p=u.useRef(!0),g=u.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),N=u.useCallback(y=>{const w={model_identifier:y.model_identifier,name:y.name,api_provider:y.api_provider,price_in:y.price_in??0,price_out:y.price_out??0,force_stream_mode:y.force_stream_mode??!1,extra_params:y.extra_params??{}};return y.temperature!=null&&(w.temperature=y.temperature),y.max_tokens!=null&&(w.max_tokens=y.max_tokens),w},[]),j=u.useCallback(async y=>{try{d?.(!0);const w=y.map(N);await Wm("models",w),m?.(!1)}catch(w){console.error("自动保存模型列表失败:",w),m?.(!0)}finally{d?.(!1)}},[d,m,N]),b=u.useCallback(async y=>{try{d?.(!0),await Wm("model_task_config",y),m?.(!1)}catch(w){console.error("自动保存任务配置失败:",w),m?.(!0)}finally{d?.(!1)}},[d,m]);return u.useEffect(()=>{if(!p.current)return m?.(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{j(l)},c),()=>{h.current&&clearTimeout(h.current)}},[l,j,c,m]),u.useEffect(()=>{if(!(p.current||!r))return m?.(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{b(r)},c),()=>{f.current&&clearTimeout(f.current)}},[r,b,c,m]),u.useEffect(()=>()=>{g()},[g]),{clearTimers:g,initialLoadRef:p}}function M4(a={}){const{onCloseEditDialog:l}=a,r=ha(),{registerTour:c,startTour:d,state:m,goToStep:h}=Ex(),f=u.useRef(m.stepIndex);return u.useEffect(()=>{c(gl,aN)},[c]),u.useEffect(()=>{if(m.activeTourId===gl&&m.isRunning){const g=lN[m.stepIndex];g&&!window.location.pathname.endsWith(g.replace("/config/",""))&&r({to:g})}},[m.stepIndex,m.activeTourId,m.isRunning,r]),u.useEffect(()=>{if(m.activeTourId===gl&&m.isRunning){const g=f.current,N=m.stepIndex;g>=12&&g<=17&&N<12&&l?.(),f.current=N}},[m.stepIndex,m.activeTourId,m.isRunning,l]),u.useEffect(()=>{if(m.activeTourId!==gl||!m.isRunning)return;const g=N=>{const j=N.target,b=m.stepIndex;b===2&&j.closest('[data-tour="add-provider-button"]')?setTimeout(()=>h(3),300):b===9&&j.closest('[data-tour="provider-cancel-button"]')?setTimeout(()=>h(10),300):b===11&&j.closest('[data-tour="add-model-button"]')?setTimeout(()=>h(12),300):b===17&&j.closest('[data-tour="model-cancel-button"]')?setTimeout(()=>h(18),300):b===18&&j.closest('[data-tour="tasks-tab-trigger"]')&&setTimeout(()=>h(19),300)};return document.addEventListener("click",g,!0),()=>document.removeEventListener("click",g,!0)},[m,h]),{startTour:u.useCallback(()=>{d(gl)},[d]),isRunning:m.isRunning&&m.activeTourId===gl,stepIndex:m.stepIndex}}function A4(a){const{getProviderConfig:l}=a,[r,c]=u.useState([]),[d,m]=u.useState(!1),[h,f]=u.useState(null),[p,g]=u.useState(null),N=u.useCallback(()=>{c([]),f(null),g(null)},[]),j=u.useCallback(async(b,y=!1)=>{const w=l(b);if(!w?.base_url){c([]),g(null),f('提供商配置不完整,请先在"模型提供商配置"中配置');return}if(!w.api_key){c([]),g(null),f('该提供商未配置 API Key,请先在"模型提供商配置"中填写');return}const z=n4(w.base_url);if(g(z),!z?.modelFetcher){c([]),f(null);return}const M=`${b}:${w.base_url}`,S=Zg.get(M);if(!y&&S&&Date.now()-S.timestampE(!1)}),{clearTimers:V,initialLoadRef:Ke}=E4({models:a,taskConfig:p,onSavingChange:z,onUnsavedChange:S}),He=u.useCallback((le,oe)=>{if(!le)return;const Ve=new Set(oe.map(Ca=>Ca.name)),Ys=[],Ps=[],vt=[{key:"utils",label:"工具模型"},{key:"tool_use",label:"工具调用模型"},{key:"replyer",label:"回复模型"},{key:"planner",label:"规划器模型"},{key:"vlm",label:"视觉模型"},{key:"voice",label:"语音模型"},{key:"embedding",label:"嵌入模型"},{key:"lpmm_entity_extract",label:"LPMM实体抽取"},{key:"lpmm_rdf_build",label:"LPMM关系构建"}];for(const{key:Ca,label:ll}of vt){const ml=le[Ca];if(!ml)continue;if(!ml.model_list||ml.model_list.length===0){Ps.push(ll);continue}const rr=ml.model_list.filter(Ql=>!Ve.has(Ql));rr.length>0&&Ys.push({taskName:ll,invalidModels:rr})}ne(Ys),xe(Ps)},[]),Je=u.useCallback(async()=>{try{j(!0);const le=await Nn(),oe=le.models||[];l(oe),f(oe.map(vt=>vt.name));const Ve=le.api_providers||[];c(Ve.map(vt=>vt.name)),m(Ve);const Ys=le.model_task_config||null;g(Ys),He(Ys,oe);const Ps=Ys?.embedding?.model_list||[];J.current=[...Ps],S(!1),Ke.current=!1}catch(le){console.error("加载配置失败:",le)}finally{j(!1)}},[Ke,He]);u.useEffect(()=>{Je()},[Je]);const Es=u.useCallback(le=>d.find(oe=>oe.name===le),[d]),{availableModels:ms,fetchingModels:Ms,modelFetchError:We,matchedTemplate:Cs,fetchModelsForProvider:rs,clearModels:is}=A4({getProviderConfig:Es});u.useEffect(()=>{F&&C?.api_provider&&rs(C.api_provider)},[F,C?.api_provider,rs]);const ys=async()=>{await Ct()},rt=u.useCallback(()=>{if(!p)return;const le=new Set(a.map(Ys=>Ys.name)),oe={...p},Ve=Object.keys(oe);for(const Ys of Ve){const Ps=oe[Ys];Ps&&Ps.model_list&&(Ps.model_list=Ps.model_list.filter(vt=>le.has(vt)))}g(oe),ne([]),Ts({title:"清理完成",description:"已删除所有无效的模型引用"})},[p,a,Ts]),jt=le=>{const oe={model_identifier:le.model_identifier,name:le.name,api_provider:le.api_provider,price_in:le.price_in??0,price_out:le.price_out??0,force_stream_mode:le.force_stream_mode??!1,extra_params:le.extra_params??{}};return le.temperature!=null&&(oe.temperature=le.temperature),le.max_tokens!=null&&(oe.max_tokens=le.max_tokens),oe},Ae=async()=>{try{y(!0),V();const le=await Nn();le.models=a.map(jt),le.model_task_config=p,await lc(le),S(!1),Ts({title:"保存成功",description:"正在重启麦麦..."}),await ys()}catch(le){console.error("保存配置失败:",le),Ts({title:"保存失败",description:le.message,variant:"destructive"}),y(!1)}},Qe=async()=>{try{y(!0),V();const le=await Nn();le.models=a.map(jt),le.model_task_config=p,await lc(le),S(!1),Ts({title:"保存成功",description:"模型配置已保存"}),await Je()}catch(le){console.error("保存配置失败:",le),Ts({title:"保存失败",description:le.message,variant:"destructive"})}finally{y(!1)}},As=(le,oe)=>{ds({}),R(le||{model_identifier:"",name:"",api_provider:r[0]||"",price_in:0,price_out:0,temperature:null,max_tokens:null,force_stream_mode:!1,extra_params:{}}),O(oe),E(!0)},mt=()=>{if(!C)return;const le={};if(C.name?.trim()?a.some((vt,Ca)=>H!==null&&Ca===H?!1:vt.name.trim().toLowerCase()===C.name.trim().toLowerCase())&&(le.name="模型名称已存在,请使用其他名称"):le.name="请输入模型名称",C.api_provider?.trim()||(le.api_provider="请选择 API 提供商"),C.model_identifier?.trim()||(le.model_identifier="请输入模型标识符"),Object.keys(le).length>0){ds(le);return}ds({});const oe={model_identifier:C.model_identifier,name:C.name,api_provider:C.api_provider,price_in:C.price_in??0,price_out:C.price_out??0,force_stream_mode:C.force_stream_mode??!1,extra_params:C.extra_params??{}};C.temperature!=null&&(oe.temperature=C.temperature),C.max_tokens!=null&&(oe.max_tokens=C.max_tokens);let Ve,Ys=null;if(H!==null?(Ys=a[H].name,Ve=[...a],Ve[H]=oe):Ve=[...a,oe],l(Ve),f(Ve.map(Ps=>Ps.name)),Ys&&Ys!==oe.name&&p){const Ps=vt=>vt.map(Ca=>Ca===Ys?oe.name:Ca);g({...p,utils:{...p.utils,model_list:Ps(p.utils?.model_list||[])},tool_use:{...p.tool_use,model_list:Ps(p.tool_use?.model_list||[])},replyer:{...p.replyer,model_list:Ps(p.replyer?.model_list||[])},planner:{...p.planner,model_list:Ps(p.planner?.model_list||[])},vlm:{...p.vlm,model_list:Ps(p.vlm?.model_list||[])},voice:{...p.voice,model_list:Ps(p.voice?.model_list||[])},embedding:{...p.embedding,model_list:Ps(p.embedding?.model_list||[])},lpmm_entity_extract:{...p.lpmm_entity_extract,model_list:Ps(p.lpmm_entity_extract?.model_list||[])},lpmm_rdf_build:{...p.lpmm_rdf_build,model_list:Ps(p.lpmm_rdf_build?.model_list||[])}})}E(!1),R(null),O(null),Ts({title:H!==null?"模型已更新":"模型已添加",description:'配置将在 2 秒后自动保存,或点击右上角"保存配置"按钮立即保存'})},Ht=le=>{if(!le&&C){const oe={...C,price_in:C.price_in??0,price_out:C.price_out??0};R(oe)}E(le)},ca=le=>{re(le),Ne(!0)},Fa=()=>{if(je!==null){const le=a.filter((oe,Ve)=>Ve!==je);l(le),f(le.map(oe=>oe.name)),He(p,le),Ts({title:"删除成功",description:'配置将在 2 秒后自动保存,或点击右上角"保存配置"按钮立即保存'})}Ne(!1),re(null)},Xt=le=>{const oe=new Set(D);oe.has(le)?oe.delete(le):oe.add(le),Q(oe)},te=()=>{if(D.size===es.length)Q(new Set);else{const le=es.map((oe,Ve)=>a.findIndex(Ys=>Ys===es[Ve]));Q(new Set(le))}},_e=()=>{if(D.size===0){Ts({title:"提示",description:"请先选择要删除的模型",variant:"default"});return}ue(!0)},U=()=>{const le=D.size,oe=a.filter((Ve,Ys)=>!D.has(Ys));l(oe),f(oe.map(Ve=>Ve.name)),He(p,oe),Q(new Set),ue(!1),Ts({title:"批量删除成功",description:`已删除 ${le} 个模型,配置将在 2 秒后自动保存`})},Se=(le,oe,Ve)=>{if(!p)return;if(le==="embedding"&&oe==="model_list"&&Array.isArray(Ve)){const Ps=J.current,vt=Ve;if((Ps.length!==vt.length||Ps.some(ll=>!vt.includes(ll))||vt.some(ll=>!Ps.includes(ll)))&&Ps.length>0){Z.current={field:oe,value:Ve},cs(!0);return}}const Ys={...p,[le]:{...p[le],[oe]:Ve}};g(Ys),He(Ys,a),le==="embedding"&&oe==="model_list"&&Array.isArray(Ve)&&(J.current=[...Ve])},as=()=>{if(!p||!Z.current)return;const{field:le,value:oe}=Z.current,Ve={...p,embedding:{...p.embedding,[le]:oe}};g(Ve),He(Ve,a),le==="model_list"&&Array.isArray(oe)&&(J.current=[...oe]),Z.current=null,cs(!1),Ts({title:"嵌入模型已更新",description:"建议重新生成知识库向量以确保最佳匹配精度"})},us=()=>{Z.current=null,cs(!1)},es=a.filter(le=>{if(!ge)return!0;const oe=ge.toLowerCase();return le.name.toLowerCase().includes(oe)||le.model_identifier.toLowerCase().includes(oe)||le.api_provider.toLowerCase().includes(oe)}),Tt=Math.ceil(es.length/fe),$s=es.slice((Y-1)*fe,Y*fe),pa=()=>{const le=parseInt(G);le>=1&&le<=Tt&&(we(le),$(""))},oa=le=>p?[p.utils?.model_list||[],p.tool_use?.model_list||[],p.replyer?.model_list||[],p.planner?.model_list||[],p.vlm?.model_list||[],p.voice?.model_list||[],p.embedding?.model_list||[],p.lpmm_entity_extract?.model_list||[],p.lpmm_rdf_build?.model_list||[]].some(Ve=>Ve.includes(le)):!1;return N?e.jsx(ts,{className:"h-full",children:e.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})})}):e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"模型管理与分配"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"添加模型并为模型分配功能"})]}),e.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[e.jsx(b4,{trigger:e.jsxs(_,{variant:"outline",size:"sm",className:"flex-1 sm:flex-none",children:[e.jsx(mv,{className:"mr-2 h-4 w-4"}),"分享配置"]})}),e.jsxs(_,{onClick:Qe,disabled:b||w||!M||ia,size:"sm",variant:"outline",className:"flex-1 sm:flex-none sm:min-w-[120px]",children:[e.jsx(gc,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),b?"保存中...":w?"自动保存中...":M?"保存配置":"已保存"]}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsxs(_,{disabled:b||w||ia,size:"sm",className:"flex-1 sm:flex-none sm:min-w-[120px]",children:[e.jsx(pc,{className:"mr-2 h-4 w-4"}),ia?"重启中...":M?"保存并重启":"重启麦麦"]})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认重启麦麦?"}),e.jsx(gs,{asChild:!0,children:e.jsx("div",{children:e.jsx("p",{children:M?"当前有未保存的配置更改。点击确认将先保存配置,然后重启麦麦使新配置生效。重启过程中麦麦将暂时离线。":"即将重启麦麦主程序。重启过程中麦麦将暂时离线,配置将在重启后生效。"})})})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:M?Ae:ys,children:M?"保存并重启":"确认重启"})]})]})]})]})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:["配置更新后需要",e.jsx("strong",{children:"重启麦麦"}),'才能生效。你可以点击右上角的"保存并重启"按钮一键完成保存和重启。']})]}),Le.length>0&&e.jsxs(ht,{variant:"destructive",children:[e.jsx(Lt,{className:"h-4 w-4"}),e.jsxs(ft,{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("strong",{children:"检测到无效的模型引用"}),e.jsx("div",{className:"mt-2 space-y-1",children:Le.map(({taskName:le,invalidModels:oe})=>e.jsxs("div",{className:"text-sm",children:[e.jsx("strong",{children:le})," 引用了不存在的模型: ",oe.join(", ")]},le))})]}),e.jsx(_,{variant:"outline",size:"sm",className:"shrink-0 bg-background hover:bg-accent",onClick:rt,children:"一键清理"})]})]}),De.length>0&&e.jsxs(ht,{variant:"default",className:"border-yellow-500/50 bg-yellow-500/10",children:[e.jsx(Lt,{className:"h-4 w-4 text-yellow-600"}),e.jsxs(ft,{children:[e.jsx("strong",{className:"text-yellow-600",children:"以下任务未配置模型"}),e.jsxs("div",{className:"mt-2 text-sm",children:[De.join("、")," 还未分配模型,这些功能将无法正常工作。"]})]})]}),e.jsxs(ht,{className:"hidden lg:flex border-primary/30 bg-primary/5 cursor-pointer hover:bg-primary/10 transition-colors",onClick:ut,children:[e.jsx(U_,{className:"h-4 w-4 text-primary"}),e.jsxs(ft,{className:"flex items-center justify-between",children:[e.jsxs("span",{children:[e.jsx("strong",{className:"text-primary",children:"新手引导:"}),"不知道如何配置模型?点击这里开始学习如何为麦麦的组件分配模型。"]}),e.jsx(_,{variant:"outline",size:"sm",className:"ml-4 shrink-0",children:"开始引导"})]})]}),e.jsxs(Jt,{defaultValue:"models",className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full max-w-full sm:max-w-md grid-cols-2",children:[e.jsx(Xe,{value:"models",children:"添加模型"}),e.jsx(Xe,{value:"tasks","data-tour":"tasks-tab-trigger",children:"为模型分配功能"})]}),e.jsxs(Ss,{value:"models",className:"space-y-4 mt-0",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-2",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"配置可用的模型列表"}),e.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[D.size>0&&e.jsxs(_,{onClick:_e,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[e.jsx(os,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"批量删除 (",D.size,")"]}),e.jsxs(_,{onClick:()=>As(null,null),size:"sm",variant:"outline",className:"w-full sm:w-auto","data-tour":"add-model-button",children:[e.jsx(Xs,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"添加模型"]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2",children:[e.jsxs("div",{className:"relative w-full sm:flex-1 sm:max-w-sm",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{placeholder:"搜索模型名称、标识符或提供商...",value:ge,onChange:le=>pe(le.target.value),className:"pl-9"})]}),ge&&e.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["找到 ",es.length," 个结果"]})]}),e.jsx(_4,{paginatedModels:$s,allModels:a,onEdit:As,onDelete:ca,isModelUsed:oa,searchQuery:ge}),e.jsx(S4,{paginatedModels:$s,allModels:a,filteredModels:es,selectedModels:D,onEdit:As,onDelete:ca,onToggleSelection:Xt,onToggleSelectAll:te,isModelUsed:oa,searchQuery:ge}),e.jsx(T4,{page:Y,pageSize:fe,totalItems:es.length,jumpToPage:G,onPageChange:we,onPageSizeChange:Ee,onJumpToPageChange:$,onJumpToPage:pa,onSelectionClear:()=>Q(new Set)})]}),e.jsxs(Ss,{value:"tasks",className:"space-y-6 mt-0",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"为不同的任务配置使用的模型和参数"}),p&&e.jsxs("div",{className:"grid gap-4 sm:gap-6",children:[e.jsx(Ul,{title:"组件模型 (utils)",description:"用于表情包、取名、关系、情绪变化等组件",taskConfig:p.utils,modelNames:h,onChange:(le,oe)=>Se("utils",le,oe),dataTour:"task-model-select"}),e.jsx(Ul,{title:"工具调用模型 (tool_use)",description:"需要使用支持工具调用的模型",taskConfig:p.tool_use,modelNames:h,onChange:(le,oe)=>Se("tool_use",le,oe)}),e.jsx(Ul,{title:"首要回复模型 (replyer)",description:"用于表达器和表达方式学习",taskConfig:p.replyer,modelNames:h,onChange:(le,oe)=>Se("replyer",le,oe)}),e.jsx(Ul,{title:"决策模型 (planner)",description:"负责决定麦麦该什么时候回复",taskConfig:p.planner,modelNames:h,onChange:(le,oe)=>Se("planner",le,oe)}),e.jsx(Ul,{title:"图像识别模型 (vlm)",description:"视觉语言模型",taskConfig:p.vlm,modelNames:h,onChange:(le,oe)=>Se("vlm",le,oe),hideTemperature:!0}),e.jsx(Ul,{title:"语音识别模型 (voice)",description:"语音转文字",taskConfig:p.voice,modelNames:h,onChange:(le,oe)=>Se("voice",le,oe),hideTemperature:!0,hideMaxTokens:!0}),e.jsx(Ul,{title:"嵌入模型 (embedding)",description:"用于向量化",taskConfig:p.embedding,modelNames:h,onChange:(le,oe)=>Se("embedding",le,oe),hideTemperature:!0,hideMaxTokens:!0}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"LPMM 知识库模型"}),e.jsx(Ul,{title:"实体提取模型 (lpmm_entity_extract)",description:"从文本中提取实体",taskConfig:p.lpmm_entity_extract,modelNames:h,onChange:(le,oe)=>Se("lpmm_entity_extract",le,oe)}),e.jsx(Ul,{title:"RDF 构建模型 (lpmm_rdf_build)",description:"构建知识图谱",taskConfig:p.lpmm_rdf_build,modelNames:h,onChange:(le,oe)=>Se("lpmm_rdf_build",le,oe)})]})]})]})]}),e.jsx(Qs,{open:F,onOpenChange:Ht,children:e.jsxs(Hs,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh] overflow-y-auto","data-tour":"model-dialog",preventOutsideClose:Bs,children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:H!==null?"编辑模型":"添加模型"}),e.jsx(at,{children:"配置模型的基本信息和参数"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2","data-tour":"model-name-input",children:[e.jsx(T,{htmlFor:"model_name",className:Me.name?"text-destructive":"",children:"模型名称 *"}),e.jsx(ae,{id:"model_name",value:C?.name||"",onChange:le=>{R(oe=>oe?{...oe,name:le.target.value}:null),Me.name&&ds(oe=>({...oe,name:void 0}))},placeholder:"例如: qwen3-30b",className:Me.name?"border-destructive focus-visible:ring-destructive":""}),Me.name?e.jsx("p",{className:"text-xs text-destructive",children:Me.name}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"用于在任务配置中引用此模型"})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"model-provider-select",children:[e.jsx(T,{htmlFor:"api_provider",className:Me.api_provider?"text-destructive":"",children:"API 提供商 *"}),e.jsxs(Pe,{value:C?.api_provider||"",onValueChange:le=>{R(oe=>oe?{...oe,api_provider:le}:null),is(),Me.api_provider&&ds(oe=>({...oe,api_provider:void 0}))},children:[e.jsx(Ie,{id:"api_provider",className:Me.api_provider?"border-destructive focus-visible:ring-destructive":"",children:e.jsx(Fe,{placeholder:"选择提供商"})}),e.jsx(Be,{children:r.map(le=>e.jsx(W,{value:le,children:le},le))})]}),Me.api_provider&&e.jsx("p",{className:"text-xs text-destructive",children:Me.api_provider})]}),e.jsxs("div",{className:"grid gap-2","data-tour":"model-identifier-input",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{htmlFor:"model_identifier",className:Me.model_identifier?"text-destructive":"",children:"模型标识符 *"}),Cs?.modelFetcher&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{variant:"secondary",className:"text-xs",children:Cs.display_name}),e.jsx(_,{variant:"ghost",size:"sm",className:"h-6 px-2",onClick:()=>C?.api_provider&&rs(C.api_provider,!0),disabled:Ms,children:Ms?e.jsx(Fs,{className:"h-3 w-3 animate-spin"}):e.jsx(dt,{className:"h-3 w-3"})})]})]}),Cs?.modelFetcher?e.jsxs(cl,{open:Re,onOpenChange:se,children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",role:"combobox","aria-expanded":Re,className:"w-full justify-between font-normal",disabled:Ms||!!We,children:[Ms?e.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(Fs,{className:"h-4 w-4 animate-spin"}),"正在获取模型列表..."]}):We?e.jsx("span",{className:"text-muted-foreground text-sm",children:"点击下方输入框手动填写"}):C?.model_identifier?e.jsx("span",{className:"truncate",children:C.model_identifier}):e.jsx("span",{className:"text-muted-foreground",children:"搜索或选择模型..."}),e.jsx(mx,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(tl,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:e.jsxs(md,{children:[e.jsx(xd,{placeholder:"搜索模型..."}),e.jsx(ts,{className:"h-[300px]",children:e.jsxs(hd,{className:"max-h-none overflow-visible",children:[e.jsx(fd,{children:We?e.jsxs("div",{className:"py-4 px-2 text-center space-y-2",children:[e.jsx("p",{className:"text-sm text-destructive",children:We}),!We.includes("API Key")&&e.jsx(_,{variant:"link",size:"sm",onClick:()=>C?.api_provider&&rs(C.api_provider,!0),children:"重试"})]}):"未找到匹配的模型"}),e.jsx(uc,{heading:"可用模型",children:ms.map(le=>e.jsxs(mc,{value:le.id,onSelect:()=>{R(oe=>oe?{...oe,model_identifier:le.id}:null),se(!1)},children:[e.jsx(Ot,{className:`mr-2 h-4 w-4 ${C?.model_identifier===le.id?"opacity-100":"opacity-0"}`}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{children:le.id}),le.name!==le.id&&e.jsx("span",{className:"text-xs text-muted-foreground",children:le.name})]})]},le.id))}),e.jsx(uc,{heading:"手动输入",children:e.jsxs(mc,{value:"__manual_input__",onSelect:()=>{se(!1)},children:[e.jsx(Zn,{className:"mr-2 h-4 w-4"}),"手动输入模型标识符..."]})})]})})]})})]}):e.jsx(ae,{id:"model_identifier",value:C?.model_identifier||"",onChange:le=>{R(oe=>oe?{...oe,model_identifier:le.target.value}:null),Me.model_identifier&&ds(oe=>({...oe,model_identifier:void 0}))},placeholder:"Qwen/Qwen3-30B-A3B-Instruct-2507",className:Me.model_identifier?"border-destructive focus-visible:ring-destructive":""}),Me.model_identifier&&e.jsx("p",{className:"text-xs text-destructive",children:Me.model_identifier}),We&&Cs?.modelFetcher&&!Me.model_identifier&&e.jsxs(ht,{variant:"destructive",className:"mt-2 py-2",children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(ft,{className:"text-xs",children:We})]}),Cs?.modelFetcher&&e.jsx(ae,{value:C?.model_identifier||"",onChange:le=>{R(oe=>oe?{...oe,model_identifier:le.target.value}:null),Me.model_identifier&&ds(oe=>({...oe,model_identifier:void 0}))},placeholder:"或手动输入模型标识符",className:`mt-2 ${Me.model_identifier?"border-destructive focus-visible:ring-destructive":""}`}),!Me.model_identifier&&e.jsx("p",{className:"text-xs text-muted-foreground",children:We?'请手动输入模型标识符,或前往"模型提供商配置"检查 API Key':Cs?.modelFetcher?`已识别为 ${Cs.display_name},支持自动获取模型列表`:"API 提供商提供的模型 ID"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"price_in",children:"输入价格 (¥/M token)"}),e.jsx(ae,{id:"price_in",type:"number",step:"0.1",min:"0",value:C?.price_in??"",onChange:le=>{const oe=le.target.value===""?null:parseFloat(le.target.value);R(Ve=>Ve?{...Ve,price_in:oe}:null)},placeholder:"默认: 0"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"price_out",children:"输出价格 (¥/M token)"}),e.jsx(ae,{id:"price_out",type:"number",step:"0.1",min:"0",value:C?.price_out??"",onChange:le=>{const oe=le.target.value===""?null:parseFloat(le.target.value);R(Ve=>Ve?{...Ve,price_out:oe}:null)},placeholder:"默认: 0"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"enable_model_temperature",className:"cursor-pointer",children:"自定义模型温度"}),e.jsx(Il,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"什么是温度(Temperature)?"}),e.jsx("p",{children:"温度控制模型输出的随机性和创造性:"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"低温度(0.1-0.3)"}),":更确定、更保守的输出,适合事实性任务"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"中温度(0.5-0.7)"}),":平衡创造性与可控性"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"高温度(0.8-1.0)"}),":更有创意、更多样化的输出"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"极高温度(1.0-2.0)"}),":极度随机,可能产生不可预测的结果"]})]})]}),side:"right",maxWidth:"400px"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后将覆盖「为模型分配功能」中的任务温度配置"})]}),e.jsx(qe,{id:"enable_model_temperature",checked:C?.temperature!=null,onCheckedChange:le=>{R(le?oe=>oe?{...oe,temperature:.5}:null:oe=>oe?{...oe,temperature:null}:null)}})]}),C?.temperature!=null&&e.jsxs("div",{className:"space-y-3 pt-2 border-t",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(T,{className:"text-sm",children:"温度值"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{type:"number",value:C.temperature,onChange:le=>{const oe=parseFloat(le.target.value);!isNaN(oe)&&oe>=0&&oe<=2&&R(Ve=>Ve?{...Ve,temperature:oe}:null)},onBlur:le=>{const oe=parseFloat(le.target.value);isNaN(oe)||oe<0?R(Ve=>Ve?{...Ve,temperature:0}:null):oe>2&&R(Ve=>Ve?{...Ve,temperature:2}:null)},step:.01,min:0,max:2,className:"w-20 h-8 text-sm text-right tabular-nums"}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>K(!A),className:"h-8 px-2",title:A?"切换到基础模式 (0-1)":"解锁高级范围 (0-2)",children:A?e.jsx($_,{className:"h-4 w-4"}):e.jsx(Jm,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:"0"}),e.jsx(el,{value:[C.temperature],onValueChange:le=>R(oe=>oe?{...oe,temperature:le[0]}:null),min:0,max:A?2:1,step:A?.05:.1,className:"flex-1"}),e.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:A?"2":"1"})]}),A&&e.jsxs(ht,{className:"bg-amber-500/10 border-amber-500/20 [&>svg+div]:translate-y-0",children:[e.jsx(Lt,{className:"h-4 w-4 text-amber-500"}),e.jsx(ft,{className:"text-xs text-amber-600 dark:text-amber-400",children:"高级模式:温度 > 1 会产生更随机、更不可预测的输出,请谨慎使用"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:A?"较低(0.1-0.5)产生确定输出,中等(0.5-1.0)平衡创造性,较高(1.0-2.0)产生极度随机输出":"较低的温度(0.1-0.3)产生更确定的输出,较高的温度(0.7-1.0)产生更多样化的输出"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{htmlFor:"enable_model_max_tokens",className:"cursor-pointer",children:"自定义最大 Token"}),e.jsx(Il,{content:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium",children:"什么是最大 Token?"}),e.jsx("p",{children:"控制模型单次回复的最大长度。1 token ≈ 0.75 个英文单词或 0.5 个中文字符。"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"较小值(512-1024)"}),":简短回复,节省成本"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"中等值(2048-4096)"}),":正常对话长度"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"较大值(8192+)"}),":长文本生成,成本较高"]})]})]}),side:"right",maxWidth:"400px"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后将覆盖「为模型分配功能」中的任务最大 Token 配置"})]}),e.jsx(qe,{id:"enable_model_max_tokens",checked:C?.max_tokens!=null,onCheckedChange:le=>{R(le?oe=>oe?{...oe,max_tokens:2048}:null:oe=>oe?{...oe,max_tokens:null}:null)}})]}),C?.max_tokens!=null&&e.jsxs("div",{className:"space-y-2 pt-2 border-t",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{className:"text-sm",children:"最大 Token 数"}),e.jsx(ae,{type:"number",min:"1",max:"128000",value:C.max_tokens,onChange:le=>{const oe=parseInt(le.target.value);!isNaN(oe)&&oe>=1&&R(Ve=>Ve?{...Ve,max_tokens:oe}:null)},className:"w-28 h-8 text-sm"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"限制模型单次输出的最大 token 数量,不同模型支持的上限不同"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"force_stream_mode",checked:C?.force_stream_mode||!1,onCheckedChange:le=>R(oe=>oe?{...oe,force_stream_mode:le}:null)}),e.jsx(T,{htmlFor:"force_stream_mode",className:"cursor-pointer",children:"强制流式输出模式"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"额外参数"}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(_,{type:"button",variant:"outline",size:"sm",className:"flex-1 justify-start h-9",onClick:()=>L(!0),children:[e.jsx(Sn,{className:"h-4 w-4 mr-2"}),Object.keys(C?.extra_params||{}).length>0?e.jsxs("span",{children:["已配置 ",Object.keys(C?.extra_params||{}).length," 个参数"]}):e.jsx("span",{className:"text-muted-foreground",children:"未配置额外参数"})]})}),Object.keys(C?.extra_params||{}).length>0&&e.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:[Object.keys(C?.extra_params||{}).slice(0,3).map(le=>e.jsx("span",{className:"inline-block mr-2",children:e.jsx("code",{className:"px-1.5 py-0.5 bg-muted rounded",children:le})},le)),Object.keys(C?.extra_params||{}).length>3&&e.jsx("span",{children:"..."})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>E(!1),"data-tour":"model-cancel-button",children:"取消"}),e.jsx(_,{onClick:mt,"data-tour":"model-save-button",children:"保存"})]})]})}),e.jsx(bs,{open:me,onOpenChange:Ne,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除模型 "',je!==null?a[je]?.name:"",'" 吗? 此操作无法撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:Fa,children:"删除"})]})]})}),e.jsx(bs,{open:I,onOpenChange:ue,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["确定要删除选中的 ",D.size," 个模型吗? 此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:U,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})}),e.jsx(bs,{open:$e,onOpenChange:cs,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsxs(ps,{className:"flex items-center gap-2",children:[e.jsx(Lt,{className:"h-5 w-5 text-amber-500"}),"更换嵌入模型警告"]}),e.jsx(gs,{asChild:!0,children:e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-foreground",children:"注意:"}),"更换嵌入模型可能会影响知识库的匹配精度!"]}),e.jsxs("ul",{className:"space-y-2 ml-4 list-disc text-muted-foreground",children:[e.jsx("li",{children:"不同的嵌入模型会产生不同的向量表示"}),e.jsx("li",{children:"这可能导致现有知识库的检索结果不准确"}),e.jsx("li",{children:"建议更换嵌入模型后重新生成所有知识库的向量"})]}),e.jsx("p",{className:"text-foreground font-medium",children:"确定要更换嵌入模型吗?"})]})})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:us,children:"取消"}),e.jsx(js,{onClick:as,className:"bg-amber-600 hover:bg-amber-700",children:"确认更换"})]})]})}),e.jsx(u4,{open:X,onOpenChange:L,value:C?.extra_params||{},onChange:le=>R(oe=>oe?{...oe,extra_params:le}:null)}),e.jsx(nr,{})]})})}const xc=Mj,hc=Aw,fc=zw,pd="/api/webui/config";async function D4(){const l=await(await ke(`${pd}/adapter-config/path`)).json();return!l.success||!l.path?null:{path:l.path,lastModified:l.lastModified}}async function Wg(a){const r=await(await ke(`${pd}/adapter-config/path`,{method:"POST",headers:Zs(),body:JSON.stringify({path:a})})).json();if(!r.success)throw new Error(r.message||"保存路径失败")}async function ej(a){const r=await(await ke(`${pd}/adapter-config?path=${encodeURIComponent(a)}`)).json();if(!r.success)throw new Error("读取配置文件失败");return r.content}async function sj(a,l){const c=await(await ke(`${pd}/adapter-config`,{method:"POST",headers:Zs(),body:JSON.stringify({path:a,content:l})})).json();if(!c.success)throw new Error(c.message||"保存配置失败")}const kt={inner:{version:"0.1.2"},nickname:{nickname:""},napcat_server:{host:"localhost",port:8095,token:"",heartbeat_interval:30},maibot_server:{host:"localhost",port:8e3},chat:{group_list_type:"whitelist",group_list:[],private_list_type:"whitelist",private_list:[],ban_user_id:[],ban_qq_bot:!1,enable_poke:!0},voice:{use_tts:!1},forward:{image_threshold:30},debug:{level:"INFO"}},Fm={oneclick:{name:"一键包",description:"使用一键包部署的适配器配置",path:"../MaiBot-Napcat-Adapter/config.toml",icon:xa},docker:{name:"Docker",description:"Docker Compose 部署的适配器配置",path:"/MaiMBot/adapters-config/config.toml",icon:I_}};function Hm(a){try{const l=_x(a);return{inner:{...kt.inner,...l.inner},nickname:{...kt.nickname,...l.nickname},napcat_server:{...kt.napcat_server,...l.napcat_server},maibot_server:{...kt.maibot_server,...l.maibot_server},chat:{...kt.chat,...l.chat},voice:{...kt.voice,...l.voice},forward:{...kt.forward,...l.forward},debug:{...kt.debug,...l.debug}}}catch(l){throw console.error("TOML 解析失败:",l),new Error(`无法解析 TOML 文件: ${l instanceof Error?l.message:"未知错误"}`)}}function qm(a){try{const l=(d,m)=>d===""||d===null||d===void 0?m:d,r={inner:{version:l(a.inner.version,kt.inner.version)},nickname:{nickname:l(a.nickname.nickname,kt.nickname.nickname)},napcat_server:{host:l(a.napcat_server.host,kt.napcat_server.host),port:l(a.napcat_server.port||0,kt.napcat_server.port),token:l(a.napcat_server.token,kt.napcat_server.token),heartbeat_interval:l(a.napcat_server.heartbeat_interval||0,kt.napcat_server.heartbeat_interval)},maibot_server:{host:l(a.maibot_server.host,kt.maibot_server.host),port:l(a.maibot_server.port||0,kt.maibot_server.port)},chat:{group_list_type:l(a.chat.group_list_type,kt.chat.group_list_type),group_list:a.chat.group_list||[],private_list_type:l(a.chat.private_list_type,kt.chat.private_list_type),private_list:a.chat.private_list||[],ban_user_id:a.chat.ban_user_id||[],ban_qq_bot:a.chat.ban_qq_bot??kt.chat.ban_qq_bot,enable_poke:a.chat.enable_poke??kt.chat.enable_poke},voice:{use_tts:a.voice.use_tts??kt.voice.use_tts},forward:{image_threshold:l(a.forward.image_threshold||0,kt.forward.image_threshold)},debug:{level:l(a.debug.level,kt.debug.level)}};let c=GS(r);return c=O4(c),c}catch(l){throw console.error("TOML 生成失败:",l),new Error(`无法生成 TOML 文件: ${l instanceof Error?l.message:"未知错误"}`)}}function O4(a){const l=a.split(` `),r=[];for(let c=0;c"|?*\x00-\x1F]/.test(a)?{valid:!1,error:"路径包含非法字符"}:{valid:!0,error:""}}function L4(){const[a,l]=u.useState("upload"),[r,c]=u.useState(null),[d,m]=u.useState(""),[h,f]=u.useState(""),[p,g]=u.useState("oneclick"),[N,j]=u.useState(""),[b,y]=u.useState(!1),[w,z]=u.useState(!1),[M,S]=u.useState(!1),[F,E]=u.useState(!1),[C,R]=u.useState(null),[H,O]=u.useState(!1),X=u.useRef(null),{toast:L}=nt(),me=u.useRef(null),Ne=A=>{if(f(A),A.trim()){const K=Vm(A);j(K.error)}else j("")},je=u.useCallback(async A=>{const K=Fm[A];z(!0);try{const Re=await ej(K.path),se=Hm(Re);c(se),g(A),f(K.path),await Wg(K.path),L({title:"加载成功",description:`已从${K.name}预设加载配置`})}catch(Re){console.error("加载预设配置失败:",Re),L({title:"加载失败",description:Re instanceof Error?Re.message:"无法读取预设配置文件",variant:"destructive"})}finally{z(!1)}},[L]),ce=u.useCallback(async A=>{const K=Vm(A);if(!K.valid){j(K.error),L({title:"路径无效",description:K.error,variant:"destructive"});return}j(""),z(!0);try{const Re=await ej(A),se=Hm(Re);c(se),f(A),await Wg(A),L({title:"加载成功",description:"已从配置文件加载"})}catch(Re){console.error("加载配置失败:",Re),L({title:"加载失败",description:Re instanceof Error?Re.message:"无法读取配置文件",variant:"destructive"})}finally{z(!1)}},[L]);u.useEffect(()=>{(async()=>{try{const K=await D4();if(K&&K.path){f(K.path);const Re=Object.entries(Fm).find(([,se])=>se.path===K.path);Re?(l("preset"),g(Re[0]),await je(Re[0])):(l("path"),await ce(K.path))}}catch(K){console.error("加载保存的路径失败:",K)}})()},[ce,je]);const ge=u.useCallback(A=>{a!=="path"&&a!=="preset"||!h||(me.current&&clearTimeout(me.current),me.current=setTimeout(async()=>{y(!0);try{const K=qm(A);await sj(h,K),L({title:"自动保存成功",description:"配置已保存到文件"})}catch(K){console.error("自动保存失败:",K),L({title:"自动保存失败",description:K instanceof Error?K.message:"保存配置失败",variant:"destructive"})}finally{y(!1)}},1e3))},[a,h,L]),pe=async()=>{if(!r||!h)return;const A=Vm(h);if(!A.valid){L({title:"保存失败",description:A.error,variant:"destructive"});return}y(!0);try{const K=qm(r);await sj(h,K),L({title:"保存成功",description:"配置已保存到文件"})}catch(K){console.error("保存失败:",K),L({title:"保存失败",description:K instanceof Error?K.message:"保存配置失败",variant:"destructive"})}finally{y(!1)}},D=async()=>{h&&await ce(h)},Q=A=>{if(A!==a){if(r){R(A),S(!0);return}B(A)}},B=A=>{c(null),m(""),j(""),l(A),A==="preset"&&je("oneclick"),L({title:"已切换模式",description:{upload:"现在可以上传配置文件",path:"现在可以指定配置文件路径",preset:"现在可以使用预设配置"}[A]})},ue=()=>{C&&(B(C),R(null)),S(!1)},Y=()=>{if(r){E(!0);return}we()},we=()=>{f(""),c(null),j(""),L({title:"已清空",description:"路径和配置已清空"})},fe=()=>{we(),E(!1)},Ee=A=>{const K=A.target.files?.[0];if(!K)return;const Re=new FileReader;Re.onload=se=>{try{const $e=se.target?.result,cs=Hm($e);c(cs),m(K.name),L({title:"上传成功",description:`已加载配置文件:${K.name}`})}catch($e){console.error("解析配置文件失败:",$e),L({title:"解析失败",description:"配置文件格式错误,请检查文件内容",variant:"destructive"})}},Re.readAsText(K)},G=()=>{if(!r)return;const A=qm(r),K=new Blob([A],{type:"text/plain;charset=utf-8"}),Re=URL.createObjectURL(K),se=document.createElement("a");se.href=Re,se.download=d||"config.toml",document.body.appendChild(se),se.click(),document.body.removeChild(se),URL.revokeObjectURL(Re),L({title:"下载成功",description:"配置文件已下载,请手动覆盖并重启适配器"})},$=()=>{c(JSON.parse(JSON.stringify(kt))),m("config.toml"),L({title:"已加载默认配置",description:"可以开始编辑配置"})};return e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"麦麦适配器配置"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理麦麦的 QQ 适配器的配置文件"})]})}),e.jsx(xc,{open:H,onOpenChange:O,children:e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Ue,{children:"工作模式"}),e.jsx(Ns,{children:"选择配置文件的管理方式"})]}),e.jsx(hc,{asChild:!0,children:e.jsxs(_,{variant:"ghost",size:"sm",className:"w-9 p-0",children:[e.jsx(Ba,{className:`h-4 w-4 transition-transform duration-200 ${H?"transform rotate-180":""}`}),e.jsx("span",{className:"sr-only",children:"切换"})]})})]})}),e.jsx(fc,{children:e.jsxs(ze,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 md:gap-4",children:[e.jsx("div",{className:`border-2 rounded-lg p-3 md:p-4 cursor-pointer transition-all ${a==="preset"?"border-primary bg-primary/5":"border-muted hover:border-primary/50 active:border-primary/70"}`,onClick:()=>Q("preset"),children:e.jsxs("div",{className:"flex items-start gap-2 md:gap-3",children:[e.jsx(xa,{className:"h-4 w-4 md:h-5 md:w-5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-semibold text-sm md:text-base",children:"预设模式"}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-1 line-clamp-2",children:"使用预设的部署配置"})]})]})}),e.jsx("div",{className:`border-2 rounded-lg p-3 md:p-4 cursor-pointer transition-all ${a==="upload"?"border-primary bg-primary/5":"border-muted hover:border-primary/50 active:border-primary/70"}`,onClick:()=>Q("upload"),children:e.jsxs("div",{className:"flex items-start gap-2 md:gap-3",children:[e.jsx(cc,{className:"h-4 w-4 md:h-5 md:w-5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-semibold text-sm md:text-base",children:"上传文件模式"}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-1 line-clamp-2",children:"上传配置文件,编辑后下载并手动覆盖"})]})]})}),e.jsx("div",{className:`border-2 rounded-lg p-3 md:p-4 cursor-pointer transition-all ${a==="path"?"border-primary bg-primary/5":"border-muted hover:border-primary/50 active:border-primary/70"}`,onClick:()=>Q("path"),children:e.jsxs("div",{className:"flex items-start gap-2 md:gap-3",children:[e.jsx(I1,{className:"h-4 w-4 md:h-5 md:w-5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-semibold text-sm md:text-base",children:"指定路径模式"}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-1 line-clamp-2",children:"指定配置文件路径,自动加载和保存"})]})]})})]}),a==="preset"&&e.jsxs("div",{className:"space-y-3 pt-2 border-t",children:[e.jsx(T,{className:"text-sm md:text-base",children:"选择部署方式"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Object.entries(Fm).map(([A,K])=>{const Re=K.icon,se=p===A;return e.jsx("div",{className:`border-2 rounded-lg p-3 cursor-pointer transition-all ${se?"border-primary bg-primary/5":"border-muted hover:border-primary/50"}`,onClick:()=>{g(A),je(A)},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Re,{className:"h-5 w-5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h4",{className:"font-semibold text-sm",children:K.name}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:K.description}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 font-mono break-all",children:K.path})]})]})},A)})})]}),a==="path"&&e.jsxs("div",{className:"space-y-3 pt-2 border-t",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"config-path",className:"text-sm md:text-base",children:"配置文件路径"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx(ne,{id:"config-path",value:h,onChange:A=>Ne(A.target.value),placeholder:"例: C:\\Adapter\\config.toml",className:`text-sm ${N?"border-destructive":""}`}),N&&e.jsx("p",{className:"text-xs text-destructive",children:N})]}),e.jsx(_,{onClick:()=>ce(h),disabled:w||!h||!!N,className:"w-full sm:w-auto",children:w?e.jsxs(e.Fragment,{children:[e.jsx(dt,{className:"h-4 w-4 animate-spin mr-2"}),e.jsx("span",{className:"sm:hidden",children:"加载中..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sm:hidden",children:"加载配置"}),e.jsx("span",{className:"hidden sm:inline",children:"加载"})]})})]})]}),e.jsxs("details",{className:"rounded-lg bg-muted/50 p-3 group",children:[e.jsxs("summary",{className:"text-xs font-medium cursor-pointer select-none list-none flex items-center justify-between",children:[e.jsx("span",{children:"路径格式说明"}),e.jsx("svg",{className:"h-4 w-4 transition-transform group-open:rotate-180",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e.jsxs("div",{className:"mt-2 space-y-2 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"font-mono bg-background px-1.5 py-0.5 rounded text-[10px] md:text-xs whitespace-nowrap",children:"Windows"})}),e.jsxs("div",{className:"pl-2 space-y-0.5 text-[10px] md:text-xs break-all",children:[e.jsx("div",{children:"C:\\Adapter\\config.toml"}),e.jsx("div",{className:"hidden sm:block",children:"D:\\MaiBot\\adapter\\config.toml"}),e.jsx("div",{className:"hidden sm:block",children:"\\\\server\\share\\config.toml"})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"font-mono bg-background px-1.5 py-0.5 rounded text-[10px] md:text-xs whitespace-nowrap",children:"Linux"})}),e.jsxs("div",{className:"pl-2 space-y-0.5 text-[10px] md:text-xs break-all",children:[e.jsx("div",{children:"/opt/adapter/config.toml"}),e.jsx("div",{className:"hidden sm:block",children:"/home/user/adapter/config.toml"}),e.jsx("div",{className:"hidden sm:block",children:"~/adapter/config.toml"})]})]}),e.jsx("p",{className:"pt-1 border-t text-[10px] md:text-xs",children:"💡 配置会自动保存到指定文件,修改后 1 秒自动保存"})]})]})]})]})})]})}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(ft,{children:a==="preset"?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:"预设模式:"}),"选择预设的部署方式,配置会自动加载,修改后 1 秒自动保存",b&&" (正在保存...)"]}):a==="upload"?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:"上传文件模式:"}),"上传配置文件 → 在线编辑 → 下载文件 → 手动覆盖并重启适配器"]}):e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:"指定路径模式:"}),"指定配置文件路径后,配置会自动加载,修改后 1 秒自动保存",b&&" (正在保存...)"]})})]}),a==="upload"&&!r&&e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[e.jsx("input",{ref:X,type:"file",accept:".toml",className:"hidden",onChange:Ee}),e.jsxs(_,{onClick:()=>X.current?.click(),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[e.jsx(cc,{className:"mr-2 h-4 w-4"}),"上传配置"]}),e.jsxs(_,{onClick:$,size:"sm",className:"w-full sm:w-auto",children:[e.jsx(Ua,{className:"mr-2 h-4 w-4"}),"使用默认配置"]})]}),a==="upload"&&r&&e.jsx("div",{className:"flex gap-2",children:e.jsxs(_,{onClick:G,size:"sm",className:"w-full sm:w-auto",children:[e.jsx(na,{className:"mr-2 h-4 w-4"}),"下载配置"]})}),(a==="preset"||a==="path")&&r&&e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs(_,{onClick:pe,size:"sm",disabled:b||!!N,className:"w-full sm:w-auto",children:[e.jsx(gc,{className:"mr-2 h-4 w-4"}),b?"保存中...":"立即保存"]}),e.jsxs(_,{onClick:D,size:"sm",variant:"outline",disabled:w,className:"w-full sm:w-auto",children:[e.jsx(dt,{className:`mr-2 h-4 w-4 ${w?"animate-spin":""}`}),"刷新"]}),a==="path"&&e.jsxs(_,{onClick:Y,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[e.jsx(os,{className:"mr-2 h-4 w-4"}),"清空路径"]})]}),r?e.jsxs(Jt,{defaultValue:"napcat",className:"w-full",children:[e.jsx("div",{className:"overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0",children:e.jsxs(Gt,{className:"inline-flex w-auto min-w-full sm:grid sm:w-full sm:grid-cols-5",children:[e.jsxs(Xe,{value:"napcat",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:[e.jsx("span",{className:"hidden sm:inline",children:"Napcat 连接"}),e.jsx("span",{className:"sm:hidden",children:"Napcat"})]}),e.jsxs(Xe,{value:"maibot",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:[e.jsx("span",{className:"hidden sm:inline",children:"麦麦连接"}),e.jsx("span",{className:"sm:hidden",children:"麦麦"})]}),e.jsxs(Xe,{value:"chat",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:[e.jsx("span",{className:"hidden sm:inline",children:"聊天控制"}),e.jsx("span",{className:"sm:hidden",children:"聊天"})]}),e.jsxs(Xe,{value:"voice",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:[e.jsx("span",{className:"hidden sm:inline",children:"语音与转发"}),e.jsx("span",{className:"sm:hidden",children:"语音"})]}),e.jsx(Xe,{value:"debug",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:"调试"})]})}),e.jsx(Ss,{value:"napcat",className:"space-y-4",children:e.jsx(U4,{config:r,onChange:A=>{c(A),ge(A)}})}),e.jsx(Ss,{value:"maibot",className:"space-y-4",children:e.jsx($4,{config:r,onChange:A=>{c(A),ge(A)}})}),e.jsx(Ss,{value:"chat",className:"space-y-4",children:e.jsx(B4,{config:r,onChange:A=>{c(A),ge(A)}})}),e.jsx(Ss,{value:"voice",className:"space-y-4",children:e.jsx(I4,{config:r,onChange:A=>{c(A),ge(A)}})}),e.jsx(Ss,{value:"debug",className:"space-y-4",children:e.jsx(P4,{config:r,onChange:A=>{c(A),ge(A)}})})]}):e.jsx("div",{className:"rounded-lg border bg-card p-6 md:p-12",children:e.jsxs("div",{className:"text-center space-y-3 md:space-y-4",children:[e.jsx(Ua,{className:"h-12 w-12 md:h-16 md:w-16 mx-auto text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold",children:"尚未加载配置"}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-2 px-4",children:a==="preset"?"请选择预设的部署方式":a==="upload"?"请上传现有配置文件,或使用默认配置开始编辑":"请指定配置文件路径并点击加载按钮"})]})]})}),e.jsx(bs,{open:M,onOpenChange:S,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认切换模式"}),e.jsxs(gs,{children:["切换模式将清空当前配置,确定要继续吗?",e.jsx("br",{}),e.jsx("span",{className:"text-destructive font-medium",children:"请确保已保存重要配置"})]})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:()=>{S(!1),R(null)},children:"取消"}),e.jsx(js,{onClick:ue,children:"确认切换"})]})]})}),e.jsx(bs,{open:F,onOpenChange:E,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认清空路径"}),e.jsxs(gs,{children:["清空路径将清除当前配置,确定要继续吗?",e.jsx("br",{}),e.jsx("span",{className:"text-muted-foreground text-sm",children:"此操作不会删除配置文件,只是清除界面中的配置"})]})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:()=>E(!1),children:"取消"}),e.jsx(js,{onClick:fe,className:"bg-destructive hover:bg-destructive/90",children:"确认清空"})]})]})})]})})}function U4({config:a,onChange:l}){return e.jsx("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"Napcat WebSocket 服务设置"}),e.jsxs("div",{className:"grid gap-3 md:gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"napcat-host",className:"text-sm md:text-base",children:"主机地址"}),e.jsx(ne,{id:"napcat-host",value:a.napcat_server.host,onChange:r=>l({...a,napcat_server:{...a.napcat_server,host:r.target.value}}),placeholder:"localhost",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Napcat 设定的主机地址"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"napcat-port",className:"text-sm md:text-base",children:"端口"}),e.jsx(ne,{id:"napcat-port",type:"number",value:a.napcat_server.port||"",onChange:r=>l({...a,napcat_server:{...a.napcat_server,port:r.target.value?parseInt(r.target.value):0}}),placeholder:"8095",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Napcat 设定的端口(留空使用默认值 8095)"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"napcat-token",className:"text-sm md:text-base",children:"访问令牌(Token)"}),e.jsx(ne,{id:"napcat-token",type:"password",value:a.napcat_server.token,onChange:r=>l({...a,napcat_server:{...a.napcat_server,token:r.target.value}}),placeholder:"留空表示无需令牌",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Napcat 设定的访问令牌,若无则留空"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"napcat-heartbeat",className:"text-sm md:text-base",children:"心跳间隔(秒)"}),e.jsx(ne,{id:"napcat-heartbeat",type:"number",value:a.napcat_server.heartbeat_interval||"",onChange:r=>l({...a,napcat_server:{...a.napcat_server,heartbeat_interval:r.target.value?parseInt(r.target.value):0}}),placeholder:"30",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"与 Napcat 设置的心跳间隔保持一致(留空使用默认值 30)"})]})]})]})})}function $4({config:a,onChange:l}){return e.jsx("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"麦麦 WebSocket 服务设置"}),e.jsxs("div",{className:"grid gap-3 md:gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"maibot-host",className:"text-sm md:text-base",children:"主机地址"}),e.jsx(ne,{id:"maibot-host",value:a.maibot_server.host,onChange:r=>l({...a,maibot_server:{...a.maibot_server,host:r.target.value}}),placeholder:"localhost",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦在 .env 文件中设置的 HOST 字段"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"maibot-port",className:"text-sm md:text-base",children:"端口"}),e.jsx(ne,{id:"maibot-port",type:"number",value:a.maibot_server.port||"",onChange:r=>l({...a,maibot_server:{...a.maibot_server,port:r.target.value?parseInt(r.target.value):0}}),placeholder:"8000",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦在 .env 文件中设置的 PORT 字段(留空使用默认值 8000)"})]})]})]})})}function B4({config:a,onChange:l}){const r=m=>{const h={...a};m==="group"?h.chat.group_list=[...h.chat.group_list,0]:m==="private"?h.chat.private_list=[...h.chat.private_list,0]:h.chat.ban_user_id=[...h.chat.ban_user_id,0],l(h)},c=(m,h)=>{const f={...a};m==="group"?f.chat.group_list=f.chat.group_list.filter((p,g)=>g!==h):m==="private"?f.chat.private_list=f.chat.private_list.filter((p,g)=>g!==h):f.chat.ban_user_id=f.chat.ban_user_id.filter((p,g)=>g!==h),l(f)},d=(m,h,f)=>{const p={...a};m==="group"?p.chat.group_list[h]=f:m==="private"?p.chat.private_list[h]=f:p.chat.ban_user_id[h]=f,l(p)};return e.jsx("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"聊天黑白名单功能"}),e.jsxs("div",{className:"grid gap-4 md:gap-6",children:[e.jsxs("div",{className:"space-y-3 md:space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-sm md:text-base",children:"群组名单类型"}),e.jsxs(Pe,{value:a.chat.group_list_type,onValueChange:m=>l({...a,chat:{...a.chat,group_list_type:m}}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"whitelist",children:"白名单(仅名单内可聊天)"}),e.jsx(W,{value:"blacklist",children:"黑名单(名单内禁止聊天)"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-0",children:[e.jsx(T,{className:"text-sm md:text-base",children:"群组列表"}),e.jsxs(_,{onClick:()=>r("group"),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[e.jsx(Ua,{className:"mr-1 h-4 w-4"}),"添加群号"]})]}),a.chat.group_list.map((m,h)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{type:"number",value:m,onChange:f=>d("group",h,parseInt(f.target.value)||0),placeholder:"输入群号",className:"text-sm md:text-base"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除群号 ",m," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>c("group",h),children:"删除"})]})]})]})]},h)),a.chat.group_list.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无群组"})]})]}),e.jsxs("div",{className:"space-y-3 md:space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-sm md:text-base",children:"私聊名单类型"}),e.jsxs(Pe,{value:a.chat.private_list_type,onValueChange:m=>l({...a,chat:{...a.chat,private_list_type:m}}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"whitelist",children:"白名单(仅名单内可聊天)"}),e.jsx(W,{value:"blacklist",children:"黑名单(名单内禁止聊天)"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-0",children:[e.jsx(T,{className:"text-sm md:text-base",children:"私聊列表"}),e.jsxs(_,{onClick:()=>r("private"),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[e.jsx(Ua,{className:"mr-1 h-4 w-4"}),"添加用户"]})]}),a.chat.private_list.map((m,h)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{type:"number",value:m,onChange:f=>d("private",h,parseInt(f.target.value)||0),placeholder:"输入QQ号",className:"text-sm md:text-base"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除用户 ",m," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>c("private",h),children:"删除"})]})]})]})]},h)),a.chat.private_list.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无用户"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-0",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-sm md:text-base",children:"全局禁止名单"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"名单中的用户无法进行任何聊天"})]}),e.jsxs(_,{onClick:()=>r("ban"),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[e.jsx(Ua,{className:"mr-1 h-4 w-4"}),"添加用户"]})]}),a.chat.ban_user_id.map((m,h)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{type:"number",value:m,onChange:f=>d("ban",h,parseInt(f.target.value)||0),placeholder:"输入QQ号",className:"text-sm md:text-base"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要从全局禁止名单中删除用户 ",m," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>c("ban",h),children:"删除"})]})]})]})]},h)),a.chat.ban_user_id.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无禁止用户"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-sm md:text-base",children:"屏蔽QQ官方机器人"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"是否屏蔽来自QQ官方机器人的消息"})]}),e.jsx(Ge,{checked:a.chat.ban_qq_bot,onCheckedChange:m=>l({...a,chat:{...a.chat,ban_qq_bot:m}})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-sm md:text-base",children:"启用戳一戳功能"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"是否响应戳一戳消息"})]}),e.jsx(Ge,{checked:a.chat.enable_poke,onCheckedChange:m=>l({...a,chat:{...a.chat,enable_poke:m}})})]})]})]})})}function I4({config:a,onChange:l}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"发送语音设置"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-sm md:text-base",children:"使用 TTS 语音"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"请确保已配置 TTS 并有对应的适配器"})]}),e.jsx(Ge,{checked:a.voice.use_tts,onCheckedChange:r=>l({...a,voice:{...a.voice,use_tts:r}})})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"转发消息处理设置"}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"image-threshold",className:"text-sm md:text-base",children:"图片数量阈值"}),e.jsx(ne,{id:"image-threshold",type:"number",value:a.forward.image_threshold||"",onChange:r=>l({...a,forward:{...a.forward,image_threshold:r.target.value?parseInt(r.target.value):0}}),placeholder:"30",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"转发消息中图片数量超过此值时使用占位符(避免麦麦VLM处理卡死)"})]})]})]})}function P4({config:a,onChange:l}){return e.jsx("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"调试设置"}),e.jsx("div",{className:"grid gap-3 md:gap-4",children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-sm md:text-base",children:"日志等级"}),e.jsxs(Pe,{value:a.debug.level,onValueChange:r=>l({...a,debug:{level:r}}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"DEBUG",children:"DEBUG(调试)"}),e.jsx(W,{value:"INFO",children:"INFO(信息)"}),e.jsx(W,{value:"WARNING",children:"WARNING(警告)"}),e.jsx(W,{value:"ERROR",children:"ERROR(错误)"}),e.jsx(W,{value:"CRITICAL",children:"CRITICAL(严重)"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"设置适配器的日志输出等级"})]})})]})})}const F4=["defaultChecked","defaultValue","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML","accessKey","className","contentEditable","contextMenu","dir","draggable","hidden","id","lang","placeholder","slot","spellCheck","style","tabIndex","title","translate","radioGroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable","inputMode","is","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],H4=/^(aria-|data-)/,oN=a=>Object.fromEntries(Object.entries(a).filter(([l])=>H4.test(l)||F4.includes(l)));function q4(a,l){const r=oN(a);return Object.keys(a).some(c=>!Object.hasOwn(r,c)&&a[c]!==l[c])}class V4 extends u.Component{container;plugin;componentDidMount(){this.installPlugin()}componentDidUpdate(l){if(l.uppy!==this.props.uppy)this.uninstallPlugin(l),this.installPlugin();else if(q4(this.props,l)){const{uppy:r,...c}={...this.props,target:this.container};this.plugin.setOptions(c)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:l,...r}={id:"Dashboard",...this.props,inline:!0,target:this.container};l.use(v_,r),this.plugin=l.getPlugin(r.id)}uninstallPlugin(l=this.props){const{uppy:r}=l;r.removePlugin(this.plugin)}render(){return u.createElement("div",{className:"uppy-Container",ref:l=>{this.container=l},...oN(this.props)})}}function G4({src:a,alt:l="表情包",className:r,maxRetries:c=5,retryInterval:d=1500}){const[m,h]=u.useState("loading"),[f,p]=u.useState(0),[g,N]=u.useState(null),[j,b]=u.useState(a);a!==j&&(h("loading"),p(0),N(null),b(a));const y=u.useCallback(async()=>{try{const w=await fetch(a,{credentials:"include"});if(w.status===202){h("generating"),f{p(S=>S+1)},d):h("error");return}if(!w.ok){h("error");return}const z=await w.blob(),M=URL.createObjectURL(z);N(M),h("loaded")}catch(w){console.error("加载缩略图失败:",w),h("error")}},[a,f,c,d]);return u.useEffect(()=>{y()},[y]),u.useEffect(()=>()=>{g&&URL.revokeObjectURL(g)},[g]),m==="loading"||m==="generating"?e.jsx(ks,{className:P("w-full h-full",r)}):m==="error"||!g?e.jsx("div",{className:P("w-full h-full flex items-center justify-center bg-muted",r),children:e.jsx(xx,{className:"h-8 w-8 text-muted-foreground"})}):e.jsx("img",{src:g,alt:l,className:P("w-full h-full object-contain",r)})}function K4({children:a,className:l}){return e.jsx(bx,{content:a,className:l})}const al="/api/webui/emoji";async function Q4(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.search&&l.append("search",a.search),a.is_registered!==void 0&&l.append("is_registered",a.is_registered.toString()),a.is_banned!==void 0&&l.append("is_banned",a.is_banned.toString()),a.format&&l.append("format",a.format),a.sort_by&&l.append("sort_by",a.sort_by),a.sort_order&&l.append("sort_order",a.sort_order);const r=await ke(`${al}/list?${l}`,{});if(!r.ok)throw new Error(`获取表情包列表失败: ${r.statusText}`);return r.json()}async function Y4(a){const l=await ke(`${al}/${a}`,{});if(!l.ok)throw new Error(`获取表情包详情失败: ${l.statusText}`);return l.json()}async function J4(a,l){const r=await ke(`${al}/${a}`,{method:"PATCH",body:JSON.stringify(l)});if(!r.ok)throw new Error(`更新表情包失败: ${r.statusText}`);return r.json()}async function X4(a){const l=await ke(`${al}/${a}`,{method:"DELETE"});if(!l.ok)throw new Error(`删除表情包失败: ${l.statusText}`);return l.json()}async function Z4(){const a=await ke(`${al}/stats/summary`,{});if(!a.ok)throw new Error(`获取统计数据失败: ${a.statusText}`);return a.json()}async function W4(a){const l=await ke(`${al}/${a}/register`,{method:"POST"});if(!l.ok)throw new Error(`注册表情包失败: ${l.statusText}`);return l.json()}async function ek(a){const l=await ke(`${al}/${a}/ban`,{method:"POST"});if(!l.ok)throw new Error(`封禁表情包失败: ${l.statusText}`);return l.json()}function sk(a,l=!1){return l?`${al}/${a}/thumbnail?original=true`:`${al}/${a}/thumbnail`}function tk(a){return`${al}/${a}/thumbnail?original=true`}async function ak(a){const l=await ke(`${al}/batch/delete`,{method:"POST",body:JSON.stringify({emoji_ids:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量删除失败")}return l.json()}function lk(){return`${al}/upload`}function nk(){const[a,l]=u.useState([]),[r,c]=u.useState(null),[d,m]=u.useState(!1),[h,f]=u.useState(1),[p,g]=u.useState(0),[N,j]=u.useState(20),[b,y]=u.useState("all"),[w,z]=u.useState("all"),[M,S]=u.useState("all"),[F,E]=u.useState("usage_count"),[C,R]=u.useState("desc"),[H,O]=u.useState(null),[X,L]=u.useState(!1),[me,Ne]=u.useState(!1),[je,ce]=u.useState(!1),[ge,pe]=u.useState(new Set),[D,Q]=u.useState(!1),[B,ue]=u.useState(""),[Y,we]=u.useState("medium"),[fe,Ee]=u.useState(!1),{toast:G}=nt(),$=u.useCallback(async()=>{try{m(!0);const xe=await Q4({page:h,page_size:N,is_registered:b==="all"?void 0:b==="registered",is_banned:w==="all"?void 0:w==="banned",format:M==="all"?void 0:M,sort_by:F,sort_order:C});l(xe.data),g(xe.total)}catch(xe){const Me=xe instanceof Error?xe.message:"加载表情包列表失败";G({title:"错误",description:Me,variant:"destructive"})}finally{m(!1)}},[h,N,b,w,M,F,C,G]),A=async()=>{try{const xe=await Z4();c(xe.data)}catch(xe){console.error("加载统计数据失败:",xe)}};u.useEffect(()=>{$()},[$]),u.useEffect(()=>{A()},[]);const K=async xe=>{try{const Me=await Y4(xe.id);O(Me.data),L(!0)}catch(Me){const ds=Me instanceof Error?Me.message:"加载详情失败";G({title:"错误",description:ds,variant:"destructive"})}},Re=xe=>{O(xe),Ne(!0)},se=xe=>{O(xe),ce(!0)},$e=async()=>{if(H)try{await X4(H.id),G({title:"成功",description:"表情包已删除"}),ce(!1),O(null),$(),A()}catch(xe){const Me=xe instanceof Error?xe.message:"删除失败";G({title:"错误",description:Me,variant:"destructive"})}},cs=async xe=>{try{await W4(xe.id),G({title:"成功",description:"表情包已注册"}),$(),A()}catch(Me){const ds=Me instanceof Error?Me.message:"注册失败";G({title:"错误",description:ds,variant:"destructive"})}},J=async xe=>{try{await ek(xe.id),G({title:"成功",description:"表情包已封禁"}),$(),A()}catch(Me){const ds=Me instanceof Error?Me.message:"封禁失败";G({title:"错误",description:ds,variant:"destructive"})}},Z=xe=>{const Me=new Set(ge);Me.has(xe)?Me.delete(xe):Me.add(xe),pe(Me)},Le=async()=>{try{const xe=await ak(Array.from(ge));G({title:"批量删除完成",description:xe.message}),pe(new Set),Q(!1),$(),A()}catch(xe){G({title:"批量删除失败",description:xe instanceof Error?xe.message:"批量删除失败",variant:"destructive"})}},le=()=>{const xe=parseInt(B),Me=Math.ceil(p/N);xe>=1&&xe<=Me?(f(xe),ue("")):G({title:"无效的页码",description:`请输入1-${Me}之间的页码`,variant:"destructive"})},De=r?.formats?Object.keys(r.formats):[];return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-4 sm:mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"表情包管理"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"管理麦麦的表情包资源"})]}),e.jsxs(_,{onClick:()=>Ee(!0),className:"gap-2",children:[e.jsx(cc,{className:"h-4 w-4"}),"上传表情包"]})]}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 pr-4",children:[r&&e.jsxs("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[e.jsx(Te,{children:e.jsxs(Oe,{className:"pb-2",children:[e.jsx(Ns,{children:"总数"}),e.jsx(Ue,{className:"text-2xl",children:r.total})]})}),e.jsx(Te,{children:e.jsxs(Oe,{className:"pb-2",children:[e.jsx(Ns,{children:"已注册"}),e.jsx(Ue,{className:"text-2xl text-green-600",children:r.registered})]})}),e.jsx(Te,{children:e.jsxs(Oe,{className:"pb-2",children:[e.jsx(Ns,{children:"已封禁"}),e.jsx(Ue,{className:"text-2xl text-red-600",children:r.banned})]})}),e.jsx(Te,{children:e.jsxs(Oe,{className:"pb-2",children:[e.jsx(Ns,{children:"未注册"}),e.jsx(Ue,{className:"text-2xl text-gray-600",children:r.unregistered})]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx(Po,{className:"h-5 w-5"}),"筛选和排序"]})}),e.jsxs(ze,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"排序方式"}),e.jsxs(Pe,{value:`${F}-${C}`,onValueChange:xe=>{const[Me,ds]=xe.split("-");E(Me),R(ds),f(1)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"usage_count-desc",children:"使用次数 (多→少)"}),e.jsx(W,{value:"usage_count-asc",children:"使用次数 (少→多)"}),e.jsx(W,{value:"register_time-desc",children:"注册时间 (新→旧)"}),e.jsx(W,{value:"register_time-asc",children:"注册时间 (旧→新)"}),e.jsx(W,{value:"record_time-desc",children:"记录时间 (新→旧)"}),e.jsx(W,{value:"record_time-asc",children:"记录时间 (旧→新)"}),e.jsx(W,{value:"last_used_time-desc",children:"最后使用 (新→旧)"}),e.jsx(W,{value:"last_used_time-asc",children:"最后使用 (旧→新)"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"注册状态"}),e.jsxs(Pe,{value:b,onValueChange:xe=>{y(xe),f(1)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部"}),e.jsx(W,{value:"registered",children:"已注册"}),e.jsx(W,{value:"unregistered",children:"未注册"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"封禁状态"}),e.jsxs(Pe,{value:w,onValueChange:xe=>{z(xe),f(1)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部"}),e.jsx(W,{value:"banned",children:"已封禁"}),e.jsx(W,{value:"unbanned",children:"未封禁"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"格式"}),e.jsxs(Pe,{value:M,onValueChange:xe=>{S(xe),f(1)},children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部"}),De.map(xe=>e.jsxs(W,{value:xe,children:[xe.toUpperCase()," (",r?.formats[xe],")"]},xe))]})]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 pt-4 border-t",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[ge.size>0&&e.jsxs("span",{className:"text-sm text-muted-foreground",children:["已选择 ",ge.size," 个表情包"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{className:"text-sm whitespace-nowrap",children:"卡片大小"}),e.jsxs(Pe,{value:Y,onValueChange:xe=>we(xe),children:[e.jsx(Be,{className:"w-24",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"small",children:"小"}),e.jsx(W,{value:"medium",children:"中"}),e.jsx(W,{value:"large",children:"大"})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"emoji-page-size",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:N.toString(),onValueChange:xe=>{j(parseInt(xe)),f(1),pe(new Set)},children:[e.jsx(Be,{id:"emoji-page-size",className:"w-20",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"40",children:"40"}),e.jsx(W,{value:"60",children:"60"}),e.jsx(W,{value:"100",children:"100"})]})]}),ge.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>pe(new Set),children:"取消选择"}),e.jsxs(_,{variant:"destructive",size:"sm",onClick:()=>Q(!0),children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"批量删除"]})]})]})]}),e.jsx("div",{className:"flex justify-end pt-4 border-t",children:e.jsxs(_,{variant:"outline",size:"sm",onClick:$,disabled:d,children:[e.jsx(dt,{className:`h-4 w-4 mr-2 ${d?"animate-spin":""}`}),"刷新"]})})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"表情包列表"}),e.jsxs(Ns,{children:["共 ",p," 个表情包,当前第 ",h," 页"]})]}),e.jsxs(ze,{children:[a.length===0?e.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"暂无数据"}):e.jsx("div",{className:`grid gap-3 ${Y==="small"?"grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 xl:grid-cols-10":Y==="medium"?"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8":"grid-cols-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5"}`,children:a.map(xe=>e.jsxs("div",{className:`group relative rounded-lg border bg-card overflow-hidden hover:ring-2 hover:ring-primary transition-all cursor-pointer ${ge.has(xe.id)?"ring-2 ring-primary bg-primary/5":""}`,onClick:()=>Z(xe.id),children:[e.jsx("div",{className:`absolute top-1 left-1 z-10 transition-opacity ${ge.has(xe.id)?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:e.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center ${ge.has(xe.id)?"bg-primary border-primary text-primary-foreground":"bg-background/80 border-muted-foreground/50"}`,children:ge.has(xe.id)&&e.jsx(st,{className:"h-3 w-3"})})}),e.jsxs("div",{className:"absolute top-1 right-1 z-10 flex flex-col gap-0.5",children:[xe.is_registered&&e.jsx(Ce,{variant:"default",className:"bg-green-600 text-[10px] px-1 py-0",children:"已注册"}),xe.is_banned&&e.jsx(Ce,{variant:"destructive",className:"text-[10px] px-1 py-0",children:"已封禁"})]}),e.jsx("div",{className:`aspect-square bg-muted flex items-center justify-center overflow-hidden ${Y==="small"?"p-1":Y==="medium"?"p-2":"p-3"}`,children:e.jsx(G4,{src:sk(xe.id),alt:"表情包"})}),e.jsxs("div",{className:`border-t bg-card ${Y==="small"?"p-1":"p-2"}`,children:[e.jsxs("div",{className:"flex items-center justify-between gap-1 text-xs text-muted-foreground mb-1",children:[e.jsx(Ce,{variant:"outline",className:"text-[10px] px-1 py-0",children:xe.format.toUpperCase()}),e.jsxs("span",{className:"font-mono",children:[xe.usage_count,"次"]})]}),e.jsxs("div",{className:`flex gap-1 justify-center opacity-0 group-hover:opacity-100 transition-opacity ${Y==="small"?"flex-wrap":""}`,children:[e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:Me=>{Me.stopPropagation(),Re(xe)},title:"编辑",children:e.jsx(sr,{className:"h-3 w-3"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:Me=>{Me.stopPropagation(),K(xe)},title:"详情",children:e.jsx(Yt,{className:"h-3 w-3"})}),!xe.is_registered&&e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6 text-green-600 hover:text-green-700",onClick:Me=>{Me.stopPropagation(),cs(xe)},title:"注册",children:e.jsx(st,{className:"h-3 w-3"})}),!xe.is_banned&&e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6 text-orange-600 hover:text-orange-700",onClick:Me=>{Me.stopPropagation(),J(xe)},title:"封禁",children:e.jsx(iv,{className:"h-3 w-3"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6 text-red-600 hover:text-red-700",onClick:Me=>{Me.stopPropagation(),se(xe)},title:"删除",children:e.jsx(os,{className:"h-3 w-3"})})]})]})]},xe.id))}),p>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 mt-4",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["显示 ",(h-1)*N+1," 到"," ",Math.min(h*N,p)," 条,共 ",p," 条"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(1),disabled:h===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(xe=>Math.max(1,xe-1)),disabled:h===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{type:"number",value:B,onChange:xe=>ue(xe.target.value),onKeyDown:xe=>xe.key==="Enter"&&le(),placeholder:h.toString(),className:"w-16 h-8 text-center",min:1,max:Math.ceil(p/N)}),e.jsx(_,{variant:"outline",size:"sm",onClick:le,disabled:!B,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(xe=>xe+1),disabled:h>=Math.ceil(p/N),children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(Math.ceil(p/N)),disabled:h>=Math.ceil(p/N),className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]})]}),e.jsx(rk,{emoji:H,open:X,onOpenChange:L}),e.jsx(ik,{emoji:H,open:me,onOpenChange:Ne,onSuccess:()=>{$(),A()}}),e.jsx(ck,{open:fe,onOpenChange:Ee,onSuccess:()=>{$(),A()}})]})}),e.jsx(bs,{open:D,onOpenChange:Q,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["你确定要删除选中的 ",ge.size," 个表情包吗?此操作不可撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:Le,children:"确认删除"})]})]})}),e.jsx(Qs,{open:je,onOpenChange:ce,children:e.jsxs(Hs,{children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"确认删除"}),e.jsx(at,{children:"确定要删除这个表情包吗?此操作无法撤销。"})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>ce(!1),children:"取消"}),e.jsx(_,{variant:"destructive",onClick:$e,children:"删除"})]})]})})]})}function rk({emoji:a,open:l,onOpenChange:r}){if(!a)return null;const c=d=>d?new Date(d*1e3).toLocaleString("zh-CN"):"-";return e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[90vh]",children:[e.jsx(qs,{children:e.jsx(Vs,{children:"表情包详情"})}),e.jsx(ts,{className:"max-h-[calc(90vh-8rem)] pr-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-32 h-32 bg-muted rounded-lg flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:tk(a.id),alt:a.description||"表情包",className:"w-full h-full object-cover",onError:d=>{const m=d.target;m.style.display="none";const h=m.parentElement;h&&(h.innerHTML='')}})})}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"ID"}),e.jsx("div",{className:"mt-1 font-mono",children:a.id})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"格式"}),e.jsx("div",{className:"mt-1",children:e.jsx(Ce,{variant:"outline",children:a.format.toUpperCase()})})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"文件路径"}),e.jsx("div",{className:"mt-1 font-mono text-sm break-all bg-muted p-2 rounded",children:a.full_path})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"哈希值"}),e.jsx("div",{className:"mt-1 font-mono text-sm break-all bg-muted p-2 rounded",children:a.emoji_hash})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"描述"}),a.description?e.jsx("div",{className:"mt-1 rounded-lg border bg-muted/50 p-3",children:e.jsx(K4,{className:"prose-sm",children:a.description})}):e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:"-"})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"情绪"}),e.jsx("div",{className:"mt-1",children:a.emotion?e.jsx("span",{className:"text-sm",children:a.emotion}):e.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"状态"}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[a.is_registered&&e.jsx(Ce,{variant:"default",className:"bg-green-600",children:"已注册"}),a.is_banned&&e.jsx(Ce,{variant:"destructive",children:"已封禁"}),!a.is_registered&&!a.is_banned&&e.jsx(Ce,{variant:"outline",children:"未注册"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"使用次数"}),e.jsx("div",{className:"mt-1 font-mono text-lg",children:a.usage_count})]})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"记录时间"}),e.jsx("div",{className:"mt-1 text-sm",children:c(a.record_time)})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"注册时间"}),e.jsx("div",{className:"mt-1 text-sm",children:c(a.register_time)})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"最后使用"}),e.jsx("div",{className:"mt-1 text-sm",children:c(a.last_used_time)})]})]})})]})})}function ik({emoji:a,open:l,onOpenChange:r,onSuccess:c}){const[d,m]=u.useState(""),[h,f]=u.useState(!1),[p,g]=u.useState(!1),[N,j]=u.useState(!1),{toast:b}=nt();u.useEffect(()=>{a&&(m(a.emotion||""),f(a.is_registered),g(a.is_banned))},[a]);const y=async()=>{if(a)try{j(!0);const w=d.split(/[,,]/).map(z=>z.trim()).filter(Boolean).join(",");await J4(a.id,{emotion:w||void 0,is_registered:h,is_banned:p}),b({title:"成功",description:"表情包信息已更新"}),r(!1),c()}catch(w){const z=w instanceof Error?w.message:"保存失败";b({title:"错误",description:z,variant:"destructive"})}finally{j(!1)}};return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑表情包"}),e.jsx(at,{children:"修改表情包的情绪和状态信息"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(T,{children:"情绪"}),e.jsx(pt,{value:d,onChange:w=>m(w.target.value),placeholder:"输入情绪描述...",rows:2,className:"mt-1"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"输入情绪相关的文本描述"})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"is_registered",checked:h,onCheckedChange:w=>{w===!0?(f(!0),g(!1)):f(!1)}}),e.jsx(T,{htmlFor:"is_registered",className:"cursor-pointer",children:"已注册"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"is_banned",checked:p,onCheckedChange:w=>{w===!0?(g(!0),f(!1)):g(!1)}}),e.jsx(T,{htmlFor:"is_banned",className:"cursor-pointer",children:"已封禁"})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(_,{onClick:y,disabled:N,children:N?"保存中...":"保存"})]})]})}):null}function ck({open:a,onOpenChange:l,onSuccess:r}){const[c,d]=u.useState("select"),[m,h]=u.useState([]),[f,p]=u.useState(null),[g,N]=u.useState(!1),{toast:j}=nt(),b=u.useMemo(()=>new N_({id:"emoji-uploader",autoProceed:!1,restrictions:{maxFileSize:10485760,allowedFileTypes:["image/jpeg","image/png","image/gif","image/webp"],maxNumberOfFiles:20},locale:{pluralize:()=>0,strings:{addMoreFiles:"添加更多文件",addingMoreFiles:"正在添加更多文件",allowedFileTypes:"允许的文件类型:%{types}",cancel:"取消",closeModal:"关闭",complete:"完成",connectedToInternet:"已连接到互联网",copyLink:"复制链接",copyLinkToClipboardFallback:"复制下方链接",copyLinkToClipboardSuccess:"链接已复制到剪贴板",dashboardTitle:"选择文件",dashboardWindowTitle:"文件选择窗口(按 ESC 关闭)",done:"完成",dropHereOr:"拖放文件到这里或 %{browse}",dropHint:"将文件拖放到此处",dropPasteFiles:"将文件拖放到这里或 %{browseFiles}",dropPasteFolders:"将文件拖放到这里或 %{browseFolders}",dropPasteBoth:"将文件拖放到这里,%{browseFiles} 或 %{browseFolders}",dropPasteImportFiles:"将文件拖放到这里,%{browseFiles} 或从以下位置导入:",dropPasteImportFolders:"将文件拖放到这里,%{browseFolders} 或从以下位置导入:",dropPasteImportBoth:"将文件拖放到这里,%{browseFiles},%{browseFolders} 或从以下位置导入:",editFile:"编辑文件",editing:"正在编辑 %{file}",emptyFolderAdded:"未从空文件夹添加文件",exceedsSize:"%{file} 超过了最大允许大小 %{size}",failedToUpload:"上传 %{file} 失败",fileSource:"文件来源:%{name}",filesUploadedOfTotal:{0:"已上传 %{complete} / %{smart_count} 个文件",1:"已上传 %{complete} / %{smart_count} 个文件"},filter:"筛选",finishEditingFile:"完成编辑文件",folderAdded:{0:"已从 %{folder} 添加 %{smart_count} 个文件",1:"已从 %{folder} 添加 %{smart_count} 个文件"},generatingThumbnails:"正在生成缩略图...",import:"导入",importFiles:"从以下位置导入文件:",importFrom:"从 %{name} 导入",loading:"加载中...",logOut:"登出",myDevice:"我的设备",noFilesFound:"这里没有文件或文件夹",noInternetConnection:"无网络连接",openFolderNamed:"打开文件夹 %{name}",pause:"暂停",pauseUpload:"暂停上传",paused:"已暂停",poweredBy:"技术支持:%{uppy}",processingXFiles:{0:"正在处理 %{smart_count} 个文件",1:"正在处理 %{smart_count} 个文件"},recording:"录制中",removeFile:"移除文件",resetFilter:"重置筛选",resume:"继续",resumeUpload:"继续上传",retry:"重试",retryUpload:"重试上传",save:"保存",saveChanges:"保存更改",selectFileNamed:"选择文件 %{name}",selectX:{0:"选择 %{smart_count}",1:"选择 %{smart_count}"},smile:"笑一个!",startRecording:"开始录制视频",stopRecording:"停止录制视频",takePicture:"拍照",timedOut:"上传已停滞 %{seconds} 秒,正在中止。",upload:"下一步",uploadComplete:"上传完成",uploadFailed:"上传失败",uploadPaused:"上传已暂停",uploadXFiles:{0:"下一步(%{smart_count} 个文件)",1:"下一步(%{smart_count} 个文件)"},uploadXNewFiles:{0:"下一步(+%{smart_count} 个文件)",1:"下一步(+%{smart_count} 个文件)"},uploading:"正在上传",uploadingXFiles:{0:"正在上传 %{smart_count} 个文件",1:"正在上传 %{smart_count} 个文件"},xFilesSelected:{0:"已选择 %{smart_count} 个文件",1:"已选择 %{smart_count} 个文件"},xMoreFilesAdded:{0:"又添加了 %{smart_count} 个文件",1:"又添加了 %{smart_count} 个文件"},xTimeLeft:"剩余 %{time}",youCanOnlyUploadFileTypes:"您只能上传:%{types}",youCanOnlyUploadX:{0:"您只能上传 %{smart_count} 个文件",1:"您只能上传 %{smart_count} 个文件"},youHaveToAtLeastSelectX:{0:"您至少需要选择 %{smart_count} 个文件",1:"您至少需要选择 %{smart_count} 个文件"},browseFiles:"浏览文件",browseFolders:"浏览文件夹",cancelUpload:"取消上传",addMore:"添加更多",back:"返回",editFileWithFilename:"编辑文件 %{file}"}}}),[]);u.useEffect(()=>{const H=()=>{const O=b.getFiles();if(O.length===0)return;const X=O.map(L=>({id:L.id,name:L.name,previewUrl:L.preview||URL.createObjectURL(L.data),emotion:"",description:"",isRegistered:!0,file:L.data}));h(X),O.length===1?(p(X[0].id),d("edit-single")):d("edit-multiple")};return b.on("upload",H),()=>{b.off("upload",H)}},[b]),u.useEffect(()=>{a||(b.cancelAll(),d("select"),h([]),p(null),N(!1))},[a,b]);const y=u.useCallback((H,O)=>{h(X=>X.map(L=>L.id===H?{...L,...O}:L))},[]),w=u.useCallback(H=>H.emotion.trim().length>0,[]),z=u.useMemo(()=>m.length>0&&m.every(w),[m,w]),M=u.useMemo(()=>m.find(H=>H.id===f)||null,[m,f]),S=u.useCallback(()=>{(c==="edit-single"||c==="edit-multiple")&&(d("select"),h([]),p(null))},[c]),F=u.useCallback(async()=>{if(!z){j({title:"请填写必填项",description:"每个表情包的情感标签都是必填的",variant:"destructive"});return}N(!0);let H=0,O=0;try{for(const X of m){const L=new FormData;L.append("file",X.file),L.append("emotion",X.emotion),L.append("description",X.description),L.append("is_registered",X.isRegistered.toString());try{(await ke(lk(),{method:"POST",body:L})).ok?H++:O++}catch{O++}}O===0?(j({title:"上传成功",description:`成功上传 ${H} 个表情包`}),l(!1),r()):(j({title:"部分上传失败",description:`成功 ${H} 个,失败 ${O} 个`,variant:"destructive"}),r())}finally{N(!1)}},[z,m,j,l,r]),E=()=>e.jsx("div",{className:"space-y-4",children:e.jsx("div",{className:"border rounded-lg overflow-hidden w-full",children:e.jsx(V4,{uppy:b,proudlyDisplayPoweredByUppy:!1,hideProgressDetails:!0,height:350,width:"100%",theme:"auto",note:"支持 JPG、PNG、GIF、WebP 格式,最多 20 个文件"})})}),C=()=>{const H=m[0];return H?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(_,{variant:"ghost",size:"sm",onClick:S,children:[e.jsx($a,{className:"h-4 w-4 mr-1"}),"返回"]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"编辑表情包信息"})]}),e.jsxs("div",{className:"flex gap-6",children:[e.jsxs("div",{className:"flex-shrink-0",children:[e.jsx("div",{className:"w-32 h-32 rounded-lg border overflow-hidden bg-muted flex items-center justify-center",children:e.jsx("img",{src:H.previewUrl,alt:H.name,className:"max-w-full max-h-full object-contain"})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2 text-center truncate max-w-32",children:H.name})]}),e.jsxs("div",{className:"flex-1 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"single-emotion",children:["情感标签 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ne,{id:"single-emotion",value:H.emotion,onChange:O=>y(H.id,{emotion:O.target.value}),placeholder:"多个标签用逗号分隔,如:开心,高兴",className:H.emotion.trim()?"":"border-destructive"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"用于情感匹配,多个标签用逗号分隔"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"single-description",children:"描述"}),e.jsx(ne,{id:"single-description",value:H.description,onChange:O=>y(H.id,{description:O.target.value}),placeholder:"输入表情包描述..."})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"single-is-registered",checked:H.isRegistered,onCheckedChange:O=>y(H.id,{isRegistered:O===!0})}),e.jsx(T,{htmlFor:"single-is-registered",className:"cursor-pointer",children:"上传后立即注册(可被麦麦使用)"})]})]})]}),e.jsx(gt,{children:e.jsx(_,{onClick:F,disabled:!z||g,children:g?"上传中...":"上传"})})]}):null},R=()=>{const H=m.filter(w).length,O=m.length;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(_,{variant:"ghost",size:"sm",onClick:S,children:[e.jsx($a,{className:"h-4 w-4 mr-1"}),"返回"]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["编辑表情包信息(",H,"/",O," 已完成)"]})]}),e.jsx(Ce,{variant:z?"default":"secondary",children:z?e.jsxs(e.Fragment,{children:[e.jsx(Ot,{className:"h-3 w-3 mr-1"}),"全部完成"]}):e.jsxs(e.Fragment,{children:[e.jsx(Sa,{className:"h-3 w-3 mr-1"}),"未完成"]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(ts,{className:"h-[350px] pr-2",children:e.jsx("div",{className:"space-y-2",children:m.map(X=>{const L=w(X),me=f===X.id;return e.jsxs("div",{onClick:()=>p(X.id),className:` +`)}function Vm(a){if(!a.trim())return{valid:!1,error:"路径不能为空"};if(!a.toLowerCase().endsWith(".toml"))return{valid:!1,error:"文件必须是 .toml 格式"};const l=/^([a-zA-Z]:\\|\\\\[^\\]+\\[^\\]+\\).+\.toml$/i,r=/^(\/|~\/).+\.toml$/i,c=/^(\.{1,2}[\\/]|[^:\\/]).+\.toml$/i,d=l.test(a),m=r.test(a),h=c.test(a);return!d&&!m&&!h?{valid:!1,error:"路径格式错误"}:/[<>"|?*\x00-\x1F]/.test(a)?{valid:!1,error:"路径包含非法字符"}:{valid:!0,error:""}}function L4(){const[a,l]=u.useState("upload"),[r,c]=u.useState(null),[d,m]=u.useState(""),[h,f]=u.useState(""),[p,g]=u.useState("oneclick"),[N,j]=u.useState(""),[b,y]=u.useState(!1),[w,z]=u.useState(!1),[M,S]=u.useState(!1),[F,E]=u.useState(!1),[C,R]=u.useState(null),[H,O]=u.useState(!1),X=u.useRef(null),{toast:L}=nt(),me=u.useRef(null),Ne=A=>{if(f(A),A.trim()){const K=Vm(A);j(K.error)}else j("")},je=u.useCallback(async A=>{const K=Fm[A];z(!0);try{const Re=await ej(K.path),se=Hm(Re);c(se),g(A),f(K.path),await Wg(K.path),L({title:"加载成功",description:`已从${K.name}预设加载配置`})}catch(Re){console.error("加载预设配置失败:",Re),L({title:"加载失败",description:Re instanceof Error?Re.message:"无法读取预设配置文件",variant:"destructive"})}finally{z(!1)}},[L]),re=u.useCallback(async A=>{const K=Vm(A);if(!K.valid){j(K.error),L({title:"路径无效",description:K.error,variant:"destructive"});return}j(""),z(!0);try{const Re=await ej(A),se=Hm(Re);c(se),f(A),await Wg(A),L({title:"加载成功",description:"已从配置文件加载"})}catch(Re){console.error("加载配置失败:",Re),L({title:"加载失败",description:Re instanceof Error?Re.message:"无法读取配置文件",variant:"destructive"})}finally{z(!1)}},[L]);u.useEffect(()=>{(async()=>{try{const K=await D4();if(K&&K.path){f(K.path);const Re=Object.entries(Fm).find(([,se])=>se.path===K.path);Re?(l("preset"),g(Re[0]),await je(Re[0])):(l("path"),await re(K.path))}}catch(K){console.error("加载保存的路径失败:",K)}})()},[re,je]);const ge=u.useCallback(A=>{a!=="path"&&a!=="preset"||!h||(me.current&&clearTimeout(me.current),me.current=setTimeout(async()=>{y(!0);try{const K=qm(A);await sj(h,K),L({title:"自动保存成功",description:"配置已保存到文件"})}catch(K){console.error("自动保存失败:",K),L({title:"自动保存失败",description:K instanceof Error?K.message:"保存配置失败",variant:"destructive"})}finally{y(!1)}},1e3))},[a,h,L]),pe=async()=>{if(!r||!h)return;const A=Vm(h);if(!A.valid){L({title:"保存失败",description:A.error,variant:"destructive"});return}y(!0);try{const K=qm(r);await sj(h,K),L({title:"保存成功",description:"配置已保存到文件"})}catch(K){console.error("保存失败:",K),L({title:"保存失败",description:K instanceof Error?K.message:"保存配置失败",variant:"destructive"})}finally{y(!1)}},D=async()=>{h&&await re(h)},Q=A=>{if(A!==a){if(r){R(A),S(!0);return}I(A)}},I=A=>{c(null),m(""),j(""),l(A),A==="preset"&&je("oneclick"),L({title:"已切换模式",description:{upload:"现在可以上传配置文件",path:"现在可以指定配置文件路径",preset:"现在可以使用预设配置"}[A]})},ue=()=>{C&&(I(C),R(null)),S(!1)},Y=()=>{if(r){E(!0);return}we()},we=()=>{f(""),c(null),j(""),L({title:"已清空",description:"路径和配置已清空"})},fe=()=>{we(),E(!1)},Ee=A=>{const K=A.target.files?.[0];if(!K)return;const Re=new FileReader;Re.onload=se=>{try{const $e=se.target?.result,cs=Hm($e);c(cs),m(K.name),L({title:"上传成功",description:`已加载配置文件:${K.name}`})}catch($e){console.error("解析配置文件失败:",$e),L({title:"解析失败",description:"配置文件格式错误,请检查文件内容",variant:"destructive"})}},Re.readAsText(K)},G=()=>{if(!r)return;const A=qm(r),K=new Blob([A],{type:"text/plain;charset=utf-8"}),Re=URL.createObjectURL(K),se=document.createElement("a");se.href=Re,se.download=d||"config.toml",document.body.appendChild(se),se.click(),document.body.removeChild(se),URL.revokeObjectURL(Re),L({title:"下载成功",description:"配置文件已下载,请手动覆盖并重启适配器"})},$=()=>{c(JSON.parse(JSON.stringify(kt))),m("config.toml"),L({title:"已加载默认配置",description:"可以开始编辑配置"})};return e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"麦麦适配器配置"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理麦麦的 QQ 适配器的配置文件"})]})}),e.jsx(xc,{open:H,onOpenChange:O,children:e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Ue,{children:"工作模式"}),e.jsx(Ns,{children:"选择配置文件的管理方式"})]}),e.jsx(hc,{asChild:!0,children:e.jsxs(_,{variant:"ghost",size:"sm",className:"w-9 p-0",children:[e.jsx(Ia,{className:`h-4 w-4 transition-transform duration-200 ${H?"transform rotate-180":""}`}),e.jsx("span",{className:"sr-only",children:"切换"})]})})]})}),e.jsx(fc,{children:e.jsxs(ze,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 md:gap-4",children:[e.jsx("div",{className:`border-2 rounded-lg p-3 md:p-4 cursor-pointer transition-all ${a==="preset"?"border-primary bg-primary/5":"border-muted hover:border-primary/50 active:border-primary/70"}`,onClick:()=>Q("preset"),children:e.jsxs("div",{className:"flex items-start gap-2 md:gap-3",children:[e.jsx(xa,{className:"h-4 w-4 md:h-5 md:w-5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-semibold text-sm md:text-base",children:"预设模式"}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-1 line-clamp-2",children:"使用预设的部署配置"})]})]})}),e.jsx("div",{className:`border-2 rounded-lg p-3 md:p-4 cursor-pointer transition-all ${a==="upload"?"border-primary bg-primary/5":"border-muted hover:border-primary/50 active:border-primary/70"}`,onClick:()=>Q("upload"),children:e.jsxs("div",{className:"flex items-start gap-2 md:gap-3",children:[e.jsx(cc,{className:"h-4 w-4 md:h-5 md:w-5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-semibold text-sm md:text-base",children:"上传文件模式"}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-1 line-clamp-2",children:"上传配置文件,编辑后下载并手动覆盖"})]})]})}),e.jsx("div",{className:`border-2 rounded-lg p-3 md:p-4 cursor-pointer transition-all ${a==="path"?"border-primary bg-primary/5":"border-muted hover:border-primary/50 active:border-primary/70"}`,onClick:()=>Q("path"),children:e.jsxs("div",{className:"flex items-start gap-2 md:gap-3",children:[e.jsx(B_,{className:"h-4 w-4 md:h-5 md:w-5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-semibold text-sm md:text-base",children:"指定路径模式"}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-1 line-clamp-2",children:"指定配置文件路径,自动加载和保存"})]})]})})]}),a==="preset"&&e.jsxs("div",{className:"space-y-3 pt-2 border-t",children:[e.jsx(T,{className:"text-sm md:text-base",children:"选择部署方式"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Object.entries(Fm).map(([A,K])=>{const Re=K.icon,se=p===A;return e.jsx("div",{className:`border-2 rounded-lg p-3 cursor-pointer transition-all ${se?"border-primary bg-primary/5":"border-muted hover:border-primary/50"}`,onClick:()=>{g(A),je(A)},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Re,{className:"h-5 w-5 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h4",{className:"font-semibold text-sm",children:K.name}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:K.description}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 font-mono break-all",children:K.path})]})]})},A)})})]}),a==="path"&&e.jsxs("div",{className:"space-y-3 pt-2 border-t",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"config-path",className:"text-sm md:text-base",children:"配置文件路径"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx(ae,{id:"config-path",value:h,onChange:A=>Ne(A.target.value),placeholder:"例: C:\\Adapter\\config.toml",className:`text-sm ${N?"border-destructive":""}`}),N&&e.jsx("p",{className:"text-xs text-destructive",children:N})]}),e.jsx(_,{onClick:()=>re(h),disabled:w||!h||!!N,className:"w-full sm:w-auto",children:w?e.jsxs(e.Fragment,{children:[e.jsx(dt,{className:"h-4 w-4 animate-spin mr-2"}),e.jsx("span",{className:"sm:hidden",children:"加载中..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sm:hidden",children:"加载配置"}),e.jsx("span",{className:"hidden sm:inline",children:"加载"})]})})]})]}),e.jsxs("details",{className:"rounded-lg bg-muted/50 p-3 group",children:[e.jsxs("summary",{className:"text-xs font-medium cursor-pointer select-none list-none flex items-center justify-between",children:[e.jsx("span",{children:"路径格式说明"}),e.jsx("svg",{className:"h-4 w-4 transition-transform group-open:rotate-180",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e.jsxs("div",{className:"mt-2 space-y-2 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"font-mono bg-background px-1.5 py-0.5 rounded text-[10px] md:text-xs whitespace-nowrap",children:"Windows"})}),e.jsxs("div",{className:"pl-2 space-y-0.5 text-[10px] md:text-xs break-all",children:[e.jsx("div",{children:"C:\\Adapter\\config.toml"}),e.jsx("div",{className:"hidden sm:block",children:"D:\\MaiBot\\adapter\\config.toml"}),e.jsx("div",{className:"hidden sm:block",children:"\\\\server\\share\\config.toml"})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"font-mono bg-background px-1.5 py-0.5 rounded text-[10px] md:text-xs whitespace-nowrap",children:"Linux"})}),e.jsxs("div",{className:"pl-2 space-y-0.5 text-[10px] md:text-xs break-all",children:[e.jsx("div",{children:"/opt/adapter/config.toml"}),e.jsx("div",{className:"hidden sm:block",children:"/home/user/adapter/config.toml"}),e.jsx("div",{className:"hidden sm:block",children:"~/adapter/config.toml"})]})]}),e.jsx("p",{className:"pt-1 border-t text-[10px] md:text-xs",children:"💡 配置会自动保存到指定文件,修改后 1 秒自动保存"})]})]})]})]})})]})}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(ft,{children:a==="preset"?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:"预设模式:"}),"选择预设的部署方式,配置会自动加载,修改后 1 秒自动保存",b&&" (正在保存...)"]}):a==="upload"?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:"上传文件模式:"}),"上传配置文件 → 在线编辑 → 下载文件 → 手动覆盖并重启适配器"]}):e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:"指定路径模式:"}),"指定配置文件路径后,配置会自动加载,修改后 1 秒自动保存",b&&" (正在保存...)"]})})]}),a==="upload"&&!r&&e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[e.jsx("input",{ref:X,type:"file",accept:".toml",className:"hidden",onChange:Ee}),e.jsxs(_,{onClick:()=>X.current?.click(),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[e.jsx(cc,{className:"mr-2 h-4 w-4"}),"上传配置"]}),e.jsxs(_,{onClick:$,size:"sm",className:"w-full sm:w-auto",children:[e.jsx(Ua,{className:"mr-2 h-4 w-4"}),"使用默认配置"]})]}),a==="upload"&&r&&e.jsx("div",{className:"flex gap-2",children:e.jsxs(_,{onClick:G,size:"sm",className:"w-full sm:w-auto",children:[e.jsx(na,{className:"mr-2 h-4 w-4"}),"下载配置"]})}),(a==="preset"||a==="path")&&r&&e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs(_,{onClick:pe,size:"sm",disabled:b||!!N,className:"w-full sm:w-auto",children:[e.jsx(gc,{className:"mr-2 h-4 w-4"}),b?"保存中...":"立即保存"]}),e.jsxs(_,{onClick:D,size:"sm",variant:"outline",disabled:w,className:"w-full sm:w-auto",children:[e.jsx(dt,{className:`mr-2 h-4 w-4 ${w?"animate-spin":""}`}),"刷新"]}),a==="path"&&e.jsxs(_,{onClick:Y,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[e.jsx(os,{className:"mr-2 h-4 w-4"}),"清空路径"]})]}),r?e.jsxs(Jt,{defaultValue:"napcat",className:"w-full",children:[e.jsx("div",{className:"overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0",children:e.jsxs(Gt,{className:"inline-flex w-auto min-w-full sm:grid sm:w-full sm:grid-cols-5",children:[e.jsxs(Xe,{value:"napcat",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:[e.jsx("span",{className:"hidden sm:inline",children:"Napcat 连接"}),e.jsx("span",{className:"sm:hidden",children:"Napcat"})]}),e.jsxs(Xe,{value:"maibot",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:[e.jsx("span",{className:"hidden sm:inline",children:"麦麦连接"}),e.jsx("span",{className:"sm:hidden",children:"麦麦"})]}),e.jsxs(Xe,{value:"chat",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:[e.jsx("span",{className:"hidden sm:inline",children:"聊天控制"}),e.jsx("span",{className:"sm:hidden",children:"聊天"})]}),e.jsxs(Xe,{value:"voice",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:[e.jsx("span",{className:"hidden sm:inline",children:"语音与转发"}),e.jsx("span",{className:"sm:hidden",children:"语音"})]}),e.jsx(Xe,{value:"debug",className:"flex-shrink-0 text-xs sm:text-sm whitespace-nowrap",children:"调试"})]})}),e.jsx(Ss,{value:"napcat",className:"space-y-4",children:e.jsx(U4,{config:r,onChange:A=>{c(A),ge(A)}})}),e.jsx(Ss,{value:"maibot",className:"space-y-4",children:e.jsx($4,{config:r,onChange:A=>{c(A),ge(A)}})}),e.jsx(Ss,{value:"chat",className:"space-y-4",children:e.jsx(I4,{config:r,onChange:A=>{c(A),ge(A)}})}),e.jsx(Ss,{value:"voice",className:"space-y-4",children:e.jsx(B4,{config:r,onChange:A=>{c(A),ge(A)}})}),e.jsx(Ss,{value:"debug",className:"space-y-4",children:e.jsx(P4,{config:r,onChange:A=>{c(A),ge(A)}})})]}):e.jsx("div",{className:"rounded-lg border bg-card p-6 md:p-12",children:e.jsxs("div",{className:"text-center space-y-3 md:space-y-4",children:[e.jsx(Ua,{className:"h-12 w-12 md:h-16 md:w-16 mx-auto text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold",children:"尚未加载配置"}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mt-2 px-4",children:a==="preset"?"请选择预设的部署方式":a==="upload"?"请上传现有配置文件,或使用默认配置开始编辑":"请指定配置文件路径并点击加载按钮"})]})]})}),e.jsx(bs,{open:M,onOpenChange:S,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认切换模式"}),e.jsxs(gs,{children:["切换模式将清空当前配置,确定要继续吗?",e.jsx("br",{}),e.jsx("span",{className:"text-destructive font-medium",children:"请确保已保存重要配置"})]})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:()=>{S(!1),R(null)},children:"取消"}),e.jsx(js,{onClick:ue,children:"确认切换"})]})]})}),e.jsx(bs,{open:F,onOpenChange:E,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认清空路径"}),e.jsxs(gs,{children:["清空路径将清除当前配置,确定要继续吗?",e.jsx("br",{}),e.jsx("span",{className:"text-muted-foreground text-sm",children:"此操作不会删除配置文件,只是清除界面中的配置"})]})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:()=>E(!1),children:"取消"}),e.jsx(js,{onClick:fe,className:"bg-destructive hover:bg-destructive/90",children:"确认清空"})]})]})})]})})}function U4({config:a,onChange:l}){return e.jsx("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"Napcat WebSocket 服务设置"}),e.jsxs("div",{className:"grid gap-3 md:gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"napcat-host",className:"text-sm md:text-base",children:"主机地址"}),e.jsx(ae,{id:"napcat-host",value:a.napcat_server.host,onChange:r=>l({...a,napcat_server:{...a.napcat_server,host:r.target.value}}),placeholder:"localhost",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Napcat 设定的主机地址"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"napcat-port",className:"text-sm md:text-base",children:"端口"}),e.jsx(ae,{id:"napcat-port",type:"number",value:a.napcat_server.port||"",onChange:r=>l({...a,napcat_server:{...a.napcat_server,port:r.target.value?parseInt(r.target.value):0}}),placeholder:"8095",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Napcat 设定的端口(留空使用默认值 8095)"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"napcat-token",className:"text-sm md:text-base",children:"访问令牌(Token)"}),e.jsx(ae,{id:"napcat-token",type:"password",value:a.napcat_server.token,onChange:r=>l({...a,napcat_server:{...a.napcat_server,token:r.target.value}}),placeholder:"留空表示无需令牌",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Napcat 设定的访问令牌,若无则留空"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"napcat-heartbeat",className:"text-sm md:text-base",children:"心跳间隔(秒)"}),e.jsx(ae,{id:"napcat-heartbeat",type:"number",value:a.napcat_server.heartbeat_interval||"",onChange:r=>l({...a,napcat_server:{...a.napcat_server,heartbeat_interval:r.target.value?parseInt(r.target.value):0}}),placeholder:"30",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"与 Napcat 设置的心跳间隔保持一致(留空使用默认值 30)"})]})]})]})})}function $4({config:a,onChange:l}){return e.jsx("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"麦麦 WebSocket 服务设置"}),e.jsxs("div",{className:"grid gap-3 md:gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"maibot-host",className:"text-sm md:text-base",children:"主机地址"}),e.jsx(ae,{id:"maibot-host",value:a.maibot_server.host,onChange:r=>l({...a,maibot_server:{...a.maibot_server,host:r.target.value}}),placeholder:"localhost",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦在 .env 文件中设置的 HOST 字段"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"maibot-port",className:"text-sm md:text-base",children:"端口"}),e.jsx(ae,{id:"maibot-port",type:"number",value:a.maibot_server.port||"",onChange:r=>l({...a,maibot_server:{...a.maibot_server,port:r.target.value?parseInt(r.target.value):0}}),placeholder:"8000",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦在 .env 文件中设置的 PORT 字段(留空使用默认值 8000)"})]})]})]})})}function I4({config:a,onChange:l}){const r=m=>{const h={...a};m==="group"?h.chat.group_list=[...h.chat.group_list,0]:m==="private"?h.chat.private_list=[...h.chat.private_list,0]:h.chat.ban_user_id=[...h.chat.ban_user_id,0],l(h)},c=(m,h)=>{const f={...a};m==="group"?f.chat.group_list=f.chat.group_list.filter((p,g)=>g!==h):m==="private"?f.chat.private_list=f.chat.private_list.filter((p,g)=>g!==h):f.chat.ban_user_id=f.chat.ban_user_id.filter((p,g)=>g!==h),l(f)},d=(m,h,f)=>{const p={...a};m==="group"?p.chat.group_list[h]=f:m==="private"?p.chat.private_list[h]=f:p.chat.ban_user_id[h]=f,l(p)};return e.jsx("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"聊天黑白名单功能"}),e.jsxs("div",{className:"grid gap-4 md:gap-6",children:[e.jsxs("div",{className:"space-y-3 md:space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-sm md:text-base",children:"群组名单类型"}),e.jsxs(Pe,{value:a.chat.group_list_type,onValueChange:m=>l({...a,chat:{...a.chat,group_list_type:m}}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"whitelist",children:"白名单(仅名单内可聊天)"}),e.jsx(W,{value:"blacklist",children:"黑名单(名单内禁止聊天)"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-0",children:[e.jsx(T,{className:"text-sm md:text-base",children:"群组列表"}),e.jsxs(_,{onClick:()=>r("group"),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[e.jsx(Ua,{className:"mr-1 h-4 w-4"}),"添加群号"]})]}),a.chat.group_list.map((m,h)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{type:"number",value:m,onChange:f=>d("group",h,parseInt(f.target.value)||0),placeholder:"输入群号",className:"text-sm md:text-base"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除群号 ",m," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>c("group",h),children:"删除"})]})]})]})]},h)),a.chat.group_list.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无群组"})]})]}),e.jsxs("div",{className:"space-y-3 md:space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-sm md:text-base",children:"私聊名单类型"}),e.jsxs(Pe,{value:a.chat.private_list_type,onValueChange:m=>l({...a,chat:{...a.chat,private_list_type:m}}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"whitelist",children:"白名单(仅名单内可聊天)"}),e.jsx(W,{value:"blacklist",children:"黑名单(名单内禁止聊天)"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-0",children:[e.jsx(T,{className:"text-sm md:text-base",children:"私聊列表"}),e.jsxs(_,{onClick:()=>r("private"),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[e.jsx(Ua,{className:"mr-1 h-4 w-4"}),"添加用户"]})]}),a.chat.private_list.map((m,h)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{type:"number",value:m,onChange:f=>d("private",h,parseInt(f.target.value)||0),placeholder:"输入QQ号",className:"text-sm md:text-base"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要删除用户 ",m," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>c("private",h),children:"删除"})]})]})]})]},h)),a.chat.private_list.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无用户"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-0",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-sm md:text-base",children:"全局禁止名单"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"名单中的用户无法进行任何聊天"})]}),e.jsxs(_,{onClick:()=>r("ban"),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[e.jsx(Ua,{className:"mr-1 h-4 w-4"}),"添加用户"]})]}),a.chat.ban_user_id.map((m,h)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{type:"number",value:m,onChange:f=>d("ban",h,parseInt(f.target.value)||0),placeholder:"输入QQ号",className:"text-sm md:text-base"}),e.jsxs(bs,{children:[e.jsx(wt,{asChild:!0,children:e.jsx(_,{size:"icon",variant:"outline",children:e.jsx(os,{className:"h-4 w-4"})})}),e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:["确定要从全局禁止名单中删除用户 ",m," 吗?此操作无法撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>c("ban",h),children:"删除"})]})]})]})]},h)),a.chat.ban_user_id.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无禁止用户"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-sm md:text-base",children:"屏蔽QQ官方机器人"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"是否屏蔽来自QQ官方机器人的消息"})]}),e.jsx(qe,{checked:a.chat.ban_qq_bot,onCheckedChange:m=>l({...a,chat:{...a.chat,ban_qq_bot:m}})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-sm md:text-base",children:"启用戳一戳功能"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"是否响应戳一戳消息"})]}),e.jsx(qe,{checked:a.chat.enable_poke,onCheckedChange:m=>l({...a,chat:{...a.chat,enable_poke:m}})})]})]})]})})}function B4({config:a,onChange:l}){return e.jsxs("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"发送语音设置"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-sm md:text-base",children:"使用 TTS 语音"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"请确保已配置 TTS 并有对应的适配器"})]}),e.jsx(qe,{checked:a.voice.use_tts,onCheckedChange:r=>l({...a,voice:{...a.voice,use_tts:r}})})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"转发消息处理设置"}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{htmlFor:"image-threshold",className:"text-sm md:text-base",children:"图片数量阈值"}),e.jsx(ae,{id:"image-threshold",type:"number",value:a.forward.image_threshold||"",onChange:r=>l({...a,forward:{...a.forward,image_threshold:r.target.value?parseInt(r.target.value):0}}),placeholder:"30",className:"text-sm md:text-base"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"转发消息中图片数量超过此值时使用占位符(避免麦麦VLM处理卡死)"})]})]})]})}function P4({config:a,onChange:l}){return e.jsx("div",{className:"rounded-lg border bg-card p-4 md:p-6 space-y-4 md:space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold mb-3 md:mb-4",children:"调试设置"}),e.jsx("div",{className:"grid gap-3 md:gap-4",children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(T,{className:"text-sm md:text-base",children:"日志等级"}),e.jsxs(Pe,{value:a.debug.level,onValueChange:r=>l({...a,debug:{level:r}}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"DEBUG",children:"DEBUG(调试)"}),e.jsx(W,{value:"INFO",children:"INFO(信息)"}),e.jsx(W,{value:"WARNING",children:"WARNING(警告)"}),e.jsx(W,{value:"ERROR",children:"ERROR(错误)"}),e.jsx(W,{value:"CRITICAL",children:"CRITICAL(严重)"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"设置适配器的日志输出等级"})]})})]})})}const F4=["defaultChecked","defaultValue","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML","accessKey","className","contentEditable","contextMenu","dir","draggable","hidden","id","lang","placeholder","slot","spellCheck","style","tabIndex","title","translate","radioGroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable","inputMode","is","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],H4=/^(aria-|data-)/,oN=a=>Object.fromEntries(Object.entries(a).filter(([l])=>H4.test(l)||F4.includes(l)));function q4(a,l){const r=oN(a);return Object.keys(a).some(c=>!Object.hasOwn(r,c)&&a[c]!==l[c])}class V4 extends u.Component{container;plugin;componentDidMount(){this.installPlugin()}componentDidUpdate(l){if(l.uppy!==this.props.uppy)this.uninstallPlugin(l),this.installPlugin();else if(q4(this.props,l)){const{uppy:r,...c}={...this.props,target:this.container};this.plugin.setOptions(c)}}componentWillUnmount(){this.uninstallPlugin()}installPlugin(){const{uppy:l,...r}={id:"Dashboard",...this.props,inline:!0,target:this.container};l.use(v1,r),this.plugin=l.getPlugin(r.id)}uninstallPlugin(l=this.props){const{uppy:r}=l;r.removePlugin(this.plugin)}render(){return u.createElement("div",{className:"uppy-Container",ref:l=>{this.container=l},...oN(this.props)})}}function G4({src:a,alt:l="表情包",className:r,maxRetries:c=5,retryInterval:d=1500}){const[m,h]=u.useState("loading"),[f,p]=u.useState(0),[g,N]=u.useState(null),[j,b]=u.useState(a);a!==j&&(h("loading"),p(0),N(null),b(a));const y=u.useCallback(async()=>{try{const w=await fetch(a,{credentials:"include"});if(w.status===202){h("generating"),f{p(S=>S+1)},d):h("error");return}if(!w.ok){h("error");return}const z=await w.blob(),M=URL.createObjectURL(z);N(M),h("loaded")}catch(w){console.error("加载缩略图失败:",w),h("error")}},[a,f,c,d]);return u.useEffect(()=>{y()},[y]),u.useEffect(()=>()=>{g&&URL.revokeObjectURL(g)},[g]),m==="loading"||m==="generating"?e.jsx(ks,{className:P("w-full h-full",r)}):m==="error"||!g?e.jsx("div",{className:P("w-full h-full flex items-center justify-center bg-muted",r),children:e.jsx(xx,{className:"h-8 w-8 text-muted-foreground"})}):e.jsx("img",{src:g,alt:l,className:P("w-full h-full object-contain",r)})}function K4({children:a,className:l}){return e.jsx(bx,{content:a,className:l})}const al="/api/webui/emoji";async function Q4(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.search&&l.append("search",a.search),a.is_registered!==void 0&&l.append("is_registered",a.is_registered.toString()),a.is_banned!==void 0&&l.append("is_banned",a.is_banned.toString()),a.format&&l.append("format",a.format),a.sort_by&&l.append("sort_by",a.sort_by),a.sort_order&&l.append("sort_order",a.sort_order);const r=await ke(`${al}/list?${l}`,{});if(!r.ok)throw new Error(`获取表情包列表失败: ${r.statusText}`);return r.json()}async function Y4(a){const l=await ke(`${al}/${a}`,{});if(!l.ok)throw new Error(`获取表情包详情失败: ${l.statusText}`);return l.json()}async function J4(a,l){const r=await ke(`${al}/${a}`,{method:"PATCH",body:JSON.stringify(l)});if(!r.ok)throw new Error(`更新表情包失败: ${r.statusText}`);return r.json()}async function X4(a){const l=await ke(`${al}/${a}`,{method:"DELETE"});if(!l.ok)throw new Error(`删除表情包失败: ${l.statusText}`);return l.json()}async function Z4(){const a=await ke(`${al}/stats/summary`,{});if(!a.ok)throw new Error(`获取统计数据失败: ${a.statusText}`);return a.json()}async function W4(a){const l=await ke(`${al}/${a}/register`,{method:"POST"});if(!l.ok)throw new Error(`注册表情包失败: ${l.statusText}`);return l.json()}async function ek(a){const l=await ke(`${al}/${a}/ban`,{method:"POST"});if(!l.ok)throw new Error(`封禁表情包失败: ${l.statusText}`);return l.json()}function sk(a,l=!1){return l?`${al}/${a}/thumbnail?original=true`:`${al}/${a}/thumbnail`}function tk(a){return`${al}/${a}/thumbnail?original=true`}async function ak(a){const l=await ke(`${al}/batch/delete`,{method:"POST",body:JSON.stringify({emoji_ids:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量删除失败")}return l.json()}function lk(){return`${al}/upload`}function nk(){const[a,l]=u.useState([]),[r,c]=u.useState(null),[d,m]=u.useState(!1),[h,f]=u.useState(1),[p,g]=u.useState(0),[N,j]=u.useState(20),[b,y]=u.useState("all"),[w,z]=u.useState("all"),[M,S]=u.useState("all"),[F,E]=u.useState("usage_count"),[C,R]=u.useState("desc"),[H,O]=u.useState(null),[X,L]=u.useState(!1),[me,Ne]=u.useState(!1),[je,re]=u.useState(!1),[ge,pe]=u.useState(new Set),[D,Q]=u.useState(!1),[I,ue]=u.useState(""),[Y,we]=u.useState("medium"),[fe,Ee]=u.useState(!1),{toast:G}=nt(),$=u.useCallback(async()=>{try{m(!0);const xe=await Q4({page:h,page_size:N,is_registered:b==="all"?void 0:b==="registered",is_banned:w==="all"?void 0:w==="banned",format:M==="all"?void 0:M,sort_by:F,sort_order:C});l(xe.data),g(xe.total)}catch(xe){const Me=xe instanceof Error?xe.message:"加载表情包列表失败";G({title:"错误",description:Me,variant:"destructive"})}finally{m(!1)}},[h,N,b,w,M,F,C,G]),A=async()=>{try{const xe=await Z4();c(xe.data)}catch(xe){console.error("加载统计数据失败:",xe)}};u.useEffect(()=>{$()},[$]),u.useEffect(()=>{A()},[]);const K=async xe=>{try{const Me=await Y4(xe.id);O(Me.data),L(!0)}catch(Me){const ds=Me instanceof Error?Me.message:"加载详情失败";G({title:"错误",description:ds,variant:"destructive"})}},Re=xe=>{O(xe),Ne(!0)},se=xe=>{O(xe),re(!0)},$e=async()=>{if(H)try{await X4(H.id),G({title:"成功",description:"表情包已删除"}),re(!1),O(null),$(),A()}catch(xe){const Me=xe instanceof Error?xe.message:"删除失败";G({title:"错误",description:Me,variant:"destructive"})}},cs=async xe=>{try{await W4(xe.id),G({title:"成功",description:"表情包已注册"}),$(),A()}catch(Me){const ds=Me instanceof Error?Me.message:"注册失败";G({title:"错误",description:ds,variant:"destructive"})}},J=async xe=>{try{await ek(xe.id),G({title:"成功",description:"表情包已封禁"}),$(),A()}catch(Me){const ds=Me instanceof Error?Me.message:"封禁失败";G({title:"错误",description:ds,variant:"destructive"})}},Z=xe=>{const Me=new Set(ge);Me.has(xe)?Me.delete(xe):Me.add(xe),pe(Me)},Le=async()=>{try{const xe=await ak(Array.from(ge));G({title:"批量删除完成",description:xe.message}),pe(new Set),Q(!1),$(),A()}catch(xe){G({title:"批量删除失败",description:xe instanceof Error?xe.message:"批量删除失败",variant:"destructive"})}},ne=()=>{const xe=parseInt(I),Me=Math.ceil(p/N);xe>=1&&xe<=Me?(f(xe),ue("")):G({title:"无效的页码",description:`请输入1-${Me}之间的页码`,variant:"destructive"})},De=r?.formats?Object.keys(r.formats):[];return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-4 sm:mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"表情包管理"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"管理麦麦的表情包资源"})]}),e.jsxs(_,{onClick:()=>Ee(!0),className:"gap-2",children:[e.jsx(cc,{className:"h-4 w-4"}),"上传表情包"]})]}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 pr-4",children:[r&&e.jsxs("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[e.jsx(Te,{children:e.jsxs(Oe,{className:"pb-2",children:[e.jsx(Ns,{children:"总数"}),e.jsx(Ue,{className:"text-2xl",children:r.total})]})}),e.jsx(Te,{children:e.jsxs(Oe,{className:"pb-2",children:[e.jsx(Ns,{children:"已注册"}),e.jsx(Ue,{className:"text-2xl text-green-600",children:r.registered})]})}),e.jsx(Te,{children:e.jsxs(Oe,{className:"pb-2",children:[e.jsx(Ns,{children:"已封禁"}),e.jsx(Ue,{className:"text-2xl text-red-600",children:r.banned})]})}),e.jsx(Te,{children:e.jsxs(Oe,{className:"pb-2",children:[e.jsx(Ns,{children:"未注册"}),e.jsx(Ue,{className:"text-2xl text-gray-600",children:r.unregistered})]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx(Po,{className:"h-5 w-5"}),"筛选和排序"]})}),e.jsxs(ze,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"排序方式"}),e.jsxs(Pe,{value:`${F}-${C}`,onValueChange:xe=>{const[Me,ds]=xe.split("-");E(Me),R(ds),f(1)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"usage_count-desc",children:"使用次数 (多→少)"}),e.jsx(W,{value:"usage_count-asc",children:"使用次数 (少→多)"}),e.jsx(W,{value:"register_time-desc",children:"注册时间 (新→旧)"}),e.jsx(W,{value:"register_time-asc",children:"注册时间 (旧→新)"}),e.jsx(W,{value:"record_time-desc",children:"记录时间 (新→旧)"}),e.jsx(W,{value:"record_time-asc",children:"记录时间 (旧→新)"}),e.jsx(W,{value:"last_used_time-desc",children:"最后使用 (新→旧)"}),e.jsx(W,{value:"last_used_time-asc",children:"最后使用 (旧→新)"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"注册状态"}),e.jsxs(Pe,{value:b,onValueChange:xe=>{y(xe),f(1)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部"}),e.jsx(W,{value:"registered",children:"已注册"}),e.jsx(W,{value:"unregistered",children:"未注册"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"封禁状态"}),e.jsxs(Pe,{value:w,onValueChange:xe=>{z(xe),f(1)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部"}),e.jsx(W,{value:"banned",children:"已封禁"}),e.jsx(W,{value:"unbanned",children:"未封禁"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"格式"}),e.jsxs(Pe,{value:M,onValueChange:xe=>{S(xe),f(1)},children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部"}),De.map(xe=>e.jsxs(W,{value:xe,children:[xe.toUpperCase()," (",r?.formats[xe],")"]},xe))]})]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 pt-4 border-t",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[ge.size>0&&e.jsxs("span",{className:"text-sm text-muted-foreground",children:["已选择 ",ge.size," 个表情包"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{className:"text-sm whitespace-nowrap",children:"卡片大小"}),e.jsxs(Pe,{value:Y,onValueChange:xe=>we(xe),children:[e.jsx(Ie,{className:"w-24",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"small",children:"小"}),e.jsx(W,{value:"medium",children:"中"}),e.jsx(W,{value:"large",children:"大"})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"emoji-page-size",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:N.toString(),onValueChange:xe=>{j(parseInt(xe)),f(1),pe(new Set)},children:[e.jsx(Ie,{id:"emoji-page-size",className:"w-20",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"40",children:"40"}),e.jsx(W,{value:"60",children:"60"}),e.jsx(W,{value:"100",children:"100"})]})]}),ge.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>pe(new Set),children:"取消选择"}),e.jsxs(_,{variant:"destructive",size:"sm",onClick:()=>Q(!0),children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"批量删除"]})]})]})]}),e.jsx("div",{className:"flex justify-end pt-4 border-t",children:e.jsxs(_,{variant:"outline",size:"sm",onClick:$,disabled:d,children:[e.jsx(dt,{className:`h-4 w-4 mr-2 ${d?"animate-spin":""}`}),"刷新"]})})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"表情包列表"}),e.jsxs(Ns,{children:["共 ",p," 个表情包,当前第 ",h," 页"]})]}),e.jsxs(ze,{children:[a.length===0?e.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"暂无数据"}):e.jsx("div",{className:`grid gap-3 ${Y==="small"?"grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 xl:grid-cols-10":Y==="medium"?"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8":"grid-cols-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5"}`,children:a.map(xe=>e.jsxs("div",{className:`group relative rounded-lg border bg-card overflow-hidden hover:ring-2 hover:ring-primary transition-all cursor-pointer ${ge.has(xe.id)?"ring-2 ring-primary bg-primary/5":""}`,onClick:()=>Z(xe.id),children:[e.jsx("div",{className:`absolute top-1 left-1 z-10 transition-opacity ${ge.has(xe.id)?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:e.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center ${ge.has(xe.id)?"bg-primary border-primary text-primary-foreground":"bg-background/80 border-muted-foreground/50"}`,children:ge.has(xe.id)&&e.jsx(st,{className:"h-3 w-3"})})}),e.jsxs("div",{className:"absolute top-1 right-1 z-10 flex flex-col gap-0.5",children:[xe.is_registered&&e.jsx(Ce,{variant:"default",className:"bg-green-600 text-[10px] px-1 py-0",children:"已注册"}),xe.is_banned&&e.jsx(Ce,{variant:"destructive",className:"text-[10px] px-1 py-0",children:"已封禁"})]}),e.jsx("div",{className:`aspect-square bg-muted flex items-center justify-center overflow-hidden ${Y==="small"?"p-1":Y==="medium"?"p-2":"p-3"}`,children:e.jsx(G4,{src:sk(xe.id),alt:"表情包"})}),e.jsxs("div",{className:`border-t bg-card ${Y==="small"?"p-1":"p-2"}`,children:[e.jsxs("div",{className:"flex items-center justify-between gap-1 text-xs text-muted-foreground mb-1",children:[e.jsx(Ce,{variant:"outline",className:"text-[10px] px-1 py-0",children:xe.format.toUpperCase()}),e.jsxs("span",{className:"font-mono",children:[xe.usage_count,"次"]})]}),e.jsxs("div",{className:`flex gap-1 justify-center opacity-0 group-hover:opacity-100 transition-opacity ${Y==="small"?"flex-wrap":""}`,children:[e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:Me=>{Me.stopPropagation(),Re(xe)},title:"编辑",children:e.jsx(sr,{className:"h-3 w-3"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:Me=>{Me.stopPropagation(),K(xe)},title:"详情",children:e.jsx(Yt,{className:"h-3 w-3"})}),!xe.is_registered&&e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6 text-green-600 hover:text-green-700",onClick:Me=>{Me.stopPropagation(),cs(xe)},title:"注册",children:e.jsx(st,{className:"h-3 w-3"})}),!xe.is_banned&&e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6 text-orange-600 hover:text-orange-700",onClick:Me=>{Me.stopPropagation(),J(xe)},title:"封禁",children:e.jsx(iv,{className:"h-3 w-3"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-6 w-6 text-red-600 hover:text-red-700",onClick:Me=>{Me.stopPropagation(),se(xe)},title:"删除",children:e.jsx(os,{className:"h-3 w-3"})})]})]})]},xe.id))}),p>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 mt-4",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["显示 ",(h-1)*N+1," 到"," ",Math.min(h*N,p)," 条,共 ",p," 条"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(1),disabled:h===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(xe=>Math.max(1,xe-1)),disabled:h===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{type:"number",value:I,onChange:xe=>ue(xe.target.value),onKeyDown:xe=>xe.key==="Enter"&&ne(),placeholder:h.toString(),className:"w-16 h-8 text-center",min:1,max:Math.ceil(p/N)}),e.jsx(_,{variant:"outline",size:"sm",onClick:ne,disabled:!I,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(xe=>xe+1),disabled:h>=Math.ceil(p/N),children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(Math.ceil(p/N)),disabled:h>=Math.ceil(p/N),className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]})]}),e.jsx(rk,{emoji:H,open:X,onOpenChange:L}),e.jsx(ik,{emoji:H,open:me,onOpenChange:Ne,onSuccess:()=>{$(),A()}}),e.jsx(ck,{open:fe,onOpenChange:Ee,onSuccess:()=>{$(),A()}})]})}),e.jsx(bs,{open:D,onOpenChange:Q,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["你确定要删除选中的 ",ge.size," 个表情包吗?此操作不可撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:Le,children:"确认删除"})]})]})}),e.jsx(Qs,{open:je,onOpenChange:re,children:e.jsxs(Hs,{children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"确认删除"}),e.jsx(at,{children:"确定要删除这个表情包吗?此操作无法撤销。"})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>re(!1),children:"取消"}),e.jsx(_,{variant:"destructive",onClick:$e,children:"删除"})]})]})})]})}function rk({emoji:a,open:l,onOpenChange:r}){if(!a)return null;const c=d=>d?new Date(d*1e3).toLocaleString("zh-CN"):"-";return e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[90vh]",children:[e.jsx(qs,{children:e.jsx(Vs,{children:"表情包详情"})}),e.jsx(ts,{className:"max-h-[calc(90vh-8rem)] pr-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-32 h-32 bg-muted rounded-lg flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:tk(a.id),alt:a.description||"表情包",className:"w-full h-full object-cover",onError:d=>{const m=d.target;m.style.display="none";const h=m.parentElement;h&&(h.innerHTML='')}})})}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"ID"}),e.jsx("div",{className:"mt-1 font-mono",children:a.id})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"格式"}),e.jsx("div",{className:"mt-1",children:e.jsx(Ce,{variant:"outline",children:a.format.toUpperCase()})})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"文件路径"}),e.jsx("div",{className:"mt-1 font-mono text-sm break-all bg-muted p-2 rounded",children:a.full_path})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"哈希值"}),e.jsx("div",{className:"mt-1 font-mono text-sm break-all bg-muted p-2 rounded",children:a.emoji_hash})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"描述"}),a.description?e.jsx("div",{className:"mt-1 rounded-lg border bg-muted/50 p-3",children:e.jsx(K4,{className:"prose-sm",children:a.description})}):e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:"-"})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"情绪"}),e.jsx("div",{className:"mt-1",children:a.emotion?e.jsx("span",{className:"text-sm",children:a.emotion}):e.jsx("span",{className:"text-sm text-muted-foreground",children:"-"})})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"状态"}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[a.is_registered&&e.jsx(Ce,{variant:"default",className:"bg-green-600",children:"已注册"}),a.is_banned&&e.jsx(Ce,{variant:"destructive",children:"已封禁"}),!a.is_registered&&!a.is_banned&&e.jsx(Ce,{variant:"outline",children:"未注册"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"使用次数"}),e.jsx("div",{className:"mt-1 font-mono text-lg",children:a.usage_count})]})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"记录时间"}),e.jsx("div",{className:"mt-1 text-sm",children:c(a.record_time)})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"注册时间"}),e.jsx("div",{className:"mt-1 text-sm",children:c(a.register_time)})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-muted-foreground",children:"最后使用"}),e.jsx("div",{className:"mt-1 text-sm",children:c(a.last_used_time)})]})]})})]})})}function ik({emoji:a,open:l,onOpenChange:r,onSuccess:c}){const[d,m]=u.useState(""),[h,f]=u.useState(!1),[p,g]=u.useState(!1),[N,j]=u.useState(!1),{toast:b}=nt();u.useEffect(()=>{a&&(m(a.emotion||""),f(a.is_registered),g(a.is_banned))},[a]);const y=async()=>{if(a)try{j(!0);const w=d.split(/[,,]/).map(z=>z.trim()).filter(Boolean).join(",");await J4(a.id,{emotion:w||void 0,is_registered:h,is_banned:p}),b({title:"成功",description:"表情包信息已更新"}),r(!1),c()}catch(w){const z=w instanceof Error?w.message:"保存失败";b({title:"错误",description:z,variant:"destructive"})}finally{j(!1)}};return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑表情包"}),e.jsx(at,{children:"修改表情包的情绪和状态信息"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(T,{children:"情绪"}),e.jsx(pt,{value:d,onChange:w=>m(w.target.value),placeholder:"输入情绪描述...",rows:2,className:"mt-1"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"输入情绪相关的文本描述"})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"is_registered",checked:h,onCheckedChange:w=>{w===!0?(f(!0),g(!1)):f(!1)}}),e.jsx(T,{htmlFor:"is_registered",className:"cursor-pointer",children:"已注册"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"is_banned",checked:p,onCheckedChange:w=>{w===!0?(g(!0),f(!1)):g(!1)}}),e.jsx(T,{htmlFor:"is_banned",className:"cursor-pointer",children:"已封禁"})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(_,{onClick:y,disabled:N,children:N?"保存中...":"保存"})]})]})}):null}function ck({open:a,onOpenChange:l,onSuccess:r}){const[c,d]=u.useState("select"),[m,h]=u.useState([]),[f,p]=u.useState(null),[g,N]=u.useState(!1),{toast:j}=nt(),b=u.useMemo(()=>new N1({id:"emoji-uploader",autoProceed:!1,restrictions:{maxFileSize:10485760,allowedFileTypes:["image/jpeg","image/png","image/gif","image/webp"],maxNumberOfFiles:20},locale:{pluralize:()=>0,strings:{addMoreFiles:"添加更多文件",addingMoreFiles:"正在添加更多文件",allowedFileTypes:"允许的文件类型:%{types}",cancel:"取消",closeModal:"关闭",complete:"完成",connectedToInternet:"已连接到互联网",copyLink:"复制链接",copyLinkToClipboardFallback:"复制下方链接",copyLinkToClipboardSuccess:"链接已复制到剪贴板",dashboardTitle:"选择文件",dashboardWindowTitle:"文件选择窗口(按 ESC 关闭)",done:"完成",dropHereOr:"拖放文件到这里或 %{browse}",dropHint:"将文件拖放到此处",dropPasteFiles:"将文件拖放到这里或 %{browseFiles}",dropPasteFolders:"将文件拖放到这里或 %{browseFolders}",dropPasteBoth:"将文件拖放到这里,%{browseFiles} 或 %{browseFolders}",dropPasteImportFiles:"将文件拖放到这里,%{browseFiles} 或从以下位置导入:",dropPasteImportFolders:"将文件拖放到这里,%{browseFolders} 或从以下位置导入:",dropPasteImportBoth:"将文件拖放到这里,%{browseFiles},%{browseFolders} 或从以下位置导入:",editFile:"编辑文件",editing:"正在编辑 %{file}",emptyFolderAdded:"未从空文件夹添加文件",exceedsSize:"%{file} 超过了最大允许大小 %{size}",failedToUpload:"上传 %{file} 失败",fileSource:"文件来源:%{name}",filesUploadedOfTotal:{0:"已上传 %{complete} / %{smart_count} 个文件",1:"已上传 %{complete} / %{smart_count} 个文件"},filter:"筛选",finishEditingFile:"完成编辑文件",folderAdded:{0:"已从 %{folder} 添加 %{smart_count} 个文件",1:"已从 %{folder} 添加 %{smart_count} 个文件"},generatingThumbnails:"正在生成缩略图...",import:"导入",importFiles:"从以下位置导入文件:",importFrom:"从 %{name} 导入",loading:"加载中...",logOut:"登出",myDevice:"我的设备",noFilesFound:"这里没有文件或文件夹",noInternetConnection:"无网络连接",openFolderNamed:"打开文件夹 %{name}",pause:"暂停",pauseUpload:"暂停上传",paused:"已暂停",poweredBy:"技术支持:%{uppy}",processingXFiles:{0:"正在处理 %{smart_count} 个文件",1:"正在处理 %{smart_count} 个文件"},recording:"录制中",removeFile:"移除文件",resetFilter:"重置筛选",resume:"继续",resumeUpload:"继续上传",retry:"重试",retryUpload:"重试上传",save:"保存",saveChanges:"保存更改",selectFileNamed:"选择文件 %{name}",selectX:{0:"选择 %{smart_count}",1:"选择 %{smart_count}"},smile:"笑一个!",startRecording:"开始录制视频",stopRecording:"停止录制视频",takePicture:"拍照",timedOut:"上传已停滞 %{seconds} 秒,正在中止。",upload:"下一步",uploadComplete:"上传完成",uploadFailed:"上传失败",uploadPaused:"上传已暂停",uploadXFiles:{0:"下一步(%{smart_count} 个文件)",1:"下一步(%{smart_count} 个文件)"},uploadXNewFiles:{0:"下一步(+%{smart_count} 个文件)",1:"下一步(+%{smart_count} 个文件)"},uploading:"正在上传",uploadingXFiles:{0:"正在上传 %{smart_count} 个文件",1:"正在上传 %{smart_count} 个文件"},xFilesSelected:{0:"已选择 %{smart_count} 个文件",1:"已选择 %{smart_count} 个文件"},xMoreFilesAdded:{0:"又添加了 %{smart_count} 个文件",1:"又添加了 %{smart_count} 个文件"},xTimeLeft:"剩余 %{time}",youCanOnlyUploadFileTypes:"您只能上传:%{types}",youCanOnlyUploadX:{0:"您只能上传 %{smart_count} 个文件",1:"您只能上传 %{smart_count} 个文件"},youHaveToAtLeastSelectX:{0:"您至少需要选择 %{smart_count} 个文件",1:"您至少需要选择 %{smart_count} 个文件"},browseFiles:"浏览文件",browseFolders:"浏览文件夹",cancelUpload:"取消上传",addMore:"添加更多",back:"返回",editFileWithFilename:"编辑文件 %{file}"}}}),[]);u.useEffect(()=>{const H=()=>{const O=b.getFiles();if(O.length===0)return;const X=O.map(L=>({id:L.id,name:L.name,previewUrl:L.preview||URL.createObjectURL(L.data),emotion:"",description:"",isRegistered:!0,file:L.data}));h(X),O.length===1?(p(X[0].id),d("edit-single")):d("edit-multiple")};return b.on("upload",H),()=>{b.off("upload",H)}},[b]),u.useEffect(()=>{a||(b.cancelAll(),d("select"),h([]),p(null),N(!1))},[a,b]);const y=u.useCallback((H,O)=>{h(X=>X.map(L=>L.id===H?{...L,...O}:L))},[]),w=u.useCallback(H=>H.emotion.trim().length>0,[]),z=u.useMemo(()=>m.length>0&&m.every(w),[m,w]),M=u.useMemo(()=>m.find(H=>H.id===f)||null,[m,f]),S=u.useCallback(()=>{(c==="edit-single"||c==="edit-multiple")&&(d("select"),h([]),p(null))},[c]),F=u.useCallback(async()=>{if(!z){j({title:"请填写必填项",description:"每个表情包的情感标签都是必填的",variant:"destructive"});return}N(!0);let H=0,O=0;try{for(const X of m){const L=new FormData;L.append("file",X.file),L.append("emotion",X.emotion),L.append("description",X.description),L.append("is_registered",X.isRegistered.toString());try{(await ke(lk(),{method:"POST",body:L})).ok?H++:O++}catch{O++}}O===0?(j({title:"上传成功",description:`成功上传 ${H} 个表情包`}),l(!1),r()):(j({title:"部分上传失败",description:`成功 ${H} 个,失败 ${O} 个`,variant:"destructive"}),r())}finally{N(!1)}},[z,m,j,l,r]),E=()=>e.jsx("div",{className:"space-y-4",children:e.jsx("div",{className:"border rounded-lg overflow-hidden w-full",children:e.jsx(V4,{uppy:b,proudlyDisplayPoweredByUppy:!1,hideProgressDetails:!0,height:350,width:"100%",theme:"auto",note:"支持 JPG、PNG、GIF、WebP 格式,最多 20 个文件"})})}),C=()=>{const H=m[0];return H?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(_,{variant:"ghost",size:"sm",onClick:S,children:[e.jsx($a,{className:"h-4 w-4 mr-1"}),"返回"]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"编辑表情包信息"})]}),e.jsxs("div",{className:"flex gap-6",children:[e.jsxs("div",{className:"flex-shrink-0",children:[e.jsx("div",{className:"w-32 h-32 rounded-lg border overflow-hidden bg-muted flex items-center justify-center",children:e.jsx("img",{src:H.previewUrl,alt:H.name,className:"max-w-full max-h-full object-contain"})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2 text-center truncate max-w-32",children:H.name})]}),e.jsxs("div",{className:"flex-1 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"single-emotion",children:["情感标签 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ae,{id:"single-emotion",value:H.emotion,onChange:O=>y(H.id,{emotion:O.target.value}),placeholder:"多个标签用逗号分隔,如:开心,高兴",className:H.emotion.trim()?"":"border-destructive"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"用于情感匹配,多个标签用逗号分隔"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"single-description",children:"描述"}),e.jsx(ae,{id:"single-description",value:H.description,onChange:O=>y(H.id,{description:O.target.value}),placeholder:"输入表情包描述..."})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"single-is-registered",checked:H.isRegistered,onCheckedChange:O=>y(H.id,{isRegistered:O===!0})}),e.jsx(T,{htmlFor:"single-is-registered",className:"cursor-pointer",children:"上传后立即注册(可被麦麦使用)"})]})]})]}),e.jsx(gt,{children:e.jsx(_,{onClick:F,disabled:!z||g,children:g?"上传中...":"上传"})})]}):null},R=()=>{const H=m.filter(w).length,O=m.length;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(_,{variant:"ghost",size:"sm",onClick:S,children:[e.jsx($a,{className:"h-4 w-4 mr-1"}),"返回"]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["编辑表情包信息(",H,"/",O," 已完成)"]})]}),e.jsx(Ce,{variant:z?"default":"secondary",children:z?e.jsxs(e.Fragment,{children:[e.jsx(Ot,{className:"h-3 w-3 mr-1"}),"全部完成"]}):e.jsxs(e.Fragment,{children:[e.jsx(Sa,{className:"h-3 w-3 mr-1"}),"未完成"]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(ts,{className:"h-[350px] pr-2",children:e.jsx("div",{className:"space-y-2",children:m.map(X=>{const L=w(X),me=f===X.id;return e.jsxs("div",{onClick:()=>p(X.id),className:` flex items-center gap-3 p-3 rounded-lg border-2 cursor-pointer transition-all ${me?"ring-2 ring-primary":""} ${L?"border-green-500 bg-green-50 dark:bg-green-950/20":"border-border hover:border-muted-foreground/50"} - `,children:[e.jsx("div",{className:"w-12 h-12 rounded border overflow-hidden bg-muted flex-shrink-0 flex items-center justify-center",children:e.jsx("img",{src:X.previewUrl,alt:X.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:X.name}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:X.emotion||"未填写情感标签"})]}),L?e.jsx(st,{className:"h-5 w-5 text-green-500 flex-shrink-0"}):e.jsx("div",{className:"h-5 w-5 rounded-full border-2 border-muted-foreground/30 flex-shrink-0"})]},X.id)})})}),e.jsx("div",{className:"border rounded-lg p-4",children:M?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-16 h-16 rounded border overflow-hidden bg-muted flex items-center justify-center",children:e.jsx("img",{src:M.previewUrl,alt:M.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:M.name}),w(M)&&e.jsxs(Ce,{variant:"outline",className:"text-green-600 border-green-600",children:[e.jsx(Ot,{className:"h-3 w-3 mr-1"}),"已完成"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"multi-emotion",children:["情感标签 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ne,{id:"multi-emotion",value:M.emotion,onChange:X=>y(M.id,{emotion:X.target.value}),placeholder:"多个标签用逗号分隔,如:开心,高兴",className:M.emotion.trim()?"":"border-destructive"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"multi-description",children:"描述"}),e.jsx(ne,{id:"multi-description",value:M.description,onChange:X=>y(M.id,{description:X.target.value}),placeholder:"输入表情包描述..."})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"multi-is-registered",checked:M.isRegistered,onCheckedChange:X=>y(M.id,{isRegistered:X===!0})}),e.jsx(T,{htmlFor:"multi-is-registered",className:"cursor-pointer text-sm",children:"上传后立即注册"})]})]}):e.jsx("div",{className:"h-full flex items-center justify-center text-muted-foreground",children:e.jsxs("div",{className:"text-center",children:[e.jsx(xx,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:"点击左侧卡片编辑"})]})})})]}),e.jsx(gt,{children:e.jsx(_,{onClick:F,disabled:!z||g,children:g?"上传中...":`上传全部 (${O})`})})]})};return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-3xl max-h-[90vh] overflow-hidden",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(cc,{className:"h-5 w-5"}),c==="select"&&"上传表情包 - 选择文件",c==="edit-single"&&"上传表情包 - 填写信息",c==="edit-multiple"&&"上传表情包 - 批量编辑"]}),e.jsxs(at,{children:[c==="select"&&"支持 JPG、PNG、GIF、WebP 格式,单个文件最大 10MB,可同时上传多个文件",c==="edit-single"&&"请填写表情包的情感标签(必填)和描述",c==="edit-multiple"&&"点击左侧卡片编辑每个表情包的信息,情感标签为必填项"]})]}),e.jsxs("div",{className:"overflow-y-auto pr-1",children:[c==="select"&&E(),c==="edit-single"&&C(),c==="edit-multiple"&&R()]})]})})}function ok(){const[a,l]=u.useState([]),[r,c]=u.useState(!0),[d,m]=u.useState(0),[h,f]=u.useState(1),[p,g]=u.useState(20),[N,j]=u.useState(""),[b,y]=u.useState(null),[w,z]=u.useState(!1),[M,S]=u.useState(!1),[F,E]=u.useState(!1),[C,R]=u.useState(null),[H,O]=u.useState(new Set),[X,L]=u.useState(!1),[me,Ne]=u.useState(""),[je,ce]=u.useState({total:0,recent_7days:0,chat_count:0,top_chats:{}}),[ge,pe]=u.useState([]),[D,Q]=u.useState(new Map),[B,ue]=u.useState(!1),[Y,we]=u.useState(0),{toast:fe}=nt(),Ee=async()=>{try{c(!0);const le=await a2({page:h,page_size:p,search:N||void 0});l(le.data),m(le.total)}catch(le){fe({title:"加载失败",description:le instanceof Error?le.message:"无法加载表达方式",variant:"destructive"})}finally{c(!1)}},G=async()=>{try{const le=await o2();le?.data&&ce(le.data)}catch(le){console.error("加载统计数据失败:",le)}},$=async()=>{try{const le=await jx();we(le.unchecked)}catch(le){console.error("加载审核统计失败:",le)}},A=async()=>{try{const le=await gx();if(le?.data){pe(le.data);const De=new Map;le.data.forEach(xe=>{De.set(xe.chat_id,xe.chat_name)}),Q(De)}}catch(le){console.error("加载聊天列表失败:",le)}},K=le=>D.get(le)||le;u.useEffect(()=>{Ee(),$(),G(),A()},[h,p,N]);const Re=async le=>{try{const De=await l2(le.id);y(De.data),z(!0)}catch(De){fe({title:"加载详情失败",description:De instanceof Error?De.message:"无法加载表达方式详情",variant:"destructive"})}},se=le=>{y(le),S(!0)},$e=async le=>{try{await i2(le.id),fe({title:"删除成功",description:`已删除表达方式: ${le.situation}`}),R(null),Ee(),G()}catch(De){fe({title:"删除失败",description:De instanceof Error?De.message:"无法删除表达方式",variant:"destructive"})}},cs=le=>{const De=new Set(H);De.has(le)?De.delete(le):De.add(le),O(De)},J=()=>{H.size===a.length&&a.length>0?O(new Set):O(new Set(a.map(le=>le.id)))},Z=async()=>{try{await c2(Array.from(H)),fe({title:"批量删除成功",description:`已删除 ${H.size} 个表达方式`}),O(new Set),L(!1),Ee(),G()}catch(le){fe({title:"批量删除失败",description:le instanceof Error?le.message:"无法批量删除表达方式",variant:"destructive"})}},Le=()=>{const le=parseInt(me),De=Math.ceil(d/p);le>=1&&le<=De?(f(le),Ne("")):fe({title:"无效的页码",description:`请输入1-${De}之间的页码`,variant:"destructive"})};return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(Ia,{className:"h-8 w-8",strokeWidth:2}),"表达方式管理"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"管理麦麦的表达方式和话术模板"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_,{variant:"outline",onClick:()=>ue(!0),className:"gap-2",children:[e.jsx(cv,{className:"h-4 w-4"}),"人工审核",Y>0&&e.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-xs rounded-full bg-orange-500 text-white",children:Y>99?"99+":Y})]}),e.jsxs(_,{onClick:()=>E(!0),className:"gap-2",children:[e.jsx(Xs,{className:"h-4 w-4"}),"新增表达方式"]})]})]})}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 pr-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总数量"}),e.jsx("div",{className:"text-2xl font-bold mt-1",children:je.total})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"近7天新增"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-green-600",children:je.recent_7days})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"关联聊天数"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-blue-600",children:je.chat_count})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx(T,{htmlFor:"search",children:"搜索"}),e.jsx("div",{className:"flex flex-col sm:flex-row gap-2 mt-1.5",children:e.jsxs("div",{className:"flex-1 relative",children:[e.jsx($t,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{id:"search",placeholder:"搜索情境、风格或上下文...",value:N,onChange:le=>j(le.target.value),className:"pl-9"})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 mt-4 pt-4 border-t",children:[e.jsx("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:H.size>0&&e.jsxs("span",{children:["已选择 ",H.size," 个表达方式"]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"page-size",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:p.toString(),onValueChange:le=>{g(parseInt(le)),f(1),O(new Set)},children:[e.jsx(Be,{id:"page-size",className:"w-20",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]}),H.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>O(new Set),children:"取消选择"}),e.jsxs(_,{variant:"destructive",size:"sm",onClick:()=>L(!0),children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"批量删除"]})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card",children:[e.jsx("div",{className:"hidden md:block",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:H.size===a.length&&a.length>0,onCheckedChange:J})}),e.jsx(ns,{children:"情境"}),e.jsx(ns,{children:"风格"}),e.jsx(ns,{children:"聊天"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:r?e.jsx(_t,{children:e.jsx(Ze,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):a.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):a.map(le=>e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:H.has(le.id),onCheckedChange:()=>cs(le.id)})}),e.jsx(Ze,{className:"font-medium max-w-xs truncate",children:le.situation}),e.jsx(Ze,{className:"max-w-xs truncate",children:le.style}),e.jsx(Ze,{className:"max-w-[200px] truncate",title:K(le.chat_id),style:{wordBreak:"keep-all"},children:e.jsx("span",{className:"whitespace-nowrap overflow-hidden text-ellipsis block",children:K(le.chat_id)})}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>se(le),children:[e.jsx(sr,{className:"h-4 w-4 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>Re(le),title:"查看详情",children:e.jsx(ua,{className:"h-4 w-4"})}),e.jsxs(_,{size:"sm",onClick:()=>R(le),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"删除"]})]})})]},le.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3 p-4",children:r?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"加载中..."}):a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无数据"}):a.map(le=>e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(tt,{checked:H.has(le.id),onCheckedChange:()=>cs(le.id),className:"mt-1"}),e.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden space-y-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"情境"}),e.jsx("h3",{className:"font-semibold text-sm line-clamp-2 w-full break-all",title:le.situation,children:le.situation})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"风格"}),e.jsx("p",{className:"text-sm line-clamp-2 w-full break-all",title:le.style,children:le.style})]})]})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"聊天"}),e.jsx("p",{className:"text-sm truncate",title:K(le.chat_id),style:{wordBreak:"keep-all"},children:K(le.chat_id)})]}),e.jsxs("div",{className:"flex flex-wrap gap-1 pt-2 border-t overflow-hidden",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>se(le),className:"text-xs px-2 py-1 h-auto flex-shrink-0",children:[e.jsx(sr,{className:"h-3 w-3 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Re(le),className:"text-xs px-2 py-1 h-auto flex-shrink-0",children:e.jsx(ua,{className:"h-3 w-3"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>R(le),className:"text-xs px-2 py-1 h-auto flex-shrink-0 text-destructive hover:text-destructive",children:[e.jsx(os,{className:"h-3 w-3 mr-1"}),"删除"]})]})]},le.id))}),d>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 px-4 py-3 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",d," 条记录,第 ",h," / ",Math.ceil(d/p)," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(1),disabled:h===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h-1),disabled:h===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{type:"number",value:me,onChange:le=>Ne(le.target.value),onKeyDown:le=>le.key==="Enter"&&Le(),placeholder:h.toString(),className:"w-16 h-8 text-center",min:1,max:Math.ceil(d/p)}),e.jsx(_,{variant:"outline",size:"sm",onClick:Le,disabled:!me,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h+1),disabled:h>=Math.ceil(d/p),children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(Math.ceil(d/p)),disabled:h>=Math.ceil(d/p),className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]})]})}),e.jsx(dk,{expression:b,open:w,onOpenChange:z,chatNameMap:D}),e.jsx(uk,{open:F,onOpenChange:E,chatList:ge,onSuccess:()=>{Ee(),G(),E(!1)}}),e.jsx(mk,{expression:b,open:M,onOpenChange:S,chatList:ge,onSuccess:()=>{Ee(),G(),S(!1)}}),e.jsx(bs,{open:!!C,onOpenChange:()=>R(null),children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除表达方式 "',C?.situation,'" 吗? 此操作不可撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>C&&$e(C),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})}),e.jsx(xk,{open:X,onOpenChange:L,onConfirm:Z,count:H.size}),e.jsx(Pv,{open:B,onOpenChange:le=>{ue(le),le||(Ee(),G(),$())}})]})}function dk({expression:a,open:l,onOpenChange:r,chatNameMap:c}){if(!a)return null;const d=h=>h?new Date(h*1e3).toLocaleString("zh-CN"):"-",m=h=>c.get(h)||h;return e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"表达方式详情"}),e.jsx(at,{children:"查看表达方式的完整信息"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(Yi,{label:"情境",value:a.situation}),e.jsx(Yi,{label:"风格",value:a.style}),e.jsx(Yi,{label:"聊天",value:m(a.chat_id)}),e.jsx(Yi,{icon:Wr,label:"记录ID",value:a.id.toString(),mono:!0})]}),e.jsx("div",{className:"grid grid-cols-2 gap-4",children:e.jsx(Yi,{icon:da,label:"创建时间",value:d(a.create_date)})}),e.jsxs("div",{className:"rounded-lg border bg-muted/50 p-4",children:[e.jsx(T,{className:"text-xs text-muted-foreground mb-3 block",children:"状态标记"}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:P("flex h-8 w-8 items-center justify-center rounded-full",a.checked?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-400 dark:bg-gray-800 dark:text-gray-600"),children:a.checked?e.jsx(st,{className:"h-5 w-5"}):e.jsx(Vo,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"已检查"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a.checked?"已通过审核":"未审核"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:P("flex h-8 w-8 items-center justify-center rounded-full",a.rejected?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":"bg-gray-100 text-gray-400 dark:bg-gray-800 dark:text-gray-600"),children:a.rejected?e.jsx(ta,{className:"h-5 w-5"}):e.jsx(Vo,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"已拒绝"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a.rejected?"不会被使用":"正常"})]})]})]})]})]}),e.jsx(gt,{children:e.jsx(_,{onClick:()=>r(!1),children:"关闭"})})]})})}function Yi({icon:a,label:l,value:r,mono:c=!1}){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(T,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[a&&e.jsx(a,{className:"h-3 w-3"}),l]}),e.jsx("div",{className:P("text-sm",c&&"font-mono",!r&&"text-muted-foreground"),children:r||"-"})]})}function uk({open:a,onOpenChange:l,chatList:r,onSuccess:c}){const[d,m]=u.useState({situation:"",style:"",chat_id:""}),[h,f]=u.useState(!1),{toast:p}=nt(),g=async()=>{if(!d.situation||!d.style||!d.chat_id){p({title:"验证失败",description:"请填写必填字段:情境、风格和聊天",variant:"destructive"});return}try{f(!0),await n2(d),p({title:"创建成功",description:"表达方式已创建"}),m({situation:"",style:"",chat_id:""}),c()}catch(N){p({title:"创建失败",description:N instanceof Error?N.message:"无法创建表达方式",variant:"destructive"})}finally{f(!1)}};return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"新增表达方式"}),e.jsx(at,{children:"创建新的表达方式记录"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"situation",children:["情境 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ne,{id:"situation",value:d.situation,onChange:N=>m({...d,situation:N.target.value}),placeholder:"描述使用场景"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"style",children:["风格 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ne,{id:"style",value:d.style,onChange:N=>m({...d,style:N.target.value}),placeholder:"描述表达风格"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"chat_id",children:["聊天 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsxs(Pe,{value:d.chat_id,onValueChange:N=>m({...d,chat_id:N}),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择关联的聊天"})}),e.jsx(Ie,{children:r.map(N=>e.jsx(W,{value:N.chat_id,children:e.jsxs("span",{className:"truncate",style:{wordBreak:"keep-all"},children:[N.chat_name,N.is_group&&e.jsx("span",{className:"text-muted-foreground ml-1",children:"(群聊)"})]})},N.chat_id))})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>l(!1),children:"取消"}),e.jsx(_,{onClick:g,disabled:h,children:h?"创建中...":"创建"})]})]})})}function mk({expression:a,open:l,onOpenChange:r,chatList:c,onSuccess:d}){const[m,h]=u.useState({}),[f,p]=u.useState(!1),{toast:g}=nt();u.useEffect(()=>{a&&h({situation:a.situation,style:a.style,chat_id:a.chat_id,checked:a.checked,rejected:a.rejected})},[a]);const N=async()=>{if(a)try{p(!0),await r2(a.id,m),g({title:"保存成功",description:"表达方式已更新"}),d()}catch(j){g({title:"保存失败",description:j instanceof Error?j.message:"无法更新表达方式",variant:"destructive"})}finally{p(!1)}};return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑表达方式"}),e.jsx(at,{children:"修改表达方式的信息"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_situation",children:"情境"}),e.jsx(ne,{id:"edit_situation",value:m.situation||"",onChange:j=>h({...m,situation:j.target.value}),placeholder:"描述使用场景"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_style",children:"风格"}),e.jsx(ne,{id:"edit_style",value:m.style||"",onChange:j=>h({...m,style:j.target.value}),placeholder:"描述表达风格"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_chat_id",children:"聊天"}),e.jsxs(Pe,{value:m.chat_id||"",onValueChange:j=>h({...m,chat_id:j}),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择关联的聊天"})}),e.jsx(Ie,{children:c.map(j=>e.jsx(W,{value:j.chat_id,children:e.jsxs("span",{className:"truncate",style:{wordBreak:"keep-all"},children:[j.chat_name,j.is_group&&e.jsx("span",{className:"text-muted-foreground ml-1",children:"(群聊)"})]})},j.chat_id))})]})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(ft,{className:"text-xs",children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{children:e.jsx("strong",{children:"状态标记说明:"})}),e.jsx("p",{children:"• 已检查:表示该表达方式已通过审核(可由AI自动检查或人工审核)"}),e.jsx("p",{children:"• 已拒绝:表示该表达方式被标记为不合适,将永远不会被使用"}),e.jsxs("p",{className:"text-muted-foreground mt-2",children:['根据配置中"仅使用已审核通过的表达方式"设置:',e.jsx("br",{}),"• 开启时:只有通过审核(已检查)的项目会被使用",e.jsx("br",{}),"• 关闭时:未审核的项目也会被使用"]})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between space-x-2 rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{htmlFor:"edit_checked",className:"text-sm font-medium",children:"已检查"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"已通过审核"})]}),e.jsx(Ge,{id:"edit_checked",checked:m.checked??!1,onCheckedChange:j=>h({...m,checked:j})})]}),e.jsxs("div",{className:"flex items-center justify-between space-x-2 rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{htmlFor:"edit_rejected",className:"text-sm font-medium",children:"已拒绝"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"不会被使用"})]}),e.jsx(Ge,{id:"edit_rejected",checked:m.rejected??!1,onCheckedChange:j=>h({...m,rejected:j})})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(_,{onClick:N,disabled:f,children:f?"保存中...":"保存"})]})]})}):null}function xk({open:a,onOpenChange:l,onConfirm:r,count:c}){return e.jsx(bs,{open:a,onOpenChange:l,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["您即将删除 ",c," 个表达方式,此操作无法撤销。确定要继续吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:r,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"确认删除"})]})]})})}const Kl="/api/webui/jargon";async function hk(){const a=await ke(`${Kl}/chats`,{});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取聊天列表失败")}return a.json()}async function fk(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.search&&l.append("search",a.search),a.chat_id&&l.append("chat_id",a.chat_id),a.is_jargon!==void 0&&a.is_jargon!==null&&l.append("is_jargon",a.is_jargon.toString()),a.is_global!==void 0&&l.append("is_global",a.is_global.toString());const r=await ke(`${Kl}/list?${l}`,{});if(!r.ok){const c=await r.json();throw new Error(c.detail||"获取黑话列表失败")}return r.json()}async function pk(a){const l=await ke(`${Kl}/${a}`,{});if(!l.ok){const r=await l.json();throw new Error(r.detail||"获取黑话详情失败")}return l.json()}async function gk(a){const l=await ke(`${Kl}/`,{method:"POST",body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"创建黑话失败")}return l.json()}async function jk(a,l){const r=await ke(`${Kl}/${a}`,{method:"PATCH",body:JSON.stringify(l)});if(!r.ok){const c=await r.json();throw new Error(c.detail||"更新黑话失败")}return r.json()}async function vk(a){const l=await ke(`${Kl}/${a}`,{method:"DELETE"});if(!l.ok){const r=await l.json();throw new Error(r.detail||"删除黑话失败")}return l.json()}async function Nk(a){const l=await ke(`${Kl}/batch/delete`,{method:"POST",body:JSON.stringify({ids:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量删除黑话失败")}return l.json()}async function bk(){const a=await ke(`${Kl}/stats/summary`,{});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取黑话统计失败")}return a.json()}async function yk(a,l){const r=new URLSearchParams;a.forEach(d=>r.append("ids",d.toString())),r.append("is_jargon",l.toString());const c=await ke(`${Kl}/batch/set-jargon?${r}`,{method:"POST"});if(!c.ok){const d=await c.json();throw new Error(d.detail||"批量设置黑话状态失败")}return c.json()}function wk(){const[a,l]=u.useState([]),[r,c]=u.useState(!0),[d,m]=u.useState(0),[h,f]=u.useState(1),[p,g]=u.useState(20),[N,j]=u.useState(""),[b,y]=u.useState("all"),[w,z]=u.useState("all"),[M,S]=u.useState(null),[F,E]=u.useState(!1),[C,R]=u.useState(!1),[H,O]=u.useState(!1),[X,L]=u.useState(null),[me,Ne]=u.useState(new Set),[je,ce]=u.useState(!1),[ge,pe]=u.useState(""),[D,Q]=u.useState({total:0,confirmed_jargon:0,confirmed_not_jargon:0,pending:0,global_count:0,complete_count:0,chat_count:0,top_chats:{}}),[B,ue]=u.useState([]),{toast:Y}=nt(),we=async()=>{try{c(!0);const Z=await fk({page:h,page_size:p,search:N||void 0,chat_id:b==="all"?void 0:b,is_jargon:w==="all"?void 0:w==="true"?!0:w==="false"?!1:void 0});l(Z.data),m(Z.total)}catch(Z){Y({title:"加载失败",description:Z instanceof Error?Z.message:"无法加载黑话列表",variant:"destructive"})}finally{c(!1)}},fe=async()=>{try{const Z=await bk();Z?.data&&Q(Z.data)}catch(Z){console.error("加载统计数据失败:",Z)}},Ee=async()=>{try{const Z=await hk();Z?.data&&ue(Z.data)}catch(Z){console.error("加载聊天列表失败:",Z)}};u.useEffect(()=>{we(),fe(),Ee()},[h,p,N,b,w]);const G=async Z=>{try{const Le=await pk(Z.id);S(Le.data),E(!0)}catch(Le){Y({title:"加载详情失败",description:Le instanceof Error?Le.message:"无法加载黑话详情",variant:"destructive"})}},$=Z=>{S(Z),R(!0)},A=async Z=>{try{await vk(Z.id),Y({title:"删除成功",description:`已删除黑话: ${Z.content}`}),L(null),we(),fe()}catch(Le){Y({title:"删除失败",description:Le instanceof Error?Le.message:"无法删除黑话",variant:"destructive"})}},K=Z=>{const Le=new Set(me);Le.has(Z)?Le.delete(Z):Le.add(Z),Ne(Le)},Re=()=>{me.size===a.length&&a.length>0?Ne(new Set):Ne(new Set(a.map(Z=>Z.id)))},se=async()=>{try{await Nk(Array.from(me)),Y({title:"批量删除成功",description:`已删除 ${me.size} 个黑话`}),Ne(new Set),ce(!1),we(),fe()}catch(Z){Y({title:"批量删除失败",description:Z instanceof Error?Z.message:"无法批量删除黑话",variant:"destructive"})}},$e=async Z=>{try{await yk(Array.from(me),Z),Y({title:"操作成功",description:`已将 ${me.size} 个词条设为${Z?"黑话":"非黑话"}`}),Ne(new Set),we(),fe()}catch(Le){Y({title:"操作失败",description:Le instanceof Error?Le.message:"批量设置失败",variant:"destructive"})}},cs=()=>{const Z=parseInt(ge),Le=Math.ceil(d/p);Z>=1&&Z<=Le?(f(Z),pe("")):Y({title:"无效的页码",description:`请输入1-${Le}之间的页码`,variant:"destructive"})},J=Z=>Z===!0?e.jsxs(Ce,{variant:"default",className:"bg-green-600 hover:bg-green-700",children:[e.jsx(Ot,{className:"h-3 w-3 mr-1"}),"是黑话"]}):Z===!1?e.jsxs(Ce,{variant:"secondary",children:[e.jsx(Sa,{className:"h-3 w-3 mr-1"}),"非黑话"]}):e.jsxs(Ce,{variant:"outline",children:[e.jsx(ox,{className:"h-3 w-3 mr-1"}),"未判定"]});return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(P1,{className:"h-8 w-8",strokeWidth:2}),"黑话管理"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"管理麦麦学习到的黑话和俚语"})]}),e.jsxs(_,{onClick:()=>O(!0),className:"gap-2",children:[e.jsx(Xs,{className:"h-4 w-4"}),"新增黑话"]})]})}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 pr-4",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-7 gap-3",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"总数量"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1",children:D.total})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"已确认黑话"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-green-600",children:D.confirmed_jargon})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"确认非黑话"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-gray-500",children:D.confirmed_not_jargon})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"待判定"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-yellow-600",children:D.pending})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"全局黑话"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-blue-600",children:D.global_count})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"推断完成"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-purple-600",children:D.complete_count})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"关联聊天数"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1",children:D.chat_count})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{htmlFor:"search",children:"搜索"}),e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{id:"search",placeholder:"搜索内容、含义...",value:N,onChange:Z=>j(Z.target.value),className:"pl-9"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{children:"聊天筛选"}),e.jsxs(Pe,{value:b,onValueChange:y,children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"全部聊天"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部聊天"}),B.map(Z=>e.jsx(W,{value:Z.chat_id,children:Z.chat_name},Z.chat_id))]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{children:"状态筛选"}),e.jsxs(Pe,{value:w,onValueChange:z,children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"全部状态"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部状态"}),e.jsx(W,{value:"true",children:"是黑话"}),e.jsx(W,{value:"false",children:"非黑话"})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{htmlFor:"page-size",children:"每页显示"}),e.jsxs(Pe,{value:p.toString(),onValueChange:Z=>{g(parseInt(Z)),f(1),Ne(new Set)},children:[e.jsx(Be,{id:"page-size",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]})]})]}),me.size>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-4 pt-4 border-t",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["已选择 ",me.size," 个"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>$e(!0),children:[e.jsx(Ot,{className:"h-4 w-4 mr-1"}),"标记为黑话"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>$e(!1),children:[e.jsx(Sa,{className:"h-4 w-4 mr-1"}),"标记为非黑话"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Ne(new Set),children:"取消选择"}),e.jsxs(_,{variant:"destructive",size:"sm",onClick:()=>ce(!0),children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"批量删除"]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card",children:[e.jsx("div",{className:"hidden md:block",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:me.size===a.length&&a.length>0,onCheckedChange:Re})}),e.jsx(ns,{children:"内容"}),e.jsx(ns,{children:"含义"}),e.jsx(ns,{children:"聊天"}),e.jsx(ns,{children:"状态"}),e.jsx(ns,{className:"text-center",children:"次数"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:r?e.jsx(_t,{children:e.jsx(Ze,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):a.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):a.map(Z=>e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:me.has(Z.id),onCheckedChange:()=>K(Z.id)})}),e.jsx(Ze,{className:"font-medium max-w-[200px]",children:e.jsxs("div",{className:"flex items-center gap-2",children:[Z.is_global&&e.jsx("span",{title:"全局黑话",children:e.jsx(Go,{className:"h-4 w-4 text-blue-500 flex-shrink-0"})}),e.jsx("span",{className:"truncate",title:Z.content,children:Z.content})]})}),e.jsx(Ze,{className:"max-w-[200px] truncate",title:Z.meaning||"",children:Z.meaning||e.jsx("span",{className:"text-muted-foreground",children:"-"})}),e.jsx(Ze,{className:"max-w-[150px] truncate",title:Z.chat_name||Z.chat_id,children:Z.chat_name||Z.chat_id}),e.jsx(Ze,{children:J(Z.is_jargon)}),e.jsx(Ze,{className:"text-center",children:Z.count}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>$(Z),children:[e.jsx(sr,{className:"h-4 w-4 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>G(Z),title:"查看详情",children:e.jsx(ua,{className:"h-4 w-4"})}),e.jsxs(_,{size:"sm",onClick:()=>L(Z),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"删除"]})]})})]},Z.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3 p-4",children:r?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"加载中..."}):a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无数据"}):a.map(Z=>e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(tt,{checked:me.has(Z.id),onCheckedChange:()=>K(Z.id),className:"mt-1"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[Z.is_global&&e.jsx(Go,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}),e.jsx("h3",{className:"font-semibold text-sm break-all",children:Z.content})]}),Z.meaning&&e.jsx("p",{className:"text-sm text-muted-foreground break-all",children:Z.meaning}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[J(Z.is_jargon),e.jsxs("span",{className:"text-muted-foreground",children:["次数: ",Z.count]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground truncate",children:["聊天: ",Z.chat_name||Z.chat_id]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1 pt-2 border-t",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>$(Z),className:"text-xs px-2 py-1 h-auto",children:[e.jsx(sr,{className:"h-3 w-3 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>G(Z),className:"text-xs px-2 py-1 h-auto",children:e.jsx(ua,{className:"h-3 w-3"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>L(Z),className:"text-xs px-2 py-1 h-auto text-destructive hover:text-destructive",children:[e.jsx(os,{className:"h-3 w-3 mr-1"}),"删除"]})]})]},Z.id))}),d>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 px-4 py-3 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",d," 条记录,第 ",h," / ",Math.ceil(d/p)," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(1),disabled:h===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h-1),disabled:h===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{type:"number",value:ge,onChange:Z=>pe(Z.target.value),onKeyDown:Z=>Z.key==="Enter"&&cs(),placeholder:h.toString(),className:"w-16 h-8 text-center",min:1,max:Math.ceil(d/p)}),e.jsx(_,{variant:"outline",size:"sm",onClick:cs,disabled:!ge,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h+1),disabled:h>=Math.ceil(d/p),children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(Math.ceil(d/p)),disabled:h>=Math.ceil(d/p),className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]})]})}),e.jsx(_k,{jargon:M,open:F,onOpenChange:E}),e.jsx(Sk,{open:H,onOpenChange:O,chatList:B,onSuccess:()=>{we(),fe(),O(!1)}}),e.jsx(kk,{jargon:M,open:C,onOpenChange:R,chatList:B,onSuccess:()=>{we(),fe(),R(!1)}}),e.jsx(bs,{open:!!X,onOpenChange:()=>L(null),children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除黑话 "',X?.content,'" 吗?此操作不可撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>X&&A(X),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})}),e.jsx(bs,{open:je,onOpenChange:ce,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["您即将删除 ",me.size," 个黑话,此操作无法撤销。确定要继续吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:se,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"确认删除"})]})]})})]})}function _k({jargon:a,open:l,onOpenChange:r}){return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] grid grid-rows-[auto_1fr_auto] overflow-hidden",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"黑话详情"}),e.jsx(at,{children:"查看黑话的完整信息"})]}),e.jsx(ts,{className:"h-full pr-4",children:e.jsxs("div",{className:"space-y-4 pb-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(Gm,{icon:Wr,label:"记录ID",value:a.id.toString(),mono:!0}),e.jsx(Gm,{label:"使用次数",value:a.count.toString()})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"内容"}),e.jsx("div",{className:"text-sm p-2 bg-muted rounded break-all whitespace-pre-wrap",children:a.content})]}),a.raw_content&&e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"原始内容"}),e.jsx("div",{className:"text-sm p-2 bg-muted rounded break-all",children:(()=>{try{const c=JSON.parse(a.raw_content);return Array.isArray(c)?c.map((d,m)=>e.jsxs("div",{children:[m>0&&e.jsx("hr",{className:"my-3 border-border"}),e.jsx("div",{className:"whitespace-pre-wrap",children:d})]},m)):e.jsx("div",{className:"whitespace-pre-wrap",children:a.raw_content})}catch{return e.jsx("div",{className:"whitespace-pre-wrap",children:a.raw_content})}})()})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"含义"}),e.jsx("div",{className:"text-sm p-2 bg-muted rounded break-all",children:a.meaning?e.jsx(bx,{content:a.meaning}):"-"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(Gm,{label:"聊天",value:a.chat_name||a.chat_id}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"状态"}),e.jsxs("div",{className:"flex items-center gap-2",children:[a.is_jargon===!0&&e.jsx(Ce,{variant:"default",className:"bg-green-600",children:"是黑话"}),a.is_jargon===!1&&e.jsx(Ce,{variant:"secondary",children:"非黑话"}),a.is_jargon===null&&e.jsx(Ce,{variant:"outline",children:"未判定"}),a.is_global&&e.jsx(Ce,{variant:"outline",className:"border-blue-500 text-blue-500",children:"全局"}),a.is_complete&&e.jsx(Ce,{variant:"outline",className:"border-purple-500 text-purple-500",children:"推断完成"})]})]})]}),a.inference_with_context&&e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"上下文推断结果"}),e.jsx("div",{className:"p-2 bg-muted rounded break-all whitespace-pre-wrap font-mono text-xs max-h-[200px] overflow-y-auto",children:a.inference_with_context})]}),a.inference_content_only&&e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"纯词条推断结果"}),e.jsx("div",{className:"p-2 bg-muted rounded break-all whitespace-pre-wrap font-mono text-xs max-h-[200px] overflow-y-auto",children:a.inference_content_only})]})]})}),e.jsx(gt,{className:"flex-shrink-0",children:e.jsx(_,{onClick:()=>r(!1),children:"关闭"})})]})}):null}function Gm({icon:a,label:l,value:r,mono:c=!1}){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(T,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[a&&e.jsx(a,{className:"h-3 w-3"}),l]}),e.jsx("div",{className:P("text-sm",c&&"font-mono",!r&&"text-muted-foreground"),children:r||"-"})]})}function Sk({open:a,onOpenChange:l,chatList:r,onSuccess:c}){const[d,m]=u.useState({content:"",meaning:"",chat_id:"",is_global:!1}),[h,f]=u.useState(!1),{toast:p}=nt(),g=async()=>{if(!d.content||!d.chat_id){p({title:"验证失败",description:"请填写必填字段:内容和聊天",variant:"destructive"});return}try{f(!0),await gk(d),p({title:"创建成功",description:"黑话已创建"}),m({content:"",meaning:"",chat_id:"",is_global:!1}),c()}catch(N){p({title:"创建失败",description:N instanceof Error?N.message:"无法创建黑话",variant:"destructive"})}finally{f(!1)}};return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"新增黑话"}),e.jsx(at,{children:"创建新的黑话记录"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"content",children:["内容 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ne,{id:"content",value:d.content,onChange:N=>m({...d,content:N.target.value}),placeholder:"输入黑话内容"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"meaning",children:"含义"}),e.jsx(pt,{id:"meaning",value:d.meaning||"",onChange:N=>m({...d,meaning:N.target.value}),placeholder:"输入黑话含义(可选)",rows:3})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"chat_id",children:["聊天 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsxs(Pe,{value:d.chat_id,onValueChange:N=>m({...d,chat_id:N}),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择关联的聊天"})}),e.jsx(Ie,{children:r.map(N=>e.jsx(W,{value:N.chat_id,children:N.chat_name},N.chat_id))})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"is_global",checked:d.is_global,onCheckedChange:N=>m({...d,is_global:N})}),e.jsx(T,{htmlFor:"is_global",children:"设为全局黑话"})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>l(!1),children:"取消"}),e.jsx(_,{onClick:g,disabled:h,children:h?"创建中...":"创建"})]})]})})}function kk({jargon:a,open:l,onOpenChange:r,chatList:c,onSuccess:d}){const[m,h]=u.useState({}),[f,p]=u.useState(!1),{toast:g}=nt();u.useEffect(()=>{a&&h({content:a.content,meaning:a.meaning||"",chat_id:a.stream_id||a.chat_id,is_global:a.is_global,is_jargon:a.is_jargon})},[a]);const N=async()=>{if(a)try{p(!0),await jk(a.id,m),g({title:"保存成功",description:"黑话已更新"}),d()}catch(j){g({title:"保存失败",description:j instanceof Error?j.message:"无法更新黑话",variant:"destructive"})}finally{p(!1)}};return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑黑话"}),e.jsx(at,{children:"修改黑话的信息"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_content",children:"内容"}),e.jsx(ne,{id:"edit_content",value:m.content||"",onChange:j=>h({...m,content:j.target.value}),placeholder:"输入黑话内容"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_meaning",children:"含义"}),e.jsx(pt,{id:"edit_meaning",value:m.meaning||"",onChange:j=>h({...m,meaning:j.target.value}),placeholder:"输入黑话含义",rows:3})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_chat_id",children:"聊天"}),e.jsxs(Pe,{value:m.chat_id||"",onValueChange:j=>h({...m,chat_id:j}),children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择关联的聊天"})}),e.jsx(Ie,{children:c.map(j=>e.jsx(W,{value:j.chat_id,children:j.chat_name},j.chat_id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"黑话状态"}),e.jsxs(Pe,{value:m.is_jargon===null?"null":m.is_jargon?.toString()||"null",onValueChange:j=>h({...m,is_jargon:j==="null"?null:j==="true"}),children:[e.jsx(Be,{children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"null",children:"未判定"}),e.jsx(W,{value:"true",children:"是黑话"}),e.jsx(W,{value:"false",children:"非黑话"})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"edit_is_global",checked:m.is_global,onCheckedChange:j=>h({...m,is_global:j})}),e.jsx(T,{htmlFor:"edit_is_global",children:"全局黑话"})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(_,{onClick:N,disabled:f,children:f?"保存中...":"保存"})]})]})}):null}const li="/api/webui/person";async function Ck(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.search&&l.append("search",a.search),a.is_known!==void 0&&l.append("is_known",a.is_known.toString()),a.platform&&l.append("platform",a.platform);const r=await ke(`${li}/list?${l}`,{headers:Zs()});if(!r.ok){const c=await r.json();throw new Error(c.detail||"获取人物列表失败")}return r.json()}async function Tk(a){const l=await ke(`${li}/${a}`,{headers:Zs()});if(!l.ok){const r=await l.json();throw new Error(r.detail||"获取人物详情失败")}return l.json()}async function Ek(a,l){const r=await ke(`${li}/${a}`,{method:"PATCH",headers:Zs(),body:JSON.stringify(l)});if(!r.ok){const c=await r.json();throw new Error(c.detail||"更新人物信息失败")}return r.json()}async function Mk(a){const l=await ke(`${li}/${a}`,{method:"DELETE",headers:Zs()});if(!l.ok){const r=await l.json();throw new Error(r.detail||"删除人物信息失败")}return l.json()}async function Ak(){const a=await ke(`${li}/stats/summary`,{headers:Zs()});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取统计数据失败")}return a.json()}async function zk(a){const l=await ke(`${li}/batch/delete`,{method:"POST",headers:Zs(),body:JSON.stringify({person_ids:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量删除失败")}return l.json()}function Rk(){const[a,l]=u.useState([]),[r,c]=u.useState(!0),[d,m]=u.useState(0),[h,f]=u.useState(1),[p,g]=u.useState(20),[N,j]=u.useState(""),[b,y]=u.useState(void 0),[w,z]=u.useState(void 0),[M,S]=u.useState(null),[F,E]=u.useState(!1),[C,R]=u.useState(!1),[H,O]=u.useState(null),[X,L]=u.useState({total:0,known:0,unknown:0,platforms:{}}),[me,Ne]=u.useState(new Set),[je,ce]=u.useState(!1),[ge,pe]=u.useState(""),{toast:D}=nt(),Q=async()=>{try{c(!0);const se=await Ck({page:h,page_size:p,search:N||void 0,is_known:b,platform:w});l(se.data),m(se.total)}catch(se){D({title:"加载失败",description:se instanceof Error?se.message:"无法加载人物信息",variant:"destructive"})}finally{c(!1)}},B=async()=>{try{const se=await Ak();se?.data&&L(se.data)}catch(se){console.error("加载统计数据失败:",se)}};u.useEffect(()=>{Q(),B()},[h,p,N,b,w]);const ue=async se=>{try{const $e=await Tk(se.person_id);S($e.data),E(!0)}catch($e){D({title:"加载详情失败",description:$e instanceof Error?$e.message:"无法加载人物详情",variant:"destructive"})}},Y=se=>{S(se),R(!0)},we=async se=>{try{await Mk(se.person_id),D({title:"删除成功",description:`已删除人物信息: ${se.person_name||se.nickname||se.user_id}`}),O(null),Q(),B()}catch($e){D({title:"删除失败",description:$e instanceof Error?$e.message:"无法删除人物信息",variant:"destructive"})}},fe=u.useMemo(()=>Object.keys(X.platforms),[X.platforms]),Ee=se=>{const $e=new Set(me);$e.has(se)?$e.delete(se):$e.add(se),Ne($e)},G=()=>{me.size===a.length&&a.length>0?Ne(new Set):Ne(new Set(a.map(se=>se.person_id)))},$=()=>{if(me.size===0){D({title:"未选择任何人物",description:"请先选择要删除的人物",variant:"destructive"});return}ce(!0)},A=async()=>{try{const se=await zk(Array.from(me));D({title:"批量删除完成",description:se.message}),Ne(new Set),ce(!1),Q(),B()}catch(se){D({title:"批量删除失败",description:se instanceof Error?se.message:"批量删除失败",variant:"destructive"})}},K=()=>{const se=parseInt(ge),$e=Math.ceil(d/p);se>=1&&se<=$e?(f(se),pe("")):D({title:"无效的页码",description:`请输入1-${$e}之间的页码`,variant:"destructive"})},Re=se=>se?new Date(se*1e3).toLocaleString("zh-CN"):"-";return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(oc,{className:"h-8 w-8",strokeWidth:2}),"人物信息管理"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"管理麦麦认识的所有人物信息"})]})})}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 pr-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总人数"}),e.jsx("div",{className:"text-2xl font-bold mt-1",children:X.total})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"已认识"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-green-600",children:X.known})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"未认识"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-muted-foreground",children:X.unknown})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx(T,{htmlFor:"search",children:"搜索"}),e.jsxs("div",{className:"relative mt-1.5",children:[e.jsx($t,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{id:"search",placeholder:"搜索名称、昵称或用户ID...",value:N,onChange:se=>j(se.target.value),className:"pl-9"})]})]}),e.jsxs("div",{children:[e.jsx(T,{htmlFor:"filter-known",children:"认识状态"}),e.jsxs(Pe,{value:b===void 0?"all":b.toString(),onValueChange:se=>{y(se==="all"?void 0:se==="true"),f(1)},children:[e.jsx(Be,{id:"filter-known",className:"mt-1.5",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部"}),e.jsx(W,{value:"true",children:"已认识"}),e.jsx(W,{value:"false",children:"未认识"})]})]})]}),e.jsxs("div",{children:[e.jsx(T,{htmlFor:"filter-platform",children:"平台"}),e.jsxs(Pe,{value:w||"all",onValueChange:se=>{z(se==="all"?void 0:se),f(1)},children:[e.jsx(Be,{id:"filter-platform",className:"mt-1.5",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部平台"}),fe.map(se=>e.jsxs(W,{value:se,children:[se," (",X.platforms[se],")"]},se))]})]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 mt-4 pt-4 border-t",children:[e.jsx("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:me.size>0&&e.jsxs("span",{children:["已选择 ",me.size," 个人物"]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"page-size",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:p.toString(),onValueChange:se=>{g(parseInt(se)),f(1),Ne(new Set)},children:[e.jsx(Be,{id:"page-size",className:"w-20",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]}),me.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Ne(new Set),children:"取消选择"}),e.jsxs(_,{variant:"destructive",size:"sm",onClick:$,children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"批量删除"]})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card",children:[e.jsx("div",{className:"hidden md:block",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:a.length>0&&me.size===a.length,onCheckedChange:G,"aria-label":"全选"})}),e.jsx(ns,{children:"状态"}),e.jsx(ns,{children:"名称"}),e.jsx(ns,{children:"昵称"}),e.jsx(ns,{children:"平台"}),e.jsx(ns,{children:"用户ID"}),e.jsx(ns,{children:"最后更新"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:r?e.jsx(_t,{children:e.jsx(Ze,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):a.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):a.map(se=>e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:me.has(se.person_id),onCheckedChange:()=>Ee(se.person_id),"aria-label":`选择 ${se.person_name||se.nickname||se.user_id}`})}),e.jsx(Ze,{children:e.jsx("div",{className:P("inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium",se.is_known?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-400"),children:se.is_known?"已认识":"未认识"})}),e.jsx(Ze,{className:"font-medium",children:se.person_name||e.jsx("span",{className:"text-muted-foreground",children:"-"})}),e.jsx(Ze,{children:se.nickname||"-"}),e.jsx(Ze,{children:se.platform}),e.jsx(Ze,{className:"font-mono text-sm",children:se.user_id}),e.jsx(Ze,{className:"text-sm text-muted-foreground",children:Re(se.last_know)}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>ue(se),children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"详情"]}),e.jsxs(_,{variant:"default",size:"sm",onClick:()=>Y(se),children:[e.jsx(sr,{className:"h-4 w-4 mr-1"}),"编辑"]}),e.jsxs(_,{size:"sm",onClick:()=>O(se),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"删除"]})]})})]},se.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3 p-4",children:r?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"加载中..."}):a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无数据"}):a.map(se=>e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(tt,{checked:me.has(se.person_id),onCheckedChange:()=>Ee(se.person_id),className:"mt-1"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:P("inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium mb-2",se.is_known?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-400"),children:se.is_known?"已认识":"未认识"}),e.jsx("h3",{className:"font-semibold text-sm line-clamp-1 w-full break-all",children:se.person_name||e.jsx("span",{className:"text-muted-foreground",children:"未命名"})}),se.nickname&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1 w-full break-all",children:["昵称: ",se.nickname]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"平台"}),e.jsx("p",{className:"font-medium text-xs",children:se.platform})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"用户ID"}),e.jsx("p",{className:"font-mono text-xs truncate",title:se.user_id,children:se.user_id})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"最后更新"}),e.jsx("p",{className:"text-xs",children:Re(se.last_know)})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1 pt-2 border-t overflow-hidden",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>ue(se),className:"text-xs px-2 py-1 h-auto flex-shrink-0",children:[e.jsx(ua,{className:"h-3 w-3 mr-1"}),"查看"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>Y(se),className:"text-xs px-2 py-1 h-auto flex-shrink-0",children:[e.jsx(sr,{className:"h-3 w-3 mr-1"}),"编辑"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>O(se),className:"text-xs px-2 py-1 h-auto flex-shrink-0 text-destructive hover:text-destructive",children:[e.jsx(os,{className:"h-3 w-3 mr-1"}),"删除"]})]})]},se.id))}),d>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 px-4 py-3 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",d," 条记录,第 ",h," / ",Math.ceil(d/p)," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(1),disabled:h===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h-1),disabled:h===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{type:"number",value:ge,onChange:se=>pe(se.target.value),onKeyDown:se=>se.key==="Enter"&&K(),placeholder:h.toString(),className:"w-16 h-8 text-center",min:1,max:Math.ceil(d/p)}),e.jsx(_,{variant:"outline",size:"sm",onClick:K,disabled:!ge,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h+1),disabled:h>=Math.ceil(d/p),children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(Math.ceil(d/p)),disabled:h>=Math.ceil(d/p),className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]})]})}),e.jsx(Dk,{person:M,open:F,onOpenChange:E}),e.jsx(Ok,{person:M,open:C,onOpenChange:R,onSuccess:()=>{Q(),B(),R(!1)}}),e.jsx(bs,{open:!!H,onOpenChange:()=>O(null),children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除人物信息 "',H?.person_name||H?.nickname||H?.user_id,'" 吗? 此操作不可撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>H&&we(H),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})}),e.jsx(bs,{open:je,onOpenChange:ce,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["确定要删除选中的 ",me.size," 个人物信息吗? 此操作不可撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:A,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})})]})}function Dk({person:a,open:l,onOpenChange:r}){if(!a)return null;const c=d=>d?new Date(d*1e3).toLocaleString("zh-CN"):"-";return e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"人物详情"}),e.jsxs(at,{children:["查看 ",a.person_name||a.nickname||a.user_id," 的完整信息"]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx($l,{icon:Fl,label:"人物名称",value:a.person_name}),e.jsx($l,{icon:Ia,label:"昵称",value:a.nickname}),e.jsx($l,{icon:Wr,label:"用户ID",value:a.user_id,mono:!0}),e.jsx($l,{icon:Wr,label:"人物ID",value:a.person_id,mono:!0}),e.jsx($l,{label:"平台",value:a.platform}),e.jsx($l,{label:"状态",value:a.is_known?"已认识":"未认识"})]}),a.name_reason&&e.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"名称设定原因"}),e.jsx("p",{className:"mt-1 text-sm",children:a.name_reason})]}),a.memory_points&&e.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"个人印象"}),e.jsx("p",{className:"mt-1 text-sm whitespace-pre-wrap",children:a.memory_points})]}),a.group_nick_name&&a.group_nick_name.length>0&&e.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"群昵称"}),e.jsx("div",{className:"mt-2 space-y-1",children:a.group_nick_name.map((d,m)=>e.jsxs("div",{className:"text-sm flex items-center gap-2",children:[e.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:d.group_id}),e.jsx("span",{children:"→"}),e.jsx("span",{children:d.group_nick_name})]},m))})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsx($l,{icon:da,label:"认识时间",value:c(a.know_times)}),e.jsx($l,{icon:da,label:"首次记录",value:c(a.know_since)}),e.jsx($l,{icon:da,label:"最后更新",value:c(a.last_know)})]})]}),e.jsx(gt,{children:e.jsx(_,{onClick:()=>r(!1),children:"关闭"})})]})})}function $l({icon:a,label:l,value:r,mono:c=!1}){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(T,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[a&&e.jsx(a,{className:"h-3 w-3"}),l]}),e.jsx("div",{className:P("text-sm",c&&"font-mono",!r&&"text-muted-foreground"),children:r||"-"})]})}function Ok({person:a,open:l,onOpenChange:r,onSuccess:c}){const[d,m]=u.useState({}),[h,f]=u.useState(!1),{toast:p}=nt();u.useEffect(()=>{a&&m({person_name:a.person_name||"",name_reason:a.name_reason||"",nickname:a.nickname||"",is_known:a.is_known})},[a]);const g=async()=>{if(a)try{f(!0),await Ek(a.person_id,d),p({title:"保存成功",description:"人物信息已更新"}),c()}catch(N){p({title:"保存失败",description:N instanceof Error?N.message:"无法更新人物信息",variant:"destructive"})}finally{f(!1)}};return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑人物信息"}),e.jsxs(at,{children:["修改 ",a.person_name||a.nickname||a.user_id," 的信息"]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"person_name",children:"人物名称"}),e.jsx(ne,{id:"person_name",value:d.person_name||"",onChange:N=>m({...d,person_name:N.target.value}),placeholder:"为这个人设置一个名称"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"nickname",children:"昵称"}),e.jsx(ne,{id:"nickname",value:d.nickname||"",onChange:N=>m({...d,nickname:N.target.value}),placeholder:"昵称"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"name_reason",children:"名称设定原因"}),e.jsx(pt,{id:"name_reason",value:d.name_reason||"",onChange:N=>m({...d,name_reason:N.target.value}),placeholder:"为什么这样称呼这个人?",rows:2})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[e.jsxs("div",{children:[e.jsx(T,{htmlFor:"is_known",className:"text-base font-medium",children:"已认识"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"标记是否已经认识这个人"})]}),e.jsx(Ge,{id:"is_known",checked:d.is_known,onCheckedChange:N=>m({...d,is_known:N})})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(_,{onClick:g,disabled:h,children:h?"保存中...":"保存"})]})]})}):null}var Lk=S_();const tj=mw(Lk),Mx="/api/webui";async function Uk(a=100,l="all"){const r=`${Mx}/knowledge/graph?limit=${a}&node_type=${l}`,c=await fetch(r);if(!c.ok)throw new Error(`获取知识图谱失败: ${c.status}`);return c.json()}async function $k(){const a=await fetch(`${Mx}/knowledge/stats`);if(!a.ok)throw new Error("获取知识图谱统计信息失败");return a.json()}async function Bk(a){const l=await fetch(`${Mx}/knowledge/search?query=${encodeURIComponent(a)}`);if(!l.ok)throw new Error("搜索知识节点失败");return l.json()}const dN=u.memo(({data:a})=>e.jsxs("div",{className:"px-4 py-2 shadow-md rounded-lg bg-gradient-to-br from-blue-500 to-blue-600 border-2 border-blue-700 min-w-[120px]",children:[e.jsx(Yo,{type:"target",position:Jo.Top}),e.jsx("div",{className:"font-semibold text-white text-sm truncate max-w-[200px]",title:a.content,children:a.label}),e.jsx(Yo,{type:"source",position:Jo.Bottom})]}));dN.displayName="EntityNode";const uN=u.memo(({data:a})=>e.jsxs("div",{className:"px-3 py-2 shadow-md rounded-md bg-gradient-to-br from-green-500 to-green-600 border-2 border-green-700 min-w-[100px]",children:[e.jsx(Yo,{type:"target",position:Jo.Top}),e.jsx("div",{className:"font-medium text-white text-xs truncate max-w-[150px]",title:a.content,children:a.label}),e.jsx(Yo,{type:"source",position:Jo.Bottom})]}));uN.displayName="ParagraphNode";const Ik={entity:dN,paragraph:uN};function Pk(a,l){const r=new tj.graphlib.Graph;r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:"TB",ranksep:100,nodesep:80});const c=[],d=[];return a.forEach(m=>{r.setNode(m.id,{width:150,height:50})}),l.forEach(m=>{r.setEdge(m.source,m.target)}),tj.layout(r),a.forEach(m=>{const h=r.node(m.id);c.push({id:m.id,type:m.type,position:{x:h.x-75,y:h.y-25},data:{label:m.content.slice(0,20)+(m.content.length>20?"...":""),content:m.content}})}),l.forEach((m,h)=>{const f={id:`edge-${h}`,source:m.source,target:m.target,animated:a.length<=200&&m.weight>5,style:{strokeWidth:Math.min(m.weight/2,5),opacity:.6}};m.weight>10&&a.length<100&&(f.label=`${m.weight.toFixed(0)}`),d.push(f)}),{nodes:c,edges:d}}function Fk(){const a=ha(),[l,r]=u.useState(!1),[c,d]=u.useState(null),[m,h]=u.useState(""),[f,p]=u.useState("all"),[g,N]=u.useState(50),[j,b]=u.useState("50"),[y,w]=u.useState(!1),[z,M]=u.useState(!0),[S,F]=u.useState(!1),[E,C]=u.useState(!1),[R,H,O]=k_([]),[X,L,me]=C_([]),[Ne,je]=u.useState(0),[ce,ge]=u.useState(null),[pe,D]=u.useState(null),{toast:Q}=nt(),B=u.useCallback(A=>A.type==="entity"?"#6366f1":A.type==="paragraph"?"#10b981":"#6b7280",[]),ue=u.useCallback(async(A=!1)=>{try{if(!A&&g>200){C(!0);return}r(!0);const[K,Re]=await Promise.all([Uk(g,f),$k()]);if(d(Re),K.nodes.length===0){Q({title:"提示",description:"知识库为空,请先导入知识数据"}),H([]),L([]);return}const{nodes:se,edges:$e}=Pk(K.nodes,K.edges);H(se),L($e),je(se.length),Re&&Re.total_nodes>g&&Q({title:"提示",description:`知识图谱包含 ${Re.total_nodes} 个节点,当前显示 ${se.length} 个`}),Q({title:"加载成功",description:`已加载 ${se.length} 个节点,${$e.length} 条边`})}catch(K){console.error("加载知识图谱失败:",K),Q({title:"加载失败",description:K instanceof Error?K.message:"未知错误",variant:"destructive"})}finally{r(!1)}},[g,f,Q]),Y=u.useCallback(async()=>{if(!m.trim()){Q({title:"提示",description:"请输入搜索关键词"});return}try{const A=await Bk(m);if(A.length===0){Q({title:"未找到",description:"没有找到匹配的节点"});return}const K=new Set(A.map(Re=>Re.id));H(Re=>Re.map(se=>({...se,style:{...se.style,opacity:K.has(se.id)?1:.3,filter:K.has(se.id)?"brightness(1.2)":"brightness(0.8)"}}))),Q({title:"搜索完成",description:`找到 ${A.length} 个匹配节点`})}catch(A){console.error("搜索失败:",A),Q({title:"搜索失败",description:A instanceof Error?A.message:"未知错误",variant:"destructive"})}},[m,Q]),we=u.useCallback(()=>{H(A=>A.map(K=>({...K,style:{...K.style,opacity:1,filter:"brightness(1)"}})))},[]),fe=u.useCallback(()=>{M(!1),F(!0),ue()},[ue]),Ee=u.useCallback(()=>{C(!1),setTimeout(()=>{ue(!0)},0)},[ue]),G=u.useCallback((A,K)=>{R.find(se=>se.id===K.id)&&ge({id:K.id,type:K.type,content:K.data.content})},[R]);u.useEffect(()=>{z||S&&ue()},[g,f,z,S]);const $=u.useCallback((A,K)=>{const Re=R.find(cs=>cs.id===K.source),se=R.find(cs=>cs.id===K.target),$e=X.find(cs=>cs.id===K.id);Re&&se&&$e&&D({source:{id:Re.id,type:Re.type,content:Re.data.content},target:{id:se.id,type:se.type,content:se.data.content},edge:{source:K.source,target:K.target,weight:parseFloat(K.label||"0")}})},[R,X]);return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex-shrink-0 p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"麦麦知识库图谱"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"可视化知识实体与关系网络"})]}),c&&e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(Zr,{className:"h-3 w-3"}),"节点: ",c.total_nodes]}),e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(xv,{className:"h-3 w-3"}),"边: ",c.total_edges]}),e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(Yt,{className:"h-3 w-3"}),"实体: ",c.entity_nodes]}),e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(Ua,{className:"h-3 w-3"}),"段落: ",c.paragraph_nodes]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 mt-4",children:[e.jsxs("div",{className:"flex-1 flex gap-2",children:[e.jsx(ne,{placeholder:"搜索节点内容...",value:m,onChange:A=>h(A.target.value),onKeyDown:A=>A.key==="Enter"&&Y(),className:"flex-1"}),e.jsx(_,{onClick:Y,size:"sm",children:e.jsx($t,{className:"h-4 w-4"})}),e.jsx(_,{onClick:we,variant:"outline",size:"sm",children:"重置"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(Pe,{value:f,onValueChange:A=>p(A),children:[e.jsx(Be,{className:"w-[120px]",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部节点"}),e.jsx(W,{value:"entity",children:"仅实体"}),e.jsx(W,{value:"paragraph",children:"仅段落"})]})]}),e.jsxs(Pe,{value:g===1e4?"all":y?"custom":g.toString(),onValueChange:A=>{A==="custom"?(w(!0),b(g.toString())):A==="all"?(w(!1),N(1e4)):(w(!1),N(Number(A)))},children:[e.jsx(Be,{className:"w-[120px]",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"50",children:"50 节点"}),e.jsx(W,{value:"100",children:"100 节点"}),e.jsx(W,{value:"200",children:"200 节点"}),e.jsx(W,{value:"500",children:"500 节点"}),e.jsx(W,{value:"1000",children:"1000 节点"}),e.jsx(W,{value:"all",children:"全部 (最多10000)"}),e.jsx(W,{value:"custom",children:"自定义..."})]})]}),y&&e.jsx(ne,{type:"number",min:"50",value:j,onChange:A=>b(A.target.value),onBlur:()=>{const A=parseInt(j);!isNaN(A)&&A>=50?N(A):(b("50"),N(50))},onKeyDown:A=>{if(A.key==="Enter"){const K=parseInt(j);!isNaN(K)&&K>=50?N(K):(b("50"),N(50))}},placeholder:"最少50个",className:"w-[120px]"}),e.jsx(_,{onClick:()=>ue(),variant:"outline",size:"sm",disabled:l,children:e.jsx(dt,{className:P("h-4 w-4",l&&"animate-spin")})})]})]})]}),e.jsx("div",{className:"flex-1 relative",children:l?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(dt,{className:"h-8 w-8 animate-spin mx-auto mb-2 text-muted-foreground"}),e.jsx("p",{className:"text-muted-foreground",children:"加载知识图谱中..."})]})}):R.length===0?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Zr,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"知识库为空"}),e.jsx("p",{className:"text-muted-foreground",children:"请先导入知识数据"})]})}):e.jsxs(T_,{nodes:R,edges:X,onNodesChange:O,onEdgesChange:me,onNodeClick:G,onEdgeClick:$,nodeTypes:Ik,fitView:!0,minZoom:.05,maxZoom:1.5,defaultViewport:{x:0,y:0,zoom:.5},elevateNodesOnSelect:Ne<=500,nodesDraggable:Ne<=1e3,attributionPosition:"bottom-left",children:[e.jsx(E_,{variant:M_.Dots,gap:12,size:1}),e.jsx(A_,{}),Ne<=500&&e.jsx(z_,{nodeColor:B,nodeBorderRadius:8,pannable:!0,zoomable:!0}),e.jsxs(R_,{position:"top-right",className:"bg-background/95 backdrop-blur-sm rounded-lg border p-3 shadow-lg",children:[e.jsx("div",{className:"text-sm font-semibold mb-2",children:"图例"}),e.jsxs("div",{className:"space-y-2 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-blue-500 to-blue-600 border-2 border-blue-700"}),e.jsx("span",{children:"实体节点"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-green-500 to-green-600 border-2 border-green-700"}),e.jsx("span",{children:"段落节点"})]}),Ne>200&&e.jsxs("div",{className:"mt-2 pt-2 border-t text-yellow-600 dark:text-yellow-500",children:[e.jsx("div",{className:"font-semibold",children:"性能模式"}),e.jsx("div",{children:"已禁用动画"}),Ne>500&&e.jsx("div",{children:"已禁用缩略图"})]})]})]})]})}),e.jsx(Qs,{open:!!ce,onOpenChange:A=>!A&&ge(null),children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsx(qs,{children:e.jsx(Vs,{children:"节点详情"})}),ce&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid grid-cols-2 gap-4",children:e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"类型"}),e.jsx("div",{className:"mt-1",children:e.jsx(Ce,{variant:ce.type==="entity"?"default":"secondary",children:ce.type==="entity"?"🏷️ 实体":"📄 段落"})})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"ID"}),e.jsx("code",{className:"mt-1 block p-2 bg-muted rounded text-xs break-all",children:ce.id})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"内容"}),e.jsx(ts,{className:"mt-1 max-h-[400px] p-3 bg-muted rounded border",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:ce.content})})]})]})]})}),e.jsx(Qs,{open:!!pe,onOpenChange:A=>!A&&D(null),children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-hidden flex flex-col",children:[e.jsx(qs,{children:e.jsx(Vs,{children:"边详情"})}),pe&&e.jsx(ts,{className:"flex-1 pr-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0 p-3 bg-blue-50 dark:bg-blue-950 rounded border-2 border-blue-200 dark:border-blue-800",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"源节点"}),e.jsx("div",{className:"font-medium text-sm mb-2 truncate",children:pe.source.content}),e.jsxs("code",{className:"text-xs text-muted-foreground truncate block",children:[pe.source.id.slice(0,40),"..."]})]}),e.jsx("div",{className:"text-2xl text-muted-foreground flex-shrink-0",children:"→"}),e.jsxs("div",{className:"flex-1 min-w-0 p-3 bg-green-50 dark:bg-green-950 rounded border-2 border-green-200 dark:border-green-800",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"目标节点"}),e.jsx("div",{className:"font-medium text-sm mb-2 truncate",children:pe.target.content}),e.jsxs("code",{className:"text-xs text-muted-foreground truncate block",children:[pe.target.id.slice(0,40),"..."]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"权重"}),e.jsx("div",{className:"mt-1",children:e.jsx(Ce,{variant:"outline",className:"text-base font-mono",children:pe.edge.weight.toFixed(4)})})]})]})})]})}),e.jsx(bs,{open:z,onOpenChange:M,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"加载知识图谱"}),e.jsxs(gs,{children:["知识图谱的动态展示会消耗较多系统资源。",e.jsx("br",{}),"确定要加载知识图谱吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:()=>a({to:"/"}),children:"取消 (返回首页)"}),e.jsx(js,{onClick:fe,children:"确认加载"})]})]})}),e.jsx(bs,{open:E,onOpenChange:C,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"⚠️ 节点数量较多"}),e.jsx(gs,{asChild:!0,children:e.jsxs("div",{children:[e.jsxs("p",{children:["您正在尝试加载 ",e.jsx("strong",{className:"text-orange-600",children:g>=1e4?"全部 (最多10000个)":g})," 个节点。"]}),e.jsx("p",{className:"mt-4",children:"节点数量过多可能导致:"}),e.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[e.jsx("li",{children:"页面加载时间较长"}),e.jsx("li",{children:"浏览器卡顿或崩溃"}),e.jsx("li",{children:"系统资源占用过高"})]}),e.jsx("p",{className:"mt-4",children:"建议先选择较少的节点数量 (50-200 个)。"})]})})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:()=>{C(!1),g>200&&(N(50),w(!1))},children:"取消"}),e.jsx(js,{onClick:Ee,className:"bg-orange-600 hover:bg-orange-700",children:"我了解风险,继续加载"})]})]})})]})}function Hk(){return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-none border-b bg-card/50 px-6 py-4",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"麦麦知识库管理"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"管理和组织麦麦的知识库内容"})]})})}),e.jsx("div",{className:"flex-1 overflow-auto p-6",children:e.jsx("div",{className:"mx-auto max-w-4xl",children:e.jsxs(Te,{children:[e.jsxs(Oe,{className:"text-center",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-20 w-20 items-center justify-center rounded-full bg-primary/10",children:e.jsx(Zr,{className:"h-10 w-10 text-primary"})}),e.jsx(Ue,{className:"text-2xl",children:"麦麦知识库管理"}),e.jsx(Ns,{className:"text-base",children:"功能开发中,敬请期待"})]}),e.jsx(ze,{className:"text-center text-sm text-muted-foreground",children:e.jsx("p",{children:"此功能将提供知识库的创建、编辑、导入和管理能力"})})]})})})]})}function aj({className:a,classNames:l,showOutsideDays:r=!0,captionLayout:c="label",buttonVariant:d="ghost",formatters:m,components:h,...f}){const p=Ev();return e.jsx(j_,{showOutsideDays:r,className:P("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,a),captionLayout:c,formatters:{formatMonthDropdown:g=>g.toLocaleString("default",{month:"short"}),...m},classNames:{root:P("w-fit",p.root),months:P("relative flex flex-col gap-4 md:flex-row",p.months),month:P("flex w-full flex-col gap-4",p.month),nav:P("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",p.nav),button_previous:P(si({variant:d}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",p.button_previous),button_next:P(si({variant:d}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",p.button_next),month_caption:P("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",p.month_caption),dropdowns:P("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",p.dropdowns),dropdown_root:P("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",p.dropdown_root),dropdown:P("bg-popover absolute inset-0 opacity-0",p.dropdown),caption_label:P("select-none font-medium",c==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",p.caption_label),table:"w-full border-collapse",weekdays:P("flex",p.weekdays),weekday:P("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",p.weekday),week:P("mt-2 flex w-full",p.week),week_number_header:P("w-[--cell-size] select-none",p.week_number_header),week_number:P("text-muted-foreground select-none text-[0.8rem]",p.week_number),day:P("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",p.day),range_start:P("bg-accent rounded-l-md",p.range_start),range_middle:P("rounded-none",p.range_middle),range_end:P("bg-accent rounded-r-md",p.range_end),today:P("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",p.today),outside:P("text-muted-foreground aria-selected:text-muted-foreground",p.outside),disabled:P("text-muted-foreground opacity-50",p.disabled),hidden:P("invisible",p.hidden),...l},components:{Root:({className:g,rootRef:N,...j})=>e.jsx("div",{"data-slot":"calendar",ref:N,className:P(g),...j}),Chevron:({className:g,orientation:N,...j})=>N==="left"?e.jsx(Pa,{className:P("size-4",g),...j}):N==="right"?e.jsx(ra,{className:P("size-4",g),...j}):e.jsx(Ba,{className:P("size-4",g),...j}),DayButton:qk,WeekNumber:({children:g,...N})=>e.jsx("td",{...N,children:e.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:g})}),...h},...f})}function qk({className:a,day:l,modifiers:r,...c}){const d=Ev(),m=u.useRef(null);return u.useEffect(()=>{r.focused&&m.current?.focus()},[r.focused]),e.jsx(_,{ref:m,variant:"ghost",size:"icon","data-day":l.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:P("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",d.day,a),...c})}const Uo={xs:{label:"小",rowHeight:28,class:"text-[10px] sm:text-xs"},sm:{label:"中",rowHeight:36,class:"text-xs sm:text-sm"},base:{label:"大",rowHeight:44,class:"text-sm sm:text-base"}};function Vk(){const[a,l]=u.useState([]),[r,c]=u.useState(""),[d,m]=u.useState("all"),[h,f]=u.useState("all"),[p,g]=u.useState(void 0),[N,j]=u.useState(void 0),[b,y]=u.useState(!0),[w,z]=u.useState(!1),[M,S]=u.useState("xs"),[F,E]=u.useState(4),[C,R]=u.useState(!1),H=u.useRef(null);u.useEffect(()=>{const Y=Qn.getAllLogs();l(Y);const we=Qn.onLog(()=>{l(Qn.getAllLogs())}),fe=Qn.onConnectionChange(Ee=>{z(Ee)});return()=>{we(),fe()}},[]);const O=u.useMemo(()=>{const Y=new Set(a.map(we=>we.module).filter(we=>we&&we.trim()!==""));return Array.from(Y).sort()},[a]),X=Y=>{switch(Y){case"DEBUG":return"text-muted-foreground";case"INFO":return"text-blue-500 dark:text-blue-400";case"WARNING":return"text-yellow-600 dark:text-yellow-500";case"ERROR":return"text-red-600 dark:text-red-500";case"CRITICAL":return"text-red-700 dark:text-red-400 font-bold";default:return"text-foreground"}},L=Y=>{switch(Y){case"DEBUG":return"bg-gray-800/30 dark:bg-gray-800/50";case"INFO":return"bg-blue-900/20 dark:bg-blue-500/20";case"WARNING":return"bg-yellow-900/20 dark:bg-yellow-500/20";case"ERROR":return"bg-red-900/20 dark:bg-red-500/20";case"CRITICAL":return"bg-red-900/30 dark:bg-red-600/30";default:return"bg-gray-800/20 dark:bg-gray-800/30"}},me=()=>{window.location.reload()},Ne=()=>{Qn.clearLogs(),l([])},je=()=>{const Y=pe.map(G=>`${G.timestamp} [${G.level.padEnd(8)}] [${G.module}] ${G.message}`).join(` -`),we=new Blob([Y],{type:"text/plain;charset=utf-8"}),fe=URL.createObjectURL(we),Ee=document.createElement("a");Ee.href=fe,Ee.download=`logs-${Em(new Date,"yyyy-MM-dd-HHmmss")}.txt`,Ee.click(),URL.revokeObjectURL(fe)},ce=()=>{y(!b)},ge=()=>{g(void 0),j(void 0)},pe=u.useMemo(()=>a.filter(Y=>{const we=r===""||Y.message.toLowerCase().includes(r.toLowerCase())||Y.module.toLowerCase().includes(r.toLowerCase()),fe=d==="all"||Y.level===d,Ee=h==="all"||Y.module===h;let G=!0;if(p||N){const $=new Date(Y.timestamp);if(p){const A=new Date(p);A.setHours(0,0,0,0),G=G&&$>=A}if(N){const A=new Date(N);A.setHours(23,59,59,999),G=G&&$<=A}}return we&&fe&&Ee&&G}),[a,r,d,h,p,N]),D=Uo[M].rowHeight+F,Q=aw({count:pe.length,getScrollElement:()=>H.current,estimateSize:()=>D,overscan:50}),B=u.useRef(!1),ue=u.useRef(pe.length);return u.useEffect(()=>{const Y=H.current;if(!Y)return;const we=()=>{if(B.current)return;const{scrollTop:fe,scrollHeight:Ee,clientHeight:G}=Y,$=Ee-fe-G;$>100&&b?y(!1):$<50&&!b&&y(!0)};return Y.addEventListener("scroll",we,{passive:!0}),()=>Y.removeEventListener("scroll",we)},[b]),u.useEffect(()=>{const Y=pe.length>ue.current;ue.current=pe.length,b&&pe.length>0&&Y&&(B.current=!0,Q.scrollToIndex(pe.length-1,{align:"end",behavior:"auto"}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{B.current=!1})}))},[pe.length,b,Q]),e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex-shrink-0 space-y-2 sm:space-y-3 p-2 sm:p-3 lg:p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg sm:text-xl lg:text-2xl font-bold",children:"日志查看器"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 hidden sm:block",children:"实时查看和分析麦麦运行日志"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:P("h-2 w-2 sm:h-2.5 sm:w-2.5 rounded-full",w?"bg-green-500 animate-pulse":"bg-red-500")}),e.jsx("span",{className:"text-xs text-muted-foreground",children:w?"已连接":"未连接"})]})]}),e.jsx(Te,{className:"p-2 sm:p-3",children:e.jsx(xc,{open:C,onOpenChange:R,children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"flex-1 relative min-w-0",children:[e.jsx($t,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsx(ne,{placeholder:"搜索日志...",value:r,onChange:Y=>c(Y.target.value),className:"pl-8 h-8 text-xs sm:text-sm"})]}),e.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[e.jsxs(_,{variant:b?"default":"outline",size:"sm",onClick:ce,className:"h-8 px-2",title:b?"自动滚动":"已暂停",children:[b?e.jsx(F1,{className:"h-3.5 w-3.5"}):e.jsx(H1,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"ml-1 text-xs hidden sm:inline",children:b?"滚动":"暂停"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:Ne,className:"h-8 px-2",title:"清空日志",children:[e.jsx(os,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"ml-1 text-xs hidden md:inline",children:"清空"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:je,className:"h-8 px-2 hidden sm:flex",title:"导出日志",children:[e.jsx(na,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"ml-1 text-xs hidden lg:inline",children:"导出"})]}),e.jsx(hc,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:"h-8 px-2",title:C?"收起筛选":"展开筛选",children:[e.jsx(Po,{className:"h-3.5 w-3.5"}),C?e.jsx(Xr,{className:"h-3.5 w-3.5 ml-1"}):e.jsx(Ba,{className:"h-3.5 w-3.5 ml-1"})]})})]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground text-center sm:text-right -mt-1",children:[e.jsxs("span",{className:"font-mono",children:[pe.length," / ",a.length]}),e.jsx("span",{className:"ml-1",children:"条日志"})]}),e.jsxs(fc,{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:gap-2",children:[e.jsxs(Pe,{value:d,onValueChange:m,children:[e.jsxs(Be,{className:"w-full sm:flex-1 h-8 text-xs",children:[e.jsx(Po,{className:"h-3.5 w-3.5 mr-1.5"}),e.jsx(Fe,{placeholder:"级别"})]}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部级别"}),e.jsx(W,{value:"DEBUG",children:"DEBUG"}),e.jsx(W,{value:"INFO",children:"INFO"}),e.jsx(W,{value:"WARNING",children:"WARNING"}),e.jsx(W,{value:"ERROR",children:"ERROR"}),e.jsx(W,{value:"CRITICAL",children:"CRITICAL"})]})]}),e.jsxs(Pe,{value:h,onValueChange:f,children:[e.jsxs(Be,{className:"w-full sm:flex-1 h-8 text-xs",children:[e.jsx(Po,{className:"h-3.5 w-3.5 mr-1.5"}),e.jsx(Fe,{placeholder:"模块"})]}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部模块"}),O.map(Y=>e.jsx(W,{value:Y,children:Y},Y))]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:gap-2",children:[e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:P("w-full sm:flex-1 justify-start text-left font-normal h-8",!p&&"text-muted-foreground"),children:[e.jsx(Ko,{className:"mr-1.5 h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs",children:p?Em(p,"PP",{locale:Oo}):"开始日期"})]})}),e.jsx(tl,{className:"w-auto p-0",align:"start",children:e.jsx(aj,{mode:"single",selected:p,onSelect:g,initialFocus:!0,locale:Oo})})]}),e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:P("w-full sm:flex-1 justify-start text-left font-normal h-8",!N&&"text-muted-foreground"),children:[e.jsx(Ko,{className:"mr-1.5 h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs",children:N?Em(N,"PP",{locale:Oo}):"结束日期"})]})}),e.jsx(tl,{className:"w-auto p-0",align:"start",children:e.jsx(aj,{mode:"single",selected:N,onSelect:j,initialFocus:!0,locale:Oo})})]}),(p||N)&&e.jsxs(_,{variant:"outline",size:"sm",onClick:ge,className:"w-full sm:w-auto h-8",children:[e.jsx(Sa,{className:"h-3.5 w-3.5 sm:mr-1"}),e.jsx("span",{className:"text-xs",children:"清除"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3 pt-2 border-t border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(q1,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"字号"})]}),e.jsx("div",{className:"flex gap-1",children:Object.keys(Uo).map(Y=>e.jsx(_,{variant:M===Y?"default":"outline",size:"sm",onClick:()=>S(Y),className:"h-6 px-2 text-xs",children:Uo[Y].label},Y))})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 max-w-[200px]",children:[e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"行距"}),e.jsx(el,{value:[F],onValueChange:([Y])=>E(Y),min:0,max:12,step:2,className:"flex-1"}),e.jsxs("span",{className:"text-xs text-muted-foreground w-7",children:[F,"px"]})]}),e.jsxs("div",{className:"flex gap-2 sm:hidden",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:me,className:"flex-1 h-8",children:[e.jsx(dt,{className:"h-3.5 w-3.5 mr-1"}),e.jsx("span",{className:"text-xs",children:"刷新"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:je,className:"flex-1 h-8",children:[e.jsx(na,{className:"h-3.5 w-3.5 mr-1"}),e.jsx("span",{className:"text-xs",children:"导出"})]})]})]})]})]})})})]}),e.jsx("div",{className:"flex-1 min-h-0 px-2 sm:px-3 lg:px-4 pb-2 sm:pb-3 lg:pb-4",children:e.jsx(Te,{className:"bg-black dark:bg-gray-950 border-gray-800 dark:border-gray-900 h-full overflow-hidden",children:e.jsx("div",{ref:H,className:P("h-full overflow-auto","[&::-webkit-scrollbar]:w-2.5","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-thumb]:rounded-full","[&::-webkit-scrollbar-thumb:hover]:bg-border/80"),children:e.jsx("div",{className:P("p-2 sm:p-3 font-mono relative",Uo[M].class),style:{height:`${Q.getTotalSize()}px`},children:pe.length===0?e.jsx("div",{className:"text-gray-500 dark:text-gray-600 text-center py-8 text-xs sm:text-sm",children:"暂无日志数据"}):Q.getVirtualItems().map(Y=>{const we=pe[Y.index];return e.jsxs("div",{"data-index":Y.index,ref:Q.measureElement,className:P("absolute top-0 left-0 w-full px-2 sm:px-3 rounded hover:bg-white/5 transition-colors",L(we.level)),style:{transform:`translateY(${Y.start}px)`,paddingTop:`${F/2}px`,paddingBottom:`${F/2}px`},children:[e.jsxs("div",{className:"flex flex-col gap-0.5 sm:hidden",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-600 text-[10px]",children:we.timestamp}),e.jsxs("span",{className:P("font-semibold text-[10px]",X(we.level)),children:["[",we.level,"]"]})]}),e.jsx("div",{className:"text-cyan-400 dark:text-cyan-500 truncate text-[10px]",children:we.module}),e.jsx("div",{className:"text-gray-300 dark:text-gray-400 whitespace-pre-wrap break-words text-[10px]",children:we.message})]}),e.jsxs("div",{className:"hidden sm:flex gap-2 items-start",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-600 flex-shrink-0 w-[130px] lg:w-[160px]",children:we.timestamp}),e.jsxs("span",{className:P("flex-shrink-0 w-[65px] lg:w-[75px] font-semibold",X(we.level)),children:["[",we.level,"]"]}),e.jsx("span",{className:"text-cyan-400 dark:text-cyan-500 flex-shrink-0 w-[100px] lg:w-[130px] truncate",children:we.module}),e.jsx("span",{className:"text-gray-300 dark:text-gray-400 flex-1 whitespace-pre-wrap break-words",children:we.message})]})]},Y.key)})})})})})]})}async function Gk(){return(await ke("/api/planner/overview")).json()}async function Kk(a,l=1,r=20,c){const d=new URLSearchParams({page:l.toString(),page_size:r.toString()});return c&&d.append("search",c),(await ke(`/api/planner/chat/${a}/logs?${d}`)).json()}async function Qk(a,l){return(await ke(`/api/planner/log/${a}/${l}`)).json()}async function Yk(){return(await ke("/api/replier/overview")).json()}async function Jk(a,l=1,r=20,c){const d=new URLSearchParams({page:l.toString(),page_size:r.toString()});return c&&d.append("search",c),(await ke(`/api/replier/chat/${a}/logs?${d}`)).json()}async function Xk(a,l){return(await ke(`/api/replier/log/${a}/${l}`)).json()}function mN(){const[a,l]=u.useState(new Map),[r,c]=u.useState(!0),d=u.useCallback(async()=>{try{c(!0);const h=await gx();if(h?.data){const f=new Map;h.data.forEach(p=>{f.set(p.chat_id,p.chat_name)}),l(f)}}catch(h){console.error("加载聊天列表失败:",h)}finally{c(!1)}},[]);u.useEffect(()=>{d()},[d]);const m=u.useCallback(h=>a.get(h)||h,[a]);return{chatNameMap:a,getChatName:m,loading:r,reload:d}}function Zo(a){return new Date(a*1e3).toLocaleString("zh-CN")}function xN(a){const r=Date.now()/1e3-a;return r<60?"刚刚":r<3600?`${Math.floor(r/60)} 分钟前`:r<86400?`${Math.floor(r/3600)} 小时前`:`${Math.floor(r/86400)} 天前`}function hN(a,l,r=1e4){u.useEffect(()=>{if(!a)return;const c=setInterval(l,r);return()=>clearInterval(c)},[a,l,r])}function Zk({autoRefresh:a,refreshKey:l}){const[r,c]=u.useState("overview"),[d,m]=u.useState(null),{getChatName:h}=mN(),[f,p]=u.useState(null),[g,N]=u.useState(!0),[j,b]=u.useState(null),[y,w]=u.useState(!1),[z,M]=u.useState(1),[S,F]=u.useState(20),[E,C]=u.useState(""),[R,H]=u.useState(""),[O,X]=u.useState(""),[L,me]=u.useState(null),[Ne,je]=u.useState(!1),[ce,ge]=u.useState(!1),pe=u.useCallback(async()=>{try{N(!0);const $=await Gk();p($)}catch($){console.error("加载规划器总览失败:",$)}finally{N(!1)}},[]),D=u.useCallback(async()=>{if(d)try{w(!0);const $=await Kk(d.chat_id,z,S,R||void 0);b($)}catch($){console.error("加载聊天日志失败:",$)}finally{w(!1)}},[d,z,S,R]);u.useEffect(()=>{pe()},[pe]),u.useEffect(()=>{l>0&&(r==="overview"?pe():D())},[l,r,pe,D]),u.useEffect(()=>{r==="chat-logs"&&d&&D()},[r,d,D]),hN(a,u.useCallback(()=>{r==="overview"?pe():D()},[r,pe,D]));const Q=$=>{m($),M(1),H(""),X(""),c("chat-logs")},B=()=>{c("overview"),m(null),b(null),H(""),X("")},ue=()=>{H(O),M(1)},Y=()=>{X(""),H(""),M(1)},we=async($,A)=>{try{ge(!0),je(!0);const K=await Qk($,A);me(K)}catch(K){console.error("加载计划详情失败:",K)}finally{ge(!1)}},fe=$=>{F(Number($)),M(1)},Ee=()=>{const $=parseInt(E),A=j?Math.ceil(j.total/j.page_size):0;!isNaN($)&&$>=1&&$<=A&&(M($),C(""))},G=j?Math.ceil(j.total/j.page_size):0;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-4",children:r==="overview"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"聊天数量"}),e.jsx(Ia,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:g?e.jsx(ks,{className:"h-8 w-16"}):e.jsx("div",{className:"text-2xl font-bold",children:f?.total_chats||0})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"计划总数"}),e.jsx(rx,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:g?e.jsx(ks,{className:"h-8 w-16"}):e.jsx("div",{className:"text-2xl font-bold",children:f?.total_plans||0})})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"聊天列表"}),e.jsx(Ns,{children:"点击查看该聊天的所有计划记录"})]}),e.jsx(ze,{children:g?e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:[...Array(6)].map(($,A)=>e.jsx(ks,{className:"h-24 w-full"},A))}):f?.chats&&f.chats.length>0?e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:f.chats.map($=>e.jsxs("div",{className:"border rounded-lg p-4 hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>Q($),children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ia,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm truncate max-w-[180px]",title:h($.chat_id),children:h($.chat_id)})]}),e.jsx(Ce,{variant:"secondary",children:$.plan_count})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["最后活动: ",xN($.latest_timestamp)]})]},$.chat_id))}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无聊天记录"})})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 mb-4",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:B,children:[e.jsx($a,{className:"h-4 w-4 mr-2"}),"返回聊天列表"]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["当前聊天: ",e.jsx("span",{className:"font-medium",children:d?h(d.chat_id):""}),e.jsx("span",{className:"mx-2",children:"•"}),"共 ",j?.total||0," 条计划记录"]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Ue,{children:"计划执行记录"}),e.jsx(Ns,{children:d?h(d.chat_id):""})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ne,{placeholder:"搜索提示词内容...",value:O,onChange:$=>X($.target.value),onKeyDown:$=>$.key==="Enter"&&ue(),className:"w-full sm:w-48"}),e.jsx(_,{variant:"outline",size:"icon",onClick:ue,children:e.jsx($t,{className:"h-4 w-4"})}),R&&e.jsx(_,{variant:"ghost",size:"sm",onClick:Y,children:"清除"})]}),e.jsxs(Pe,{value:S.toString(),onValueChange:fe,children:[e.jsx(Be,{className:"w-full sm:w-32",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"10",children:"10条/页"}),e.jsx(W,{value:"20",children:"20条/页"}),e.jsx(W,{value:"50",children:"50条/页"}),e.jsx(W,{value:"100",children:"100条/页"})]})]})]})]}),R&&e.jsxs("div",{className:"text-sm text-muted-foreground mt-2",children:["搜索关键词: ",e.jsxs("span",{className:"font-medium",children:['"',R,'"']})]})]}),e.jsx(ze,{children:y?e.jsx("div",{className:"space-y-2",children:[...Array(5)].map(($,A)=>e.jsx(ks,{className:"h-20 w-full"},A))}):j?.data&&j.data.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-2",children:j.data.map($=>e.jsxs("div",{className:"border rounded-lg p-3 hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>we($.chat_id,$.filename),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:Zo($.timestamp)}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:[$.action_count," 个动作"]}),e.jsxs(Ce,{variant:"outline",className:"text-xs",children:[$.total_plan_ms.toFixed(0),"ms"]})]})]}),$.action_types&&$.action_types.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:$.action_types.map((A,K)=>e.jsx(Ce,{variant:"outline",className:"text-xs bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border-blue-200 dark:border-blue-800",children:A},K))}),e.jsx("p",{className:"text-sm line-clamp-2",children:$.reasoning_preview||"无推理内容"})]},$.filename))}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 mt-4 pt-4 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",j.total," 条记录,第 ",z," / ",G," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M(1),disabled:z===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M($=>Math.max(1,$-1)),disabled:z===1,children:e.jsx(Pa,{className:"h-4 w-4"})}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[e.jsx(ne,{type:"number",min:1,max:G,value:E,onChange:$=>C($.target.value),onKeyDown:$=>$.key==="Enter"&&Ee(),placeholder:"跳转",className:"w-20 h-8"}),e.jsx(_,{size:"sm",variant:"outline",onClick:Ee,children:"跳转"})]}),e.jsxs("span",{className:"sm:hidden text-sm text-muted-foreground",children:[z,"/",G]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M($=>Math.min(G,$+1)),disabled:z===G,children:e.jsx(ra,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M(G),disabled:z===G,className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无计划记录"})})]})]})}),e.jsx(Qs,{open:Ne,onOpenChange:je,children:e.jsxs(Hs,{className:"max-w-4xl max-h-[80vh] grid grid-rows-[auto_1fr_auto] overflow-hidden",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Ua,{className:"h-5 w-5"}),"计划执行详情"]}),e.jsx(at,{children:"查看麦麦的详细计划推理过程和执行动作"})]}),e.jsx(ts,{className:"h-full pr-4",children:e.jsx("div",{className:"space-y-6 pb-4",children:ce?e.jsx("div",{className:"space-y-4",children:[...Array(5)].map(($,A)=>e.jsx(ks,{className:"h-24 w-full"},A))}):L?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(da,{className:"h-4 w-4"}),"基本信息"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 p-4 bg-muted/50 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"聊天"}),e.jsx("div",{className:"text-sm",title:L.chat_id,children:h(L.chat_id)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"时间戳"}),e.jsx("div",{className:"text-sm",children:Zo(L.timestamp)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"类型"}),e.jsx(Ce,{variant:"outline",children:L.type})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"动作数量"}),e.jsxs(Ce,{children:[L.actions.length," 个动作"]})]})]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(sl,{className:"h-4 w-4"}),"性能统计"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"提示词构建"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.prompt_build_ms?.toFixed(2)||0,"ms"]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"LLM 推理"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.llm_duration_ms?.toFixed(2)||0,"ms"]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"总计划时间"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.total_plan_ms?.toFixed(2)||0,"ms"]})})]})]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(hx,{className:"h-4 w-4"}),"推理过程"]}),e.jsx("div",{className:"p-4 bg-muted/50 rounded-lg",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:L.reasoning||"无推理内容"})})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(rv,{className:"h-4 w-4"}),"执行动作 (",L.actions.length,")"]}),e.jsx("div",{className:"space-y-3",children:L.actions.map(($,A)=>e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-3",children:e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(Ce,{variant:"default",children:["动作 ",A+1]}),e.jsx(Ce,{variant:"outline",children:$.action_type})]})})}),e.jsxs(ze,{className:"p-4 pt-0 space-y-3",children:[$.reasoning&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:"推理依据"}),e.jsx("p",{className:"text-sm bg-muted/30 p-2 rounded",children:typeof $.reasoning=="string"?$.reasoning:JSON.stringify($.reasoning)})]}),$.action_message&&e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:"动作消息"}),typeof $.action_message=="string"?e.jsx("p",{className:"text-sm bg-muted/30 p-2 rounded break-all whitespace-pre-wrap",children:$.action_message}):e.jsx("pre",{className:"text-xs bg-muted/30 p-2 rounded overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify($.action_message,null,2)})]}),$.action_data&&Object.keys($.action_data).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:"动作数据"}),e.jsx("pre",{className:"text-xs bg-muted/30 p-2 rounded overflow-x-auto",children:JSON.stringify($.action_data,null,2)})]}),$.action_reasoning&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:"动作推理"}),e.jsx("p",{className:"text-sm bg-muted/30 p-2 rounded",children:typeof $.action_reasoning=="string"?$.action_reasoning:JSON.stringify($.action_reasoning)})]})]})]},A))})]}),e.jsx(la,{}),L.raw_output&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"原始输出"}),e.jsxs("details",{className:"group",children:[e.jsx("summary",{className:"cursor-pointer text-sm text-muted-foreground hover:text-foreground",children:"点击展开查看完整原始输出"}),e.jsx("div",{className:"mt-2 p-4 bg-muted/50 rounded-lg",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",children:L.raw_output})})]})]}),L.prompt&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"完整提示词"}),e.jsxs("details",{className:"group",children:[e.jsx("summary",{className:"cursor-pointer text-sm text-muted-foreground hover:text-foreground",children:"点击展开查看完整提示词"}),e.jsx("div",{className:"mt-2 p-4 bg-muted/50 rounded-lg",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",children:L.prompt})})]})]})]}):e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:"无数据"})})})}),e.jsx(gt,{className:"flex-shrink-0",children:e.jsx(_,{onClick:()=>je(!1),children:"关闭"})})]})})]})}function Wk({autoRefresh:a,refreshKey:l}){const[r,c]=u.useState("overview"),[d,m]=u.useState(null),{getChatName:h}=mN(),[f,p]=u.useState(null),[g,N]=u.useState(!0),[j,b]=u.useState(null),[y,w]=u.useState(!1),[z,M]=u.useState(1),[S,F]=u.useState(20),[E,C]=u.useState(""),[R,H]=u.useState(""),[O,X]=u.useState(""),[L,me]=u.useState(null),[Ne,je]=u.useState(!1),[ce,ge]=u.useState(!1),pe=u.useCallback(async()=>{try{N(!0);const $=await Yk();p($)}catch($){console.error("加载回复器总览失败:",$)}finally{N(!1)}},[]),D=u.useCallback(async()=>{if(d)try{w(!0);const $=await Jk(d.chat_id,z,S,R||void 0);b($)}catch($){console.error("加载聊天日志失败:",$)}finally{w(!1)}},[d,z,S,R]);u.useEffect(()=>{pe()},[pe]),u.useEffect(()=>{l>0&&(r==="overview"?pe():D())},[l,r,pe,D]),u.useEffect(()=>{r==="chat-logs"&&d&&D()},[r,d,D]),hN(a,u.useCallback(()=>{r==="overview"?pe():D()},[r,pe,D]));const Q=$=>{m($),M(1),H(""),X(""),c("chat-logs")},B=()=>{c("overview"),m(null),b(null),H(""),X("")},ue=()=>{H(O),M(1)},Y=()=>{X(""),H(""),M(1)},we=async($,A)=>{try{ge(!0),je(!0);const K=await Xk($,A);me(K)}catch(K){console.error("加载回复详情失败:",K)}finally{ge(!1)}},fe=$=>{F(Number($)),M(1)},Ee=()=>{const $=parseInt(E),A=j?Math.ceil(j.total/j.page_size):0;!isNaN($)&&$>=1&&$<=A&&(M($),C(""))},G=j?Math.ceil(j.total/j.page_size):0;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-4",children:r==="overview"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"聊天数量"}),e.jsx(Ia,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:g?e.jsx(ks,{className:"h-8 w-16"}):e.jsx("div",{className:"text-2xl font-bold",children:f?.total_chats||0})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"回复总数"}),e.jsx(rx,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:g?e.jsx(ks,{className:"h-8 w-16"}):e.jsx("div",{className:"text-2xl font-bold",children:f?.total_replies||0})})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"聊天列表"}),e.jsx(Ns,{children:"点击查看该聊天的所有回复记录"})]}),e.jsx(ze,{children:g?e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:[...Array(6)].map(($,A)=>e.jsx(ks,{className:"h-24 w-full"},A))}):f?.chats&&f.chats.length>0?e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:f.chats.map($=>e.jsxs("div",{className:"border rounded-lg p-4 hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>Q($),children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ia,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm truncate max-w-[180px]",title:h($.chat_id),children:h($.chat_id)})]}),e.jsx(Ce,{variant:"secondary",children:$.reply_count})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["最后活动: ",xN($.latest_timestamp)]})]},$.chat_id))}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无聊天记录"})})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 mb-4",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:B,children:[e.jsx($a,{className:"h-4 w-4 mr-2"}),"返回聊天列表"]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["当前聊天: ",e.jsx("span",{className:"font-medium",children:d?h(d.chat_id):""}),e.jsx("span",{className:"mx-2",children:"•"}),"共 ",j?.total||0," 条回复记录"]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Ue,{children:"回复生成记录"}),e.jsx(Ns,{children:d?h(d.chat_id):""})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ne,{placeholder:"搜索提示词内容...",value:O,onChange:$=>X($.target.value),onKeyDown:$=>$.key==="Enter"&&ue(),className:"w-full sm:w-48"}),e.jsx(_,{variant:"outline",size:"icon",onClick:ue,children:e.jsx($t,{className:"h-4 w-4"})}),R&&e.jsx(_,{variant:"ghost",size:"sm",onClick:Y,children:"清除"})]}),e.jsxs(Pe,{value:S.toString(),onValueChange:fe,children:[e.jsx(Be,{className:"w-full sm:w-32",children:e.jsx(Fe,{})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"10",children:"10条/页"}),e.jsx(W,{value:"20",children:"20条/页"}),e.jsx(W,{value:"50",children:"50条/页"}),e.jsx(W,{value:"100",children:"100条/页"})]})]})]})]}),R&&e.jsxs("div",{className:"text-sm text-muted-foreground mt-2",children:["搜索关键词: ",e.jsxs("span",{className:"font-medium",children:['"',R,'"']})]})]}),e.jsx(ze,{children:y?e.jsx("div",{className:"space-y-2",children:[...Array(5)].map(($,A)=>e.jsx(ks,{className:"h-20 w-full"},A))}):j?.data&&j.data.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-2",children:j.data.map($=>e.jsxs("div",{className:"border rounded-lg p-3 hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>we($.chat_id,$.filename),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:Zo($.timestamp)}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[$.success?e.jsxs(Ce,{variant:"default",className:"text-xs bg-green-600",children:[e.jsx(Mg,{className:"h-3 w-3 mr-1"}),"成功"]}):e.jsxs(Ce,{variant:"destructive",className:"text-xs",children:[e.jsx(ta,{className:"h-3 w-3 mr-1"}),"失败"]}),e.jsx(Ce,{variant:"outline",className:"text-xs",children:$.model}),e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:[$.overall_ms.toFixed(0),"ms"]})]})]}),e.jsx("p",{className:"text-sm line-clamp-2",children:$.output_preview||"无输出内容"})]},$.filename))}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 mt-4 pt-4 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",j.total," 条记录,第 ",z," / ",G," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M(1),disabled:z===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M($=>Math.max(1,$-1)),disabled:z===1,children:e.jsx(Pa,{className:"h-4 w-4"})}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[e.jsx(ne,{type:"number",min:1,max:G,value:E,onChange:$=>C($.target.value),onKeyDown:$=>$.key==="Enter"&&Ee(),placeholder:"跳转",className:"w-20 h-8"}),e.jsx(_,{size:"sm",variant:"outline",onClick:Ee,children:"跳转"})]}),e.jsxs("span",{className:"sm:hidden text-sm text-muted-foreground",children:[z,"/",G]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M($=>Math.min(G,$+1)),disabled:z===G,children:e.jsx(ra,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M(G),disabled:z===G,className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无回复记录"})})]})]})}),e.jsx(Qs,{open:Ne,onOpenChange:je,children:e.jsxs(Hs,{className:"max-w-4xl max-h-[80vh] grid grid-rows-[auto_1fr_auto] overflow-hidden",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Ua,{className:"h-5 w-5"}),"回复生成详情"]}),e.jsx(at,{children:"查看麦麦的详细回复生成过程"})]}),e.jsx(ts,{className:"h-full pr-4",children:e.jsx("div",{className:"space-y-6 pb-4",children:ce?e.jsx("div",{className:"space-y-4",children:[...Array(5)].map(($,A)=>e.jsx(ks,{className:"h-24 w-full"},A))}):L?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(da,{className:"h-4 w-4"}),"基本信息"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 p-4 bg-muted/50 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"聊天"}),e.jsx("div",{className:"text-sm",title:L.chat_id,children:h(L.chat_id)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"时间戳"}),e.jsx("div",{className:"text-sm",children:Zo(L.timestamp)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"状态"}),L.success?e.jsxs(Ce,{variant:"default",className:"bg-green-600",children:[e.jsx(Mg,{className:"h-3 w-3 mr-1"}),"成功"]}):e.jsxs(Ce,{variant:"destructive",children:[e.jsx(ta,{className:"h-3 w-3 mr-1"}),"失败"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"思考深度"}),e.jsxs(Ce,{variant:"outline",children:["Level ",L.think_level]})]})]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(V1,{className:"h-4 w-4"}),"模型信息"]}),e.jsx("div",{className:"p-4 bg-muted/50 rounded-lg",children:e.jsx(Ce,{variant:"secondary",className:"text-sm",children:L.model})})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(sl,{className:"h-4 w-4"}),"性能统计"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"提示词构建"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.prompt_ms?.toFixed(2)||0,"ms"]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"LLM 推理"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.llm_ms?.toFixed(2)||0,"ms"]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"总耗时"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.overall_ms?.toFixed(2)||0,"ms"]})})]})]}),L.timing.timing_logs&&L.timing.timing_logs.length>0&&e.jsxs("div",{className:"mt-3 p-3 bg-muted/30 rounded-lg",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:"耗时详情"}),e.jsx("div",{className:"space-y-1",children:L.timing.timing_logs.map(($,A)=>e.jsx("div",{className:"text-xs text-muted-foreground",children:$},A))})]}),L.timing.almost_zero&&e.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"font-medium",children:"近乎零耗时: "}),L.timing.almost_zero]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(hx,{className:"h-4 w-4"}),"回复输出"]}),e.jsx("div",{className:"p-4 bg-muted/50 rounded-lg",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:L.output||"无输出内容"})})]}),L.processed_output&&L.processed_output.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"处理后的输出"}),e.jsx("div",{className:"space-y-2",children:L.processed_output.map(($,A)=>e.jsx("div",{className:"p-3 bg-muted/30 rounded-lg",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:$})},A))})]})]}),L.reasoning&&e.jsxs(e.Fragment,{children:[e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"推理过程"}),e.jsx("div",{className:"p-4 bg-muted/50 rounded-lg",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:L.reasoning})})]})]}),L.error&&e.jsxs(e.Fragment,{children:[e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold text-destructive",children:"错误信息"}),e.jsx("div",{className:"p-4 bg-destructive/10 rounded-lg border border-destructive/20",children:e.jsx("p",{className:"text-sm text-destructive whitespace-pre-wrap",children:L.error})})]})]}),L.prompt&&e.jsxs(e.Fragment,{children:[e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"完整提示词"}),e.jsxs("details",{className:"group",children:[e.jsx("summary",{className:"cursor-pointer text-sm text-muted-foreground hover:text-foreground",children:"点击展开查看完整提示词"}),e.jsx("div",{className:"mt-2 p-4 bg-muted/50 rounded-lg",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",children:L.prompt})})]})]})]})]}):e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:"无数据"})})})}),e.jsx(gt,{className:"flex-shrink-0",children:e.jsx(_,{onClick:()=>je(!1),children:"关闭"})})]})})]})}function eC(){const[a,l]=u.useState("planner"),[r,c]=u.useState(!1),[d,m]=u.useState(0),h=u.useCallback(()=>{m(f=>f+1)},[]);return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"计划器 & 回复器监控"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"实时监控麦麦的任务计划器和回复生成器运行状态"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_,{variant:r?"default":"outline",size:"sm",onClick:()=>c(!r),children:[e.jsx(dt,{className:`h-4 w-4 mr-2 ${r?"animate-spin":""}`}),r?"自动刷新中":"自动刷新"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:h,children:e.jsx(dt,{className:"h-4 w-4"})})]})]}),e.jsxs(Jt,{value:a,onValueChange:f=>l(f),className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2 gap-0.5 sm:gap-1 h-auto p-1",children:[e.jsxs(Xe,{value:"planner",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(nx,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"计划器监控"})]}),e.jsxs(Xe,{value:"replier",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(G1,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"回复器监控"})]})]}),e.jsxs(ts,{className:"h-[calc(100vh-240px)] sm:h-[calc(100vh-280px)] mt-4 sm:mt-6",children:[e.jsx(Ss,{value:"planner",className:"mt-0",children:e.jsx(Zk,{autoRefresh:r,refreshKey:d})}),e.jsx(Ss,{value:"replier",className:"mt-0",children:e.jsx(Wk,{autoRefresh:r,refreshKey:d})})]})]})]})}const sC="Mai-with-u",tC="plugin-repo",aC="main",lC="plugin_details.json";async function nC(){try{const a=await ke("/api/webui/plugins/fetch-raw",{method:"POST",body:JSON.stringify({owner:sC,repo:tC,branch:aC,file_path:lC})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const l=await a.json();if(!l.success||!l.data)throw new Error(l.error||"获取插件列表失败");return JSON.parse(l.data).filter(d=>!d?.id||!d?.manifest?(console.warn("跳过无效插件数据:",d),!1):!d.manifest.name||!d.manifest.version?(console.warn("跳过缺少必需字段的插件:",d.id),!1):!0).map(d=>({id:d.id,manifest:{manifest_version:d.manifest.manifest_version||1,name:d.manifest.name,version:d.manifest.version,description:d.manifest.description||"",author:d.manifest.author||{name:"Unknown"},license:d.manifest.license||"Unknown",host_application:d.manifest.host_application||{min_version:"0.0.0"},homepage_url:d.manifest.homepage_url,repository_url:d.manifest.repository_url,keywords:d.manifest.keywords||[],categories:d.manifest.categories||[],default_locale:d.manifest.default_locale||"zh-CN",locales_path:d.manifest.locales_path},downloads:0,rating:0,review_count:0,installed:!1,published_at:new Date().toISOString(),updated_at:new Date().toISOString()}))}catch(a){throw console.error("Failed to fetch plugin list:",a),a}}async function fN(){try{const a=await ke("/api/webui/plugins/git-status");if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(a){return console.error("Failed to check Git status:",a),{installed:!1,error:"无法检测 Git 安装状态"}}}async function pN(){try{const a=await ke("/api/webui/plugins/version");if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(a){return console.error("Failed to get Maimai version:",a),{version:"0.0.0",version_major:0,version_minor:0,version_patch:0}}}function gN(a,l,r){const c=a.split(".").map(f=>parseInt(f)||0),d=c[0]||0,m=c[1]||0,h=c[2]||0;if(r.version_majorparseInt(j)||0),p=f[0]||0,g=f[1]||0,N=f[2]||0;if(r.version_major>p||r.version_major===p&&r.version_minor>g||r.version_major===p&&r.version_minor===g&&r.version_patch>N)return!1}return!0}async function rC(){try{const a=await ke("/api/webui/ws-token");if(!a.ok)return console.error("获取 WebSocket token 失败:",a.status),null;const l=await a.json();return l.success&&l.token?l.token:null}catch(a){return console.error("获取 WebSocket token 失败:",a),null}}async function iC(a,l){const r=await rC();if(!r)return console.warn("无法获取 WebSocket token,可能未登录"),null;const c=window.location.protocol==="https:"?"wss:":"ws:",d=window.location.host,m=`${c}//${d}/api/webui/ws/plugin-progress?token=${encodeURIComponent(r)}`;try{const h=new WebSocket(m);return h.onopen=()=>{console.log("Plugin progress WebSocket connected");const f=setInterval(()=>{h.readyState===WebSocket.OPEN?h.send("ping"):clearInterval(f)},3e4)},h.onmessage=f=>{try{if(f.data==="pong")return;const p=JSON.parse(f.data);a(p)}catch(p){console.error("Failed to parse progress data:",p)}},h.onerror=f=>{console.error("Plugin progress WebSocket error:",f),l?.(f)},h.onclose=()=>{console.log("Plugin progress WebSocket disconnected")},h}catch(h){return console.error("创建 WebSocket 连接失败:",h),null}}async function Il(){try{const a=await ke("/api/webui/plugins/installed",{headers:Zs()});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const l=await a.json();if(!l.success)throw new Error(l.message||"获取已安装插件列表失败");return l.plugins||[]}catch(a){return console.error("Failed to get installed plugins:",a),[]}}function bn(a,l){return l.some(r=>r.id===a)}function yn(a,l){const r=l.find(c=>c.id===a);if(r)return r.manifest?.version||r.version}async function jN(a,l,r="main"){const c=await ke("/api/webui/plugins/install",{method:"POST",body:JSON.stringify({plugin_id:a,repository_url:l,branch:r})});if(!c.ok){const d=await c.json();throw new Error(d.detail||"安装失败")}return await c.json()}async function vN(a){const l=await ke("/api/webui/plugins/uninstall",{method:"POST",body:JSON.stringify({plugin_id:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"卸载失败")}return await l.json()}async function NN(a,l,r="main"){const c=await ke("/api/webui/plugins/update",{method:"POST",body:JSON.stringify({plugin_id:a,repository_url:l,branch:r})});if(!c.ok){const d=await c.json();throw new Error(d.detail||"更新失败")}return await c.json()}async function cC(a){const l=await ke(`/api/webui/plugins/config/${a}/schema`,{headers:Zs()});if(!l.ok){const c=await l.text();try{const d=JSON.parse(c);throw new Error(d.detail||"获取配置 Schema 失败")}catch{throw new Error(`获取配置 Schema 失败 (${l.status})`)}}const r=await l.json();if(!r.success)throw new Error(r.message||"获取配置 Schema 失败");return r.schema}async function oC(a){const l=await ke(`/api/webui/plugins/config/${a}`,{headers:Zs()});if(!l.ok){const c=await l.text();try{const d=JSON.parse(c);throw new Error(d.detail||"获取配置失败")}catch{throw new Error(`获取配置失败 (${l.status})`)}}const r=await l.json();if(!r.success)throw new Error(r.message||"获取配置失败");return r.config}async function dC(a){const l=await ke(`/api/webui/plugins/config/${a}/raw`,{headers:Zs()});if(!l.ok){const c=await l.text();try{const d=JSON.parse(c);throw new Error(d.detail||"获取配置失败")}catch{throw new Error(`获取配置失败 (${l.status})`)}}const r=await l.json();if(!r.success)throw new Error(r.message||"获取配置失败");return r.config}async function uC(a,l){const r=await ke(`/api/webui/plugins/config/${a}`,{method:"PUT",headers:Zs(),body:JSON.stringify({config:l})});if(!r.ok){const c=await r.json();throw new Error(c.detail||"保存配置失败")}return await r.json()}async function mC(a,l){const r=await ke(`/api/webui/plugins/config/${a}/raw`,{method:"PUT",headers:Zs(),body:JSON.stringify({config:l})});if(!r.ok){const c=await r.json();throw new Error(c.detail||"保存配置失败")}return await r.json()}async function xC(a){const l=await ke(`/api/webui/plugins/config/${a}/reset`,{method:"POST",headers:Zs()});if(!l.ok){const r=await l.json();throw new Error(r.detail||"重置配置失败")}return await l.json()}async function hC(a){const l=await ke(`/api/webui/plugins/config/${a}/toggle`,{method:"POST",headers:Zs()});if(!l.ok){const r=await l.json();throw new Error(r.detail||"切换状态失败")}return await l.json()}const Nc="https://maibot-plugin-stats.maibot-webui.workers.dev";async function bN(a){try{const l=await fetch(`${Nc}/stats/${a}`);return l.ok?await l.json():(console.error("Failed to fetch plugin stats:",l.statusText),null)}catch(l){return console.error("Error fetching plugin stats:",l),null}}async function fC(a,l){try{const r=l||Ax(),c=await fetch(`${Nc}/stats/like`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:a,user_id:r})}),d=await c.json();return c.status===429?{success:!1,error:"操作过于频繁,请稍后再试"}:c.ok?{success:!0,...d}:{success:!1,error:d.error||"点赞失败"}}catch(r){return console.error("Error liking plugin:",r),{success:!1,error:"网络错误"}}}async function pC(a,l){try{const r=l||Ax(),c=await fetch(`${Nc}/stats/dislike`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:a,user_id:r})}),d=await c.json();return c.status===429?{success:!1,error:"操作过于频繁,请稍后再试"}:c.ok?{success:!0,...d}:{success:!1,error:d.error||"点踩失败"}}catch(r){return console.error("Error disliking plugin:",r),{success:!1,error:"网络错误"}}}async function gC(a,l,r,c){if(l<1||l>5)return{success:!1,error:"评分必须在 1-5 之间"};try{const d=c||Ax(),m=await fetch(`${Nc}/stats/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:a,rating:l,comment:r,user_id:d})}),h=await m.json();return m.status===429?{success:!1,error:"每天最多评分 3 次"}:m.ok?{success:!0,...h}:{success:!1,error:h.error||"评分失败"}}catch(d){return console.error("Error rating plugin:",d),{success:!1,error:"网络错误"}}}async function yN(a){try{const l=await fetch(`${Nc}/stats/download`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:a})}),r=await l.json();return l.status===429?(console.warn("Download recording rate limited"),{success:!0}):l.ok?{success:!0,...r}:(console.error("Failed to record download:",r.error),{success:!1,error:r.error})}catch(l){return console.error("Error recording download:",l),{success:!1,error:"网络错误"}}}function jC(){const a=navigator,l=[navigator.userAgent,navigator.language,navigator.languages?.join(",")||"",navigator.platform,navigator.hardwareConcurrency||0,screen.width,screen.height,screen.colorDepth,screen.pixelDepth,new Date().getTimezoneOffset(),Intl.DateTimeFormat().resolvedOptions().timeZone,navigator.maxTouchPoints||0,a.deviceMemory||0].join("|");let r=0;for(let c=0;c{const Z=J.map(async De=>{try{const xe=await bN(De.id);return{id:De.id,stats:xe}}catch(xe){return console.warn(`Failed to load stats for ${De.id}:`,xe),{id:De.id,stats:null}}}),Le=await Promise.all(Z),le={};Le.forEach(({id:De,stats:xe})=>{xe&&(le[De]=xe)}),L(le)};u.useEffect(()=>{let J=null,Z=!1;return(async()=>{if(J=await iC(le=>{Z||(C(le),le.stage==="success"?setTimeout(()=>{Z||C(null)},2e3):le.stage==="error"&&(w(!1),M(le.error||"加载失败")))},le=>{console.error("WebSocket error:",le),Z||fe({title:"WebSocket 连接失败",description:"无法实时显示加载进度",variant:"destructive"})}),await new Promise(le=>{if(!J){le();return}const De=()=>{J&&J.readyState===WebSocket.OPEN?(console.log("WebSocket connected, starting to load plugins"),le()):J&&J.readyState===WebSocket.CLOSED?(console.warn("WebSocket closed before loading plugins"),le()):setTimeout(De,100)};De()}),!Z){const le=await fN();F(le),le.installed||fe({title:"Git 未安装",description:le.error||"请先安装 Git 才能使用插件安装功能",variant:"destructive"})}if(!Z){const le=await pN();H(le)}if(!Z)try{w(!0),M(null);const le=await nC();if(!Z){const De=await Il();O(De);const xe=le.map(Me=>{const ds=bn(Me.id,De),Ts=yn(Me.id,De);return{...Me,installed:ds,installed_version:Ts}});for(const Me of De)!xe.some(Ts=>Ts.id===Me.id)&&Me.manifest&&xe.push({id:Me.id,manifest:{manifest_version:Me.manifest.manifest_version||1,name:Me.manifest.name,version:Me.manifest.version,description:Me.manifest.description||"",author:Me.manifest.author,license:Me.manifest.license||"Unknown",host_application:Me.manifest.host_application,homepage_url:Me.manifest.homepage_url,repository_url:Me.manifest.repository_url,keywords:Me.manifest.keywords||[],categories:Me.manifest.categories||[],default_locale:Me.manifest.default_locale||"zh-CN",locales_path:Me.manifest.locales_path},downloads:0,rating:0,review_count:0,installed:!0,installed_version:Me.manifest.version,published_at:new Date().toISOString(),updated_at:new Date().toISOString()});b(xe),Ee(xe)}}catch(le){if(!Z){const De=le instanceof Error?le.message:"加载插件列表失败";M(De),fe({title:"加载失败",description:De,variant:"destructive"})}}finally{Z||w(!1)}})(),()=>{Z=!0,J&&J.close()}},[fe]);const G=J=>{if(!J.installed&&R&&!$(J))return e.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[e.jsx(Ut,{className:"h-3 w-3"}),"不兼容"]});if(J.installed){const Z=J.installed_version?.trim(),Le=J.manifest.version?.trim();if(Z!==Le){const le=Z?.split(".").map(Number)||[0,0,0],De=Le?.split(".").map(Number)||[0,0,0];for(let xe=0;xe<3;xe++){if((De[xe]||0)>(le[xe]||0))return e.jsxs(Ce,{variant:"outline",className:"gap-1 text-orange-600 border-orange-600",children:[e.jsx(Ut,{className:"h-3 w-3"}),"可更新"]});if((De[xe]||0)<(le[xe]||0))break}}return e.jsxs(Ce,{variant:"default",className:"gap-1",children:[e.jsx(st,{className:"h-3 w-3"}),"已安装"]})}return null},$=J=>!R||!J.manifest?.host_application?!0:gN(J.manifest.host_application.min_version,J.manifest.host_application.max_version,R),A=J=>{if(!J.installed||!J.installed_version||!J.manifest?.version)return!1;const Z=J.installed_version.trim(),Le=J.manifest.version.trim();if(Z===Le)return!1;const le=Z.split(".").map(Number),De=Le.split(".").map(Number);for(let xe=0;xe<3;xe++){if((De[xe]||0)>(le[xe]||0))return!0;if((De[xe]||0)<(le[xe]||0))return!1}return!1},K=j.filter(J=>{if(!J.manifest)return console.warn("[过滤] 跳过无 manifest 的插件:",J.id),!1;const Z=c===""||J.manifest.name?.toLowerCase().includes(c.toLowerCase())||J.manifest.description?.toLowerCase().includes(c.toLowerCase())||J.manifest.keywords&&J.manifest.keywords.some(xe=>xe.toLowerCase().includes(c.toLowerCase())),Le=m==="all"||J.manifest.categories&&J.manifest.categories.includes(m);let le=!0;f==="installed"?le=J.installed===!0:f==="updates"&&(le=J.installed===!0&&A(J));const De=!g||!R||$(J);return Z&&Le&&le&&De}),Re=J=>{if(!S?.installed){fe({title:"无法安装",description:"Git 未安装",variant:"destructive"});return}if(R&&!$(J)){fe({title:"无法安装",description:"插件与当前麦麦版本不兼容",variant:"destructive"});return}ce(J),pe("main"),Q(""),ue("preset"),we(!1),Ne(!0)},se=async()=>{if(!je)return;const J=B==="custom"?D:ge;if(!J||J.trim()===""){fe({title:"分支名称不能为空",variant:"destructive"});return}try{Ne(!1),await jN(je.id,je.manifest.repository_url||"",J),yN(je.id).catch(Le=>{console.warn("Failed to record download:",Le)}),fe({title:"安装成功",description:`${je.manifest.name} 已成功安装`});const Z=await Il();O(Z),b(Le=>Le.map(le=>{if(le.id===je.id){const De=bn(le.id,Z),xe=yn(le.id,Z);return{...le,installed:De,installed_version:xe}}return le}))}catch(Z){fe({title:"安装失败",description:Z instanceof Error?Z.message:"未知错误",variant:"destructive"})}finally{ce(null)}},$e=async J=>{try{await vN(J.id),fe({title:"卸载成功",description:`${J.manifest.name} 已成功卸载`});const Z=await Il();O(Z),b(Le=>Le.map(le=>{if(le.id===J.id){const De=bn(le.id,Z),xe=yn(le.id,Z);return{...le,installed:De,installed_version:xe}}return le}))}catch(Z){fe({title:"卸载失败",description:Z instanceof Error?Z.message:"未知错误",variant:"destructive"})}},cs=async J=>{if(!S?.installed){fe({title:"无法更新",description:"Git 未安装",variant:"destructive"});return}try{const Z=await NN(J.id,J.manifest.repository_url||"","main");fe({title:"更新成功",description:`${J.manifest.name} 已从 ${Z.old_version} 更新到 ${Z.new_version}`});const Le=await Il();O(Le),b(le=>le.map(De=>{if(De.id===J.id){const xe=bn(De.id,Le),Me=yn(De.id,Le);return{...De,installed:xe,installed_version:Me}}return De}))}catch(Z){fe({title:"更新失败",description:Z instanceof Error?Z.message:"未知错误",variant:"destructive"})}};return e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件市场"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"浏览和管理麦麦的插件"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(_,{variant:"outline",onClick:()=>l(),disabled:r,children:[e.jsx(hv,{className:`h-4 w-4 mr-2 ${r?"animate-spin":""}`}),"重启麦麦"]}),e.jsxs(_,{onClick:()=>a({to:"/plugin-mirrors"}),children:[e.jsx(K1,{className:"h-4 w-4 mr-2"}),"配置镜像源"]})]})]}),e.jsx(Te,{className:"border-blue-200 bg-blue-50 dark:bg-blue-950/20 dark:border-blue-900",children:e.jsx(ze,{className:"py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Yt,{className:"h-4 w-4 text-blue-600 flex-shrink-0"}),e.jsxs("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:["安装、卸载或更新插件后,需要",e.jsx("span",{className:"font-semibold",children:"重启麦麦"}),"才能使更改生效"]})]})})}),S&&!S.installed&&e.jsxs(Te,{className:"border-orange-600 bg-orange-50 dark:bg-orange-950/20",children:[e.jsx(Oe,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Lt,{className:"h-5 w-5 text-orange-600"}),e.jsxs("div",{children:[e.jsx(Ue,{className:"text-lg text-orange-900 dark:text-orange-100",children:"Git 未安装"}),e.jsx(Ns,{className:"text-orange-800 dark:text-orange-200",children:S.error||"请先安装 Git 才能使用插件安装功能"})]})]})}),e.jsx(ze,{children:e.jsxs("p",{className:"text-sm text-orange-800 dark:text-orange-200",children:["您可以从 ",e.jsx("a",{href:"https://git-scm.com/downloads",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"git-scm.com"})," 下载并安装 Git。 安装完成后,请重启麦麦应用。"]})})]}),e.jsx(Te,{className:"p-4",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{placeholder:"搜索插件...",value:c,onChange:J=>d(J.target.value),className:"pl-9"})]}),e.jsxs(Pe,{value:m,onValueChange:h,children:[e.jsx(Be,{className:"w-full sm:w-[200px]",children:e.jsx(Fe,{placeholder:"选择分类"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"all",children:"全部分类"}),e.jsx(W,{value:"Group Management",children:"群组管理"}),e.jsx(W,{value:"Entertainment & Interaction",children:"娱乐互动"}),e.jsx(W,{value:"Utility Tools",children:"实用工具"}),e.jsx(W,{value:"Content Generation",children:"内容生成"}),e.jsx(W,{value:"Multimedia",children:"多媒体"}),e.jsx(W,{value:"External Integration",children:"外部集成"}),e.jsx(W,{value:"Data Analysis & Insights",children:"数据分析与洞察"}),e.jsx(W,{value:"Other",children:"其他"})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"compatible-only",checked:g,onCheckedChange:J=>N(J===!0)}),e.jsx("label",{htmlFor:"compatible-only",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"只显示兼容当前版本的插件"})]})]})}),e.jsx(Jt,{value:f,onValueChange:p,className:"w-full",children:e.jsxs(Gt,{className:"grid w-full grid-cols-3",children:[e.jsxs(Xe,{value:"all",children:["全部插件 (",j.filter(J=>{if(!J.manifest)return!1;const Z=c===""||J.manifest.name?.toLowerCase().includes(c.toLowerCase())||J.manifest.description?.toLowerCase().includes(c.toLowerCase())||J.manifest.keywords&&J.manifest.keywords.some(De=>De.toLowerCase().includes(c.toLowerCase())),Le=m==="all"||J.manifest.categories&&J.manifest.categories.includes(m),le=!g||!R||$(J);return Z&&Le&&le}).length,")"]}),e.jsxs(Xe,{value:"installed",children:["已安装 (",j.filter(J=>{if(!J.manifest)return!1;const Z=c===""||J.manifest.name?.toLowerCase().includes(c.toLowerCase())||J.manifest.description?.toLowerCase().includes(c.toLowerCase())||J.manifest.keywords&&J.manifest.keywords.some(De=>De.toLowerCase().includes(c.toLowerCase())),Le=m==="all"||J.manifest.categories&&J.manifest.categories.includes(m),le=!g||!R||$(J);return J.installed&&Z&&Le&&le}).length,")"]}),e.jsxs(Xe,{value:"updates",children:["可更新 (",j.filter(J=>{if(!J.manifest)return!1;const Z=c===""||J.manifest.name?.toLowerCase().includes(c.toLowerCase())||J.manifest.description?.toLowerCase().includes(c.toLowerCase())||J.manifest.keywords&&J.manifest.keywords.some(De=>De.toLowerCase().includes(c.toLowerCase())),Le=m==="all"||J.manifest.categories&&J.manifest.categories.includes(m),le=!g||!R||$(J);return J.installed&&A(J)&&Z&&Le&&le}).length,")"]})]})}),E&&E.stage==="loading"&&E.operation==="fetch"&&e.jsx(Te,{className:"p-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Fs,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm font-medium",children:"加载插件列表"})]}),e.jsxs("span",{className:"text-sm font-medium",children:[E.progress,"%"]})]}),e.jsx(tr,{value:E.progress,className:"h-2"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:E.message}),E.total_plugins>0&&e.jsxs("div",{className:"text-xs text-muted-foreground text-center",children:["已加载 ",E.loaded_plugins," / ",E.total_plugins," 个插件"]})]})}),E&&E.stage==="error"&&E.error&&e.jsx(Te,{className:"border-destructive bg-destructive/10",children:e.jsx(Oe,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Lt,{className:"h-5 w-5 text-destructive"}),e.jsxs("div",{children:[e.jsx(Ue,{className:"text-lg text-destructive",children:"加载失败"}),e.jsx(Ns,{className:"text-destructive/80",children:E.error})]})]})})}),y?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"加载插件列表中..."})]}):z?e.jsx(Te,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(Lt,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:z}),e.jsx(_,{onClick:()=>window.location.reload(),children:"重新加载"})]})}):K.length===0?e.jsx(Te,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx($t,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"未找到插件"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:c||m!=="all"?"尝试调整搜索条件或筛选器":"暂无可用插件"})]})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:K.map(J=>e.jsxs(Te,{className:"flex flex-col hover:shadow-lg transition-shadow h-full",children:[e.jsxs(Oe,{children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx(Ue,{className:"text-xl",children:J.manifest?.name||J.id}),e.jsxs("div",{className:"flex flex-col gap-1",children:[J.manifest?.categories&&J.manifest.categories[0]&&e.jsx(Ce,{variant:"secondary",className:"text-xs whitespace-nowrap",children:vC[J.manifest.categories[0]]||J.manifest.categories[0]}),G(J)]})]}),e.jsx(Ns,{className:"line-clamp-2",children:J.manifest?.description||"无描述"})]}),e.jsx(ze,{className:"flex-1",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"h-4 w-4"}),e.jsx("span",{children:(X[J.id]?.downloads??J.downloads??0).toLocaleString()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(vn,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),e.jsx("span",{children:(X[J.id]?.rating??J.rating??0).toFixed(1)})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[J.manifest?.keywords&&J.manifest.keywords.slice(0,3).map(Z=>e.jsx(Ce,{variant:"outline",className:"text-xs",children:Z},Z)),J.manifest?.keywords&&J.manifest.keywords.length>3&&e.jsxs(Ce,{variant:"outline",className:"text-xs",children:["+",J.manifest.keywords.length-3]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground pt-2 border-t space-y-1",children:[e.jsxs("div",{children:["v",J.manifest?.version||"unknown"," · ",J.manifest?.author?.name||"Unknown"]}),J.manifest?.host_application&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{children:"支持:"}),e.jsxs("span",{className:"font-medium",children:[J.manifest.host_application.min_version,J.manifest.host_application.max_version?` - ${J.manifest.host_application.max_version}`:" - 最新版本"]})]})]})]})}),e.jsx(od,{className:"pt-4",children:e.jsxs("div",{className:"flex items-center justify-end gap-2 w-full",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>a({to:"/plugin-detail",search:{pluginId:J.id}}),children:"查看详情"}),J.installed?A(J)?e.jsxs(_,{size:"sm",disabled:!S?.installed,title:S?.installed?void 0:"Git 未安装",onClick:()=>cs(J),children:[e.jsx(dt,{className:"h-4 w-4 mr-1"}),"更新"]}):e.jsxs(_,{variant:"destructive",size:"sm",disabled:!S?.installed,title:S?.installed?void 0:"Git 未安装",onClick:()=>$e(J),children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"卸载"]}):e.jsxs(_,{size:"sm",disabled:!S?.installed||E?.operation==="install"||R!==null&&!$(J),title:S?.installed?R!==null&&!$(J)?`不兼容当前版本 (需要 ${J.manifest?.host_application?.min_version||"未知"}${J.manifest?.host_application?.max_version?` - ${J.manifest.host_application.max_version}`:"+"},当前 ${R?.version})`:void 0:"Git 未安装",onClick:()=>Re(J),children:[e.jsx(na,{className:"h-4 w-4 mr-1"}),E?.operation==="install"&&E?.plugin_id===J.id?"安装中...":"安装"]})]})}),E&&(E.stage==="loading"||E.stage==="success"||E.stage==="error")&&E.operation!=="fetch"&&E.plugin_id===J.id&&e.jsx("div",{className:"px-6 pb-4 -mt-2",children:e.jsxs("div",{className:`space-y-2 p-3 rounded-lg border ${E.stage==="success"?"bg-green-50 dark:bg-green-950/20 border-green-200 dark:border-green-900":E.stage==="error"?"bg-red-50 dark:bg-red-950/20 border-red-200 dark:border-red-900":"bg-muted/50"}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[E.stage==="loading"?e.jsx(Fs,{className:"h-3 w-3 animate-spin"}):E.stage==="success"?e.jsx(st,{className:"h-3 w-3 text-green-600"}):e.jsx(Ut,{className:"h-3 w-3 text-red-600"}),e.jsx("span",{className:`text-xs font-medium ${E.stage==="success"?"text-green-700 dark:text-green-300":E.stage==="error"?"text-red-700 dark:text-red-300":""}`,children:E.stage==="loading"?e.jsxs(e.Fragment,{children:[E.operation==="install"&&"正在安装",E.operation==="uninstall"&&"正在卸载",E.operation==="update"&&"正在更新"]}):E.stage==="success"?e.jsxs(e.Fragment,{children:[E.operation==="install"&&"安装完成",E.operation==="uninstall"&&"卸载完成",E.operation==="update"&&"更新完成"]}):e.jsxs(e.Fragment,{children:[E.operation==="install"&&"安装失败",E.operation==="uninstall"&&"卸载失败",E.operation==="update"&&"更新失败"]})})]}),E.stage!=="error"&&e.jsxs("span",{className:`text-xs font-medium ${E.stage==="success"?"text-green-700 dark:text-green-300":""}`,children:[E.progress,"%"]})]}),E.stage!=="error"&&e.jsx(tr,{value:E.progress,className:`h-1.5 ${E.stage==="success"?"[&>div]:bg-green-500":""}`}),e.jsx("div",{className:`text-xs ${E.stage==="success"?"text-green-600 dark:text-green-400 truncate":E.stage==="error"?"text-red-600 dark:text-red-400":"text-muted-foreground truncate"}`,children:E.stage==="error"?E.error||E.message||"操作失败":E.message})]})})]},J.id))}),e.jsx(Qs,{open:me,onOpenChange:Ne,children:e.jsxs(Hs,{children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"安装插件"}),e.jsxs(at,{children:["安装 ",je?.manifest.name]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["版本: ",je?.manifest.version]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["作者: ",typeof je?.manifest.author=="string"?je.manifest.author:je?.manifest.author?.name]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"advanced-options",checked:Y,onCheckedChange:J=>we(J)}),e.jsx("label",{htmlFor:"advanced-options",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"高级选项"})]}),Y&&e.jsx("div",{className:"space-y-4 p-4 border rounded-lg",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"分支选择"}),e.jsxs(Jt,{value:B,onValueChange:J=>ue(J),children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2",children:[e.jsx(Xe,{value:"preset",className:"text-xs",children:"预设分支"}),e.jsx(Xe,{value:"custom",className:"text-xs",children:"自定义分支"})]}),B==="preset"&&e.jsx("div",{className:"mt-3",children:e.jsxs(Pe,{value:ge,onValueChange:pe,children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:"选择分支"})}),e.jsxs(Ie,{children:[e.jsx(W,{value:"main",children:"main (默认)"}),e.jsx(W,{value:"master",children:"master"}),e.jsx(W,{value:"dev",children:"dev (开发版)"}),e.jsx(W,{value:"develop",children:"develop"}),e.jsx(W,{value:"beta",children:"beta (测试版)"}),e.jsx(W,{value:"stable",children:"stable (稳定版)"})]})]})}),B==="custom"&&e.jsxs("div",{className:"space-y-2 mt-3",children:[e.jsx("input",{type:"text",className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",placeholder:"输入分支名称,例如: feature/new-feature",value:D,onChange:J=>Q(J.target.value)}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"输入 Git 分支名称、标签或提交哈希"})]})]})]})}),!Y&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"将从默认分支 (main) 安装插件"})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>Ne(!1),children:"取消"}),e.jsxs(_,{onClick:se,children:[e.jsx(na,{className:"h-4 w-4 mr-2"}),"安装"]})]})]})}),e.jsx(nr,{})]})})}function yC(){return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(fv,{className:"h-8 w-8",strokeWidth:2}),"模型分配预设市场"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"浏览和下载社区共享的模型分配预设配置"})]})})}),e.jsx(ts,{className:"flex-1",children:e.jsx("div",{className:"flex items-center justify-center h-[calc(100vh-12rem)]",children:e.jsxs(Te,{className:"max-w-2xl w-full border-dashed",children:[e.jsxs(Oe,{className:"text-center",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx(xa,{className:"h-16 w-16 text-muted-foreground"})}),e.jsx(Ue,{className:"text-2xl",children:"功能开发中"}),e.jsx(Ns,{className:"text-base",children:"模型分配预设市场功能正在开发中,敬请期待!"})]}),e.jsx(ze,{children:e.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground",children:[e.jsx("p",{className:"font-medium text-foreground",children:"📦 即将推出的功能:"}),e.jsxs("ul",{className:"space-y-2 ml-6",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"浏览社区共享的模型分配预设配置"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"一键下载和应用预设配置"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"分享自己的模型分配方案"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"预设配置评分和评论系统"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"根据使用场景智能推荐配置"})]})]})]})})]})})})]})}function wC({field:a,value:l,onChange:r}){const[c,d]=u.useState(!1);switch(a.ui_type){case"switch":return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:a.label}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]}),e.jsx(Ge,{checked:!!l,onCheckedChange:r,disabled:a.disabled})]});case"number":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsx(ne,{type:"number",value:l??a.default,onChange:m=>r(parseFloat(m.target.value)||0),min:a.min,max:a.max,step:a.step??1,placeholder:a.placeholder,disabled:a.disabled}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"slider":return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:a.label}),e.jsx("span",{className:"text-sm text-muted-foreground",children:l??a.default})]}),e.jsx(el,{value:[l??a.default],onValueChange:m=>r(m[0]),min:a.min??0,max:a.max??100,step:a.step??1,disabled:a.disabled}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"select":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsxs(Pe,{value:String(l??a.default),onValueChange:r,disabled:a.disabled,children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:a.placeholder??"请选择"})}),e.jsx(Ie,{children:a.choices?.map(m=>e.jsx(W,{value:String(m),children:String(m)},String(m)))})]}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"textarea":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsx(pt,{value:l??a.default,onChange:m=>r(m.target.value),placeholder:a.placeholder,rows:a.rows??3,disabled:a.disabled}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"password":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsxs("div",{className:"relative",children:[e.jsx(ne,{type:c?"text":"password",value:l??"",onChange:m=>r(m.target.value),placeholder:a.placeholder,disabled:a.disabled,className:"pr-10"}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>d(!c),children:c?e.jsx(ic,{className:"h-4 w-4"}):e.jsx(ua,{className:"h-4 w-4"})})]}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"list":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsx(TS,{value:Array.isArray(l)?l:[],onChange:m=>r(m),itemType:a.item_type??"string",itemFields:a.item_fields,minItems:a.min_items,maxItems:a.max_items,disabled:a.disabled,placeholder:a.placeholder}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"text":default:return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsx(ne,{type:"text",value:l??a.default??"",onChange:m=>r(m.target.value),placeholder:a.placeholder,maxLength:a.max_length,disabled:a.disabled}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]})}}function lj({section:a,config:l,onChange:r}){const[c,d]=u.useState(!a.collapsed),m=Object.entries(a.fields).filter(([,h])=>!h.hidden).sort(([,h],[,f])=>h.order-f.order);return e.jsx(xc,{open:c,onOpenChange:d,children:e.jsxs(Te,{children:[e.jsx(hc,{asChild:!0,children:e.jsxs(Oe,{className:"cursor-pointer hover:bg-muted/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c?e.jsx(Ba,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ra,{className:"h-4 w-4 text-muted-foreground"}),e.jsx(Ue,{className:"text-lg",children:a.title})]}),e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:[m.length," 项"]})]}),a.description&&e.jsx(Ns,{className:"ml-6",children:a.description})]})}),e.jsx(fc,{children:e.jsx(ze,{className:"space-y-4 pt-0",children:m.map(([h,f])=>e.jsx(wC,{field:f,value:l[a.name]?.[h],onChange:p=>r(a.name,h,p),sectionName:a.name},h))})})]})})}function _C({plugin:a,onBack:l}){const{toast:r}=nt(),{triggerRestart:c,isRestarting:d}=Tn(),[m,h]=u.useState("visual"),[f,p]=u.useState(null),[g,N]=u.useState({}),[j,b]=u.useState({}),[y,w]=u.useState(""),[z,M]=u.useState(""),[S,F]=u.useState(!0),[E,C]=u.useState(!1),[R,H]=u.useState(!1),[O,X]=u.useState(!1),[L,me]=u.useState(!1),Ne=u.useCallback(async()=>{F(!0);try{const[B,ue,Y]=await Promise.all([cC(a.id),oC(a.id),dC(a.id)]);p(B),N(ue),b(JSON.parse(JSON.stringify(ue))),w(Y),M(Y)}catch(B){r({title:"加载配置失败",description:B instanceof Error?B.message:"未知错误",variant:"destructive"})}finally{F(!1)}},[a.id,r]);u.useEffect(()=>{Ne()},[Ne]),u.useEffect(()=>{H(m==="visual"?JSON.stringify(g)!==JSON.stringify(j):y!==z)},[g,j,y,z,m]);const je=(B,ue,Y)=>{N(we=>({...we,[B]:{...we[B]||{},[ue]:Y}}))},ce=async()=>{C(!0);try{if(m==="source"){try{_x(y)}catch(B){X(!0),r({title:"TOML 格式错误",description:B instanceof Error?B.message:"无法解析 TOML 配置,请检查语法",variant:"destructive"}),C(!1);return}await mC(a.id,y),M(y),X(!1)}else await uC(a.id,g),b(JSON.parse(JSON.stringify(g)));r({title:"配置已保存",description:"更改将在插件重新加载后生效"})}catch(B){r({title:"保存失败",description:B instanceof Error?B.message:"未知错误",variant:"destructive"})}finally{C(!1)}},ge=async()=>{try{await xC(a.id),r({title:"配置已重置",description:"下次加载插件时将使用默认配置"}),me(!1),Ne()}catch(B){r({title:"重置失败",description:B instanceof Error?B.message:"未知错误",variant:"destructive"})}},pe=async()=>{try{const B=await hC(a.id);r({title:B.message,description:B.note}),Ne()}catch(B){r({title:"切换状态失败",description:B instanceof Error?B.message:"未知错误",variant:"destructive"})}};if(S)return e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(!f)return e.jsxs("div",{className:"flex flex-col items-center justify-center h-64 space-y-4",children:[e.jsx(Ut,{className:"h-12 w-12 text-muted-foreground"}),e.jsx("p",{className:"text-muted-foreground",children:"无法加载配置"}),e.jsxs(_,{onClick:l,variant:"outline",children:[e.jsx($a,{className:"h-4 w-4 mr-2"}),"返回"]})]});const D=Object.values(f.sections).sort((B,ue)=>B.order-ue.order),Q=g.plugin?.enabled!==!1;return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:l,children:e.jsx($a,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:f.plugin_info.name||a.manifest.name}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(Ce,{variant:Q?"default":"secondary",children:Q?"已启用":"已禁用"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["v",f.plugin_info.version||a.manifest.version]})]})]})]}),e.jsxs("div",{className:"flex gap-2 ml-10 sm:ml-0",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>h(m==="visual"?"source":"visual"),children:m==="visual"?e.jsxs(e.Fragment,{children:[e.jsx(dx,{className:"h-4 w-4 mr-2"}),"源代码"]}):e.jsxs(e.Fragment,{children:[e.jsx(uv,{className:"h-4 w-4 mr-2"}),"可视化"]})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c(),disabled:d,children:[e.jsx(hv,{className:`h-4 w-4 mr-2 ${d?"animate-spin":""}`}),"重启麦麦"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:pe,children:[e.jsx(pc,{className:"h-4 w-4 mr-2"}),Q?"禁用":"启用"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>me(!0),children:[e.jsx(rc,{className:"h-4 w-4 mr-2"}),"重置"]}),e.jsxs(_,{size:"sm",onClick:ce,disabled:!R||E,children:[E?e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}):e.jsx(gc,{className:"h-4 w-4 mr-2"}),"保存"]})]})]}),R&&e.jsx(Te,{className:"border-orange-200 bg-orange-50 dark:bg-orange-950/20 dark:border-orange-900",children:e.jsx(ze,{className:"py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Yt,{className:"h-4 w-4 text-orange-600"}),e.jsx("p",{className:"text-sm text-orange-800 dark:text-orange-200",children:"有未保存的更改"})]})})}),m==="source"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsxs(ft,{children:[e.jsx("strong",{children:"源代码模式(高级功能):"}),"直接编辑 TOML 配置文件。保存时会验证格式,只有格式正确才能保存。",O&&e.jsx("span",{className:"text-destructive font-semibold ml-2",children:"⚠️ 上次保存失败,请检查 TOML 格式"})]})]}),e.jsx(Qv,{value:y,onChange:B=>{w(B),O&&X(!1)},language:"toml",theme:"dark",height:"calc(100vh - 350px)",minHeight:"500px",placeholder:"TOML 配置内容"})]}),m==="visual"&&e.jsxs(e.Fragment,{children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:[e.jsx("strong",{children:"提示:"}),"如果插件当前未加载或未启用,WebUI 适配器的高级插件可视化编辑功能可能会不可用。 请确保插件已启用并成功加载后,再进行配置编辑。"]})]}),f.layout.type==="tabs"&&f.layout.tabs.length>0?e.jsxs(Jt,{defaultValue:f.layout.tabs[0]?.id,children:[e.jsx(Gt,{children:f.layout.tabs.map(B=>e.jsxs(Xe,{value:B.id,children:[B.title,B.badge&&e.jsx(Ce,{variant:"secondary",className:"ml-2 text-xs",children:B.badge})]},B.id))}),f.layout.tabs.map(B=>e.jsx(Ss,{value:B.id,className:"space-y-4 mt-4",children:B.sections.map(ue=>{const Y=f.sections[ue];return Y?e.jsx(lj,{section:Y,config:g,onChange:je},ue):null})},B.id))]}):e.jsx("div",{className:"space-y-4",children:D.map(B=>e.jsx(lj,{section:B,config:g,onChange:je},B.name))})]}),e.jsx(Qs,{open:L,onOpenChange:me,children:e.jsxs(Hs,{children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"确认重置配置"}),e.jsx(at,{children:"这将删除当前配置文件,下次加载插件时将使用默认配置。此操作不可撤销。"})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>me(!1),children:"取消"}),e.jsx(_,{variant:"destructive",onClick:ge,children:"确认重置"})]})]})})]})}function SC(){return e.jsx(lr,{children:e.jsx(kC,{})})}function kC(){const{toast:a}=nt(),[l,r]=u.useState([]),[c,d]=u.useState(!0),[m,h]=u.useState(""),[f,p]=u.useState(null),g=async()=>{d(!0);try{const w=await Il();r(w)}catch(w){a({title:"加载插件列表失败",description:w instanceof Error?w.message:"未知错误",variant:"destructive"})}finally{d(!1)}};u.useEffect(()=>{g()},[]);const j=l.filter(w=>{const z=m.toLowerCase();return w.id.toLowerCase().includes(z)||w.manifest.name.toLowerCase().includes(z)||w.manifest.description?.toLowerCase().includes(z)}).filter((w,z,M)=>z===M.findIndex(S=>S.id===w.id)),b=l.length,y=0;return f?e.jsxs(e.Fragment,{children:[e.jsx(ts,{className:"h-full",children:e.jsx("div",{className:"p-4 sm:p-6",children:e.jsx(_C,{plugin:f,onBack:()=>p(null)})})}),e.jsx(nr,{})]}):e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件配置"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理和配置已安装的插件"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:g,children:[e.jsx(dt,{className:`h-4 w-4 mr-2 ${c?"animate-spin":""}`}),"刷新"]})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 xs:grid-cols-2 lg:grid-cols-3",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"已安装插件"}),e.jsx(xa,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-2xl font-bold",children:l.length}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:c?"正在加载...":"个插件"})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"已启用"}),e.jsx(st,{className:"h-4 w-4 text-green-600"})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-2xl font-bold",children:b}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"运行中的插件"})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"已禁用"}),e.jsx(Ut,{className:"h-4 w-4 text-orange-600"})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-2xl font-bold",children:y}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"未激活的插件"})]})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{placeholder:"搜索插件...",value:m,onChange:w=>h(w.target.value),className:"pl-9"})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"已安装的插件"}),e.jsx(Ns,{children:"点击插件查看和编辑配置"})]}),e.jsx(ze,{children:c?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):j.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 space-y-4",children:[e.jsx(xa,{className:"h-16 w-16 text-muted-foreground/50"}),e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("p",{className:"text-lg font-medium text-muted-foreground",children:m?"没有找到匹配的插件":"暂无已安装的插件"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:m?"尝试其他搜索关键词":"前往插件市场安装插件"})]})]}):e.jsx("div",{className:"space-y-2",children:j.map(w=>e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg border hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>p(w),children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"h-10 w-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:e.jsx(xa,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-medium truncate",children:w.manifest.name}),e.jsxs(Ce,{variant:"secondary",className:"text-xs flex-shrink-0",children:["v",w.manifest.version]})]}),e.jsx("p",{className:"text-sm text-muted-foreground truncate",children:w.manifest.description||"暂无描述"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(_,{variant:"ghost",size:"sm",children:e.jsx(Sn,{className:"h-4 w-4"})}),e.jsx(ra,{className:"h-4 w-4 text-muted-foreground"})]})]},w.id))})})]})]})})}function CC(){const a=ha(),{toast:l}=nt(),[r,c]=u.useState([]),[d,m]=u.useState(!0),[h,f]=u.useState(null),[p,g]=u.useState(null),[N,j]=u.useState(!1),[b,y]=u.useState(!1),[w,z]=u.useState({id:"",name:"",raw_prefix:"",clone_prefix:"",enabled:!0,priority:1}),M=u.useCallback(async()=>{try{m(!0),f(null);const O=await ke("/api/webui/plugins/mirrors");if(!O.ok)throw new Error("获取镜像源列表失败");const X=await O.json();c(X.mirrors||[])}catch(O){const X=O instanceof Error?O.message:"加载镜像源失败";f(X),l({title:"加载失败",description:X,variant:"destructive"})}finally{m(!1)}},[l]);u.useEffect(()=>{M()},[M]);const S=async()=>{try{const O=await ke("/api/webui/plugins/mirrors",{method:"POST",body:JSON.stringify(w)});if(!O.ok){const X=await O.json();throw new Error(X.detail||"添加镜像源失败")}l({title:"添加成功",description:"镜像源已添加"}),j(!1),z({id:"",name:"",raw_prefix:"",clone_prefix:"",enabled:!0,priority:1}),M()}catch(O){l({title:"添加失败",description:O instanceof Error?O.message:"未知错误",variant:"destructive"})}},F=async()=>{if(p)try{if(!(await ke(`/api/webui/plugins/mirrors/${p.id}`,{method:"PUT",body:JSON.stringify({name:w.name,raw_prefix:w.raw_prefix,clone_prefix:w.clone_prefix,enabled:w.enabled,priority:w.priority})})).ok)throw new Error("更新镜像源失败");l({title:"更新成功",description:"镜像源已更新"}),y(!1),g(null),M()}catch(O){l({title:"更新失败",description:O instanceof Error?O.message:"未知错误",variant:"destructive"})}},E=async O=>{if(confirm("确定要删除这个镜像源吗?"))try{if(!(await ke(`/api/webui/plugins/mirrors/${O}`,{method:"DELETE"})).ok)throw new Error("删除镜像源失败");l({title:"删除成功",description:"镜像源已删除"}),M()}catch(X){l({title:"删除失败",description:X instanceof Error?X.message:"未知错误",variant:"destructive"})}},C=async O=>{try{if(!(await ke(`/api/webui/plugins/mirrors/${O.id}`,{method:"PUT",body:JSON.stringify({enabled:!O.enabled})})).ok)throw new Error("更新状态失败");M()}catch(X){l({title:"更新失败",description:X instanceof Error?X.message:"未知错误",variant:"destructive"})}},R=O=>{g(O),z({id:O.id,name:O.name,raw_prefix:O.raw_prefix,clone_prefix:O.clone_prefix,enabled:O.enabled,priority:O.priority}),y(!0)},H=async(O,X)=>{const L=X==="up"?O.priority-1:O.priority+1;if(!(L<1))try{if(!(await ke(`/api/webui/plugins/mirrors/${O.id}`,{method:"PUT",body:JSON.stringify({priority:L})})).ok)throw new Error("更新优先级失败");M()}catch(me){l({title:"更新失败",description:me instanceof Error?me.message:"未知错误",variant:"destructive"})}};return e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>a({to:"/plugins"}),children:e.jsx($a,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"镜像源配置"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"管理 Git 克隆和文件下载的镜像源"})]})]}),e.jsxs(_,{onClick:()=>j(!0),children:[e.jsx(Xs,{className:"h-4 w-4 mr-2"}),"添加镜像源"]})]}),d?e.jsx(Te,{className:"p-6",children:e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-primary"})})}):h?e.jsx(Te,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(Lt,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:h}),e.jsx(_,{onClick:M,children:"重新加载"})]})}):e.jsxs(Te,{children:[e.jsx("div",{className:"hidden md:block",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{children:"状态"}),e.jsx(ns,{children:"名称"}),e.jsx(ns,{children:"ID"}),e.jsx(ns,{children:"优先级"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:r.map(O=>e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(Ge,{checked:O.enabled,onCheckedChange:()=>C(O)})}),e.jsx(Ze,{children:e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:O.name}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Raw: ",O.raw_prefix]})]})}),e.jsx(Ze,{children:e.jsx(Ce,{variant:"outline",children:O.id})}),e.jsx(Ze,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono",children:O.priority}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(_,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>H(O,"up"),disabled:O.priority===1,children:e.jsx(Xr,{className:"h-3 w-3"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>H(O,"down"),children:e.jsx(Ba,{className:"h-3 w-3"})})]})]})}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>R(O),children:e.jsx(Zn,{className:"h-4 w-4"})}),e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>E(O.id),children:e.jsx(os,{className:"h-4 w-4 text-destructive"})})]})})]},O.id))})]})}),e.jsx("div",{className:"md:hidden p-4 space-y-4",children:r.map(O=>e.jsx(Te,{className:"p-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-semibold",children:O.name}),O.enabled&&e.jsx(Ce,{variant:"default",className:"text-xs",children:"启用"})]}),e.jsx(Ce,{variant:"outline",className:"mt-1 text-xs",children:O.id})]}),e.jsx(Ge,{checked:O.enabled,onCheckedChange:()=>C(O)})]}),e.jsxs("div",{className:"text-sm space-y-1",children:[e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium",children:"Raw: "}),e.jsx("span",{className:"break-all",children:O.raw_prefix})]}),e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium",children:"优先级: "}),e.jsx("span",{className:"font-mono",children:O.priority})]})]}),e.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t",children:[e.jsxs(_,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>R(O),children:[e.jsx(Zn,{className:"h-4 w-4 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>H(O,"up"),disabled:O.priority===1,children:e.jsx(Xr,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>H(O,"down"),children:e.jsx(Ba,{className:"h-4 w-4"})}),e.jsx(_,{variant:"destructive",size:"sm",onClick:()=>E(O.id),children:e.jsx(os,{className:"h-4 w-4"})})]})]})},O.id))})]}),e.jsx(Qs,{open:N,onOpenChange:j,children:e.jsxs(Hs,{className:"max-w-lg",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"添加镜像源"}),e.jsx(at,{children:"添加新的 Git 镜像源配置"})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-id",children:"镜像源 ID *"}),e.jsx(ne,{id:"add-id",placeholder:"例如: my-mirror",value:w.id,onChange:O=>z({...w,id:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-name",children:"名称 *"}),e.jsx(ne,{id:"add-name",placeholder:"例如: 我的镜像源",value:w.name,onChange:O=>z({...w,name:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-raw",children:"Raw 文件前缀 *"}),e.jsx(ne,{id:"add-raw",placeholder:"https://example.com/raw",value:w.raw_prefix,onChange:O=>z({...w,raw_prefix:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-clone",children:"克隆前缀 *"}),e.jsx(ne,{id:"add-clone",placeholder:"https://example.com/clone",value:w.clone_prefix,onChange:O=>z({...w,clone_prefix:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-priority",children:"优先级"}),e.jsx(ne,{id:"add-priority",type:"number",min:"1",value:w.priority,onChange:O=>z({...w,priority:parseInt(O.target.value)||1})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"数字越小优先级越高"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"add-enabled",checked:w.enabled,onCheckedChange:O=>z({...w,enabled:O})}),e.jsx(T,{htmlFor:"add-enabled",children:"启用此镜像源"})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>j(!1),children:"取消"}),e.jsx(_,{onClick:S,children:"添加"})]})]})}),e.jsx(Qs,{open:b,onOpenChange:y,children:e.jsxs(Hs,{className:"max-w-lg",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑镜像源"}),e.jsx(at,{children:"修改镜像源配置"})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"镜像源 ID"}),e.jsx(ne,{value:w.id,disabled:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit-name",children:"名称 *"}),e.jsx(ne,{id:"edit-name",value:w.name,onChange:O=>z({...w,name:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit-raw",children:"Raw 文件前缀 *"}),e.jsx(ne,{id:"edit-raw",value:w.raw_prefix,onChange:O=>z({...w,raw_prefix:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit-clone",children:"克隆前缀 *"}),e.jsx(ne,{id:"edit-clone",value:w.clone_prefix,onChange:O=>z({...w,clone_prefix:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit-priority",children:"优先级"}),e.jsx(ne,{id:"edit-priority",type:"number",min:"1",value:w.priority,onChange:O=>z({...w,priority:parseInt(O.target.value)||1})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"数字越小优先级越高"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ge,{id:"edit-enabled",checked:w.enabled,onCheckedChange:O=>z({...w,enabled:O})}),e.jsx(T,{htmlFor:"edit-enabled",children:"启用此镜像源"})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>y(!1),children:"取消"}),e.jsx(_,{onClick:F,children:"保存"})]})]})})]})})}function TC({pluginId:a,compact:l=!1}){const[r,c]=u.useState(null),[d,m]=u.useState(!0),[h,f]=u.useState(0),[p,g]=u.useState(""),[N,j]=u.useState(!1),{toast:b}=nt(),y=async()=>{m(!0);const S=await bN(a);S&&c(S),m(!1)};u.useEffect(()=>{y()},[a]);const w=async()=>{const S=await fC(a);S.success?(b({title:"已点赞",description:"感谢你的支持!"}),y()):b({title:"点赞失败",description:S.error||"未知错误",variant:"destructive"})},z=async()=>{const S=await pC(a);S.success?(b({title:"已反馈",description:"感谢你的反馈!"}),y()):b({title:"操作失败",description:S.error||"未知错误",variant:"destructive"})},M=async()=>{if(h===0){b({title:"请选择评分",description:"至少选择 1 颗星",variant:"destructive"});return}const S=await gC(a,h,p||void 0);S.success?(b({title:"评分成功",description:"感谢你的评价!"}),j(!1),f(0),g(""),y()):b({title:"评分失败",description:S.error||"未知错误",variant:"destructive"})};return d?e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"h-4 w-4"}),e.jsx("span",{children:"-"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(vn,{className:"h-4 w-4"}),e.jsx("span",{children:"-"})]})]}):r?l?e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",title:`下载量: ${r.downloads.toLocaleString()}`,children:[e.jsx(na,{className:"h-4 w-4"}),e.jsx("span",{children:r.downloads.toLocaleString()})]}),e.jsxs("div",{className:"flex items-center gap-1",title:`评分: ${r.rating.toFixed(1)} (${r.rating_count} 条评价)`,children:[e.jsx(vn,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),e.jsx("span",{children:r.rating.toFixed(1)})]}),e.jsxs("div",{className:"flex items-center gap-1",title:`点赞数: ${r.likes}`,children:[e.jsx(Mm,{className:"h-4 w-4"}),e.jsx("span",{children:r.likes})]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"flex flex-col items-center p-3 rounded-lg border bg-card",children:[e.jsx(na,{className:"h-5 w-5 text-muted-foreground mb-1"}),e.jsx("span",{className:"text-2xl font-bold",children:r.downloads.toLocaleString()}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"下载量"})]}),e.jsxs("div",{className:"flex flex-col items-center p-3 rounded-lg border bg-card",children:[e.jsx(vn,{className:"h-5 w-5 text-yellow-400 mb-1 fill-yellow-400"}),e.jsx("span",{className:"text-2xl font-bold",children:r.rating.toFixed(1)}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[r.rating_count," 条评价"]})]}),e.jsxs("div",{className:"flex flex-col items-center p-3 rounded-lg border bg-card",children:[e.jsx(Mm,{className:"h-5 w-5 text-green-500 mb-1"}),e.jsx("span",{className:"text-2xl font-bold",children:r.likes}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"点赞"})]}),e.jsxs("div",{className:"flex flex-col items-center p-3 rounded-lg border bg-card",children:[e.jsx(Ag,{className:"h-5 w-5 text-red-500 mb-1"}),e.jsx("span",{className:"text-2xl font-bold",children:r.dislikes}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"点踩"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:w,children:[e.jsx(Mm,{className:"h-4 w-4 mr-1"}),"点赞"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:z,children:[e.jsx(Ag,{className:"h-4 w-4 mr-1"}),"点踩"]}),e.jsxs(Qs,{open:N,onOpenChange:j,children:[e.jsx(dd,{asChild:!0,children:e.jsxs(_,{variant:"default",size:"sm",children:[e.jsx(vn,{className:"h-4 w-4 mr-1"}),"评分"]})}),e.jsxs(Hs,{children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"为插件评分"}),e.jsx(at,{children:"分享你的使用体验,帮助其他用户"})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("div",{className:"flex gap-2",children:[1,2,3,4,5].map(S=>e.jsx("button",{onClick:()=>f(S),className:"focus:outline-none",children:e.jsx(vn,{className:`h-8 w-8 transition-colors ${S<=h?"fill-yellow-400 text-yellow-400":"text-muted-foreground hover:text-yellow-300"}`})},S))}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[h===0&&"点击星星进行评分",h===1&&"很差",h===2&&"一般",h===3&&"还行",h===4&&"不错",h===5&&"非常好"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"评论(可选)"}),e.jsx(pt,{value:p,onChange:S=>g(S.target.value),placeholder:"分享你的使用体验...",rows:4,maxLength:500}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-1 text-right",children:[p.length," / 500"]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>j(!1),children:"取消"}),e.jsx(_,{onClick:M,disabled:h===0,children:"提交评分"})]})]})]})]}),r.recent_ratings&&r.recent_ratings.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"最近评价"}),e.jsx("div",{className:"space-y-3",children:r.recent_ratings.map((S,F)=>e.jsxs("div",{className:"p-3 rounded-lg border bg-muted/50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(E=>e.jsx(vn,{className:`h-3 w-3 ${E<=S.rating?"fill-yellow-400 text-yellow-400":"text-muted-foreground"}`},E))}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(S.created_at).toLocaleDateString()})]}),S.comment&&e.jsx("p",{className:"text-sm text-muted-foreground",children:S.comment})]},F))})]})]}):null}const EC={"Group Management":"群组管理","Entertainment & Interaction":"娱乐互动","Utility Tools":"实用工具","Content Generation":"内容生成",Multimedia:"多媒体","External Integration":"外部集成","Data Analysis & Insights":"数据分析与洞察",Other:"其他"};function MC(){const a=ha(),l=lw({strict:!1}),{toast:r}=nt(),[c,d]=u.useState(null),[m,h]=u.useState(""),[f,p]=u.useState(!0),[g,N]=u.useState(!0),[j,b]=u.useState(null),[y,w]=u.useState(null),[z,M]=u.useState(null),[S,F]=u.useState(!1),[E,C]=u.useState(),[R,H]=u.useState(!1);u.useEffect(()=>{(async()=>{if(!l.pluginId){b("缺少插件 ID"),p(!1);return}try{p(!0),b(null);const ge=await ke("/api/webui/plugins/fetch-raw",{method:"POST",body:JSON.stringify({owner:"Mai-with-u",repo:"plugin-repo",branch:"main",file_path:"plugin_details.json"})});if(!ge.ok)throw new Error("获取插件列表失败");const pe=await ge.json();if(!pe.success||!pe.data)throw new Error(pe.error||"获取插件列表失败");const Q=JSON.parse(pe.data).find(fe=>fe.id===l.pluginId);if(!Q)throw new Error("未找到该插件");const B={id:Q.id,manifest:Q.manifest,downloads:0,rating:0,review_count:0,installed:!1,published_at:new Date().toISOString(),updated_at:new Date().toISOString()};d(B);const[ue,Y,we]=await Promise.all([fN(),pN(),Il()]);w(ue),M(Y),F(bn(l.pluginId,we)),C(yn(l.pluginId,we))}catch(ge){b(ge instanceof Error?ge.message:"加载失败")}finally{p(!1)}})()},[l.pluginId]),u.useEffect(()=>{(async()=>{if(!c?.manifest?.repository_url){N(!1);return}try{if(N(!0),S&&l.pluginId)try{const Y=await ke(`/api/webui/plugins/local-readme/${l.pluginId}`);if(Y.ok){const we=await Y.json();if(we.success&&we.data){h(we.data),N(!1);return}}}catch(Y){console.log("本地 README 获取失败,尝试远程获取:",Y)}const ge=c.manifest.repository_url.match(/github\.com\/([^/]+)\/([^/\s]+)/);if(!ge){h("无法解析仓库地址");return}const[,pe,D]=ge,Q=D.replace(/\.git$/,""),B=await ke("/api/webui/plugins/fetch-raw",{method:"POST",body:JSON.stringify({owner:pe,repo:Q,branch:"main",file_path:"README.md"})});if(!B.ok)throw new Error("获取 README 失败");const ue=await B.json();ue.success&&ue.data?h(ue.data):h("该插件暂无 README 文档")}catch(ge){console.error("加载 README 失败:",ge),h("加载 README 失败")}finally{N(!1)}})()},[c,S,l.pluginId]);const O=()=>!c||!S||!E?!1:E!==c.manifest.version,X=()=>!c||!z?!0:gN(c.manifest.host_application.min_version,c.manifest.host_application.max_version,z),L=async()=>{if(!(!c||!y?.installed))try{H(!0),await jN(c.id,c.manifest.repository_url||"","main"),yN(c.id).catch(ge=>{console.warn("Failed to record download:",ge)}),r({title:"安装成功",description:`${c.manifest.name} 已成功安装`});const ce=await Il();F(bn(c.id,ce)),C(yn(c.id,ce))}catch(ce){r({title:"安装失败",description:ce instanceof Error?ce.message:"未知错误",variant:"destructive"})}finally{H(!1)}},me=async()=>{if(c)try{H(!0),await vN(c.id),r({title:"卸载成功",description:`${c.manifest.name} 已成功卸载`});const ce=await Il();F(bn(c.id,ce)),C(yn(c.id,ce))}catch(ce){r({title:"卸载失败",description:ce instanceof Error?ce.message:"未知错误",variant:"destructive"})}finally{H(!1)}},Ne=async()=>{if(!(!c||!y?.installed))try{H(!0);const ce=await NN(c.id,c.manifest.repository_url||"","main");r({title:"更新成功",description:`${c.manifest.name} 已从 ${ce.old_version} 更新到 ${ce.new_version}`});const ge=await Il();F(bn(c.id,ge)),C(yn(c.id,ge))}catch(ce){r({title:"更新失败",description:ce instanceof Error?ce.message:"未知错误",variant:"destructive"})}finally{H(!1)}};if(f)return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>a({to:"/plugins"}),children:e.jsx($a,{className:"h-5 w-5"})}),e.jsx("div",{children:e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件详情"})})]}),e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"加载插件信息中..."})]})]});if(j||!c)return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>a({to:"/plugins"}),children:e.jsx($a,{className:"h-5 w-5"})}),e.jsx("div",{children:e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件详情"})})]}),e.jsx(Te,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(Ut,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:j}),e.jsx(_,{onClick:()=>a({to:"/plugins"}),children:"返回插件列表"})]})})]});const je=X();return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>a({to:"/plugins"}),className:"shrink-0",children:e.jsx($a,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件详情"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:c.manifest.name})]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:S?e.jsxs(e.Fragment,{children:[O()?e.jsx(_,{disabled:!y?.installed||R,onClick:Ne,title:y?.installed?void 0:"Git 未安装",children:R?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"更新中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(dt,{className:"h-4 w-4 mr-2"}),"更新"]})}):null,e.jsx(_,{variant:"destructive",disabled:!y?.installed||R,onClick:me,title:y?.installed?void 0:"Git 未安装",children:R?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"卸载中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(os,{className:"h-4 w-4 mr-2"}),"卸载"]})})]}):e.jsx(_,{disabled:!y?.installed||!je||R,onClick:L,title:y?.installed?je?void 0:`不兼容当前版本 (需要 ${c.manifest.host_application.min_version}${c.manifest.host_application.max_version?` - ${c.manifest.host_application.max_version}`:"+"},当前 ${z?.version})`:"Git 未安装",children:R?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"安装中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(na,{className:"h-4 w-4 mr-2"}),"安装"]})})})]}),e.jsx(ts,{className:"h-[calc(100vh-200px)] sm:h-[calc(100vh-220px)]",children:e.jsxs("div",{className:"space-y-6 pr-4",children:[e.jsx(Te,{children:e.jsx(Oe,{children:e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx(Ue,{className:"text-2xl",children:c.manifest.name}),e.jsxs(Ce,{variant:"secondary",className:"text-sm",children:["v",c.manifest.version]}),S&&e.jsxs(Ce,{variant:"default",className:"text-sm",children:[e.jsx(st,{className:"h-3 w-3 mr-1"}),"已安装 ",E&&`(v${E})`]}),O()&&e.jsxs(Ce,{variant:"outline",className:"text-sm border-orange-500 text-orange-500",children:[e.jsx(dt,{className:"h-3 w-3 mr-1"}),"可更新"]}),!je&&e.jsxs(Ce,{variant:"destructive",className:"text-sm",children:[e.jsx(Ut,{className:"h-3 w-3 mr-1"}),"不兼容"]})]}),e.jsx(Ns,{className:"text-base",children:c.manifest.description})]})})})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-1 space-y-6",children:[e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{className:"text-lg",children:"统计信息"})}),e.jsx(ze,{children:e.jsx(TC,{pluginId:c.id})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{className:"text-lg",children:"基本信息"})}),e.jsx(ze,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Fl,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"作者:"}),e.jsx("span",{className:"font-medium",children:c.manifest.author?.name||"Unknown"}),c.manifest.author?.url&&e.jsx("a",{href:c.manifest.author.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:e.jsx(Io,{className:"h-3 w-3"})})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(xa,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"版本:"}),e.jsxs("span",{className:"font-medium",children:["v",c.manifest.version]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(ov,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"许可证:"}),e.jsx("span",{className:"font-medium",children:c.manifest.license})]}),c.manifest.homepage_url&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Go,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"主页:"}),e.jsxs("a",{href:c.manifest.homepage_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:["访问",e.jsx(Io,{className:"h-3 w-3"})]})]}),c.manifest.repository_url&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Q1,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"仓库:"}),e.jsxs("a",{href:c.manifest.repository_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:["GitHub",e.jsx(Io,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"pt-2 border-t",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm mb-2",children:[e.jsx(Yt,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"支持版本:"})]}),e.jsxs("div",{className:"text-sm pl-6 font-medium",children:[c.manifest.host_application.min_version,c.manifest.host_application.max_version?` - ${c.manifest.host_application.max_version}`:" - 最新版本"]})]})]})})]}),(c.manifest.categories||c.manifest.keywords)&&e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{className:"text-lg",children:"分类与标签"})}),e.jsxs(ze,{className:"space-y-4",children:[c.manifest.categories&&c.manifest.categories.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"分类"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:c.manifest.categories.map(ce=>e.jsx(Ce,{variant:"secondary",children:EC[ce]||ce},ce))})]}),c.manifest.keywords&&c.manifest.keywords.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"标签"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:c.manifest.keywords.map(ce=>e.jsxs(Ce,{variant:"outline",className:"text-xs",children:[e.jsx(cd,{className:"h-3 w-3 mr-1"}),ce]},ce))})]})]})]})]}),e.jsxs(Te,{className:"lg:col-span-2",children:[e.jsx(Oe,{children:e.jsx(Ue,{className:"text-lg",children:"插件说明"})}),e.jsx(ze,{children:e.jsx(ts,{className:"h-[600px] pr-4",children:g?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(Fs,{className:"h-6 w-6 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-sm text-muted-foreground",children:"加载说明文档中..."})]}):m?e.jsx(bx,{content:m}):e.jsx("div",{className:"text-center text-muted-foreground py-12",children:"暂无说明文档"})})})]})]})]})})]})}const ec=u.forwardRef(({className:a,...l},r)=>e.jsx(Aj,{ref:r,className:P("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",a),...l}));ec.displayName=Aj.displayName;const AC=u.forwardRef(({className:a,...l},r)=>e.jsx(zj,{ref:r,className:P("aspect-square h-full w-full",a),...l}));AC.displayName=zj.displayName;const sc=u.forwardRef(({className:a,...l},r)=>e.jsx(Rj,{ref:r,className:P("flex h-full w-full items-center justify-center rounded-full bg-muted",a),...l}));sc.displayName=Rj.displayName;function zC(){return"webui_"+Math.random().toString(36).substr(2,9)+"_"+Date.now().toString(36)}function RC(){const a="maibot_webui_user_id";let l=localStorage.getItem(a);return l||(l=zC(),localStorage.setItem(a,l)),l}function DC(){return localStorage.getItem("maibot_webui_user_name")||"WebUI用户"}function OC(a){localStorage.setItem("maibot_webui_user_name",a)}const wN="maibot_webui_virtual_tabs";function LC(){try{const a=localStorage.getItem(wN);if(a)return JSON.parse(a)}catch(a){console.error("[Chat] 加载虚拟标签页失败:",a)}return[]}function nj(a){try{localStorage.setItem(wN,JSON.stringify(a))}catch(l){console.error("[Chat] 保存虚拟标签页失败:",l)}}function UC({segment:a}){switch(a.type){case"text":return e.jsx("span",{className:"whitespace-pre-wrap",children:String(a.data)});case"image":case"emoji":return e.jsx("img",{src:String(a.data),alt:a.type==="emoji"?"表情包":"图片",className:P("rounded-lg max-w-full",a.type==="emoji"?"max-h-32":"max-h-64"),loading:"lazy",onError:l=>{const r=l.target;r.style.display="none",r.parentElement?.insertAdjacentHTML("beforeend",`[${a.type==="emoji"?"表情包":"图片"}加载失败]`)}});case"voice":return e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("audio",{controls:!0,src:String(a.data),className:"max-w-[200px] h-8",children:"您的浏览器不支持音频播放"})});case"video":return e.jsx("video",{controls:!0,src:String(a.data),className:"rounded-lg max-w-full max-h-64",children:"您的浏览器不支持视频播放"});case"face":return e.jsxs("span",{className:"text-muted-foreground",children:["[表情:",String(a.data),"]"]});case"music":return e.jsx("span",{className:"text-muted-foreground",children:"[音乐分享]"});case"file":return e.jsxs("span",{className:"text-muted-foreground",children:["[文件: ",String(a.data),"]"]});case"reply":return e.jsx("span",{className:"text-muted-foreground text-xs",children:"[回复消息]"});case"forward":return e.jsx("span",{className:"text-muted-foreground",children:"[转发消息]"});case"unknown":default:return e.jsxs("span",{className:"text-muted-foreground",children:["[",a.original_type||"未知消息","]"]})}}function $C({message:a,isBot:l}){return a.message_type==="rich"&&a.segments&&a.segments.length>0?e.jsx("div",{className:"flex flex-col gap-2",children:a.segments.map((r,c)=>e.jsx(UC,{segment:r},c))}):e.jsx("span",{className:"whitespace-pre-wrap",children:a.content})}function BC(){const a={id:"webui-default",type:"webui",label:"WebUI",messages:[],isConnected:!1,isTyping:!1,sessionInfo:{}},l=()=>{const Ke=LC().map(He=>{const Je=He.virtualConfig;return!Je.groupId&&Je.platform&&Je.userId&&(Je.groupId=`webui_virtual_group_${Je.platform}_${Je.userId}`),{id:He.id,type:"virtual",label:He.label,virtualConfig:Je,messages:[],isConnected:!1,isTyping:!1,sessionInfo:{}}});return[a,...Ke]},[r,c]=u.useState(l),[d,m]=u.useState("webui-default"),h=r.find(V=>V.id===d)||r[0],[f,p]=u.useState(""),[g,N]=u.useState(!1),[j,b]=u.useState(!0),[y,w]=u.useState(DC()),[z,M]=u.useState(!1),[S,F]=u.useState(""),[E,C]=u.useState(!1),[R,H]=u.useState([]),[O,X]=u.useState([]),[L,me]=u.useState(!1),[Ne,je]=u.useState(!1),[ce,ge]=u.useState(""),[pe,D]=u.useState({platform:"",personId:"",userId:"",userName:"",groupName:"",groupId:""}),Q=u.useRef(RC()),B=u.useRef(new Map),ue=u.useRef(null),Y=u.useRef(new Map),we=u.useRef(0),fe=u.useRef(new Map),{toast:Ee}=nt(),G=V=>(we.current+=1,`${V}-${Date.now()}-${we.current}-${Math.random().toString(36).substr(2,9)}`),$=u.useCallback((V,Ke)=>{c(He=>He.map(Je=>Je.id===V?{...Je,...Ke}:Je))},[]),A=u.useCallback((V,Ke)=>{c(He=>He.map(Je=>Je.id===V?{...Je,messages:[...Je.messages,Ke]}:Je))},[]),K=u.useCallback(()=>{ue.current?.scrollIntoView({behavior:"smooth"})},[]);u.useEffect(()=>{K()},[h?.messages,K]);const Re=u.useCallback(async()=>{me(!0);try{const V=await ke("/api/chat/platforms");if(console.log("[Chat] 平台列表响应:",V.status,V.headers.get("content-type")),V.ok){const Ke=V.headers.get("content-type");if(Ke&&Ke.includes("application/json")){const He=await V.json();console.log("[Chat] 平台列表数据:",He),H(He.platforms||[])}else{const He=await V.text();console.error("[Chat] 获取平台列表失败: 非 JSON 响应:",He.substring(0,200)),Ee({title:"连接失败",description:"无法连接到后端服务,请确保 MaiBot 已启动",variant:"destructive"})}}else console.error("[Chat] 获取平台列表失败: HTTP",V.status),Ee({title:"获取平台失败",description:`服务器返回错误: ${V.status}`,variant:"destructive"})}catch(V){console.error("[Chat] 获取平台列表失败:",V),Ee({title:"网络错误",description:"无法连接到后端服务",variant:"destructive"})}finally{me(!1)}},[Ee]),se=u.useCallback(async(V,Ke)=>{je(!0);try{const He=new URLSearchParams;V&&He.append("platform",V),Ke&&He.append("search",Ke),He.append("limit","50");const Je=await ke(`/api/chat/persons?${He.toString()}`);if(Je.ok){const Es=Je.headers.get("content-type");if(Es&&Es.includes("application/json")){const ms=await Je.json();X(ms.persons||[])}else console.error("[Chat] 获取用户列表失败: 后端返回非 JSON 响应")}}catch(He){console.error("[Chat] 获取用户列表失败:",He)}finally{je(!1)}},[]);u.useEffect(()=>{pe.platform&&se(pe.platform,ce)},[pe.platform,ce,se]);const $e=u.useCallback(async(V,Ke)=>{b(!0);try{const He=new URLSearchParams;He.append("user_id",Q.current),He.append("limit","50"),Ke&&He.append("group_id",Ke);const Je=`/api/chat/history?${He.toString()}`;console.log("[Chat] 正在加载历史消息:",Je);const Es=await ke(Je);if(Es.ok){const ms=await Es.text();try{const Ms=JSON.parse(ms);if(Ms.messages&&Ms.messages.length>0){const We=Ms.messages.map(rs=>({id:rs.id,type:rs.type,content:rs.content,timestamp:rs.timestamp,sender:{name:rs.sender_name||(rs.is_bot?"麦麦":"WebUI用户"),user_id:rs.user_id,is_bot:rs.is_bot}}));$(V,{messages:We});const Cs=fe.current.get(V)||new Set;We.forEach(rs=>{if(rs.type==="bot"){const is=`bot-${rs.content}-${Math.floor(rs.timestamp*1e3)}`;Cs.add(is)}}),fe.current.set(V,Cs)}}catch(Ms){console.error("[Chat] JSON 解析失败:",Ms)}}}catch(He){console.error("[Chat] 加载历史消息失败:",He)}finally{b(!1)}},[$]),cs=u.useCallback(async(V,Ke,He)=>{const Je=B.current.get(V);if(Je?.readyState===WebSocket.OPEN||Je?.readyState===WebSocket.CONNECTING){console.log(`[Tab ${V}] WebSocket 已存在,跳过连接`);return}N(!0);let Es=null;try{const Cs=await ke("/api/webui/ws-token");if(Cs.ok){const rs=await Cs.json();if(rs.success&&rs.token)Es=rs.token;else{console.warn(`[Tab ${V}] 获取 WebSocket token 失败: ${rs.message||"未登录"}`),N(!1);return}}}catch(Cs){console.error(`[Tab ${V}] 获取 WebSocket token 失败:`,Cs),N(!1);return}if(!Es){N(!1);return}const ms=window.location.protocol==="https:"?"wss:":"ws:",Ms=new URLSearchParams;Ms.append("token",Es),Ke==="virtual"&&He?(Ms.append("user_id",He.userId),Ms.append("user_name",He.userName),Ms.append("platform",He.platform),Ms.append("person_id",He.personId),Ms.append("group_name",He.groupName||"WebUI虚拟群聊"),He.groupId&&Ms.append("group_id",He.groupId)):(Ms.append("user_id",Q.current),Ms.append("user_name",y));const We=`${ms}//${window.location.host}/api/chat/ws?${Ms.toString()}`;console.log(`[Tab ${V}] 正在连接 WebSocket:`,We);try{const Cs=new WebSocket(We);B.current.set(V,Cs),Cs.onopen=()=>{$(V,{isConnected:!0}),N(!1),console.log(`[Tab ${V}] WebSocket 已连接`)},Cs.onmessage=rs=>{try{const is=JSON.parse(rs.data);switch(is.type){case"session_info":$(V,{sessionInfo:{session_id:is.session_id,user_id:is.user_id,user_name:is.user_name,bot_name:is.bot_name}});break;case"system":A(V,{id:G("sys"),type:"system",content:is.content||"",timestamp:is.timestamp||Date.now()/1e3});break;case"user_message":{const ys=is.sender?.user_id,rt=Ke==="virtual"&&He?He.userId:Q.current;console.log(`[Tab ${V}] 收到 user_message, sender: ${ys}, current: ${rt}`);const jt=ys?ys.replace(/^webui_user_/,""):"",Ae=rt?rt.replace(/^webui_user_/,""):"";if(jt&&Ae&&jt===Ae){console.log(`[Tab ${V}] 跳过自己的消息(user_id 匹配)`);break}const Qe=fe.current.get(V)||new Set,As=`user-${is.content}-${Math.floor((is.timestamp||0)*1e3)}`;if(Qe.has(As)){console.log(`[Tab ${V}] 跳过自己的消息(内容去重)`);break}if(Qe.add(As),fe.current.set(V,Qe),Qe.size>100){const mt=Qe.values().next().value;mt&&Qe.delete(mt)}A(V,{id:is.message_id||G("user"),type:"user",content:is.content||"",timestamp:is.timestamp||Date.now()/1e3,sender:is.sender});break}case"bot_message":{$(V,{isTyping:!1});const ys=fe.current.get(V)||new Set,rt=`bot-${is.content}-${Math.floor((is.timestamp||0)*1e3)}`;if(ys.has(rt))break;if(ys.add(rt),fe.current.set(V,ys),ys.size>100){const jt=ys.values().next().value;jt&&ys.delete(jt)}c(jt=>jt.map(Ae=>{if(Ae.id!==V)return Ae;const Qe=Ae.messages.filter(mt=>mt.type!=="thinking"),As={id:G("bot"),type:"bot",content:is.content||"",message_type:is.message_type==="rich"?"rich":"text",segments:is.segments,timestamp:is.timestamp||Date.now()/1e3,sender:is.sender};return{...Ae,messages:[...Qe,As]}}));break}case"typing":$(V,{isTyping:is.is_typing||!1});break;case"error":c(ys=>ys.map(rt=>{if(rt.id!==V)return rt;const jt=rt.messages.filter(Ae=>Ae.type!=="thinking");return{...rt,messages:[...jt,{id:G("error"),type:"error",content:is.content||"发生错误",timestamp:is.timestamp||Date.now()/1e3}]}})),Ee({title:"错误",description:is.content,variant:"destructive"});break;case"pong":break;case"history":{const ys=is.messages||[];if(ys.length>0){const rt=fe.current.get(V)||new Set,jt=ys.map(Ae=>{const Qe=Ae.is_bot||!1,As=Ae.id||G(Qe?"bot":"user"),mt=`${Qe?"bot":"user"}-${Ae.content}-${Math.floor(Ae.timestamp*1e3)}`;return rt.add(mt),{id:As,type:Qe?"bot":"user",content:Ae.content,timestamp:Ae.timestamp,sender:{name:Ae.sender_name||(Qe?"麦麦":"用户"),user_id:Ae.sender_id,is_bot:Qe}}});fe.current.set(V,rt),$(V,{messages:jt}),console.log(`[Tab ${V}] 已加载 ${jt.length} 条历史消息`)}break}default:console.log("未知消息类型:",is.type)}}catch(is){console.error("解析消息失败:",is)}},Cs.onclose=()=>{$(V,{isConnected:!1}),N(!1),B.current.delete(V),console.log(`[Tab ${V}] WebSocket 已断开`);const rs=Y.current.get(V);rs&&clearTimeout(rs);const is=window.setTimeout(()=>{if(!J.current){const ys=r.find(rt=>rt.id===V);ys&&cs(V,ys.type,ys.virtualConfig)}},5e3);Y.current.set(V,is)},Cs.onerror=rs=>{console.error(`[Tab ${V}] WebSocket 错误:`,rs),N(!1)}}catch(Cs){console.error(`[Tab ${V}] 创建 WebSocket 失败:`,Cs),N(!1)}},[y,$,A,Ee,r]),J=u.useRef(!1);u.useEffect(()=>{J.current=!1;const V=B.current,Ke=Y.current,He=fe.current;$e("webui-default");const Je=setTimeout(()=>{J.current||(cs("webui-default","webui"),r.forEach(ms=>{ms.type==="virtual"&&ms.virtualConfig&&(He.set(ms.id,new Set),setTimeout(()=>{J.current||cs(ms.id,"virtual",ms.virtualConfig)},200))}))},100),Es=setInterval(()=>{V.forEach(ms=>{ms.readyState===WebSocket.OPEN&&ms.send(JSON.stringify({type:"ping"}))})},3e4);return()=>{J.current=!0,clearTimeout(Je),clearInterval(Es),Ke.forEach(ms=>{clearTimeout(ms)}),Ke.clear(),V.forEach(ms=>{ms.close()}),V.clear()}},[]);const Z=u.useCallback(()=>{const V=B.current.get(d);if(!f.trim()||!V||V.readyState!==WebSocket.OPEN)return;const Ke=h?.type==="virtual"&&h.virtualConfig?.userName||y,He=f.trim(),Je=Date.now()/1e3;V.send(JSON.stringify({type:"message",content:He,user_name:Ke}));const Es=fe.current.get(d)||new Set,ms=`user-${He}-${Math.floor(Je*1e3)}`;if(Es.add(ms),fe.current.set(d,Es),Es.size>100){const Cs=Es.values().next().value;Cs&&Es.delete(Cs)}const Ms={id:G("user"),type:"user",content:He,timestamp:Je,sender:{name:Ke,is_bot:!1}};A(d,Ms);const We={id:G("thinking"),type:"thinking",content:"",timestamp:Je+.001,sender:{name:h?.sessionInfo.bot_name||"麦麦",is_bot:!0}};A(d,We),p("")},[f,y,d,h,A]),Le=V=>{V.key==="Enter"&&!V.shiftKey&&(V.preventDefault(),Z())},le=()=>{F(y),M(!0)},De=()=>{const V=S.trim()||"WebUI用户";w(V),OC(V),M(!1);const Ke=B.current.get(d);Ke?.readyState===WebSocket.OPEN&&Ke.send(JSON.stringify({type:"update_nickname",user_name:V}))},xe=()=>{F(""),M(!1)},Me=V=>new Date(V*1e3).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}),ds=()=>{const V=B.current.get(d);V&&(V.close(),B.current.delete(d)),cs(d,h?.type||"webui",h?.virtualConfig)},Ts=()=>{D({platform:"",personId:"",userId:"",userName:"",groupName:"",groupId:""}),ge(""),Re(),C(!0)},Ct=()=>{if(!pe.platform||!pe.personId){Ee({title:"配置不完整",description:"请选择平台和用户",variant:"destructive"});return}const V=`webui_virtual_group_${pe.platform}_${pe.userId}`,Ke=`virtual-${pe.platform}-${pe.userId}-${Date.now()}`,He=pe.userName||pe.userId,Je={id:Ke,type:"virtual",label:He,virtualConfig:{...pe,groupId:V},messages:[],isConnected:!1,isTyping:!1,sessionInfo:{}};c(Es=>{const ms=[...Es,Je],Ms=ms.filter(We=>We.type==="virtual"&&We.virtualConfig).map(We=>({id:We.id,label:We.label,virtualConfig:We.virtualConfig,createdAt:Date.now()}));return nj(Ms),ms}),m(Ke),C(!1),fe.current.set(Ke,new Set),setTimeout(()=>{cs(Ke,"virtual",pe)},100),Ee({title:"虚拟身份标签页",description:`已创建 ${He} 的对话`})},ia=(V,Ke)=>{if(Ke?.stopPropagation(),V==="webui-default")return;const He=B.current.get(V);He&&(He.close(),B.current.delete(V));const Je=Y.current.get(V);Je&&(clearTimeout(Je),Y.current.delete(V)),fe.current.delete(V),c(Es=>{const ms=Es.filter(We=>We.id!==V),Ms=ms.filter(We=>We.type==="virtual"&&We.virtualConfig).map(We=>({id:We.id,label:We.label,virtualConfig:We.virtualConfig,createdAt:Date.now()}));return nj(Ms),ms}),d===V&&m("webui-default")},ut=V=>{m(V)},Is=V=>{D(Ke=>({...Ke,personId:V.person_id,userId:V.user_id,userName:V.nickname||V.person_name}))};return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(Qs,{open:E,onOpenChange:C,children:e.jsxs(Hs,{className:"sm:max-w-[500px] max-h-[85vh] overflow-hidden flex flex-col",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Am,{className:"h-5 w-5"}),"新建虚拟身份对话"]}),e.jsx(at,{children:"选择一个麦麦已认识的用户,以该用户的身份与麦麦对话。麦麦将使用她对该用户的记忆和认知来回应。"})]}),e.jsxs("div",{className:"space-y-4 flex-1 overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{className:"flex items-center gap-2",children:[e.jsx(Go,{className:"h-4 w-4"}),"选择平台"]}),e.jsxs(Pe,{value:pe.platform,onValueChange:V=>{D(Ke=>({...Ke,platform:V,personId:"",userId:"",userName:""})),X([])},children:[e.jsx(Be,{disabled:L,children:e.jsx(Fe,{placeholder:L?"加载中...":"选择平台"})}),e.jsx(Ie,{children:R.map(V=>e.jsxs(W,{value:V.platform,children:[V.platform," (",V.count," 人)"]},V.platform))})]})]}),pe.platform&&e.jsxs("div",{className:"space-y-2 flex-1 overflow-hidden flex flex-col",children:[e.jsxs(T,{className:"flex items-center gap-2",children:[e.jsx(oc,{className:"h-4 w-4"}),"选择用户"]}),e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ne,{placeholder:"搜索用户名...",value:ce,onChange:V=>ge(V.target.value),className:"pl-9"})]}),e.jsx(ts,{className:"h-[250px] border rounded-md",children:e.jsx("div",{className:"p-2",children:Ne?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Fs,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):O.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[e.jsx(oc,{className:"h-8 w-8 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"没有找到用户"})]}):e.jsx("div",{className:"space-y-1",children:O.map(V=>e.jsxs("button",{onClick:()=>Is(V),className:P("w-full flex items-center gap-3 p-2 rounded-md text-left transition-colors",pe.personId===V.person_id?"bg-primary text-primary-foreground":"hover:bg-muted"),children:[e.jsx(ec,{className:"h-8 w-8 shrink-0",children:e.jsx(sc,{className:P("text-xs",pe.personId===V.person_id?"bg-primary-foreground/20":"bg-muted"),children:(V.nickname||V.person_name||"?").charAt(0)})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-medium truncate",children:V.nickname||V.person_name}),e.jsxs("div",{className:P("text-xs truncate",pe.personId===V.person_id?"text-primary-foreground/70":"text-muted-foreground"),children:["ID: ",V.user_id,V.is_known&&" · 已认识"]})]})]},V.person_id))})})})]}),pe.personId&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"虚拟群名(可选)"}),e.jsx(ne,{placeholder:"WebUI虚拟群聊",value:pe.groupName,onChange:V=>D(Ke=>({...Ke,groupName:V.target.value}))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦会认为这是一个名为此名称的群聊"})]})]}),e.jsxs(gt,{className:"gap-2 sm:gap-0",children:[e.jsx(_,{variant:"outline",onClick:()=>C(!1),children:"取消"}),e.jsx(_,{onClick:Ct,disabled:!pe.platform||!pe.personId,children:"创建对话"})]})]})}),e.jsx("div",{className:"shrink-0 border-b bg-muted/30",children:e.jsx("div",{className:"max-w-4xl mx-auto px-2 sm:px-4",children:e.jsxs("div",{className:"flex items-center gap-1 overflow-x-auto py-1.5 scrollbar-thin",children:[r.map(V=>e.jsxs("div",{className:P("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm whitespace-nowrap transition-colors cursor-pointer","hover:bg-muted",d===V.id?"bg-background shadow-sm border":"text-muted-foreground"),onClick:()=>ut(V.id),children:[V.type==="webui"?e.jsx(Ia,{className:"h-3.5 w-3.5"}):e.jsx(Am,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"max-w-[100px] truncate",children:V.label}),e.jsx("span",{className:P("w-1.5 h-1.5 rounded-full",V.isConnected?"bg-green-500":"bg-muted-foreground/50")}),V.id!=="webui-default"&&e.jsx("span",{onClick:Ke=>ia(V.id,Ke),className:"ml-0.5 p-0.5 rounded hover:bg-muted-foreground/20 cursor-pointer",role:"button",tabIndex:0,onKeyDown:Ke=>{(Ke.key==="Enter"||Ke.key===" ")&&(Ke.preventDefault(),ia(V.id,Ke))},children:e.jsx(Sa,{className:"h-3 w-3"})})]},V.id)),e.jsx("button",{onClick:Ts,className:"flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"新建虚拟身份对话",children:e.jsx(Xs,{className:"h-3.5 w-3.5"})})]})})}),e.jsx("div",{className:"shrink-0 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:e.jsxs("div",{className:"p-3 sm:p-4 max-w-4xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0",children:[e.jsx(ec,{className:"h-8 w-8 sm:h-10 sm:w-10 shrink-0",children:e.jsx(sc,{className:"bg-primary/10 text-primary",children:e.jsx(Yn,{className:"h-4 w-4 sm:h-5 sm:w-5"})})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-base sm:text-lg font-semibold truncate",children:h?.sessionInfo.bot_name||"麦麦"}),e.jsx("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:h?.isConnected?e.jsxs(e.Fragment,{children:[e.jsx(Y1,{className:"h-3 w-3 text-green-500"}),e.jsx("span",{className:"text-green-600 dark:text-green-400",children:"已连接"})]}):g?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-3 w-3 animate-spin"}),e.jsx("span",{children:"连接中..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(J1,{className:"h-3 w-3 text-red-500"}),e.jsx("span",{className:"text-red-600 dark:text-red-400",children:"未连接"})]})})]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j&&e.jsx(Fs,{className:"h-4 w-4 animate-spin text-muted-foreground"}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:ds,disabled:g,title:"重新连接",children:e.jsx(dt,{className:P("h-4 w-4",g&&"animate-spin")})})]})]}),e.jsx("div",{className:"hidden sm:flex items-center gap-2 mt-2 text-sm text-muted-foreground",children:h?.type==="virtual"&&h.virtualConfig?e.jsxs(e.Fragment,{children:[e.jsx(Am,{className:"h-3 w-3 text-primary"}),e.jsx("span",{children:"虚拟身份:"}),e.jsx("span",{className:"font-medium text-primary",children:h.virtualConfig.userName}),e.jsxs("span",{className:"text-xs",children:["(",h.virtualConfig.platform,")"]}),h.virtualConfig.groupName&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-1",children:"·"}),e.jsxs("span",{className:"text-xs",children:["群:",h.virtualConfig.groupName]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Fl,{className:"h-3 w-3"}),e.jsx("span",{children:"当前身份:"}),z?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{value:S,onChange:V=>F(V.target.value),onKeyDown:V=>{V.key==="Enter"&&De(),V.key==="Escape"&&xe()},className:"h-7 w-32",placeholder:"输入昵称",autoFocus:!0}),e.jsx(_,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:De,children:"保存"}),e.jsx(_,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:xe,children:"取消"})]}):e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium text-foreground",children:y}),e.jsx(_,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0",onClick:le,title:"修改昵称",children:e.jsx(X1,{className:"h-3 w-3"})})]})]})})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"p-3 sm:p-4 max-w-4xl mx-auto space-y-3 sm:space-y-4",children:[h?.messages.length===0&&!j&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(Yn,{className:"h-12 w-12 mb-4 opacity-50"}),e.jsxs("p",{className:"text-sm",children:["开始与 ",h?.sessionInfo.bot_name||"麦麦"," 对话吧!"]})]}),h?.messages.map(V=>e.jsxs("div",{className:P("flex gap-2 sm:gap-3",V.type==="user"&&"flex-row-reverse",V.type==="system"&&"justify-center",V.type==="error"&&"justify-center"),children:[V.type==="system"&&e.jsx("div",{className:"text-xs text-muted-foreground bg-muted/50 px-3 py-1 rounded-full max-w-[90%]",children:V.content}),V.type==="error"&&e.jsx("div",{className:"text-xs text-red-600 dark:text-red-400 bg-red-100 dark:bg-red-900/30 px-3 py-1 rounded-full max-w-[90%]",children:V.content}),V.type==="thinking"&&e.jsxs(e.Fragment,{children:[e.jsx(ec,{className:"h-7 w-7 sm:h-8 sm:w-8 shrink-0",children:e.jsx(sc,{className:"bg-primary/10 text-primary",children:e.jsx(Yn,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"})})}),e.jsxs("div",{className:"flex flex-col gap-1 max-w-[75%] sm:max-w-[70%]",children:[e.jsx("div",{className:"flex items-center gap-2 text-[10px] sm:text-xs text-muted-foreground",children:e.jsx("span",{className:"hidden sm:inline",children:V.sender?.name||h?.sessionInfo.bot_name})}),e.jsx("div",{className:"bg-muted rounded-2xl rounded-tl-sm px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex gap-1",children:[e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),e.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"思考中..."})]})})]})]}),(V.type==="user"||V.type==="bot")&&e.jsxs(e.Fragment,{children:[e.jsx(ec,{className:"h-7 w-7 sm:h-8 sm:w-8 shrink-0",children:e.jsx(sc,{className:P("text-xs",V.type==="bot"?"bg-primary/10 text-primary":"bg-secondary text-secondary-foreground"),children:V.type==="bot"?e.jsx(Yn,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}):e.jsx(Fl,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"})})}),e.jsxs("div",{className:P("flex flex-col gap-1 max-w-[75%] sm:max-w-[70%]",V.type==="user"&&"items-end"),children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] sm:text-xs text-muted-foreground",children:[e.jsx("span",{className:"hidden sm:inline",children:V.sender?.name||(V.type==="bot"?h?.sessionInfo.bot_name:y)}),e.jsx("span",{children:Me(V.timestamp)})]}),e.jsx("div",{className:P("rounded-2xl px-3 py-2 text-sm break-words",V.type==="bot"?"bg-muted rounded-tl-sm":"bg-primary text-primary-foreground rounded-tr-sm"),children:e.jsx($C,{message:V,isBot:V.type==="bot"})})]})]})]},V.id)),e.jsx("div",{ref:ue})]})})}),e.jsx("div",{className:"shrink-0 border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:e.jsx("div",{className:"p-3 sm:p-4 max-w-4xl mx-auto",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ne,{value:f,onChange:V=>p(V.target.value),onKeyDown:Le,placeholder:h?.isConnected?"输入消息...":"等待连接...",disabled:!h?.isConnected,className:"flex-1 h-10 sm:h-10"}),e.jsx(_,{onClick:Z,disabled:!h?.isConnected||!f.trim(),size:"icon",className:"h-10 w-10 shrink-0",children:e.jsx(Z1,{className:"h-4 w-4"})})]})})})]})}var zx="Radio",[IC,_N]=ld(zx),[PC,FC]=IC(zx),SN=u.forwardRef((a,l)=>{const{__scopeRadio:r,name:c,checked:d=!1,required:m,disabled:h,value:f="on",onCheck:p,form:g,...N}=a,[j,b]=u.useState(null),y=nd(l,M=>b(M)),w=u.useRef(!1),z=j?g||!!j.closest("form"):!0;return e.jsxs(PC,{scope:r,checked:d,disabled:h,children:[e.jsx(ar.button,{type:"button",role:"radio","aria-checked":d,"data-state":EN(d),"data-disabled":h?"":void 0,disabled:h,value:f,...N,ref:y,onClick:_n(a.onClick,M=>{d||p?.(),z&&(w.current=M.isPropagationStopped(),w.current||M.stopPropagation())})}),z&&e.jsx(TN,{control:j,bubbles:!w.current,name:c,value:f,checked:d,required:m,disabled:h,form:g,style:{transform:"translateX(-100%)"}})]})});SN.displayName=zx;var kN="RadioIndicator",CN=u.forwardRef((a,l)=>{const{__scopeRadio:r,forceMount:c,...d}=a,m=FC(kN,r);return e.jsx(b1,{present:c||m.checked,children:e.jsx(ar.span,{"data-state":EN(m.checked),"data-disabled":m.disabled?"":void 0,...d,ref:l})})});CN.displayName=kN;var HC="RadioBubbleInput",TN=u.forwardRef(({__scopeRadio:a,control:l,checked:r,bubbles:c=!0,...d},m)=>{const h=u.useRef(null),f=nd(h,m),p=y1(r),g=w1(l);return u.useEffect(()=>{const N=h.current;if(!N)return;const j=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(j,"checked").set;if(p!==r&&y){const w=new Event("click",{bubbles:c});y.call(N,r),N.dispatchEvent(w)}},[p,r,c]),e.jsx(ar.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...d,tabIndex:-1,ref:f,style:{...d.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});TN.displayName=HC;function EN(a){return a?"checked":"unchecked"}var qC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],gd="RadioGroup",[VC]=ld(gd,[Dj,_N]),MN=Dj(),AN=_N(),[GC,KC]=VC(gd),zN=u.forwardRef((a,l)=>{const{__scopeRadioGroup:r,name:c,defaultValue:d,value:m,required:h=!1,disabled:f=!1,orientation:p,dir:g,loop:N=!0,onValueChange:j,...b}=a,y=MN(r),w=Wj(g),[z,M]=ad({prop:m,defaultProp:d??null,onChange:j,caller:gd});return e.jsx(GC,{scope:r,name:c,required:h,disabled:f,value:z,onValueChange:M,children:e.jsx(Rw,{asChild:!0,...y,orientation:p,dir:w,loop:N,children:e.jsx(ar.div,{role:"radiogroup","aria-required":h,"aria-orientation":p,"data-disabled":f?"":void 0,dir:w,...b,ref:l})})})});zN.displayName=gd;var RN="RadioGroupItem",DN=u.forwardRef((a,l)=>{const{__scopeRadioGroup:r,disabled:c,...d}=a,m=KC(RN,r),h=m.disabled||c,f=MN(r),p=AN(r),g=u.useRef(null),N=nd(l,g),j=m.value===d.value,b=u.useRef(!1);return u.useEffect(()=>{const y=z=>{qC.includes(z.key)&&(b.current=!0)},w=()=>b.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",w)}},[]),e.jsx(Dw,{asChild:!0,...f,focusable:!h,active:j,children:e.jsx(SN,{disabled:h,required:m.required,checked:j,...p,...d,name:m.name,ref:N,onCheck:()=>m.onValueChange(d.value),onKeyDown:_n(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:_n(d.onFocus,()=>{b.current&&g.current?.click()})})})});DN.displayName=RN;var QC="RadioGroupIndicator",ON=u.forwardRef((a,l)=>{const{__scopeRadioGroup:r,...c}=a,d=AN(r);return e.jsx(CN,{...d,...c,ref:l})});ON.displayName=QC;var LN=zN,UN=DN,YC=ON;const Rx=u.forwardRef(({className:a,...l},r)=>e.jsx(LN,{className:P("grid gap-2",a),...l,ref:r}));Rx.displayName=LN.displayName;const Wo=u.forwardRef(({className:a,...l},r)=>e.jsx(UN,{ref:r,className:P("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...l,children:e.jsx(YC,{className:"flex items-center justify-center",children:e.jsx(Vo,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Wo.displayName=UN.displayName;function JC({question:a,value:l,onChange:r,error:c,disabled:d=!1}){const[m,h]=u.useState(null),f=d||a.readOnly,p=()=>{switch(a.type){case"single":return e.jsx(Rx,{value:l||"",onValueChange:r,disabled:f,className:"space-y-2",children:a.options?.map(g=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wo,{value:g.value,id:`${a.id}-${g.id}`}),e.jsx(T,{htmlFor:`${a.id}-${g.id}`,className:"cursor-pointer font-normal",children:g.label})]},g.id))});case"multiple":{const g=l||[];return e.jsxs("div",{className:"space-y-2",children:[a.options?.map(N=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:`${a.id}-${N.id}`,checked:g.includes(N.value),disabled:f||a.maxSelections!==void 0&&g.length>=a.maxSelections&&!g.includes(N.value),onCheckedChange:j=>{r(j?[...g,N.value]:g.filter(b=>b!==N.value))}}),e.jsx(T,{htmlFor:`${a.id}-${N.id}`,className:"cursor-pointer font-normal",children:N.label})]},N.id)),a.maxSelections&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["最多选择 ",a.maxSelections," 项"]})]})}case"text":return e.jsx(ne,{value:l||"",onChange:g=>r(g.target.value),placeholder:a.placeholder||"请输入...",disabled:f,readOnly:a.readOnly,maxLength:a.maxLength,className:P(a.readOnly&&"bg-muted cursor-not-allowed")});case"textarea":return e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{value:l||"",onChange:g=>r(g.target.value),placeholder:a.placeholder||"请输入...",disabled:f,readOnly:a.readOnly,maxLength:a.maxLength,rows:4,className:P(a.readOnly&&"bg-muted cursor-not-allowed")}),a.maxLength&&e.jsxs("p",{className:"text-xs text-muted-foreground text-right",children:[(l||"").length," / ",a.maxLength]})]});case"rating":{const g=l||0,N=m!==null?m:g;return e.jsxs("div",{className:"flex items-center gap-1",children:[[1,2,3,4,5].map(j=>e.jsx("button",{type:"button",disabled:f,className:P("p-1 transition-colors focus:outline-none focus:ring-2 focus:ring-ring rounded",f&&"cursor-not-allowed opacity-50"),onMouseEnter:()=>!f&&h(j),onMouseLeave:()=>h(null),onClick:()=>!f&&r(j),children:e.jsx(vn,{className:P("h-6 w-6 transition-colors",j<=N?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})},j)),g>0&&e.jsxs("span",{className:"ml-2 text-sm text-muted-foreground",children:[g," / 5"]})]})}case"scale":{const g=a.min??1,N=a.max??10,j=a.step??1,b=l??g;return e.jsxs("div",{className:"space-y-4",children:[e.jsx(el,{value:[b],onValueChange:([y])=>r(y),min:g,max:N,step:j,disabled:f}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:a.minLabel||g}),e.jsx("span",{className:"font-medium text-foreground",children:b}),e.jsx("span",{children:a.maxLabel||N})]})]})}case"dropdown":return e.jsxs(Pe,{value:l||"",onValueChange:r,disabled:f,children:[e.jsx(Be,{children:e.jsx(Fe,{placeholder:a.placeholder||"请选择..."})}),e.jsx(Ie,{children:a.options?.map(g=>e.jsx(W,{value:g.value,children:g.label},g.id))})]});default:return e.jsx("div",{className:"text-muted-foreground",children:"不支持的问题类型"})}};return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(T,{className:"text-base font-medium",children:[a.title,a.required&&e.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),a.description&&e.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]}),p(),c&&e.jsx("p",{className:"text-sm text-destructive",children:c})]})}const $N="https://maibot-plugin-stats.maibot-webui.workers.dev";function BN(){const a="maibot_user_id";let l=localStorage.getItem(a);if(!l){const r=Math.random().toString(36).substring(2,10),c=Date.now().toString(36),d=Math.random().toString(36).substring(2,10);l=`fp_${r}_${c}_${d}`,localStorage.setItem(a,l)}return l}async function XC(a,l,r,c){try{const d=c?.userId||BN(),m={surveyId:a,surveyVersion:l,userId:d,answers:r,submittedAt:new Date().toISOString(),allowMultiple:c?.allowMultiple,metadata:{userAgent:navigator.userAgent,language:navigator.language}},h=await fetch(`${$N}/survey/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)}),f=await h.json();return h.status===429?{success:!1,error:"提交过于频繁,请稍后再试"}:h.status===409?{success:!1,error:f.error||"你已经提交过这份问卷了"}:h.ok?{success:!0,submissionId:f.submissionId,message:f.message}:{success:!1,error:f.error||"提交失败"}}catch(d){return console.error("Error submitting survey:",d),{success:!1,error:"网络错误"}}}async function ZC(a,l){try{const r=l||BN(),c=new URLSearchParams({user_id:r,survey_id:a}),d=await fetch(`${$N}/survey/check?${c}`);return d.ok?{success:!0,hasSubmitted:(await d.json()).hasSubmitted}:{success:!1,error:(await d.json()).error||"检查失败"}}catch(r){return console.error("Error checking submission:",r),{success:!1,error:"网络错误"}}}function IN({config:a,initialAnswers:l,onSubmitSuccess:r,onSubmitError:c,showProgress:d=!0,paginateQuestions:m=!1,className:h}){const f=u.useCallback(()=>!l||l.length===0?{}:l.reduce((B,ue)=>(B[ue.questionId]=ue.value,B),{}),[l]),[p,g]=u.useState(()=>f()),[N,j]=u.useState({}),[b,y]=u.useState(0),[w,z]=u.useState(!1),[M,S]=u.useState(!1),[F,E]=u.useState(null),[C,R]=u.useState(null),[H,O]=u.useState(!1),[X,L]=u.useState(!0);u.useEffect(()=>{l&&l.length>0&&g(B=>({...B,...f()}))},[l,f]),u.useEffect(()=>{(async()=>{if(!a.settings?.allowMultiple){const ue=await ZC(a.id);ue.success&&ue.hasSubmitted&&O(!0)}L(!1)})()},[a.id,a.settings?.allowMultiple]);const me=u.useCallback(()=>{const B=new Date;return!(a.settings?.startTime&&new Date(a.settings.startTime)>B||a.settings?.endTime&&new Date(a.settings.endTime){const ue=p[B.id];return ue==null?!1:Array.isArray(ue)?ue.length>0:typeof ue=="string"?ue.trim()!=="":!0}).length,je=Ne/a.questions.length*100,ce=u.useCallback((B,ue)=>{g(Y=>({...Y,[B]:ue})),j(Y=>{const we={...Y};return delete we[B],we})},[]),ge=u.useCallback(()=>{const B={};for(const ue of a.questions){if(ue.required){const Y=p[ue.id];if(Y==null){B[ue.id]="此题为必填项";continue}if(Array.isArray(Y)&&Y.length===0){B[ue.id]="请至少选择一项";continue}if(typeof Y=="string"&&Y.trim()===""){B[ue.id]="此题为必填项";continue}}ue.minLength&&typeof p[ue.id]=="string"&&p[ue.id].length{if(!ge()){if(m){const B=a.questions.findIndex(ue=>N[ue.id]);B>=0&&y(B)}return}z(!0),E(null);try{const B=a.questions.filter(Y=>p[Y.id]!==void 0).map(Y=>({questionId:Y.id,value:p[Y.id]})),ue=await XC(a.id,a.version,B,{allowMultiple:a.settings?.allowMultiple});if(ue.success&&ue.submissionId)S(!0),R(ue.submissionId),r?.(ue.submissionId);else{const Y=ue.error||"提交失败";E(Y),c?.(Y)}}catch(B){const ue=B instanceof Error?B.message:"提交失败";E(ue),c?.(ue)}finally{z(!1)}},[ge,m,a,p,N,r,c]),D=u.useCallback(B=>{B>=0&&Be.jsxs("div",{className:P("p-4 rounded-lg border bg-card",N[B.id]?"border-destructive bg-destructive/5":"border-border"),children:[m&&e.jsxs("div",{className:"text-xs text-muted-foreground mb-2",children:["问题 ",b+1," / ",a.questions.length]}),!m&&e.jsxs("div",{className:"text-xs text-muted-foreground mb-2",children:[ue+1,"."]}),e.jsx(JC,{question:B,value:p[B.id],onChange:Y=>ce(B.id,Y),error:N[B.id],disabled:w})]},B.id)),F&&e.jsxs(ht,{variant:"destructive",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx(ft,{children:F})]}),e.jsx("div",{className:"flex justify-between items-center py-4",children:m?e.jsxs(e.Fragment,{children:[e.jsxs(_,{variant:"outline",onClick:()=>D(b-1),disabled:b===0||w,children:[e.jsx(Pa,{className:"h-4 w-4 mr-1"}),"上一题"]}),b===a.questions.length-1?e.jsxs(_,{onClick:pe,disabled:w,children:[w&&e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"提交问卷"]}):e.jsxs(_,{onClick:()=>D(b+1),disabled:w,children:["下一题",e.jsx(ra,{className:"h-4 w-4 ml-1"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:Object.keys(N).length>0&&e.jsxs("span",{className:"text-destructive",children:["还有 ",Object.keys(N).length," 个必填项未完成"]})}),e.jsxs(_,{onClick:pe,disabled:w,size:"lg",children:[w&&e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"提交问卷"]})]})})]})})]})}const WC={id:"webui-feedback-v1",version:"1.0.0",title:"麦麦 WebUI 使用反馈问卷",description:"感谢您使用麦麦 WebUI!您的反馈将帮助我们不断改进产品体验。",questions:[{id:"webui_version",type:"text",title:"你正在使用的 WebUI 版本",description:"此项由系统自动填写",required:!0,readOnly:!0,placeholder:"自动检测中..."},{id:"ui_design_satisfaction",type:"single",title:"你觉得当前的 WebUI 界面设计如何?",required:!0,options:[{id:"very_satisfied",label:"非常满意",value:"very_satisfied"},{id:"satisfied",label:"满意",value:"satisfied"},{id:"neutral",label:"一般",value:"neutral"},{id:"dissatisfied",label:"不满意",value:"dissatisfied"},{id:"very_dissatisfied",label:"非常不满意",value:"very_dissatisfied"}]},{id:"problems_encountered",type:"multiple",title:"你在使用 WebUI 时遇到过哪些问题?",description:"可多选",required:!0,options:[{id:"lag",label:"界面卡顿",value:"lag"},{id:"incomplete",label:"功能不完整",value:"incomplete"},{id:"complex",label:"操作复杂",value:"complex"},{id:"bugs",label:"存在 Bug",value:"bugs"},{id:"none",label:"没有遇到问题",value:"none"},{id:"other",label:"其他",value:"other"}]},{id:"problems_other",type:"text",title:'如选择"其他",请说明遇到的问题',required:!1,placeholder:"请描述你遇到的其他问题...",maxLength:500},{id:"useful_features",type:"textarea",title:"你觉得哪些功能是最有用的?",required:!0,placeholder:"请分享你认为最有价值的功能...",maxLength:1e3},{id:"feature_requests",type:"textarea",title:"你希望在未来的版本中增加哪些功能?",required:!0,placeholder:"请告诉我们你期望的新功能...",maxLength:1e3},{id:"overall_satisfaction",type:"single",title:"你对麦麦 WebUI 的整体满意度如何?",required:!0,options:[{id:"very_satisfied",label:"非常满意",value:"very_satisfied"},{id:"satisfied",label:"满意",value:"satisfied"},{id:"neutral",label:"一般",value:"neutral"},{id:"dissatisfied",label:"不满意",value:"dissatisfied"},{id:"very_dissatisfied",label:"非常不满意",value:"very_dissatisfied"}]},{id:"would_recommend",type:"single",title:"你愿意推荐麦麦 WebUI 给其他人使用吗?",required:!0,options:[{id:"yes",label:"是",value:"yes"},{id:"no",label:"否",value:"no"}]},{id:"other_suggestions",type:"textarea",title:"其他建议或意见",description:"此项为选填",required:!1,placeholder:"如果你有任何其他想法或建议,请在此分享...",maxLength:2e3}],settings:{allowMultiple:!1,thankYouMessage:"感谢你的反馈!你的意见对我们非常重要,我们会认真考虑每一条建议。"}},e3={id:"maibot-feedback-v1",version:"1.0.0",title:"麦麦使用体验反馈问卷",description:"感谢您使用麦麦!您的反馈将帮助我们打造更好的 AI 伙伴。",questions:[{id:"maibot_version",type:"text",title:"你正在使用的麦麦版本",description:"此项由系统自动填写",required:!0,readOnly:!0,placeholder:"自动检测中..."},{id:"improvement_areas",type:"textarea",title:"你认为麦麦还有哪些部分可以改进?",required:!0,placeholder:"请分享你认为可以改进的方面...",maxLength:1e3},{id:"problems_encountered",type:"multiple",title:"你在使用麦麦时遇到过哪些问题?",description:"可多选",required:!0,options:[{id:"incomplete",label:"功能不完整",value:"incomplete"},{id:"slow_response",label:"响应速度慢",value:"slow_response"},{id:"complex",label:"操作复杂",value:"complex"},{id:"unstable",label:"运行不稳定",value:"unstable"},{id:"config_difficult",label:"配置困难",value:"config_difficult"},{id:"none",label:"没有遇到问题",value:"none"},{id:"other",label:"其他",value:"other"}]},{id:"problems_other",type:"text",title:'如选择"其他",请说明遇到的问题',required:!1,placeholder:"请描述你遇到的其他问题...",maxLength:500},{id:"helpful_features",type:"textarea",title:"你觉得麦麦的哪些功能对你最有帮助?",required:!0,placeholder:"请分享对你最有帮助的功能...",maxLength:1e3},{id:"feature_requests",type:"textarea",title:"你希望在未来的版本中增加哪些功能?",required:!0,placeholder:"请告诉我们你期望的新功能...",maxLength:1e3},{id:"overall_satisfaction",type:"single",title:"你对麦麦的整体满意度如何?",required:!0,options:[{id:"very_satisfied",label:"非常满意",value:"very_satisfied"},{id:"satisfied",label:"满意",value:"satisfied"},{id:"neutral",label:"一般",value:"neutral"},{id:"dissatisfied",label:"不满意",value:"dissatisfied"},{id:"very_dissatisfied",label:"非常不满意",value:"very_dissatisfied"}]},{id:"would_recommend",type:"single",title:"你愿意推荐麦麦给其他人使用吗?",required:!0,options:[{id:"yes",label:"是",value:"yes"},{id:"no",label:"否",value:"no"}]},{id:"other_suggestions",type:"textarea",title:"其他建议或意见",description:"此项为选填",required:!1,placeholder:"如果你有任何其他想法或建议,请在此分享...",maxLength:2e3}],settings:{allowMultiple:!1,thankYouMessage:"感谢你的反馈!你的意见对麦麦的成长非常重要,我们会认真考虑每一条建议。"}};function s3(){const[a,l]=u.useState(!0),r=u.useMemo(()=>JSON.parse(JSON.stringify(WC)),[]);u.useEffect(()=>{l(!1)},[]);const c=u.useMemo(()=>[{questionId:"webui_version",value:`v${ud}`}],[]),d=u.useCallback(h=>{console.log("WebUI Survey submitted:",h)},[]),m=u.useCallback(h=>{console.error("WebUI Survey submission error:",h)},[]);return a?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r?e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-4 sm:mb-6 shrink-0",children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(pv,{className:"h-8 w-8",strokeWidth:2}),"WebUI 使用反馈问卷"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"感谢您的反馈,帮助我们持续改进产品体验"})]}),e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(IN,{config:r,initialAnswers:c,showProgress:!0,paginateQuestions:!1,onSubmitSuccess:d,onSubmitError:m})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[e.jsxs(ht,{variant:"destructive",className:"max-w-md",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx(ft,{children:"无法加载问卷配置"})]}),e.jsx(_,{variant:"outline",onClick:()=>window.location.reload(),children:"重试"})]})}function t3(){const[a,l]=u.useState(null),[r,c]=u.useState(!0),[d,m]=u.useState("未知版本");u.useEffect(()=>{(async()=>{try{const j=await V_();m(j.version||"未知版本")}catch(j){console.error("Failed to get MaiBot version:",j),m("获取失败")}const N=JSON.parse(JSON.stringify(e3));l(N),c(!1)})()},[]);const h=u.useMemo(()=>[{questionId:"maibot_version",value:d}],[d]),f=u.useCallback(g=>{console.log("MaiBot Survey submitted:",g)},[]),p=u.useCallback(g=>{console.error("MaiBot Survey submission error:",g)},[]);return r?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):a?e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-4 sm:mb-6 shrink-0",children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(pv,{className:"h-8 w-8",strokeWidth:2}),"麦麦使用体验反馈问卷"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"感谢您的反馈,帮助我们打造更好的 AI 伙伴"})]}),e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(IN,{config:a,initialAnswers:h,showProgress:!0,paginateQuestions:!1,onSubmitSuccess:f,onSubmitError:p})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[e.jsxs(ht,{variant:"destructive",className:"max-w-md",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx(ft,{children:"无法加载问卷配置"})]}),e.jsx(_,{variant:"outline",onClick:()=>window.location.reload(),children:"重试"})]})}async function a3(a=2025){const l=await ke(`/api/webui/annual-report/full?year=${a}`);if(!l.ok){const r=await l.json();throw new Error(r.detail||"获取年度报告失败")}return l.json()}function l3(a,l){if(a.match(/^[a-z]+:\/\//i))return a;if(a.match(/^\/\//))return window.location.protocol+a;if(a.match(/^[a-z]+:/i))return a;const r=document.implementation.createHTMLDocument(),c=r.createElement("base"),d=r.createElement("a");return r.head.appendChild(c),r.body.appendChild(d),l&&(c.href=l),d.href=a,d.href}const n3=(()=>{let a=0;const l=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(a+=1,`u${l()}${a}`)})();function wn(a){const l=[];for(let r=0,c=a.length;rOa||a.height>Oa)&&(a.width>Oa&&a.height>Oa?a.width>a.height?(a.height*=Oa/a.width,a.width=Oa):(a.width*=Oa/a.height,a.height=Oa):a.width>Oa?(a.height*=Oa/a.width,a.width=Oa):(a.width*=Oa/a.height,a.height=Oa))}function sd(a){return new Promise((l,r)=>{const c=new Image;c.onload=()=>{c.decode().then(()=>{requestAnimationFrame(()=>l(c))})},c.onerror=r,c.crossOrigin="anonymous",c.decoding="async",c.src=a})}async function d3(a){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(a)).then(encodeURIComponent).then(l=>`data:image/svg+xml;charset=utf-8,${l}`)}async function u3(a,l,r){const c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg"),m=document.createElementNS(c,"foreignObject");return d.setAttribute("width",`${l}`),d.setAttribute("height",`${r}`),d.setAttribute("viewBox",`0 0 ${l} ${r}`),m.setAttribute("width","100%"),m.setAttribute("height","100%"),m.setAttribute("x","0"),m.setAttribute("y","0"),m.setAttribute("externalResourcesRequired","true"),d.appendChild(m),m.appendChild(a),d3(d)}const _a=(a,l)=>{if(a instanceof l)return!0;const r=Object.getPrototypeOf(a);return r===null?!1:r.constructor.name===l.name||_a(r,l)};function m3(a){const l=a.getPropertyValue("content");return`${a.cssText} content: '${l.replace(/'|"/g,"")}';`}function x3(a,l){return PN(l).map(r=>{const c=a.getPropertyValue(r),d=a.getPropertyPriority(r);return`${r}: ${c}${d?" !important":""};`}).join(" ")}function h3(a,l,r,c){const d=`.${a}:${l}`,m=r.cssText?m3(r):x3(r,c);return document.createTextNode(`${d}{${m}}`)}function rj(a,l,r,c){const d=window.getComputedStyle(a,r),m=d.getPropertyValue("content");if(m===""||m==="none")return;const h=n3();try{l.className=`${l.className} ${h}`}catch{return}const f=document.createElement("style");f.appendChild(h3(h,r,d,c)),l.appendChild(f)}function f3(a,l,r){rj(a,l,":before",r),rj(a,l,":after",r)}const ij="application/font-woff",cj="image/jpeg",p3={woff:ij,woff2:ij,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:cj,jpeg:cj,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function g3(a){const l=/\.([^./]*?)$/g.exec(a);return l?l[1]:""}function Dx(a){const l=g3(a).toLowerCase();return p3[l]||""}function j3(a){return a.split(/,/)[1]}function ax(a){return a.search(/^(data:)/)!==-1}function v3(a,l){return`data:${l};base64,${a}`}async function HN(a,l,r){const c=await fetch(a,l);if(c.status===404)throw new Error(`Resource "${c.url}" not found`);const d=await c.blob();return new Promise((m,h)=>{const f=new FileReader;f.onerror=h,f.onloadend=()=>{try{m(r({res:c,result:f.result}))}catch(p){h(p)}},f.readAsDataURL(d)})}const Km={};function N3(a,l,r){let c=a.replace(/\?.*/,"");return r&&(c=a),/ttf|otf|eot|woff2?/i.test(c)&&(c=c.replace(/.*\//,"")),l?`[${l}]${c}`:c}async function Ox(a,l,r){const c=N3(a,l,r.includeQueryParams);if(Km[c]!=null)return Km[c];r.cacheBust&&(a+=(/\?/.test(a)?"&":"?")+new Date().getTime());let d;try{const m=await HN(a,r.fetchRequestInit,({res:h,result:f})=>(l||(l=h.headers.get("Content-Type")||""),j3(f)));d=v3(m,l)}catch(m){d=r.imagePlaceholder||"";let h=`Failed to fetch resource: ${a}`;m&&(h=typeof m=="string"?m:m.message),h&&console.warn(h)}return Km[c]=d,d}async function b3(a){const l=a.toDataURL();return l==="data:,"?a.cloneNode(!1):sd(l)}async function y3(a,l){if(a.currentSrc){const m=document.createElement("canvas"),h=m.getContext("2d");m.width=a.clientWidth,m.height=a.clientHeight,h?.drawImage(a,0,0,m.width,m.height);const f=m.toDataURL();return sd(f)}const r=a.poster,c=Dx(r),d=await Ox(r,c,l);return sd(d)}async function w3(a,l){var r;try{if(!((r=a?.contentDocument)===null||r===void 0)&&r.body)return await jd(a.contentDocument.body,l,!0)}catch{}return a.cloneNode(!1)}async function _3(a,l){return _a(a,HTMLCanvasElement)?b3(a):_a(a,HTMLVideoElement)?y3(a,l):_a(a,HTMLIFrameElement)?w3(a,l):a.cloneNode(qN(a))}const S3=a=>a.tagName!=null&&a.tagName.toUpperCase()==="SLOT",qN=a=>a.tagName!=null&&a.tagName.toUpperCase()==="SVG";async function k3(a,l,r){var c,d;if(qN(l))return l;let m=[];return S3(a)&&a.assignedNodes?m=wn(a.assignedNodes()):_a(a,HTMLIFrameElement)&&(!((c=a.contentDocument)===null||c===void 0)&&c.body)?m=wn(a.contentDocument.body.childNodes):m=wn(((d=a.shadowRoot)!==null&&d!==void 0?d:a).childNodes),m.length===0||_a(a,HTMLVideoElement)||await m.reduce((h,f)=>h.then(()=>jd(f,r)).then(p=>{p&&l.appendChild(p)}),Promise.resolve()),l}function C3(a,l,r){const c=l.style;if(!c)return;const d=window.getComputedStyle(a);d.cssText?(c.cssText=d.cssText,c.transformOrigin=d.transformOrigin):PN(r).forEach(m=>{let h=d.getPropertyValue(m);m==="font-size"&&h.endsWith("px")&&(h=`${Math.floor(parseFloat(h.substring(0,h.length-2)))-.1}px`),_a(a,HTMLIFrameElement)&&m==="display"&&h==="inline"&&(h="block"),m==="d"&&l.getAttribute("d")&&(h=`path(${l.getAttribute("d")})`),c.setProperty(m,h,d.getPropertyPriority(m))})}function T3(a,l){_a(a,HTMLTextAreaElement)&&(l.innerHTML=a.value),_a(a,HTMLInputElement)&&l.setAttribute("value",a.value)}function E3(a,l){if(_a(a,HTMLSelectElement)){const c=Array.from(l.children).find(d=>a.value===d.getAttribute("value"));c&&c.setAttribute("selected","")}}function M3(a,l,r){return _a(l,Element)&&(C3(a,l,r),f3(a,l,r),T3(a,l),E3(a,l)),l}async function A3(a,l){const r=a.querySelectorAll?a.querySelectorAll("use"):[];if(r.length===0)return a;const c={};for(let m=0;m_3(c,l)).then(c=>k3(a,c,l)).then(c=>M3(a,c,l)).then(c=>A3(c,l))}const VN=/url\((['"]?)([^'"]+?)\1\)/g,z3=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,R3=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function D3(a){const l=a.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${l})(['"]?\\))`,"g")}function O3(a){const l=[];return a.replace(VN,(r,c,d)=>(l.push(d),r)),l.filter(r=>!ax(r))}async function L3(a,l,r,c,d){try{const m=r?l3(l,r):l,h=Dx(l);let f;return d||(f=await Ox(m,h,c)),a.replace(D3(l),`$1${f}$3`)}catch{}return a}function U3(a,{preferredFontFormat:l}){return l?a.replace(R3,r=>{for(;;){const[c,,d]=z3.exec(r)||[];if(!d)return"";if(d===l)return`src: ${c};`}}):a}function GN(a){return a.search(VN)!==-1}async function KN(a,l,r){if(!GN(a))return a;const c=U3(a,r);return O3(c).reduce((m,h)=>m.then(f=>L3(f,h,l,r)),Promise.resolve(c))}async function Vr(a,l,r){var c;const d=(c=l.style)===null||c===void 0?void 0:c.getPropertyValue(a);if(d){const m=await KN(d,null,r);return l.style.setProperty(a,m,l.style.getPropertyPriority(a)),!0}return!1}async function $3(a,l){await Vr("background",a,l)||await Vr("background-image",a,l),await Vr("mask",a,l)||await Vr("-webkit-mask",a,l)||await Vr("mask-image",a,l)||await Vr("-webkit-mask-image",a,l)}async function B3(a,l){const r=_a(a,HTMLImageElement);if(!(r&&!ax(a.src))&&!(_a(a,SVGImageElement)&&!ax(a.href.baseVal)))return;const c=r?a.src:a.href.baseVal,d=await Ox(c,Dx(c),l);await new Promise((m,h)=>{a.onload=m,a.onerror=l.onImageErrorHandler?(...p)=>{try{m(l.onImageErrorHandler(...p))}catch(g){h(g)}}:h;const f=a;f.decode&&(f.decode=m),f.loading==="lazy"&&(f.loading="eager"),r?(a.srcset="",a.src=d):a.href.baseVal=d})}async function I3(a,l){const c=wn(a.childNodes).map(d=>QN(d,l));await Promise.all(c).then(()=>a)}async function QN(a,l){_a(a,Element)&&(await $3(a,l),await B3(a,l),await I3(a,l))}function P3(a,l){const{style:r}=a;l.backgroundColor&&(r.backgroundColor=l.backgroundColor),l.width&&(r.width=`${l.width}px`),l.height&&(r.height=`${l.height}px`);const c=l.style;return c!=null&&Object.keys(c).forEach(d=>{r[d]=c[d]}),a}const oj={};async function dj(a){let l=oj[a];if(l!=null)return l;const c=await(await fetch(a)).text();return l={url:a,cssText:c},oj[a]=l,l}async function uj(a,l){let r=a.cssText;const c=/url\(["']?([^"')]+)["']?\)/g,m=(r.match(/url\([^)]+\)/g)||[]).map(async h=>{let f=h.replace(c,"$1");return f.startsWith("https://")||(f=new URL(f,a.url).href),HN(f,l.fetchRequestInit,({result:p})=>(r=r.replace(h,`url(${p})`),[h,p]))});return Promise.all(m).then(()=>r)}function mj(a){if(a==null)return[];const l=[],r=/(\/\*[\s\S]*?\*\/)/gi;let c=a.replace(r,"");const d=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const p=d.exec(c);if(p===null)break;l.push(p[0])}c=c.replace(d,"");const m=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,h="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",f=new RegExp(h,"gi");for(;;){let p=m.exec(c);if(p===null){if(p=f.exec(c),p===null)break;m.lastIndex=f.lastIndex}else f.lastIndex=m.lastIndex;l.push(p[0])}return l}async function F3(a,l){const r=[],c=[];return a.forEach(d=>{if("cssRules"in d)try{wn(d.cssRules||[]).forEach((m,h)=>{if(m.type===CSSRule.IMPORT_RULE){let f=h+1;const p=m.href,g=dj(p).then(N=>uj(N,l)).then(N=>mj(N).forEach(j=>{try{d.insertRule(j,j.startsWith("@import")?f+=1:d.cssRules.length)}catch(b){console.error("Error inserting rule from remote css",{rule:j,error:b})}})).catch(N=>{console.error("Error loading remote css",N.toString())});c.push(g)}})}catch(m){const h=a.find(f=>f.href==null)||document.styleSheets[0];d.href!=null&&c.push(dj(d.href).then(f=>uj(f,l)).then(f=>mj(f).forEach(p=>{h.insertRule(p,h.cssRules.length)})).catch(f=>{console.error("Error loading remote stylesheet",f)})),console.error("Error inlining remote css file",m)}}),Promise.all(c).then(()=>(a.forEach(d=>{if("cssRules"in d)try{wn(d.cssRules||[]).forEach(m=>{r.push(m)})}catch(m){console.error(`Error while reading CSS rules from ${d.href}`,m)}}),r))}function H3(a){return a.filter(l=>l.type===CSSRule.FONT_FACE_RULE).filter(l=>GN(l.style.getPropertyValue("src")))}async function q3(a,l){if(a.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=wn(a.ownerDocument.styleSheets),c=await F3(r,l);return H3(c)}function YN(a){return a.trim().replace(/["']/g,"")}function V3(a){const l=new Set;function r(c){(c.style.fontFamily||getComputedStyle(c).fontFamily).split(",").forEach(m=>{l.add(YN(m))}),Array.from(c.children).forEach(m=>{m instanceof HTMLElement&&r(m)})}return r(a),l}async function G3(a,l){const r=await q3(a,l),c=V3(a);return(await Promise.all(r.filter(m=>c.has(YN(m.style.fontFamily))).map(m=>{const h=m.parentStyleSheet?m.parentStyleSheet.href:null;return KN(m.cssText,h,l)}))).join(` -`)}async function K3(a,l){const r=l.fontEmbedCSS!=null?l.fontEmbedCSS:l.skipFonts?null:await G3(a,l);if(r){const c=document.createElement("style"),d=document.createTextNode(r);c.appendChild(d),a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)}}async function Q3(a,l={}){const{width:r,height:c}=FN(a,l),d=await jd(a,l,!0);return await K3(d,l),await QN(d,l),P3(d,l),await u3(d,r,c)}async function Y3(a,l={}){const{width:r,height:c}=FN(a,l),d=await Q3(a,l),m=await sd(d),h=document.createElement("canvas"),f=h.getContext("2d"),p=l.pixelRatio||c3(),g=l.canvasWidth||r,N=l.canvasHeight||c;return h.width=g*p,h.height=N*p,l.skipAutoScale||o3(h),h.style.width=`${g}`,h.style.height=`${N}`,l.backgroundColor&&(f.fillStyle=l.backgroundColor,f.fillRect(0,0,h.width,h.height)),f.drawImage(m,0,0,h.width,h.height),h}async function J3(a,l={}){return(await Y3(a,l)).toDataURL()}const $o=["#0088FE","#00C49F","#FFBB28","#FF8042","#8884d8","#82ca9d"];function X3(a){return a>=8760?"相当于全年无休,7x24小时在线!":a>=5e3?"相当于一位全职员工的年工作时长":a>=2e3?"相当于看完了 1000 部电影":a>=1e3?"相当于环球飞行 80 次":a>=500?"相当于读完了 100 本书":a>=100?"相当于马拉松跑了 25 次":"虽然不多,但每一刻都很珍贵"}function Z3(a){return a>=1e3?"夜深人静时的知心好友":a>=500?"午夜场的常客":a>=100?"偶尔熬夜的小伙伴":a>=50?"深夜有时也会陪你聊聊":"早睡早起,健康作息"}function W3(a){const l=a/1e6;return l>=100?"思考量堪比一座图书馆":l>=50?"相当于写了一部百科全书":l>=10?"脑细胞估计消耗了不少":l>=1?"也算是费了一番脑筋":"轻轻松松,游刃有余"}function e5(a){return a>=1e3?"这钱够吃一年的泡面了":a>=500?"相当于买了一台游戏机":a>=100?"够请大家喝几杯奶茶":a>=50?"一顿火锅的钱":a>=10?"几杯咖啡的价格":"省钱小能手"}function s5(a){return a>=80?"沉默是金,惜字如金":a>=60?"话不多但句句到位":a>=40?"该说的时候才开口":a>=20?"能聊的都聊了":"话痨本痨,有问必答"}function t5(a){return a>=1e4?"眼睛都快看花了":a>=5e3?"堪比专业摄影师的阅片量":a>=1e3?"看图小达人":a>=500?"图片鉴赏家":a>=100?"偶尔欣赏一下美图":"图片?有空再看"}function a5(a){return a>=500?"在不断的纠正中成长":a>=200?"学习永无止境":a>=100?"虚心接受,积极改正":a>=50?"偶尔也会犯错":a>=10?"表现还算不错":"完美表达,无需纠正"}function l5(a){return a>=1?"这次思考的价值堪比一顿大餐!":a>=.5?"为了这个问题,我可是认真思考了!":a>=.1?"下了点功夫,值得的!":a>=.01?"花了点小钱,但很值得":"小小思考,不足挂齿"}function n5(a,l){return a>=100?"这句话简直是万能钥匙!":a>=50?"百试不爽的经典回复":a>=20?`${l}的口头禅`:a>=10?"常用语录之一":"偶尔用用的小确幸"}function r5(a,l){return a?l>=1e3?"深夜的守护者,黑暗中的光芒":l>=500?"月亮是我的好朋友":l>=100?"越夜越精神,夜晚才是主场":"偶尔熬夜,享受宁静时光":l<=10?"作息规律,健康生活的典范":l<=50?"早睡早起,偶尔也会熬个夜":"虽然是早起鸟,但也会守候深夜"}function i5(a){return a>=1e3?"忙到飞起,键盘都要冒烟了":a>=500?"这天简直是话痨附体":a>=200?"社交达人上线":a>=100?"比平时活跃不少":a>=50?"小忙一下":"还算轻松的一天"}function c5(){const[a]=u.useState(2025),[l,r]=u.useState(null),[c,d]=u.useState(!0),[m,h]=u.useState(!1),[f,p]=u.useState(null),g=u.useRef(null),{toast:N}=nt(),j=u.useCallback(async()=>{try{d(!0),p(null);const y=await a3(a);r(y)}catch(y){p(y instanceof Error?y:new Error("获取年度报告失败"))}finally{d(!1)}},[a]),b=u.useCallback(async()=>{if(!(!g.current||!l)){h(!0),N({title:"正在生成图片",description:"请稍候..."});try{const y=g.current,w=getComputedStyle(document.documentElement),z=w.getPropertyValue("--background").trim()?`hsl(${w.getPropertyValue("--background").trim()})`:document.documentElement.classList.contains("dark")?"#0a0a0a":"#ffffff",M=y.style.width,S=y.style.maxWidth;y.style.width="1024px",y.style.maxWidth="1024px";const F=await J3(y,{quality:1,pixelRatio:2,backgroundColor:z,cacheBust:!0,filter:C=>!(C instanceof HTMLElement&&C.hasAttribute("data-export-btn"))});y.style.width=M,y.style.maxWidth=S;const E=document.createElement("a");E.download=`${l.bot_name}_${l.year}_年度总结.png`,E.href=F,E.click(),N({title:"导出成功",description:"年度报告已保存为图片"})}catch(y){console.error("导出图片失败:",y),N({title:"导出失败",description:"请重试",variant:"destructive"})}finally{h(!1)}}},[l,N]);return u.useEffect(()=>{j()},[j]),c?e.jsx(o5,{}):f?e.jsxs("div",{className:"flex h-screen items-center justify-center text-red-500",children:["获取年度报告失败: ",f.message]}):l?e.jsx(ts,{className:"h-[calc(100vh-4rem)]",children:e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/50 p-4 md:p-8 print:p-0",ref:g,children:e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8 print:space-y-4",children:[e.jsxs("header",{className:"relative overflow-hidden rounded-3xl bg-primary p-8 text-primary-foreground shadow-2xl print:rounded-none print:shadow-none",children:[e.jsx("div",{className:"absolute right-4 top-4 z-20 print:hidden","data-export-btn":!0,children:e.jsx(_,{variant:"secondary",size:"sm",onClick:b,disabled:m,className:"gap-2 bg-white/20 hover:bg-white/30 text-white border-white/30",children:m?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-4 w-4 animate-spin"}),"导出中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(na,{className:"h-4 w-4"}),"保存图片"]})})}),e.jsxs("div",{className:"relative z-10 flex flex-col items-center text-center",children:[e.jsx(Yn,{className:"mb-4 h-16 w-16 animate-bounce"}),e.jsxs("h1",{className:"text-4xl font-bold tracking-tighter sm:text-6xl",children:[l.bot_name," ",l.year," 年度总结"]}),e.jsx("p",{className:"mt-4 max-w-2xl text-lg opacity-90",children:"连接与成长 · Connection & Growth"}),e.jsxs("div",{className:"mt-6 flex items-center gap-2 text-sm opacity-75",children:[e.jsx(Ko,{className:"h-4 w-4"}),e.jsxs("span",{children:["生成时间: ",l.generated_at]})]})]}),e.jsx("div",{className:"absolute -right-20 -top-20 h-64 w-64 rounded-full bg-white/10 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-20 -left-20 h-64 w-64 rounded-full bg-white/10 blur-3xl"})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(da,{className:"h-8 w-8"}),e.jsx("h2",{children:"时光足迹"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[e.jsx(La,{title:"年度在线时长",value:`${l.time_footprint.total_online_hours} 小时`,description:X3(l.time_footprint.total_online_hours),icon:e.jsx(da,{className:"h-4 w-4"})}),e.jsx(La,{title:"最忙碌的一天",value:l.time_footprint.busiest_day||"N/A",description:i5(l.time_footprint.busiest_day_count),icon:e.jsx(Ko,{className:"h-4 w-4"})}),e.jsx(La,{title:"深夜互动 (0-4点)",value:`${l.time_footprint.midnight_chat_count} 次`,description:Z3(l.time_footprint.midnight_chat_count),icon:e.jsx(tc,{className:"h-4 w-4"})}),e.jsx(La,{title:"作息属性",value:l.time_footprint.is_night_owl?"夜猫子":"早起鸟",description:r5(l.time_footprint.is_night_owl,l.time_footprint.midnight_chat_count),icon:l.time_footprint.is_night_owl?e.jsx(tc,{className:"h-4 w-4"}):e.jsx(ix,{className:"h-4 w-4"})})]}),e.jsxs(Te,{className:"overflow-hidden",children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"24小时活跃时钟"}),e.jsxs(Ns,{children:[l.bot_name,"在一天中各个时段的活跃程度"]})]}),e.jsx(ze,{className:"h-[300px]",children:e.jsx(Uj,{width:"100%",height:"100%",children:e.jsxs(Bo,{data:l.time_footprint.hourly_distribution.map((y,w)=>({hour:`${w}点`,count:y})),children:[e.jsx(Ji,{strokeDasharray:"3 3",vertical:!1}),e.jsx(Xi,{dataKey:"hour"}),e.jsx(Gr,{}),e.jsx($j,{contentStyle:{borderRadius:"8px",border:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},cursor:{fill:"transparent"}}),e.jsx(Zi,{dataKey:"count",fill:"hsl(var(--primary))",radius:[4,4,0,0]})]})})})]}),l.time_footprint.first_message_time&&e.jsx(Te,{className:"bg-muted/30 border-dashed",children:e.jsxs(ze,{className:"flex flex-col items-center justify-center p-6 text-center",children:[e.jsx("p",{className:"text-muted-foreground mb-2",children:"2025年的故事开始于"}),e.jsx("div",{className:"text-xl font-bold text-primary mb-1",children:l.time_footprint.first_message_time}),e.jsxs("p",{className:"text-lg",children:[e.jsx("span",{className:"font-semibold text-foreground",children:l.time_footprint.first_message_user})," 说:",e.jsxs("span",{className:"italic text-muted-foreground",children:['"',l.time_footprint.first_message_content,'"']})]})]})})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(oc,{className:"h-8 w-8"}),e.jsx("h2",{children:"社交网络"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsx(La,{title:"社交圈子",value:`${l.social_network.total_groups} 个群组`,description:`${l.bot_name}加入的群组总数`,icon:e.jsx(oc,{className:"h-4 w-4"})}),e.jsx(La,{title:"被呼叫次数",value:`${l.social_network.at_count+l.social_network.mentioned_count} 次`,description:"我的名字被大家频繁提起",icon:e.jsx(W1,{className:"h-4 w-4"})}),e.jsx(La,{title:"最长情陪伴",value:l.social_network.longest_companion_user||"N/A",description:`始终都在,已陪伴 ${l.social_network.longest_companion_days} 天`,icon:e.jsx(ei,{className:"h-4 w-4 text-red-500"})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{children:"话痨群组 TOP5"})}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-3",children:l.social_network.top_groups.length>0?l.social_network.top_groups.map((y,w)=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ce,{variant:w===0?"default":"secondary",className:"h-6 w-6 rounded-full p-0 flex items-center justify-center shrink-0",children:w+1}),e.jsx("span",{className:"font-medium truncate max-w-[120px]",children:y.group_name}),y.is_webui&&e.jsx(Ce,{variant:"outline",className:"text-xs px-1.5 py-0 h-5 bg-blue-50 text-blue-600 border-blue-200",children:"WebUI"})]}),e.jsxs("span",{className:"text-muted-foreground text-sm shrink-0",children:[y.message_count," 条消息"]})]},y.group_id)):e.jsx("div",{className:"text-center text-muted-foreground py-4",children:"暂无数据"})})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{children:"年度最佳损友 TOP5"})}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-3",children:l.social_network.top_users.length>0?l.social_network.top_users.map((y,w)=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ce,{variant:w===0?"default":"secondary",className:"h-6 w-6 rounded-full p-0 flex items-center justify-center shrink-0",children:w+1}),e.jsx("span",{className:"font-medium truncate max-w-[120px]",children:y.user_nickname}),y.is_webui&&e.jsx(Ce,{variant:"outline",className:"text-xs px-1.5 py-0 h-5 bg-blue-50 text-blue-600 border-blue-200",children:"WebUI"})]}),e.jsxs("span",{className:"text-muted-foreground text-sm shrink-0",children:[y.message_count," 次互动"]})]},y.user_id)):e.jsx("div",{className:"text-center text-muted-foreground py-4",children:"暂无数据"})})})]})]})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(hx,{className:"h-8 w-8"}),e.jsx("h2",{children:"最强大脑"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[e.jsx(La,{title:"年度 Token 消耗",value:(l.brain_power.total_tokens/1e6).toFixed(2)+" M",description:W3(l.brain_power.total_tokens),icon:e.jsx(sl,{className:"h-4 w-4"})}),e.jsx(La,{title:"年度总花费",value:`$${l.brain_power.total_cost.toFixed(2)}`,description:e5(l.brain_power.total_cost),icon:e.jsx("span",{className:"font-bold",children:"$"})}),e.jsx(La,{title:"高冷指数",value:`${l.brain_power.silence_rate}%`,description:s5(l.brain_power.silence_rate),icon:e.jsx(tc,{className:"h-4 w-4"})}),e.jsx(La,{title:"最高兴趣值",value:l.brain_power.max_interest_value??"N/A",description:l.brain_power.max_interest_time?`出现在 ${l.brain_power.max_interest_time}`:"暂无数据",icon:e.jsx(ei,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{children:"模型偏好分布"})}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-3",children:l.brain_power.model_distribution.slice(0,5).map((y,w)=>{const z=l.brain_power.model_distribution[0]?.count||1,M=Math.round(y.count/z*100);return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"font-medium truncate max-w-[200px]",children:y.model}),e.jsxs("span",{className:"text-muted-foreground",children:[y.count.toLocaleString()," 次"]})]}),e.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:e.jsx("div",{className:"h-full transition-all duration-500",style:{width:`${M}%`,backgroundColor:$o[w%$o.length]}})})]},y.model)})})})]}),l.brain_power.top_reply_models&&l.brain_power.top_reply_models.length>0&&e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"最喜欢的回复模型 TOP5"}),e.jsxs(Ns,{children:[l.bot_name,"用来回复消息的模型偏好"]})]}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-3",children:l.brain_power.top_reply_models.map((y,w)=>{const z=l.brain_power.top_reply_models[0]?.count||1,M=Math.round(y.count/z*100);return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"font-medium truncate max-w-[200px]",children:y.model}),e.jsxs("span",{className:"text-muted-foreground",children:[y.count.toLocaleString()," 次"]})]}),e.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:e.jsx("div",{className:"h-full transition-all duration-500",style:{width:`${M}%`,backgroundColor:$o[w%$o.length]}})})]},y.model)})})})]}),l.brain_power.top_token_consumers&&l.brain_power.top_token_consumers.length>0&&e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"烧钱大户 TOP3"}),e.jsx(Ns,{children:"谁消耗了最多的 API 额度"})]}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-6",children:l.brain_power.top_token_consumers.map(y=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm font-medium",children:[e.jsxs("span",{children:["用户 ",y.user_id]}),e.jsxs("span",{children:["$",y.cost.toFixed(2)]})]}),e.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:e.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${y.cost/(l.brain_power.top_token_consumers[0]?.cost||1)*100}%`}})})]},y.user_id))})})]})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{className:"bg-gradient-to-br from-amber-50 to-orange-50 dark:from-amber-950/20 dark:to-orange-950/20",children:[e.jsx(Oe,{children:e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"💰"}),"最昂贵的一次思考"]})}),e.jsxs(ze,{className:"text-center",children:[e.jsxs("div",{className:"text-4xl font-bold text-amber-600 dark:text-amber-400",children:["$",l.brain_power.most_expensive_cost.toFixed(4)]}),l.brain_power.most_expensive_time&&e.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["发生在 ",l.brain_power.most_expensive_time]}),e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:l5(l.brain_power.most_expensive_cost)})]})]}),e.jsxs(Te,{className:"bg-gradient-to-br from-indigo-50 to-blue-50 dark:from-indigo-950/20 dark:to-blue-950/20",children:[e.jsx(Oe,{children:e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"🧠"}),"思考深度"]})}),e.jsxs(ze,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-indigo-600 dark:text-indigo-400",children:l.brain_power.avg_reasoning_length?.toFixed(0)||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"平均思考字数"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-blue-600 dark:text-blue-400",children:l.brain_power.max_reasoning_length?.toLocaleString()||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"最长思考字数"})]})]}),l.brain_power.max_reasoning_time&&e.jsxs("p",{className:"mt-4 text-center text-xs text-muted-foreground",children:["最深沉的思考发生在 ",l.brain_power.max_reasoning_time]})]})]})]})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(rd,{className:"h-8 w-8"}),e.jsx("h2",{children:"个性与表达"})]}),(l.expression_vibe.late_night_reply||l.expression_vibe.favorite_reply)&&e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.expression_vibe.late_night_reply&&e.jsxs(Te,{className:"bg-gradient-to-br from-indigo-50 to-violet-50 dark:from-indigo-950/20 dark:to-violet-950/20",children:[e.jsxs(Oe,{children:[e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"🌙"}),"深夜还在回复"]}),e.jsxs(Ns,{children:["凌晨 ",l.expression_vibe.late_night_reply.time,",",l.bot_name,"还在回复..."]})]}),e.jsxs(ze,{className:"text-center",children:[e.jsxs("p",{className:"text-lg italic text-muted-foreground",children:['"',l.expression_vibe.late_night_reply.content,'"']}),e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:"是有什么心事吗?"})]})]}),l.expression_vibe.favorite_reply&&e.jsxs(Te,{className:"bg-gradient-to-br from-rose-50 to-pink-50 dark:from-rose-950/20 dark:to-pink-950/20",children:[e.jsxs(Oe,{children:[e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"💬"}),"最喜欢的回复"]}),e.jsxs(Ns,{children:["使用了 ",l.expression_vibe.favorite_reply.count," 次"]})]}),e.jsxs(ze,{className:"text-center",children:[e.jsxs("p",{className:"text-lg font-medium text-primary",children:['"',l.expression_vibe.favorite_reply.content,'"']}),e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:n5(l.expression_vibe.favorite_reply.count,l.bot_name)})]})]})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{className:"bg-gradient-to-br from-pink-50 to-purple-50 dark:from-pink-950/20 dark:to-purple-950/20",children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"使用最多的表情包 TOP3"}),e.jsx(Ns,{children:"年度最爱的表情包们"})]}),e.jsx(ze,{children:l.expression_vibe.top_emojis&&l.expression_vibe.top_emojis.length>0?e.jsx("div",{className:"flex justify-center gap-4",children:l.expression_vibe.top_emojis.slice(0,3).map((y,w)=>e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:`/api/webui/emoji/${y.id}/thumbnail?original=true`,alt:`TOP ${w+1}`,className:"h-24 w-24 rounded-lg object-cover shadow-md transition-transform hover:scale-105"}),e.jsx(Ce,{className:P("absolute -top-2 -right-2",w===0?"bg-yellow-500":w===1?"bg-gray-400":"bg-amber-700"),children:w+1})]}),e.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[y.usage_count," 次"]})]},y.id))}):e.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"暂无数据"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"印象最深刻的表达风格"}),e.jsxs(Ns,{children:[l.bot_name,"最常使用的表达方式"]})]}),e.jsx(ze,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:l.expression_vibe.top_expressions.map((y,w)=>e.jsxs(Ce,{variant:"outline",className:P("px-3 py-1 text-sm",w===0&&"border-primary bg-primary/10 text-primary text-base px-4 py-2"),children:[y.style," (",y.count,")"]},y.style))})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(La,{title:"图片鉴赏",value:`${l.expression_vibe.image_processed_count} 张`,description:t5(l.expression_vibe.image_processed_count),icon:e.jsx(xx,{className:"h-4 w-4"})}),e.jsx(La,{title:"成长的足迹",value:`${l.expression_vibe.rejected_expression_count} 次`,description:a5(l.expression_vibe.rejected_expression_count),icon:e.jsx(sl,{className:"h-4 w-4"})})]})]})]}),l.expression_vibe.action_types.length>0&&e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"⚡"}),"行动派"]}),e.jsx(Ns,{children:"除了聊天,我还帮大家做了这些事"})]}),e.jsx(ze,{children:e.jsx("div",{className:"flex flex-wrap gap-3",children:l.expression_vibe.action_types.map(y=>e.jsxs("div",{className:"flex items-center gap-2 rounded-full bg-primary/10 px-4 py-2",children:[e.jsx("span",{className:"font-medium text-primary",children:y.action}),e.jsxs(Ce,{variant:"secondary",children:[y.count," 次"]})]},y.action))})})]})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(e_,{className:"h-8 w-8"}),e.jsx("h2",{children:"趣味成就"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsxs(Te,{className:"col-span-1 md:col-span-2",children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:'新学到的"黑话"'}),e.jsxs(Ns,{children:["今年我学会了 ",l.achievements.new_jargon_count," 个新词"]})]}),e.jsx(ze,{children:e.jsx("div",{className:"flex flex-wrap gap-3",children:l.achievements.sample_jargons.map(y=>e.jsxs("div",{className:"group relative rounded-lg border bg-card p-3 shadow-sm transition-all hover:shadow-md",children:[e.jsx("div",{className:"font-bold text-primary",children:y.content}),e.jsx("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2 max-w-[200px]",children:y.meaning||"暂无解释"})]},y.content))})})]}),e.jsx(Te,{className:"flex flex-col justify-center items-center bg-primary text-primary-foreground",children:e.jsxs(ze,{className:"flex flex-col items-center justify-center p-6 text-center",children:[e.jsx(Ia,{className:"h-12 w-12 mb-4 opacity-80"}),e.jsx("div",{className:"text-4xl font-bold mb-2",children:l.achievements.total_messages.toLocaleString()}),e.jsx("div",{className:"text-sm opacity-80",children:"年度总消息数"}),e.jsxs("div",{className:"mt-4 text-xs opacity-60",children:["其中回复了 ",l.achievements.total_replies.toLocaleString()," 次"]})]})})]})]}),e.jsxs("footer",{className:"mt-12 text-center text-muted-foreground",children:[e.jsx("p",{children:"MaiBot 2025 Annual Report"}),e.jsx("p",{className:"text-sm",children:"Generated with ❤️ by MaiBot Team"})]})]})})}):null}function La({title:a,value:l,description:r,icon:c}){return e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:a}),e.jsx("div",{className:"text-muted-foreground",children:c})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-2xl font-bold",children:l}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function o5(){return e.jsxs("div",{className:"container mx-auto space-y-8 p-8",children:[e.jsx(ks,{className:"h-64 w-full rounded-3xl"}),e.jsx("div",{className:"grid gap-4 md:grid-cols-4",children:[...Array(4)].map((a,l)=>e.jsx(ks,{className:"h-32 w-full"},l))}),e.jsx(ks,{className:"h-96 w-full"})]})}var vd="DropdownMenu",[d5]=ld(vd,[Oj]),fa=Oj(),[u5,JN]=d5(vd),XN=a=>{const{__scopeDropdownMenu:l,children:r,dir:c,open:d,defaultOpen:m,onOpenChange:h,modal:f=!0}=a,p=fa(l),g=u.useRef(null),[N,j]=ad({prop:d,defaultProp:m??!1,onChange:h,caller:vd});return e.jsx(u5,{scope:l,triggerId:Ym(),triggerRef:g,contentId:Ym(),open:N,onOpenChange:j,onOpenToggle:u.useCallback(()=>j(b=>!b),[j]),modal:f,children:e.jsx(Vw,{...p,open:N,onOpenChange:j,dir:c,modal:f,children:r})})};XN.displayName=vd;var ZN="DropdownMenuTrigger",WN=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,disabled:c=!1,...d}=a,m=JN(ZN,r),h=fa(r);return e.jsx(Gw,{asChild:!0,...h,children:e.jsx(ar.button,{type:"button",id:m.triggerId,"aria-haspopup":"menu","aria-expanded":m.open,"aria-controls":m.open?m.contentId:void 0,"data-state":m.open?"open":"closed","data-disabled":c?"":void 0,disabled:c,...d,ref:_1(l,m.triggerRef),onPointerDown:_n(a.onPointerDown,f=>{!c&&f.button===0&&f.ctrlKey===!1&&(m.onOpenToggle(),m.open||f.preventDefault())}),onKeyDown:_n(a.onKeyDown,f=>{c||(["Enter"," "].includes(f.key)&&m.onOpenToggle(),f.key==="ArrowDown"&&m.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});WN.displayName=ZN;var m5="DropdownMenuPortal",eb=a=>{const{__scopeDropdownMenu:l,...r}=a,c=fa(l);return e.jsx(Uw,{...c,...r})};eb.displayName=m5;var sb="DropdownMenuContent",tb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=JN(sb,r),m=fa(r),h=u.useRef(!1);return e.jsx($w,{id:d.contentId,"aria-labelledby":d.triggerId,...m,...c,ref:l,onCloseAutoFocus:_n(a.onCloseAutoFocus,f=>{h.current||d.triggerRef.current?.focus(),h.current=!1,f.preventDefault()}),onInteractOutside:_n(a.onInteractOutside,f=>{const p=f.detail.originalEvent,g=p.button===0&&p.ctrlKey===!0,N=p.button===2||g;(!d.modal||N)&&(h.current=!0)}),style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tb.displayName=sb;var x5="DropdownMenuGroup",h5=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Kw,{...d,...c,ref:l})});h5.displayName=x5;var f5="DropdownMenuLabel",ab=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Hw,{...d,...c,ref:l})});ab.displayName=f5;var p5="DropdownMenuItem",lb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Bw,{...d,...c,ref:l})});lb.displayName=p5;var g5="DropdownMenuCheckboxItem",nb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Iw,{...d,...c,ref:l})});nb.displayName=g5;var j5="DropdownMenuRadioGroup",v5=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Qw,{...d,...c,ref:l})});v5.displayName=j5;var N5="DropdownMenuRadioItem",rb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Fw,{...d,...c,ref:l})});rb.displayName=N5;var b5="DropdownMenuItemIndicator",ib=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Pw,{...d,...c,ref:l})});ib.displayName=b5;var y5="DropdownMenuSeparator",cb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(qw,{...d,...c,ref:l})});cb.displayName=y5;var w5="DropdownMenuArrow",_5=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Yw,{...d,...c,ref:l})});_5.displayName=w5;var S5="DropdownMenuSubTrigger",ob=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Ow,{...d,...c,ref:l})});ob.displayName=S5;var k5="DropdownMenuSubContent",db=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Lw,{...d,...c,ref:l,style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});db.displayName=k5;var C5=XN,T5=WN,E5=eb,ub=tb,mb=ab,xb=lb,hb=nb,fb=rb,pb=ib,gb=cb,jb=ob,vb=db;const M5=C5,A5=T5,z5=u.forwardRef(({className:a,inset:l,children:r,...c},d)=>e.jsxs(jb,{ref:d,className:P("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",l&&"pl-8",a),...c,children:[r,e.jsx(ra,{className:"ml-auto h-4 w-4"})]}));z5.displayName=jb.displayName;const R5=u.forwardRef(({className:a,...l},r)=>e.jsx(vb,{ref:r,className:P("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...l}));R5.displayName=vb.displayName;const Nb=u.forwardRef(({className:a,sideOffset:l=4,...r},c)=>e.jsx(E5,{children:e.jsx(ub,{ref:c,sideOffset:l,className:P("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...r})}));Nb.displayName=ub.displayName;const bb=u.forwardRef(({className:a,inset:l,...r},c)=>e.jsx(xb,{ref:c,className:P("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",l&&"pl-8",a),...r}));bb.displayName=xb.displayName;const D5=u.forwardRef(({className:a,children:l,checked:r,...c},d)=>e.jsxs(hb,{ref:d,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:r,...c,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(pb,{children:e.jsx(Ot,{className:"h-4 w-4"})})}),l]}));D5.displayName=hb.displayName;const O5=u.forwardRef(({className:a,children:l,...r},c)=>e.jsxs(fb,{ref:c,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(pb,{children:e.jsx(Vo,{className:"h-2 w-2 fill-current"})})}),l]}));O5.displayName=fb.displayName;const L5=u.forwardRef(({className:a,inset:l,...r},c)=>e.jsx(mb,{ref:c,className:P("px-2 py-1.5 text-sm font-semibold",l&&"pl-8",a),...r}));L5.displayName=mb.displayName;const U5=u.forwardRef(({className:a,...l},r)=>e.jsx(gb,{ref:r,className:P("-mx-1 my-1 h-px bg-muted",a),...l}));U5.displayName=gb.displayName;const Qm=[{value:"created_at",label:"最新发布",icon:da},{value:"downloads",label:"下载最多",icon:na},{value:"likes",label:"最受欢迎",icon:ei}];function $5(){const a=ha(),[l,r]=u.useState([]),[c,d]=u.useState(!0),[m,h]=u.useState(""),[f,p]=u.useState("downloads"),[g,N]=u.useState(1),[j,b]=u.useState(1),[y,w]=u.useState(0),[z,M]=u.useState(new Set),[S,F]=u.useState(new Set),E=cN(),C=u.useCallback(async()=>{d(!0);try{const L=await m4({status:"approved",page:g,page_size:12,search:m||void 0,sort_by:f,sort_order:"desc"});r(L.packs),b(L.total_pages),w(L.total);const me=new Set;for(const Ne of L.packs)await iN(Ne.id,E)&&me.add(Ne.id);M(me)}catch(L){console.error("加载 Pack 列表失败:",L),aa({title:"加载 Pack 列表失败",variant:"destructive"})}finally{d(!1)}},[g,m,f,E]);u.useEffect(()=>{C()},[C]);const R=L=>{L.preventDefault(),N(1),C()},H=async L=>{if(!S.has(L)){F(me=>new Set(me).add(L));try{const me=await rN(L,E);M(Ne=>{const je=new Set(Ne);return me.liked?je.add(L):je.delete(L),je}),r(Ne=>Ne.map(je=>je.id===L?{...je,likes:me.likes}:je))}catch(me){console.error("点赞失败:",me),aa({title:"点赞失败",variant:"destructive"})}finally{F(me=>{const Ne=new Set(me);return Ne.delete(L),Ne})}}},O=L=>{a({to:"/config/pack-market/$packId",params:{packId:L}})},X=Qm.find(L=>L.value===f)||Qm[0];return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(xa,{className:"h-8 w-8",strokeWidth:2}),"配置模板市场"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"浏览和应用社区分享的模型配置模板,快速配置你的 MaiBot"})]}),e.jsxs(_,{variant:"outline",onClick:C,disabled:c,className:"gap-2",children:[e.jsx(dt,{className:`h-4 w-4 ${c?"animate-spin":""}`}),"刷新"]})]})}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-4 flex-wrap",children:[e.jsx("form",{onSubmit:R,className:"flex-1 min-w-[200px] max-w-md",children:e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(ne,{placeholder:"搜索模板名称、描述...",value:m,onChange:L=>h(L.target.value),className:"pl-10"})]})}),e.jsxs(M5,{children:[e.jsx(A5,{asChild:!0,children:e.jsxs(_,{variant:"outline",className:"min-w-[140px] gap-2",children:[e.jsx(s_,{className:"w-4 h-4"}),X.label,e.jsx(Ba,{className:"w-4 h-4 ml-auto"})]})}),e.jsx(Nb,{align:"end",children:Qm.map(L=>e.jsxs(bb,{onClick:()=>{p(L.value),N(1)},children:[e.jsx(L.icon,{className:"w-4 h-4 mr-2"}),L.label]},L.value))})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共找到 ",e.jsx("span",{className:"font-medium text-foreground",children:y})," 个模板"]}),c?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6}).map((L,me)=>e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(ks,{className:"h-6 w-3/4"}),e.jsx(ks,{className:"h-4 w-full mt-2"})]}),e.jsx(ze,{children:e.jsx(ks,{className:"h-20 w-full"})}),e.jsx(od,{children:e.jsx(ks,{className:"h-9 w-full"})})]},me))}):l.length===0?e.jsx(Te,{className:"py-12",children:e.jsxs(ze,{className:"text-center text-muted-foreground",children:[e.jsx(xa,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{className:"text-lg font-medium",children:"暂无模板"}),e.jsx("p",{className:"mt-1",children:"还没有人分享配置模板,快来分享第一个吧!"})]})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map(L=>e.jsx(B5,{pack:L,liked:z.has(L.id),liking:S.has(L.id),onLike:()=>H(L.id),onView:()=>O(L.id)},L.id))}),j>1&&e.jsx(fx,{children:e.jsxs(px,{children:[e.jsx(Xn,{children:e.jsx($v,{onClick:()=>N(L=>Math.max(1,L-1)),className:g===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:j},(L,me)=>me+1).filter(L=>L===1||L===j||Math.abs(L-g)<=1).map((L,me,Ne)=>{const je=me>0&&L-Ne[me-1]>1;return e.jsxs(Xn,{children:[je&&e.jsx("span",{className:"px-2",children:"..."}),e.jsx(jc,{onClick:()=>N(L),isActive:L===g,className:"cursor-pointer",children:L})]},L)}),e.jsx(Xn,{children:e.jsx(Bv,{onClick:()=>N(L=>Math.min(j,L+1)),className:g===j?"pointer-events-none opacity-50":"cursor-pointer"})})]})})]})})]})}function B5({pack:a,liked:l,liking:r,onLike:c,onView:d}){const m=h=>new Date(h).toLocaleDateString("zh-CN",{year:"numeric",month:"short",day:"numeric"});return e.jsxs(Te,{className:"flex flex-col hover:shadow-md transition-shadow",children:[e.jsxs(Oe,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx(Ue,{className:"text-lg line-clamp-1",children:a.name}),e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:["v",a.version]})]}),e.jsx(Ns,{className:"line-clamp-2 min-h-[40px]",children:a.description})]}),e.jsxs(ze,{className:"flex-1 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Fl,{className:"w-3.5 h-3.5"}),a.author]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(da,{className:"w-3.5 h-3.5"}),m(a.created_at)]})]}),e.jsxs("div",{className:"flex gap-4 text-sm",children:[e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",title:"提供商数量",children:[e.jsx(Hl,{className:"w-3.5 h-3.5"}),a.provider_count]}),e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",title:"模型数量",children:[e.jsx(Wn,{className:"w-3.5 h-3.5"}),a.model_count]}),e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",title:"任务配置数",children:[e.jsx(er,{className:"w-3.5 h-3.5"}),a.task_count]})]}),a.tags&&a.tags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[a.tags.slice(0,3).map(h=>e.jsxs(Ce,{variant:"outline",className:"text-xs",children:[e.jsx(cd,{className:"w-2.5 h-2.5 mr-1"}),h]},h)),a.tags.length>3&&e.jsxs(Ce,{variant:"outline",className:"text-xs",children:["+",a.tags.length-3]})]})]}),e.jsx(od,{className:"pt-3 border-t",children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"w-4 h-4"}),a.downloads]}),e.jsxs("button",{onClick:h=>{h.stopPropagation(),c()},disabled:r,className:`flex items-center gap-1 transition-colors ${l?"text-red-500":"hover:text-red-500"} ${r?"opacity-50":""}`,children:[e.jsx(ei,{className:`w-4 h-4 ${l?"fill-current":""}`}),a.likes]})]}),e.jsx(_,{size:"sm",onClick:d,children:"查看详情"})]})})]})}var ul="Accordion",I5=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Lx,P5,F5]=S1(ul),[Nd]=ld(ul,[F5,Lj]),Ux=Lj(),yb=Bs.forwardRef((a,l)=>{const{type:r,...c}=a,d=c,m=c;return e.jsx(Lx.Provider,{scope:a.__scopeAccordion,children:r==="multiple"?e.jsx(G5,{...m,ref:l}):e.jsx(V5,{...d,ref:l})})});yb.displayName=ul;var[wb,H5]=Nd(ul),[_b,q5]=Nd(ul,{collapsible:!1}),V5=Bs.forwardRef((a,l)=>{const{value:r,defaultValue:c,onValueChange:d=()=>{},collapsible:m=!1,...h}=a,[f,p]=ad({prop:r,defaultProp:c??"",onChange:d,caller:ul});return e.jsx(wb,{scope:a.__scopeAccordion,value:Bs.useMemo(()=>f?[f]:[],[f]),onItemOpen:p,onItemClose:Bs.useCallback(()=>m&&p(""),[m,p]),children:e.jsx(_b,{scope:a.__scopeAccordion,collapsible:m,children:e.jsx(Sb,{...h,ref:l})})})}),G5=Bs.forwardRef((a,l)=>{const{value:r,defaultValue:c,onValueChange:d=()=>{},...m}=a,[h,f]=ad({prop:r,defaultProp:c??[],onChange:d,caller:ul}),p=Bs.useCallback(N=>f((j=[])=>[...j,N]),[f]),g=Bs.useCallback(N=>f((j=[])=>j.filter(b=>b!==N)),[f]);return e.jsx(wb,{scope:a.__scopeAccordion,value:h,onItemOpen:p,onItemClose:g,children:e.jsx(_b,{scope:a.__scopeAccordion,collapsible:!0,children:e.jsx(Sb,{...m,ref:l})})})}),[K5,bd]=Nd(ul),Sb=Bs.forwardRef((a,l)=>{const{__scopeAccordion:r,disabled:c,dir:d,orientation:m="vertical",...h}=a,f=Bs.useRef(null),p=nd(f,l),g=P5(r),j=Wj(d)==="ltr",b=_n(a.onKeyDown,y=>{if(!I5.includes(y.key))return;const w=y.target,z=g().filter(X=>!X.ref.current?.disabled),M=z.findIndex(X=>X.ref.current===w),S=z.length;if(M===-1)return;y.preventDefault();let F=M;const E=0,C=S-1,R=()=>{F=M+1,F>C&&(F=E)},H=()=>{F=M-1,F{const{__scopeAccordion:r,value:c,...d}=a,m=bd(td,r),h=H5(td,r),f=Ux(r),p=Ym(),g=c&&h.value.includes(c)||!1,N=m.disabled||a.disabled;return e.jsx(Q5,{scope:r,open:g,disabled:N,triggerId:p,children:e.jsx(Mj,{"data-orientation":m.orientation,"data-state":zb(g),...f,...d,ref:l,disabled:N,open:g,onOpenChange:j=>{j?h.onItemOpen(c):h.onItemClose(c)}})})});kb.displayName=td;var Cb="AccordionHeader",Tb=Bs.forwardRef((a,l)=>{const{__scopeAccordion:r,...c}=a,d=bd(ul,r),m=$x(Cb,r);return e.jsx(ar.h3,{"data-orientation":d.orientation,"data-state":zb(m.open),"data-disabled":m.disabled?"":void 0,...c,ref:l})});Tb.displayName=Cb;var lx="AccordionTrigger",Eb=Bs.forwardRef((a,l)=>{const{__scopeAccordion:r,...c}=a,d=bd(ul,r),m=$x(lx,r),h=q5(lx,r),f=Ux(r);return e.jsx(Lx.ItemSlot,{scope:r,children:e.jsx(Jw,{"aria-disabled":m.open&&!h.collapsible||void 0,"data-orientation":d.orientation,id:m.triggerId,...f,...c,ref:l})})});Eb.displayName=lx;var Mb="AccordionContent",Ab=Bs.forwardRef((a,l)=>{const{__scopeAccordion:r,...c}=a,d=bd(ul,r),m=$x(Mb,r),h=Ux(r);return e.jsx(Xw,{role:"region","aria-labelledby":m.triggerId,"data-orientation":d.orientation,...h,...c,ref:l,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});Ab.displayName=Mb;function zb(a){return a?"open":"closed"}var Y5=yb,J5=kb,X5=Tb,Rb=Eb,Db=Ab;const Z5=Y5,Ob=u.forwardRef(({className:a,...l},r)=>e.jsx(J5,{ref:r,className:P("border-b",a),...l}));Ob.displayName="AccordionItem";const Lb=u.forwardRef(({className:a,children:l,...r},c)=>e.jsx(X5,{className:"flex",children:e.jsxs(Rb,{ref:c,className:P("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...r,children:[l,e.jsx(Ba,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Lb.displayName=Rb.displayName;const Ub=u.forwardRef(({className:a,children:l,...r},c)=>e.jsx(Db,{ref:c,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:e.jsx("div",{className:P("pb-4 pt-0",a),children:l})}));Ub.displayName=Db.displayName;const W5={utils:"通用工具",utils_small:"轻量工具",tool_use:"工具调用",replyer:"回复生成",planner:"规划推理",vlm:"视觉模型",voice:"语音处理",embedding:"向量嵌入",lpmm_entity_extract:"实体提取",lpmm_rdf_build:"RDF构建",lpmm_qa:"问答模型"};function eT(){const{packId:a}=Pb.useParams(),l=ha(),[r,c]=u.useState(null),[d,m]=u.useState(!0),[h,f]=u.useState(!1),[p,g]=u.useState(!1),[N,j]=u.useState(!1),[b,y]=u.useState(1),[w,z]=u.useState(null),[M,S]=u.useState(!1),[F,E]=u.useState(!1),[C,R]=u.useState({apply_providers:!0,apply_models:!0,apply_task_config:!0,task_mode:"append",selected_providers:void 0,selected_models:void 0,selected_tasks:void 0}),[H,O]=u.useState({}),[X,L]=u.useState({}),me=cN(),Ne=u.useCallback(async()=>{if(a){m(!0);try{const D=await x4(a);c(D);const Q=await iN(a,me);f(Q)}catch(D){console.error("加载 Pack 失败:",D),aa({title:"加载模板失败",variant:"destructive"})}finally{m(!1)}}},[a,me]);u.useEffect(()=>{Ne()},[Ne]);const je=async()=>{if(!(!a||p)){g(!0);try{const D=await rN(a,me);f(D.liked),r&&c({...r,likes:D.likes})}catch(D){console.error("点赞失败:",D),aa({title:"点赞失败",variant:"destructive"})}finally{g(!1)}}},ce=async()=>{if(r){j(!0),y(1),S(!0);try{const D=await p4(r);z(D);const Q={};for(const ue of D.existing_providers)Q[ue.pack_provider.name]=ue.local_providers[0].name;O(Q);const B={};for(const ue of D.new_providers)B[ue.name]="";L(B)}catch(D){console.error("检测冲突失败:",D),aa({title:"检测配置冲突失败",variant:"destructive"}),j(!1)}finally{S(!1)}}},ge=async()=>{if(r){if(C.apply_providers&&w){for(const D of w.new_providers)if(!X[D.name]){aa({title:`请填写提供商 "${D.name}" 的 API Key`,variant:"destructive"});return}}E(!0);try{await g4(r,C,H,X),await f4(r.id,me),c({...r,downloads:r.downloads+1}),aa({title:"配置模板应用成功!"}),j(!1)}catch(D){console.error("应用 Pack 失败:",D),aa({title:D instanceof Error?D.message:"应用配置失败",variant:"destructive"})}finally{E(!1)}}},pe=D=>new Date(D).toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric"});return d?e.jsx(tT,{}):r?e.jsx("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs(_,{variant:"ghost",size:"sm",onClick:()=>l({to:"/config/pack-market"}),className:"gap-2",children:[e.jsx($a,{className:"w-4 h-4"}),"返回市场"]}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[e.jsxs("div",{className:"flex-1 space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(xa,{className:"w-10 h-10 text-primary mt-1"}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[r.name,e.jsxs(Ce,{variant:"secondary",children:["v",r.version]})]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:r.description})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Fl,{className:"w-4 h-4"}),r.author]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(da,{className:"w-4 h-4"}),pe(r.created_at)]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"w-4 h-4"}),r.downloads," 次下载"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ei,{className:`w-4 h-4 ${h?"fill-red-500 text-red-500":""}`}),r.likes," 赞"]})]}),r.tags&&r.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:r.tags.map(D=>e.jsxs(Ce,{variant:"outline",children:[e.jsx(cd,{className:"w-3 h-3 mr-1"}),D]},D))})]}),e.jsxs("div",{className:"flex flex-col gap-2 min-w-[160px]",children:[e.jsxs(_,{size:"lg",onClick:ce,children:[e.jsx(na,{className:"w-4 h-4 mr-2"}),"应用模板"]}),e.jsxs(_,{variant:"outline",onClick:je,disabled:p,className:h?"text-red-500 border-red-200":"",children:[e.jsx(ei,{className:`w-4 h-4 mr-2 ${h?"fill-current":""}`}),h?"已点赞":"点赞"]})]})]}),e.jsx(la,{}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsx(Te,{children:e.jsxs(ze,{className:"flex items-center gap-3 py-4",children:[e.jsx(Hl,{className:"w-8 h-8 text-blue-500 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:r.providers.length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"API 提供商"})]})]})}),e.jsx(Te,{children:e.jsxs(ze,{className:"flex items-center gap-3 py-4",children:[e.jsx(Wn,{className:"w-8 h-8 text-green-500 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:r.models.length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"模型配置"})]})]})}),e.jsx(Te,{children:e.jsxs(ze,{className:"flex items-center gap-3 py-4",children:[e.jsx(er,{className:"w-8 h-8 text-purple-500 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:Object.keys(r.task_config).length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"任务配置"})]})]})})]}),e.jsxs(Jt,{defaultValue:"providers",className:"space-y-4",children:[e.jsxs(Gt,{className:"w-full sm:w-auto grid grid-cols-3 sm:flex",children:[e.jsxs(Xe,{value:"providers",className:"gap-1 sm:gap-2",children:[e.jsx(Hl,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"提供商"}),e.jsx("span",{className:"sm:hidden",children:"提供商"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",r.providers.length,")"]})]}),e.jsxs(Xe,{value:"models",className:"gap-1 sm:gap-2",children:[e.jsx(Wn,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"模型"}),e.jsx("span",{className:"sm:hidden",children:"模型"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",r.models.length,")"]})]}),e.jsxs(Xe,{value:"tasks",className:"gap-1 sm:gap-2",children:[e.jsx(er,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"任务配置"}),e.jsx("span",{className:"sm:hidden",children:"任务"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",Object.keys(r.task_config).length,")"]})]})]}),e.jsx(Ss,{value:"providers",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"API 提供商"}),e.jsx(Ns,{children:"模板中包含的 API 提供商配置(不含 API Key)"})]}),e.jsx(ze,{children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{children:"名称"}),e.jsx(ns,{children:"Base URL"}),e.jsx(ns,{children:"类型"})]})}),e.jsx(Gl,{children:r.providers.map(D=>e.jsxs(_t,{children:[e.jsx(Ze,{className:"font-medium whitespace-nowrap",children:D.name}),e.jsx(Ze,{className:"text-muted-foreground font-mono text-sm max-w-[200px] truncate",children:D.base_url}),e.jsx(Ze,{children:e.jsx(Ce,{variant:"outline",children:D.client_type})})]},D.name))})]})})})]})}),e.jsx(Ss,{value:"models",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"模型配置"}),e.jsx(Ns,{children:"模板中包含的模型配置"})]}),e.jsx(ze,{children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{children:"模型名称"}),e.jsx(ns,{children:"标识符"}),e.jsx(ns,{children:"提供商"}),e.jsx(ns,{className:"text-right",children:"价格 (入/出)"})]})}),e.jsx(Gl,{children:r.models.map(D=>e.jsxs(_t,{children:[e.jsx(Ze,{className:"font-medium whitespace-nowrap",children:D.name}),e.jsx(Ze,{className:"text-muted-foreground font-mono text-sm max-w-[150px] truncate",children:D.model_identifier}),e.jsx(Ze,{className:"whitespace-nowrap",children:D.api_provider}),e.jsxs(Ze,{className:"text-right text-muted-foreground whitespace-nowrap",children:["¥",D.price_in," / ¥",D.price_out]})]},D.name))})]})})})]})}),e.jsx(Ss,{value:"tasks",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"任务配置"}),e.jsx(Ns,{children:"模板中各任务类型的模型分配"})]}),e.jsx(ze,{children:e.jsx(Z5,{type:"multiple",className:"w-full",children:Object.entries(r.task_config).map(([D,Q])=>e.jsxs(Ob,{value:D,children:[e.jsx(Lb,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Sn,{className:"w-4 h-4"}),W5[D]||D,e.jsxs(Ce,{variant:"secondary",className:"ml-2",children:[Q.model_list.length," 个模型"]})]})}),e.jsx(Ub,{children:e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"分配的模型:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Q.model_list.map(B=>e.jsx(Ce,{variant:"outline",children:B},B))}),Q.temperature!==void 0&&e.jsxs("div",{className:"text-sm",children:["Temperature: ",e.jsx("span",{className:"font-mono",children:Q.temperature})]}),Q.max_tokens!==void 0&&e.jsxs("div",{className:"text-sm",children:["Max Tokens: ",e.jsx("span",{className:"font-mono",children:Q.max_tokens})]})]})})]},D))})})]})})]}),e.jsx(sT,{open:N,onOpenChange:j,pack:r,step:b,setStep:y,conflicts:w,detectingConflicts:M,applying:F,options:C,setOptions:R,_providerMapping:H,_setProviderMapping:O,newProviderApiKeys:X,setNewProviderApiKeys:L,onApply:ge})]})})}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx(xa,{className:"w-16 h-16 mx-auto mb-4 opacity-50"}),e.jsx("h2",{className:"text-xl font-semibold",children:"模板不存在"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"该配置模板可能已被删除或尚未通过审核"}),e.jsxs(_,{className:"mt-4",onClick:()=>l({to:"/config/pack-market"}),children:[e.jsx($a,{className:"w-4 h-4 mr-2"}),"返回市场"]})]})}function sT({open:a,onOpenChange:l,pack:r,step:c,setStep:d,conflicts:m,detectingConflicts:h,applying:f,options:p,setOptions:g,_providerMapping:N,_setProviderMapping:j,newProviderApiKeys:b,setNewProviderApiKeys:y,onApply:w}){return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(xa,{className:"w-5 h-5"}),"应用配置模板"]}),e.jsxs(at,{children:["步骤 ",c," / ",3,":",c===1&&"选择要应用的内容",c===2&&"配置提供商映射",c===3&&"确认并应用"]})]}),h?e.jsxs("div",{className:"py-8 text-center",children:[e.jsx(Fs,{className:"w-8 h-8 mx-auto animate-spin text-primary"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"正在检测配置冲突..."})]}):e.jsxs(e.Fragment,{children:[c===1&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"apply_providers",checked:p.apply_providers,onCheckedChange:M=>g({...p,apply_providers:M})}),e.jsxs(T,{htmlFor:"apply_providers",className:"flex items-center gap-2",children:[e.jsx(Hl,{className:"w-4 h-4"}),"应用提供商配置 (",r.providers.length," 个)"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"apply_models",checked:p.apply_models,onCheckedChange:M=>g({...p,apply_models:M})}),e.jsxs(T,{htmlFor:"apply_models",className:"flex items-center gap-2",children:[e.jsx(Wn,{className:"w-4 h-4"}),"应用模型配置 (",r.models.length," 个)"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"apply_task_config",checked:p.apply_task_config,onCheckedChange:M=>g({...p,apply_task_config:M})}),e.jsxs(T,{htmlFor:"apply_task_config",className:"flex items-center gap-2",children:[e.jsx(er,{className:"w-4 h-4"}),"应用任务配置 (",Object.keys(r.task_config).length," 个)"]})]})]}),p.apply_task_config&&e.jsxs("div",{className:"pl-6 space-y-2 border-l-2 border-muted",children:[e.jsx(T,{className:"text-sm font-medium",children:"任务配置应用模式"}),e.jsxs(Rx,{value:p.task_mode,onValueChange:M=>g({...p,task_mode:M}),children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wo,{value:"append",id:"mode_append"}),e.jsx(T,{htmlFor:"mode_append",className:"font-normal",children:"追加模式 - 将模板中的模型添加到现有配置"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wo,{value:"replace",id:"mode_replace"}),e.jsx(T,{htmlFor:"mode_replace",className:"font-normal",children:"替换模式 - 用模板配置完全替换现有配置"})]})]})]})]}),c===2&&m&&e.jsxs("div",{className:"space-y-4",children:[p.apply_providers&&m.existing_providers.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"发现已有的提供商"}),e.jsx(ft,{children:"以下提供商的 URL 与您本地配置中的提供商匹配,将自动使用本地提供商:"})]}),e.jsx("div",{className:"space-y-2",children:m.existing_providers.map(({pack_provider:M,local_providers:S})=>e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-lg",children:[e.jsx(Ot,{className:"w-4 h-4 text-green-500 flex-shrink-0"}),e.jsx("span",{className:"font-medium flex-shrink-0",children:M.name}),e.jsx(ra,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),S.length===1?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:S[0].name}),e.jsx(Ce,{variant:"outline",className:"ml-auto",children:"URL 匹配"})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{value:N[M.name]||S[0].name,onValueChange:F=>j({...N,[M.name]:F}),children:[e.jsx(Be,{className:"w-[200px]",children:e.jsx(Fe,{})}),e.jsx(Ie,{children:S.map(F=>e.jsx(W,{value:F.name,children:F.name},F.name))})]}),e.jsxs(Ce,{variant:"outline",className:"ml-auto",children:[S.length," 个匹配"]})]})]},M.name))})]}),p.apply_providers&&m.new_providers.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs(ht,{variant:"destructive",children:[e.jsx(Lt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"需要配置 API Key"}),e.jsx(ft,{children:"以下提供商在您的本地配置中不存在,需要填写 API Key:"})]}),e.jsx("div",{className:"space-y-4",children:m.new_providers.map(M=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(cx,{className:"w-4 h-4 text-amber-500"}),e.jsx("span",{className:"font-medium",children:M.name}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",M.base_url,")"]})]}),e.jsx(ne,{type:"password",placeholder:`输入 ${M.name} 的 API Key`,value:b[M.name]||"",onChange:S=>y({...b,[M.name]:S.target.value})})]},M.name))})]}),(!p.apply_providers||m.existing_providers.length===0&&m.new_providers.length===0)&&e.jsxs(ht,{children:[e.jsx(Ot,{className:"h-4 w-4"}),e.jsx(Jn,{children:"无需配置"}),e.jsx(ft,{children:"模板中没有提供商配置,或您选择不应用提供商。"})]})]}),c===3&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"确认应用"}),e.jsx(ft,{children:"请确认以下将要应用的内容:"})]}),e.jsxs("div",{className:"space-y-2",children:[p.apply_providers&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Ot,{className:"w-4 h-4 text-green-500"}),e.jsx(Hl,{className:"w-4 h-4"}),e.jsxs("span",{children:["应用 ",r.providers.length," 个提供商配置"]})]}),p.apply_models&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Ot,{className:"w-4 h-4 text-green-500"}),e.jsx(Wn,{className:"w-4 h-4"}),e.jsxs("span",{children:["应用 ",r.models.length," 个模型配置"]})]}),p.apply_task_config&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Ot,{className:"w-4 h-4 text-green-500"}),e.jsx(er,{className:"w-4 h-4"}),e.jsxs("span",{children:[p.task_mode==="append"?"追加":"替换"," ",Object.keys(r.task_config).length," 个任务配置"]})]})]}),m&&m.new_providers.length>0&&e.jsxs(ht,{variant:"destructive",children:[e.jsx(Lt,{className:"h-4 w-4"}),e.jsxs(ft,{children:["将添加 ",m.new_providers.length," 个新提供商,请确保已填写正确的 API Key。"]})]})]})]}),e.jsxs(gt,{className:"flex justify-between",children:[e.jsx("div",{children:c>1&&!h&&e.jsx(_,{variant:"outline",onClick:()=>d(c-1),disabled:f,children:"上一步"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(_,{variant:"outline",onClick:()=>l(!1),disabled:f,children:"取消"}),c<3?e.jsx(_,{onClick:()=>d(c+1),disabled:h,children:"下一步"}):e.jsxs(_,{onClick:w,disabled:f,children:[f&&e.jsx(Fs,{className:"w-4 h-4 mr-2 animate-spin"}),"应用模板"]})]})]})]})})}function tT(){return e.jsx("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsx(ks,{className:"h-9 w-24"}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[e.jsxs("div",{className:"flex-1 space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ks,{className:"w-10 h-10"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(ks,{className:"h-8 w-2/3"}),e.jsx(ks,{className:"h-4 w-full"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-4",children:[e.jsx(ks,{className:"h-4 w-24"}),e.jsx(ks,{className:"h-4 w-32"}),e.jsx(ks,{className:"h-4 w-28"}),e.jsx(ks,{className:"h-4 w-20"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(ks,{className:"h-6 w-20"}),e.jsx(ks,{className:"h-6 w-24"}),e.jsx(ks,{className:"h-6 w-16"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 min-w-[160px]",children:[e.jsx(ks,{className:"h-10 w-full"}),e.jsx(ks,{className:"h-10 w-full"})]})]}),e.jsx(ks,{className:"h-px w-full"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsx(ks,{className:"h-24"}),e.jsx(ks,{className:"h-24"}),e.jsx(ks,{className:"h-24"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ks,{className:"h-10 w-32"}),e.jsx(ks,{className:"h-10 w-32"}),e.jsx(ks,{className:"h-10 w-32"})]}),e.jsx(ks,{className:"h-96 w-full"})]})]})})})}function aT(){const a=ha(),[l,r]=u.useState(!0);return u.useEffect(()=>{let c=!1;return(async()=>{try{const m=await dc();!c&&!m&&a({to:"/auth"})}catch{c||a({to:"/auth"})}finally{c||r(!1)}})(),()=>{c=!0}},[a]),{checking:l}}async function lT(){return await dc()}const nT=ti("pointer-events-none inline-flex select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono font-medium opacity-100",{variants:{size:{sm:"h-5 text-[10px]",default:"h-6 text-xs",lg:"h-7 text-sm"}},defaultVariants:{size:"default"}}),$b=u.forwardRef(({className:a,size:l,abbrTitle:r,children:c,...d},m)=>e.jsx("kbd",{className:P(nT({size:l,className:a})),ref:m,...d,children:r?e.jsx("abbr",{title:r,children:c}):c}));$b.displayName="Kbd";const rT=[{icon:id,title:"首页",description:"查看仪表板概览",path:"/",category:"概览"},{icon:Ua,title:"麦麦主程序配置",description:"配置麦麦的核心设置",path:"/config/bot",category:"配置"},{icon:Hl,title:"麦麦模型提供商配置",description:"配置模型提供商",path:"/config/modelProvider",category:"配置"},{icon:gv,title:"麦麦模型配置",description:"配置模型参数",path:"/config/model",category:"配置"},{icon:rd,title:"表情包管理",description:"管理麦麦的表情包",path:"/resource/emoji",category:"资源"},{icon:Ia,title:"表达方式管理",description:"管理麦麦的表达方式",path:"/resource/expression",category:"资源"},{icon:jv,title:"人物信息管理",description:"管理人物信息",path:"/resource/person",category:"资源"},{icon:Wr,title:"黑话管理",description:"管理麦麦学习到的黑话和俚语",path:"/resource/jargon",category:"资源"},{icon:t_,title:"统计信息",description:"查看使用统计",path:"/statistics",category:"监控"},{icon:xa,title:"插件市场",description:"浏览和安装插件",path:"/plugins",category:"扩展"},{icon:ux,title:"日志查看器",description:"查看系统日志",path:"/logs",category:"监控"},{icon:Sn,title:"系统设置",description:"配置系统参数",path:"/settings",category:"系统"}];function iT({open:a,onOpenChange:l}){const[r,c]=u.useState(""),[d,m]=u.useState(0),h=ha(),f=rT.filter(N=>N.title.toLowerCase().includes(r.toLowerCase())||N.description.toLowerCase().includes(r.toLowerCase())||N.category.toLowerCase().includes(r.toLowerCase())),p=u.useCallback(N=>{h({to:N}),l(!1),c(""),m(0)},[h,l]),g=u.useCallback(N=>{N.key==="ArrowDown"?(N.preventDefault(),m(j=>(j+1)%f.length)):N.key==="ArrowUp"?(N.preventDefault(),m(j=>(j-1+f.length)%f.length)):N.key==="Enter"&&f[d]&&(N.preventDefault(),p(f[d].path))},[f,d,p]);return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-2xl p-0 gap-0",children:[e.jsxs(qs,{className:"px-4 pt-4 pb-0",children:[e.jsx(Vs,{className:"sr-only",children:"搜索"}),e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground"}),e.jsx(ne,{value:r,onChange:N=>{c(N.target.value),m(0)},onKeyDown:g,placeholder:"搜索页面...",className:"h-12 pl-11 text-base border-0 focus-visible:ring-0 shadow-none",autoFocus:!0})]})]}),e.jsx("div",{className:"border-t",children:e.jsx(ts,{className:"h-[400px]",children:f.length>0?e.jsx("div",{className:"p-2",children:f.map((N,j)=>{const b=N.icon;return e.jsxs("button",{onClick:()=>p(N.path),onMouseEnter:()=>m(j),className:P("w-full flex items-center gap-3 px-3 py-2.5 rounded-md text-left transition-colors",j===d?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:[e.jsx(b,{className:"h-5 w-5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-medium text-sm",children:N.title}),e.jsx("div",{className:"text-xs text-muted-foreground truncate",children:N.description})]}),e.jsx("div",{className:"text-xs text-muted-foreground px-2 py-1 bg-muted rounded",children:N.category})]},N.path)})}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx($t,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r?"未找到匹配的页面":"输入关键词开始搜索"})]})})}),e.jsx("div",{className:"border-t px-4 py-3 flex items-center justify-between text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"↑"}),e.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"↓"}),"导航"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"Enter"}),"选择"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"Esc"}),"关闭"]})]})})]})})}function cT(){const a=window.location.protocol==="http:",l=window.location.hostname.toLowerCase(),r=l==="localhost"||l==="127.0.0.1"||l==="::1",c=sessionStorage.getItem("http-warning-dismissed")==="true",[d,m]=u.useState(a&&!r&&!c),[h,f]=u.useState(!1),p=()=>{f(!0),m(!1),sessionStorage.setItem("http-warning-dismissed","true")};return!d||h?null:e.jsx("div",{className:"relative bg-amber-500/10 border-b border-amber-500/20 backdrop-blur-sm",children:e.jsx("div",{className:"container mx-auto px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx(Lt,{className:"h-5 w-5 text-amber-600 dark:text-amber-500 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"text-sm font-medium text-amber-900 dark:text-amber-100",children:[e.jsx("span",{className:"font-semibold",children:"安全警告:"}),"您正在使用 ",e.jsx("strong",{children:"HTTP"})," 访问 MaiBot WebUI"]}),e.jsx("p",{className:"text-xs text-amber-800 dark:text-amber-200 mt-1",children:"如果这是公网服务器,您的数据(包括 Token、聊天记录等)可能在传输过程中被窃取。强烈建议使用 HTTPS 访问或仅在本地网络使用。"})]})]}),e.jsx(_,{variant:"ghost",size:"icon",onClick:p,className:"h-8 w-8 text-amber-700 hover:text-amber-900 dark:text-amber-400 dark:hover:text-amber-200 flex-shrink-0","aria-label":"关闭警告",children:e.jsx(Sa,{className:"h-4 w-4"})})]})})})}function oT(){const[a,l]=u.useState(0),[r,c]=u.useState(!1),d=u.useRef(null);u.useEffect(()=>{const g=N=>{const j=N.target;if(j.scrollHeight>j.clientHeight+100){d.current=j;const b=j.scrollTop,y=j.scrollHeight-j.clientHeight,w=y>0?b/y*100:0;l(w),c(b>300)}};return window.addEventListener("scroll",g,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})},[]);const m=()=>{d.current?.scrollTo({top:0,behavior:"smooth"})},h=18,f=2*Math.PI*h,p=f-a/100*f;return e.jsx("div",{className:P("fixed bottom-24 right-8 z-50 transition-all duration-500 ease-in-out transform",r?"translate-x-0 opacity-100":"translate-x-32 opacity-0 pointer-events-none"),children:e.jsxs(_,{variant:"outline",size:"icon",className:P("relative h-12 w-12 rounded-full shadow-xl","bg-background/80 backdrop-blur-md border-border/50","hover:bg-accent hover:scale-110 hover:shadow-2xl hover:border-primary/50","transition-all duration-300","group"),onClick:m,"aria-label":"回到顶部",children:[e.jsxs("svg",{className:"absolute inset-0 h-full w-full -rotate-90 transform p-1",viewBox:"0 0 44 44",children:[e.jsx("circle",{className:"text-muted-foreground/10",strokeWidth:"3",stroke:"currentColor",fill:"transparent",r:h,cx:"22",cy:"22"}),e.jsx("circle",{className:"text-primary transition-all duration-100 ease-out",strokeWidth:"3",strokeDasharray:f,strokeDashoffset:p,strokeLinecap:"round",stroke:"currentColor",fill:"transparent",r:h,cx:"22",cy:"22"})]}),e.jsx(a_,{className:"h-5 w-5 text-primary transition-transform duration-300 group-hover:-translate-y-1 group-hover:scale-110",strokeWidth:2.5}),e.jsx("div",{className:"absolute inset-0 rounded-full bg-primary/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]})})}function dT({children:a}){const{checking:l}=aT(),[r,c]=u.useState(!0),[d,m]=u.useState(!1),[h,f]=u.useState(!1),[p,g]=u.useState(!1),{theme:N,setTheme:j}=vx(),b=nw();if(u.useEffect(()=>{if(r)g(!1);else{const S=setTimeout(()=>{g(!0)},350);return()=>clearTimeout(S)}},[r]),u.useEffect(()=>{const S=F=>{(F.metaKey||F.ctrlKey)&&F.key==="k"&&(F.preventDefault(),f(!0))};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[]),l)return e.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:e.jsx("div",{className:"text-muted-foreground",children:"正在验证登录状态..."})});const y=[{title:"概览",items:[{icon:id,label:"首页",path:"/"}]},{title:"麦麦配置编辑",items:[{icon:Ua,label:"麦麦主程序配置",path:"/config/bot"},{icon:Hl,label:"AI模型厂商配置",path:"/config/modelProvider",tourId:"sidebar-model-provider"},{icon:gv,label:"模型管理与分配",path:"/config/model",tourId:"sidebar-model-management"},{icon:zg,label:"麦麦适配器配置",path:"/config/adapter"}]},{title:"麦麦资源管理",items:[{icon:rd,label:"表情包管理",path:"/resource/emoji"},{icon:Ia,label:"表达方式管理",path:"/resource/expression"},{icon:Wr,label:"黑话管理",path:"/resource/jargon"},{icon:jv,label:"人物信息管理",path:"/resource/person"},{icon:xv,label:"知识库图谱可视化",path:"/resource/knowledge-graph"},{icon:Zr,label:"麦麦知识库管理",path:"/resource/knowledge-base"}]},{title:"扩展与监控",items:[{icon:xa,label:"插件市场",path:"/plugins"},{icon:fv,label:"配置模板市场",path:"/config/pack-market"},{icon:zg,label:"插件配置",path:"/plugin-config"},{icon:ux,label:"日志查看器",path:"/logs"},{icon:nx,label:"计划器&回复器监控",path:"/planner-monitor"},{icon:Ia,label:"本地聊天室",path:"/chat"}]},{title:"系统",items:[{icon:Sn,label:"系统设置",path:"/settings"}]}],z=N==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":N,M=async()=>{await B_()};return e.jsx(Zv,{delayDuration:300,children:e.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e.jsxs("aside",{className:P("fixed inset-y-0 left-0 z-50 flex flex-col border-r bg-card transition-all duration-300 lg:relative lg:z-0","w-64 lg:w-auto",r?"lg:w-64":"lg:w-16",d?"translate-x-0":"-translate-x-full lg:translate-x-0"),children:[e.jsx("div",{className:"flex h-16 items-center border-b px-4",children:e.jsxs("div",{className:P("relative flex items-center justify-center flex-1 transition-all overflow-hidden","lg:flex-1",!r&&"lg:flex-none lg:w-8"),children:[e.jsxs("div",{className:P("flex items-baseline gap-2",!r&&"lg:hidden"),children:[e.jsx("span",{className:"font-bold text-xl text-primary-gradient whitespace-nowrap",children:"MaiBot WebUI"}),e.jsx("span",{className:"text-xs text-primary/60 whitespace-nowrap",children:v2()})]}),!r&&e.jsx("span",{className:"hidden lg:block font-bold text-primary-gradient text-2xl",children:"M"})]})}),e.jsx(ts,{className:P("flex-1 overflow-x-hidden",!r&&"lg:w-16"),children:e.jsx("nav",{className:P("p-4",!r&&"lg:p-2 lg:w-16"),children:e.jsx("ul",{className:P("space-y-6",!r&&"lg:space-y-3 lg:w-full"),children:y.map((S,F)=>e.jsxs("li",{children:[e.jsx("div",{className:P("px-3 h-[1.25rem]","mb-2",!r&&"lg:mb-1 lg:invisible"),children:e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground/60 whitespace-nowrap",children:S.title})}),!r&&F>0&&e.jsx("div",{className:"hidden lg:block mb-2 border-t border-border"}),e.jsx("ul",{className:"space-y-1",children:S.items.map(E=>{const C=b({to:E.path}),R=E.icon,H=e.jsxs(e.Fragment,{children:[C&&e.jsx("div",{className:"absolute left-0 top-1/2 h-8 w-1 -translate-y-1/2 rounded-r-full bg-primary transition-opacity duration-300"}),e.jsxs("div",{className:P("flex items-center transition-all duration-300",r?"gap-3":"gap-3 lg:gap-0"),children:[e.jsx(R,{className:P("h-5 w-5 flex-shrink-0",C&&"text-primary"),strokeWidth:2,fill:"none"}),e.jsx("span",{className:P("text-sm font-medium whitespace-nowrap transition-all duration-300",C&&"font-semibold",r?"opacity-100 max-w-[200px]":"opacity-100 max-w-[200px] lg:opacity-0 lg:max-w-0 lg:overflow-hidden"),children:E.label})]})]});return e.jsx("li",{className:"relative",children:e.jsxs(Wv,{children:[e.jsx(eN,{asChild:!0,children:e.jsx(Kn,{to:E.path,"data-tour":E.tourId,className:P("relative flex items-center rounded-lg py-2 transition-all duration-300","hover:bg-accent hover:text-accent-foreground",C?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground",r?"px-3":"px-3 lg:px-0 lg:justify-center lg:w-12 lg:mx-auto"),onClick:()=>m(!1),children:H})}),p&&e.jsx(Tx,{side:"right",className:"hidden lg:block",children:e.jsx("p",{children:E.label})})]})},E.path)})})]},S.title))})})})]}),d&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 lg:hidden",onClick:()=>m(!1)}),e.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[e.jsx(cT,{}),e.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-card/80 backdrop-blur-md px-4 sticky top-0 z-10",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:()=>m(!d),className:"rounded-lg p-2 hover:bg-accent lg:hidden",children:e.jsx(l_,{className:"h-5 w-5"})}),e.jsx("button",{onClick:()=>c(!r),className:"hidden rounded-lg p-2 hover:bg-accent lg:block",title:r?"收起侧边栏":"展开侧边栏",children:e.jsx(Pa,{className:P("h-5 w-5 transition-transform",!r&&"rotate-180")})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Kn,{to:"/annual-report",children:e.jsxs(_,{variant:"ghost",size:"sm",className:"gap-2 bg-gradient-to-r from-pink-500/10 to-purple-500/10 hover:from-pink-500/20 hover:to-purple-500/20 border border-pink-500/20",title:"查看年度总结",children:[e.jsx(n_,{className:"h-4 w-4 text-pink-500"}),e.jsx("span",{className:"hidden sm:inline bg-gradient-to-r from-pink-500 to-purple-500 bg-clip-text text-transparent font-medium",children:"2025 年度总结"})]})}),e.jsxs("button",{onClick:()=>f(!0),className:"relative hidden md:flex items-center w-64 h-9 pl-9 pr-16 bg-background/50 border rounded-md hover:bg-accent/50 transition-colors text-left",children:[e.jsx($t,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"搜索..."}),e.jsxs($b,{size:"sm",className:"absolute right-2 top-1/2 -translate-y-1/2",children:[e.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),e.jsx(iT,{open:h,onOpenChange:f}),e.jsxs(_,{variant:"ghost",size:"sm",onClick:()=>window.open("https://docs.mai-mai.org","_blank"),className:"gap-2",title:"查看麦麦文档",children:[e.jsx(r_,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"麦麦文档"})]}),e.jsx("button",{onClick:S=>{h2(z==="dark"?"light":"dark",j,S)},className:"rounded-lg p-2 hover:bg-accent",title:z==="dark"?"切换到浅色模式":"切换到深色模式",children:z==="dark"?e.jsx(ix,{className:"h-5 w-5"}):e.jsx(tc,{className:"h-5 w-5"})}),e.jsx("div",{className:"h-6 w-px bg-border"}),e.jsxs(_,{variant:"ghost",size:"sm",onClick:M,className:"gap-2",title:"登出系统",children:[e.jsx(i_,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"登出"})]})]})]}),e.jsx("main",{className:"flex-1 overflow-hidden bg-background",children:a}),e.jsx(oT,{})]})]})})}function uT(a){const l=a.split(` + `,children:[e.jsx("div",{className:"w-12 h-12 rounded border overflow-hidden bg-muted flex-shrink-0 flex items-center justify-center",children:e.jsx("img",{src:X.previewUrl,alt:X.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:X.name}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:X.emotion||"未填写情感标签"})]}),L?e.jsx(st,{className:"h-5 w-5 text-green-500 flex-shrink-0"}):e.jsx("div",{className:"h-5 w-5 rounded-full border-2 border-muted-foreground/30 flex-shrink-0"})]},X.id)})})}),e.jsx("div",{className:"border rounded-lg p-4",children:M?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-16 h-16 rounded border overflow-hidden bg-muted flex items-center justify-center",children:e.jsx("img",{src:M.previewUrl,alt:M.name,className:"max-w-full max-h-full object-contain"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:M.name}),w(M)&&e.jsxs(Ce,{variant:"outline",className:"text-green-600 border-green-600",children:[e.jsx(Ot,{className:"h-3 w-3 mr-1"}),"已完成"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"multi-emotion",children:["情感标签 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ae,{id:"multi-emotion",value:M.emotion,onChange:X=>y(M.id,{emotion:X.target.value}),placeholder:"多个标签用逗号分隔,如:开心,高兴",className:M.emotion.trim()?"":"border-destructive"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"multi-description",children:"描述"}),e.jsx(ae,{id:"multi-description",value:M.description,onChange:X=>y(M.id,{description:X.target.value}),placeholder:"输入表情包描述..."})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"multi-is-registered",checked:M.isRegistered,onCheckedChange:X=>y(M.id,{isRegistered:X===!0})}),e.jsx(T,{htmlFor:"multi-is-registered",className:"cursor-pointer text-sm",children:"上传后立即注册"})]})]}):e.jsx("div",{className:"h-full flex items-center justify-center text-muted-foreground",children:e.jsxs("div",{className:"text-center",children:[e.jsx(xx,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:"点击左侧卡片编辑"})]})})})]}),e.jsx(gt,{children:e.jsx(_,{onClick:F,disabled:!z||g,children:g?"上传中...":`上传全部 (${O})`})})]})};return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-3xl max-h-[90vh] overflow-hidden",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(cc,{className:"h-5 w-5"}),c==="select"&&"上传表情包 - 选择文件",c==="edit-single"&&"上传表情包 - 填写信息",c==="edit-multiple"&&"上传表情包 - 批量编辑"]}),e.jsxs(at,{children:[c==="select"&&"支持 JPG、PNG、GIF、WebP 格式,单个文件最大 10MB,可同时上传多个文件",c==="edit-single"&&"请填写表情包的情感标签(必填)和描述",c==="edit-multiple"&&"点击左侧卡片编辑每个表情包的信息,情感标签为必填项"]})]}),e.jsxs("div",{className:"overflow-y-auto pr-1",children:[c==="select"&&E(),c==="edit-single"&&C(),c==="edit-multiple"&&R()]})]})})}function ok(){const[a,l]=u.useState([]),[r,c]=u.useState(!0),[d,m]=u.useState(0),[h,f]=u.useState(1),[p,g]=u.useState(20),[N,j]=u.useState(""),[b,y]=u.useState(null),[w,z]=u.useState(!1),[M,S]=u.useState(!1),[F,E]=u.useState(!1),[C,R]=u.useState(null),[H,O]=u.useState(new Set),[X,L]=u.useState(!1),[me,Ne]=u.useState(""),[je,re]=u.useState({total:0,recent_7days:0,chat_count:0,top_chats:{}}),[ge,pe]=u.useState([]),[D,Q]=u.useState(new Map),[I,ue]=u.useState(!1),[Y,we]=u.useState(0),{toast:fe}=nt(),Ee=async()=>{try{c(!0);const ne=await a2({page:h,page_size:p,search:N||void 0});l(ne.data),m(ne.total)}catch(ne){fe({title:"加载失败",description:ne instanceof Error?ne.message:"无法加载表达方式",variant:"destructive"})}finally{c(!1)}},G=async()=>{try{const ne=await o2();ne?.data&&re(ne.data)}catch(ne){console.error("加载统计数据失败:",ne)}},$=async()=>{try{const ne=await jx();we(ne.unchecked)}catch(ne){console.error("加载审核统计失败:",ne)}},A=async()=>{try{const ne=await gx();if(ne?.data){pe(ne.data);const De=new Map;ne.data.forEach(xe=>{De.set(xe.chat_id,xe.chat_name)}),Q(De)}}catch(ne){console.error("加载聊天列表失败:",ne)}},K=ne=>D.get(ne)||ne;u.useEffect(()=>{Ee(),$(),G(),A()},[h,p,N]);const Re=async ne=>{try{const De=await l2(ne.id);y(De.data),z(!0)}catch(De){fe({title:"加载详情失败",description:De instanceof Error?De.message:"无法加载表达方式详情",variant:"destructive"})}},se=ne=>{y(ne),S(!0)},$e=async ne=>{try{await i2(ne.id),fe({title:"删除成功",description:`已删除表达方式: ${ne.situation}`}),R(null),Ee(),G()}catch(De){fe({title:"删除失败",description:De instanceof Error?De.message:"无法删除表达方式",variant:"destructive"})}},cs=ne=>{const De=new Set(H);De.has(ne)?De.delete(ne):De.add(ne),O(De)},J=()=>{H.size===a.length&&a.length>0?O(new Set):O(new Set(a.map(ne=>ne.id)))},Z=async()=>{try{await c2(Array.from(H)),fe({title:"批量删除成功",description:`已删除 ${H.size} 个表达方式`}),O(new Set),L(!1),Ee(),G()}catch(ne){fe({title:"批量删除失败",description:ne instanceof Error?ne.message:"无法批量删除表达方式",variant:"destructive"})}},Le=()=>{const ne=parseInt(me),De=Math.ceil(d/p);ne>=1&&ne<=De?(f(ne),Ne("")):fe({title:"无效的页码",description:`请输入1-${De}之间的页码`,variant:"destructive"})};return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(Ba,{className:"h-8 w-8",strokeWidth:2}),"表达方式管理"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"管理麦麦的表达方式和话术模板"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_,{variant:"outline",onClick:()=>ue(!0),className:"gap-2",children:[e.jsx(cv,{className:"h-4 w-4"}),"人工审核",Y>0&&e.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-xs rounded-full bg-orange-500 text-white",children:Y>99?"99+":Y})]}),e.jsxs(_,{onClick:()=>E(!0),className:"gap-2",children:[e.jsx(Xs,{className:"h-4 w-4"}),"新增表达方式"]})]})]})}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 pr-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总数量"}),e.jsx("div",{className:"text-2xl font-bold mt-1",children:je.total})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"近7天新增"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-green-600",children:je.recent_7days})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"关联聊天数"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-blue-600",children:je.chat_count})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx(T,{htmlFor:"search",children:"搜索"}),e.jsx("div",{className:"flex flex-col sm:flex-row gap-2 mt-1.5",children:e.jsxs("div",{className:"flex-1 relative",children:[e.jsx($t,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{id:"search",placeholder:"搜索情境、风格或上下文...",value:N,onChange:ne=>j(ne.target.value),className:"pl-9"})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 mt-4 pt-4 border-t",children:[e.jsx("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:H.size>0&&e.jsxs("span",{children:["已选择 ",H.size," 个表达方式"]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"page-size",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:p.toString(),onValueChange:ne=>{g(parseInt(ne)),f(1),O(new Set)},children:[e.jsx(Ie,{id:"page-size",className:"w-20",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]}),H.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>O(new Set),children:"取消选择"}),e.jsxs(_,{variant:"destructive",size:"sm",onClick:()=>L(!0),children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"批量删除"]})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card",children:[e.jsx("div",{className:"hidden md:block",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:H.size===a.length&&a.length>0,onCheckedChange:J})}),e.jsx(ns,{children:"情境"}),e.jsx(ns,{children:"风格"}),e.jsx(ns,{children:"聊天"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:r?e.jsx(_t,{children:e.jsx(Ze,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):a.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):a.map(ne=>e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:H.has(ne.id),onCheckedChange:()=>cs(ne.id)})}),e.jsx(Ze,{className:"font-medium max-w-xs truncate",children:ne.situation}),e.jsx(Ze,{className:"max-w-xs truncate",children:ne.style}),e.jsx(Ze,{className:"max-w-[200px] truncate",title:K(ne.chat_id),style:{wordBreak:"keep-all"},children:e.jsx("span",{className:"whitespace-nowrap overflow-hidden text-ellipsis block",children:K(ne.chat_id)})}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>se(ne),children:[e.jsx(sr,{className:"h-4 w-4 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>Re(ne),title:"查看详情",children:e.jsx(ua,{className:"h-4 w-4"})}),e.jsxs(_,{size:"sm",onClick:()=>R(ne),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"删除"]})]})})]},ne.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3 p-4",children:r?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"加载中..."}):a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无数据"}):a.map(ne=>e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(tt,{checked:H.has(ne.id),onCheckedChange:()=>cs(ne.id),className:"mt-1"}),e.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden space-y-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"情境"}),e.jsx("h3",{className:"font-semibold text-sm line-clamp-2 w-full break-all",title:ne.situation,children:ne.situation})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"风格"}),e.jsx("p",{className:"text-sm line-clamp-2 w-full break-all",title:ne.style,children:ne.style})]})]})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"聊天"}),e.jsx("p",{className:"text-sm truncate",title:K(ne.chat_id),style:{wordBreak:"keep-all"},children:K(ne.chat_id)})]}),e.jsxs("div",{className:"flex flex-wrap gap-1 pt-2 border-t overflow-hidden",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>se(ne),className:"text-xs px-2 py-1 h-auto flex-shrink-0",children:[e.jsx(sr,{className:"h-3 w-3 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Re(ne),className:"text-xs px-2 py-1 h-auto flex-shrink-0",children:e.jsx(ua,{className:"h-3 w-3"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>R(ne),className:"text-xs px-2 py-1 h-auto flex-shrink-0 text-destructive hover:text-destructive",children:[e.jsx(os,{className:"h-3 w-3 mr-1"}),"删除"]})]})]},ne.id))}),d>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 px-4 py-3 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",d," 条记录,第 ",h," / ",Math.ceil(d/p)," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(1),disabled:h===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h-1),disabled:h===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{type:"number",value:me,onChange:ne=>Ne(ne.target.value),onKeyDown:ne=>ne.key==="Enter"&&Le(),placeholder:h.toString(),className:"w-16 h-8 text-center",min:1,max:Math.ceil(d/p)}),e.jsx(_,{variant:"outline",size:"sm",onClick:Le,disabled:!me,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h+1),disabled:h>=Math.ceil(d/p),children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(Math.ceil(d/p)),disabled:h>=Math.ceil(d/p),className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]})]})}),e.jsx(dk,{expression:b,open:w,onOpenChange:z,chatNameMap:D}),e.jsx(uk,{open:F,onOpenChange:E,chatList:ge,onSuccess:()=>{Ee(),G(),E(!1)}}),e.jsx(mk,{expression:b,open:M,onOpenChange:S,chatList:ge,onSuccess:()=>{Ee(),G(),S(!1)}}),e.jsx(bs,{open:!!C,onOpenChange:()=>R(null),children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除表达方式 "',C?.situation,'" 吗? 此操作不可撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>C&&$e(C),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})}),e.jsx(xk,{open:X,onOpenChange:L,onConfirm:Z,count:H.size}),e.jsx(Pv,{open:I,onOpenChange:ne=>{ue(ne),ne||(Ee(),G(),$())}})]})}function dk({expression:a,open:l,onOpenChange:r,chatNameMap:c}){if(!a)return null;const d=h=>h?new Date(h*1e3).toLocaleString("zh-CN"):"-",m=h=>c.get(h)||h;return e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"表达方式详情"}),e.jsx(at,{children:"查看表达方式的完整信息"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(Yi,{label:"情境",value:a.situation}),e.jsx(Yi,{label:"风格",value:a.style}),e.jsx(Yi,{label:"聊天",value:m(a.chat_id)}),e.jsx(Yi,{icon:Wr,label:"记录ID",value:a.id.toString(),mono:!0})]}),e.jsx("div",{className:"grid grid-cols-2 gap-4",children:e.jsx(Yi,{icon:da,label:"创建时间",value:d(a.create_date)})}),e.jsxs("div",{className:"rounded-lg border bg-muted/50 p-4",children:[e.jsx(T,{className:"text-xs text-muted-foreground mb-3 block",children:"状态标记"}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:P("flex h-8 w-8 items-center justify-center rounded-full",a.checked?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-400 dark:bg-gray-800 dark:text-gray-600"),children:a.checked?e.jsx(st,{className:"h-5 w-5"}):e.jsx(Vo,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"已检查"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a.checked?"已通过审核":"未审核"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:P("flex h-8 w-8 items-center justify-center rounded-full",a.rejected?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":"bg-gray-100 text-gray-400 dark:bg-gray-800 dark:text-gray-600"),children:a.rejected?e.jsx(ta,{className:"h-5 w-5"}):e.jsx(Vo,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"已拒绝"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a.rejected?"不会被使用":"正常"})]})]})]})]})]}),e.jsx(gt,{children:e.jsx(_,{onClick:()=>r(!1),children:"关闭"})})]})})}function Yi({icon:a,label:l,value:r,mono:c=!1}){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(T,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[a&&e.jsx(a,{className:"h-3 w-3"}),l]}),e.jsx("div",{className:P("text-sm",c&&"font-mono",!r&&"text-muted-foreground"),children:r||"-"})]})}function uk({open:a,onOpenChange:l,chatList:r,onSuccess:c}){const[d,m]=u.useState({situation:"",style:"",chat_id:""}),[h,f]=u.useState(!1),{toast:p}=nt(),g=async()=>{if(!d.situation||!d.style||!d.chat_id){p({title:"验证失败",description:"请填写必填字段:情境、风格和聊天",variant:"destructive"});return}try{f(!0),await n2(d),p({title:"创建成功",description:"表达方式已创建"}),m({situation:"",style:"",chat_id:""}),c()}catch(N){p({title:"创建失败",description:N instanceof Error?N.message:"无法创建表达方式",variant:"destructive"})}finally{f(!1)}};return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"新增表达方式"}),e.jsx(at,{children:"创建新的表达方式记录"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"situation",children:["情境 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ae,{id:"situation",value:d.situation,onChange:N=>m({...d,situation:N.target.value}),placeholder:"描述使用场景"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"style",children:["风格 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ae,{id:"style",value:d.style,onChange:N=>m({...d,style:N.target.value}),placeholder:"描述表达风格"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"chat_id",children:["聊天 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsxs(Pe,{value:d.chat_id,onValueChange:N=>m({...d,chat_id:N}),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择关联的聊天"})}),e.jsx(Be,{children:r.map(N=>e.jsx(W,{value:N.chat_id,children:e.jsxs("span",{className:"truncate",style:{wordBreak:"keep-all"},children:[N.chat_name,N.is_group&&e.jsx("span",{className:"text-muted-foreground ml-1",children:"(群聊)"})]})},N.chat_id))})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>l(!1),children:"取消"}),e.jsx(_,{onClick:g,disabled:h,children:h?"创建中...":"创建"})]})]})})}function mk({expression:a,open:l,onOpenChange:r,chatList:c,onSuccess:d}){const[m,h]=u.useState({}),[f,p]=u.useState(!1),{toast:g}=nt();u.useEffect(()=>{a&&h({situation:a.situation,style:a.style,chat_id:a.chat_id,checked:a.checked,rejected:a.rejected})},[a]);const N=async()=>{if(a)try{p(!0),await r2(a.id,m),g({title:"保存成功",description:"表达方式已更新"}),d()}catch(j){g({title:"保存失败",description:j instanceof Error?j.message:"无法更新表达方式",variant:"destructive"})}finally{p(!1)}};return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑表达方式"}),e.jsx(at,{children:"修改表达方式的信息"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_situation",children:"情境"}),e.jsx(ae,{id:"edit_situation",value:m.situation||"",onChange:j=>h({...m,situation:j.target.value}),placeholder:"描述使用场景"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_style",children:"风格"}),e.jsx(ae,{id:"edit_style",value:m.style||"",onChange:j=>h({...m,style:j.target.value}),placeholder:"描述表达风格"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_chat_id",children:"聊天"}),e.jsxs(Pe,{value:m.chat_id||"",onValueChange:j=>h({...m,chat_id:j}),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择关联的聊天"})}),e.jsx(Be,{children:c.map(j=>e.jsx(W,{value:j.chat_id,children:e.jsxs("span",{className:"truncate",style:{wordBreak:"keep-all"},children:[j.chat_name,j.is_group&&e.jsx("span",{className:"text-muted-foreground ml-1",children:"(群聊)"})]})},j.chat_id))})]})]}),e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(ft,{className:"text-xs",children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{children:e.jsx("strong",{children:"状态标记说明:"})}),e.jsx("p",{children:"• 已检查:表示该表达方式已通过审核(可由AI自动检查或人工审核)"}),e.jsx("p",{children:"• 已拒绝:表示该表达方式被标记为不合适,将永远不会被使用"}),e.jsxs("p",{className:"text-muted-foreground mt-2",children:['根据配置中"仅使用已审核通过的表达方式"设置:',e.jsx("br",{}),"• 开启时:只有通过审核(已检查)的项目会被使用",e.jsx("br",{}),"• 关闭时:未审核的项目也会被使用"]})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between space-x-2 rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{htmlFor:"edit_checked",className:"text-sm font-medium",children:"已检查"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"已通过审核"})]}),e.jsx(qe,{id:"edit_checked",checked:m.checked??!1,onCheckedChange:j=>h({...m,checked:j})})]}),e.jsxs("div",{className:"flex items-center justify-between space-x-2 rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{htmlFor:"edit_rejected",className:"text-sm font-medium",children:"已拒绝"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"不会被使用"})]}),e.jsx(qe,{id:"edit_rejected",checked:m.rejected??!1,onCheckedChange:j=>h({...m,rejected:j})})]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(_,{onClick:N,disabled:f,children:f?"保存中...":"保存"})]})]})}):null}function xk({open:a,onOpenChange:l,onConfirm:r,count:c}){return e.jsx(bs,{open:a,onOpenChange:l,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["您即将删除 ",c," 个表达方式,此操作无法撤销。确定要继续吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:r,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"确认删除"})]})]})})}const Kl="/api/webui/jargon";async function hk(){const a=await ke(`${Kl}/chats`,{});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取聊天列表失败")}return a.json()}async function fk(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.search&&l.append("search",a.search),a.chat_id&&l.append("chat_id",a.chat_id),a.is_jargon!==void 0&&a.is_jargon!==null&&l.append("is_jargon",a.is_jargon.toString()),a.is_global!==void 0&&l.append("is_global",a.is_global.toString());const r=await ke(`${Kl}/list?${l}`,{});if(!r.ok){const c=await r.json();throw new Error(c.detail||"获取黑话列表失败")}return r.json()}async function pk(a){const l=await ke(`${Kl}/${a}`,{});if(!l.ok){const r=await l.json();throw new Error(r.detail||"获取黑话详情失败")}return l.json()}async function gk(a){const l=await ke(`${Kl}/`,{method:"POST",body:JSON.stringify(a)});if(!l.ok){const r=await l.json();throw new Error(r.detail||"创建黑话失败")}return l.json()}async function jk(a,l){const r=await ke(`${Kl}/${a}`,{method:"PATCH",body:JSON.stringify(l)});if(!r.ok){const c=await r.json();throw new Error(c.detail||"更新黑话失败")}return r.json()}async function vk(a){const l=await ke(`${Kl}/${a}`,{method:"DELETE"});if(!l.ok){const r=await l.json();throw new Error(r.detail||"删除黑话失败")}return l.json()}async function Nk(a){const l=await ke(`${Kl}/batch/delete`,{method:"POST",body:JSON.stringify({ids:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量删除黑话失败")}return l.json()}async function bk(){const a=await ke(`${Kl}/stats/summary`,{});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取黑话统计失败")}return a.json()}async function yk(a,l){const r=new URLSearchParams;a.forEach(d=>r.append("ids",d.toString())),r.append("is_jargon",l.toString());const c=await ke(`${Kl}/batch/set-jargon?${r}`,{method:"POST"});if(!c.ok){const d=await c.json();throw new Error(d.detail||"批量设置黑话状态失败")}return c.json()}function wk(){const[a,l]=u.useState([]),[r,c]=u.useState(!0),[d,m]=u.useState(0),[h,f]=u.useState(1),[p,g]=u.useState(20),[N,j]=u.useState(""),[b,y]=u.useState("all"),[w,z]=u.useState("all"),[M,S]=u.useState(null),[F,E]=u.useState(!1),[C,R]=u.useState(!1),[H,O]=u.useState(!1),[X,L]=u.useState(null),[me,Ne]=u.useState(new Set),[je,re]=u.useState(!1),[ge,pe]=u.useState(""),[D,Q]=u.useState({total:0,confirmed_jargon:0,confirmed_not_jargon:0,pending:0,global_count:0,complete_count:0,chat_count:0,top_chats:{}}),[I,ue]=u.useState([]),{toast:Y}=nt(),we=async()=>{try{c(!0);const Z=await fk({page:h,page_size:p,search:N||void 0,chat_id:b==="all"?void 0:b,is_jargon:w==="all"?void 0:w==="true"?!0:w==="false"?!1:void 0});l(Z.data),m(Z.total)}catch(Z){Y({title:"加载失败",description:Z instanceof Error?Z.message:"无法加载黑话列表",variant:"destructive"})}finally{c(!1)}},fe=async()=>{try{const Z=await bk();Z?.data&&Q(Z.data)}catch(Z){console.error("加载统计数据失败:",Z)}},Ee=async()=>{try{const Z=await hk();Z?.data&&ue(Z.data)}catch(Z){console.error("加载聊天列表失败:",Z)}};u.useEffect(()=>{we(),fe(),Ee()},[h,p,N,b,w]);const G=async Z=>{try{const Le=await pk(Z.id);S(Le.data),E(!0)}catch(Le){Y({title:"加载详情失败",description:Le instanceof Error?Le.message:"无法加载黑话详情",variant:"destructive"})}},$=Z=>{S(Z),R(!0)},A=async Z=>{try{await vk(Z.id),Y({title:"删除成功",description:`已删除黑话: ${Z.content}`}),L(null),we(),fe()}catch(Le){Y({title:"删除失败",description:Le instanceof Error?Le.message:"无法删除黑话",variant:"destructive"})}},K=Z=>{const Le=new Set(me);Le.has(Z)?Le.delete(Z):Le.add(Z),Ne(Le)},Re=()=>{me.size===a.length&&a.length>0?Ne(new Set):Ne(new Set(a.map(Z=>Z.id)))},se=async()=>{try{await Nk(Array.from(me)),Y({title:"批量删除成功",description:`已删除 ${me.size} 个黑话`}),Ne(new Set),re(!1),we(),fe()}catch(Z){Y({title:"批量删除失败",description:Z instanceof Error?Z.message:"无法批量删除黑话",variant:"destructive"})}},$e=async Z=>{try{await yk(Array.from(me),Z),Y({title:"操作成功",description:`已将 ${me.size} 个词条设为${Z?"黑话":"非黑话"}`}),Ne(new Set),we(),fe()}catch(Le){Y({title:"操作失败",description:Le instanceof Error?Le.message:"批量设置失败",variant:"destructive"})}},cs=()=>{const Z=parseInt(ge),Le=Math.ceil(d/p);Z>=1&&Z<=Le?(f(Z),pe("")):Y({title:"无效的页码",description:`请输入1-${Le}之间的页码`,variant:"destructive"})},J=Z=>Z===!0?e.jsxs(Ce,{variant:"default",className:"bg-green-600 hover:bg-green-700",children:[e.jsx(Ot,{className:"h-3 w-3 mr-1"}),"是黑话"]}):Z===!1?e.jsxs(Ce,{variant:"secondary",children:[e.jsx(Sa,{className:"h-3 w-3 mr-1"}),"非黑话"]}):e.jsxs(Ce,{variant:"outline",children:[e.jsx(ox,{className:"h-3 w-3 mr-1"}),"未判定"]});return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(P_,{className:"h-8 w-8",strokeWidth:2}),"黑话管理"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"管理麦麦学习到的黑话和俚语"})]}),e.jsxs(_,{onClick:()=>O(!0),className:"gap-2",children:[e.jsx(Xs,{className:"h-4 w-4"}),"新增黑话"]})]})}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 pr-4",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-7 gap-3",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"总数量"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1",children:D.total})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"已确认黑话"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-green-600",children:D.confirmed_jargon})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"确认非黑话"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-gray-500",children:D.confirmed_not_jargon})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"待判定"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-yellow-600",children:D.pending})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"全局黑话"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-blue-600",children:D.global_count})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"推断完成"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1 text-purple-600",children:D.complete_count})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:[e.jsx("div",{className:"text-xs sm:text-sm text-muted-foreground",children:"关联聊天数"}),e.jsx("div",{className:"text-xl sm:text-2xl font-bold mt-1",children:D.chat_count})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{htmlFor:"search",children:"搜索"}),e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{id:"search",placeholder:"搜索内容、含义...",value:N,onChange:Z=>j(Z.target.value),className:"pl-9"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{children:"聊天筛选"}),e.jsxs(Pe,{value:b,onValueChange:y,children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"全部聊天"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部聊天"}),I.map(Z=>e.jsx(W,{value:Z.chat_id,children:Z.chat_name},Z.chat_id))]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{children:"状态筛选"}),e.jsxs(Pe,{value:w,onValueChange:z,children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"全部状态"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部状态"}),e.jsx(W,{value:"true",children:"是黑话"}),e.jsx(W,{value:"false",children:"非黑话"})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{htmlFor:"page-size",children:"每页显示"}),e.jsxs(Pe,{value:p.toString(),onValueChange:Z=>{g(parseInt(Z)),f(1),Ne(new Set)},children:[e.jsx(Ie,{id:"page-size",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]})]})]}),me.size>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-4 pt-4 border-t",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["已选择 ",me.size," 个"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>$e(!0),children:[e.jsx(Ot,{className:"h-4 w-4 mr-1"}),"标记为黑话"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>$e(!1),children:[e.jsx(Sa,{className:"h-4 w-4 mr-1"}),"标记为非黑话"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Ne(new Set),children:"取消选择"}),e.jsxs(_,{variant:"destructive",size:"sm",onClick:()=>re(!0),children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"批量删除"]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card",children:[e.jsx("div",{className:"hidden md:block",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:me.size===a.length&&a.length>0,onCheckedChange:Re})}),e.jsx(ns,{children:"内容"}),e.jsx(ns,{children:"含义"}),e.jsx(ns,{children:"聊天"}),e.jsx(ns,{children:"状态"}),e.jsx(ns,{className:"text-center",children:"次数"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:r?e.jsx(_t,{children:e.jsx(Ze,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):a.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):a.map(Z=>e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:me.has(Z.id),onCheckedChange:()=>K(Z.id)})}),e.jsx(Ze,{className:"font-medium max-w-[200px]",children:e.jsxs("div",{className:"flex items-center gap-2",children:[Z.is_global&&e.jsx("span",{title:"全局黑话",children:e.jsx(Go,{className:"h-4 w-4 text-blue-500 flex-shrink-0"})}),e.jsx("span",{className:"truncate",title:Z.content,children:Z.content})]})}),e.jsx(Ze,{className:"max-w-[200px] truncate",title:Z.meaning||"",children:Z.meaning||e.jsx("span",{className:"text-muted-foreground",children:"-"})}),e.jsx(Ze,{className:"max-w-[150px] truncate",title:Z.chat_name||Z.chat_id,children:Z.chat_name||Z.chat_id}),e.jsx(Ze,{children:J(Z.is_jargon)}),e.jsx(Ze,{className:"text-center",children:Z.count}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>$(Z),children:[e.jsx(sr,{className:"h-4 w-4 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>G(Z),title:"查看详情",children:e.jsx(ua,{className:"h-4 w-4"})}),e.jsxs(_,{size:"sm",onClick:()=>L(Z),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"删除"]})]})})]},Z.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3 p-4",children:r?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"加载中..."}):a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无数据"}):a.map(Z=>e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(tt,{checked:me.has(Z.id),onCheckedChange:()=>K(Z.id),className:"mt-1"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[Z.is_global&&e.jsx(Go,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}),e.jsx("h3",{className:"font-semibold text-sm break-all",children:Z.content})]}),Z.meaning&&e.jsx("p",{className:"text-sm text-muted-foreground break-all",children:Z.meaning}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[J(Z.is_jargon),e.jsxs("span",{className:"text-muted-foreground",children:["次数: ",Z.count]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground truncate",children:["聊天: ",Z.chat_name||Z.chat_id]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1 pt-2 border-t",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>$(Z),className:"text-xs px-2 py-1 h-auto",children:[e.jsx(sr,{className:"h-3 w-3 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>G(Z),className:"text-xs px-2 py-1 h-auto",children:e.jsx(ua,{className:"h-3 w-3"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>L(Z),className:"text-xs px-2 py-1 h-auto text-destructive hover:text-destructive",children:[e.jsx(os,{className:"h-3 w-3 mr-1"}),"删除"]})]})]},Z.id))}),d>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 px-4 py-3 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",d," 条记录,第 ",h," / ",Math.ceil(d/p)," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(1),disabled:h===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h-1),disabled:h===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{type:"number",value:ge,onChange:Z=>pe(Z.target.value),onKeyDown:Z=>Z.key==="Enter"&&cs(),placeholder:h.toString(),className:"w-16 h-8 text-center",min:1,max:Math.ceil(d/p)}),e.jsx(_,{variant:"outline",size:"sm",onClick:cs,disabled:!ge,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h+1),disabled:h>=Math.ceil(d/p),children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(Math.ceil(d/p)),disabled:h>=Math.ceil(d/p),className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]})]})}),e.jsx(_k,{jargon:M,open:F,onOpenChange:E}),e.jsx(Sk,{open:H,onOpenChange:O,chatList:I,onSuccess:()=>{we(),fe(),O(!1)}}),e.jsx(kk,{jargon:M,open:C,onOpenChange:R,chatList:I,onSuccess:()=>{we(),fe(),R(!1)}}),e.jsx(bs,{open:!!X,onOpenChange:()=>L(null),children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除黑话 "',X?.content,'" 吗?此操作不可撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>X&&A(X),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})}),e.jsx(bs,{open:je,onOpenChange:re,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["您即将删除 ",me.size," 个黑话,此操作无法撤销。确定要继续吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:se,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"确认删除"})]})]})})]})}function _k({jargon:a,open:l,onOpenChange:r}){return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] grid grid-rows-[auto_1fr_auto] overflow-hidden",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"黑话详情"}),e.jsx(at,{children:"查看黑话的完整信息"})]}),e.jsx(ts,{className:"h-full pr-4",children:e.jsxs("div",{className:"space-y-4 pb-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(Gm,{icon:Wr,label:"记录ID",value:a.id.toString(),mono:!0}),e.jsx(Gm,{label:"使用次数",value:a.count.toString()})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"内容"}),e.jsx("div",{className:"text-sm p-2 bg-muted rounded break-all whitespace-pre-wrap",children:a.content})]}),a.raw_content&&e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"原始内容"}),e.jsx("div",{className:"text-sm p-2 bg-muted rounded break-all",children:(()=>{try{const c=JSON.parse(a.raw_content);return Array.isArray(c)?c.map((d,m)=>e.jsxs("div",{children:[m>0&&e.jsx("hr",{className:"my-3 border-border"}),e.jsx("div",{className:"whitespace-pre-wrap",children:d})]},m)):e.jsx("div",{className:"whitespace-pre-wrap",children:a.raw_content})}catch{return e.jsx("div",{className:"whitespace-pre-wrap",children:a.raw_content})}})()})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"含义"}),e.jsx("div",{className:"text-sm p-2 bg-muted rounded break-all",children:a.meaning?e.jsx(bx,{content:a.meaning}):"-"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(Gm,{label:"聊天",value:a.chat_name||a.chat_id}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"状态"}),e.jsxs("div",{className:"flex items-center gap-2",children:[a.is_jargon===!0&&e.jsx(Ce,{variant:"default",className:"bg-green-600",children:"是黑话"}),a.is_jargon===!1&&e.jsx(Ce,{variant:"secondary",children:"非黑话"}),a.is_jargon===null&&e.jsx(Ce,{variant:"outline",children:"未判定"}),a.is_global&&e.jsx(Ce,{variant:"outline",className:"border-blue-500 text-blue-500",children:"全局"}),a.is_complete&&e.jsx(Ce,{variant:"outline",className:"border-purple-500 text-purple-500",children:"推断完成"})]})]})]}),a.inference_with_context&&e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"上下文推断结果"}),e.jsx("div",{className:"p-2 bg-muted rounded break-all whitespace-pre-wrap font-mono text-xs max-h-[200px] overflow-y-auto",children:a.inference_with_context})]}),a.inference_content_only&&e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"纯词条推断结果"}),e.jsx("div",{className:"p-2 bg-muted rounded break-all whitespace-pre-wrap font-mono text-xs max-h-[200px] overflow-y-auto",children:a.inference_content_only})]})]})}),e.jsx(gt,{className:"flex-shrink-0",children:e.jsx(_,{onClick:()=>r(!1),children:"关闭"})})]})}):null}function Gm({icon:a,label:l,value:r,mono:c=!1}){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(T,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[a&&e.jsx(a,{className:"h-3 w-3"}),l]}),e.jsx("div",{className:P("text-sm",c&&"font-mono",!r&&"text-muted-foreground"),children:r||"-"})]})}function Sk({open:a,onOpenChange:l,chatList:r,onSuccess:c}){const[d,m]=u.useState({content:"",meaning:"",chat_id:"",is_global:!1}),[h,f]=u.useState(!1),{toast:p}=nt(),g=async()=>{if(!d.content||!d.chat_id){p({title:"验证失败",description:"请填写必填字段:内容和聊天",variant:"destructive"});return}try{f(!0),await gk(d),p({title:"创建成功",description:"黑话已创建"}),m({content:"",meaning:"",chat_id:"",is_global:!1}),c()}catch(N){p({title:"创建失败",description:N instanceof Error?N.message:"无法创建黑话",variant:"destructive"})}finally{f(!1)}};return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"新增黑话"}),e.jsx(at,{children:"创建新的黑话记录"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"content",children:["内容 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(ae,{id:"content",value:d.content,onChange:N=>m({...d,content:N.target.value}),placeholder:"输入黑话内容"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"meaning",children:"含义"}),e.jsx(pt,{id:"meaning",value:d.meaning||"",onChange:N=>m({...d,meaning:N.target.value}),placeholder:"输入黑话含义(可选)",rows:3})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{htmlFor:"chat_id",children:["聊天 ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsxs(Pe,{value:d.chat_id,onValueChange:N=>m({...d,chat_id:N}),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择关联的聊天"})}),e.jsx(Be,{children:r.map(N=>e.jsx(W,{value:N.chat_id,children:N.chat_name},N.chat_id))})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"is_global",checked:d.is_global,onCheckedChange:N=>m({...d,is_global:N})}),e.jsx(T,{htmlFor:"is_global",children:"设为全局黑话"})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>l(!1),children:"取消"}),e.jsx(_,{onClick:g,disabled:h,children:h?"创建中...":"创建"})]})]})})}function kk({jargon:a,open:l,onOpenChange:r,chatList:c,onSuccess:d}){const[m,h]=u.useState({}),[f,p]=u.useState(!1),{toast:g}=nt();u.useEffect(()=>{a&&h({content:a.content,meaning:a.meaning||"",chat_id:a.stream_id||a.chat_id,is_global:a.is_global,is_jargon:a.is_jargon})},[a]);const N=async()=>{if(a)try{p(!0),await jk(a.id,m),g({title:"保存成功",description:"黑话已更新"}),d()}catch(j){g({title:"保存失败",description:j instanceof Error?j.message:"无法更新黑话",variant:"destructive"})}finally{p(!1)}};return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑黑话"}),e.jsx(at,{children:"修改黑话的信息"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_content",children:"内容"}),e.jsx(ae,{id:"edit_content",value:m.content||"",onChange:j=>h({...m,content:j.target.value}),placeholder:"输入黑话内容"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_meaning",children:"含义"}),e.jsx(pt,{id:"edit_meaning",value:m.meaning||"",onChange:j=>h({...m,meaning:j.target.value}),placeholder:"输入黑话含义",rows:3})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit_chat_id",children:"聊天"}),e.jsxs(Pe,{value:m.chat_id||"",onValueChange:j=>h({...m,chat_id:j}),children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择关联的聊天"})}),e.jsx(Be,{children:c.map(j=>e.jsx(W,{value:j.chat_id,children:j.chat_name},j.chat_id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"黑话状态"}),e.jsxs(Pe,{value:m.is_jargon===null?"null":m.is_jargon?.toString()||"null",onValueChange:j=>h({...m,is_jargon:j==="null"?null:j==="true"}),children:[e.jsx(Ie,{children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"null",children:"未判定"}),e.jsx(W,{value:"true",children:"是黑话"}),e.jsx(W,{value:"false",children:"非黑话"})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"edit_is_global",checked:m.is_global,onCheckedChange:j=>h({...m,is_global:j})}),e.jsx(T,{htmlFor:"edit_is_global",children:"全局黑话"})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(_,{onClick:N,disabled:f,children:f?"保存中...":"保存"})]})]})}):null}const li="/api/webui/person";async function Ck(a){const l=new URLSearchParams;a.page&&l.append("page",a.page.toString()),a.page_size&&l.append("page_size",a.page_size.toString()),a.search&&l.append("search",a.search),a.is_known!==void 0&&l.append("is_known",a.is_known.toString()),a.platform&&l.append("platform",a.platform);const r=await ke(`${li}/list?${l}`,{headers:Zs()});if(!r.ok){const c=await r.json();throw new Error(c.detail||"获取人物列表失败")}return r.json()}async function Tk(a){const l=await ke(`${li}/${a}`,{headers:Zs()});if(!l.ok){const r=await l.json();throw new Error(r.detail||"获取人物详情失败")}return l.json()}async function Ek(a,l){const r=await ke(`${li}/${a}`,{method:"PATCH",headers:Zs(),body:JSON.stringify(l)});if(!r.ok){const c=await r.json();throw new Error(c.detail||"更新人物信息失败")}return r.json()}async function Mk(a){const l=await ke(`${li}/${a}`,{method:"DELETE",headers:Zs()});if(!l.ok){const r=await l.json();throw new Error(r.detail||"删除人物信息失败")}return l.json()}async function Ak(){const a=await ke(`${li}/stats/summary`,{headers:Zs()});if(!a.ok){const l=await a.json();throw new Error(l.detail||"获取统计数据失败")}return a.json()}async function zk(a){const l=await ke(`${li}/batch/delete`,{method:"POST",headers:Zs(),body:JSON.stringify({person_ids:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"批量删除失败")}return l.json()}function Rk(){const[a,l]=u.useState([]),[r,c]=u.useState(!0),[d,m]=u.useState(0),[h,f]=u.useState(1),[p,g]=u.useState(20),[N,j]=u.useState(""),[b,y]=u.useState(void 0),[w,z]=u.useState(void 0),[M,S]=u.useState(null),[F,E]=u.useState(!1),[C,R]=u.useState(!1),[H,O]=u.useState(null),[X,L]=u.useState({total:0,known:0,unknown:0,platforms:{}}),[me,Ne]=u.useState(new Set),[je,re]=u.useState(!1),[ge,pe]=u.useState(""),{toast:D}=nt(),Q=async()=>{try{c(!0);const se=await Ck({page:h,page_size:p,search:N||void 0,is_known:b,platform:w});l(se.data),m(se.total)}catch(se){D({title:"加载失败",description:se instanceof Error?se.message:"无法加载人物信息",variant:"destructive"})}finally{c(!1)}},I=async()=>{try{const se=await Ak();se?.data&&L(se.data)}catch(se){console.error("加载统计数据失败:",se)}};u.useEffect(()=>{Q(),I()},[h,p,N,b,w]);const ue=async se=>{try{const $e=await Tk(se.person_id);S($e.data),E(!0)}catch($e){D({title:"加载详情失败",description:$e instanceof Error?$e.message:"无法加载人物详情",variant:"destructive"})}},Y=se=>{S(se),R(!0)},we=async se=>{try{await Mk(se.person_id),D({title:"删除成功",description:`已删除人物信息: ${se.person_name||se.nickname||se.user_id}`}),O(null),Q(),I()}catch($e){D({title:"删除失败",description:$e instanceof Error?$e.message:"无法删除人物信息",variant:"destructive"})}},fe=u.useMemo(()=>Object.keys(X.platforms),[X.platforms]),Ee=se=>{const $e=new Set(me);$e.has(se)?$e.delete(se):$e.add(se),Ne($e)},G=()=>{me.size===a.length&&a.length>0?Ne(new Set):Ne(new Set(a.map(se=>se.person_id)))},$=()=>{if(me.size===0){D({title:"未选择任何人物",description:"请先选择要删除的人物",variant:"destructive"});return}re(!0)},A=async()=>{try{const se=await zk(Array.from(me));D({title:"批量删除完成",description:se.message}),Ne(new Set),re(!1),Q(),I()}catch(se){D({title:"批量删除失败",description:se instanceof Error?se.message:"批量删除失败",variant:"destructive"})}},K=()=>{const se=parseInt(ge),$e=Math.ceil(d/p);se>=1&&se<=$e?(f(se),pe("")):D({title:"无效的页码",description:`请输入1-${$e}之间的页码`,variant:"destructive"})},Re=se=>se?new Date(se*1e3).toLocaleString("zh-CN"):"-";return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(oc,{className:"h-8 w-8",strokeWidth:2}),"人物信息管理"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"管理麦麦认识的所有人物信息"})]})})}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 pr-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"总人数"}),e.jsx("div",{className:"text-2xl font-bold mt-1",children:X.total})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"已认识"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-green-600",children:X.known})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"未认识"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-muted-foreground",children:X.unknown})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx(T,{htmlFor:"search",children:"搜索"}),e.jsxs("div",{className:"relative mt-1.5",children:[e.jsx($t,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{id:"search",placeholder:"搜索名称、昵称或用户ID...",value:N,onChange:se=>j(se.target.value),className:"pl-9"})]})]}),e.jsxs("div",{children:[e.jsx(T,{htmlFor:"filter-known",children:"认识状态"}),e.jsxs(Pe,{value:b===void 0?"all":b.toString(),onValueChange:se=>{y(se==="all"?void 0:se==="true"),f(1)},children:[e.jsx(Ie,{id:"filter-known",className:"mt-1.5",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部"}),e.jsx(W,{value:"true",children:"已认识"}),e.jsx(W,{value:"false",children:"未认识"})]})]})]}),e.jsxs("div",{children:[e.jsx(T,{htmlFor:"filter-platform",children:"平台"}),e.jsxs(Pe,{value:w||"all",onValueChange:se=>{z(se==="all"?void 0:se),f(1)},children:[e.jsx(Ie,{id:"filter-platform",className:"mt-1.5",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部平台"}),fe.map(se=>e.jsxs(W,{value:se,children:[se," (",X.platforms[se],")"]},se))]})]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 mt-4 pt-4 border-t",children:[e.jsx("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:me.size>0&&e.jsxs("span",{children:["已选择 ",me.size," 个人物"]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{htmlFor:"page-size",className:"text-sm whitespace-nowrap",children:"每页显示"}),e.jsxs(Pe,{value:p.toString(),onValueChange:se=>{g(parseInt(se)),f(1),Ne(new Set)},children:[e.jsx(Ie,{id:"page-size",className:"w-20",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"10",children:"10"}),e.jsx(W,{value:"20",children:"20"}),e.jsx(W,{value:"50",children:"50"}),e.jsx(W,{value:"100",children:"100"})]})]}),me.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>Ne(new Set),children:"取消选择"}),e.jsxs(_,{variant:"destructive",size:"sm",onClick:$,children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"批量删除"]})]})]})]})]}),e.jsxs("div",{className:"rounded-lg border bg-card",children:[e.jsx("div",{className:"hidden md:block",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{className:"w-12",children:e.jsx(tt,{checked:a.length>0&&me.size===a.length,onCheckedChange:G,"aria-label":"全选"})}),e.jsx(ns,{children:"状态"}),e.jsx(ns,{children:"名称"}),e.jsx(ns,{children:"昵称"}),e.jsx(ns,{children:"平台"}),e.jsx(ns,{children:"用户ID"}),e.jsx(ns,{children:"最后更新"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:r?e.jsx(_t,{children:e.jsx(Ze,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):a.length===0?e.jsx(_t,{children:e.jsx(Ze,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):a.map(se=>e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(tt,{checked:me.has(se.person_id),onCheckedChange:()=>Ee(se.person_id),"aria-label":`选择 ${se.person_name||se.nickname||se.user_id}`})}),e.jsx(Ze,{children:e.jsx("div",{className:P("inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium",se.is_known?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-400"),children:se.is_known?"已认识":"未认识"})}),e.jsx(Ze,{className:"font-medium",children:se.person_name||e.jsx("span",{className:"text-muted-foreground",children:"-"})}),e.jsx(Ze,{children:se.nickname||"-"}),e.jsx(Ze,{children:se.platform}),e.jsx(Ze,{className:"font-mono text-sm",children:se.user_id}),e.jsx(Ze,{className:"text-sm text-muted-foreground",children:Re(se.last_know)}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(_,{variant:"default",size:"sm",onClick:()=>ue(se),children:[e.jsx(ua,{className:"h-4 w-4 mr-1"}),"详情"]}),e.jsxs(_,{variant:"default",size:"sm",onClick:()=>Y(se),children:[e.jsx(sr,{className:"h-4 w-4 mr-1"}),"编辑"]}),e.jsxs(_,{size:"sm",onClick:()=>O(se),className:"bg-red-600 hover:bg-red-700 text-white",children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"删除"]})]})})]},se.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3 p-4",children:r?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"加载中..."}):a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无数据"}):a.map(se=>e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(tt,{checked:me.has(se.person_id),onCheckedChange:()=>Ee(se.person_id),className:"mt-1"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:P("inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium mb-2",se.is_known?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-400"),children:se.is_known?"已认识":"未认识"}),e.jsx("h3",{className:"font-semibold text-sm line-clamp-1 w-full break-all",children:se.person_name||e.jsx("span",{className:"text-muted-foreground",children:"未命名"})}),se.nickname&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1 w-full break-all",children:["昵称: ",se.nickname]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"平台"}),e.jsx("p",{className:"font-medium text-xs",children:se.platform})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"用户ID"}),e.jsx("p",{className:"font-mono text-xs truncate",title:se.user_id,children:se.user_id})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"最后更新"}),e.jsx("p",{className:"text-xs",children:Re(se.last_know)})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1 pt-2 border-t overflow-hidden",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>ue(se),className:"text-xs px-2 py-1 h-auto flex-shrink-0",children:[e.jsx(ua,{className:"h-3 w-3 mr-1"}),"查看"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>Y(se),className:"text-xs px-2 py-1 h-auto flex-shrink-0",children:[e.jsx(sr,{className:"h-3 w-3 mr-1"}),"编辑"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>O(se),className:"text-xs px-2 py-1 h-auto flex-shrink-0 text-destructive hover:text-destructive",children:[e.jsx(os,{className:"h-3 w-3 mr-1"}),"删除"]})]})]},se.id))}),d>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 px-4 py-3 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",d," 条记录,第 ",h," / ",Math.ceil(d/p)," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(1),disabled:h===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h-1),disabled:h===1,children:[e.jsx(Pa,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"上一页"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{type:"number",value:ge,onChange:se=>pe(se.target.value),onKeyDown:se=>se.key==="Enter"&&K(),placeholder:h.toString(),className:"w-16 h-8 text-center",min:1,max:Math.ceil(d/p)}),e.jsx(_,{variant:"outline",size:"sm",onClick:K,disabled:!ge,className:"h-8",children:"跳转"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>f(h+1),disabled:h>=Math.ceil(d/p),children:[e.jsx("span",{className:"hidden sm:inline",children:"下一页"}),e.jsx(ra,{className:"h-4 w-4 sm:ml-1"})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>f(Math.ceil(d/p)),disabled:h>=Math.ceil(d/p),className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]})]})}),e.jsx(Dk,{person:M,open:F,onOpenChange:E}),e.jsx(Ok,{person:M,open:C,onOpenChange:R,onSuccess:()=>{Q(),I(),R(!1)}}),e.jsx(bs,{open:!!H,onOpenChange:()=>O(null),children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认删除"}),e.jsxs(gs,{children:['确定要删除人物信息 "',H?.person_name||H?.nickname||H?.user_id,'" 吗? 此操作不可撤销。']})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:()=>H&&we(H),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})}),e.jsx(bs,{open:je,onOpenChange:re,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"确认批量删除"}),e.jsxs(gs,{children:["确定要删除选中的 ",me.size," 个人物信息吗? 此操作不可撤销。"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{children:"取消"}),e.jsx(js,{onClick:A,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})})]})}function Dk({person:a,open:l,onOpenChange:r}){if(!a)return null;const c=d=>d?new Date(d*1e3).toLocaleString("zh-CN"):"-";return e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"人物详情"}),e.jsxs(at,{children:["查看 ",a.person_name||a.nickname||a.user_id," 的完整信息"]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx($l,{icon:Fl,label:"人物名称",value:a.person_name}),e.jsx($l,{icon:Ba,label:"昵称",value:a.nickname}),e.jsx($l,{icon:Wr,label:"用户ID",value:a.user_id,mono:!0}),e.jsx($l,{icon:Wr,label:"人物ID",value:a.person_id,mono:!0}),e.jsx($l,{label:"平台",value:a.platform}),e.jsx($l,{label:"状态",value:a.is_known?"已认识":"未认识"})]}),a.name_reason&&e.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"名称设定原因"}),e.jsx("p",{className:"mt-1 text-sm",children:a.name_reason})]}),a.memory_points&&e.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"个人印象"}),e.jsx("p",{className:"mt-1 text-sm whitespace-pre-wrap",children:a.memory_points})]}),a.group_nick_name&&a.group_nick_name.length>0&&e.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"群昵称"}),e.jsx("div",{className:"mt-2 space-y-1",children:a.group_nick_name.map((d,m)=>e.jsxs("div",{className:"text-sm flex items-center gap-2",children:[e.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:d.group_id}),e.jsx("span",{children:"→"}),e.jsx("span",{children:d.group_nick_name})]},m))})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsx($l,{icon:da,label:"认识时间",value:c(a.know_times)}),e.jsx($l,{icon:da,label:"首次记录",value:c(a.know_since)}),e.jsx($l,{icon:da,label:"最后更新",value:c(a.last_know)})]})]}),e.jsx(gt,{children:e.jsx(_,{onClick:()=>r(!1),children:"关闭"})})]})})}function $l({icon:a,label:l,value:r,mono:c=!1}){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(T,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[a&&e.jsx(a,{className:"h-3 w-3"}),l]}),e.jsx("div",{className:P("text-sm",c&&"font-mono",!r&&"text-muted-foreground"),children:r||"-"})]})}function Ok({person:a,open:l,onOpenChange:r,onSuccess:c}){const[d,m]=u.useState({}),[h,f]=u.useState(!1),{toast:p}=nt();u.useEffect(()=>{a&&m({person_name:a.person_name||"",name_reason:a.name_reason||"",nickname:a.nickname||"",is_known:a.is_known})},[a]);const g=async()=>{if(a)try{f(!0),await Ek(a.person_id,d),p({title:"保存成功",description:"人物信息已更新"}),c()}catch(N){p({title:"保存失败",description:N instanceof Error?N.message:"无法更新人物信息",variant:"destructive"})}finally{f(!1)}};return a?e.jsx(Qs,{open:l,onOpenChange:r,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑人物信息"}),e.jsxs(at,{children:["修改 ",a.person_name||a.nickname||a.user_id," 的信息"]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"person_name",children:"人物名称"}),e.jsx(ae,{id:"person_name",value:d.person_name||"",onChange:N=>m({...d,person_name:N.target.value}),placeholder:"为这个人设置一个名称"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"nickname",children:"昵称"}),e.jsx(ae,{id:"nickname",value:d.nickname||"",onChange:N=>m({...d,nickname:N.target.value}),placeholder:"昵称"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"name_reason",children:"名称设定原因"}),e.jsx(pt,{id:"name_reason",value:d.name_reason||"",onChange:N=>m({...d,name_reason:N.target.value}),placeholder:"为什么这样称呼这个人?",rows:2})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[e.jsxs("div",{children:[e.jsx(T,{htmlFor:"is_known",className:"text-base font-medium",children:"已认识"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"标记是否已经认识这个人"})]}),e.jsx(qe,{id:"is_known",checked:d.is_known,onCheckedChange:N=>m({...d,is_known:N})})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>r(!1),children:"取消"}),e.jsx(_,{onClick:g,disabled:h,children:h?"保存中...":"保存"})]})]})}):null}var Lk=S1();const tj=mw(Lk),Mx="/api/webui";async function Uk(a=100,l="all"){const r=`${Mx}/knowledge/graph?limit=${a}&node_type=${l}`,c=await fetch(r);if(!c.ok)throw new Error(`获取知识图谱失败: ${c.status}`);return c.json()}async function $k(){const a=await fetch(`${Mx}/knowledge/stats`);if(!a.ok)throw new Error("获取知识图谱统计信息失败");return a.json()}async function Ik(a){const l=await fetch(`${Mx}/knowledge/search?query=${encodeURIComponent(a)}`);if(!l.ok)throw new Error("搜索知识节点失败");return l.json()}const dN=u.memo(({data:a})=>e.jsxs("div",{className:"px-4 py-2 shadow-md rounded-lg bg-gradient-to-br from-blue-500 to-blue-600 border-2 border-blue-700 min-w-[120px]",children:[e.jsx(Yo,{type:"target",position:Jo.Top}),e.jsx("div",{className:"font-semibold text-white text-sm truncate max-w-[200px]",title:a.content,children:a.label}),e.jsx(Yo,{type:"source",position:Jo.Bottom})]}));dN.displayName="EntityNode";const uN=u.memo(({data:a})=>e.jsxs("div",{className:"px-3 py-2 shadow-md rounded-md bg-gradient-to-br from-green-500 to-green-600 border-2 border-green-700 min-w-[100px]",children:[e.jsx(Yo,{type:"target",position:Jo.Top}),e.jsx("div",{className:"font-medium text-white text-xs truncate max-w-[150px]",title:a.content,children:a.label}),e.jsx(Yo,{type:"source",position:Jo.Bottom})]}));uN.displayName="ParagraphNode";const Bk={entity:dN,paragraph:uN};function Pk(a,l){const r=new tj.graphlib.Graph;r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:"TB",ranksep:100,nodesep:80});const c=[],d=[];return a.forEach(m=>{r.setNode(m.id,{width:150,height:50})}),l.forEach(m=>{r.setEdge(m.source,m.target)}),tj.layout(r),a.forEach(m=>{const h=r.node(m.id);c.push({id:m.id,type:m.type,position:{x:h.x-75,y:h.y-25},data:{label:m.content.slice(0,20)+(m.content.length>20?"...":""),content:m.content}})}),l.forEach((m,h)=>{const f={id:`edge-${h}`,source:m.source,target:m.target,animated:a.length<=200&&m.weight>5,style:{strokeWidth:Math.min(m.weight/2,5),opacity:.6}};m.weight>10&&a.length<100&&(f.label=`${m.weight.toFixed(0)}`),d.push(f)}),{nodes:c,edges:d}}function Fk(){const a=ha(),[l,r]=u.useState(!1),[c,d]=u.useState(null),[m,h]=u.useState(""),[f,p]=u.useState("all"),[g,N]=u.useState(50),[j,b]=u.useState("50"),[y,w]=u.useState(!1),[z,M]=u.useState(!0),[S,F]=u.useState(!1),[E,C]=u.useState(!1),[R,H,O]=k1([]),[X,L,me]=C1([]),[Ne,je]=u.useState(0),[re,ge]=u.useState(null),[pe,D]=u.useState(null),{toast:Q}=nt(),I=u.useCallback(A=>A.type==="entity"?"#6366f1":A.type==="paragraph"?"#10b981":"#6b7280",[]),ue=u.useCallback(async(A=!1)=>{try{if(!A&&g>200){C(!0);return}r(!0);const[K,Re]=await Promise.all([Uk(g,f),$k()]);if(d(Re),K.nodes.length===0){Q({title:"提示",description:"知识库为空,请先导入知识数据"}),H([]),L([]);return}const{nodes:se,edges:$e}=Pk(K.nodes,K.edges);H(se),L($e),je(se.length),Re&&Re.total_nodes>g&&Q({title:"提示",description:`知识图谱包含 ${Re.total_nodes} 个节点,当前显示 ${se.length} 个`}),Q({title:"加载成功",description:`已加载 ${se.length} 个节点,${$e.length} 条边`})}catch(K){console.error("加载知识图谱失败:",K),Q({title:"加载失败",description:K instanceof Error?K.message:"未知错误",variant:"destructive"})}finally{r(!1)}},[g,f,Q]),Y=u.useCallback(async()=>{if(!m.trim()){Q({title:"提示",description:"请输入搜索关键词"});return}try{const A=await Ik(m);if(A.length===0){Q({title:"未找到",description:"没有找到匹配的节点"});return}const K=new Set(A.map(Re=>Re.id));H(Re=>Re.map(se=>({...se,style:{...se.style,opacity:K.has(se.id)?1:.3,filter:K.has(se.id)?"brightness(1.2)":"brightness(0.8)"}}))),Q({title:"搜索完成",description:`找到 ${A.length} 个匹配节点`})}catch(A){console.error("搜索失败:",A),Q({title:"搜索失败",description:A instanceof Error?A.message:"未知错误",variant:"destructive"})}},[m,Q]),we=u.useCallback(()=>{H(A=>A.map(K=>({...K,style:{...K.style,opacity:1,filter:"brightness(1)"}})))},[]),fe=u.useCallback(()=>{M(!1),F(!0),ue()},[ue]),Ee=u.useCallback(()=>{C(!1),setTimeout(()=>{ue(!0)},0)},[ue]),G=u.useCallback((A,K)=>{ge({id:K.id,type:K.type,content:K.data.content})},[]);u.useEffect(()=>{z||S&&ue()},[g,f,z,S]);const $=u.useCallback((A,K)=>{const Re=R.find(cs=>cs.id===K.source),se=R.find(cs=>cs.id===K.target),$e=X.find(cs=>cs.id===K.id);Re&&se&&$e&&D({source:{id:Re.id,type:Re.type,content:Re.data.content},target:{id:se.id,type:se.type,content:se.data.content},edge:{source:K.source,target:K.target,weight:parseFloat(K.label||"0")}})},[R,X]);return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex-shrink-0 p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"麦麦知识库图谱"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"可视化知识实体与关系网络"})]}),c&&e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(Zr,{className:"h-3 w-3"}),"节点: ",c.total_nodes]}),e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(xv,{className:"h-3 w-3"}),"边: ",c.total_edges]}),e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(Yt,{className:"h-3 w-3"}),"实体: ",c.entity_nodes]}),e.jsxs(Ce,{variant:"outline",className:"gap-1",children:[e.jsx(Ua,{className:"h-3 w-3"}),"段落: ",c.paragraph_nodes]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 mt-4",children:[e.jsxs("div",{className:"flex-1 flex gap-2",children:[e.jsx(ae,{placeholder:"搜索节点内容...",value:m,onChange:A=>h(A.target.value),onKeyDown:A=>A.key==="Enter"&&Y(),className:"flex-1"}),e.jsx(_,{onClick:Y,size:"sm",children:e.jsx($t,{className:"h-4 w-4"})}),e.jsx(_,{onClick:we,variant:"outline",size:"sm",children:"重置"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(Pe,{value:f,onValueChange:A=>p(A),children:[e.jsx(Ie,{className:"w-[120px]",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部节点"}),e.jsx(W,{value:"entity",children:"仅实体"}),e.jsx(W,{value:"paragraph",children:"仅段落"})]})]}),e.jsxs(Pe,{value:g===1e4?"all":y?"custom":g.toString(),onValueChange:A=>{A==="custom"?(w(!0),b(g.toString())):A==="all"?(w(!1),N(1e4)):(w(!1),N(Number(A)))},children:[e.jsx(Ie,{className:"w-[120px]",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"50",children:"50 节点"}),e.jsx(W,{value:"100",children:"100 节点"}),e.jsx(W,{value:"200",children:"200 节点"}),e.jsx(W,{value:"500",children:"500 节点"}),e.jsx(W,{value:"1000",children:"1000 节点"}),e.jsx(W,{value:"all",children:"全部 (最多10000)"}),e.jsx(W,{value:"custom",children:"自定义..."})]})]}),y&&e.jsx(ae,{type:"number",min:"50",value:j,onChange:A=>b(A.target.value),onBlur:()=>{const A=parseInt(j);!isNaN(A)&&A>=50?N(A):(b("50"),N(50))},onKeyDown:A=>{if(A.key==="Enter"){const K=parseInt(j);!isNaN(K)&&K>=50?N(K):(b("50"),N(50))}},placeholder:"最少50个",className:"w-[120px]"}),e.jsx(_,{onClick:()=>ue(),variant:"outline",size:"sm",disabled:l,children:e.jsx(dt,{className:P("h-4 w-4",l&&"animate-spin")})})]})]})]}),e.jsx("div",{className:"flex-1 relative",children:l?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(dt,{className:"h-8 w-8 animate-spin mx-auto mb-2 text-muted-foreground"}),e.jsx("p",{className:"text-muted-foreground",children:"加载知识图谱中..."})]})}):R.length===0?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Zr,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"知识库为空"}),e.jsx("p",{className:"text-muted-foreground",children:"请先导入知识数据"})]})}):e.jsxs(T1,{nodes:R,edges:X,onNodesChange:O,onEdgesChange:me,onNodeClick:G,onEdgeClick:$,nodeTypes:Bk,fitView:!0,minZoom:.05,maxZoom:1.5,defaultViewport:{x:0,y:0,zoom:.5},elevateNodesOnSelect:Ne<=500,nodesDraggable:Ne<=1e3,attributionPosition:"bottom-left",children:[e.jsx(E1,{variant:M1.Dots,gap:12,size:1}),e.jsx(A1,{}),Ne<=500&&e.jsx(z1,{nodeColor:I,nodeBorderRadius:8,pannable:!0,zoomable:!0}),e.jsxs(R1,{position:"top-right",className:"bg-background/95 backdrop-blur-sm rounded-lg border p-3 shadow-lg",children:[e.jsx("div",{className:"text-sm font-semibold mb-2",children:"图例"}),e.jsxs("div",{className:"space-y-2 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-blue-500 to-blue-600 border-2 border-blue-700"}),e.jsx("span",{children:"实体节点"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-green-500 to-green-600 border-2 border-green-700"}),e.jsx("span",{children:"段落节点"})]}),Ne>200&&e.jsxs("div",{className:"mt-2 pt-2 border-t text-yellow-600 dark:text-yellow-500",children:[e.jsx("div",{className:"font-semibold",children:"性能模式"}),e.jsx("div",{children:"已禁用动画"}),Ne>500&&e.jsx("div",{children:"已禁用缩略图"})]})]})]})]})}),e.jsx(Qs,{open:!!re,onOpenChange:A=>!A&&ge(null),children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] grid grid-rows-[auto_1fr_auto] overflow-hidden",children:[e.jsx(qs,{children:e.jsx(Vs,{children:"节点详情"})}),re&&e.jsx(ts,{className:"h-full pr-4",children:e.jsxs("div",{className:"space-y-4 pb-2",children:[e.jsx("div",{className:"grid grid-cols-2 gap-4",children:e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"类型"}),e.jsx("div",{className:"mt-1",children:e.jsx(Ce,{variant:re.type==="entity"?"default":"secondary",children:re.type==="entity"?"🏷️ 实体":"📄 段落"})})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"ID"}),e.jsx("code",{className:"mt-1 block p-2 bg-muted rounded text-xs break-all",children:re.id})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"内容"}),e.jsx("div",{className:"mt-1 p-3 bg-muted rounded border",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap break-words",children:re.content})}),re.type==="paragraph"&&re.content&&re.content.length<20&&e.jsx("div",{className:"mt-2 p-3 bg-yellow-50 dark:bg-yellow-950 border border-yellow-200 dark:border-yellow-800 rounded",children:e.jsxs("p",{className:"text-xs text-yellow-800 dark:text-yellow-200",children:["💡 ",e.jsx("strong",{children:"提示:"}),"段落内容显示不完整?",e.jsx("br",{}),"您可以在 ",e.jsx("strong",{children:"配置 → WebUI 服务配置"}),' 中启用 "在知识图谱中加载段落完整内容" 选项,以显示段落的完整文本。',e.jsx("br",{}),"注意:此功能会额外再次加载 embedding store,占用约数百MB内存。不建议在生产环境中长期开启。"]})})]})]})})]})}),e.jsx(Qs,{open:!!pe,onOpenChange:A=>!A&&D(null),children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-hidden flex flex-col",children:[e.jsx(qs,{children:e.jsx(Vs,{children:"边详情"})}),pe&&e.jsx(ts,{className:"flex-1 pr-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0 p-3 bg-blue-50 dark:bg-blue-950 rounded border-2 border-blue-200 dark:border-blue-800",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"源节点"}),e.jsx("div",{className:"font-medium text-sm mb-2 truncate",children:pe.source.content}),e.jsxs("code",{className:"text-xs text-muted-foreground truncate block",children:[pe.source.id.slice(0,40),"..."]})]}),e.jsx("div",{className:"text-2xl text-muted-foreground flex-shrink-0",children:"→"}),e.jsxs("div",{className:"flex-1 min-w-0 p-3 bg-green-50 dark:bg-green-950 rounded border-2 border-green-200 dark:border-green-800",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"目标节点"}),e.jsx("div",{className:"font-medium text-sm mb-2 truncate",children:pe.target.content}),e.jsxs("code",{className:"text-xs text-muted-foreground truncate block",children:[pe.target.id.slice(0,40),"..."]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"权重"}),e.jsx("div",{className:"mt-1",children:e.jsx(Ce,{variant:"outline",className:"text-base font-mono",children:pe.edge.weight.toFixed(4)})})]})]})})]})}),e.jsx(bs,{open:z,onOpenChange:M,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"加载知识图谱"}),e.jsxs(gs,{children:["知识图谱的动态展示会消耗较多系统资源。",e.jsx("br",{}),"确定要加载知识图谱吗?"]})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:()=>a({to:"/"}),children:"取消 (返回首页)"}),e.jsx(js,{onClick:fe,children:"确认加载"})]})]})}),e.jsx(bs,{open:E,onOpenChange:C,children:e.jsxs(xs,{children:[e.jsxs(hs,{children:[e.jsx(ps,{children:"⚠️ 节点数量较多"}),e.jsx(gs,{asChild:!0,children:e.jsxs("div",{children:[e.jsxs("p",{children:["您正在尝试加载 ",e.jsx("strong",{className:"text-orange-600",children:g>=1e4?"全部 (最多10000个)":g})," 个节点。"]}),e.jsx("p",{className:"mt-4",children:"节点数量过多可能导致:"}),e.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[e.jsx("li",{children:"页面加载时间较长"}),e.jsx("li",{children:"浏览器卡顿或崩溃"}),e.jsx("li",{children:"系统资源占用过高"})]}),e.jsx("p",{className:"mt-4",children:"建议先选择较少的节点数量 (50-200 个)。"})]})})]}),e.jsxs(fs,{children:[e.jsx(vs,{onClick:()=>{C(!1),g>200&&(N(50),w(!1))},children:"取消"}),e.jsx(js,{onClick:Ee,className:"bg-orange-600 hover:bg-orange-700",children:"我了解风险,继续加载"})]})]})})]})}function Hk(){return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-none border-b bg-card/50 px-6 py-4",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"麦麦知识库管理"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"管理和组织麦麦的知识库内容"})]})})}),e.jsx("div",{className:"flex-1 overflow-auto p-6",children:e.jsx("div",{className:"mx-auto max-w-4xl",children:e.jsxs(Te,{children:[e.jsxs(Oe,{className:"text-center",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-20 w-20 items-center justify-center rounded-full bg-primary/10",children:e.jsx(Zr,{className:"h-10 w-10 text-primary"})}),e.jsx(Ue,{className:"text-2xl",children:"麦麦知识库管理"}),e.jsx(Ns,{className:"text-base",children:"功能开发中,敬请期待"})]}),e.jsx(ze,{className:"text-center text-sm text-muted-foreground",children:e.jsx("p",{children:"此功能将提供知识库的创建、编辑、导入和管理能力"})})]})})})]})}function aj({className:a,classNames:l,showOutsideDays:r=!0,captionLayout:c="label",buttonVariant:d="ghost",formatters:m,components:h,...f}){const p=Ev();return e.jsx(j1,{showOutsideDays:r,className:P("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,a),captionLayout:c,formatters:{formatMonthDropdown:g=>g.toLocaleString("default",{month:"short"}),...m},classNames:{root:P("w-fit",p.root),months:P("relative flex flex-col gap-4 md:flex-row",p.months),month:P("flex w-full flex-col gap-4",p.month),nav:P("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",p.nav),button_previous:P(si({variant:d}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",p.button_previous),button_next:P(si({variant:d}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",p.button_next),month_caption:P("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",p.month_caption),dropdowns:P("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",p.dropdowns),dropdown_root:P("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",p.dropdown_root),dropdown:P("bg-popover absolute inset-0 opacity-0",p.dropdown),caption_label:P("select-none font-medium",c==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",p.caption_label),table:"w-full border-collapse",weekdays:P("flex",p.weekdays),weekday:P("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",p.weekday),week:P("mt-2 flex w-full",p.week),week_number_header:P("w-[--cell-size] select-none",p.week_number_header),week_number:P("text-muted-foreground select-none text-[0.8rem]",p.week_number),day:P("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",p.day),range_start:P("bg-accent rounded-l-md",p.range_start),range_middle:P("rounded-none",p.range_middle),range_end:P("bg-accent rounded-r-md",p.range_end),today:P("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",p.today),outside:P("text-muted-foreground aria-selected:text-muted-foreground",p.outside),disabled:P("text-muted-foreground opacity-50",p.disabled),hidden:P("invisible",p.hidden),...l},components:{Root:({className:g,rootRef:N,...j})=>e.jsx("div",{"data-slot":"calendar",ref:N,className:P(g),...j}),Chevron:({className:g,orientation:N,...j})=>N==="left"?e.jsx(Pa,{className:P("size-4",g),...j}):N==="right"?e.jsx(ra,{className:P("size-4",g),...j}):e.jsx(Ia,{className:P("size-4",g),...j}),DayButton:qk,WeekNumber:({children:g,...N})=>e.jsx("td",{...N,children:e.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:g})}),...h},...f})}function qk({className:a,day:l,modifiers:r,...c}){const d=Ev(),m=u.useRef(null);return u.useEffect(()=>{r.focused&&m.current?.focus()},[r.focused]),e.jsx(_,{ref:m,variant:"ghost",size:"icon","data-day":l.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:P("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",d.day,a),...c})}const Uo={xs:{label:"小",rowHeight:28,class:"text-[10px] sm:text-xs"},sm:{label:"中",rowHeight:36,class:"text-xs sm:text-sm"},base:{label:"大",rowHeight:44,class:"text-sm sm:text-base"}};function Vk(){const[a,l]=u.useState([]),[r,c]=u.useState(""),[d,m]=u.useState("all"),[h,f]=u.useState("all"),[p,g]=u.useState(void 0),[N,j]=u.useState(void 0),[b,y]=u.useState(!0),[w,z]=u.useState(!1),[M,S]=u.useState("xs"),[F,E]=u.useState(4),[C,R]=u.useState(!1),H=u.useRef(null);u.useEffect(()=>{const Y=Qn.getAllLogs();l(Y);const we=Qn.onLog(()=>{l(Qn.getAllLogs())}),fe=Qn.onConnectionChange(Ee=>{z(Ee)});return()=>{we(),fe()}},[]);const O=u.useMemo(()=>{const Y=new Set(a.map(we=>we.module).filter(we=>we&&we.trim()!==""));return Array.from(Y).sort()},[a]),X=Y=>{switch(Y){case"DEBUG":return"text-muted-foreground";case"INFO":return"text-blue-500 dark:text-blue-400";case"WARNING":return"text-yellow-600 dark:text-yellow-500";case"ERROR":return"text-red-600 dark:text-red-500";case"CRITICAL":return"text-red-700 dark:text-red-400 font-bold";default:return"text-foreground"}},L=Y=>{switch(Y){case"DEBUG":return"bg-gray-800/30 dark:bg-gray-800/50";case"INFO":return"bg-blue-900/20 dark:bg-blue-500/20";case"WARNING":return"bg-yellow-900/20 dark:bg-yellow-500/20";case"ERROR":return"bg-red-900/20 dark:bg-red-500/20";case"CRITICAL":return"bg-red-900/30 dark:bg-red-600/30";default:return"bg-gray-800/20 dark:bg-gray-800/30"}},me=()=>{window.location.reload()},Ne=()=>{Qn.clearLogs(),l([])},je=()=>{const Y=pe.map(G=>`${G.timestamp} [${G.level.padEnd(8)}] [${G.module}] ${G.message}`).join(` +`),we=new Blob([Y],{type:"text/plain;charset=utf-8"}),fe=URL.createObjectURL(we),Ee=document.createElement("a");Ee.href=fe,Ee.download=`logs-${Em(new Date,"yyyy-MM-dd-HHmmss")}.txt`,Ee.click(),URL.revokeObjectURL(fe)},re=()=>{y(!b)},ge=()=>{g(void 0),j(void 0)},pe=u.useMemo(()=>a.filter(Y=>{const we=r===""||Y.message.toLowerCase().includes(r.toLowerCase())||Y.module.toLowerCase().includes(r.toLowerCase()),fe=d==="all"||Y.level===d,Ee=h==="all"||Y.module===h;let G=!0;if(p||N){const $=new Date(Y.timestamp);if(p){const A=new Date(p);A.setHours(0,0,0,0),G=G&&$>=A}if(N){const A=new Date(N);A.setHours(23,59,59,999),G=G&&$<=A}}return we&&fe&&Ee&&G}),[a,r,d,h,p,N]),D=Uo[M].rowHeight+F,Q=aw({count:pe.length,getScrollElement:()=>H.current,estimateSize:()=>D,overscan:50}),I=u.useRef(!1),ue=u.useRef(pe.length);return u.useEffect(()=>{const Y=H.current;if(!Y)return;const we=()=>{if(I.current)return;const{scrollTop:fe,scrollHeight:Ee,clientHeight:G}=Y,$=Ee-fe-G;$>100&&b?y(!1):$<50&&!b&&y(!0)};return Y.addEventListener("scroll",we,{passive:!0}),()=>Y.removeEventListener("scroll",we)},[b]),u.useEffect(()=>{const Y=pe.length>ue.current;ue.current=pe.length,b&&pe.length>0&&Y&&(I.current=!0,Q.scrollToIndex(pe.length-1,{align:"end",behavior:"auto"}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{I.current=!1})}))},[pe.length,b,Q]),e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex-shrink-0 space-y-2 sm:space-y-3 p-2 sm:p-3 lg:p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg sm:text-xl lg:text-2xl font-bold",children:"日志查看器"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 hidden sm:block",children:"实时查看和分析麦麦运行日志"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:P("h-2 w-2 sm:h-2.5 sm:w-2.5 rounded-full",w?"bg-green-500 animate-pulse":"bg-red-500")}),e.jsx("span",{className:"text-xs text-muted-foreground",children:w?"已连接":"未连接"})]})]}),e.jsx(Te,{className:"p-2 sm:p-3",children:e.jsx(xc,{open:C,onOpenChange:R,children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"flex-1 relative min-w-0",children:[e.jsx($t,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsx(ae,{placeholder:"搜索日志...",value:r,onChange:Y=>c(Y.target.value),className:"pl-8 h-8 text-xs sm:text-sm"})]}),e.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[e.jsxs(_,{variant:b?"default":"outline",size:"sm",onClick:re,className:"h-8 px-2",title:b?"自动滚动":"已暂停",children:[b?e.jsx(F_,{className:"h-3.5 w-3.5"}):e.jsx(H_,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"ml-1 text-xs hidden sm:inline",children:b?"滚动":"暂停"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:Ne,className:"h-8 px-2",title:"清空日志",children:[e.jsx(os,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"ml-1 text-xs hidden md:inline",children:"清空"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:je,className:"h-8 px-2 hidden sm:flex",title:"导出日志",children:[e.jsx(na,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"ml-1 text-xs hidden lg:inline",children:"导出"})]}),e.jsx(hc,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:"h-8 px-2",title:C?"收起筛选":"展开筛选",children:[e.jsx(Po,{className:"h-3.5 w-3.5"}),C?e.jsx(Xr,{className:"h-3.5 w-3.5 ml-1"}):e.jsx(Ia,{className:"h-3.5 w-3.5 ml-1"})]})})]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground text-center sm:text-right -mt-1",children:[e.jsxs("span",{className:"font-mono",children:[pe.length," / ",a.length]}),e.jsx("span",{className:"ml-1",children:"条日志"})]}),e.jsxs(fc,{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:gap-2",children:[e.jsxs(Pe,{value:d,onValueChange:m,children:[e.jsxs(Ie,{className:"w-full sm:flex-1 h-8 text-xs",children:[e.jsx(Po,{className:"h-3.5 w-3.5 mr-1.5"}),e.jsx(Fe,{placeholder:"级别"})]}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部级别"}),e.jsx(W,{value:"DEBUG",children:"DEBUG"}),e.jsx(W,{value:"INFO",children:"INFO"}),e.jsx(W,{value:"WARNING",children:"WARNING"}),e.jsx(W,{value:"ERROR",children:"ERROR"}),e.jsx(W,{value:"CRITICAL",children:"CRITICAL"})]})]}),e.jsxs(Pe,{value:h,onValueChange:f,children:[e.jsxs(Ie,{className:"w-full sm:flex-1 h-8 text-xs",children:[e.jsx(Po,{className:"h-3.5 w-3.5 mr-1.5"}),e.jsx(Fe,{placeholder:"模块"})]}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部模块"}),O.map(Y=>e.jsx(W,{value:Y,children:Y},Y))]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:gap-2",children:[e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:P("w-full sm:flex-1 justify-start text-left font-normal h-8",!p&&"text-muted-foreground"),children:[e.jsx(Ko,{className:"mr-1.5 h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs",children:p?Em(p,"PP",{locale:Oo}):"开始日期"})]})}),e.jsx(tl,{className:"w-auto p-0",align:"start",children:e.jsx(aj,{mode:"single",selected:p,onSelect:g,initialFocus:!0,locale:Oo})})]}),e.jsxs(cl,{children:[e.jsx(ol,{asChild:!0,children:e.jsxs(_,{variant:"outline",size:"sm",className:P("w-full sm:flex-1 justify-start text-left font-normal h-8",!N&&"text-muted-foreground"),children:[e.jsx(Ko,{className:"mr-1.5 h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs",children:N?Em(N,"PP",{locale:Oo}):"结束日期"})]})}),e.jsx(tl,{className:"w-auto p-0",align:"start",children:e.jsx(aj,{mode:"single",selected:N,onSelect:j,initialFocus:!0,locale:Oo})})]}),(p||N)&&e.jsxs(_,{variant:"outline",size:"sm",onClick:ge,className:"w-full sm:w-auto h-8",children:[e.jsx(Sa,{className:"h-3.5 w-3.5 sm:mr-1"}),e.jsx("span",{className:"text-xs",children:"清除"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3 pt-2 border-t border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(q_,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"字号"})]}),e.jsx("div",{className:"flex gap-1",children:Object.keys(Uo).map(Y=>e.jsx(_,{variant:M===Y?"default":"outline",size:"sm",onClick:()=>S(Y),className:"h-6 px-2 text-xs",children:Uo[Y].label},Y))})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 max-w-[200px]",children:[e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"行距"}),e.jsx(el,{value:[F],onValueChange:([Y])=>E(Y),min:0,max:12,step:2,className:"flex-1"}),e.jsxs("span",{className:"text-xs text-muted-foreground w-7",children:[F,"px"]})]}),e.jsxs("div",{className:"flex gap-2 sm:hidden",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:me,className:"flex-1 h-8",children:[e.jsx(dt,{className:"h-3.5 w-3.5 mr-1"}),e.jsx("span",{className:"text-xs",children:"刷新"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:je,className:"flex-1 h-8",children:[e.jsx(na,{className:"h-3.5 w-3.5 mr-1"}),e.jsx("span",{className:"text-xs",children:"导出"})]})]})]})]})]})})})]}),e.jsx("div",{className:"flex-1 min-h-0 px-2 sm:px-3 lg:px-4 pb-2 sm:pb-3 lg:pb-4",children:e.jsx(Te,{className:"bg-black dark:bg-gray-950 border-gray-800 dark:border-gray-900 h-full overflow-hidden",children:e.jsx("div",{ref:H,className:P("h-full overflow-auto","[&::-webkit-scrollbar]:w-2.5","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-thumb]:rounded-full","[&::-webkit-scrollbar-thumb:hover]:bg-border/80"),children:e.jsx("div",{className:P("p-2 sm:p-3 font-mono relative",Uo[M].class),style:{height:`${Q.getTotalSize()}px`},children:pe.length===0?e.jsx("div",{className:"text-gray-500 dark:text-gray-600 text-center py-8 text-xs sm:text-sm",children:"暂无日志数据"}):Q.getVirtualItems().map(Y=>{const we=pe[Y.index];return e.jsxs("div",{"data-index":Y.index,ref:Q.measureElement,className:P("absolute top-0 left-0 w-full px-2 sm:px-3 rounded hover:bg-white/5 transition-colors",L(we.level)),style:{transform:`translateY(${Y.start}px)`,paddingTop:`${F/2}px`,paddingBottom:`${F/2}px`},children:[e.jsxs("div",{className:"flex flex-col gap-0.5 sm:hidden",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-600 text-[10px]",children:we.timestamp}),e.jsxs("span",{className:P("font-semibold text-[10px]",X(we.level)),children:["[",we.level,"]"]})]}),e.jsx("div",{className:"text-cyan-400 dark:text-cyan-500 truncate text-[10px]",children:we.module}),e.jsx("div",{className:"text-gray-300 dark:text-gray-400 whitespace-pre-wrap break-words text-[10px]",children:we.message})]}),e.jsxs("div",{className:"hidden sm:flex gap-2 items-start",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-600 flex-shrink-0 w-[130px] lg:w-[160px]",children:we.timestamp}),e.jsxs("span",{className:P("flex-shrink-0 w-[65px] lg:w-[75px] font-semibold",X(we.level)),children:["[",we.level,"]"]}),e.jsx("span",{className:"text-cyan-400 dark:text-cyan-500 flex-shrink-0 w-[100px] lg:w-[130px] truncate",children:we.module}),e.jsx("span",{className:"text-gray-300 dark:text-gray-400 flex-1 whitespace-pre-wrap break-words",children:we.message})]})]},Y.key)})})})})})]})}async function Gk(){return(await ke("/api/planner/overview")).json()}async function Kk(a,l=1,r=20,c){const d=new URLSearchParams({page:l.toString(),page_size:r.toString()});return c&&d.append("search",c),(await ke(`/api/planner/chat/${a}/logs?${d}`)).json()}async function Qk(a,l){return(await ke(`/api/planner/log/${a}/${l}`)).json()}async function Yk(){return(await ke("/api/replier/overview")).json()}async function Jk(a,l=1,r=20,c){const d=new URLSearchParams({page:l.toString(),page_size:r.toString()});return c&&d.append("search",c),(await ke(`/api/replier/chat/${a}/logs?${d}`)).json()}async function Xk(a,l){return(await ke(`/api/replier/log/${a}/${l}`)).json()}function mN(){const[a,l]=u.useState(new Map),[r,c]=u.useState(!0),d=u.useCallback(async()=>{try{c(!0);const h=await gx();if(h?.data){const f=new Map;h.data.forEach(p=>{f.set(p.chat_id,p.chat_name)}),l(f)}}catch(h){console.error("加载聊天列表失败:",h)}finally{c(!1)}},[]);u.useEffect(()=>{d()},[d]);const m=u.useCallback(h=>a.get(h)||h,[a]);return{chatNameMap:a,getChatName:m,loading:r,reload:d}}function Zo(a){return new Date(a*1e3).toLocaleString("zh-CN")}function xN(a){const r=Date.now()/1e3-a;return r<60?"刚刚":r<3600?`${Math.floor(r/60)} 分钟前`:r<86400?`${Math.floor(r/3600)} 小时前`:`${Math.floor(r/86400)} 天前`}function hN(a,l,r=1e4){u.useEffect(()=>{if(!a)return;const c=setInterval(l,r);return()=>clearInterval(c)},[a,l,r])}function Zk({autoRefresh:a,refreshKey:l}){const[r,c]=u.useState("overview"),[d,m]=u.useState(null),{getChatName:h}=mN(),[f,p]=u.useState(null),[g,N]=u.useState(!0),[j,b]=u.useState(null),[y,w]=u.useState(!1),[z,M]=u.useState(1),[S,F]=u.useState(20),[E,C]=u.useState(""),[R,H]=u.useState(""),[O,X]=u.useState(""),[L,me]=u.useState(null),[Ne,je]=u.useState(!1),[re,ge]=u.useState(!1),pe=u.useCallback(async()=>{try{N(!0);const $=await Gk();p($)}catch($){console.error("加载规划器总览失败:",$)}finally{N(!1)}},[]),D=u.useCallback(async()=>{if(d)try{w(!0);const $=await Kk(d.chat_id,z,S,R||void 0);b($)}catch($){console.error("加载聊天日志失败:",$)}finally{w(!1)}},[d,z,S,R]);u.useEffect(()=>{pe()},[pe]),u.useEffect(()=>{l>0&&(r==="overview"?pe():D())},[l,r,pe,D]),u.useEffect(()=>{r==="chat-logs"&&d&&D()},[r,d,D]),hN(a,u.useCallback(()=>{r==="overview"?pe():D()},[r,pe,D]));const Q=$=>{m($),M(1),H(""),X(""),c("chat-logs")},I=()=>{c("overview"),m(null),b(null),H(""),X("")},ue=()=>{H(O),M(1)},Y=()=>{X(""),H(""),M(1)},we=async($,A)=>{try{ge(!0),je(!0);const K=await Qk($,A);me(K)}catch(K){console.error("加载计划详情失败:",K)}finally{ge(!1)}},fe=$=>{F(Number($)),M(1)},Ee=()=>{const $=parseInt(E),A=j?Math.ceil(j.total/j.page_size):0;!isNaN($)&&$>=1&&$<=A&&(M($),C(""))},G=j?Math.ceil(j.total/j.page_size):0;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-4",children:r==="overview"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"聊天数量"}),e.jsx(Ba,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:g?e.jsx(ks,{className:"h-8 w-16"}):e.jsx("div",{className:"text-2xl font-bold",children:f?.total_chats||0})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"计划总数"}),e.jsx(rx,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:g?e.jsx(ks,{className:"h-8 w-16"}):e.jsx("div",{className:"text-2xl font-bold",children:f?.total_plans||0})})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"聊天列表"}),e.jsx(Ns,{children:"点击查看该聊天的所有计划记录"})]}),e.jsx(ze,{children:g?e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:[...Array(6)].map(($,A)=>e.jsx(ks,{className:"h-24 w-full"},A))}):f?.chats&&f.chats.length>0?e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:f.chats.map($=>e.jsxs("div",{className:"border rounded-lg p-4 hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>Q($),children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ba,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm truncate max-w-[180px]",title:h($.chat_id),children:h($.chat_id)})]}),e.jsx(Ce,{variant:"secondary",children:$.plan_count})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["最后活动: ",xN($.latest_timestamp)]})]},$.chat_id))}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无聊天记录"})})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 mb-4",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:I,children:[e.jsx($a,{className:"h-4 w-4 mr-2"}),"返回聊天列表"]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["当前聊天: ",e.jsx("span",{className:"font-medium",children:d?h(d.chat_id):""}),e.jsx("span",{className:"mx-2",children:"•"}),"共 ",j?.total||0," 条计划记录"]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Ue,{children:"计划执行记录"}),e.jsx(Ns,{children:d?h(d.chat_id):""})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ae,{placeholder:"搜索提示词内容...",value:O,onChange:$=>X($.target.value),onKeyDown:$=>$.key==="Enter"&&ue(),className:"w-full sm:w-48"}),e.jsx(_,{variant:"outline",size:"icon",onClick:ue,children:e.jsx($t,{className:"h-4 w-4"})}),R&&e.jsx(_,{variant:"ghost",size:"sm",onClick:Y,children:"清除"})]}),e.jsxs(Pe,{value:S.toString(),onValueChange:fe,children:[e.jsx(Ie,{className:"w-full sm:w-32",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"10",children:"10条/页"}),e.jsx(W,{value:"20",children:"20条/页"}),e.jsx(W,{value:"50",children:"50条/页"}),e.jsx(W,{value:"100",children:"100条/页"})]})]})]})]}),R&&e.jsxs("div",{className:"text-sm text-muted-foreground mt-2",children:["搜索关键词: ",e.jsxs("span",{className:"font-medium",children:['"',R,'"']})]})]}),e.jsx(ze,{children:y?e.jsx("div",{className:"space-y-2",children:[...Array(5)].map(($,A)=>e.jsx(ks,{className:"h-20 w-full"},A))}):j?.data&&j.data.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-2",children:j.data.map($=>e.jsxs("div",{className:"border rounded-lg p-3 hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>we($.chat_id,$.filename),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:Zo($.timestamp)}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:[$.action_count," 个动作"]}),e.jsxs(Ce,{variant:"outline",className:"text-xs",children:[$.total_plan_ms.toFixed(0),"ms"]})]})]}),$.action_types&&$.action_types.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:$.action_types.map((A,K)=>e.jsx(Ce,{variant:"outline",className:"text-xs bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border-blue-200 dark:border-blue-800",children:A},K))}),e.jsx("p",{className:"text-sm line-clamp-2",children:$.reasoning_preview||"无推理内容"})]},$.filename))}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 mt-4 pt-4 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",j.total," 条记录,第 ",z," / ",G," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M(1),disabled:z===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M($=>Math.max(1,$-1)),disabled:z===1,children:e.jsx(Pa,{className:"h-4 w-4"})}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[e.jsx(ae,{type:"number",min:1,max:G,value:E,onChange:$=>C($.target.value),onKeyDown:$=>$.key==="Enter"&&Ee(),placeholder:"跳转",className:"w-20 h-8"}),e.jsx(_,{size:"sm",variant:"outline",onClick:Ee,children:"跳转"})]}),e.jsxs("span",{className:"sm:hidden text-sm text-muted-foreground",children:[z,"/",G]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M($=>Math.min(G,$+1)),disabled:z===G,children:e.jsx(ra,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M(G),disabled:z===G,className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无计划记录"})})]})]})}),e.jsx(Qs,{open:Ne,onOpenChange:je,children:e.jsxs(Hs,{className:"max-w-4xl max-h-[80vh] grid grid-rows-[auto_1fr_auto] overflow-hidden",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Ua,{className:"h-5 w-5"}),"计划执行详情"]}),e.jsx(at,{children:"查看麦麦的详细计划推理过程和执行动作"})]}),e.jsx(ts,{className:"h-full pr-4",children:e.jsx("div",{className:"space-y-6 pb-4",children:re?e.jsx("div",{className:"space-y-4",children:[...Array(5)].map(($,A)=>e.jsx(ks,{className:"h-24 w-full"},A))}):L?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(da,{className:"h-4 w-4"}),"基本信息"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 p-4 bg-muted/50 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"聊天"}),e.jsx("div",{className:"text-sm",title:L.chat_id,children:h(L.chat_id)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"时间戳"}),e.jsx("div",{className:"text-sm",children:Zo(L.timestamp)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"类型"}),e.jsx(Ce,{variant:"outline",children:L.type})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"动作数量"}),e.jsxs(Ce,{children:[L.actions.length," 个动作"]})]})]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(sl,{className:"h-4 w-4"}),"性能统计"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"提示词构建"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.prompt_build_ms?.toFixed(2)||0,"ms"]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"LLM 推理"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.llm_duration_ms?.toFixed(2)||0,"ms"]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"总计划时间"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.total_plan_ms?.toFixed(2)||0,"ms"]})})]})]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(hx,{className:"h-4 w-4"}),"推理过程"]}),e.jsx("div",{className:"p-4 bg-muted/50 rounded-lg",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:L.reasoning||"无推理内容"})})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(rv,{className:"h-4 w-4"}),"执行动作 (",L.actions.length,")"]}),e.jsx("div",{className:"space-y-3",children:L.actions.map(($,A)=>e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-3",children:e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(Ce,{variant:"default",children:["动作 ",A+1]}),e.jsx(Ce,{variant:"outline",children:$.action_type})]})})}),e.jsxs(ze,{className:"p-4 pt-0 space-y-3",children:[$.reasoning&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:"推理依据"}),e.jsx("p",{className:"text-sm bg-muted/30 p-2 rounded",children:typeof $.reasoning=="string"?$.reasoning:JSON.stringify($.reasoning)})]}),$.action_message&&e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:"动作消息"}),typeof $.action_message=="string"?e.jsx("p",{className:"text-sm bg-muted/30 p-2 rounded break-all whitespace-pre-wrap",children:$.action_message}):e.jsx("pre",{className:"text-xs bg-muted/30 p-2 rounded overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify($.action_message,null,2)})]}),$.action_data&&Object.keys($.action_data).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:"动作数据"}),e.jsx("pre",{className:"text-xs bg-muted/30 p-2 rounded overflow-x-auto",children:JSON.stringify($.action_data,null,2)})]}),$.action_reasoning&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:"动作推理"}),e.jsx("p",{className:"text-sm bg-muted/30 p-2 rounded",children:typeof $.action_reasoning=="string"?$.action_reasoning:JSON.stringify($.action_reasoning)})]})]})]},A))})]}),e.jsx(la,{}),L.raw_output&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"原始输出"}),e.jsxs("details",{className:"group",children:[e.jsx("summary",{className:"cursor-pointer text-sm text-muted-foreground hover:text-foreground",children:"点击展开查看完整原始输出"}),e.jsx("div",{className:"mt-2 p-4 bg-muted/50 rounded-lg",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",children:L.raw_output})})]})]}),L.prompt&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"完整提示词"}),e.jsxs("details",{className:"group",children:[e.jsx("summary",{className:"cursor-pointer text-sm text-muted-foreground hover:text-foreground",children:"点击展开查看完整提示词"}),e.jsx("div",{className:"mt-2 p-4 bg-muted/50 rounded-lg",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",children:L.prompt})})]})]})]}):e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:"无数据"})})})}),e.jsx(gt,{className:"flex-shrink-0",children:e.jsx(_,{onClick:()=>je(!1),children:"关闭"})})]})})]})}function Wk({autoRefresh:a,refreshKey:l}){const[r,c]=u.useState("overview"),[d,m]=u.useState(null),{getChatName:h}=mN(),[f,p]=u.useState(null),[g,N]=u.useState(!0),[j,b]=u.useState(null),[y,w]=u.useState(!1),[z,M]=u.useState(1),[S,F]=u.useState(20),[E,C]=u.useState(""),[R,H]=u.useState(""),[O,X]=u.useState(""),[L,me]=u.useState(null),[Ne,je]=u.useState(!1),[re,ge]=u.useState(!1),pe=u.useCallback(async()=>{try{N(!0);const $=await Yk();p($)}catch($){console.error("加载回复器总览失败:",$)}finally{N(!1)}},[]),D=u.useCallback(async()=>{if(d)try{w(!0);const $=await Jk(d.chat_id,z,S,R||void 0);b($)}catch($){console.error("加载聊天日志失败:",$)}finally{w(!1)}},[d,z,S,R]);u.useEffect(()=>{pe()},[pe]),u.useEffect(()=>{l>0&&(r==="overview"?pe():D())},[l,r,pe,D]),u.useEffect(()=>{r==="chat-logs"&&d&&D()},[r,d,D]),hN(a,u.useCallback(()=>{r==="overview"?pe():D()},[r,pe,D]));const Q=$=>{m($),M(1),H(""),X(""),c("chat-logs")},I=()=>{c("overview"),m(null),b(null),H(""),X("")},ue=()=>{H(O),M(1)},Y=()=>{X(""),H(""),M(1)},we=async($,A)=>{try{ge(!0),je(!0);const K=await Xk($,A);me(K)}catch(K){console.error("加载回复详情失败:",K)}finally{ge(!1)}},fe=$=>{F(Number($)),M(1)},Ee=()=>{const $=parseInt(E),A=j?Math.ceil(j.total/j.page_size):0;!isNaN($)&&$>=1&&$<=A&&(M($),C(""))},G=j?Math.ceil(j.total/j.page_size):0;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-4",children:r==="overview"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"聊天数量"}),e.jsx(Ba,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:g?e.jsx(ks,{className:"h-8 w-16"}):e.jsx("div",{className:"text-2xl font-bold",children:f?.total_chats||0})})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"回复总数"}),e.jsx(rx,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(ze,{children:g?e.jsx(ks,{className:"h-8 w-16"}):e.jsx("div",{className:"text-2xl font-bold",children:f?.total_replies||0})})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"聊天列表"}),e.jsx(Ns,{children:"点击查看该聊天的所有回复记录"})]}),e.jsx(ze,{children:g?e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:[...Array(6)].map(($,A)=>e.jsx(ks,{className:"h-24 w-full"},A))}):f?.chats&&f.chats.length>0?e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:f.chats.map($=>e.jsxs("div",{className:"border rounded-lg p-4 hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>Q($),children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ba,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm truncate max-w-[180px]",title:h($.chat_id),children:h($.chat_id)})]}),e.jsx(Ce,{variant:"secondary",children:$.reply_count})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["最后活动: ",xN($.latest_timestamp)]})]},$.chat_id))}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无聊天记录"})})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 mb-4",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:I,children:[e.jsx($a,{className:"h-4 w-4 mr-2"}),"返回聊天列表"]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["当前聊天: ",e.jsx("span",{className:"font-medium",children:d?h(d.chat_id):""}),e.jsx("span",{className:"mx-2",children:"•"}),"共 ",j?.total||0," 条回复记录"]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Ue,{children:"回复生成记录"}),e.jsx(Ns,{children:d?h(d.chat_id):""})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ae,{placeholder:"搜索提示词内容...",value:O,onChange:$=>X($.target.value),onKeyDown:$=>$.key==="Enter"&&ue(),className:"w-full sm:w-48"}),e.jsx(_,{variant:"outline",size:"icon",onClick:ue,children:e.jsx($t,{className:"h-4 w-4"})}),R&&e.jsx(_,{variant:"ghost",size:"sm",onClick:Y,children:"清除"})]}),e.jsxs(Pe,{value:S.toString(),onValueChange:fe,children:[e.jsx(Ie,{className:"w-full sm:w-32",children:e.jsx(Fe,{})}),e.jsxs(Be,{children:[e.jsx(W,{value:"10",children:"10条/页"}),e.jsx(W,{value:"20",children:"20条/页"}),e.jsx(W,{value:"50",children:"50条/页"}),e.jsx(W,{value:"100",children:"100条/页"})]})]})]})]}),R&&e.jsxs("div",{className:"text-sm text-muted-foreground mt-2",children:["搜索关键词: ",e.jsxs("span",{className:"font-medium",children:['"',R,'"']})]})]}),e.jsx(ze,{children:y?e.jsx("div",{className:"space-y-2",children:[...Array(5)].map(($,A)=>e.jsx(ks,{className:"h-20 w-full"},A))}):j?.data&&j.data.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-2",children:j.data.map($=>e.jsxs("div",{className:"border rounded-lg p-3 hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>we($.chat_id,$.filename),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:Zo($.timestamp)}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[$.success?e.jsxs(Ce,{variant:"default",className:"text-xs bg-green-600",children:[e.jsx(Mg,{className:"h-3 w-3 mr-1"}),"成功"]}):e.jsxs(Ce,{variant:"destructive",className:"text-xs",children:[e.jsx(ta,{className:"h-3 w-3 mr-1"}),"失败"]}),e.jsx(Ce,{variant:"outline",className:"text-xs",children:$.model}),e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:[$.overall_ms.toFixed(0),"ms"]})]})]}),e.jsx("p",{className:"text-sm line-clamp-2",children:$.output_preview||"无输出内容"})]},$.filename))}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 mt-4 pt-4 border-t",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",j.total," 条记录,第 ",z," / ",G," 页"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M(1),disabled:z===1,className:"hidden sm:flex",children:e.jsx(kn,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M($=>Math.max(1,$-1)),disabled:z===1,children:e.jsx(Pa,{className:"h-4 w-4"})}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[e.jsx(ae,{type:"number",min:1,max:G,value:E,onChange:$=>C($.target.value),onKeyDown:$=>$.key==="Enter"&&Ee(),placeholder:"跳转",className:"w-20 h-8"}),e.jsx(_,{size:"sm",variant:"outline",onClick:Ee,children:"跳转"})]}),e.jsxs("span",{className:"sm:hidden text-sm text-muted-foreground",children:[z,"/",G]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M($=>Math.min(G,$+1)),disabled:z===G,children:e.jsx(ra,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>M(G),disabled:z===G,className:"hidden sm:flex",children:e.jsx(Cn,{className:"h-4 w-4"})})]})]})]}):e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"暂无回复记录"})})]})]})}),e.jsx(Qs,{open:Ne,onOpenChange:je,children:e.jsxs(Hs,{className:"max-w-4xl max-h-[80vh] grid grid-rows-[auto_1fr_auto] overflow-hidden",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Ua,{className:"h-5 w-5"}),"回复生成详情"]}),e.jsx(at,{children:"查看麦麦的详细回复生成过程"})]}),e.jsx(ts,{className:"h-full pr-4",children:e.jsx("div",{className:"space-y-6 pb-4",children:re?e.jsx("div",{className:"space-y-4",children:[...Array(5)].map(($,A)=>e.jsx(ks,{className:"h-24 w-full"},A))}):L?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(da,{className:"h-4 w-4"}),"基本信息"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 p-4 bg-muted/50 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"聊天"}),e.jsx("div",{className:"text-sm",title:L.chat_id,children:h(L.chat_id)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"时间戳"}),e.jsx("div",{className:"text-sm",children:Zo(L.timestamp)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"状态"}),L.success?e.jsxs(Ce,{variant:"default",className:"bg-green-600",children:[e.jsx(Mg,{className:"h-3 w-3 mr-1"}),"成功"]}):e.jsxs(Ce,{variant:"destructive",children:[e.jsx(ta,{className:"h-3 w-3 mr-1"}),"失败"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"思考深度"}),e.jsxs(Ce,{variant:"outline",children:["Level ",L.think_level]})]})]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(V_,{className:"h-4 w-4"}),"模型信息"]}),e.jsx("div",{className:"p-4 bg-muted/50 rounded-lg",children:e.jsx(Ce,{variant:"secondary",className:"text-sm",children:L.model})})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(sl,{className:"h-4 w-4"}),"性能统计"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"提示词构建"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.prompt_ms?.toFixed(2)||0,"ms"]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"LLM 推理"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.llm_ms?.toFixed(2)||0,"ms"]})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{className:"p-4 pb-2",children:e.jsx(Ue,{className:"text-xs text-muted-foreground",children:"总耗时"})}),e.jsx(ze,{className:"p-4 pt-0",children:e.jsxs("div",{className:"text-xl font-bold",children:[L.timing.overall_ms?.toFixed(2)||0,"ms"]})})]})]}),L.timing.timing_logs&&L.timing.timing_logs.length>0&&e.jsxs("div",{className:"mt-3 p-3 bg-muted/30 rounded-lg",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:"耗时详情"}),e.jsx("div",{className:"space-y-1",children:L.timing.timing_logs.map(($,A)=>e.jsx("div",{className:"text-xs text-muted-foreground",children:$},A))})]}),L.timing.almost_zero&&e.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"font-medium",children:"近乎零耗时: "}),L.timing.almost_zero]})]}),e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(hx,{className:"h-4 w-4"}),"回复输出"]}),e.jsx("div",{className:"p-4 bg-muted/50 rounded-lg",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:L.output||"无输出内容"})})]}),L.processed_output&&L.processed_output.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"处理后的输出"}),e.jsx("div",{className:"space-y-2",children:L.processed_output.map(($,A)=>e.jsx("div",{className:"p-3 bg-muted/30 rounded-lg",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:$})},A))})]})]}),L.reasoning&&e.jsxs(e.Fragment,{children:[e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"推理过程"}),e.jsx("div",{className:"p-4 bg-muted/50 rounded-lg",children:e.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:L.reasoning})})]})]}),L.error&&e.jsxs(e.Fragment,{children:[e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold text-destructive",children:"错误信息"}),e.jsx("div",{className:"p-4 bg-destructive/10 rounded-lg border border-destructive/20",children:e.jsx("p",{className:"text-sm text-destructive whitespace-pre-wrap",children:L.error})})]})]}),L.prompt&&e.jsxs(e.Fragment,{children:[e.jsx(la,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"完整提示词"}),e.jsxs("details",{className:"group",children:[e.jsx("summary",{className:"cursor-pointer text-sm text-muted-foreground hover:text-foreground",children:"点击展开查看完整提示词"}),e.jsx("div",{className:"mt-2 p-4 bg-muted/50 rounded-lg",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",children:L.prompt})})]})]})]})]}):e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:"无数据"})})})}),e.jsx(gt,{className:"flex-shrink-0",children:e.jsx(_,{onClick:()=>je(!1),children:"关闭"})})]})})]})}function eC(){const[a,l]=u.useState("planner"),[r,c]=u.useState(!1),[d,m]=u.useState(0),h=u.useCallback(()=>{m(f=>f+1)},[]);return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"计划器 & 回复器监控"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"实时监控麦麦的任务计划器和回复生成器运行状态"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_,{variant:r?"default":"outline",size:"sm",onClick:()=>c(!r),children:[e.jsx(dt,{className:`h-4 w-4 mr-2 ${r?"animate-spin":""}`}),r?"自动刷新中":"自动刷新"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:h,children:e.jsx(dt,{className:"h-4 w-4"})})]})]}),e.jsxs(Jt,{value:a,onValueChange:f=>l(f),className:"w-full",children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2 gap-0.5 sm:gap-1 h-auto p-1",children:[e.jsxs(Xe,{value:"planner",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(nx,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"计划器监控"})]}),e.jsxs(Xe,{value:"replier",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[e.jsx(G_,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),e.jsx("span",{children:"回复器监控"})]})]}),e.jsxs(ts,{className:"h-[calc(100vh-240px)] sm:h-[calc(100vh-280px)] mt-4 sm:mt-6",children:[e.jsx(Ss,{value:"planner",className:"mt-0",children:e.jsx(Zk,{autoRefresh:r,refreshKey:d})}),e.jsx(Ss,{value:"replier",className:"mt-0",children:e.jsx(Wk,{autoRefresh:r,refreshKey:d})})]})]})]})}const sC="Mai-with-u",tC="plugin-repo",aC="main",lC="plugin_details.json";async function nC(){try{const a=await ke("/api/webui/plugins/fetch-raw",{method:"POST",body:JSON.stringify({owner:sC,repo:tC,branch:aC,file_path:lC})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const l=await a.json();if(!l.success||!l.data)throw new Error(l.error||"获取插件列表失败");return JSON.parse(l.data).filter(d=>!d?.id||!d?.manifest?(console.warn("跳过无效插件数据:",d),!1):!d.manifest.name||!d.manifest.version?(console.warn("跳过缺少必需字段的插件:",d.id),!1):!0).map(d=>({id:d.id,manifest:{manifest_version:d.manifest.manifest_version||1,name:d.manifest.name,version:d.manifest.version,description:d.manifest.description||"",author:d.manifest.author||{name:"Unknown"},license:d.manifest.license||"Unknown",host_application:d.manifest.host_application||{min_version:"0.0.0"},homepage_url:d.manifest.homepage_url,repository_url:d.manifest.repository_url,keywords:d.manifest.keywords||[],categories:d.manifest.categories||[],default_locale:d.manifest.default_locale||"zh-CN",locales_path:d.manifest.locales_path},downloads:0,rating:0,review_count:0,installed:!1,published_at:new Date().toISOString(),updated_at:new Date().toISOString()}))}catch(a){throw console.error("Failed to fetch plugin list:",a),a}}async function fN(){try{const a=await ke("/api/webui/plugins/git-status");if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(a){return console.error("Failed to check Git status:",a),{installed:!1,error:"无法检测 Git 安装状态"}}}async function pN(){try{const a=await ke("/api/webui/plugins/version");if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(a){return console.error("Failed to get Maimai version:",a),{version:"0.0.0",version_major:0,version_minor:0,version_patch:0}}}function gN(a,l,r){const c=a.split(".").map(f=>parseInt(f)||0),d=c[0]||0,m=c[1]||0,h=c[2]||0;if(r.version_majorparseInt(j)||0),p=f[0]||0,g=f[1]||0,N=f[2]||0;if(r.version_major>p||r.version_major===p&&r.version_minor>g||r.version_major===p&&r.version_minor===g&&r.version_patch>N)return!1}return!0}async function rC(){try{const a=await ke("/api/webui/ws-token");if(!a.ok)return console.error("获取 WebSocket token 失败:",a.status),null;const l=await a.json();return l.success&&l.token?l.token:null}catch(a){return console.error("获取 WebSocket token 失败:",a),null}}async function iC(a,l){const r=await rC();if(!r)return console.warn("无法获取 WebSocket token,可能未登录"),null;const c=window.location.protocol==="https:"?"wss:":"ws:",d=window.location.host,m=`${c}//${d}/api/webui/ws/plugin-progress?token=${encodeURIComponent(r)}`;try{const h=new WebSocket(m);return h.onopen=()=>{console.log("Plugin progress WebSocket connected");const f=setInterval(()=>{h.readyState===WebSocket.OPEN?h.send("ping"):clearInterval(f)},3e4)},h.onmessage=f=>{try{if(f.data==="pong")return;const p=JSON.parse(f.data);a(p)}catch(p){console.error("Failed to parse progress data:",p)}},h.onerror=f=>{console.error("Plugin progress WebSocket error:",f),l?.(f)},h.onclose=()=>{console.log("Plugin progress WebSocket disconnected")},h}catch(h){return console.error("创建 WebSocket 连接失败:",h),null}}async function Bl(){try{const a=await ke("/api/webui/plugins/installed",{headers:Zs()});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const l=await a.json();if(!l.success)throw new Error(l.message||"获取已安装插件列表失败");return l.plugins||[]}catch(a){return console.error("Failed to get installed plugins:",a),[]}}function bn(a,l){return l.some(r=>r.id===a)}function yn(a,l){const r=l.find(c=>c.id===a);if(r)return r.manifest?.version||r.version}async function jN(a,l,r="main"){const c=await ke("/api/webui/plugins/install",{method:"POST",body:JSON.stringify({plugin_id:a,repository_url:l,branch:r})});if(!c.ok){const d=await c.json();throw new Error(d.detail||"安装失败")}return await c.json()}async function vN(a){const l=await ke("/api/webui/plugins/uninstall",{method:"POST",body:JSON.stringify({plugin_id:a})});if(!l.ok){const r=await l.json();throw new Error(r.detail||"卸载失败")}return await l.json()}async function NN(a,l,r="main"){const c=await ke("/api/webui/plugins/update",{method:"POST",body:JSON.stringify({plugin_id:a,repository_url:l,branch:r})});if(!c.ok){const d=await c.json();throw new Error(d.detail||"更新失败")}return await c.json()}async function cC(a){const l=await ke(`/api/webui/plugins/config/${a}/schema`,{headers:Zs()});if(!l.ok){const c=await l.text();try{const d=JSON.parse(c);throw new Error(d.detail||"获取配置 Schema 失败")}catch{throw new Error(`获取配置 Schema 失败 (${l.status})`)}}const r=await l.json();if(!r.success)throw new Error(r.message||"获取配置 Schema 失败");return r.schema}async function oC(a){const l=await ke(`/api/webui/plugins/config/${a}`,{headers:Zs()});if(!l.ok){const c=await l.text();try{const d=JSON.parse(c);throw new Error(d.detail||"获取配置失败")}catch{throw new Error(`获取配置失败 (${l.status})`)}}const r=await l.json();if(!r.success)throw new Error(r.message||"获取配置失败");return r.config}async function dC(a){const l=await ke(`/api/webui/plugins/config/${a}/raw`,{headers:Zs()});if(!l.ok){const c=await l.text();try{const d=JSON.parse(c);throw new Error(d.detail||"获取配置失败")}catch{throw new Error(`获取配置失败 (${l.status})`)}}const r=await l.json();if(!r.success)throw new Error(r.message||"获取配置失败");return r.config}async function uC(a,l){const r=await ke(`/api/webui/plugins/config/${a}`,{method:"PUT",headers:Zs(),body:JSON.stringify({config:l})});if(!r.ok){const c=await r.json();throw new Error(c.detail||"保存配置失败")}return await r.json()}async function mC(a,l){const r=await ke(`/api/webui/plugins/config/${a}/raw`,{method:"PUT",headers:Zs(),body:JSON.stringify({config:l})});if(!r.ok){const c=await r.json();throw new Error(c.detail||"保存配置失败")}return await r.json()}async function xC(a){const l=await ke(`/api/webui/plugins/config/${a}/reset`,{method:"POST",headers:Zs()});if(!l.ok){const r=await l.json();throw new Error(r.detail||"重置配置失败")}return await l.json()}async function hC(a){const l=await ke(`/api/webui/plugins/config/${a}/toggle`,{method:"POST",headers:Zs()});if(!l.ok){const r=await l.json();throw new Error(r.detail||"切换状态失败")}return await l.json()}const Nc="https://maibot-plugin-stats.maibot-webui.workers.dev";async function bN(a){try{const l=await fetch(`${Nc}/stats/${a}`);return l.ok?await l.json():(console.error("Failed to fetch plugin stats:",l.statusText),null)}catch(l){return console.error("Error fetching plugin stats:",l),null}}async function fC(a,l){try{const r=l||Ax(),c=await fetch(`${Nc}/stats/like`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:a,user_id:r})}),d=await c.json();return c.status===429?{success:!1,error:"操作过于频繁,请稍后再试"}:c.ok?{success:!0,...d}:{success:!1,error:d.error||"点赞失败"}}catch(r){return console.error("Error liking plugin:",r),{success:!1,error:"网络错误"}}}async function pC(a,l){try{const r=l||Ax(),c=await fetch(`${Nc}/stats/dislike`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:a,user_id:r})}),d=await c.json();return c.status===429?{success:!1,error:"操作过于频繁,请稍后再试"}:c.ok?{success:!0,...d}:{success:!1,error:d.error||"点踩失败"}}catch(r){return console.error("Error disliking plugin:",r),{success:!1,error:"网络错误"}}}async function gC(a,l,r,c){if(l<1||l>5)return{success:!1,error:"评分必须在 1-5 之间"};try{const d=c||Ax(),m=await fetch(`${Nc}/stats/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:a,rating:l,comment:r,user_id:d})}),h=await m.json();return m.status===429?{success:!1,error:"每天最多评分 3 次"}:m.ok?{success:!0,...h}:{success:!1,error:h.error||"评分失败"}}catch(d){return console.error("Error rating plugin:",d),{success:!1,error:"网络错误"}}}async function yN(a){try{const l=await fetch(`${Nc}/stats/download`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:a})}),r=await l.json();return l.status===429?(console.warn("Download recording rate limited"),{success:!0}):l.ok?{success:!0,...r}:(console.error("Failed to record download:",r.error),{success:!1,error:r.error})}catch(l){return console.error("Error recording download:",l),{success:!1,error:"网络错误"}}}function jC(){const a=navigator,l=[navigator.userAgent,navigator.language,navigator.languages?.join(",")||"",navigator.platform,navigator.hardwareConcurrency||0,screen.width,screen.height,screen.colorDepth,screen.pixelDepth,new Date().getTimezoneOffset(),Intl.DateTimeFormat().resolvedOptions().timeZone,navigator.maxTouchPoints||0,a.deviceMemory||0].join("|");let r=0;for(let c=0;c{const Z=J.map(async De=>{try{const xe=await bN(De.id);return{id:De.id,stats:xe}}catch(xe){return console.warn(`Failed to load stats for ${De.id}:`,xe),{id:De.id,stats:null}}}),Le=await Promise.all(Z),ne={};Le.forEach(({id:De,stats:xe})=>{xe&&(ne[De]=xe)}),L(ne)};u.useEffect(()=>{let J=null,Z=!1;return(async()=>{if(J=await iC(ne=>{Z||(C(ne),ne.stage==="success"?setTimeout(()=>{Z||C(null)},2e3):ne.stage==="error"&&(w(!1),M(ne.error||"加载失败")))},ne=>{console.error("WebSocket error:",ne),Z||fe({title:"WebSocket 连接失败",description:"无法实时显示加载进度",variant:"destructive"})}),await new Promise(ne=>{if(!J){ne();return}const De=()=>{J&&J.readyState===WebSocket.OPEN?(console.log("WebSocket connected, starting to load plugins"),ne()):J&&J.readyState===WebSocket.CLOSED?(console.warn("WebSocket closed before loading plugins"),ne()):setTimeout(De,100)};De()}),!Z){const ne=await fN();F(ne),ne.installed||fe({title:"Git 未安装",description:ne.error||"请先安装 Git 才能使用插件安装功能",variant:"destructive"})}if(!Z){const ne=await pN();H(ne)}if(!Z)try{w(!0),M(null);const ne=await nC();if(!Z){const De=await Bl();O(De);const xe=ne.map(Me=>{const ds=bn(Me.id,De),Ts=yn(Me.id,De);return{...Me,installed:ds,installed_version:Ts}});for(const Me of De)!xe.some(Ts=>Ts.id===Me.id)&&Me.manifest&&xe.push({id:Me.id,manifest:{manifest_version:Me.manifest.manifest_version||1,name:Me.manifest.name,version:Me.manifest.version,description:Me.manifest.description||"",author:Me.manifest.author,license:Me.manifest.license||"Unknown",host_application:Me.manifest.host_application,homepage_url:Me.manifest.homepage_url,repository_url:Me.manifest.repository_url,keywords:Me.manifest.keywords||[],categories:Me.manifest.categories||[],default_locale:Me.manifest.default_locale||"zh-CN",locales_path:Me.manifest.locales_path},downloads:0,rating:0,review_count:0,installed:!0,installed_version:Me.manifest.version,published_at:new Date().toISOString(),updated_at:new Date().toISOString()});b(xe),Ee(xe)}}catch(ne){if(!Z){const De=ne instanceof Error?ne.message:"加载插件列表失败";M(De),fe({title:"加载失败",description:De,variant:"destructive"})}}finally{Z||w(!1)}})(),()=>{Z=!0,J&&J.close()}},[fe]);const G=J=>{if(!J.installed&&R&&!$(J))return e.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[e.jsx(Ut,{className:"h-3 w-3"}),"不兼容"]});if(J.installed){const Z=J.installed_version?.trim(),Le=J.manifest.version?.trim();if(Z!==Le){const ne=Z?.split(".").map(Number)||[0,0,0],De=Le?.split(".").map(Number)||[0,0,0];for(let xe=0;xe<3;xe++){if((De[xe]||0)>(ne[xe]||0))return e.jsxs(Ce,{variant:"outline",className:"gap-1 text-orange-600 border-orange-600",children:[e.jsx(Ut,{className:"h-3 w-3"}),"可更新"]});if((De[xe]||0)<(ne[xe]||0))break}}return e.jsxs(Ce,{variant:"default",className:"gap-1",children:[e.jsx(st,{className:"h-3 w-3"}),"已安装"]})}return null},$=J=>!R||!J.manifest?.host_application?!0:gN(J.manifest.host_application.min_version,J.manifest.host_application.max_version,R),A=J=>{if(!J.installed||!J.installed_version||!J.manifest?.version)return!1;const Z=J.installed_version.trim(),Le=J.manifest.version.trim();if(Z===Le)return!1;const ne=Z.split(".").map(Number),De=Le.split(".").map(Number);for(let xe=0;xe<3;xe++){if((De[xe]||0)>(ne[xe]||0))return!0;if((De[xe]||0)<(ne[xe]||0))return!1}return!1},K=j.filter(J=>{if(!J.manifest)return console.warn("[过滤] 跳过无 manifest 的插件:",J.id),!1;const Z=c===""||J.manifest.name?.toLowerCase().includes(c.toLowerCase())||J.manifest.description?.toLowerCase().includes(c.toLowerCase())||J.manifest.keywords&&J.manifest.keywords.some(xe=>xe.toLowerCase().includes(c.toLowerCase())),Le=m==="all"||J.manifest.categories&&J.manifest.categories.includes(m);let ne=!0;f==="installed"?ne=J.installed===!0:f==="updates"&&(ne=J.installed===!0&&A(J));const De=!g||!R||$(J);return Z&&Le&&ne&&De}),Re=J=>{if(!S?.installed){fe({title:"无法安装",description:"Git 未安装",variant:"destructive"});return}if(R&&!$(J)){fe({title:"无法安装",description:"插件与当前麦麦版本不兼容",variant:"destructive"});return}re(J),pe("main"),Q(""),ue("preset"),we(!1),Ne(!0)},se=async()=>{if(!je)return;const J=I==="custom"?D:ge;if(!J||J.trim()===""){fe({title:"分支名称不能为空",variant:"destructive"});return}try{Ne(!1),await jN(je.id,je.manifest.repository_url||"",J),yN(je.id).catch(Le=>{console.warn("Failed to record download:",Le)}),fe({title:"安装成功",description:`${je.manifest.name} 已成功安装`});const Z=await Bl();O(Z),b(Le=>Le.map(ne=>{if(ne.id===je.id){const De=bn(ne.id,Z),xe=yn(ne.id,Z);return{...ne,installed:De,installed_version:xe}}return ne}))}catch(Z){fe({title:"安装失败",description:Z instanceof Error?Z.message:"未知错误",variant:"destructive"})}finally{re(null)}},$e=async J=>{try{await vN(J.id),fe({title:"卸载成功",description:`${J.manifest.name} 已成功卸载`});const Z=await Bl();O(Z),b(Le=>Le.map(ne=>{if(ne.id===J.id){const De=bn(ne.id,Z),xe=yn(ne.id,Z);return{...ne,installed:De,installed_version:xe}}return ne}))}catch(Z){fe({title:"卸载失败",description:Z instanceof Error?Z.message:"未知错误",variant:"destructive"})}},cs=async J=>{if(!S?.installed){fe({title:"无法更新",description:"Git 未安装",variant:"destructive"});return}try{const Z=await NN(J.id,J.manifest.repository_url||"","main");fe({title:"更新成功",description:`${J.manifest.name} 已从 ${Z.old_version} 更新到 ${Z.new_version}`});const Le=await Bl();O(Le),b(ne=>ne.map(De=>{if(De.id===J.id){const xe=bn(De.id,Le),Me=yn(De.id,Le);return{...De,installed:xe,installed_version:Me}}return De}))}catch(Z){fe({title:"更新失败",description:Z instanceof Error?Z.message:"未知错误",variant:"destructive"})}};return e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件市场"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"浏览和管理麦麦的插件"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(_,{variant:"outline",onClick:()=>l(),disabled:r,children:[e.jsx(hv,{className:`h-4 w-4 mr-2 ${r?"animate-spin":""}`}),"重启麦麦"]}),e.jsxs(_,{onClick:()=>a({to:"/plugin-mirrors"}),children:[e.jsx(K_,{className:"h-4 w-4 mr-2"}),"配置镜像源"]})]})]}),e.jsx(Te,{className:"border-blue-200 bg-blue-50 dark:bg-blue-950/20 dark:border-blue-900",children:e.jsx(ze,{className:"py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Yt,{className:"h-4 w-4 text-blue-600 flex-shrink-0"}),e.jsxs("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:["安装、卸载或更新插件后,需要",e.jsx("span",{className:"font-semibold",children:"重启麦麦"}),"才能使更改生效"]})]})})}),S&&!S.installed&&e.jsxs(Te,{className:"border-orange-600 bg-orange-50 dark:bg-orange-950/20",children:[e.jsx(Oe,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Lt,{className:"h-5 w-5 text-orange-600"}),e.jsxs("div",{children:[e.jsx(Ue,{className:"text-lg text-orange-900 dark:text-orange-100",children:"Git 未安装"}),e.jsx(Ns,{className:"text-orange-800 dark:text-orange-200",children:S.error||"请先安装 Git 才能使用插件安装功能"})]})]})}),e.jsx(ze,{children:e.jsxs("p",{className:"text-sm text-orange-800 dark:text-orange-200",children:["您可以从 ",e.jsx("a",{href:"https://git-scm.com/downloads",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"git-scm.com"})," 下载并安装 Git。 安装完成后,请重启麦麦应用。"]})})]}),e.jsx(Te,{className:"p-4",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{placeholder:"搜索插件...",value:c,onChange:J=>d(J.target.value),className:"pl-9"})]}),e.jsxs(Pe,{value:m,onValueChange:h,children:[e.jsx(Ie,{className:"w-full sm:w-[200px]",children:e.jsx(Fe,{placeholder:"选择分类"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"all",children:"全部分类"}),e.jsx(W,{value:"Group Management",children:"群组管理"}),e.jsx(W,{value:"Entertainment & Interaction",children:"娱乐互动"}),e.jsx(W,{value:"Utility Tools",children:"实用工具"}),e.jsx(W,{value:"Content Generation",children:"内容生成"}),e.jsx(W,{value:"Multimedia",children:"多媒体"}),e.jsx(W,{value:"External Integration",children:"外部集成"}),e.jsx(W,{value:"Data Analysis & Insights",children:"数据分析与洞察"}),e.jsx(W,{value:"Other",children:"其他"})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"compatible-only",checked:g,onCheckedChange:J=>N(J===!0)}),e.jsx("label",{htmlFor:"compatible-only",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"只显示兼容当前版本的插件"})]})]})}),e.jsx(Jt,{value:f,onValueChange:p,className:"w-full",children:e.jsxs(Gt,{className:"grid w-full grid-cols-3",children:[e.jsxs(Xe,{value:"all",children:["全部插件 (",j.filter(J=>{if(!J.manifest)return!1;const Z=c===""||J.manifest.name?.toLowerCase().includes(c.toLowerCase())||J.manifest.description?.toLowerCase().includes(c.toLowerCase())||J.manifest.keywords&&J.manifest.keywords.some(De=>De.toLowerCase().includes(c.toLowerCase())),Le=m==="all"||J.manifest.categories&&J.manifest.categories.includes(m),ne=!g||!R||$(J);return Z&&Le&&ne}).length,")"]}),e.jsxs(Xe,{value:"installed",children:["已安装 (",j.filter(J=>{if(!J.manifest)return!1;const Z=c===""||J.manifest.name?.toLowerCase().includes(c.toLowerCase())||J.manifest.description?.toLowerCase().includes(c.toLowerCase())||J.manifest.keywords&&J.manifest.keywords.some(De=>De.toLowerCase().includes(c.toLowerCase())),Le=m==="all"||J.manifest.categories&&J.manifest.categories.includes(m),ne=!g||!R||$(J);return J.installed&&Z&&Le&&ne}).length,")"]}),e.jsxs(Xe,{value:"updates",children:["可更新 (",j.filter(J=>{if(!J.manifest)return!1;const Z=c===""||J.manifest.name?.toLowerCase().includes(c.toLowerCase())||J.manifest.description?.toLowerCase().includes(c.toLowerCase())||J.manifest.keywords&&J.manifest.keywords.some(De=>De.toLowerCase().includes(c.toLowerCase())),Le=m==="all"||J.manifest.categories&&J.manifest.categories.includes(m),ne=!g||!R||$(J);return J.installed&&A(J)&&Z&&Le&&ne}).length,")"]})]})}),E&&E.stage==="loading"&&E.operation==="fetch"&&e.jsx(Te,{className:"p-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Fs,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{className:"text-sm font-medium",children:"加载插件列表"})]}),e.jsxs("span",{className:"text-sm font-medium",children:[E.progress,"%"]})]}),e.jsx(tr,{value:E.progress,className:"h-2"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:E.message}),E.total_plugins>0&&e.jsxs("div",{className:"text-xs text-muted-foreground text-center",children:["已加载 ",E.loaded_plugins," / ",E.total_plugins," 个插件"]})]})}),E&&E.stage==="error"&&E.error&&e.jsx(Te,{className:"border-destructive bg-destructive/10",children:e.jsx(Oe,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Lt,{className:"h-5 w-5 text-destructive"}),e.jsxs("div",{children:[e.jsx(Ue,{className:"text-lg text-destructive",children:"加载失败"}),e.jsx(Ns,{className:"text-destructive/80",children:E.error})]})]})})}),y?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"加载插件列表中..."})]}):z?e.jsx(Te,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(Lt,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:z}),e.jsx(_,{onClick:()=>window.location.reload(),children:"重新加载"})]})}):K.length===0?e.jsx(Te,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx($t,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"未找到插件"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:c||m!=="all"?"尝试调整搜索条件或筛选器":"暂无可用插件"})]})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:K.map(J=>e.jsxs(Te,{className:"flex flex-col hover:shadow-lg transition-shadow h-full",children:[e.jsxs(Oe,{children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx(Ue,{className:"text-xl",children:J.manifest?.name||J.id}),e.jsxs("div",{className:"flex flex-col gap-1",children:[J.manifest?.categories&&J.manifest.categories[0]&&e.jsx(Ce,{variant:"secondary",className:"text-xs whitespace-nowrap",children:vC[J.manifest.categories[0]]||J.manifest.categories[0]}),G(J)]})]}),e.jsx(Ns,{className:"line-clamp-2",children:J.manifest?.description||"无描述"})]}),e.jsx(ze,{className:"flex-1",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"h-4 w-4"}),e.jsx("span",{children:(X[J.id]?.downloads??J.downloads??0).toLocaleString()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(vn,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),e.jsx("span",{children:(X[J.id]?.rating??J.rating??0).toFixed(1)})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[J.manifest?.keywords&&J.manifest.keywords.slice(0,3).map(Z=>e.jsx(Ce,{variant:"outline",className:"text-xs",children:Z},Z)),J.manifest?.keywords&&J.manifest.keywords.length>3&&e.jsxs(Ce,{variant:"outline",className:"text-xs",children:["+",J.manifest.keywords.length-3]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground pt-2 border-t space-y-1",children:[e.jsxs("div",{children:["v",J.manifest?.version||"unknown"," · ",J.manifest?.author?.name||"Unknown"]}),J.manifest?.host_application&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{children:"支持:"}),e.jsxs("span",{className:"font-medium",children:[J.manifest.host_application.min_version,J.manifest.host_application.max_version?` - ${J.manifest.host_application.max_version}`:" - 最新版本"]})]})]})]})}),e.jsx(od,{className:"pt-4",children:e.jsxs("div",{className:"flex items-center justify-end gap-2 w-full",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>a({to:"/plugin-detail",search:{pluginId:J.id}}),children:"查看详情"}),J.installed?A(J)?e.jsxs(_,{size:"sm",disabled:!S?.installed,title:S?.installed?void 0:"Git 未安装",onClick:()=>cs(J),children:[e.jsx(dt,{className:"h-4 w-4 mr-1"}),"更新"]}):e.jsxs(_,{variant:"destructive",size:"sm",disabled:!S?.installed,title:S?.installed?void 0:"Git 未安装",onClick:()=>$e(J),children:[e.jsx(os,{className:"h-4 w-4 mr-1"}),"卸载"]}):e.jsxs(_,{size:"sm",disabled:!S?.installed||E?.operation==="install"||R!==null&&!$(J),title:S?.installed?R!==null&&!$(J)?`不兼容当前版本 (需要 ${J.manifest?.host_application?.min_version||"未知"}${J.manifest?.host_application?.max_version?` - ${J.manifest.host_application.max_version}`:"+"},当前 ${R?.version})`:void 0:"Git 未安装",onClick:()=>Re(J),children:[e.jsx(na,{className:"h-4 w-4 mr-1"}),E?.operation==="install"&&E?.plugin_id===J.id?"安装中...":"安装"]})]})}),E&&(E.stage==="loading"||E.stage==="success"||E.stage==="error")&&E.operation!=="fetch"&&E.plugin_id===J.id&&e.jsx("div",{className:"px-6 pb-4 -mt-2",children:e.jsxs("div",{className:`space-y-2 p-3 rounded-lg border ${E.stage==="success"?"bg-green-50 dark:bg-green-950/20 border-green-200 dark:border-green-900":E.stage==="error"?"bg-red-50 dark:bg-red-950/20 border-red-200 dark:border-red-900":"bg-muted/50"}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[E.stage==="loading"?e.jsx(Fs,{className:"h-3 w-3 animate-spin"}):E.stage==="success"?e.jsx(st,{className:"h-3 w-3 text-green-600"}):e.jsx(Ut,{className:"h-3 w-3 text-red-600"}),e.jsx("span",{className:`text-xs font-medium ${E.stage==="success"?"text-green-700 dark:text-green-300":E.stage==="error"?"text-red-700 dark:text-red-300":""}`,children:E.stage==="loading"?e.jsxs(e.Fragment,{children:[E.operation==="install"&&"正在安装",E.operation==="uninstall"&&"正在卸载",E.operation==="update"&&"正在更新"]}):E.stage==="success"?e.jsxs(e.Fragment,{children:[E.operation==="install"&&"安装完成",E.operation==="uninstall"&&"卸载完成",E.operation==="update"&&"更新完成"]}):e.jsxs(e.Fragment,{children:[E.operation==="install"&&"安装失败",E.operation==="uninstall"&&"卸载失败",E.operation==="update"&&"更新失败"]})})]}),E.stage!=="error"&&e.jsxs("span",{className:`text-xs font-medium ${E.stage==="success"?"text-green-700 dark:text-green-300":""}`,children:[E.progress,"%"]})]}),E.stage!=="error"&&e.jsx(tr,{value:E.progress,className:`h-1.5 ${E.stage==="success"?"[&>div]:bg-green-500":""}`}),e.jsx("div",{className:`text-xs ${E.stage==="success"?"text-green-600 dark:text-green-400 truncate":E.stage==="error"?"text-red-600 dark:text-red-400":"text-muted-foreground truncate"}`,children:E.stage==="error"?E.error||E.message||"操作失败":E.message})]})})]},J.id))}),e.jsx(Qs,{open:me,onOpenChange:Ne,children:e.jsxs(Hs,{children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"安装插件"}),e.jsxs(at,{children:["安装 ",je?.manifest.name]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["版本: ",je?.manifest.version]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["作者: ",typeof je?.manifest.author=="string"?je.manifest.author:je?.manifest.author?.name]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"advanced-options",checked:Y,onCheckedChange:J=>we(J)}),e.jsx("label",{htmlFor:"advanced-options",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"高级选项"})]}),Y&&e.jsx("div",{className:"space-y-4 p-4 border rounded-lg",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"分支选择"}),e.jsxs(Jt,{value:I,onValueChange:J=>ue(J),children:[e.jsxs(Gt,{className:"grid w-full grid-cols-2",children:[e.jsx(Xe,{value:"preset",className:"text-xs",children:"预设分支"}),e.jsx(Xe,{value:"custom",className:"text-xs",children:"自定义分支"})]}),I==="preset"&&e.jsx("div",{className:"mt-3",children:e.jsxs(Pe,{value:ge,onValueChange:pe,children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:"选择分支"})}),e.jsxs(Be,{children:[e.jsx(W,{value:"main",children:"main (默认)"}),e.jsx(W,{value:"master",children:"master"}),e.jsx(W,{value:"dev",children:"dev (开发版)"}),e.jsx(W,{value:"develop",children:"develop"}),e.jsx(W,{value:"beta",children:"beta (测试版)"}),e.jsx(W,{value:"stable",children:"stable (稳定版)"})]})]})}),I==="custom"&&e.jsxs("div",{className:"space-y-2 mt-3",children:[e.jsx("input",{type:"text",className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",placeholder:"输入分支名称,例如: feature/new-feature",value:D,onChange:J=>Q(J.target.value)}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"输入 Git 分支名称、标签或提交哈希"})]})]})]})}),!Y&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"将从默认分支 (main) 安装插件"})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>Ne(!1),children:"取消"}),e.jsxs(_,{onClick:se,children:[e.jsx(na,{className:"h-4 w-4 mr-2"}),"安装"]})]})]})}),e.jsx(nr,{})]})})}function yC(){return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(fv,{className:"h-8 w-8",strokeWidth:2}),"模型分配预设市场"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"浏览和下载社区共享的模型分配预设配置"})]})})}),e.jsx(ts,{className:"flex-1",children:e.jsx("div",{className:"flex items-center justify-center h-[calc(100vh-12rem)]",children:e.jsxs(Te,{className:"max-w-2xl w-full border-dashed",children:[e.jsxs(Oe,{className:"text-center",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx(xa,{className:"h-16 w-16 text-muted-foreground"})}),e.jsx(Ue,{className:"text-2xl",children:"功能开发中"}),e.jsx(Ns,{className:"text-base",children:"模型分配预设市场功能正在开发中,敬请期待!"})]}),e.jsx(ze,{children:e.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground",children:[e.jsx("p",{className:"font-medium text-foreground",children:"📦 即将推出的功能:"}),e.jsxs("ul",{className:"space-y-2 ml-6",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"浏览社区共享的模型分配预设配置"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"一键下载和应用预设配置"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"分享自己的模型分配方案"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"预设配置评分和评论系统"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2",children:"•"}),e.jsx("span",{children:"根据使用场景智能推荐配置"})]})]})]})})]})})})]})}function wC({field:a,value:l,onChange:r}){const[c,d]=u.useState(!1);switch(a.ui_type){case"switch":return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(T,{children:a.label}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]}),e.jsx(qe,{checked:!!l,onCheckedChange:r,disabled:a.disabled})]});case"number":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsx(ae,{type:"number",value:l??a.default,onChange:m=>r(parseFloat(m.target.value)||0),min:a.min,max:a.max,step:a.step??1,placeholder:a.placeholder,disabled:a.disabled}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"slider":return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{children:a.label}),e.jsx("span",{className:"text-sm text-muted-foreground",children:l??a.default})]}),e.jsx(el,{value:[l??a.default],onValueChange:m=>r(m[0]),min:a.min??0,max:a.max??100,step:a.step??1,disabled:a.disabled}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"select":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsxs(Pe,{value:String(l??a.default),onValueChange:r,disabled:a.disabled,children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:a.placeholder??"请选择"})}),e.jsx(Be,{children:a.choices?.map(m=>e.jsx(W,{value:String(m),children:String(m)},String(m)))})]}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"textarea":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsx(pt,{value:l??a.default,onChange:m=>r(m.target.value),placeholder:a.placeholder,rows:a.rows??3,disabled:a.disabled}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"password":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsxs("div",{className:"relative",children:[e.jsx(ae,{type:c?"text":"password",value:l??"",onChange:m=>r(m.target.value),placeholder:a.placeholder,disabled:a.disabled,className:"pr-10"}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>d(!c),children:c?e.jsx(ic,{className:"h-4 w-4"}):e.jsx(ua,{className:"h-4 w-4"})})]}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"list":return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsx(TS,{value:Array.isArray(l)?l:[],onChange:m=>r(m),itemType:a.item_type??"string",itemFields:a.item_fields,minItems:a.min_items,maxItems:a.max_items,disabled:a.disabled,placeholder:a.placeholder}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]});case"text":default:return e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:a.label}),e.jsx(ae,{type:"text",value:l??a.default??"",onChange:m=>r(m.target.value),placeholder:a.placeholder,maxLength:a.max_length,disabled:a.disabled}),a.hint&&e.jsx("p",{className:"text-xs text-muted-foreground",children:a.hint})]})}}function lj({section:a,config:l,onChange:r}){const[c,d]=u.useState(!a.collapsed),m=Object.entries(a.fields).filter(([,h])=>!h.hidden).sort(([,h],[,f])=>h.order-f.order);return e.jsx(xc,{open:c,onOpenChange:d,children:e.jsxs(Te,{children:[e.jsx(hc,{asChild:!0,children:e.jsxs(Oe,{className:"cursor-pointer hover:bg-muted/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c?e.jsx(Ia,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(ra,{className:"h-4 w-4 text-muted-foreground"}),e.jsx(Ue,{className:"text-lg",children:a.title})]}),e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:[m.length," 项"]})]}),a.description&&e.jsx(Ns,{className:"ml-6",children:a.description})]})}),e.jsx(fc,{children:e.jsx(ze,{className:"space-y-4 pt-0",children:m.map(([h,f])=>e.jsx(wC,{field:f,value:l[a.name]?.[h],onChange:p=>r(a.name,h,p),sectionName:a.name},h))})})]})})}function _C({plugin:a,onBack:l}){const{toast:r}=nt(),{triggerRestart:c,isRestarting:d}=Tn(),[m,h]=u.useState("visual"),[f,p]=u.useState(null),[g,N]=u.useState({}),[j,b]=u.useState({}),[y,w]=u.useState(""),[z,M]=u.useState(""),[S,F]=u.useState(!0),[E,C]=u.useState(!1),[R,H]=u.useState(!1),[O,X]=u.useState(!1),[L,me]=u.useState(!1),Ne=u.useCallback(async()=>{F(!0);try{const[I,ue,Y]=await Promise.all([cC(a.id),oC(a.id),dC(a.id)]);p(I),N(ue),b(JSON.parse(JSON.stringify(ue))),w(Y),M(Y)}catch(I){r({title:"加载配置失败",description:I instanceof Error?I.message:"未知错误",variant:"destructive"})}finally{F(!1)}},[a.id,r]);u.useEffect(()=>{Ne()},[Ne]),u.useEffect(()=>{H(m==="visual"?JSON.stringify(g)!==JSON.stringify(j):y!==z)},[g,j,y,z,m]);const je=(I,ue,Y)=>{N(we=>({...we,[I]:{...we[I]||{},[ue]:Y}}))},re=async()=>{C(!0);try{if(m==="source"){try{_x(y)}catch(I){X(!0),r({title:"TOML 格式错误",description:I instanceof Error?I.message:"无法解析 TOML 配置,请检查语法",variant:"destructive"}),C(!1);return}await mC(a.id,y),M(y),X(!1)}else await uC(a.id,g),b(JSON.parse(JSON.stringify(g)));r({title:"配置已保存",description:"更改将在插件重新加载后生效"})}catch(I){r({title:"保存失败",description:I instanceof Error?I.message:"未知错误",variant:"destructive"})}finally{C(!1)}},ge=async()=>{try{await xC(a.id),r({title:"配置已重置",description:"下次加载插件时将使用默认配置"}),me(!1),Ne()}catch(I){r({title:"重置失败",description:I instanceof Error?I.message:"未知错误",variant:"destructive"})}},pe=async()=>{try{const I=await hC(a.id);r({title:I.message,description:I.note}),Ne()}catch(I){r({title:"切换状态失败",description:I instanceof Error?I.message:"未知错误",variant:"destructive"})}};if(S)return e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(!f)return e.jsxs("div",{className:"flex flex-col items-center justify-center h-64 space-y-4",children:[e.jsx(Ut,{className:"h-12 w-12 text-muted-foreground"}),e.jsx("p",{className:"text-muted-foreground",children:"无法加载配置"}),e.jsxs(_,{onClick:l,variant:"outline",children:[e.jsx($a,{className:"h-4 w-4 mr-2"}),"返回"]})]});const D=Object.values(f.sections).sort((I,ue)=>I.order-ue.order),Q=g.plugin?.enabled!==!1;return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:l,children:e.jsx($a,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:f.plugin_info.name||a.manifest.name}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(Ce,{variant:Q?"default":"secondary",children:Q?"已启用":"已禁用"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["v",f.plugin_info.version||a.manifest.version]})]})]})]}),e.jsxs("div",{className:"flex gap-2 ml-10 sm:ml-0",children:[e.jsx(_,{variant:"outline",size:"sm",onClick:()=>h(m==="visual"?"source":"visual"),children:m==="visual"?e.jsxs(e.Fragment,{children:[e.jsx(dx,{className:"h-4 w-4 mr-2"}),"源代码"]}):e.jsxs(e.Fragment,{children:[e.jsx(uv,{className:"h-4 w-4 mr-2"}),"可视化"]})}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c(),disabled:d,children:[e.jsx(hv,{className:`h-4 w-4 mr-2 ${d?"animate-spin":""}`}),"重启麦麦"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:pe,children:[e.jsx(pc,{className:"h-4 w-4 mr-2"}),Q?"禁用":"启用"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:()=>me(!0),children:[e.jsx(rc,{className:"h-4 w-4 mr-2"}),"重置"]}),e.jsxs(_,{size:"sm",onClick:re,disabled:!R||E,children:[E?e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}):e.jsx(gc,{className:"h-4 w-4 mr-2"}),"保存"]})]})]}),R&&e.jsx(Te,{className:"border-orange-200 bg-orange-50 dark:bg-orange-950/20 dark:border-orange-900",children:e.jsx(ze,{className:"py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Yt,{className:"h-4 w-4 text-orange-600"}),e.jsx("p",{className:"text-sm text-orange-800 dark:text-orange-200",children:"有未保存的更改"})]})})}),m==="source"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsxs(ft,{children:[e.jsx("strong",{children:"源代码模式(高级功能):"}),"直接编辑 TOML 配置文件。保存时会验证格式,只有格式正确才能保存。",O&&e.jsx("span",{className:"text-destructive font-semibold ml-2",children:"⚠️ 上次保存失败,请检查 TOML 格式"})]})]}),e.jsx(Qv,{value:y,onChange:I=>{w(I),O&&X(!1)},language:"toml",theme:"dark",height:"calc(100vh - 350px)",minHeight:"500px",placeholder:"TOML 配置内容"})]}),m==="visual"&&e.jsxs(e.Fragment,{children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsxs(ft,{children:[e.jsx("strong",{children:"提示:"}),"如果插件当前未加载或未启用,WebUI 适配器的高级插件可视化编辑功能可能会不可用。 请确保插件已启用并成功加载后,再进行配置编辑。"]})]}),f.layout.type==="tabs"&&f.layout.tabs.length>0?e.jsxs(Jt,{defaultValue:f.layout.tabs[0]?.id,children:[e.jsx(Gt,{children:f.layout.tabs.map(I=>e.jsxs(Xe,{value:I.id,children:[I.title,I.badge&&e.jsx(Ce,{variant:"secondary",className:"ml-2 text-xs",children:I.badge})]},I.id))}),f.layout.tabs.map(I=>e.jsx(Ss,{value:I.id,className:"space-y-4 mt-4",children:I.sections.map(ue=>{const Y=f.sections[ue];return Y?e.jsx(lj,{section:Y,config:g,onChange:je},ue):null})},I.id))]}):e.jsx("div",{className:"space-y-4",children:D.map(I=>e.jsx(lj,{section:I,config:g,onChange:je},I.name))})]}),e.jsx(Qs,{open:L,onOpenChange:me,children:e.jsxs(Hs,{children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"确认重置配置"}),e.jsx(at,{children:"这将删除当前配置文件,下次加载插件时将使用默认配置。此操作不可撤销。"})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>me(!1),children:"取消"}),e.jsx(_,{variant:"destructive",onClick:ge,children:"确认重置"})]})]})})]})}function SC(){return e.jsx(lr,{children:e.jsx(kC,{})})}function kC(){const{toast:a}=nt(),[l,r]=u.useState([]),[c,d]=u.useState(!0),[m,h]=u.useState(""),[f,p]=u.useState(null),g=async()=>{d(!0);try{const w=await Bl();r(w)}catch(w){a({title:"加载插件列表失败",description:w instanceof Error?w.message:"未知错误",variant:"destructive"})}finally{d(!1)}};u.useEffect(()=>{g()},[]);const j=l.filter(w=>{const z=m.toLowerCase();return w.id.toLowerCase().includes(z)||w.manifest.name.toLowerCase().includes(z)||w.manifest.description?.toLowerCase().includes(z)}).filter((w,z,M)=>z===M.findIndex(S=>S.id===w.id)),b=l.length,y=0;return f?e.jsxs(e.Fragment,{children:[e.jsx(ts,{className:"h-full",children:e.jsx("div",{className:"p-4 sm:p-6",children:e.jsx(_C,{plugin:f,onBack:()=>p(null)})})}),e.jsx(nr,{})]}):e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件配置"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理和配置已安装的插件"})]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:g,children:[e.jsx(dt,{className:`h-4 w-4 mr-2 ${c?"animate-spin":""}`}),"刷新"]})]}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 xs:grid-cols-2 lg:grid-cols-3",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"已安装插件"}),e.jsx(xa,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-2xl font-bold",children:l.length}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:c?"正在加载...":"个插件"})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"已启用"}),e.jsx(st,{className:"h-4 w-4 text-green-600"})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-2xl font-bold",children:b}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"运行中的插件"})]})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:"已禁用"}),e.jsx(Ut,{className:"h-4 w-4 text-orange-600"})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-2xl font-bold",children:y}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"未激活的插件"})]})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{placeholder:"搜索插件...",value:m,onChange:w=>h(w.target.value),className:"pl-9"})]}),e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"已安装的插件"}),e.jsx(Ns,{children:"点击插件查看和编辑配置"})]}),e.jsx(ze,{children:c?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):j.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 space-y-4",children:[e.jsx(xa,{className:"h-16 w-16 text-muted-foreground/50"}),e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("p",{className:"text-lg font-medium text-muted-foreground",children:m?"没有找到匹配的插件":"暂无已安装的插件"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:m?"尝试其他搜索关键词":"前往插件市场安装插件"})]})]}):e.jsx("div",{className:"space-y-2",children:j.map(w=>e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg border hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>p(w),children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"h-10 w-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:e.jsx(xa,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-medium truncate",children:w.manifest.name}),e.jsxs(Ce,{variant:"secondary",className:"text-xs flex-shrink-0",children:["v",w.manifest.version]})]}),e.jsx("p",{className:"text-sm text-muted-foreground truncate",children:w.manifest.description||"暂无描述"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(_,{variant:"ghost",size:"sm",children:e.jsx(Sn,{className:"h-4 w-4"})}),e.jsx(ra,{className:"h-4 w-4 text-muted-foreground"})]})]},w.id))})})]})]})})}function CC(){const a=ha(),{toast:l}=nt(),[r,c]=u.useState([]),[d,m]=u.useState(!0),[h,f]=u.useState(null),[p,g]=u.useState(null),[N,j]=u.useState(!1),[b,y]=u.useState(!1),[w,z]=u.useState({id:"",name:"",raw_prefix:"",clone_prefix:"",enabled:!0,priority:1}),M=u.useCallback(async()=>{try{m(!0),f(null);const O=await ke("/api/webui/plugins/mirrors");if(!O.ok)throw new Error("获取镜像源列表失败");const X=await O.json();c(X.mirrors||[])}catch(O){const X=O instanceof Error?O.message:"加载镜像源失败";f(X),l({title:"加载失败",description:X,variant:"destructive"})}finally{m(!1)}},[l]);u.useEffect(()=>{M()},[M]);const S=async()=>{try{const O=await ke("/api/webui/plugins/mirrors",{method:"POST",body:JSON.stringify(w)});if(!O.ok){const X=await O.json();throw new Error(X.detail||"添加镜像源失败")}l({title:"添加成功",description:"镜像源已添加"}),j(!1),z({id:"",name:"",raw_prefix:"",clone_prefix:"",enabled:!0,priority:1}),M()}catch(O){l({title:"添加失败",description:O instanceof Error?O.message:"未知错误",variant:"destructive"})}},F=async()=>{if(p)try{if(!(await ke(`/api/webui/plugins/mirrors/${p.id}`,{method:"PUT",body:JSON.stringify({name:w.name,raw_prefix:w.raw_prefix,clone_prefix:w.clone_prefix,enabled:w.enabled,priority:w.priority})})).ok)throw new Error("更新镜像源失败");l({title:"更新成功",description:"镜像源已更新"}),y(!1),g(null),M()}catch(O){l({title:"更新失败",description:O instanceof Error?O.message:"未知错误",variant:"destructive"})}},E=async O=>{if(confirm("确定要删除这个镜像源吗?"))try{if(!(await ke(`/api/webui/plugins/mirrors/${O}`,{method:"DELETE"})).ok)throw new Error("删除镜像源失败");l({title:"删除成功",description:"镜像源已删除"}),M()}catch(X){l({title:"删除失败",description:X instanceof Error?X.message:"未知错误",variant:"destructive"})}},C=async O=>{try{if(!(await ke(`/api/webui/plugins/mirrors/${O.id}`,{method:"PUT",body:JSON.stringify({enabled:!O.enabled})})).ok)throw new Error("更新状态失败");M()}catch(X){l({title:"更新失败",description:X instanceof Error?X.message:"未知错误",variant:"destructive"})}},R=O=>{g(O),z({id:O.id,name:O.name,raw_prefix:O.raw_prefix,clone_prefix:O.clone_prefix,enabled:O.enabled,priority:O.priority}),y(!0)},H=async(O,X)=>{const L=X==="up"?O.priority-1:O.priority+1;if(!(L<1))try{if(!(await ke(`/api/webui/plugins/mirrors/${O.id}`,{method:"PUT",body:JSON.stringify({priority:L})})).ok)throw new Error("更新优先级失败");M()}catch(me){l({title:"更新失败",description:me instanceof Error?me.message:"未知错误",variant:"destructive"})}};return e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>a({to:"/plugins"}),children:e.jsx($a,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"镜像源配置"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"管理 Git 克隆和文件下载的镜像源"})]})]}),e.jsxs(_,{onClick:()=>j(!0),children:[e.jsx(Xs,{className:"h-4 w-4 mr-2"}),"添加镜像源"]})]}),d?e.jsx(Te,{className:"p-6",children:e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-primary"})})}):h?e.jsx(Te,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(Lt,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:h}),e.jsx(_,{onClick:M,children:"重新加载"})]})}):e.jsxs(Te,{children:[e.jsx("div",{className:"hidden md:block",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{children:"状态"}),e.jsx(ns,{children:"名称"}),e.jsx(ns,{children:"ID"}),e.jsx(ns,{children:"优先级"}),e.jsx(ns,{className:"text-right",children:"操作"})]})}),e.jsx(Gl,{children:r.map(O=>e.jsxs(_t,{children:[e.jsx(Ze,{children:e.jsx(qe,{checked:O.enabled,onCheckedChange:()=>C(O)})}),e.jsx(Ze,{children:e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:O.name}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Raw: ",O.raw_prefix]})]})}),e.jsx(Ze,{children:e.jsx(Ce,{variant:"outline",children:O.id})}),e.jsx(Ze,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono",children:O.priority}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(_,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>H(O,"up"),disabled:O.priority===1,children:e.jsx(Xr,{className:"h-3 w-3"})}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>H(O,"down"),children:e.jsx(Ia,{className:"h-3 w-3"})})]})]})}),e.jsx(Ze,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>R(O),children:e.jsx(Zn,{className:"h-4 w-4"})}),e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>E(O.id),children:e.jsx(os,{className:"h-4 w-4 text-destructive"})})]})})]},O.id))})]})}),e.jsx("div",{className:"md:hidden p-4 space-y-4",children:r.map(O=>e.jsx(Te,{className:"p-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-semibold",children:O.name}),O.enabled&&e.jsx(Ce,{variant:"default",className:"text-xs",children:"启用"})]}),e.jsx(Ce,{variant:"outline",className:"mt-1 text-xs",children:O.id})]}),e.jsx(qe,{checked:O.enabled,onCheckedChange:()=>C(O)})]}),e.jsxs("div",{className:"text-sm space-y-1",children:[e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium",children:"Raw: "}),e.jsx("span",{className:"break-all",children:O.raw_prefix})]}),e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium",children:"优先级: "}),e.jsx("span",{className:"font-mono",children:O.priority})]})]}),e.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t",children:[e.jsxs(_,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>R(O),children:[e.jsx(Zn,{className:"h-4 w-4 mr-1"}),"编辑"]}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>H(O,"up"),disabled:O.priority===1,children:e.jsx(Xr,{className:"h-4 w-4"})}),e.jsx(_,{variant:"outline",size:"sm",onClick:()=>H(O,"down"),children:e.jsx(Ia,{className:"h-4 w-4"})}),e.jsx(_,{variant:"destructive",size:"sm",onClick:()=>E(O.id),children:e.jsx(os,{className:"h-4 w-4"})})]})]})},O.id))})]}),e.jsx(Qs,{open:N,onOpenChange:j,children:e.jsxs(Hs,{className:"max-w-lg",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"添加镜像源"}),e.jsx(at,{children:"添加新的 Git 镜像源配置"})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-id",children:"镜像源 ID *"}),e.jsx(ae,{id:"add-id",placeholder:"例如: my-mirror",value:w.id,onChange:O=>z({...w,id:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-name",children:"名称 *"}),e.jsx(ae,{id:"add-name",placeholder:"例如: 我的镜像源",value:w.name,onChange:O=>z({...w,name:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-raw",children:"Raw 文件前缀 *"}),e.jsx(ae,{id:"add-raw",placeholder:"https://example.com/raw",value:w.raw_prefix,onChange:O=>z({...w,raw_prefix:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-clone",children:"克隆前缀 *"}),e.jsx(ae,{id:"add-clone",placeholder:"https://example.com/clone",value:w.clone_prefix,onChange:O=>z({...w,clone_prefix:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"add-priority",children:"优先级"}),e.jsx(ae,{id:"add-priority",type:"number",min:"1",value:w.priority,onChange:O=>z({...w,priority:parseInt(O.target.value)||1})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"数字越小优先级越高"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"add-enabled",checked:w.enabled,onCheckedChange:O=>z({...w,enabled:O})}),e.jsx(T,{htmlFor:"add-enabled",children:"启用此镜像源"})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>j(!1),children:"取消"}),e.jsx(_,{onClick:S,children:"添加"})]})]})}),e.jsx(Qs,{open:b,onOpenChange:y,children:e.jsxs(Hs,{className:"max-w-lg",children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"编辑镜像源"}),e.jsx(at,{children:"修改镜像源配置"})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"镜像源 ID"}),e.jsx(ae,{value:w.id,disabled:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit-name",children:"名称 *"}),e.jsx(ae,{id:"edit-name",value:w.name,onChange:O=>z({...w,name:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit-raw",children:"Raw 文件前缀 *"}),e.jsx(ae,{id:"edit-raw",value:w.raw_prefix,onChange:O=>z({...w,raw_prefix:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit-clone",children:"克隆前缀 *"}),e.jsx(ae,{id:"edit-clone",value:w.clone_prefix,onChange:O=>z({...w,clone_prefix:O.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"edit-priority",children:"优先级"}),e.jsx(ae,{id:"edit-priority",type:"number",min:"1",value:w.priority,onChange:O=>z({...w,priority:parseInt(O.target.value)||1})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"数字越小优先级越高"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qe,{id:"edit-enabled",checked:w.enabled,onCheckedChange:O=>z({...w,enabled:O})}),e.jsx(T,{htmlFor:"edit-enabled",children:"启用此镜像源"})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>y(!1),children:"取消"}),e.jsx(_,{onClick:F,children:"保存"})]})]})})]})})}function TC({pluginId:a,compact:l=!1}){const[r,c]=u.useState(null),[d,m]=u.useState(!0),[h,f]=u.useState(0),[p,g]=u.useState(""),[N,j]=u.useState(!1),{toast:b}=nt(),y=async()=>{m(!0);const S=await bN(a);S&&c(S),m(!1)};u.useEffect(()=>{y()},[a]);const w=async()=>{const S=await fC(a);S.success?(b({title:"已点赞",description:"感谢你的支持!"}),y()):b({title:"点赞失败",description:S.error||"未知错误",variant:"destructive"})},z=async()=>{const S=await pC(a);S.success?(b({title:"已反馈",description:"感谢你的反馈!"}),y()):b({title:"操作失败",description:S.error||"未知错误",variant:"destructive"})},M=async()=>{if(h===0){b({title:"请选择评分",description:"至少选择 1 颗星",variant:"destructive"});return}const S=await gC(a,h,p||void 0);S.success?(b({title:"评分成功",description:"感谢你的评价!"}),j(!1),f(0),g(""),y()):b({title:"评分失败",description:S.error||"未知错误",variant:"destructive"})};return d?e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"h-4 w-4"}),e.jsx("span",{children:"-"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(vn,{className:"h-4 w-4"}),e.jsx("span",{children:"-"})]})]}):r?l?e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",title:`下载量: ${r.downloads.toLocaleString()}`,children:[e.jsx(na,{className:"h-4 w-4"}),e.jsx("span",{children:r.downloads.toLocaleString()})]}),e.jsxs("div",{className:"flex items-center gap-1",title:`评分: ${r.rating.toFixed(1)} (${r.rating_count} 条评价)`,children:[e.jsx(vn,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),e.jsx("span",{children:r.rating.toFixed(1)})]}),e.jsxs("div",{className:"flex items-center gap-1",title:`点赞数: ${r.likes}`,children:[e.jsx(Mm,{className:"h-4 w-4"}),e.jsx("span",{children:r.likes})]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"flex flex-col items-center p-3 rounded-lg border bg-card",children:[e.jsx(na,{className:"h-5 w-5 text-muted-foreground mb-1"}),e.jsx("span",{className:"text-2xl font-bold",children:r.downloads.toLocaleString()}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"下载量"})]}),e.jsxs("div",{className:"flex flex-col items-center p-3 rounded-lg border bg-card",children:[e.jsx(vn,{className:"h-5 w-5 text-yellow-400 mb-1 fill-yellow-400"}),e.jsx("span",{className:"text-2xl font-bold",children:r.rating.toFixed(1)}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[r.rating_count," 条评价"]})]}),e.jsxs("div",{className:"flex flex-col items-center p-3 rounded-lg border bg-card",children:[e.jsx(Mm,{className:"h-5 w-5 text-green-500 mb-1"}),e.jsx("span",{className:"text-2xl font-bold",children:r.likes}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"点赞"})]}),e.jsxs("div",{className:"flex flex-col items-center p-3 rounded-lg border bg-card",children:[e.jsx(Ag,{className:"h-5 w-5 text-red-500 mb-1"}),e.jsx("span",{className:"text-2xl font-bold",children:r.dislikes}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"点踩"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_,{variant:"outline",size:"sm",onClick:w,children:[e.jsx(Mm,{className:"h-4 w-4 mr-1"}),"点赞"]}),e.jsxs(_,{variant:"outline",size:"sm",onClick:z,children:[e.jsx(Ag,{className:"h-4 w-4 mr-1"}),"点踩"]}),e.jsxs(Qs,{open:N,onOpenChange:j,children:[e.jsx(dd,{asChild:!0,children:e.jsxs(_,{variant:"default",size:"sm",children:[e.jsx(vn,{className:"h-4 w-4 mr-1"}),"评分"]})}),e.jsxs(Hs,{children:[e.jsxs(qs,{children:[e.jsx(Vs,{children:"为插件评分"}),e.jsx(at,{children:"分享你的使用体验,帮助其他用户"})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("div",{className:"flex gap-2",children:[1,2,3,4,5].map(S=>e.jsx("button",{onClick:()=>f(S),className:"focus:outline-none",children:e.jsx(vn,{className:`h-8 w-8 transition-colors ${S<=h?"fill-yellow-400 text-yellow-400":"text-muted-foreground hover:text-yellow-300"}`})},S))}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[h===0&&"点击星星进行评分",h===1&&"很差",h===2&&"一般",h===3&&"还行",h===4&&"不错",h===5&&"非常好"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"评论(可选)"}),e.jsx(pt,{value:p,onChange:S=>g(S.target.value),placeholder:"分享你的使用体验...",rows:4,maxLength:500}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-1 text-right",children:[p.length," / 500"]})]})]}),e.jsxs(gt,{children:[e.jsx(_,{variant:"outline",onClick:()=>j(!1),children:"取消"}),e.jsx(_,{onClick:M,disabled:h===0,children:"提交评分"})]})]})]})]}),r.recent_ratings&&r.recent_ratings.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"最近评价"}),e.jsx("div",{className:"space-y-3",children:r.recent_ratings.map((S,F)=>e.jsxs("div",{className:"p-3 rounded-lg border bg-muted/50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(E=>e.jsx(vn,{className:`h-3 w-3 ${E<=S.rating?"fill-yellow-400 text-yellow-400":"text-muted-foreground"}`},E))}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(S.created_at).toLocaleDateString()})]}),S.comment&&e.jsx("p",{className:"text-sm text-muted-foreground",children:S.comment})]},F))})]})]}):null}const EC={"Group Management":"群组管理","Entertainment & Interaction":"娱乐互动","Utility Tools":"实用工具","Content Generation":"内容生成",Multimedia:"多媒体","External Integration":"外部集成","Data Analysis & Insights":"数据分析与洞察",Other:"其他"};function MC(){const a=ha(),l=lw({strict:!1}),{toast:r}=nt(),[c,d]=u.useState(null),[m,h]=u.useState(""),[f,p]=u.useState(!0),[g,N]=u.useState(!0),[j,b]=u.useState(null),[y,w]=u.useState(null),[z,M]=u.useState(null),[S,F]=u.useState(!1),[E,C]=u.useState(),[R,H]=u.useState(!1);u.useEffect(()=>{(async()=>{if(!l.pluginId){b("缺少插件 ID"),p(!1);return}try{p(!0),b(null);const ge=await ke("/api/webui/plugins/fetch-raw",{method:"POST",body:JSON.stringify({owner:"Mai-with-u",repo:"plugin-repo",branch:"main",file_path:"plugin_details.json"})});if(!ge.ok)throw new Error("获取插件列表失败");const pe=await ge.json();if(!pe.success||!pe.data)throw new Error(pe.error||"获取插件列表失败");const Q=JSON.parse(pe.data).find(fe=>fe.id===l.pluginId);if(!Q)throw new Error("未找到该插件");const I={id:Q.id,manifest:Q.manifest,downloads:0,rating:0,review_count:0,installed:!1,published_at:new Date().toISOString(),updated_at:new Date().toISOString()};d(I);const[ue,Y,we]=await Promise.all([fN(),pN(),Bl()]);w(ue),M(Y),F(bn(l.pluginId,we)),C(yn(l.pluginId,we))}catch(ge){b(ge instanceof Error?ge.message:"加载失败")}finally{p(!1)}})()},[l.pluginId]),u.useEffect(()=>{(async()=>{if(!c?.manifest?.repository_url){N(!1);return}try{if(N(!0),S&&l.pluginId)try{const Y=await ke(`/api/webui/plugins/local-readme/${l.pluginId}`);if(Y.ok){const we=await Y.json();if(we.success&&we.data){h(we.data),N(!1);return}}}catch(Y){console.log("本地 README 获取失败,尝试远程获取:",Y)}const ge=c.manifest.repository_url.match(/github\.com\/([^/]+)\/([^/\s]+)/);if(!ge){h("无法解析仓库地址");return}const[,pe,D]=ge,Q=D.replace(/\.git$/,""),I=await ke("/api/webui/plugins/fetch-raw",{method:"POST",body:JSON.stringify({owner:pe,repo:Q,branch:"main",file_path:"README.md"})});if(!I.ok)throw new Error("获取 README 失败");const ue=await I.json();ue.success&&ue.data?h(ue.data):h("该插件暂无 README 文档")}catch(ge){console.error("加载 README 失败:",ge),h("加载 README 失败")}finally{N(!1)}})()},[c,S,l.pluginId]);const O=()=>!c||!S||!E?!1:E!==c.manifest.version,X=()=>!c||!z?!0:gN(c.manifest.host_application.min_version,c.manifest.host_application.max_version,z),L=async()=>{if(!(!c||!y?.installed))try{H(!0),await jN(c.id,c.manifest.repository_url||"","main"),yN(c.id).catch(ge=>{console.warn("Failed to record download:",ge)}),r({title:"安装成功",description:`${c.manifest.name} 已成功安装`});const re=await Bl();F(bn(c.id,re)),C(yn(c.id,re))}catch(re){r({title:"安装失败",description:re instanceof Error?re.message:"未知错误",variant:"destructive"})}finally{H(!1)}},me=async()=>{if(c)try{H(!0),await vN(c.id),r({title:"卸载成功",description:`${c.manifest.name} 已成功卸载`});const re=await Bl();F(bn(c.id,re)),C(yn(c.id,re))}catch(re){r({title:"卸载失败",description:re instanceof Error?re.message:"未知错误",variant:"destructive"})}finally{H(!1)}},Ne=async()=>{if(!(!c||!y?.installed))try{H(!0);const re=await NN(c.id,c.manifest.repository_url||"","main");r({title:"更新成功",description:`${c.manifest.name} 已从 ${re.old_version} 更新到 ${re.new_version}`});const ge=await Bl();F(bn(c.id,ge)),C(yn(c.id,ge))}catch(re){r({title:"更新失败",description:re instanceof Error?re.message:"未知错误",variant:"destructive"})}finally{H(!1)}};if(f)return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>a({to:"/plugins"}),children:e.jsx($a,{className:"h-5 w-5"})}),e.jsx("div",{children:e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件详情"})})]}),e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"加载插件信息中..."})]})]});if(j||!c)return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>a({to:"/plugins"}),children:e.jsx($a,{className:"h-5 w-5"})}),e.jsx("div",{children:e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件详情"})})]}),e.jsx(Te,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx(Ut,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:j}),e.jsx(_,{onClick:()=>a({to:"/plugins"}),children:"返回插件列表"})]})})]});const je=X();return e.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>a({to:"/plugins"}),className:"shrink-0",children:e.jsx($a,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件详情"}),e.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:c.manifest.name})]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:S?e.jsxs(e.Fragment,{children:[O()?e.jsx(_,{disabled:!y?.installed||R,onClick:Ne,title:y?.installed?void 0:"Git 未安装",children:R?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"更新中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(dt,{className:"h-4 w-4 mr-2"}),"更新"]})}):null,e.jsx(_,{variant:"destructive",disabled:!y?.installed||R,onClick:me,title:y?.installed?void 0:"Git 未安装",children:R?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"卸载中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(os,{className:"h-4 w-4 mr-2"}),"卸载"]})})]}):e.jsx(_,{disabled:!y?.installed||!je||R,onClick:L,title:y?.installed?je?void 0:`不兼容当前版本 (需要 ${c.manifest.host_application.min_version}${c.manifest.host_application.max_version?` - ${c.manifest.host_application.max_version}`:"+"},当前 ${z?.version})`:"Git 未安装",children:R?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"安装中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(na,{className:"h-4 w-4 mr-2"}),"安装"]})})})]}),e.jsx(ts,{className:"h-[calc(100vh-200px)] sm:h-[calc(100vh-220px)]",children:e.jsxs("div",{className:"space-y-6 pr-4",children:[e.jsx(Te,{children:e.jsx(Oe,{children:e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx(Ue,{className:"text-2xl",children:c.manifest.name}),e.jsxs(Ce,{variant:"secondary",className:"text-sm",children:["v",c.manifest.version]}),S&&e.jsxs(Ce,{variant:"default",className:"text-sm",children:[e.jsx(st,{className:"h-3 w-3 mr-1"}),"已安装 ",E&&`(v${E})`]}),O()&&e.jsxs(Ce,{variant:"outline",className:"text-sm border-orange-500 text-orange-500",children:[e.jsx(dt,{className:"h-3 w-3 mr-1"}),"可更新"]}),!je&&e.jsxs(Ce,{variant:"destructive",className:"text-sm",children:[e.jsx(Ut,{className:"h-3 w-3 mr-1"}),"不兼容"]})]}),e.jsx(Ns,{className:"text-base",children:c.manifest.description})]})})})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-1 space-y-6",children:[e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{className:"text-lg",children:"统计信息"})}),e.jsx(ze,{children:e.jsx(TC,{pluginId:c.id})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{className:"text-lg",children:"基本信息"})}),e.jsx(ze,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Fl,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"作者:"}),e.jsx("span",{className:"font-medium",children:c.manifest.author?.name||"Unknown"}),c.manifest.author?.url&&e.jsx("a",{href:c.manifest.author.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:e.jsx(Bo,{className:"h-3 w-3"})})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(xa,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"版本:"}),e.jsxs("span",{className:"font-medium",children:["v",c.manifest.version]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(ov,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"许可证:"}),e.jsx("span",{className:"font-medium",children:c.manifest.license})]}),c.manifest.homepage_url&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Go,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"主页:"}),e.jsxs("a",{href:c.manifest.homepage_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:["访问",e.jsx(Bo,{className:"h-3 w-3"})]})]}),c.manifest.repository_url&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Q_,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"仓库:"}),e.jsxs("a",{href:c.manifest.repository_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:["GitHub",e.jsx(Bo,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"pt-2 border-t",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm mb-2",children:[e.jsx(Yt,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"支持版本:"})]}),e.jsxs("div",{className:"text-sm pl-6 font-medium",children:[c.manifest.host_application.min_version,c.manifest.host_application.max_version?` - ${c.manifest.host_application.max_version}`:" - 最新版本"]})]})]})})]}),(c.manifest.categories||c.manifest.keywords)&&e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{className:"text-lg",children:"分类与标签"})}),e.jsxs(ze,{className:"space-y-4",children:[c.manifest.categories&&c.manifest.categories.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"分类"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:c.manifest.categories.map(re=>e.jsx(Ce,{variant:"secondary",children:EC[re]||re},re))})]}),c.manifest.keywords&&c.manifest.keywords.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"标签"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:c.manifest.keywords.map(re=>e.jsxs(Ce,{variant:"outline",className:"text-xs",children:[e.jsx(cd,{className:"h-3 w-3 mr-1"}),re]},re))})]})]})]})]}),e.jsxs(Te,{className:"lg:col-span-2",children:[e.jsx(Oe,{children:e.jsx(Ue,{className:"text-lg",children:"插件说明"})}),e.jsx(ze,{children:e.jsx(ts,{className:"h-[600px] pr-4",children:g?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(Fs,{className:"h-6 w-6 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-sm text-muted-foreground",children:"加载说明文档中..."})]}):m?e.jsx(bx,{content:m}):e.jsx("div",{className:"text-center text-muted-foreground py-12",children:"暂无说明文档"})})})]})]})]})})]})}const ec=u.forwardRef(({className:a,...l},r)=>e.jsx(Aj,{ref:r,className:P("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",a),...l}));ec.displayName=Aj.displayName;const AC=u.forwardRef(({className:a,...l},r)=>e.jsx(zj,{ref:r,className:P("aspect-square h-full w-full",a),...l}));AC.displayName=zj.displayName;const sc=u.forwardRef(({className:a,...l},r)=>e.jsx(Rj,{ref:r,className:P("flex h-full w-full items-center justify-center rounded-full bg-muted",a),...l}));sc.displayName=Rj.displayName;function zC(){return"webui_"+Math.random().toString(36).substr(2,9)+"_"+Date.now().toString(36)}function RC(){const a="maibot_webui_user_id";let l=localStorage.getItem(a);return l||(l=zC(),localStorage.setItem(a,l)),l}function DC(){return localStorage.getItem("maibot_webui_user_name")||"WebUI用户"}function OC(a){localStorage.setItem("maibot_webui_user_name",a)}const wN="maibot_webui_virtual_tabs";function LC(){try{const a=localStorage.getItem(wN);if(a)return JSON.parse(a)}catch(a){console.error("[Chat] 加载虚拟标签页失败:",a)}return[]}function nj(a){try{localStorage.setItem(wN,JSON.stringify(a))}catch(l){console.error("[Chat] 保存虚拟标签页失败:",l)}}function UC({segment:a}){switch(a.type){case"text":return e.jsx("span",{className:"whitespace-pre-wrap",children:String(a.data)});case"image":case"emoji":return e.jsx("img",{src:String(a.data),alt:a.type==="emoji"?"表情包":"图片",className:P("rounded-lg max-w-full",a.type==="emoji"?"max-h-32":"max-h-64"),loading:"lazy",onError:l=>{const r=l.target;r.style.display="none",r.parentElement?.insertAdjacentHTML("beforeend",`[${a.type==="emoji"?"表情包":"图片"}加载失败]`)}});case"voice":return e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("audio",{controls:!0,src:String(a.data),className:"max-w-[200px] h-8",children:"您的浏览器不支持音频播放"})});case"video":return e.jsx("video",{controls:!0,src:String(a.data),className:"rounded-lg max-w-full max-h-64",children:"您的浏览器不支持视频播放"});case"face":return e.jsxs("span",{className:"text-muted-foreground",children:["[表情:",String(a.data),"]"]});case"music":return e.jsx("span",{className:"text-muted-foreground",children:"[音乐分享]"});case"file":return e.jsxs("span",{className:"text-muted-foreground",children:["[文件: ",String(a.data),"]"]});case"reply":return e.jsx("span",{className:"text-muted-foreground text-xs",children:"[回复消息]"});case"forward":return e.jsx("span",{className:"text-muted-foreground",children:"[转发消息]"});case"unknown":default:return e.jsxs("span",{className:"text-muted-foreground",children:["[",a.original_type||"未知消息","]"]})}}function $C({message:a,isBot:l}){return a.message_type==="rich"&&a.segments&&a.segments.length>0?e.jsx("div",{className:"flex flex-col gap-2",children:a.segments.map((r,c)=>e.jsx(UC,{segment:r},c))}):e.jsx("span",{className:"whitespace-pre-wrap",children:a.content})}function IC(){const a={id:"webui-default",type:"webui",label:"WebUI",messages:[],isConnected:!1,isTyping:!1,sessionInfo:{}},l=()=>{const Ke=LC().map(He=>{const Je=He.virtualConfig;return!Je.groupId&&Je.platform&&Je.userId&&(Je.groupId=`webui_virtual_group_${Je.platform}_${Je.userId}`),{id:He.id,type:"virtual",label:He.label,virtualConfig:Je,messages:[],isConnected:!1,isTyping:!1,sessionInfo:{}}});return[a,...Ke]},[r,c]=u.useState(l),[d,m]=u.useState("webui-default"),h=r.find(V=>V.id===d)||r[0],[f,p]=u.useState(""),[g,N]=u.useState(!1),[j,b]=u.useState(!0),[y,w]=u.useState(DC()),[z,M]=u.useState(!1),[S,F]=u.useState(""),[E,C]=u.useState(!1),[R,H]=u.useState([]),[O,X]=u.useState([]),[L,me]=u.useState(!1),[Ne,je]=u.useState(!1),[re,ge]=u.useState(""),[pe,D]=u.useState({platform:"",personId:"",userId:"",userName:"",groupName:"",groupId:""}),Q=u.useRef(RC()),I=u.useRef(new Map),ue=u.useRef(null),Y=u.useRef(new Map),we=u.useRef(0),fe=u.useRef(new Map),{toast:Ee}=nt(),G=V=>(we.current+=1,`${V}-${Date.now()}-${we.current}-${Math.random().toString(36).substr(2,9)}`),$=u.useCallback((V,Ke)=>{c(He=>He.map(Je=>Je.id===V?{...Je,...Ke}:Je))},[]),A=u.useCallback((V,Ke)=>{c(He=>He.map(Je=>Je.id===V?{...Je,messages:[...Je.messages,Ke]}:Je))},[]),K=u.useCallback(()=>{ue.current?.scrollIntoView({behavior:"smooth"})},[]);u.useEffect(()=>{K()},[h?.messages,K]);const Re=u.useCallback(async()=>{me(!0);try{const V=await ke("/api/chat/platforms");if(console.log("[Chat] 平台列表响应:",V.status,V.headers.get("content-type")),V.ok){const Ke=V.headers.get("content-type");if(Ke&&Ke.includes("application/json")){const He=await V.json();console.log("[Chat] 平台列表数据:",He),H(He.platforms||[])}else{const He=await V.text();console.error("[Chat] 获取平台列表失败: 非 JSON 响应:",He.substring(0,200)),Ee({title:"连接失败",description:"无法连接到后端服务,请确保 MaiBot 已启动",variant:"destructive"})}}else console.error("[Chat] 获取平台列表失败: HTTP",V.status),Ee({title:"获取平台失败",description:`服务器返回错误: ${V.status}`,variant:"destructive"})}catch(V){console.error("[Chat] 获取平台列表失败:",V),Ee({title:"网络错误",description:"无法连接到后端服务",variant:"destructive"})}finally{me(!1)}},[Ee]),se=u.useCallback(async(V,Ke)=>{je(!0);try{const He=new URLSearchParams;V&&He.append("platform",V),Ke&&He.append("search",Ke),He.append("limit","50");const Je=await ke(`/api/chat/persons?${He.toString()}`);if(Je.ok){const Es=Je.headers.get("content-type");if(Es&&Es.includes("application/json")){const ms=await Je.json();X(ms.persons||[])}else console.error("[Chat] 获取用户列表失败: 后端返回非 JSON 响应")}}catch(He){console.error("[Chat] 获取用户列表失败:",He)}finally{je(!1)}},[]);u.useEffect(()=>{pe.platform&&se(pe.platform,re)},[pe.platform,re,se]);const $e=u.useCallback(async(V,Ke)=>{b(!0);try{const He=new URLSearchParams;He.append("user_id",Q.current),He.append("limit","50"),Ke&&He.append("group_id",Ke);const Je=`/api/chat/history?${He.toString()}`;console.log("[Chat] 正在加载历史消息:",Je);const Es=await ke(Je);if(Es.ok){const ms=await Es.text();try{const Ms=JSON.parse(ms);if(Ms.messages&&Ms.messages.length>0){const We=Ms.messages.map(rs=>({id:rs.id,type:rs.type,content:rs.content,timestamp:rs.timestamp,sender:{name:rs.sender_name||(rs.is_bot?"麦麦":"WebUI用户"),user_id:rs.user_id,is_bot:rs.is_bot}}));$(V,{messages:We});const Cs=fe.current.get(V)||new Set;We.forEach(rs=>{if(rs.type==="bot"){const is=`bot-${rs.content}-${Math.floor(rs.timestamp*1e3)}`;Cs.add(is)}}),fe.current.set(V,Cs)}}catch(Ms){console.error("[Chat] JSON 解析失败:",Ms)}}}catch(He){console.error("[Chat] 加载历史消息失败:",He)}finally{b(!1)}},[$]),cs=u.useCallback(async(V,Ke,He)=>{const Je=I.current.get(V);if(Je?.readyState===WebSocket.OPEN||Je?.readyState===WebSocket.CONNECTING){console.log(`[Tab ${V}] WebSocket 已存在,跳过连接`);return}N(!0);let Es=null;try{const Cs=await ke("/api/webui/ws-token");if(Cs.ok){const rs=await Cs.json();if(rs.success&&rs.token)Es=rs.token;else{console.warn(`[Tab ${V}] 获取 WebSocket token 失败: ${rs.message||"未登录"}`),N(!1);return}}}catch(Cs){console.error(`[Tab ${V}] 获取 WebSocket token 失败:`,Cs),N(!1);return}if(!Es){N(!1);return}const ms=window.location.protocol==="https:"?"wss:":"ws:",Ms=new URLSearchParams;Ms.append("token",Es),Ke==="virtual"&&He?(Ms.append("user_id",He.userId),Ms.append("user_name",He.userName),Ms.append("platform",He.platform),Ms.append("person_id",He.personId),Ms.append("group_name",He.groupName||"WebUI虚拟群聊"),He.groupId&&Ms.append("group_id",He.groupId)):(Ms.append("user_id",Q.current),Ms.append("user_name",y));const We=`${ms}//${window.location.host}/api/chat/ws?${Ms.toString()}`;console.log(`[Tab ${V}] 正在连接 WebSocket:`,We);try{const Cs=new WebSocket(We);I.current.set(V,Cs),Cs.onopen=()=>{$(V,{isConnected:!0}),N(!1),console.log(`[Tab ${V}] WebSocket 已连接`)},Cs.onmessage=rs=>{try{const is=JSON.parse(rs.data);switch(is.type){case"session_info":$(V,{sessionInfo:{session_id:is.session_id,user_id:is.user_id,user_name:is.user_name,bot_name:is.bot_name}});break;case"system":A(V,{id:G("sys"),type:"system",content:is.content||"",timestamp:is.timestamp||Date.now()/1e3});break;case"user_message":{const ys=is.sender?.user_id,rt=Ke==="virtual"&&He?He.userId:Q.current;console.log(`[Tab ${V}] 收到 user_message, sender: ${ys}, current: ${rt}`);const jt=ys?ys.replace(/^webui_user_/,""):"",Ae=rt?rt.replace(/^webui_user_/,""):"";if(jt&&Ae&&jt===Ae){console.log(`[Tab ${V}] 跳过自己的消息(user_id 匹配)`);break}const Qe=fe.current.get(V)||new Set,As=`user-${is.content}-${Math.floor((is.timestamp||0)*1e3)}`;if(Qe.has(As)){console.log(`[Tab ${V}] 跳过自己的消息(内容去重)`);break}if(Qe.add(As),fe.current.set(V,Qe),Qe.size>100){const mt=Qe.values().next().value;mt&&Qe.delete(mt)}A(V,{id:is.message_id||G("user"),type:"user",content:is.content||"",timestamp:is.timestamp||Date.now()/1e3,sender:is.sender});break}case"bot_message":{$(V,{isTyping:!1});const ys=fe.current.get(V)||new Set,rt=`bot-${is.content}-${Math.floor((is.timestamp||0)*1e3)}`;if(ys.has(rt))break;if(ys.add(rt),fe.current.set(V,ys),ys.size>100){const jt=ys.values().next().value;jt&&ys.delete(jt)}c(jt=>jt.map(Ae=>{if(Ae.id!==V)return Ae;const Qe=Ae.messages.filter(mt=>mt.type!=="thinking"),As={id:G("bot"),type:"bot",content:is.content||"",message_type:is.message_type==="rich"?"rich":"text",segments:is.segments,timestamp:is.timestamp||Date.now()/1e3,sender:is.sender};return{...Ae,messages:[...Qe,As]}}));break}case"typing":$(V,{isTyping:is.is_typing||!1});break;case"error":c(ys=>ys.map(rt=>{if(rt.id!==V)return rt;const jt=rt.messages.filter(Ae=>Ae.type!=="thinking");return{...rt,messages:[...jt,{id:G("error"),type:"error",content:is.content||"发生错误",timestamp:is.timestamp||Date.now()/1e3}]}})),Ee({title:"错误",description:is.content,variant:"destructive"});break;case"pong":break;case"history":{const ys=is.messages||[];if(ys.length>0){const rt=fe.current.get(V)||new Set,jt=ys.map(Ae=>{const Qe=Ae.is_bot||!1,As=Ae.id||G(Qe?"bot":"user"),mt=`${Qe?"bot":"user"}-${Ae.content}-${Math.floor(Ae.timestamp*1e3)}`;return rt.add(mt),{id:As,type:Qe?"bot":"user",content:Ae.content,timestamp:Ae.timestamp,sender:{name:Ae.sender_name||(Qe?"麦麦":"用户"),user_id:Ae.sender_id,is_bot:Qe}}});fe.current.set(V,rt),$(V,{messages:jt}),console.log(`[Tab ${V}] 已加载 ${jt.length} 条历史消息`)}break}default:console.log("未知消息类型:",is.type)}}catch(is){console.error("解析消息失败:",is)}},Cs.onclose=()=>{$(V,{isConnected:!1}),N(!1),I.current.delete(V),console.log(`[Tab ${V}] WebSocket 已断开`);const rs=Y.current.get(V);rs&&clearTimeout(rs);const is=window.setTimeout(()=>{if(!J.current){const ys=r.find(rt=>rt.id===V);ys&&cs(V,ys.type,ys.virtualConfig)}},5e3);Y.current.set(V,is)},Cs.onerror=rs=>{console.error(`[Tab ${V}] WebSocket 错误:`,rs),N(!1)}}catch(Cs){console.error(`[Tab ${V}] 创建 WebSocket 失败:`,Cs),N(!1)}},[y,$,A,Ee,r]),J=u.useRef(!1);u.useEffect(()=>{J.current=!1;const V=I.current,Ke=Y.current,He=fe.current;$e("webui-default");const Je=setTimeout(()=>{J.current||(cs("webui-default","webui"),r.forEach(ms=>{ms.type==="virtual"&&ms.virtualConfig&&(He.set(ms.id,new Set),setTimeout(()=>{J.current||cs(ms.id,"virtual",ms.virtualConfig)},200))}))},100),Es=setInterval(()=>{V.forEach(ms=>{ms.readyState===WebSocket.OPEN&&ms.send(JSON.stringify({type:"ping"}))})},3e4);return()=>{J.current=!0,clearTimeout(Je),clearInterval(Es),Ke.forEach(ms=>{clearTimeout(ms)}),Ke.clear(),V.forEach(ms=>{ms.close()}),V.clear()}},[]);const Z=u.useCallback(()=>{const V=I.current.get(d);if(!f.trim()||!V||V.readyState!==WebSocket.OPEN)return;const Ke=h?.type==="virtual"&&h.virtualConfig?.userName||y,He=f.trim(),Je=Date.now()/1e3;V.send(JSON.stringify({type:"message",content:He,user_name:Ke}));const Es=fe.current.get(d)||new Set,ms=`user-${He}-${Math.floor(Je*1e3)}`;if(Es.add(ms),fe.current.set(d,Es),Es.size>100){const Cs=Es.values().next().value;Cs&&Es.delete(Cs)}const Ms={id:G("user"),type:"user",content:He,timestamp:Je,sender:{name:Ke,is_bot:!1}};A(d,Ms);const We={id:G("thinking"),type:"thinking",content:"",timestamp:Je+.001,sender:{name:h?.sessionInfo.bot_name||"麦麦",is_bot:!0}};A(d,We),p("")},[f,y,d,h,A]),Le=V=>{V.key==="Enter"&&!V.shiftKey&&(V.preventDefault(),Z())},ne=()=>{F(y),M(!0)},De=()=>{const V=S.trim()||"WebUI用户";w(V),OC(V),M(!1);const Ke=I.current.get(d);Ke?.readyState===WebSocket.OPEN&&Ke.send(JSON.stringify({type:"update_nickname",user_name:V}))},xe=()=>{F(""),M(!1)},Me=V=>new Date(V*1e3).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}),ds=()=>{const V=I.current.get(d);V&&(V.close(),I.current.delete(d)),cs(d,h?.type||"webui",h?.virtualConfig)},Ts=()=>{D({platform:"",personId:"",userId:"",userName:"",groupName:"",groupId:""}),ge(""),Re(),C(!0)},Ct=()=>{if(!pe.platform||!pe.personId){Ee({title:"配置不完整",description:"请选择平台和用户",variant:"destructive"});return}const V=`webui_virtual_group_${pe.platform}_${pe.userId}`,Ke=`virtual-${pe.platform}-${pe.userId}-${Date.now()}`,He=pe.userName||pe.userId,Je={id:Ke,type:"virtual",label:He,virtualConfig:{...pe,groupId:V},messages:[],isConnected:!1,isTyping:!1,sessionInfo:{}};c(Es=>{const ms=[...Es,Je],Ms=ms.filter(We=>We.type==="virtual"&&We.virtualConfig).map(We=>({id:We.id,label:We.label,virtualConfig:We.virtualConfig,createdAt:Date.now()}));return nj(Ms),ms}),m(Ke),C(!1),fe.current.set(Ke,new Set),setTimeout(()=>{cs(Ke,"virtual",pe)},100),Ee({title:"虚拟身份标签页",description:`已创建 ${He} 的对话`})},ia=(V,Ke)=>{if(Ke?.stopPropagation(),V==="webui-default")return;const He=I.current.get(V);He&&(He.close(),I.current.delete(V));const Je=Y.current.get(V);Je&&(clearTimeout(Je),Y.current.delete(V)),fe.current.delete(V),c(Es=>{const ms=Es.filter(We=>We.id!==V),Ms=ms.filter(We=>We.type==="virtual"&&We.virtualConfig).map(We=>({id:We.id,label:We.label,virtualConfig:We.virtualConfig,createdAt:Date.now()}));return nj(Ms),ms}),d===V&&m("webui-default")},ut=V=>{m(V)},Bs=V=>{D(Ke=>({...Ke,personId:V.person_id,userId:V.user_id,userName:V.nickname||V.person_name}))};return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(Qs,{open:E,onOpenChange:C,children:e.jsxs(Hs,{className:"sm:max-w-[500px] max-h-[85vh] overflow-hidden flex flex-col",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(Am,{className:"h-5 w-5"}),"新建虚拟身份对话"]}),e.jsx(at,{children:"选择一个麦麦已认识的用户,以该用户的身份与麦麦对话。麦麦将使用她对该用户的记忆和认知来回应。"})]}),e.jsxs("div",{className:"space-y-4 flex-1 overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(T,{className:"flex items-center gap-2",children:[e.jsx(Go,{className:"h-4 w-4"}),"选择平台"]}),e.jsxs(Pe,{value:pe.platform,onValueChange:V=>{D(Ke=>({...Ke,platform:V,personId:"",userId:"",userName:""})),X([])},children:[e.jsx(Ie,{disabled:L,children:e.jsx(Fe,{placeholder:L?"加载中...":"选择平台"})}),e.jsx(Be,{children:R.map(V=>e.jsxs(W,{value:V.platform,children:[V.platform," (",V.count," 人)"]},V.platform))})]})]}),pe.platform&&e.jsxs("div",{className:"space-y-2 flex-1 overflow-hidden flex flex-col",children:[e.jsxs(T,{className:"flex items-center gap-2",children:[e.jsx(oc,{className:"h-4 w-4"}),"选择用户"]}),e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ae,{placeholder:"搜索用户名...",value:re,onChange:V=>ge(V.target.value),className:"pl-9"})]}),e.jsx(ts,{className:"h-[250px] border rounded-md",children:e.jsx("div",{className:"p-2",children:Ne?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Fs,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):O.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[e.jsx(oc,{className:"h-8 w-8 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"没有找到用户"})]}):e.jsx("div",{className:"space-y-1",children:O.map(V=>e.jsxs("button",{onClick:()=>Bs(V),className:P("w-full flex items-center gap-3 p-2 rounded-md text-left transition-colors",pe.personId===V.person_id?"bg-primary text-primary-foreground":"hover:bg-muted"),children:[e.jsx(ec,{className:"h-8 w-8 shrink-0",children:e.jsx(sc,{className:P("text-xs",pe.personId===V.person_id?"bg-primary-foreground/20":"bg-muted"),children:(V.nickname||V.person_name||"?").charAt(0)})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-medium truncate",children:V.nickname||V.person_name}),e.jsxs("div",{className:P("text-xs truncate",pe.personId===V.person_id?"text-primary-foreground/70":"text-muted-foreground"),children:["ID: ",V.user_id,V.is_known&&" · 已认识"]})]})]},V.person_id))})})})]}),pe.personId&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:"虚拟群名(可选)"}),e.jsx(ae,{placeholder:"WebUI虚拟群聊",value:pe.groupName,onChange:V=>D(Ke=>({...Ke,groupName:V.target.value}))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦会认为这是一个名为此名称的群聊"})]})]}),e.jsxs(gt,{className:"gap-2 sm:gap-0",children:[e.jsx(_,{variant:"outline",onClick:()=>C(!1),children:"取消"}),e.jsx(_,{onClick:Ct,disabled:!pe.platform||!pe.personId,children:"创建对话"})]})]})}),e.jsx("div",{className:"shrink-0 border-b bg-muted/30",children:e.jsx("div",{className:"max-w-4xl mx-auto px-2 sm:px-4",children:e.jsxs("div",{className:"flex items-center gap-1 overflow-x-auto py-1.5 scrollbar-thin",children:[r.map(V=>e.jsxs("div",{className:P("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm whitespace-nowrap transition-colors cursor-pointer","hover:bg-muted",d===V.id?"bg-background shadow-sm border":"text-muted-foreground"),onClick:()=>ut(V.id),children:[V.type==="webui"?e.jsx(Ba,{className:"h-3.5 w-3.5"}):e.jsx(Am,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"max-w-[100px] truncate",children:V.label}),e.jsx("span",{className:P("w-1.5 h-1.5 rounded-full",V.isConnected?"bg-green-500":"bg-muted-foreground/50")}),V.id!=="webui-default"&&e.jsx("span",{onClick:Ke=>ia(V.id,Ke),className:"ml-0.5 p-0.5 rounded hover:bg-muted-foreground/20 cursor-pointer",role:"button",tabIndex:0,onKeyDown:Ke=>{(Ke.key==="Enter"||Ke.key===" ")&&(Ke.preventDefault(),ia(V.id,Ke))},children:e.jsx(Sa,{className:"h-3 w-3"})})]},V.id)),e.jsx("button",{onClick:Ts,className:"flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"新建虚拟身份对话",children:e.jsx(Xs,{className:"h-3.5 w-3.5"})})]})})}),e.jsx("div",{className:"shrink-0 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:e.jsxs("div",{className:"p-3 sm:p-4 max-w-4xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0",children:[e.jsx(ec,{className:"h-8 w-8 sm:h-10 sm:w-10 shrink-0",children:e.jsx(sc,{className:"bg-primary/10 text-primary",children:e.jsx(Yn,{className:"h-4 w-4 sm:h-5 sm:w-5"})})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-base sm:text-lg font-semibold truncate",children:h?.sessionInfo.bot_name||"麦麦"}),e.jsx("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:h?.isConnected?e.jsxs(e.Fragment,{children:[e.jsx(Y_,{className:"h-3 w-3 text-green-500"}),e.jsx("span",{className:"text-green-600 dark:text-green-400",children:"已连接"})]}):g?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-3 w-3 animate-spin"}),e.jsx("span",{children:"连接中..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(J_,{className:"h-3 w-3 text-red-500"}),e.jsx("span",{className:"text-red-600 dark:text-red-400",children:"未连接"})]})})]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j&&e.jsx(Fs,{className:"h-4 w-4 animate-spin text-muted-foreground"}),e.jsx(_,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:ds,disabled:g,title:"重新连接",children:e.jsx(dt,{className:P("h-4 w-4",g&&"animate-spin")})})]})]}),e.jsx("div",{className:"hidden sm:flex items-center gap-2 mt-2 text-sm text-muted-foreground",children:h?.type==="virtual"&&h.virtualConfig?e.jsxs(e.Fragment,{children:[e.jsx(Am,{className:"h-3 w-3 text-primary"}),e.jsx("span",{children:"虚拟身份:"}),e.jsx("span",{className:"font-medium text-primary",children:h.virtualConfig.userName}),e.jsxs("span",{className:"text-xs",children:["(",h.virtualConfig.platform,")"]}),h.virtualConfig.groupName&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-1",children:"·"}),e.jsxs("span",{className:"text-xs",children:["群:",h.virtualConfig.groupName]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Fl,{className:"h-3 w-3"}),e.jsx("span",{children:"当前身份:"}),z?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ae,{value:S,onChange:V=>F(V.target.value),onKeyDown:V=>{V.key==="Enter"&&De(),V.key==="Escape"&&xe()},className:"h-7 w-32",placeholder:"输入昵称",autoFocus:!0}),e.jsx(_,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:De,children:"保存"}),e.jsx(_,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:xe,children:"取消"})]}):e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium text-foreground",children:y}),e.jsx(_,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0",onClick:ne,title:"修改昵称",children:e.jsx(X_,{className:"h-3 w-3"})})]})]})})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx(ts,{className:"h-full",children:e.jsxs("div",{className:"p-3 sm:p-4 max-w-4xl mx-auto space-y-3 sm:space-y-4",children:[h?.messages.length===0&&!j&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(Yn,{className:"h-12 w-12 mb-4 opacity-50"}),e.jsxs("p",{className:"text-sm",children:["开始与 ",h?.sessionInfo.bot_name||"麦麦"," 对话吧!"]})]}),h?.messages.map(V=>e.jsxs("div",{className:P("flex gap-2 sm:gap-3",V.type==="user"&&"flex-row-reverse",V.type==="system"&&"justify-center",V.type==="error"&&"justify-center"),children:[V.type==="system"&&e.jsx("div",{className:"text-xs text-muted-foreground bg-muted/50 px-3 py-1 rounded-full max-w-[90%]",children:V.content}),V.type==="error"&&e.jsx("div",{className:"text-xs text-red-600 dark:text-red-400 bg-red-100 dark:bg-red-900/30 px-3 py-1 rounded-full max-w-[90%]",children:V.content}),V.type==="thinking"&&e.jsxs(e.Fragment,{children:[e.jsx(ec,{className:"h-7 w-7 sm:h-8 sm:w-8 shrink-0",children:e.jsx(sc,{className:"bg-primary/10 text-primary",children:e.jsx(Yn,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"})})}),e.jsxs("div",{className:"flex flex-col gap-1 max-w-[75%] sm:max-w-[70%]",children:[e.jsx("div",{className:"flex items-center gap-2 text-[10px] sm:text-xs text-muted-foreground",children:e.jsx("span",{className:"hidden sm:inline",children:V.sender?.name||h?.sessionInfo.bot_name})}),e.jsx("div",{className:"bg-muted rounded-2xl rounded-tl-sm px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex gap-1",children:[e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),e.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"思考中..."})]})})]})]}),(V.type==="user"||V.type==="bot")&&e.jsxs(e.Fragment,{children:[e.jsx(ec,{className:"h-7 w-7 sm:h-8 sm:w-8 shrink-0",children:e.jsx(sc,{className:P("text-xs",V.type==="bot"?"bg-primary/10 text-primary":"bg-secondary text-secondary-foreground"),children:V.type==="bot"?e.jsx(Yn,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}):e.jsx(Fl,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"})})}),e.jsxs("div",{className:P("flex flex-col gap-1 max-w-[75%] sm:max-w-[70%]",V.type==="user"&&"items-end"),children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] sm:text-xs text-muted-foreground",children:[e.jsx("span",{className:"hidden sm:inline",children:V.sender?.name||(V.type==="bot"?h?.sessionInfo.bot_name:y)}),e.jsx("span",{children:Me(V.timestamp)})]}),e.jsx("div",{className:P("rounded-2xl px-3 py-2 text-sm break-words",V.type==="bot"?"bg-muted rounded-tl-sm":"bg-primary text-primary-foreground rounded-tr-sm"),children:e.jsx($C,{message:V,isBot:V.type==="bot"})})]})]})]},V.id)),e.jsx("div",{ref:ue})]})})}),e.jsx("div",{className:"shrink-0 border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:e.jsx("div",{className:"p-3 sm:p-4 max-w-4xl mx-auto",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{value:f,onChange:V=>p(V.target.value),onKeyDown:Le,placeholder:h?.isConnected?"输入消息...":"等待连接...",disabled:!h?.isConnected,className:"flex-1 h-10 sm:h-10"}),e.jsx(_,{onClick:Z,disabled:!h?.isConnected||!f.trim(),size:"icon",className:"h-10 w-10 shrink-0",children:e.jsx(Z_,{className:"h-4 w-4"})})]})})})]})}var zx="Radio",[BC,_N]=ld(zx),[PC,FC]=BC(zx),SN=u.forwardRef((a,l)=>{const{__scopeRadio:r,name:c,checked:d=!1,required:m,disabled:h,value:f="on",onCheck:p,form:g,...N}=a,[j,b]=u.useState(null),y=nd(l,M=>b(M)),w=u.useRef(!1),z=j?g||!!j.closest("form"):!0;return e.jsxs(PC,{scope:r,checked:d,disabled:h,children:[e.jsx(ar.button,{type:"button",role:"radio","aria-checked":d,"data-state":EN(d),"data-disabled":h?"":void 0,disabled:h,value:f,...N,ref:y,onClick:_n(a.onClick,M=>{d||p?.(),z&&(w.current=M.isPropagationStopped(),w.current||M.stopPropagation())})}),z&&e.jsx(TN,{control:j,bubbles:!w.current,name:c,value:f,checked:d,required:m,disabled:h,form:g,style:{transform:"translateX(-100%)"}})]})});SN.displayName=zx;var kN="RadioIndicator",CN=u.forwardRef((a,l)=>{const{__scopeRadio:r,forceMount:c,...d}=a,m=FC(kN,r);return e.jsx(b_,{present:c||m.checked,children:e.jsx(ar.span,{"data-state":EN(m.checked),"data-disabled":m.disabled?"":void 0,...d,ref:l})})});CN.displayName=kN;var HC="RadioBubbleInput",TN=u.forwardRef(({__scopeRadio:a,control:l,checked:r,bubbles:c=!0,...d},m)=>{const h=u.useRef(null),f=nd(h,m),p=y_(r),g=w_(l);return u.useEffect(()=>{const N=h.current;if(!N)return;const j=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(j,"checked").set;if(p!==r&&y){const w=new Event("click",{bubbles:c});y.call(N,r),N.dispatchEvent(w)}},[p,r,c]),e.jsx(ar.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...d,tabIndex:-1,ref:f,style:{...d.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});TN.displayName=HC;function EN(a){return a?"checked":"unchecked"}var qC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],gd="RadioGroup",[VC]=ld(gd,[Dj,_N]),MN=Dj(),AN=_N(),[GC,KC]=VC(gd),zN=u.forwardRef((a,l)=>{const{__scopeRadioGroup:r,name:c,defaultValue:d,value:m,required:h=!1,disabled:f=!1,orientation:p,dir:g,loop:N=!0,onValueChange:j,...b}=a,y=MN(r),w=Wj(g),[z,M]=ad({prop:m,defaultProp:d??null,onChange:j,caller:gd});return e.jsx(GC,{scope:r,name:c,required:h,disabled:f,value:z,onValueChange:M,children:e.jsx(Rw,{asChild:!0,...y,orientation:p,dir:w,loop:N,children:e.jsx(ar.div,{role:"radiogroup","aria-required":h,"aria-orientation":p,"data-disabled":f?"":void 0,dir:w,...b,ref:l})})})});zN.displayName=gd;var RN="RadioGroupItem",DN=u.forwardRef((a,l)=>{const{__scopeRadioGroup:r,disabled:c,...d}=a,m=KC(RN,r),h=m.disabled||c,f=MN(r),p=AN(r),g=u.useRef(null),N=nd(l,g),j=m.value===d.value,b=u.useRef(!1);return u.useEffect(()=>{const y=z=>{qC.includes(z.key)&&(b.current=!0)},w=()=>b.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",w)}},[]),e.jsx(Dw,{asChild:!0,...f,focusable:!h,active:j,children:e.jsx(SN,{disabled:h,required:m.required,checked:j,...p,...d,name:m.name,ref:N,onCheck:()=>m.onValueChange(d.value),onKeyDown:_n(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:_n(d.onFocus,()=>{b.current&&g.current?.click()})})})});DN.displayName=RN;var QC="RadioGroupIndicator",ON=u.forwardRef((a,l)=>{const{__scopeRadioGroup:r,...c}=a,d=AN(r);return e.jsx(CN,{...d,...c,ref:l})});ON.displayName=QC;var LN=zN,UN=DN,YC=ON;const Rx=u.forwardRef(({className:a,...l},r)=>e.jsx(LN,{className:P("grid gap-2",a),...l,ref:r}));Rx.displayName=LN.displayName;const Wo=u.forwardRef(({className:a,...l},r)=>e.jsx(UN,{ref:r,className:P("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...l,children:e.jsx(YC,{className:"flex items-center justify-center",children:e.jsx(Vo,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Wo.displayName=UN.displayName;function JC({question:a,value:l,onChange:r,error:c,disabled:d=!1}){const[m,h]=u.useState(null),f=d||a.readOnly,p=()=>{switch(a.type){case"single":return e.jsx(Rx,{value:l||"",onValueChange:r,disabled:f,className:"space-y-2",children:a.options?.map(g=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wo,{value:g.value,id:`${a.id}-${g.id}`}),e.jsx(T,{htmlFor:`${a.id}-${g.id}`,className:"cursor-pointer font-normal",children:g.label})]},g.id))});case"multiple":{const g=l||[];return e.jsxs("div",{className:"space-y-2",children:[a.options?.map(N=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:`${a.id}-${N.id}`,checked:g.includes(N.value),disabled:f||a.maxSelections!==void 0&&g.length>=a.maxSelections&&!g.includes(N.value),onCheckedChange:j=>{r(j?[...g,N.value]:g.filter(b=>b!==N.value))}}),e.jsx(T,{htmlFor:`${a.id}-${N.id}`,className:"cursor-pointer font-normal",children:N.label})]},N.id)),a.maxSelections&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["最多选择 ",a.maxSelections," 项"]})]})}case"text":return e.jsx(ae,{value:l||"",onChange:g=>r(g.target.value),placeholder:a.placeholder||"请输入...",disabled:f,readOnly:a.readOnly,maxLength:a.maxLength,className:P(a.readOnly&&"bg-muted cursor-not-allowed")});case"textarea":return e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{value:l||"",onChange:g=>r(g.target.value),placeholder:a.placeholder||"请输入...",disabled:f,readOnly:a.readOnly,maxLength:a.maxLength,rows:4,className:P(a.readOnly&&"bg-muted cursor-not-allowed")}),a.maxLength&&e.jsxs("p",{className:"text-xs text-muted-foreground text-right",children:[(l||"").length," / ",a.maxLength]})]});case"rating":{const g=l||0,N=m!==null?m:g;return e.jsxs("div",{className:"flex items-center gap-1",children:[[1,2,3,4,5].map(j=>e.jsx("button",{type:"button",disabled:f,className:P("p-1 transition-colors focus:outline-none focus:ring-2 focus:ring-ring rounded",f&&"cursor-not-allowed opacity-50"),onMouseEnter:()=>!f&&h(j),onMouseLeave:()=>h(null),onClick:()=>!f&&r(j),children:e.jsx(vn,{className:P("h-6 w-6 transition-colors",j<=N?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})},j)),g>0&&e.jsxs("span",{className:"ml-2 text-sm text-muted-foreground",children:[g," / 5"]})]})}case"scale":{const g=a.min??1,N=a.max??10,j=a.step??1,b=l??g;return e.jsxs("div",{className:"space-y-4",children:[e.jsx(el,{value:[b],onValueChange:([y])=>r(y),min:g,max:N,step:j,disabled:f}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:a.minLabel||g}),e.jsx("span",{className:"font-medium text-foreground",children:b}),e.jsx("span",{children:a.maxLabel||N})]})]})}case"dropdown":return e.jsxs(Pe,{value:l||"",onValueChange:r,disabled:f,children:[e.jsx(Ie,{children:e.jsx(Fe,{placeholder:a.placeholder||"请选择..."})}),e.jsx(Be,{children:a.options?.map(g=>e.jsx(W,{value:g.value,children:g.label},g.id))})]});default:return e.jsx("div",{className:"text-muted-foreground",children:"不支持的问题类型"})}};return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(T,{className:"text-base font-medium",children:[a.title,a.required&&e.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),a.description&&e.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]}),p(),c&&e.jsx("p",{className:"text-sm text-destructive",children:c})]})}const $N="https://maibot-plugin-stats.maibot-webui.workers.dev";function IN(){const a="maibot_user_id";let l=localStorage.getItem(a);if(!l){const r=Math.random().toString(36).substring(2,10),c=Date.now().toString(36),d=Math.random().toString(36).substring(2,10);l=`fp_${r}_${c}_${d}`,localStorage.setItem(a,l)}return l}async function XC(a,l,r,c){try{const d=c?.userId||IN(),m={surveyId:a,surveyVersion:l,userId:d,answers:r,submittedAt:new Date().toISOString(),allowMultiple:c?.allowMultiple,metadata:{userAgent:navigator.userAgent,language:navigator.language}},h=await fetch(`${$N}/survey/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)}),f=await h.json();return h.status===429?{success:!1,error:"提交过于频繁,请稍后再试"}:h.status===409?{success:!1,error:f.error||"你已经提交过这份问卷了"}:h.ok?{success:!0,submissionId:f.submissionId,message:f.message}:{success:!1,error:f.error||"提交失败"}}catch(d){return console.error("Error submitting survey:",d),{success:!1,error:"网络错误"}}}async function ZC(a,l){try{const r=l||IN(),c=new URLSearchParams({user_id:r,survey_id:a}),d=await fetch(`${$N}/survey/check?${c}`);return d.ok?{success:!0,hasSubmitted:(await d.json()).hasSubmitted}:{success:!1,error:(await d.json()).error||"检查失败"}}catch(r){return console.error("Error checking submission:",r),{success:!1,error:"网络错误"}}}function BN({config:a,initialAnswers:l,onSubmitSuccess:r,onSubmitError:c,showProgress:d=!0,paginateQuestions:m=!1,className:h}){const f=u.useCallback(()=>!l||l.length===0?{}:l.reduce((I,ue)=>(I[ue.questionId]=ue.value,I),{}),[l]),[p,g]=u.useState(()=>f()),[N,j]=u.useState({}),[b,y]=u.useState(0),[w,z]=u.useState(!1),[M,S]=u.useState(!1),[F,E]=u.useState(null),[C,R]=u.useState(null),[H,O]=u.useState(!1),[X,L]=u.useState(!0);u.useEffect(()=>{l&&l.length>0&&g(I=>({...I,...f()}))},[l,f]),u.useEffect(()=>{(async()=>{if(!a.settings?.allowMultiple){const ue=await ZC(a.id);ue.success&&ue.hasSubmitted&&O(!0)}L(!1)})()},[a.id,a.settings?.allowMultiple]);const me=u.useCallback(()=>{const I=new Date;return!(a.settings?.startTime&&new Date(a.settings.startTime)>I||a.settings?.endTime&&new Date(a.settings.endTime){const ue=p[I.id];return ue==null?!1:Array.isArray(ue)?ue.length>0:typeof ue=="string"?ue.trim()!=="":!0}).length,je=Ne/a.questions.length*100,re=u.useCallback((I,ue)=>{g(Y=>({...Y,[I]:ue})),j(Y=>{const we={...Y};return delete we[I],we})},[]),ge=u.useCallback(()=>{const I={};for(const ue of a.questions){if(ue.required){const Y=p[ue.id];if(Y==null){I[ue.id]="此题为必填项";continue}if(Array.isArray(Y)&&Y.length===0){I[ue.id]="请至少选择一项";continue}if(typeof Y=="string"&&Y.trim()===""){I[ue.id]="此题为必填项";continue}}ue.minLength&&typeof p[ue.id]=="string"&&p[ue.id].length{if(!ge()){if(m){const I=a.questions.findIndex(ue=>N[ue.id]);I>=0&&y(I)}return}z(!0),E(null);try{const I=a.questions.filter(Y=>p[Y.id]!==void 0).map(Y=>({questionId:Y.id,value:p[Y.id]})),ue=await XC(a.id,a.version,I,{allowMultiple:a.settings?.allowMultiple});if(ue.success&&ue.submissionId)S(!0),R(ue.submissionId),r?.(ue.submissionId);else{const Y=ue.error||"提交失败";E(Y),c?.(Y)}}catch(I){const ue=I instanceof Error?I.message:"提交失败";E(ue),c?.(ue)}finally{z(!1)}},[ge,m,a,p,N,r,c]),D=u.useCallback(I=>{I>=0&&Ie.jsxs("div",{className:P("p-4 rounded-lg border bg-card",N[I.id]?"border-destructive bg-destructive/5":"border-border"),children:[m&&e.jsxs("div",{className:"text-xs text-muted-foreground mb-2",children:["问题 ",b+1," / ",a.questions.length]}),!m&&e.jsxs("div",{className:"text-xs text-muted-foreground mb-2",children:[ue+1,"."]}),e.jsx(JC,{question:I,value:p[I.id],onChange:Y=>re(I.id,Y),error:N[I.id],disabled:w})]},I.id)),F&&e.jsxs(ht,{variant:"destructive",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx(ft,{children:F})]}),e.jsx("div",{className:"flex justify-between items-center py-4",children:m?e.jsxs(e.Fragment,{children:[e.jsxs(_,{variant:"outline",onClick:()=>D(b-1),disabled:b===0||w,children:[e.jsx(Pa,{className:"h-4 w-4 mr-1"}),"上一题"]}),b===a.questions.length-1?e.jsxs(_,{onClick:pe,disabled:w,children:[w&&e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"提交问卷"]}):e.jsxs(_,{onClick:()=>D(b+1),disabled:w,children:["下一题",e.jsx(ra,{className:"h-4 w-4 ml-1"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:Object.keys(N).length>0&&e.jsxs("span",{className:"text-destructive",children:["还有 ",Object.keys(N).length," 个必填项未完成"]})}),e.jsxs(_,{onClick:pe,disabled:w,size:"lg",children:[w&&e.jsx(Fs,{className:"h-4 w-4 mr-2 animate-spin"}),"提交问卷"]})]})})]})})]})}const WC={id:"webui-feedback-v1",version:"1.0.0",title:"麦麦 WebUI 使用反馈问卷",description:"感谢您使用麦麦 WebUI!您的反馈将帮助我们不断改进产品体验。",questions:[{id:"webui_version",type:"text",title:"你正在使用的 WebUI 版本",description:"此项由系统自动填写",required:!0,readOnly:!0,placeholder:"自动检测中..."},{id:"ui_design_satisfaction",type:"single",title:"你觉得当前的 WebUI 界面设计如何?",required:!0,options:[{id:"very_satisfied",label:"非常满意",value:"very_satisfied"},{id:"satisfied",label:"满意",value:"satisfied"},{id:"neutral",label:"一般",value:"neutral"},{id:"dissatisfied",label:"不满意",value:"dissatisfied"},{id:"very_dissatisfied",label:"非常不满意",value:"very_dissatisfied"}]},{id:"problems_encountered",type:"multiple",title:"你在使用 WebUI 时遇到过哪些问题?",description:"可多选",required:!0,options:[{id:"lag",label:"界面卡顿",value:"lag"},{id:"incomplete",label:"功能不完整",value:"incomplete"},{id:"complex",label:"操作复杂",value:"complex"},{id:"bugs",label:"存在 Bug",value:"bugs"},{id:"none",label:"没有遇到问题",value:"none"},{id:"other",label:"其他",value:"other"}]},{id:"problems_other",type:"text",title:'如选择"其他",请说明遇到的问题',required:!1,placeholder:"请描述你遇到的其他问题...",maxLength:500},{id:"useful_features",type:"textarea",title:"你觉得哪些功能是最有用的?",required:!0,placeholder:"请分享你认为最有价值的功能...",maxLength:1e3},{id:"feature_requests",type:"textarea",title:"你希望在未来的版本中增加哪些功能?",required:!0,placeholder:"请告诉我们你期望的新功能...",maxLength:1e3},{id:"overall_satisfaction",type:"single",title:"你对麦麦 WebUI 的整体满意度如何?",required:!0,options:[{id:"very_satisfied",label:"非常满意",value:"very_satisfied"},{id:"satisfied",label:"满意",value:"satisfied"},{id:"neutral",label:"一般",value:"neutral"},{id:"dissatisfied",label:"不满意",value:"dissatisfied"},{id:"very_dissatisfied",label:"非常不满意",value:"very_dissatisfied"}]},{id:"would_recommend",type:"single",title:"你愿意推荐麦麦 WebUI 给其他人使用吗?",required:!0,options:[{id:"yes",label:"是",value:"yes"},{id:"no",label:"否",value:"no"}]},{id:"other_suggestions",type:"textarea",title:"其他建议或意见",description:"此项为选填",required:!1,placeholder:"如果你有任何其他想法或建议,请在此分享...",maxLength:2e3}],settings:{allowMultiple:!1,thankYouMessage:"感谢你的反馈!你的意见对我们非常重要,我们会认真考虑每一条建议。"}},e3={id:"maibot-feedback-v1",version:"1.0.0",title:"麦麦使用体验反馈问卷",description:"感谢您使用麦麦!您的反馈将帮助我们打造更好的 AI 伙伴。",questions:[{id:"maibot_version",type:"text",title:"你正在使用的麦麦版本",description:"此项由系统自动填写",required:!0,readOnly:!0,placeholder:"自动检测中..."},{id:"improvement_areas",type:"textarea",title:"你认为麦麦还有哪些部分可以改进?",required:!0,placeholder:"请分享你认为可以改进的方面...",maxLength:1e3},{id:"problems_encountered",type:"multiple",title:"你在使用麦麦时遇到过哪些问题?",description:"可多选",required:!0,options:[{id:"incomplete",label:"功能不完整",value:"incomplete"},{id:"slow_response",label:"响应速度慢",value:"slow_response"},{id:"complex",label:"操作复杂",value:"complex"},{id:"unstable",label:"运行不稳定",value:"unstable"},{id:"config_difficult",label:"配置困难",value:"config_difficult"},{id:"none",label:"没有遇到问题",value:"none"},{id:"other",label:"其他",value:"other"}]},{id:"problems_other",type:"text",title:'如选择"其他",请说明遇到的问题',required:!1,placeholder:"请描述你遇到的其他问题...",maxLength:500},{id:"helpful_features",type:"textarea",title:"你觉得麦麦的哪些功能对你最有帮助?",required:!0,placeholder:"请分享对你最有帮助的功能...",maxLength:1e3},{id:"feature_requests",type:"textarea",title:"你希望在未来的版本中增加哪些功能?",required:!0,placeholder:"请告诉我们你期望的新功能...",maxLength:1e3},{id:"overall_satisfaction",type:"single",title:"你对麦麦的整体满意度如何?",required:!0,options:[{id:"very_satisfied",label:"非常满意",value:"very_satisfied"},{id:"satisfied",label:"满意",value:"satisfied"},{id:"neutral",label:"一般",value:"neutral"},{id:"dissatisfied",label:"不满意",value:"dissatisfied"},{id:"very_dissatisfied",label:"非常不满意",value:"very_dissatisfied"}]},{id:"would_recommend",type:"single",title:"你愿意推荐麦麦给其他人使用吗?",required:!0,options:[{id:"yes",label:"是",value:"yes"},{id:"no",label:"否",value:"no"}]},{id:"other_suggestions",type:"textarea",title:"其他建议或意见",description:"此项为选填",required:!1,placeholder:"如果你有任何其他想法或建议,请在此分享...",maxLength:2e3}],settings:{allowMultiple:!1,thankYouMessage:"感谢你的反馈!你的意见对麦麦的成长非常重要,我们会认真考虑每一条建议。"}};function s3(){const[a,l]=u.useState(!0),r=u.useMemo(()=>JSON.parse(JSON.stringify(WC)),[]);u.useEffect(()=>{l(!1)},[]);const c=u.useMemo(()=>[{questionId:"webui_version",value:`v${ud}`}],[]),d=u.useCallback(h=>{console.log("WebUI Survey submitted:",h)},[]),m=u.useCallback(h=>{console.error("WebUI Survey submission error:",h)},[]);return a?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r?e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-4 sm:mb-6 shrink-0",children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(pv,{className:"h-8 w-8",strokeWidth:2}),"WebUI 使用反馈问卷"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"感谢您的反馈,帮助我们持续改进产品体验"})]}),e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(BN,{config:r,initialAnswers:c,showProgress:!0,paginateQuestions:!1,onSubmitSuccess:d,onSubmitError:m})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[e.jsxs(ht,{variant:"destructive",className:"max-w-md",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx(ft,{children:"无法加载问卷配置"})]}),e.jsx(_,{variant:"outline",onClick:()=>window.location.reload(),children:"重试"})]})}function t3(){const[a,l]=u.useState(null),[r,c]=u.useState(!0),[d,m]=u.useState("未知版本");u.useEffect(()=>{(async()=>{try{const j=await V1();m(j.version||"未知版本")}catch(j){console.error("Failed to get MaiBot version:",j),m("获取失败")}const N=JSON.parse(JSON.stringify(e3));l(N),c(!1)})()},[]);const h=u.useMemo(()=>[{questionId:"maibot_version",value:d}],[d]),f=u.useCallback(g=>{console.log("MaiBot Survey submitted:",g)},[]),p=u.useCallback(g=>{console.error("MaiBot Survey submission error:",g)},[]);return r?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx(Fs,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):a?e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-4 sm:mb-6 shrink-0",children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(pv,{className:"h-8 w-8",strokeWidth:2}),"麦麦使用体验反馈问卷"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"感谢您的反馈,帮助我们打造更好的 AI 伙伴"})]}),e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(BN,{config:a,initialAnswers:h,showProgress:!0,paginateQuestions:!1,onSubmitSuccess:f,onSubmitError:p})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[e.jsxs(ht,{variant:"destructive",className:"max-w-md",children:[e.jsx(Ut,{className:"h-4 w-4"}),e.jsx(ft,{children:"无法加载问卷配置"})]}),e.jsx(_,{variant:"outline",onClick:()=>window.location.reload(),children:"重试"})]})}async function a3(a=2025){const l=await ke(`/api/webui/annual-report/full?year=${a}`);if(!l.ok){const r=await l.json();throw new Error(r.detail||"获取年度报告失败")}return l.json()}function l3(a,l){if(a.match(/^[a-z]+:\/\//i))return a;if(a.match(/^\/\//))return window.location.protocol+a;if(a.match(/^[a-z]+:/i))return a;const r=document.implementation.createHTMLDocument(),c=r.createElement("base"),d=r.createElement("a");return r.head.appendChild(c),r.body.appendChild(d),l&&(c.href=l),d.href=a,d.href}const n3=(()=>{let a=0;const l=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(a+=1,`u${l()}${a}`)})();function wn(a){const l=[];for(let r=0,c=a.length;rOa||a.height>Oa)&&(a.width>Oa&&a.height>Oa?a.width>a.height?(a.height*=Oa/a.width,a.width=Oa):(a.width*=Oa/a.height,a.height=Oa):a.width>Oa?(a.height*=Oa/a.width,a.width=Oa):(a.width*=Oa/a.height,a.height=Oa))}function sd(a){return new Promise((l,r)=>{const c=new Image;c.onload=()=>{c.decode().then(()=>{requestAnimationFrame(()=>l(c))})},c.onerror=r,c.crossOrigin="anonymous",c.decoding="async",c.src=a})}async function d3(a){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(a)).then(encodeURIComponent).then(l=>`data:image/svg+xml;charset=utf-8,${l}`)}async function u3(a,l,r){const c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg"),m=document.createElementNS(c,"foreignObject");return d.setAttribute("width",`${l}`),d.setAttribute("height",`${r}`),d.setAttribute("viewBox",`0 0 ${l} ${r}`),m.setAttribute("width","100%"),m.setAttribute("height","100%"),m.setAttribute("x","0"),m.setAttribute("y","0"),m.setAttribute("externalResourcesRequired","true"),d.appendChild(m),m.appendChild(a),d3(d)}const _a=(a,l)=>{if(a instanceof l)return!0;const r=Object.getPrototypeOf(a);return r===null?!1:r.constructor.name===l.name||_a(r,l)};function m3(a){const l=a.getPropertyValue("content");return`${a.cssText} content: '${l.replace(/'|"/g,"")}';`}function x3(a,l){return PN(l).map(r=>{const c=a.getPropertyValue(r),d=a.getPropertyPriority(r);return`${r}: ${c}${d?" !important":""};`}).join(" ")}function h3(a,l,r,c){const d=`.${a}:${l}`,m=r.cssText?m3(r):x3(r,c);return document.createTextNode(`${d}{${m}}`)}function rj(a,l,r,c){const d=window.getComputedStyle(a,r),m=d.getPropertyValue("content");if(m===""||m==="none")return;const h=n3();try{l.className=`${l.className} ${h}`}catch{return}const f=document.createElement("style");f.appendChild(h3(h,r,d,c)),l.appendChild(f)}function f3(a,l,r){rj(a,l,":before",r),rj(a,l,":after",r)}const ij="application/font-woff",cj="image/jpeg",p3={woff:ij,woff2:ij,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:cj,jpeg:cj,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function g3(a){const l=/\.([^./]*?)$/g.exec(a);return l?l[1]:""}function Dx(a){const l=g3(a).toLowerCase();return p3[l]||""}function j3(a){return a.split(/,/)[1]}function ax(a){return a.search(/^(data:)/)!==-1}function v3(a,l){return`data:${l};base64,${a}`}async function HN(a,l,r){const c=await fetch(a,l);if(c.status===404)throw new Error(`Resource "${c.url}" not found`);const d=await c.blob();return new Promise((m,h)=>{const f=new FileReader;f.onerror=h,f.onloadend=()=>{try{m(r({res:c,result:f.result}))}catch(p){h(p)}},f.readAsDataURL(d)})}const Km={};function N3(a,l,r){let c=a.replace(/\?.*/,"");return r&&(c=a),/ttf|otf|eot|woff2?/i.test(c)&&(c=c.replace(/.*\//,"")),l?`[${l}]${c}`:c}async function Ox(a,l,r){const c=N3(a,l,r.includeQueryParams);if(Km[c]!=null)return Km[c];r.cacheBust&&(a+=(/\?/.test(a)?"&":"?")+new Date().getTime());let d;try{const m=await HN(a,r.fetchRequestInit,({res:h,result:f})=>(l||(l=h.headers.get("Content-Type")||""),j3(f)));d=v3(m,l)}catch(m){d=r.imagePlaceholder||"";let h=`Failed to fetch resource: ${a}`;m&&(h=typeof m=="string"?m:m.message),h&&console.warn(h)}return Km[c]=d,d}async function b3(a){const l=a.toDataURL();return l==="data:,"?a.cloneNode(!1):sd(l)}async function y3(a,l){if(a.currentSrc){const m=document.createElement("canvas"),h=m.getContext("2d");m.width=a.clientWidth,m.height=a.clientHeight,h?.drawImage(a,0,0,m.width,m.height);const f=m.toDataURL();return sd(f)}const r=a.poster,c=Dx(r),d=await Ox(r,c,l);return sd(d)}async function w3(a,l){var r;try{if(!((r=a?.contentDocument)===null||r===void 0)&&r.body)return await jd(a.contentDocument.body,l,!0)}catch{}return a.cloneNode(!1)}async function _3(a,l){return _a(a,HTMLCanvasElement)?b3(a):_a(a,HTMLVideoElement)?y3(a,l):_a(a,HTMLIFrameElement)?w3(a,l):a.cloneNode(qN(a))}const S3=a=>a.tagName!=null&&a.tagName.toUpperCase()==="SLOT",qN=a=>a.tagName!=null&&a.tagName.toUpperCase()==="SVG";async function k3(a,l,r){var c,d;if(qN(l))return l;let m=[];return S3(a)&&a.assignedNodes?m=wn(a.assignedNodes()):_a(a,HTMLIFrameElement)&&(!((c=a.contentDocument)===null||c===void 0)&&c.body)?m=wn(a.contentDocument.body.childNodes):m=wn(((d=a.shadowRoot)!==null&&d!==void 0?d:a).childNodes),m.length===0||_a(a,HTMLVideoElement)||await m.reduce((h,f)=>h.then(()=>jd(f,r)).then(p=>{p&&l.appendChild(p)}),Promise.resolve()),l}function C3(a,l,r){const c=l.style;if(!c)return;const d=window.getComputedStyle(a);d.cssText?(c.cssText=d.cssText,c.transformOrigin=d.transformOrigin):PN(r).forEach(m=>{let h=d.getPropertyValue(m);m==="font-size"&&h.endsWith("px")&&(h=`${Math.floor(parseFloat(h.substring(0,h.length-2)))-.1}px`),_a(a,HTMLIFrameElement)&&m==="display"&&h==="inline"&&(h="block"),m==="d"&&l.getAttribute("d")&&(h=`path(${l.getAttribute("d")})`),c.setProperty(m,h,d.getPropertyPriority(m))})}function T3(a,l){_a(a,HTMLTextAreaElement)&&(l.innerHTML=a.value),_a(a,HTMLInputElement)&&l.setAttribute("value",a.value)}function E3(a,l){if(_a(a,HTMLSelectElement)){const c=Array.from(l.children).find(d=>a.value===d.getAttribute("value"));c&&c.setAttribute("selected","")}}function M3(a,l,r){return _a(l,Element)&&(C3(a,l,r),f3(a,l,r),T3(a,l),E3(a,l)),l}async function A3(a,l){const r=a.querySelectorAll?a.querySelectorAll("use"):[];if(r.length===0)return a;const c={};for(let m=0;m_3(c,l)).then(c=>k3(a,c,l)).then(c=>M3(a,c,l)).then(c=>A3(c,l))}const VN=/url\((['"]?)([^'"]+?)\1\)/g,z3=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,R3=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function D3(a){const l=a.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${l})(['"]?\\))`,"g")}function O3(a){const l=[];return a.replace(VN,(r,c,d)=>(l.push(d),r)),l.filter(r=>!ax(r))}async function L3(a,l,r,c,d){try{const m=r?l3(l,r):l,h=Dx(l);let f;return d||(f=await Ox(m,h,c)),a.replace(D3(l),`$1${f}$3`)}catch{}return a}function U3(a,{preferredFontFormat:l}){return l?a.replace(R3,r=>{for(;;){const[c,,d]=z3.exec(r)||[];if(!d)return"";if(d===l)return`src: ${c};`}}):a}function GN(a){return a.search(VN)!==-1}async function KN(a,l,r){if(!GN(a))return a;const c=U3(a,r);return O3(c).reduce((m,h)=>m.then(f=>L3(f,h,l,r)),Promise.resolve(c))}async function Vr(a,l,r){var c;const d=(c=l.style)===null||c===void 0?void 0:c.getPropertyValue(a);if(d){const m=await KN(d,null,r);return l.style.setProperty(a,m,l.style.getPropertyPriority(a)),!0}return!1}async function $3(a,l){await Vr("background",a,l)||await Vr("background-image",a,l),await Vr("mask",a,l)||await Vr("-webkit-mask",a,l)||await Vr("mask-image",a,l)||await Vr("-webkit-mask-image",a,l)}async function I3(a,l){const r=_a(a,HTMLImageElement);if(!(r&&!ax(a.src))&&!(_a(a,SVGImageElement)&&!ax(a.href.baseVal)))return;const c=r?a.src:a.href.baseVal,d=await Ox(c,Dx(c),l);await new Promise((m,h)=>{a.onload=m,a.onerror=l.onImageErrorHandler?(...p)=>{try{m(l.onImageErrorHandler(...p))}catch(g){h(g)}}:h;const f=a;f.decode&&(f.decode=m),f.loading==="lazy"&&(f.loading="eager"),r?(a.srcset="",a.src=d):a.href.baseVal=d})}async function B3(a,l){const c=wn(a.childNodes).map(d=>QN(d,l));await Promise.all(c).then(()=>a)}async function QN(a,l){_a(a,Element)&&(await $3(a,l),await I3(a,l),await B3(a,l))}function P3(a,l){const{style:r}=a;l.backgroundColor&&(r.backgroundColor=l.backgroundColor),l.width&&(r.width=`${l.width}px`),l.height&&(r.height=`${l.height}px`);const c=l.style;return c!=null&&Object.keys(c).forEach(d=>{r[d]=c[d]}),a}const oj={};async function dj(a){let l=oj[a];if(l!=null)return l;const c=await(await fetch(a)).text();return l={url:a,cssText:c},oj[a]=l,l}async function uj(a,l){let r=a.cssText;const c=/url\(["']?([^"')]+)["']?\)/g,m=(r.match(/url\([^)]+\)/g)||[]).map(async h=>{let f=h.replace(c,"$1");return f.startsWith("https://")||(f=new URL(f,a.url).href),HN(f,l.fetchRequestInit,({result:p})=>(r=r.replace(h,`url(${p})`),[h,p]))});return Promise.all(m).then(()=>r)}function mj(a){if(a==null)return[];const l=[],r=/(\/\*[\s\S]*?\*\/)/gi;let c=a.replace(r,"");const d=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const p=d.exec(c);if(p===null)break;l.push(p[0])}c=c.replace(d,"");const m=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,h="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",f=new RegExp(h,"gi");for(;;){let p=m.exec(c);if(p===null){if(p=f.exec(c),p===null)break;m.lastIndex=f.lastIndex}else f.lastIndex=m.lastIndex;l.push(p[0])}return l}async function F3(a,l){const r=[],c=[];return a.forEach(d=>{if("cssRules"in d)try{wn(d.cssRules||[]).forEach((m,h)=>{if(m.type===CSSRule.IMPORT_RULE){let f=h+1;const p=m.href,g=dj(p).then(N=>uj(N,l)).then(N=>mj(N).forEach(j=>{try{d.insertRule(j,j.startsWith("@import")?f+=1:d.cssRules.length)}catch(b){console.error("Error inserting rule from remote css",{rule:j,error:b})}})).catch(N=>{console.error("Error loading remote css",N.toString())});c.push(g)}})}catch(m){const h=a.find(f=>f.href==null)||document.styleSheets[0];d.href!=null&&c.push(dj(d.href).then(f=>uj(f,l)).then(f=>mj(f).forEach(p=>{h.insertRule(p,h.cssRules.length)})).catch(f=>{console.error("Error loading remote stylesheet",f)})),console.error("Error inlining remote css file",m)}}),Promise.all(c).then(()=>(a.forEach(d=>{if("cssRules"in d)try{wn(d.cssRules||[]).forEach(m=>{r.push(m)})}catch(m){console.error(`Error while reading CSS rules from ${d.href}`,m)}}),r))}function H3(a){return a.filter(l=>l.type===CSSRule.FONT_FACE_RULE).filter(l=>GN(l.style.getPropertyValue("src")))}async function q3(a,l){if(a.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=wn(a.ownerDocument.styleSheets),c=await F3(r,l);return H3(c)}function YN(a){return a.trim().replace(/["']/g,"")}function V3(a){const l=new Set;function r(c){(c.style.fontFamily||getComputedStyle(c).fontFamily).split(",").forEach(m=>{l.add(YN(m))}),Array.from(c.children).forEach(m=>{m instanceof HTMLElement&&r(m)})}return r(a),l}async function G3(a,l){const r=await q3(a,l),c=V3(a);return(await Promise.all(r.filter(m=>c.has(YN(m.style.fontFamily))).map(m=>{const h=m.parentStyleSheet?m.parentStyleSheet.href:null;return KN(m.cssText,h,l)}))).join(` +`)}async function K3(a,l){const r=l.fontEmbedCSS!=null?l.fontEmbedCSS:l.skipFonts?null:await G3(a,l);if(r){const c=document.createElement("style"),d=document.createTextNode(r);c.appendChild(d),a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)}}async function Q3(a,l={}){const{width:r,height:c}=FN(a,l),d=await jd(a,l,!0);return await K3(d,l),await QN(d,l),P3(d,l),await u3(d,r,c)}async function Y3(a,l={}){const{width:r,height:c}=FN(a,l),d=await Q3(a,l),m=await sd(d),h=document.createElement("canvas"),f=h.getContext("2d"),p=l.pixelRatio||c3(),g=l.canvasWidth||r,N=l.canvasHeight||c;return h.width=g*p,h.height=N*p,l.skipAutoScale||o3(h),h.style.width=`${g}`,h.style.height=`${N}`,l.backgroundColor&&(f.fillStyle=l.backgroundColor,f.fillRect(0,0,h.width,h.height)),f.drawImage(m,0,0,h.width,h.height),h}async function J3(a,l={}){return(await Y3(a,l)).toDataURL()}const $o=["#0088FE","#00C49F","#FFBB28","#FF8042","#8884d8","#82ca9d"];function X3(a){return a>=8760?"相当于全年无休,7x24小时在线!":a>=5e3?"相当于一位全职员工的年工作时长":a>=2e3?"相当于看完了 1000 部电影":a>=1e3?"相当于环球飞行 80 次":a>=500?"相当于读完了 100 本书":a>=100?"相当于马拉松跑了 25 次":"虽然不多,但每一刻都很珍贵"}function Z3(a){return a>=1e3?"夜深人静时的知心好友":a>=500?"午夜场的常客":a>=100?"偶尔熬夜的小伙伴":a>=50?"深夜有时也会陪你聊聊":"早睡早起,健康作息"}function W3(a){const l=a/1e6;return l>=100?"思考量堪比一座图书馆":l>=50?"相当于写了一部百科全书":l>=10?"脑细胞估计消耗了不少":l>=1?"也算是费了一番脑筋":"轻轻松松,游刃有余"}function e5(a){return a>=1e3?"这钱够吃一年的泡面了":a>=500?"相当于买了一台游戏机":a>=100?"够请大家喝几杯奶茶":a>=50?"一顿火锅的钱":a>=10?"几杯咖啡的价格":"省钱小能手"}function s5(a){return a>=80?"沉默是金,惜字如金":a>=60?"话不多但句句到位":a>=40?"该说的时候才开口":a>=20?"能聊的都聊了":"话痨本痨,有问必答"}function t5(a){return a>=1e4?"眼睛都快看花了":a>=5e3?"堪比专业摄影师的阅片量":a>=1e3?"看图小达人":a>=500?"图片鉴赏家":a>=100?"偶尔欣赏一下美图":"图片?有空再看"}function a5(a){return a>=500?"在不断的纠正中成长":a>=200?"学习永无止境":a>=100?"虚心接受,积极改正":a>=50?"偶尔也会犯错":a>=10?"表现还算不错":"完美表达,无需纠正"}function l5(a){return a>=1?"这次思考的价值堪比一顿大餐!":a>=.5?"为了这个问题,我可是认真思考了!":a>=.1?"下了点功夫,值得的!":a>=.01?"花了点小钱,但很值得":"小小思考,不足挂齿"}function n5(a,l){return a>=100?"这句话简直是万能钥匙!":a>=50?"百试不爽的经典回复":a>=20?`${l}的口头禅`:a>=10?"常用语录之一":"偶尔用用的小确幸"}function r5(a,l){return a?l>=1e3?"深夜的守护者,黑暗中的光芒":l>=500?"月亮是我的好朋友":l>=100?"越夜越精神,夜晚才是主场":"偶尔熬夜,享受宁静时光":l<=10?"作息规律,健康生活的典范":l<=50?"早睡早起,偶尔也会熬个夜":"虽然是早起鸟,但也会守候深夜"}function i5(a){return a>=1e3?"忙到飞起,键盘都要冒烟了":a>=500?"这天简直是话痨附体":a>=200?"社交达人上线":a>=100?"比平时活跃不少":a>=50?"小忙一下":"还算轻松的一天"}function c5(){const[a]=u.useState(2025),[l,r]=u.useState(null),[c,d]=u.useState(!0),[m,h]=u.useState(!1),[f,p]=u.useState(null),g=u.useRef(null),{toast:N}=nt(),j=u.useCallback(async()=>{try{d(!0),p(null);const y=await a3(a);r(y)}catch(y){p(y instanceof Error?y:new Error("获取年度报告失败"))}finally{d(!1)}},[a]),b=u.useCallback(async()=>{if(!(!g.current||!l)){h(!0),N({title:"正在生成图片",description:"请稍候..."});try{const y=g.current,w=getComputedStyle(document.documentElement),z=w.getPropertyValue("--background").trim()?`hsl(${w.getPropertyValue("--background").trim()})`:document.documentElement.classList.contains("dark")?"#0a0a0a":"#ffffff",M=y.style.width,S=y.style.maxWidth;y.style.width="1024px",y.style.maxWidth="1024px";const F=await J3(y,{quality:1,pixelRatio:2,backgroundColor:z,cacheBust:!0,filter:C=>!(C instanceof HTMLElement&&C.hasAttribute("data-export-btn"))});y.style.width=M,y.style.maxWidth=S;const E=document.createElement("a");E.download=`${l.bot_name}_${l.year}_年度总结.png`,E.href=F,E.click(),N({title:"导出成功",description:"年度报告已保存为图片"})}catch(y){console.error("导出图片失败:",y),N({title:"导出失败",description:"请重试",variant:"destructive"})}finally{h(!1)}}},[l,N]);return u.useEffect(()=>{j()},[j]),c?e.jsx(o5,{}):f?e.jsxs("div",{className:"flex h-screen items-center justify-center text-red-500",children:["获取年度报告失败: ",f.message]}):l?e.jsx(ts,{className:"h-[calc(100vh-4rem)]",children:e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/50 p-4 md:p-8 print:p-0",ref:g,children:e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8 print:space-y-4",children:[e.jsxs("header",{className:"relative overflow-hidden rounded-3xl bg-primary p-8 text-primary-foreground shadow-2xl print:rounded-none print:shadow-none",children:[e.jsx("div",{className:"absolute right-4 top-4 z-20 print:hidden","data-export-btn":!0,children:e.jsx(_,{variant:"secondary",size:"sm",onClick:b,disabled:m,className:"gap-2 bg-white/20 hover:bg-white/30 text-white border-white/30",children:m?e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"h-4 w-4 animate-spin"}),"导出中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(na,{className:"h-4 w-4"}),"保存图片"]})})}),e.jsxs("div",{className:"relative z-10 flex flex-col items-center text-center",children:[e.jsx(Yn,{className:"mb-4 h-16 w-16 animate-bounce"}),e.jsxs("h1",{className:"text-4xl font-bold tracking-tighter sm:text-6xl",children:[l.bot_name," ",l.year," 年度总结"]}),e.jsx("p",{className:"mt-4 max-w-2xl text-lg opacity-90",children:"连接与成长 · Connection & Growth"}),e.jsxs("div",{className:"mt-6 flex items-center gap-2 text-sm opacity-75",children:[e.jsx(Ko,{className:"h-4 w-4"}),e.jsxs("span",{children:["生成时间: ",l.generated_at]})]})]}),e.jsx("div",{className:"absolute -right-20 -top-20 h-64 w-64 rounded-full bg-white/10 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-20 -left-20 h-64 w-64 rounded-full bg-white/10 blur-3xl"})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(da,{className:"h-8 w-8"}),e.jsx("h2",{children:"时光足迹"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[e.jsx(La,{title:"年度在线时长",value:`${l.time_footprint.total_online_hours} 小时`,description:X3(l.time_footprint.total_online_hours),icon:e.jsx(da,{className:"h-4 w-4"})}),e.jsx(La,{title:"最忙碌的一天",value:l.time_footprint.busiest_day||"N/A",description:i5(l.time_footprint.busiest_day_count),icon:e.jsx(Ko,{className:"h-4 w-4"})}),e.jsx(La,{title:"深夜互动 (0-4点)",value:`${l.time_footprint.midnight_chat_count} 次`,description:Z3(l.time_footprint.midnight_chat_count),icon:e.jsx(tc,{className:"h-4 w-4"})}),e.jsx(La,{title:"作息属性",value:l.time_footprint.is_night_owl?"夜猫子":"早起鸟",description:r5(l.time_footprint.is_night_owl,l.time_footprint.midnight_chat_count),icon:l.time_footprint.is_night_owl?e.jsx(tc,{className:"h-4 w-4"}):e.jsx(ix,{className:"h-4 w-4"})})]}),e.jsxs(Te,{className:"overflow-hidden",children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"24小时活跃时钟"}),e.jsxs(Ns,{children:[l.bot_name,"在一天中各个时段的活跃程度"]})]}),e.jsx(ze,{className:"h-[300px]",children:e.jsx(Uj,{width:"100%",height:"100%",children:e.jsxs(Io,{data:l.time_footprint.hourly_distribution.map((y,w)=>({hour:`${w}点`,count:y})),children:[e.jsx(Ji,{strokeDasharray:"3 3",vertical:!1}),e.jsx(Xi,{dataKey:"hour"}),e.jsx(Gr,{}),e.jsx($j,{contentStyle:{borderRadius:"8px",border:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},cursor:{fill:"transparent"}}),e.jsx(Zi,{dataKey:"count",fill:"hsl(var(--primary))",radius:[4,4,0,0]})]})})})]}),l.time_footprint.first_message_time&&e.jsx(Te,{className:"bg-muted/30 border-dashed",children:e.jsxs(ze,{className:"flex flex-col items-center justify-center p-6 text-center",children:[e.jsx("p",{className:"text-muted-foreground mb-2",children:"2025年的故事开始于"}),e.jsx("div",{className:"text-xl font-bold text-primary mb-1",children:l.time_footprint.first_message_time}),e.jsxs("p",{className:"text-lg",children:[e.jsx("span",{className:"font-semibold text-foreground",children:l.time_footprint.first_message_user})," 说:",e.jsxs("span",{className:"italic text-muted-foreground",children:['"',l.time_footprint.first_message_content,'"']})]})]})})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(oc,{className:"h-8 w-8"}),e.jsx("h2",{children:"社交网络"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsx(La,{title:"社交圈子",value:`${l.social_network.total_groups} 个群组`,description:`${l.bot_name}加入的群组总数`,icon:e.jsx(oc,{className:"h-4 w-4"})}),e.jsx(La,{title:"被呼叫次数",value:`${l.social_network.at_count+l.social_network.mentioned_count} 次`,description:"我的名字被大家频繁提起",icon:e.jsx(W_,{className:"h-4 w-4"})}),e.jsx(La,{title:"最长情陪伴",value:l.social_network.longest_companion_user||"N/A",description:`始终都在,已陪伴 ${l.social_network.longest_companion_days} 天`,icon:e.jsx(ei,{className:"h-4 w-4 text-red-500"})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{children:"话痨群组 TOP5"})}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-3",children:l.social_network.top_groups.length>0?l.social_network.top_groups.map((y,w)=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ce,{variant:w===0?"default":"secondary",className:"h-6 w-6 rounded-full p-0 flex items-center justify-center shrink-0",children:w+1}),e.jsx("span",{className:"font-medium truncate max-w-[120px]",children:y.group_name}),y.is_webui&&e.jsx(Ce,{variant:"outline",className:"text-xs px-1.5 py-0 h-5 bg-blue-50 text-blue-600 border-blue-200",children:"WebUI"})]}),e.jsxs("span",{className:"text-muted-foreground text-sm shrink-0",children:[y.message_count," 条消息"]})]},y.group_id)):e.jsx("div",{className:"text-center text-muted-foreground py-4",children:"暂无数据"})})})]}),e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{children:"年度最佳损友 TOP5"})}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-3",children:l.social_network.top_users.length>0?l.social_network.top_users.map((y,w)=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ce,{variant:w===0?"default":"secondary",className:"h-6 w-6 rounded-full p-0 flex items-center justify-center shrink-0",children:w+1}),e.jsx("span",{className:"font-medium truncate max-w-[120px]",children:y.user_nickname}),y.is_webui&&e.jsx(Ce,{variant:"outline",className:"text-xs px-1.5 py-0 h-5 bg-blue-50 text-blue-600 border-blue-200",children:"WebUI"})]}),e.jsxs("span",{className:"text-muted-foreground text-sm shrink-0",children:[y.message_count," 次互动"]})]},y.user_id)):e.jsx("div",{className:"text-center text-muted-foreground py-4",children:"暂无数据"})})})]})]})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(hx,{className:"h-8 w-8"}),e.jsx("h2",{children:"最强大脑"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[e.jsx(La,{title:"年度 Token 消耗",value:(l.brain_power.total_tokens/1e6).toFixed(2)+" M",description:W3(l.brain_power.total_tokens),icon:e.jsx(sl,{className:"h-4 w-4"})}),e.jsx(La,{title:"年度总花费",value:`$${l.brain_power.total_cost.toFixed(2)}`,description:e5(l.brain_power.total_cost),icon:e.jsx("span",{className:"font-bold",children:"$"})}),e.jsx(La,{title:"高冷指数",value:`${l.brain_power.silence_rate}%`,description:s5(l.brain_power.silence_rate),icon:e.jsx(tc,{className:"h-4 w-4"})}),e.jsx(La,{title:"最高兴趣值",value:l.brain_power.max_interest_value??"N/A",description:l.brain_power.max_interest_time?`出现在 ${l.brain_power.max_interest_time}`:"暂无数据",icon:e.jsx(ei,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{children:[e.jsx(Oe,{children:e.jsx(Ue,{children:"模型偏好分布"})}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-3",children:l.brain_power.model_distribution.slice(0,5).map((y,w)=>{const z=l.brain_power.model_distribution[0]?.count||1,M=Math.round(y.count/z*100);return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"font-medium truncate max-w-[200px]",children:y.model}),e.jsxs("span",{className:"text-muted-foreground",children:[y.count.toLocaleString()," 次"]})]}),e.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:e.jsx("div",{className:"h-full transition-all duration-500",style:{width:`${M}%`,backgroundColor:$o[w%$o.length]}})})]},y.model)})})})]}),l.brain_power.top_reply_models&&l.brain_power.top_reply_models.length>0&&e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"最喜欢的回复模型 TOP5"}),e.jsxs(Ns,{children:[l.bot_name,"用来回复消息的模型偏好"]})]}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-3",children:l.brain_power.top_reply_models.map((y,w)=>{const z=l.brain_power.top_reply_models[0]?.count||1,M=Math.round(y.count/z*100);return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"font-medium truncate max-w-[200px]",children:y.model}),e.jsxs("span",{className:"text-muted-foreground",children:[y.count.toLocaleString()," 次"]})]}),e.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:e.jsx("div",{className:"h-full transition-all duration-500",style:{width:`${M}%`,backgroundColor:$o[w%$o.length]}})})]},y.model)})})})]}),l.brain_power.top_token_consumers&&l.brain_power.top_token_consumers.length>0&&e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"烧钱大户 TOP3"}),e.jsx(Ns,{children:"谁消耗了最多的 API 额度"})]}),e.jsx(ze,{children:e.jsx("div",{className:"space-y-6",children:l.brain_power.top_token_consumers.map(y=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm font-medium",children:[e.jsxs("span",{children:["用户 ",y.user_id]}),e.jsxs("span",{children:["$",y.cost.toFixed(2)]})]}),e.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:e.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${y.cost/(l.brain_power.top_token_consumers[0]?.cost||1)*100}%`}})})]},y.user_id))})})]})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{className:"bg-gradient-to-br from-amber-50 to-orange-50 dark:from-amber-950/20 dark:to-orange-950/20",children:[e.jsx(Oe,{children:e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"💰"}),"最昂贵的一次思考"]})}),e.jsxs(ze,{className:"text-center",children:[e.jsxs("div",{className:"text-4xl font-bold text-amber-600 dark:text-amber-400",children:["$",l.brain_power.most_expensive_cost.toFixed(4)]}),l.brain_power.most_expensive_time&&e.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["发生在 ",l.brain_power.most_expensive_time]}),e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:l5(l.brain_power.most_expensive_cost)})]})]}),e.jsxs(Te,{className:"bg-gradient-to-br from-indigo-50 to-blue-50 dark:from-indigo-950/20 dark:to-blue-950/20",children:[e.jsx(Oe,{children:e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"🧠"}),"思考深度"]})}),e.jsxs(ze,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-indigo-600 dark:text-indigo-400",children:l.brain_power.avg_reasoning_length?.toFixed(0)||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"平均思考字数"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-blue-600 dark:text-blue-400",children:l.brain_power.max_reasoning_length?.toLocaleString()||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"最长思考字数"})]})]}),l.brain_power.max_reasoning_time&&e.jsxs("p",{className:"mt-4 text-center text-xs text-muted-foreground",children:["最深沉的思考发生在 ",l.brain_power.max_reasoning_time]})]})]})]})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(rd,{className:"h-8 w-8"}),e.jsx("h2",{children:"个性与表达"})]}),(l.expression_vibe.late_night_reply||l.expression_vibe.favorite_reply)&&e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.expression_vibe.late_night_reply&&e.jsxs(Te,{className:"bg-gradient-to-br from-indigo-50 to-violet-50 dark:from-indigo-950/20 dark:to-violet-950/20",children:[e.jsxs(Oe,{children:[e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"🌙"}),"深夜还在回复"]}),e.jsxs(Ns,{children:["凌晨 ",l.expression_vibe.late_night_reply.time,",",l.bot_name,"还在回复..."]})]}),e.jsxs(ze,{className:"text-center",children:[e.jsxs("p",{className:"text-lg italic text-muted-foreground",children:['"',l.expression_vibe.late_night_reply.content,'"']}),e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:"是有什么心事吗?"})]})]}),l.expression_vibe.favorite_reply&&e.jsxs(Te,{className:"bg-gradient-to-br from-rose-50 to-pink-50 dark:from-rose-950/20 dark:to-pink-950/20",children:[e.jsxs(Oe,{children:[e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"💬"}),"最喜欢的回复"]}),e.jsxs(Ns,{children:["使用了 ",l.expression_vibe.favorite_reply.count," 次"]})]}),e.jsxs(ze,{className:"text-center",children:[e.jsxs("p",{className:"text-lg font-medium text-primary",children:['"',l.expression_vibe.favorite_reply.content,'"']}),e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:n5(l.expression_vibe.favorite_reply.count,l.bot_name)})]})]})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Te,{className:"bg-gradient-to-br from-pink-50 to-purple-50 dark:from-pink-950/20 dark:to-purple-950/20",children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"使用最多的表情包 TOP3"}),e.jsx(Ns,{children:"年度最爱的表情包们"})]}),e.jsx(ze,{children:l.expression_vibe.top_emojis&&l.expression_vibe.top_emojis.length>0?e.jsx("div",{className:"flex justify-center gap-4",children:l.expression_vibe.top_emojis.slice(0,3).map((y,w)=>e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:`/api/webui/emoji/${y.id}/thumbnail?original=true`,alt:`TOP ${w+1}`,className:"h-24 w-24 rounded-lg object-cover shadow-md transition-transform hover:scale-105"}),e.jsx(Ce,{className:P("absolute -top-2 -right-2",w===0?"bg-yellow-500":w===1?"bg-gray-400":"bg-amber-700"),children:w+1})]}),e.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[y.usage_count," 次"]})]},y.id))}):e.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"暂无数据"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"印象最深刻的表达风格"}),e.jsxs(Ns,{children:[l.bot_name,"最常使用的表达方式"]})]}),e.jsx(ze,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:l.expression_vibe.top_expressions.map((y,w)=>e.jsxs(Ce,{variant:"outline",className:P("px-3 py-1 text-sm",w===0&&"border-primary bg-primary/10 text-primary text-base px-4 py-2"),children:[y.style," (",y.count,")"]},y.style))})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(La,{title:"图片鉴赏",value:`${l.expression_vibe.image_processed_count} 张`,description:t5(l.expression_vibe.image_processed_count),icon:e.jsx(xx,{className:"h-4 w-4"})}),e.jsx(La,{title:"成长的足迹",value:`${l.expression_vibe.rejected_expression_count} 次`,description:a5(l.expression_vibe.rejected_expression_count),icon:e.jsx(sl,{className:"h-4 w-4"})})]})]})]}),l.expression_vibe.action_types.length>0&&e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsxs(Ue,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl",children:"⚡"}),"行动派"]}),e.jsx(Ns,{children:"除了聊天,我还帮大家做了这些事"})]}),e.jsx(ze,{children:e.jsx("div",{className:"flex flex-wrap gap-3",children:l.expression_vibe.action_types.map(y=>e.jsxs("div",{className:"flex items-center gap-2 rounded-full bg-primary/10 px-4 py-2",children:[e.jsx("span",{className:"font-medium text-primary",children:y.action}),e.jsxs(Ce,{variant:"secondary",children:[y.count," 次"]})]},y.action))})})]})]}),e.jsxs("section",{className:"space-y-4 break-inside-avoid",children:[e.jsxs("div",{className:"flex items-center gap-2 text-2xl font-bold text-primary",children:[e.jsx(e1,{className:"h-8 w-8"}),e.jsx("h2",{children:"趣味成就"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsxs(Te,{className:"col-span-1 md:col-span-2",children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:'新学到的"黑话"'}),e.jsxs(Ns,{children:["今年我学会了 ",l.achievements.new_jargon_count," 个新词"]})]}),e.jsx(ze,{children:e.jsx("div",{className:"flex flex-wrap gap-3",children:l.achievements.sample_jargons.map(y=>e.jsxs("div",{className:"group relative rounded-lg border bg-card p-3 shadow-sm transition-all hover:shadow-md",children:[e.jsx("div",{className:"font-bold text-primary",children:y.content}),e.jsx("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2 max-w-[200px]",children:y.meaning||"暂无解释"})]},y.content))})})]}),e.jsx(Te,{className:"flex flex-col justify-center items-center bg-primary text-primary-foreground",children:e.jsxs(ze,{className:"flex flex-col items-center justify-center p-6 text-center",children:[e.jsx(Ba,{className:"h-12 w-12 mb-4 opacity-80"}),e.jsx("div",{className:"text-4xl font-bold mb-2",children:l.achievements.total_messages.toLocaleString()}),e.jsx("div",{className:"text-sm opacity-80",children:"年度总消息数"}),e.jsxs("div",{className:"mt-4 text-xs opacity-60",children:["其中回复了 ",l.achievements.total_replies.toLocaleString()," 次"]})]})})]})]}),e.jsxs("footer",{className:"mt-12 text-center text-muted-foreground",children:[e.jsx("p",{children:"MaiBot 2025 Annual Report"}),e.jsx("p",{className:"text-sm",children:"Generated with ❤️ by MaiBot Team"})]})]})})}):null}function La({title:a,value:l,description:r,icon:c}){return e.jsxs(Te,{children:[e.jsxs(Oe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ue,{className:"text-sm font-medium",children:a}),e.jsx("div",{className:"text-muted-foreground",children:c})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"text-2xl font-bold",children:l}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function o5(){return e.jsxs("div",{className:"container mx-auto space-y-8 p-8",children:[e.jsx(ks,{className:"h-64 w-full rounded-3xl"}),e.jsx("div",{className:"grid gap-4 md:grid-cols-4",children:[...Array(4)].map((a,l)=>e.jsx(ks,{className:"h-32 w-full"},l))}),e.jsx(ks,{className:"h-96 w-full"})]})}var vd="DropdownMenu",[d5]=ld(vd,[Oj]),fa=Oj(),[u5,JN]=d5(vd),XN=a=>{const{__scopeDropdownMenu:l,children:r,dir:c,open:d,defaultOpen:m,onOpenChange:h,modal:f=!0}=a,p=fa(l),g=u.useRef(null),[N,j]=ad({prop:d,defaultProp:m??!1,onChange:h,caller:vd});return e.jsx(u5,{scope:l,triggerId:Ym(),triggerRef:g,contentId:Ym(),open:N,onOpenChange:j,onOpenToggle:u.useCallback(()=>j(b=>!b),[j]),modal:f,children:e.jsx(Vw,{...p,open:N,onOpenChange:j,dir:c,modal:f,children:r})})};XN.displayName=vd;var ZN="DropdownMenuTrigger",WN=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,disabled:c=!1,...d}=a,m=JN(ZN,r),h=fa(r);return e.jsx(Gw,{asChild:!0,...h,children:e.jsx(ar.button,{type:"button",id:m.triggerId,"aria-haspopup":"menu","aria-expanded":m.open,"aria-controls":m.open?m.contentId:void 0,"data-state":m.open?"open":"closed","data-disabled":c?"":void 0,disabled:c,...d,ref:__(l,m.triggerRef),onPointerDown:_n(a.onPointerDown,f=>{!c&&f.button===0&&f.ctrlKey===!1&&(m.onOpenToggle(),m.open||f.preventDefault())}),onKeyDown:_n(a.onKeyDown,f=>{c||(["Enter"," "].includes(f.key)&&m.onOpenToggle(),f.key==="ArrowDown"&&m.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});WN.displayName=ZN;var m5="DropdownMenuPortal",eb=a=>{const{__scopeDropdownMenu:l,...r}=a,c=fa(l);return e.jsx(Uw,{...c,...r})};eb.displayName=m5;var sb="DropdownMenuContent",tb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=JN(sb,r),m=fa(r),h=u.useRef(!1);return e.jsx($w,{id:d.contentId,"aria-labelledby":d.triggerId,...m,...c,ref:l,onCloseAutoFocus:_n(a.onCloseAutoFocus,f=>{h.current||d.triggerRef.current?.focus(),h.current=!1,f.preventDefault()}),onInteractOutside:_n(a.onInteractOutside,f=>{const p=f.detail.originalEvent,g=p.button===0&&p.ctrlKey===!0,N=p.button===2||g;(!d.modal||N)&&(h.current=!0)}),style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tb.displayName=sb;var x5="DropdownMenuGroup",h5=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Kw,{...d,...c,ref:l})});h5.displayName=x5;var f5="DropdownMenuLabel",ab=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Hw,{...d,...c,ref:l})});ab.displayName=f5;var p5="DropdownMenuItem",lb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Iw,{...d,...c,ref:l})});lb.displayName=p5;var g5="DropdownMenuCheckboxItem",nb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Bw,{...d,...c,ref:l})});nb.displayName=g5;var j5="DropdownMenuRadioGroup",v5=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Qw,{...d,...c,ref:l})});v5.displayName=j5;var N5="DropdownMenuRadioItem",rb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Fw,{...d,...c,ref:l})});rb.displayName=N5;var b5="DropdownMenuItemIndicator",ib=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Pw,{...d,...c,ref:l})});ib.displayName=b5;var y5="DropdownMenuSeparator",cb=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(qw,{...d,...c,ref:l})});cb.displayName=y5;var w5="DropdownMenuArrow",_5=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Yw,{...d,...c,ref:l})});_5.displayName=w5;var S5="DropdownMenuSubTrigger",ob=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Ow,{...d,...c,ref:l})});ob.displayName=S5;var k5="DropdownMenuSubContent",db=u.forwardRef((a,l)=>{const{__scopeDropdownMenu:r,...c}=a,d=fa(r);return e.jsx(Lw,{...d,...c,ref:l,style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});db.displayName=k5;var C5=XN,T5=WN,E5=eb,ub=tb,mb=ab,xb=lb,hb=nb,fb=rb,pb=ib,gb=cb,jb=ob,vb=db;const M5=C5,A5=T5,z5=u.forwardRef(({className:a,inset:l,children:r,...c},d)=>e.jsxs(jb,{ref:d,className:P("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",l&&"pl-8",a),...c,children:[r,e.jsx(ra,{className:"ml-auto h-4 w-4"})]}));z5.displayName=jb.displayName;const R5=u.forwardRef(({className:a,...l},r)=>e.jsx(vb,{ref:r,className:P("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...l}));R5.displayName=vb.displayName;const Nb=u.forwardRef(({className:a,sideOffset:l=4,...r},c)=>e.jsx(E5,{children:e.jsx(ub,{ref:c,sideOffset:l,className:P("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...r})}));Nb.displayName=ub.displayName;const bb=u.forwardRef(({className:a,inset:l,...r},c)=>e.jsx(xb,{ref:c,className:P("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",l&&"pl-8",a),...r}));bb.displayName=xb.displayName;const D5=u.forwardRef(({className:a,children:l,checked:r,...c},d)=>e.jsxs(hb,{ref:d,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:r,...c,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(pb,{children:e.jsx(Ot,{className:"h-4 w-4"})})}),l]}));D5.displayName=hb.displayName;const O5=u.forwardRef(({className:a,children:l,...r},c)=>e.jsxs(fb,{ref:c,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(pb,{children:e.jsx(Vo,{className:"h-2 w-2 fill-current"})})}),l]}));O5.displayName=fb.displayName;const L5=u.forwardRef(({className:a,inset:l,...r},c)=>e.jsx(mb,{ref:c,className:P("px-2 py-1.5 text-sm font-semibold",l&&"pl-8",a),...r}));L5.displayName=mb.displayName;const U5=u.forwardRef(({className:a,...l},r)=>e.jsx(gb,{ref:r,className:P("-mx-1 my-1 h-px bg-muted",a),...l}));U5.displayName=gb.displayName;const Qm=[{value:"created_at",label:"最新发布",icon:da},{value:"downloads",label:"下载最多",icon:na},{value:"likes",label:"最受欢迎",icon:ei}];function $5(){const a=ha(),[l,r]=u.useState([]),[c,d]=u.useState(!0),[m,h]=u.useState(""),[f,p]=u.useState("downloads"),[g,N]=u.useState(1),[j,b]=u.useState(1),[y,w]=u.useState(0),[z,M]=u.useState(new Set),[S,F]=u.useState(new Set),E=cN(),C=u.useCallback(async()=>{d(!0);try{const L=await m4({status:"approved",page:g,page_size:12,search:m||void 0,sort_by:f,sort_order:"desc"});r(L.packs),b(L.total_pages),w(L.total);const me=new Set;for(const Ne of L.packs)await iN(Ne.id,E)&&me.add(Ne.id);M(me)}catch(L){console.error("加载 Pack 列表失败:",L),aa({title:"加载 Pack 列表失败",variant:"destructive"})}finally{d(!1)}},[g,m,f,E]);u.useEffect(()=>{C()},[C]);const R=L=>{L.preventDefault(),N(1),C()},H=async L=>{if(!S.has(L)){F(me=>new Set(me).add(L));try{const me=await rN(L,E);M(Ne=>{const je=new Set(Ne);return me.liked?je.add(L):je.delete(L),je}),r(Ne=>Ne.map(je=>je.id===L?{...je,likes:me.likes}:je))}catch(me){console.error("点赞失败:",me),aa({title:"点赞失败",variant:"destructive"})}finally{F(me=>{const Ne=new Set(me);return Ne.delete(L),Ne})}}},O=L=>{a({to:"/config/pack-market/$packId",params:{packId:L}})},X=Qm.find(L=>L.value===f)||Qm[0];return e.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:[e.jsx("div",{className:"mb-4 sm:mb-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[e.jsx(xa,{className:"h-8 w-8",strokeWidth:2}),"配置模板市场"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:"浏览和应用社区分享的模型配置模板,快速配置你的 MaiBot"})]}),e.jsxs(_,{variant:"outline",onClick:C,disabled:c,className:"gap-2",children:[e.jsx(dt,{className:`h-4 w-4 ${c?"animate-spin":""}`}),"刷新"]})]})}),e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-4 flex-wrap",children:[e.jsx("form",{onSubmit:R,className:"flex-1 min-w-[200px] max-w-md",children:e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(ae,{placeholder:"搜索模板名称、描述...",value:m,onChange:L=>h(L.target.value),className:"pl-10"})]})}),e.jsxs(M5,{children:[e.jsx(A5,{asChild:!0,children:e.jsxs(_,{variant:"outline",className:"min-w-[140px] gap-2",children:[e.jsx(s1,{className:"w-4 h-4"}),X.label,e.jsx(Ia,{className:"w-4 h-4 ml-auto"})]})}),e.jsx(Nb,{align:"end",children:Qm.map(L=>e.jsxs(bb,{onClick:()=>{p(L.value),N(1)},children:[e.jsx(L.icon,{className:"w-4 h-4 mr-2"}),L.label]},L.value))})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["共找到 ",e.jsx("span",{className:"font-medium text-foreground",children:y})," 个模板"]}),c?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6}).map((L,me)=>e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(ks,{className:"h-6 w-3/4"}),e.jsx(ks,{className:"h-4 w-full mt-2"})]}),e.jsx(ze,{children:e.jsx(ks,{className:"h-20 w-full"})}),e.jsx(od,{children:e.jsx(ks,{className:"h-9 w-full"})})]},me))}):l.length===0?e.jsx(Te,{className:"py-12",children:e.jsxs(ze,{className:"text-center text-muted-foreground",children:[e.jsx(xa,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{className:"text-lg font-medium",children:"暂无模板"}),e.jsx("p",{className:"mt-1",children:"还没有人分享配置模板,快来分享第一个吧!"})]})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map(L=>e.jsx(I5,{pack:L,liked:z.has(L.id),liking:S.has(L.id),onLike:()=>H(L.id),onView:()=>O(L.id)},L.id))}),j>1&&e.jsx(fx,{children:e.jsxs(px,{children:[e.jsx(Xn,{children:e.jsx($v,{onClick:()=>N(L=>Math.max(1,L-1)),className:g===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:j},(L,me)=>me+1).filter(L=>L===1||L===j||Math.abs(L-g)<=1).map((L,me,Ne)=>{const je=me>0&&L-Ne[me-1]>1;return e.jsxs(Xn,{children:[je&&e.jsx("span",{className:"px-2",children:"..."}),e.jsx(jc,{onClick:()=>N(L),isActive:L===g,className:"cursor-pointer",children:L})]},L)}),e.jsx(Xn,{children:e.jsx(Iv,{onClick:()=>N(L=>Math.min(j,L+1)),className:g===j?"pointer-events-none opacity-50":"cursor-pointer"})})]})})]})})]})}function I5({pack:a,liked:l,liking:r,onLike:c,onView:d}){const m=h=>new Date(h).toLocaleDateString("zh-CN",{year:"numeric",month:"short",day:"numeric"});return e.jsxs(Te,{className:"flex flex-col hover:shadow-md transition-shadow",children:[e.jsxs(Oe,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx(Ue,{className:"text-lg line-clamp-1",children:a.name}),e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:["v",a.version]})]}),e.jsx(Ns,{className:"line-clamp-2 min-h-[40px]",children:a.description})]}),e.jsxs(ze,{className:"flex-1 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Fl,{className:"w-3.5 h-3.5"}),a.author]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(da,{className:"w-3.5 h-3.5"}),m(a.created_at)]})]}),e.jsxs("div",{className:"flex gap-4 text-sm",children:[e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",title:"提供商数量",children:[e.jsx(Hl,{className:"w-3.5 h-3.5"}),a.provider_count]}),e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",title:"模型数量",children:[e.jsx(Wn,{className:"w-3.5 h-3.5"}),a.model_count]}),e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",title:"任务配置数",children:[e.jsx(er,{className:"w-3.5 h-3.5"}),a.task_count]})]}),a.tags&&a.tags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[a.tags.slice(0,3).map(h=>e.jsxs(Ce,{variant:"outline",className:"text-xs",children:[e.jsx(cd,{className:"w-2.5 h-2.5 mr-1"}),h]},h)),a.tags.length>3&&e.jsxs(Ce,{variant:"outline",className:"text-xs",children:["+",a.tags.length-3]})]})]}),e.jsx(od,{className:"pt-3 border-t",children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"w-4 h-4"}),a.downloads]}),e.jsxs("button",{onClick:h=>{h.stopPropagation(),c()},disabled:r,className:`flex items-center gap-1 transition-colors ${l?"text-red-500":"hover:text-red-500"} ${r?"opacity-50":""}`,children:[e.jsx(ei,{className:`w-4 h-4 ${l?"fill-current":""}`}),a.likes]})]}),e.jsx(_,{size:"sm",onClick:d,children:"查看详情"})]})})]})}var ul="Accordion",B5=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Lx,P5,F5]=S_(ul),[Nd]=ld(ul,[F5,Lj]),Ux=Lj(),yb=Is.forwardRef((a,l)=>{const{type:r,...c}=a,d=c,m=c;return e.jsx(Lx.Provider,{scope:a.__scopeAccordion,children:r==="multiple"?e.jsx(G5,{...m,ref:l}):e.jsx(V5,{...d,ref:l})})});yb.displayName=ul;var[wb,H5]=Nd(ul),[_b,q5]=Nd(ul,{collapsible:!1}),V5=Is.forwardRef((a,l)=>{const{value:r,defaultValue:c,onValueChange:d=()=>{},collapsible:m=!1,...h}=a,[f,p]=ad({prop:r,defaultProp:c??"",onChange:d,caller:ul});return e.jsx(wb,{scope:a.__scopeAccordion,value:Is.useMemo(()=>f?[f]:[],[f]),onItemOpen:p,onItemClose:Is.useCallback(()=>m&&p(""),[m,p]),children:e.jsx(_b,{scope:a.__scopeAccordion,collapsible:m,children:e.jsx(Sb,{...h,ref:l})})})}),G5=Is.forwardRef((a,l)=>{const{value:r,defaultValue:c,onValueChange:d=()=>{},...m}=a,[h,f]=ad({prop:r,defaultProp:c??[],onChange:d,caller:ul}),p=Is.useCallback(N=>f((j=[])=>[...j,N]),[f]),g=Is.useCallback(N=>f((j=[])=>j.filter(b=>b!==N)),[f]);return e.jsx(wb,{scope:a.__scopeAccordion,value:h,onItemOpen:p,onItemClose:g,children:e.jsx(_b,{scope:a.__scopeAccordion,collapsible:!0,children:e.jsx(Sb,{...m,ref:l})})})}),[K5,bd]=Nd(ul),Sb=Is.forwardRef((a,l)=>{const{__scopeAccordion:r,disabled:c,dir:d,orientation:m="vertical",...h}=a,f=Is.useRef(null),p=nd(f,l),g=P5(r),j=Wj(d)==="ltr",b=_n(a.onKeyDown,y=>{if(!B5.includes(y.key))return;const w=y.target,z=g().filter(X=>!X.ref.current?.disabled),M=z.findIndex(X=>X.ref.current===w),S=z.length;if(M===-1)return;y.preventDefault();let F=M;const E=0,C=S-1,R=()=>{F=M+1,F>C&&(F=E)},H=()=>{F=M-1,F{const{__scopeAccordion:r,value:c,...d}=a,m=bd(td,r),h=H5(td,r),f=Ux(r),p=Ym(),g=c&&h.value.includes(c)||!1,N=m.disabled||a.disabled;return e.jsx(Q5,{scope:r,open:g,disabled:N,triggerId:p,children:e.jsx(Mj,{"data-orientation":m.orientation,"data-state":zb(g),...f,...d,ref:l,disabled:N,open:g,onOpenChange:j=>{j?h.onItemOpen(c):h.onItemClose(c)}})})});kb.displayName=td;var Cb="AccordionHeader",Tb=Is.forwardRef((a,l)=>{const{__scopeAccordion:r,...c}=a,d=bd(ul,r),m=$x(Cb,r);return e.jsx(ar.h3,{"data-orientation":d.orientation,"data-state":zb(m.open),"data-disabled":m.disabled?"":void 0,...c,ref:l})});Tb.displayName=Cb;var lx="AccordionTrigger",Eb=Is.forwardRef((a,l)=>{const{__scopeAccordion:r,...c}=a,d=bd(ul,r),m=$x(lx,r),h=q5(lx,r),f=Ux(r);return e.jsx(Lx.ItemSlot,{scope:r,children:e.jsx(Jw,{"aria-disabled":m.open&&!h.collapsible||void 0,"data-orientation":d.orientation,id:m.triggerId,...f,...c,ref:l})})});Eb.displayName=lx;var Mb="AccordionContent",Ab=Is.forwardRef((a,l)=>{const{__scopeAccordion:r,...c}=a,d=bd(ul,r),m=$x(Mb,r),h=Ux(r);return e.jsx(Xw,{role:"region","aria-labelledby":m.triggerId,"data-orientation":d.orientation,...h,...c,ref:l,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});Ab.displayName=Mb;function zb(a){return a?"open":"closed"}var Y5=yb,J5=kb,X5=Tb,Rb=Eb,Db=Ab;const Z5=Y5,Ob=u.forwardRef(({className:a,...l},r)=>e.jsx(J5,{ref:r,className:P("border-b",a),...l}));Ob.displayName="AccordionItem";const Lb=u.forwardRef(({className:a,children:l,...r},c)=>e.jsx(X5,{className:"flex",children:e.jsxs(Rb,{ref:c,className:P("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...r,children:[l,e.jsx(Ia,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Lb.displayName=Rb.displayName;const Ub=u.forwardRef(({className:a,children:l,...r},c)=>e.jsx(Db,{ref:c,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:e.jsx("div",{className:P("pb-4 pt-0",a),children:l})}));Ub.displayName=Db.displayName;const W5={utils:"通用工具",utils_small:"轻量工具",tool_use:"工具调用",replyer:"回复生成",planner:"规划推理",vlm:"视觉模型",voice:"语音处理",embedding:"向量嵌入",lpmm_entity_extract:"实体提取",lpmm_rdf_build:"RDF构建",lpmm_qa:"问答模型"};function eT(){const{packId:a}=Pb.useParams(),l=ha(),[r,c]=u.useState(null),[d,m]=u.useState(!0),[h,f]=u.useState(!1),[p,g]=u.useState(!1),[N,j]=u.useState(!1),[b,y]=u.useState(1),[w,z]=u.useState(null),[M,S]=u.useState(!1),[F,E]=u.useState(!1),[C,R]=u.useState({apply_providers:!0,apply_models:!0,apply_task_config:!0,task_mode:"append",selected_providers:void 0,selected_models:void 0,selected_tasks:void 0}),[H,O]=u.useState({}),[X,L]=u.useState({}),me=cN(),Ne=u.useCallback(async()=>{if(a){m(!0);try{const D=await x4(a);c(D);const Q=await iN(a,me);f(Q)}catch(D){console.error("加载 Pack 失败:",D),aa({title:"加载模板失败",variant:"destructive"})}finally{m(!1)}}},[a,me]);u.useEffect(()=>{Ne()},[Ne]);const je=async()=>{if(!(!a||p)){g(!0);try{const D=await rN(a,me);f(D.liked),r&&c({...r,likes:D.likes})}catch(D){console.error("点赞失败:",D),aa({title:"点赞失败",variant:"destructive"})}finally{g(!1)}}},re=async()=>{if(r){j(!0),y(1),S(!0);try{const D=await p4(r);z(D);const Q={};for(const ue of D.existing_providers)Q[ue.pack_provider.name]=ue.local_providers[0].name;O(Q);const I={};for(const ue of D.new_providers)I[ue.name]="";L(I)}catch(D){console.error("检测冲突失败:",D),aa({title:"检测配置冲突失败",variant:"destructive"}),j(!1)}finally{S(!1)}}},ge=async()=>{if(r){if(C.apply_providers&&w){for(const D of w.new_providers)if(!X[D.name]){aa({title:`请填写提供商 "${D.name}" 的 API Key`,variant:"destructive"});return}}E(!0);try{await g4(r,C,H,X),await f4(r.id,me),c({...r,downloads:r.downloads+1}),aa({title:"配置模板应用成功!"}),j(!1)}catch(D){console.error("应用 Pack 失败:",D),aa({title:D instanceof Error?D.message:"应用配置失败",variant:"destructive"})}finally{E(!1)}}},pe=D=>new Date(D).toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric"});return d?e.jsx(tT,{}):r?e.jsx("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs(_,{variant:"ghost",size:"sm",onClick:()=>l({to:"/config/pack-market"}),className:"gap-2",children:[e.jsx($a,{className:"w-4 h-4"}),"返回市场"]}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[e.jsxs("div",{className:"flex-1 space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(xa,{className:"w-10 h-10 text-primary mt-1"}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[r.name,e.jsxs(Ce,{variant:"secondary",children:["v",r.version]})]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:r.description})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Fl,{className:"w-4 h-4"}),r.author]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(da,{className:"w-4 h-4"}),pe(r.created_at)]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"w-4 h-4"}),r.downloads," 次下载"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ei,{className:`w-4 h-4 ${h?"fill-red-500 text-red-500":""}`}),r.likes," 赞"]})]}),r.tags&&r.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:r.tags.map(D=>e.jsxs(Ce,{variant:"outline",children:[e.jsx(cd,{className:"w-3 h-3 mr-1"}),D]},D))})]}),e.jsxs("div",{className:"flex flex-col gap-2 min-w-[160px]",children:[e.jsxs(_,{size:"lg",onClick:re,children:[e.jsx(na,{className:"w-4 h-4 mr-2"}),"应用模板"]}),e.jsxs(_,{variant:"outline",onClick:je,disabled:p,className:h?"text-red-500 border-red-200":"",children:[e.jsx(ei,{className:`w-4 h-4 mr-2 ${h?"fill-current":""}`}),h?"已点赞":"点赞"]})]})]}),e.jsx(la,{}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsx(Te,{children:e.jsxs(ze,{className:"flex items-center gap-3 py-4",children:[e.jsx(Hl,{className:"w-8 h-8 text-blue-500 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:r.providers.length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"API 提供商"})]})]})}),e.jsx(Te,{children:e.jsxs(ze,{className:"flex items-center gap-3 py-4",children:[e.jsx(Wn,{className:"w-8 h-8 text-green-500 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:r.models.length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"模型配置"})]})]})}),e.jsx(Te,{children:e.jsxs(ze,{className:"flex items-center gap-3 py-4",children:[e.jsx(er,{className:"w-8 h-8 text-purple-500 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:Object.keys(r.task_config).length}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"任务配置"})]})]})})]}),e.jsxs(Jt,{defaultValue:"providers",className:"space-y-4",children:[e.jsxs(Gt,{className:"w-full sm:w-auto grid grid-cols-3 sm:flex",children:[e.jsxs(Xe,{value:"providers",className:"gap-1 sm:gap-2",children:[e.jsx(Hl,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"提供商"}),e.jsx("span",{className:"sm:hidden",children:"提供商"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",r.providers.length,")"]})]}),e.jsxs(Xe,{value:"models",className:"gap-1 sm:gap-2",children:[e.jsx(Wn,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"模型"}),e.jsx("span",{className:"sm:hidden",children:"模型"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",r.models.length,")"]})]}),e.jsxs(Xe,{value:"tasks",className:"gap-1 sm:gap-2",children:[e.jsx(er,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"任务配置"}),e.jsx("span",{className:"sm:hidden",children:"任务"}),e.jsxs("span",{className:"hidden sm:inline",children:["(",Object.keys(r.task_config).length,")"]})]})]}),e.jsx(Ss,{value:"providers",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"API 提供商"}),e.jsx(Ns,{children:"模板中包含的 API 提供商配置(不含 API Key)"})]}),e.jsx(ze,{children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{children:"名称"}),e.jsx(ns,{children:"Base URL"}),e.jsx(ns,{children:"类型"})]})}),e.jsx(Gl,{children:r.providers.map(D=>e.jsxs(_t,{children:[e.jsx(Ze,{className:"font-medium whitespace-nowrap",children:D.name}),e.jsx(Ze,{className:"text-muted-foreground font-mono text-sm max-w-[200px] truncate",children:D.base_url}),e.jsx(Ze,{children:e.jsx(Ce,{variant:"outline",children:D.client_type})})]},D.name))})]})})})]})}),e.jsx(Ss,{value:"models",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"模型配置"}),e.jsx(Ns,{children:"模板中包含的模型配置"})]}),e.jsx(ze,{children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(ql,{children:[e.jsx(Vl,{children:e.jsxs(_t,{children:[e.jsx(ns,{children:"模型名称"}),e.jsx(ns,{children:"标识符"}),e.jsx(ns,{children:"提供商"}),e.jsx(ns,{className:"text-right",children:"价格 (入/出)"})]})}),e.jsx(Gl,{children:r.models.map(D=>e.jsxs(_t,{children:[e.jsx(Ze,{className:"font-medium whitespace-nowrap",children:D.name}),e.jsx(Ze,{className:"text-muted-foreground font-mono text-sm max-w-[150px] truncate",children:D.model_identifier}),e.jsx(Ze,{className:"whitespace-nowrap",children:D.api_provider}),e.jsxs(Ze,{className:"text-right text-muted-foreground whitespace-nowrap",children:["¥",D.price_in," / ¥",D.price_out]})]},D.name))})]})})})]})}),e.jsx(Ss,{value:"tasks",children:e.jsxs(Te,{children:[e.jsxs(Oe,{children:[e.jsx(Ue,{children:"任务配置"}),e.jsx(Ns,{children:"模板中各任务类型的模型分配"})]}),e.jsx(ze,{children:e.jsx(Z5,{type:"multiple",className:"w-full",children:Object.entries(r.task_config).map(([D,Q])=>e.jsxs(Ob,{value:D,children:[e.jsx(Lb,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Sn,{className:"w-4 h-4"}),W5[D]||D,e.jsxs(Ce,{variant:"secondary",className:"ml-2",children:[Q.model_list.length," 个模型"]})]})}),e.jsx(Ub,{children:e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"分配的模型:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Q.model_list.map(I=>e.jsx(Ce,{variant:"outline",children:I},I))}),Q.temperature!==void 0&&e.jsxs("div",{className:"text-sm",children:["Temperature: ",e.jsx("span",{className:"font-mono",children:Q.temperature})]}),Q.max_tokens!==void 0&&e.jsxs("div",{className:"text-sm",children:["Max Tokens: ",e.jsx("span",{className:"font-mono",children:Q.max_tokens})]})]})})]},D))})})]})})]}),e.jsx(sT,{open:N,onOpenChange:j,pack:r,step:b,setStep:y,conflicts:w,detectingConflicts:M,applying:F,options:C,setOptions:R,_providerMapping:H,_setProviderMapping:O,newProviderApiKeys:X,setNewProviderApiKeys:L,onApply:ge})]})})}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx(xa,{className:"w-16 h-16 mx-auto mb-4 opacity-50"}),e.jsx("h2",{className:"text-xl font-semibold",children:"模板不存在"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"该配置模板可能已被删除或尚未通过审核"}),e.jsxs(_,{className:"mt-4",onClick:()=>l({to:"/config/pack-market"}),children:[e.jsx($a,{className:"w-4 h-4 mr-2"}),"返回市场"]})]})}function sT({open:a,onOpenChange:l,pack:r,step:c,setStep:d,conflicts:m,detectingConflicts:h,applying:f,options:p,setOptions:g,_providerMapping:N,_setProviderMapping:j,newProviderApiKeys:b,setNewProviderApiKeys:y,onApply:w}){return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs(qs,{children:[e.jsxs(Vs,{className:"flex items-center gap-2",children:[e.jsx(xa,{className:"w-5 h-5"}),"应用配置模板"]}),e.jsxs(at,{children:["步骤 ",c," / ",3,":",c===1&&"选择要应用的内容",c===2&&"配置提供商映射",c===3&&"确认并应用"]})]}),h?e.jsxs("div",{className:"py-8 text-center",children:[e.jsx(Fs,{className:"w-8 h-8 mx-auto animate-spin text-primary"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"正在检测配置冲突..."})]}):e.jsxs(e.Fragment,{children:[c===1&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"apply_providers",checked:p.apply_providers,onCheckedChange:M=>g({...p,apply_providers:M})}),e.jsxs(T,{htmlFor:"apply_providers",className:"flex items-center gap-2",children:[e.jsx(Hl,{className:"w-4 h-4"}),"应用提供商配置 (",r.providers.length," 个)"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"apply_models",checked:p.apply_models,onCheckedChange:M=>g({...p,apply_models:M})}),e.jsxs(T,{htmlFor:"apply_models",className:"flex items-center gap-2",children:[e.jsx(Wn,{className:"w-4 h-4"}),"应用模型配置 (",r.models.length," 个)"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(tt,{id:"apply_task_config",checked:p.apply_task_config,onCheckedChange:M=>g({...p,apply_task_config:M})}),e.jsxs(T,{htmlFor:"apply_task_config",className:"flex items-center gap-2",children:[e.jsx(er,{className:"w-4 h-4"}),"应用任务配置 (",Object.keys(r.task_config).length," 个)"]})]})]}),p.apply_task_config&&e.jsxs("div",{className:"pl-6 space-y-2 border-l-2 border-muted",children:[e.jsx(T,{className:"text-sm font-medium",children:"任务配置应用模式"}),e.jsxs(Rx,{value:p.task_mode,onValueChange:M=>g({...p,task_mode:M}),children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wo,{value:"append",id:"mode_append"}),e.jsx(T,{htmlFor:"mode_append",className:"font-normal",children:"追加模式 - 将模板中的模型添加到现有配置"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wo,{value:"replace",id:"mode_replace"}),e.jsx(T,{htmlFor:"mode_replace",className:"font-normal",children:"替换模式 - 用模板配置完全替换现有配置"})]})]})]})]}),c===2&&m&&e.jsxs("div",{className:"space-y-4",children:[p.apply_providers&&m.existing_providers.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"发现已有的提供商"}),e.jsx(ft,{children:"以下提供商的 URL 与您本地配置中的提供商匹配,将自动使用本地提供商:"})]}),e.jsx("div",{className:"space-y-2",children:m.existing_providers.map(({pack_provider:M,local_providers:S})=>e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-lg",children:[e.jsx(Ot,{className:"w-4 h-4 text-green-500 flex-shrink-0"}),e.jsx("span",{className:"font-medium flex-shrink-0",children:M.name}),e.jsx(ra,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),S.length===1?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:S[0].name}),e.jsx(Ce,{variant:"outline",className:"ml-auto",children:"URL 匹配"})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{value:N[M.name]||S[0].name,onValueChange:F=>j({...N,[M.name]:F}),children:[e.jsx(Ie,{className:"w-[200px]",children:e.jsx(Fe,{})}),e.jsx(Be,{children:S.map(F=>e.jsx(W,{value:F.name,children:F.name},F.name))})]}),e.jsxs(Ce,{variant:"outline",className:"ml-auto",children:[S.length," 个匹配"]})]})]},M.name))})]}),p.apply_providers&&m.new_providers.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs(ht,{variant:"destructive",children:[e.jsx(Lt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"需要配置 API Key"}),e.jsx(ft,{children:"以下提供商在您的本地配置中不存在,需要填写 API Key:"})]}),e.jsx("div",{className:"space-y-4",children:m.new_providers.map(M=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(cx,{className:"w-4 h-4 text-amber-500"}),e.jsx("span",{className:"font-medium",children:M.name}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",M.base_url,")"]})]}),e.jsx(ae,{type:"password",placeholder:`输入 ${M.name} 的 API Key`,value:b[M.name]||"",onChange:S=>y({...b,[M.name]:S.target.value})})]},M.name))})]}),(!p.apply_providers||m.existing_providers.length===0&&m.new_providers.length===0)&&e.jsxs(ht,{children:[e.jsx(Ot,{className:"h-4 w-4"}),e.jsx(Jn,{children:"无需配置"}),e.jsx(ft,{children:"模板中没有提供商配置,或您选择不应用提供商。"})]})]}),c===3&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{children:[e.jsx(Yt,{className:"h-4 w-4"}),e.jsx(Jn,{children:"确认应用"}),e.jsx(ft,{children:"请确认以下将要应用的内容:"})]}),e.jsxs("div",{className:"space-y-2",children:[p.apply_providers&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Ot,{className:"w-4 h-4 text-green-500"}),e.jsx(Hl,{className:"w-4 h-4"}),e.jsxs("span",{children:["应用 ",r.providers.length," 个提供商配置"]})]}),p.apply_models&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Ot,{className:"w-4 h-4 text-green-500"}),e.jsx(Wn,{className:"w-4 h-4"}),e.jsxs("span",{children:["应用 ",r.models.length," 个模型配置"]})]}),p.apply_task_config&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Ot,{className:"w-4 h-4 text-green-500"}),e.jsx(er,{className:"w-4 h-4"}),e.jsxs("span",{children:[p.task_mode==="append"?"追加":"替换"," ",Object.keys(r.task_config).length," 个任务配置"]})]})]}),m&&m.new_providers.length>0&&e.jsxs(ht,{variant:"destructive",children:[e.jsx(Lt,{className:"h-4 w-4"}),e.jsxs(ft,{children:["将添加 ",m.new_providers.length," 个新提供商,请确保已填写正确的 API Key。"]})]})]})]}),e.jsxs(gt,{className:"flex justify-between",children:[e.jsx("div",{children:c>1&&!h&&e.jsx(_,{variant:"outline",onClick:()=>d(c-1),disabled:f,children:"上一步"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(_,{variant:"outline",onClick:()=>l(!1),disabled:f,children:"取消"}),c<3?e.jsx(_,{onClick:()=>d(c+1),disabled:h,children:"下一步"}):e.jsxs(_,{onClick:w,disabled:f,children:[f&&e.jsx(Fs,{className:"w-4 h-4 mr-2 animate-spin"}),"应用模板"]})]})]})]})})}function tT(){return e.jsx("div",{className:"h-[calc(100vh-4rem)] flex flex-col p-4 sm:p-6",children:e.jsx(ts,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsx(ks,{className:"h-9 w-24"}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[e.jsxs("div",{className:"flex-1 space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ks,{className:"w-10 h-10"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(ks,{className:"h-8 w-2/3"}),e.jsx(ks,{className:"h-4 w-full"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-4",children:[e.jsx(ks,{className:"h-4 w-24"}),e.jsx(ks,{className:"h-4 w-32"}),e.jsx(ks,{className:"h-4 w-28"}),e.jsx(ks,{className:"h-4 w-20"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(ks,{className:"h-6 w-20"}),e.jsx(ks,{className:"h-6 w-24"}),e.jsx(ks,{className:"h-6 w-16"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 min-w-[160px]",children:[e.jsx(ks,{className:"h-10 w-full"}),e.jsx(ks,{className:"h-10 w-full"})]})]}),e.jsx(ks,{className:"h-px w-full"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsx(ks,{className:"h-24"}),e.jsx(ks,{className:"h-24"}),e.jsx(ks,{className:"h-24"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ks,{className:"h-10 w-32"}),e.jsx(ks,{className:"h-10 w-32"}),e.jsx(ks,{className:"h-10 w-32"})]}),e.jsx(ks,{className:"h-96 w-full"})]})]})})})}function aT(){const a=ha(),[l,r]=u.useState(!0);return u.useEffect(()=>{let c=!1;return(async()=>{try{const m=await dc();!c&&!m&&a({to:"/auth"})}catch{c||a({to:"/auth"})}finally{c||r(!1)}})(),()=>{c=!0}},[a]),{checking:l}}async function lT(){return await dc()}const nT=ti("pointer-events-none inline-flex select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono font-medium opacity-100",{variants:{size:{sm:"h-5 text-[10px]",default:"h-6 text-xs",lg:"h-7 text-sm"}},defaultVariants:{size:"default"}}),$b=u.forwardRef(({className:a,size:l,abbrTitle:r,children:c,...d},m)=>e.jsx("kbd",{className:P(nT({size:l,className:a})),ref:m,...d,children:r?e.jsx("abbr",{title:r,children:c}):c}));$b.displayName="Kbd";const rT=[{icon:id,title:"首页",description:"查看仪表板概览",path:"/",category:"概览"},{icon:Ua,title:"麦麦主程序配置",description:"配置麦麦的核心设置",path:"/config/bot",category:"配置"},{icon:Hl,title:"麦麦模型提供商配置",description:"配置模型提供商",path:"/config/modelProvider",category:"配置"},{icon:gv,title:"麦麦模型配置",description:"配置模型参数",path:"/config/model",category:"配置"},{icon:rd,title:"表情包管理",description:"管理麦麦的表情包",path:"/resource/emoji",category:"资源"},{icon:Ba,title:"表达方式管理",description:"管理麦麦的表达方式",path:"/resource/expression",category:"资源"},{icon:jv,title:"人物信息管理",description:"管理人物信息",path:"/resource/person",category:"资源"},{icon:Wr,title:"黑话管理",description:"管理麦麦学习到的黑话和俚语",path:"/resource/jargon",category:"资源"},{icon:t1,title:"统计信息",description:"查看使用统计",path:"/statistics",category:"监控"},{icon:xa,title:"插件市场",description:"浏览和安装插件",path:"/plugins",category:"扩展"},{icon:ux,title:"日志查看器",description:"查看系统日志",path:"/logs",category:"监控"},{icon:Sn,title:"系统设置",description:"配置系统参数",path:"/settings",category:"系统"}];function iT({open:a,onOpenChange:l}){const[r,c]=u.useState(""),[d,m]=u.useState(0),h=ha(),f=rT.filter(N=>N.title.toLowerCase().includes(r.toLowerCase())||N.description.toLowerCase().includes(r.toLowerCase())||N.category.toLowerCase().includes(r.toLowerCase())),p=u.useCallback(N=>{h({to:N}),l(!1),c(""),m(0)},[h,l]),g=u.useCallback(N=>{N.key==="ArrowDown"?(N.preventDefault(),m(j=>(j+1)%f.length)):N.key==="ArrowUp"?(N.preventDefault(),m(j=>(j-1+f.length)%f.length)):N.key==="Enter"&&f[d]&&(N.preventDefault(),p(f[d].path))},[f,d,p]);return e.jsx(Qs,{open:a,onOpenChange:l,children:e.jsxs(Hs,{className:"max-w-2xl p-0 gap-0",children:[e.jsxs(qs,{className:"px-4 pt-4 pb-0",children:[e.jsx(Vs,{className:"sr-only",children:"搜索"}),e.jsxs("div",{className:"relative",children:[e.jsx($t,{className:"absolute left-3 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground"}),e.jsx(ae,{value:r,onChange:N=>{c(N.target.value),m(0)},onKeyDown:g,placeholder:"搜索页面...",className:"h-12 pl-11 text-base border-0 focus-visible:ring-0 shadow-none",autoFocus:!0})]})]}),e.jsx("div",{className:"border-t",children:e.jsx(ts,{className:"h-[400px]",children:f.length>0?e.jsx("div",{className:"p-2",children:f.map((N,j)=>{const b=N.icon;return e.jsxs("button",{onClick:()=>p(N.path),onMouseEnter:()=>m(j),className:P("w-full flex items-center gap-3 px-3 py-2.5 rounded-md text-left transition-colors",j===d?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:[e.jsx(b,{className:"h-5 w-5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-medium text-sm",children:N.title}),e.jsx("div",{className:"text-xs text-muted-foreground truncate",children:N.description})]}),e.jsx("div",{className:"text-xs text-muted-foreground px-2 py-1 bg-muted rounded",children:N.category})]},N.path)})}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx($t,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r?"未找到匹配的页面":"输入关键词开始搜索"})]})})}),e.jsx("div",{className:"border-t px-4 py-3 flex items-center justify-between text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"↑"}),e.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"↓"}),"导航"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"Enter"}),"选择"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"Esc"}),"关闭"]})]})})]})})}function cT(){const a=window.location.protocol==="http:",l=window.location.hostname.toLowerCase(),r=l==="localhost"||l==="127.0.0.1"||l==="::1",c=sessionStorage.getItem("http-warning-dismissed")==="true",[d,m]=u.useState(a&&!r&&!c),[h,f]=u.useState(!1),p=()=>{f(!0),m(!1),sessionStorage.setItem("http-warning-dismissed","true")};return!d||h?null:e.jsx("div",{className:"relative bg-amber-500/10 border-b border-amber-500/20 backdrop-blur-sm",children:e.jsx("div",{className:"container mx-auto px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx(Lt,{className:"h-5 w-5 text-amber-600 dark:text-amber-500 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"text-sm font-medium text-amber-900 dark:text-amber-100",children:[e.jsx("span",{className:"font-semibold",children:"安全警告:"}),"您正在使用 ",e.jsx("strong",{children:"HTTP"})," 访问 MaiBot WebUI"]}),e.jsx("p",{className:"text-xs text-amber-800 dark:text-amber-200 mt-1",children:"如果这是公网服务器,您的数据(包括 Token、聊天记录等)可能在传输过程中被窃取。强烈建议使用 HTTPS 访问或仅在本地网络使用。"})]})]}),e.jsx(_,{variant:"ghost",size:"icon",onClick:p,className:"h-8 w-8 text-amber-700 hover:text-amber-900 dark:text-amber-400 dark:hover:text-amber-200 flex-shrink-0","aria-label":"关闭警告",children:e.jsx(Sa,{className:"h-4 w-4"})})]})})})}function oT(){const[a,l]=u.useState(0),[r,c]=u.useState(!1),d=u.useRef(null);u.useEffect(()=>{const g=N=>{const j=N.target;if(j.scrollHeight>j.clientHeight+100){d.current=j;const b=j.scrollTop,y=j.scrollHeight-j.clientHeight,w=y>0?b/y*100:0;l(w),c(b>300)}};return window.addEventListener("scroll",g,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})},[]);const m=()=>{d.current?.scrollTo({top:0,behavior:"smooth"})},h=18,f=2*Math.PI*h,p=f-a/100*f;return e.jsx("div",{className:P("fixed bottom-24 right-8 z-50 transition-all duration-500 ease-in-out transform",r?"translate-x-0 opacity-100":"translate-x-32 opacity-0 pointer-events-none"),children:e.jsxs(_,{variant:"outline",size:"icon",className:P("relative h-12 w-12 rounded-full shadow-xl","bg-background/80 backdrop-blur-md border-border/50","hover:bg-accent hover:scale-110 hover:shadow-2xl hover:border-primary/50","transition-all duration-300","group"),onClick:m,"aria-label":"回到顶部",children:[e.jsxs("svg",{className:"absolute inset-0 h-full w-full -rotate-90 transform p-1",viewBox:"0 0 44 44",children:[e.jsx("circle",{className:"text-muted-foreground/10",strokeWidth:"3",stroke:"currentColor",fill:"transparent",r:h,cx:"22",cy:"22"}),e.jsx("circle",{className:"text-primary transition-all duration-100 ease-out",strokeWidth:"3",strokeDasharray:f,strokeDashoffset:p,strokeLinecap:"round",stroke:"currentColor",fill:"transparent",r:h,cx:"22",cy:"22"})]}),e.jsx(a1,{className:"h-5 w-5 text-primary transition-transform duration-300 group-hover:-translate-y-1 group-hover:scale-110",strokeWidth:2.5}),e.jsx("div",{className:"absolute inset-0 rounded-full bg-primary/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]})})}function dT({children:a}){const{checking:l}=aT(),[r,c]=u.useState(!0),[d,m]=u.useState(!1),[h,f]=u.useState(!1),[p,g]=u.useState(!1),{theme:N,setTheme:j}=vx(),b=nw();if(u.useEffect(()=>{if(r)g(!1);else{const S=setTimeout(()=>{g(!0)},350);return()=>clearTimeout(S)}},[r]),u.useEffect(()=>{const S=F=>{(F.metaKey||F.ctrlKey)&&F.key==="k"&&(F.preventDefault(),f(!0))};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[]),l)return e.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:e.jsx("div",{className:"text-muted-foreground",children:"正在验证登录状态..."})});const y=[{title:"概览",items:[{icon:id,label:"首页",path:"/"}]},{title:"麦麦配置编辑",items:[{icon:Ua,label:"麦麦主程序配置",path:"/config/bot"},{icon:Hl,label:"AI模型厂商配置",path:"/config/modelProvider",tourId:"sidebar-model-provider"},{icon:gv,label:"模型管理与分配",path:"/config/model",tourId:"sidebar-model-management"},{icon:zg,label:"麦麦适配器配置",path:"/config/adapter"}]},{title:"麦麦资源管理",items:[{icon:rd,label:"表情包管理",path:"/resource/emoji"},{icon:Ba,label:"表达方式管理",path:"/resource/expression"},{icon:Wr,label:"黑话管理",path:"/resource/jargon"},{icon:jv,label:"人物信息管理",path:"/resource/person"},{icon:xv,label:"知识库图谱可视化",path:"/resource/knowledge-graph"},{icon:Zr,label:"麦麦知识库管理",path:"/resource/knowledge-base"}]},{title:"扩展与监控",items:[{icon:xa,label:"插件市场",path:"/plugins"},{icon:fv,label:"配置模板市场",path:"/config/pack-market"},{icon:zg,label:"插件配置",path:"/plugin-config"},{icon:ux,label:"日志查看器",path:"/logs"},{icon:nx,label:"计划器&回复器监控",path:"/planner-monitor"},{icon:Ba,label:"本地聊天室",path:"/chat"}]},{title:"系统",items:[{icon:Sn,label:"系统设置",path:"/settings"}]}],z=N==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":N,M=async()=>{await I1()};return e.jsx(Zv,{delayDuration:300,children:e.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e.jsxs("aside",{className:P("fixed inset-y-0 left-0 z-50 flex flex-col border-r bg-card transition-all duration-300 lg:relative lg:z-0","w-64 lg:w-auto",r?"lg:w-64":"lg:w-16",d?"translate-x-0":"-translate-x-full lg:translate-x-0"),children:[e.jsx("div",{className:"flex h-16 items-center border-b px-4",children:e.jsxs("div",{className:P("relative flex items-center justify-center flex-1 transition-all overflow-hidden","lg:flex-1",!r&&"lg:flex-none lg:w-8"),children:[e.jsxs("div",{className:P("flex items-baseline gap-2",!r&&"lg:hidden"),children:[e.jsx("span",{className:"font-bold text-xl text-primary-gradient whitespace-nowrap",children:"MaiBot WebUI"}),e.jsx("span",{className:"text-xs text-primary/60 whitespace-nowrap",children:v2()})]}),!r&&e.jsx("span",{className:"hidden lg:block font-bold text-primary-gradient text-2xl",children:"M"})]})}),e.jsx(ts,{className:P("flex-1 overflow-x-hidden",!r&&"lg:w-16"),children:e.jsx("nav",{className:P("p-4",!r&&"lg:p-2 lg:w-16"),children:e.jsx("ul",{className:P("space-y-6",!r&&"lg:space-y-3 lg:w-full"),children:y.map((S,F)=>e.jsxs("li",{children:[e.jsx("div",{className:P("px-3 h-[1.25rem]","mb-2",!r&&"lg:mb-1 lg:invisible"),children:e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground/60 whitespace-nowrap",children:S.title})}),!r&&F>0&&e.jsx("div",{className:"hidden lg:block mb-2 border-t border-border"}),e.jsx("ul",{className:"space-y-1",children:S.items.map(E=>{const C=b({to:E.path}),R=E.icon,H=e.jsxs(e.Fragment,{children:[C&&e.jsx("div",{className:"absolute left-0 top-1/2 h-8 w-1 -translate-y-1/2 rounded-r-full bg-primary transition-opacity duration-300"}),e.jsxs("div",{className:P("flex items-center transition-all duration-300",r?"gap-3":"gap-3 lg:gap-0"),children:[e.jsx(R,{className:P("h-5 w-5 flex-shrink-0",C&&"text-primary"),strokeWidth:2,fill:"none"}),e.jsx("span",{className:P("text-sm font-medium whitespace-nowrap transition-all duration-300",C&&"font-semibold",r?"opacity-100 max-w-[200px]":"opacity-100 max-w-[200px] lg:opacity-0 lg:max-w-0 lg:overflow-hidden"),children:E.label})]})]});return e.jsx("li",{className:"relative",children:e.jsxs(Wv,{children:[e.jsx(eN,{asChild:!0,children:e.jsx(Kn,{to:E.path,"data-tour":E.tourId,className:P("relative flex items-center rounded-lg py-2 transition-all duration-300","hover:bg-accent hover:text-accent-foreground",C?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground",r?"px-3":"px-3 lg:px-0 lg:justify-center lg:w-12 lg:mx-auto"),onClick:()=>m(!1),children:H})}),p&&e.jsx(Tx,{side:"right",className:"hidden lg:block",children:e.jsx("p",{children:E.label})})]})},E.path)})})]},S.title))})})})]}),d&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 lg:hidden",onClick:()=>m(!1)}),e.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[e.jsx(cT,{}),e.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-card/80 backdrop-blur-md px-4 sticky top-0 z-10",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:()=>m(!d),className:"rounded-lg p-2 hover:bg-accent lg:hidden",children:e.jsx(l1,{className:"h-5 w-5"})}),e.jsx("button",{onClick:()=>c(!r),className:"hidden rounded-lg p-2 hover:bg-accent lg:block",title:r?"收起侧边栏":"展开侧边栏",children:e.jsx(Pa,{className:P("h-5 w-5 transition-transform",!r&&"rotate-180")})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Kn,{to:"/annual-report",children:e.jsxs(_,{variant:"ghost",size:"sm",className:"gap-2 bg-gradient-to-r from-pink-500/10 to-purple-500/10 hover:from-pink-500/20 hover:to-purple-500/20 border border-pink-500/20",title:"查看年度总结",children:[e.jsx(n1,{className:"h-4 w-4 text-pink-500"}),e.jsx("span",{className:"hidden sm:inline bg-gradient-to-r from-pink-500 to-purple-500 bg-clip-text text-transparent font-medium",children:"2025 年度总结"})]})}),e.jsxs("button",{onClick:()=>f(!0),className:"relative hidden md:flex items-center w-64 h-9 pl-9 pr-16 bg-background/50 border rounded-md hover:bg-accent/50 transition-colors text-left",children:[e.jsx($t,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"搜索..."}),e.jsxs($b,{size:"sm",className:"absolute right-2 top-1/2 -translate-y-1/2",children:[e.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),e.jsx(iT,{open:h,onOpenChange:f}),e.jsxs(_,{variant:"ghost",size:"sm",onClick:()=>window.open("https://docs.mai-mai.org","_blank"),className:"gap-2",title:"查看麦麦文档",children:[e.jsx(r1,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"麦麦文档"})]}),e.jsx("button",{onClick:S=>{h2(z==="dark"?"light":"dark",j,S)},className:"rounded-lg p-2 hover:bg-accent",title:z==="dark"?"切换到浅色模式":"切换到深色模式",children:z==="dark"?e.jsx(ix,{className:"h-5 w-5"}):e.jsx(tc,{className:"h-5 w-5"})}),e.jsx("div",{className:"h-6 w-px bg-border"}),e.jsxs(_,{variant:"ghost",size:"sm",onClick:M,className:"gap-2",title:"登出系统",children:[e.jsx(i1,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"登出"})]})]})]}),e.jsx("main",{className:"flex-1 overflow-hidden bg-background",children:a}),e.jsx(oT,{})]})]})})}function uT(a){const l=a.split(` `).slice(1),r=[];for(const c of l){const d=c.trim();if(!d.startsWith("at "))continue;const m=d.match(/at\s+(?:(.+?)\s+\()?(.+?):(\d+):(\d+)\)?$/);m?r.push({functionName:m[1]||"",fileName:m[2],lineNumber:m[3],columnNumber:m[4],raw:d}):r.push({functionName:"",fileName:"",lineNumber:"",columnNumber:"",raw:d})}return r}function mT({error:a,errorInfo:l}){const[r,c]=u.useState(!0),[d,m]=u.useState(!1),[h,f]=u.useState(!1),p=a.stack?uT(a.stack):[],g=async()=>{const N=` Error: ${a.name} Message: ${a.message} @@ -91,4 +91,4 @@ ${l?.componentStack||"No component stack available"} URL: ${window.location.href} User Agent: ${navigator.userAgent} Time: ${new Date().toISOString()} - `.trim();try{await navigator.clipboard.writeText(N),f(!0),setTimeout(()=>f(!1),2e3)}catch(j){console.error("Failed to copy:",j)}};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{variant:"destructive",className:"border-red-500/50 bg-red-500/10",children:[e.jsx(Lt,{className:"h-4 w-4"}),e.jsxs(ft,{className:"font-mono text-sm",children:[e.jsxs("span",{className:"font-semibold",children:[a.name,":"]})," ",a.message]})]}),p.length>0&&e.jsxs(xc,{open:r,onOpenChange:c,children:[e.jsx(hc,{asChild:!0,children:e.jsxs(_,{variant:"ghost",className:"w-full justify-between p-3 h-auto",children:[e.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[e.jsx(c_,{className:"h-4 w-4"}),"Stack Trace (",p.length," frames)"]}),r?e.jsx(Xr,{className:"h-4 w-4"}):e.jsx(Ba,{className:"h-4 w-4"})]})}),e.jsx(fc,{children:e.jsx(ts,{className:"h-[280px] rounded-md border bg-muted/30",children:e.jsx("div",{className:"p-3 space-y-1",children:p.map((N,j)=>e.jsx("div",{className:"font-mono text-xs p-2 rounded hover:bg-muted/50 transition-colors",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"text-muted-foreground w-6 text-right flex-shrink-0",children:[j+1,"."]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"text-primary font-medium",children:N.functionName}),N.fileName&&e.jsxs("div",{className:"text-muted-foreground mt-0.5 break-all",children:[N.fileName,N.lineNumber&&e.jsxs("span",{className:"text-yellow-600 dark:text-yellow-400",children:[":",N.lineNumber,":",N.columnNumber]})]})]})]})},j))})})})]}),l?.componentStack&&e.jsxs(xc,{open:d,onOpenChange:m,children:[e.jsx(hc,{asChild:!0,children:e.jsxs(_,{variant:"ghost",className:"w-full justify-between p-3 h-auto",children:[e.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[e.jsx(Lt,{className:"h-4 w-4"}),"Component Stack"]}),d?e.jsx(Xr,{className:"h-4 w-4"}):e.jsx(Ba,{className:"h-4 w-4"})]})}),e.jsx(fc,{children:e.jsx(ts,{className:"h-[200px] rounded-md border bg-muted/30",children:e.jsx("pre",{className:"p-3 font-mono text-xs whitespace-pre-wrap text-muted-foreground",children:l.componentStack})})})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:g,className:"w-full",children:h?e.jsxs(e.Fragment,{children:[e.jsx(Ot,{className:"mr-2 h-4 w-4 text-green-500"}),"已复制到剪贴板"]}):e.jsxs(e.Fragment,{children:[e.jsx(qo,{className:"mr-2 h-4 w-4"}),"复制错误信息"]})})]})}function Bb({error:a,errorInfo:l}){const r=()=>{window.location.href="/"},c=()=>{window.location.reload()};return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:e.jsxs(Te,{className:"w-full max-w-2xl shadow-lg",children:[e.jsxs(Oe,{className:"text-center pb-2",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30 mb-4",children:e.jsx(Lt,{className:"h-8 w-8 text-red-600 dark:text-red-400"})}),e.jsx(Ue,{className:"text-2xl font-bold",children:"页面出现了问题"}),e.jsx(Ns,{className:"text-base mt-2",children:"应用程序遇到了意外错误。您可以尝试刷新页面或返回首页。"})]}),e.jsxs(ze,{className:"space-y-4",children:[e.jsx(mT,{error:a,errorInfo:l}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 pt-2",children:[e.jsxs(_,{onClick:c,className:"flex-1",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),"刷新页面"]}),e.jsxs(_,{onClick:r,variant:"outline",className:"flex-1",children:[e.jsx(id,{className:"mr-2 h-4 w-4"}),"返回首页"]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground pt-2",children:"如果问题持续存在,请将错误信息复制并反馈给开发者"})]})]})})}class xT extends u.Component{constructor(l){super(l),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(l){return{hasError:!0,error:l}}componentDidCatch(l,r){console.error("ErrorBoundary caught an error:",l,r),this.setState({errorInfo:r})}handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null})};render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback:e.jsx(Bb,{error:this.state.error,errorInfo:this.state.errorInfo}):this.props.children}}function Ib({error:a}){return e.jsx(Bb,{error:a,errorInfo:null})}const bc=rw({component:()=>e.jsxs(e.Fragment,{children:[e.jsx(xj,{}),!1]}),beforeLoad:()=>{if(window.location.pathname==="/"&&!lT())throw cw({to:"/auth"})}}),hT=lt({getParentRoute:()=>bc,path:"/auth",component:O2}),fT=lt({getParentRoute:()=>bc,path:"/setup",component:X2}),Nt=lt({getParentRoute:()=>bc,id:"protected",component:()=>e.jsx(dT,{children:e.jsx(xj,{})}),errorComponent:({error:a})=>e.jsx(Ib,{error:a})}),pT=lt({getParentRoute:()=>Nt,path:"/",component:d2}),gT=lt({getParentRoute:()=>Nt,path:"/config/bot",component:YS}),jT=lt({getParentRoute:()=>Nt,path:"/config/modelProvider",component:i4}),vT=lt({getParentRoute:()=>Nt,path:"/config/model",component:z4}),NT=lt({getParentRoute:()=>Nt,path:"/config/adapter",component:L4}),bT=lt({getParentRoute:()=>Nt,path:"/resource/emoji",component:nk}),yT=lt({getParentRoute:()=>Nt,path:"/resource/expression",component:ok}),wT=lt({getParentRoute:()=>Nt,path:"/resource/person",component:Rk}),_T=lt({getParentRoute:()=>Nt,path:"/resource/jargon",component:wk}),ST=lt({getParentRoute:()=>Nt,path:"/resource/knowledge-graph",component:Fk}),kT=lt({getParentRoute:()=>Nt,path:"/resource/knowledge-base",component:Hk}),CT=lt({getParentRoute:()=>Nt,path:"/logs",component:Vk}),TT=lt({getParentRoute:()=>Nt,path:"/planner-monitor",component:eC}),ET=lt({getParentRoute:()=>Nt,path:"/chat",component:BC}),MT=lt({getParentRoute:()=>Nt,path:"/plugins",component:NC}),AT=lt({getParentRoute:()=>Nt,path:"/plugin-detail",component:MC}),zT=lt({getParentRoute:()=>Nt,path:"/model-presets",component:yC}),RT=lt({getParentRoute:()=>Nt,path:"/plugin-config",component:SC}),DT=lt({getParentRoute:()=>Nt,path:"/plugin-mirrors",component:CC}),OT=lt({getParentRoute:()=>Nt,path:"/settings",component:T2}),LT=lt({getParentRoute:()=>Nt,path:"/config/pack-market",component:$5}),Pb=lt({getParentRoute:()=>Nt,path:"/config/pack-market/$packId",component:eT}),UT=lt({getParentRoute:()=>Nt,path:"/survey/webui-feedback",component:s3}),$T=lt({getParentRoute:()=>Nt,path:"/survey/maibot-feedback",component:t3}),BT=lt({getParentRoute:()=>Nt,path:"/annual-report",component:c5}),IT=lt({getParentRoute:()=>bc,path:"*",component:Kv}),PT=bc.addChildren([hT,fT,Nt.addChildren([pT,gT,jT,vT,NT,bT,yT,_T,wT,ST,kT,MT,AT,zT,RT,DT,CT,TT,ET,OT,LT,Pb,UT,$T,BT]),IT]),FT=iw({routeTree:PT,defaultNotFoundComponent:Kv,defaultErrorComponent:({error:a})=>e.jsx(Ib,{error:a})});function HT({children:a,defaultTheme:l="system",storageKey:r="ui-theme",...c}){const[d,m]=u.useState(()=>localStorage.getItem(r)||l);u.useEffect(()=>{const f=window.document.documentElement;if(f.classList.remove("light","dark"),d==="system"){const p=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";f.classList.add(p);return}f.classList.add(d)},[d]),u.useEffect(()=>{const f=localStorage.getItem("accent-color");if(f){const p=document.documentElement,N={blue:{hsl:"221.2 83.2% 53.3%",darkHsl:"217.2 91.2% 59.8%",gradient:null},purple:{hsl:"271 91% 65%",darkHsl:"270 95% 75%",gradient:null},green:{hsl:"142 71% 45%",darkHsl:"142 76% 36%",gradient:null},orange:{hsl:"25 95% 53%",darkHsl:"20 90% 48%",gradient:null},pink:{hsl:"330 81% 60%",darkHsl:"330 85% 70%",gradient:null},red:{hsl:"0 84% 60%",darkHsl:"0 90% 70%",gradient:null},"gradient-sunset":{hsl:"15 95% 60%",darkHsl:"15 95% 65%",gradient:"linear-gradient(135deg, hsl(25 95% 53%) 0%, hsl(330 81% 60%) 100%)"},"gradient-ocean":{hsl:"200 90% 55%",darkHsl:"200 90% 60%",gradient:"linear-gradient(135deg, hsl(221.2 83.2% 53.3%) 0%, hsl(189 94% 43%) 100%)"},"gradient-forest":{hsl:"150 70% 45%",darkHsl:"150 75% 40%",gradient:"linear-gradient(135deg, hsl(142 71% 45%) 0%, hsl(158 64% 52%) 100%)"},"gradient-aurora":{hsl:"310 85% 65%",darkHsl:"310 90% 70%",gradient:"linear-gradient(135deg, hsl(271 91% 65%) 0%, hsl(330 81% 60%) 100%)"},"gradient-fire":{hsl:"15 95% 55%",darkHsl:"15 95% 60%",gradient:"linear-gradient(135deg, hsl(0 84% 60%) 0%, hsl(25 95% 53%) 100%)"},"gradient-twilight":{hsl:"250 90% 60%",darkHsl:"250 95% 65%",gradient:"linear-gradient(135deg, hsl(239 84% 67%) 0%, hsl(271 91% 65%) 100%)"}}[f];N&&(p.style.setProperty("--primary",N.hsl),N.gradient?(p.style.setProperty("--primary-gradient",N.gradient),p.classList.add("has-gradient")):(p.style.removeProperty("--primary-gradient"),p.classList.remove("has-gradient")))}},[]);const h={theme:d,setTheme:f=>{localStorage.setItem(r,f),m(f)}};return e.jsx(Fv.Provider,{...c,value:h,children:a})}function qT({children:a,defaultEnabled:l=!0,defaultWavesEnabled:r=!0,storageKey:c="enable-animations",wavesStorageKey:d="enable-waves-background"}){const[m,h]=u.useState(()=>{const N=localStorage.getItem(c);return N!==null?N==="true":l}),[f,p]=u.useState(()=>{const N=localStorage.getItem(d);return N!==null?N==="true":r});u.useEffect(()=>{const N=document.documentElement;m?N.classList.remove("no-animations"):N.classList.add("no-animations"),localStorage.setItem(c,String(m))},[m,c]),u.useEffect(()=>{localStorage.setItem(d,String(f))},[f,d]);const g={enableAnimations:m,setEnableAnimations:h,enableWavesBackground:f,setEnableWavesBackground:p};return e.jsx(Hv.Provider,{value:g,children:a})}function VT(a){const[l,r]=u.useState(()=>typeof window<"u"?window.matchMedia(a).matches:!1);return u.useEffect(()=>{if(typeof window>"u")return;const c=window.matchMedia(a),d=m=>{r(m.matches)};return r(c.matches),c.addEventListener("change",d),()=>{c.removeEventListener("change",d)}},[a]),l}function Bx(){return VT("(max-width: 768px)")}const GT=k1,Fb=u.forwardRef(({className:a,...l},r)=>{const c=Bx();return e.jsx(ev,{ref:r,className:P("fixed z-[100] flex max-h-screen w-full gap-2 p-4",c?"top-0 left-0 right-0 flex-col items-center":"bottom-0 right-0 flex-col-reverse sm:max-w-[420px]",a),...l})});Fb.displayName=ev.displayName;const KT=ti("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all",{variants:{variant:{default:"border bg-primary/5 text-foreground backdrop-blur-sm",destructive:"destructive group border-destructive bg-destructive/10 text-destructive-foreground backdrop-blur-sm"},position:{desktop:"data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-slide-in-from-right data-[state=open]:animate-fade-in data-[state=closed]:animate-slide-out-to-right data-[state=closed]:animate-fade-out data-[swipe=end]:animate-slide-out-to-right",mobile:"data-[swipe=cancel]:translate-y-0 data-[swipe=end]:translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:transition-none data-[state=open]:animate-slide-in-from-top data-[state=open]:animate-fade-in data-[state=closed]:animate-slide-out-to-top data-[state=closed]:animate-fade-out data-[swipe=end]:animate-slide-out-to-top"}},defaultVariants:{variant:"default",position:"desktop"}}),Hb=u.forwardRef(({className:a,variant:l,...r},c)=>{const m=Bx()?"mobile":"desktop";return e.jsx(sv,{ref:c,className:P(KT({variant:l,position:m}),a),...r})});Hb.displayName=sv.displayName;const QT=u.forwardRef(({className:a,...l},r)=>e.jsx(tv,{ref:r,className:P("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",a),...l}));QT.displayName=tv.displayName;const qb=u.forwardRef(({className:a,...l},r)=>e.jsx(av,{ref:r,className:P("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",a),"toast-close":"",...l,children:e.jsx(Sa,{className:"h-4 w-4"})}));qb.displayName=av.displayName;const Vb=u.forwardRef(({className:a,...l},r)=>e.jsx(lv,{ref:r,className:P("text-sm font-semibold [&+div]:text-xs",a),...l}));Vb.displayName=lv.displayName;const Gb=u.forwardRef(({className:a,...l},r)=>e.jsx(nv,{ref:r,className:P("text-sm opacity-90",a),...l}));Gb.displayName=nv.displayName;function YT(){const{toasts:a}=nt(),l=Bx();return e.jsxs(GT,{swipeDirection:l?"up":"right",children:[a.map(function({id:r,title:c,description:d,action:m,...h}){return e.jsxs(Hb,{...h,children:[e.jsxs("div",{className:"grid gap-1",children:[c&&e.jsx(Vb,{children:c}),d&&e.jsx(Gb,{children:d})]}),m,e.jsx(qb,{})]},r)}),e.jsx(Fb,{})]})}$_.createRoot(document.getElementById("root")).render(e.jsx(u.StrictMode,{children:e.jsx(xT,{children:e.jsx(HT,{defaultTheme:"system",children:e.jsx(qT,{children:e.jsxs(s4,{children:[e.jsx(ow,{router:FT}),e.jsx(l4,{}),e.jsx(YT,{})]})})})})})); + `.trim();try{await navigator.clipboard.writeText(N),f(!0),setTimeout(()=>f(!1),2e3)}catch(j){console.error("Failed to copy:",j)}};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs(ht,{variant:"destructive",className:"border-red-500/50 bg-red-500/10",children:[e.jsx(Lt,{className:"h-4 w-4"}),e.jsxs(ft,{className:"font-mono text-sm",children:[e.jsxs("span",{className:"font-semibold",children:[a.name,":"]})," ",a.message]})]}),p.length>0&&e.jsxs(xc,{open:r,onOpenChange:c,children:[e.jsx(hc,{asChild:!0,children:e.jsxs(_,{variant:"ghost",className:"w-full justify-between p-3 h-auto",children:[e.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[e.jsx(c1,{className:"h-4 w-4"}),"Stack Trace (",p.length," frames)"]}),r?e.jsx(Xr,{className:"h-4 w-4"}):e.jsx(Ia,{className:"h-4 w-4"})]})}),e.jsx(fc,{children:e.jsx(ts,{className:"h-[280px] rounded-md border bg-muted/30",children:e.jsx("div",{className:"p-3 space-y-1",children:p.map((N,j)=>e.jsx("div",{className:"font-mono text-xs p-2 rounded hover:bg-muted/50 transition-colors",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"text-muted-foreground w-6 text-right flex-shrink-0",children:[j+1,"."]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"text-primary font-medium",children:N.functionName}),N.fileName&&e.jsxs("div",{className:"text-muted-foreground mt-0.5 break-all",children:[N.fileName,N.lineNumber&&e.jsxs("span",{className:"text-yellow-600 dark:text-yellow-400",children:[":",N.lineNumber,":",N.columnNumber]})]})]})]})},j))})})})]}),l?.componentStack&&e.jsxs(xc,{open:d,onOpenChange:m,children:[e.jsx(hc,{asChild:!0,children:e.jsxs(_,{variant:"ghost",className:"w-full justify-between p-3 h-auto",children:[e.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[e.jsx(Lt,{className:"h-4 w-4"}),"Component Stack"]}),d?e.jsx(Xr,{className:"h-4 w-4"}):e.jsx(Ia,{className:"h-4 w-4"})]})}),e.jsx(fc,{children:e.jsx(ts,{className:"h-[200px] rounded-md border bg-muted/30",children:e.jsx("pre",{className:"p-3 font-mono text-xs whitespace-pre-wrap text-muted-foreground",children:l.componentStack})})})]}),e.jsx(_,{variant:"outline",size:"sm",onClick:g,className:"w-full",children:h?e.jsxs(e.Fragment,{children:[e.jsx(Ot,{className:"mr-2 h-4 w-4 text-green-500"}),"已复制到剪贴板"]}):e.jsxs(e.Fragment,{children:[e.jsx(qo,{className:"mr-2 h-4 w-4"}),"复制错误信息"]})})]})}function Ib({error:a,errorInfo:l}){const r=()=>{window.location.href="/"},c=()=>{window.location.reload()};return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:e.jsxs(Te,{className:"w-full max-w-2xl shadow-lg",children:[e.jsxs(Oe,{className:"text-center pb-2",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30 mb-4",children:e.jsx(Lt,{className:"h-8 w-8 text-red-600 dark:text-red-400"})}),e.jsx(Ue,{className:"text-2xl font-bold",children:"页面出现了问题"}),e.jsx(Ns,{className:"text-base mt-2",children:"应用程序遇到了意外错误。您可以尝试刷新页面或返回首页。"})]}),e.jsxs(ze,{className:"space-y-4",children:[e.jsx(mT,{error:a,errorInfo:l}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 pt-2",children:[e.jsxs(_,{onClick:c,className:"flex-1",children:[e.jsx(dt,{className:"mr-2 h-4 w-4"}),"刷新页面"]}),e.jsxs(_,{onClick:r,variant:"outline",className:"flex-1",children:[e.jsx(id,{className:"mr-2 h-4 w-4"}),"返回首页"]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground pt-2",children:"如果问题持续存在,请将错误信息复制并反馈给开发者"})]})]})})}class xT extends u.Component{constructor(l){super(l),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(l){return{hasError:!0,error:l}}componentDidCatch(l,r){console.error("ErrorBoundary caught an error:",l,r),this.setState({errorInfo:r})}handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null})};render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback:e.jsx(Ib,{error:this.state.error,errorInfo:this.state.errorInfo}):this.props.children}}function Bb({error:a}){return e.jsx(Ib,{error:a,errorInfo:null})}const bc=rw({component:()=>e.jsxs(e.Fragment,{children:[e.jsx(xj,{}),!1]}),beforeLoad:()=>{if(window.location.pathname==="/"&&!lT())throw cw({to:"/auth"})}}),hT=lt({getParentRoute:()=>bc,path:"/auth",component:O2}),fT=lt({getParentRoute:()=>bc,path:"/setup",component:X2}),Nt=lt({getParentRoute:()=>bc,id:"protected",component:()=>e.jsx(dT,{children:e.jsx(xj,{})}),errorComponent:({error:a})=>e.jsx(Bb,{error:a})}),pT=lt({getParentRoute:()=>Nt,path:"/",component:d2}),gT=lt({getParentRoute:()=>Nt,path:"/config/bot",component:YS}),jT=lt({getParentRoute:()=>Nt,path:"/config/modelProvider",component:i4}),vT=lt({getParentRoute:()=>Nt,path:"/config/model",component:z4}),NT=lt({getParentRoute:()=>Nt,path:"/config/adapter",component:L4}),bT=lt({getParentRoute:()=>Nt,path:"/resource/emoji",component:nk}),yT=lt({getParentRoute:()=>Nt,path:"/resource/expression",component:ok}),wT=lt({getParentRoute:()=>Nt,path:"/resource/person",component:Rk}),_T=lt({getParentRoute:()=>Nt,path:"/resource/jargon",component:wk}),ST=lt({getParentRoute:()=>Nt,path:"/resource/knowledge-graph",component:Fk}),kT=lt({getParentRoute:()=>Nt,path:"/resource/knowledge-base",component:Hk}),CT=lt({getParentRoute:()=>Nt,path:"/logs",component:Vk}),TT=lt({getParentRoute:()=>Nt,path:"/planner-monitor",component:eC}),ET=lt({getParentRoute:()=>Nt,path:"/chat",component:IC}),MT=lt({getParentRoute:()=>Nt,path:"/plugins",component:NC}),AT=lt({getParentRoute:()=>Nt,path:"/plugin-detail",component:MC}),zT=lt({getParentRoute:()=>Nt,path:"/model-presets",component:yC}),RT=lt({getParentRoute:()=>Nt,path:"/plugin-config",component:SC}),DT=lt({getParentRoute:()=>Nt,path:"/plugin-mirrors",component:CC}),OT=lt({getParentRoute:()=>Nt,path:"/settings",component:T2}),LT=lt({getParentRoute:()=>Nt,path:"/config/pack-market",component:$5}),Pb=lt({getParentRoute:()=>Nt,path:"/config/pack-market/$packId",component:eT}),UT=lt({getParentRoute:()=>Nt,path:"/survey/webui-feedback",component:s3}),$T=lt({getParentRoute:()=>Nt,path:"/survey/maibot-feedback",component:t3}),IT=lt({getParentRoute:()=>Nt,path:"/annual-report",component:c5}),BT=lt({getParentRoute:()=>bc,path:"*",component:Kv}),PT=bc.addChildren([hT,fT,Nt.addChildren([pT,gT,jT,vT,NT,bT,yT,_T,wT,ST,kT,MT,AT,zT,RT,DT,CT,TT,ET,OT,LT,Pb,UT,$T,IT]),BT]),FT=iw({routeTree:PT,defaultNotFoundComponent:Kv,defaultErrorComponent:({error:a})=>e.jsx(Bb,{error:a})});function HT({children:a,defaultTheme:l="system",storageKey:r="ui-theme",...c}){const[d,m]=u.useState(()=>localStorage.getItem(r)||l);u.useEffect(()=>{const f=window.document.documentElement;if(f.classList.remove("light","dark"),d==="system"){const p=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";f.classList.add(p);return}f.classList.add(d)},[d]),u.useEffect(()=>{const f=localStorage.getItem("accent-color");if(f){const p=document.documentElement,N={blue:{hsl:"221.2 83.2% 53.3%",darkHsl:"217.2 91.2% 59.8%",gradient:null},purple:{hsl:"271 91% 65%",darkHsl:"270 95% 75%",gradient:null},green:{hsl:"142 71% 45%",darkHsl:"142 76% 36%",gradient:null},orange:{hsl:"25 95% 53%",darkHsl:"20 90% 48%",gradient:null},pink:{hsl:"330 81% 60%",darkHsl:"330 85% 70%",gradient:null},red:{hsl:"0 84% 60%",darkHsl:"0 90% 70%",gradient:null},"gradient-sunset":{hsl:"15 95% 60%",darkHsl:"15 95% 65%",gradient:"linear-gradient(135deg, hsl(25 95% 53%) 0%, hsl(330 81% 60%) 100%)"},"gradient-ocean":{hsl:"200 90% 55%",darkHsl:"200 90% 60%",gradient:"linear-gradient(135deg, hsl(221.2 83.2% 53.3%) 0%, hsl(189 94% 43%) 100%)"},"gradient-forest":{hsl:"150 70% 45%",darkHsl:"150 75% 40%",gradient:"linear-gradient(135deg, hsl(142 71% 45%) 0%, hsl(158 64% 52%) 100%)"},"gradient-aurora":{hsl:"310 85% 65%",darkHsl:"310 90% 70%",gradient:"linear-gradient(135deg, hsl(271 91% 65%) 0%, hsl(330 81% 60%) 100%)"},"gradient-fire":{hsl:"15 95% 55%",darkHsl:"15 95% 60%",gradient:"linear-gradient(135deg, hsl(0 84% 60%) 0%, hsl(25 95% 53%) 100%)"},"gradient-twilight":{hsl:"250 90% 60%",darkHsl:"250 95% 65%",gradient:"linear-gradient(135deg, hsl(239 84% 67%) 0%, hsl(271 91% 65%) 100%)"}}[f];N&&(p.style.setProperty("--primary",N.hsl),N.gradient?(p.style.setProperty("--primary-gradient",N.gradient),p.classList.add("has-gradient")):(p.style.removeProperty("--primary-gradient"),p.classList.remove("has-gradient")))}},[]);const h={theme:d,setTheme:f=>{localStorage.setItem(r,f),m(f)}};return e.jsx(Fv.Provider,{...c,value:h,children:a})}function qT({children:a,defaultEnabled:l=!0,defaultWavesEnabled:r=!0,storageKey:c="enable-animations",wavesStorageKey:d="enable-waves-background"}){const[m,h]=u.useState(()=>{const N=localStorage.getItem(c);return N!==null?N==="true":l}),[f,p]=u.useState(()=>{const N=localStorage.getItem(d);return N!==null?N==="true":r});u.useEffect(()=>{const N=document.documentElement;m?N.classList.remove("no-animations"):N.classList.add("no-animations"),localStorage.setItem(c,String(m))},[m,c]),u.useEffect(()=>{localStorage.setItem(d,String(f))},[f,d]);const g={enableAnimations:m,setEnableAnimations:h,enableWavesBackground:f,setEnableWavesBackground:p};return e.jsx(Hv.Provider,{value:g,children:a})}function VT(a){const[l,r]=u.useState(()=>typeof window<"u"?window.matchMedia(a).matches:!1);return u.useEffect(()=>{if(typeof window>"u")return;const c=window.matchMedia(a),d=m=>{r(m.matches)};return r(c.matches),c.addEventListener("change",d),()=>{c.removeEventListener("change",d)}},[a]),l}function Ix(){return VT("(max-width: 768px)")}const GT=k_,Fb=u.forwardRef(({className:a,...l},r)=>{const c=Ix();return e.jsx(ev,{ref:r,className:P("fixed z-[100] flex max-h-screen w-full gap-2 p-4",c?"top-0 left-0 right-0 flex-col items-center":"bottom-0 right-0 flex-col-reverse sm:max-w-[420px]",a),...l})});Fb.displayName=ev.displayName;const KT=ti("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all",{variants:{variant:{default:"border bg-primary/5 text-foreground backdrop-blur-sm",destructive:"destructive group border-destructive bg-destructive/10 text-destructive-foreground backdrop-blur-sm"},position:{desktop:"data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-slide-in-from-right data-[state=open]:animate-fade-in data-[state=closed]:animate-slide-out-to-right data-[state=closed]:animate-fade-out data-[swipe=end]:animate-slide-out-to-right",mobile:"data-[swipe=cancel]:translate-y-0 data-[swipe=end]:translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:transition-none data-[state=open]:animate-slide-in-from-top data-[state=open]:animate-fade-in data-[state=closed]:animate-slide-out-to-top data-[state=closed]:animate-fade-out data-[swipe=end]:animate-slide-out-to-top"}},defaultVariants:{variant:"default",position:"desktop"}}),Hb=u.forwardRef(({className:a,variant:l,...r},c)=>{const m=Ix()?"mobile":"desktop";return e.jsx(sv,{ref:c,className:P(KT({variant:l,position:m}),a),...r})});Hb.displayName=sv.displayName;const QT=u.forwardRef(({className:a,...l},r)=>e.jsx(tv,{ref:r,className:P("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",a),...l}));QT.displayName=tv.displayName;const qb=u.forwardRef(({className:a,...l},r)=>e.jsx(av,{ref:r,className:P("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",a),"toast-close":"",...l,children:e.jsx(Sa,{className:"h-4 w-4"})}));qb.displayName=av.displayName;const Vb=u.forwardRef(({className:a,...l},r)=>e.jsx(lv,{ref:r,className:P("text-sm font-semibold [&+div]:text-xs",a),...l}));Vb.displayName=lv.displayName;const Gb=u.forwardRef(({className:a,...l},r)=>e.jsx(nv,{ref:r,className:P("text-sm opacity-90",a),...l}));Gb.displayName=nv.displayName;function YT(){const{toasts:a}=nt(),l=Ix();return e.jsxs(GT,{swipeDirection:l?"up":"right",children:[a.map(function({id:r,title:c,description:d,action:m,...h}){return e.jsxs(Hb,{...h,children:[e.jsxs("div",{className:"grid gap-1",children:[c&&e.jsx(Vb,{children:c}),d&&e.jsx(Gb,{children:d})]}),m,e.jsx(qb,{})]},r)}),e.jsx(Fb,{})]})}$1.createRoot(document.getElementById("root")).render(e.jsx(u.StrictMode,{children:e.jsx(xT,{children:e.jsx(HT,{defaultTheme:"system",children:e.jsx(qT,{children:e.jsxs(s4,{children:[e.jsx(ow,{router:FT}),e.jsx(l4,{}),e.jsx(YT,{})]})})})})})); diff --git a/webui/dist/assets/index-DkXVyv8m.css b/webui/dist/assets/index-DkXVyv8m.css new file mode 100644 index 00000000..bd22771f --- /dev/null +++ b/webui/dist/assets/index-DkXVyv8m.css @@ -0,0 +1 @@ +@charset "UTF-8";*,: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:#e5e7eb}: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:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";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:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}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}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 221.2 83.2% 53.3%;--primary-foreground: 210 40% 98%;--primary-gradient: none;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 221.2 83.2% 53.3%;--radius: .5rem;--chart-1: 221.2 83.2% 53.3%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 217.2 91.2% 59.8%;--primary-foreground: 210 40% 98%;--primary-gradient: none;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 224.3 76.3% 48%;--chart-1: 217.2 91.2% 59.8%;--chart-2: 160 60% 50%;--chart-3: 30 80% 60%;--chart-4: 280 65% 65%;--chart-5: 340 75% 60%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-16{inset:4rem}.inset-8{inset:2rem}.inset-x-0{left:0;right:0}.inset-x-4{left:1rem;right:1rem}.inset-y-0{top:0;bottom:0}.-bottom-20{bottom:-5rem}.-left-20{left:-5rem}.-right-2{right:-.5rem}.-right-20{right:-5rem}.-top-2{top:-.5rem}.-top-20{top:-5rem}.bottom-0{bottom:0}.bottom-1\/4{bottom:25%}.bottom-24{bottom:6rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-1\/4{left:25%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-1\/3{right:33.333333%}.right-1\/4{right:25%}.right-2{right:.5rem}.right-4{right:1rem}.right-8{right:2rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-1\/2{top:50%}.top-1\/4{top:25%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-3\/4{top:75%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.order-1{order:1}.order-2{order:2}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[1px\]{margin-bottom:1px}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-10{margin-left:2.5rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.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-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:16 / 9}.size-4{width:1rem;height:1rem}.size-\[--cell-size\]{width:var(--cell-size);height:var(--cell-size)}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[--cell-size\]{height:var(--cell-size)}.h-\[1\.25rem\]{height:1.25rem}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[250px\]{height:250px}.h-\[280px\]{height:280px}.h-\[2px\]{height:2px}.h-\[300px\]{height:300px}.h-\[350px\]{height:350px}.h-\[400px\]{height:400px}.h-\[600px\]{height:600px}.h-\[70vh\]{height:70vh}.h-\[90vh\]{height:90vh}.h-\[calc\(100vh-12rem\)\]{height:calc(100vh - 12rem)}.h-\[calc\(100vh-200px\)\]{height:calc(100vh - 200px)}.h-\[calc\(100vh-240px\)\]{height:calc(100vh - 240px)}.h-\[calc\(100vh-260px\)\]{height:calc(100vh - 260px)}.h-\[calc\(100vh-4rem\)\]{height:calc(100vh - 4rem)}.h-\[calc\(85vh-220px\)\]{height:calc(85vh - 220px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-64{max-height:16rem}.max-h-\[--radix-context-menu-content-available-height\]{max-height:var(--radix-context-menu-content-available-height)}.max-h-\[--radix-select-content-available-height\]{max-height:var(--radix-select-content-available-height)}.max-h-\[200px\]{max-height:200px}.max-h-\[300px\]{max-height:300px}.max-h-\[60vh\]{max-height:60vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(90vh-120px\)\]{max-height:calc(90vh - 120px)}.max-h-\[calc\(90vh-8rem\)\]{max-height:calc(90vh - 8rem)}.max-h-full{max-height:100%}.max-h-none{max-height:none}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-\[100px\]{min-height:100px}.min-h-\[300px\]{min-height:300px}.min-h-\[400px\]{min-height:400px}.min-h-\[40px\]{min-height:40px}.min-h-\[60px\]{min-height:60px}.min-h-\[xxx\]{min-height:xxx}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[--cell-size\]{width:var(--cell-size)}.w-\[100px\]{width:100px}.w-\[120px\]{width:120px}.w-\[130px\]{width:130px}.w-\[140px\]{width:140px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[600px\]{width:600px}.w-\[65px\]{width:65px}.w-\[70px\]{width:70px}.w-\[95vw\]{width:95vw}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[--cell-size\]{min-width:var(--cell-size)}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-\[80px\]{min-width:80px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.max-w-24{max-width:6rem}.max-w-2xl{max-width:42rem}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-\[100px\]{max-width:100px}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[60px\]{max-width:60px}.max-w-\[75\%\]{max-width:75%}.max-w-\[90\%\]{max-width:90%}.max-w-\[95vw\]{max-width:95vw}.max-w-\[var\(--max-width\)\]{max-width:var(--max-width)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.origin-\[--radix-context-menu-content-transform-origin\]{transform-origin:var(--radix-context-menu-content-transform-origin)}.origin-\[--radix-popover-content-transform-origin\]{transform-origin:var(--radix-popover-content-transform-origin)}.origin-\[--radix-select-content-transform-origin\]{transform-origin:var(--radix-select-content-transform-origin)}.origin-\[--radix-tooltip-content-transform-origin\]{transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x: -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-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-32{--tw-translate-x: 8rem;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-\[-50\%\]{--tw-translate-x: -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-y-\[-50\%\]{--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))}.-rotate-90{--tw-rotate: -90deg;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))}.scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;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))}.transform{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))}.animate-\[ping_3s_ease-in-out_infinite\]{animation:ping 3s ease-in-out infinite}.animate-\[ping_3s_ease-in-out_infinite_0\.5s\]{animation:ping 3s ease-in-out infinite .5s}.animate-\[ping_3s_ease-in-out_infinite_1s\]{animation:ping 3s ease-in-out infinite 1s}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-rows-\[auto_1fr_auto\]{grid-template-rows:auto 1fr auto}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.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-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))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.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:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-sm{border-top-right-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[1\.5px\]{border-width:1.5px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[--color-border\]{border-color:var(--color-border)}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-current{border-color:currentColor}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity, 1))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(21 128 61 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/30{border-color:hsl(var(--muted-foreground) / .3)}.border-muted-foreground\/50{border-color:hsl(var(--muted-foreground) / .5)}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-orange-500\/20{border-color:#f9731633}.border-orange-600{--tw-border-opacity: 1;border-color:rgb(234 88 12 / var(--tw-border-opacity, 1))}.border-pink-500\/20{border-color:#ec489933}.border-primary{border-color:hsl(var(--primary))}.border-primary\/10{border-color:hsl(var(--primary) / .1)}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-primary\/30{border-color:hsl(var(--primary) / .3)}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.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-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/50{border-color:#ef444480}.border-transparent{border-color:transparent}.border-white\/30{border-color:#ffffff4d}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-yellow-500\/50{border-color:#eab30880}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[--color-bg\]{background-color:var(--color-bg)}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.bg-amber-700{--tw-bg-opacity: 1;background-color:rgb(180 83 9 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/50{background-color:hsl(var(--background) / .5)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-background\/95{background-color:hsl(var(--background) / .95)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/50{background-color:#00000080}.bg-black\/80{background-color:#000c}.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-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-card\/50{background-color:hsl(var(--card) / .5)}.bg-card\/80{background-color:hsl(var(--card) / .8)}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-800\/20{background-color:#1f293733}.bg-gray-800\/30{background-color:#1f29374d}.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-500\/20{background-color:#22c55e33}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground\/50{background-color:hsl(var(--muted-foreground) / .5)}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-muted\/60{background-color:hsl(var(--muted) / .6)}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-50\/10{background-color:#fff7ed1a}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-orange-500\/10{background-color:#f973161a}.bg-orange-500\/20{background-color:#f9731633}.bg-orange-600{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(236 72 153 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground\/20{background-color:hsl(var(--primary-foreground) / .2)}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/15{background-color:hsl(var(--primary) / .15)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-primary\/60{background-color:hsl(var(--primary) / .6)}.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-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-red-900\/20{background-color:#7f1d1d33}.bg-red-900\/30{background-color:#7f1d1d4d}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/5{background-color:hsl(var(--secondary) / .05)}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-300{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/5{background-color:#eab3080d}.bg-yellow-900\/20{background-color:#713f1233}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.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)}.from-background{--tw-gradient-from: hsl(var(--background)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #22c55e var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-50{--tw-gradient-from: #eef2ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(238 242 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500{--tw-gradient-from: #f97316 var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-50{--tw-gradient-from: #fdf2f8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(253 242 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500\/10{--tw-gradient-from: rgb(236 72 153 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary\/5{--tw-gradient-from: hsl(var(--primary) / .05) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #a855f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-rose-50{--tw-gradient-from: #fff1f2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 241 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-200{--tw-gradient-from: #e2e8f0 var(--tw-gradient-from-position);--tw-gradient-to: rgb(226 232 240 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-300{--tw-gradient-from: #cbd5e1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(203 213 225 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-400{--tw-gradient-from: #94a3b8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(148 163 184 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-background{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background)) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-blue-50{--tw-gradient-to: #eff6ff var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #2563eb var(--tw-gradient-to-position)}.to-cyan-500{--tw-gradient-to: #06b6d4 var(--tw-gradient-to-position)}.to-emerald-500{--tw-gradient-to: #10b981 var(--tw-gradient-to-position)}.to-green-600{--tw-gradient-to: #16a34a var(--tw-gradient-to-position)}.to-muted\/50{--tw-gradient-to: hsl(var(--muted) / .5) var(--tw-gradient-to-position)}.to-orange-50{--tw-gradient-to: #fff7ed var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.to-pink-50{--tw-gradient-to: #fdf2f8 var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #ec4899 var(--tw-gradient-to-position)}.to-primary\/10{--tw-gradient-to: hsl(var(--primary) / .1) var(--tw-gradient-to-position)}.to-purple-50{--tw-gradient-to: #faf5ff var(--tw-gradient-to-position)}.to-purple-500{--tw-gradient-to: #a855f7 var(--tw-gradient-to-position)}.to-purple-500\/10{--tw-gradient-to: rgb(168 85 247 / .1) var(--tw-gradient-to-position)}.to-secondary\/5{--tw-gradient-to: hsl(var(--secondary) / .05) var(--tw-gradient-to-position)}.to-slate-700{--tw-gradient-to: #334155 var(--tw-gradient-to-position)}.to-slate-800{--tw-gradient-to: #1e293b var(--tw-gradient-to-position)}.to-slate-900{--tw-gradient-to: #0f172a var(--tw-gradient-to-position)}.to-violet-50{--tw-gradient-to: #f5f3ff var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-current{fill:currentColor}.fill-red-500{fill:#ef4444}.fill-yellow-400{fill:#facc15}.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-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[--cell-size\]{padding-left:var(--cell-size);padding-right:var(--cell-size)}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[150px\]{font-size:150px}.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-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.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-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-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/10{color:hsl(var(--muted-foreground) / .1)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-pink-500{--tw-text-opacity: 1;color:rgb(236 72 153 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary-foreground\/70{color:hsl(var(--primary-foreground) / .7)}.text-primary\/10{color:hsl(var(--primary) / .1)}.text-primary\/30{color:hsl(var(--primary) / .3)}.text-primary\/60{color:hsl(var(--primary) / .6)}.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-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-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(113 63 18 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.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-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px 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-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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(0px + 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-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-2{--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)}.ring-4{--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(4px + 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-border\/50{--tw-ring-color: hsl(var(--border) / .5)}.ring-orange-500\/50{--tw-ring-color: rgb(249 115 22 / .5)}.ring-primary{--tw-ring-color: hsl(var(--primary))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--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)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-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-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;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}.delay-150{transition-delay:.15s}.delay-300{transition-delay:.3s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.text-primary-gradient{color:hsl(var(--primary))}.has-gradient .text-primary-gradient{background:var(--primary-gradient);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}.\[--cell-size\:2rem\]{--cell-size: 2rem}@font-face{font-family:JetBrains Mono;src:url(/fonts/JetBrainsMono-Medium.ttf) format("truetype");font-weight:500;font-style:normal;font-display:swap}.no-animations *,.no-animations *:before,.no-animations *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}.no-animations *:hover{transition-duration:.01ms!important}::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:999}.__floater{z-index:99999!important;pointer-events:auto!important}.react-joyride__overlay,.react-joyride__spotlight{z-index:99998!important}.react-joyride__tooltip{pointer-events:auto!important}#tour-portal-container *{pointer-events:auto}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.custom-scrollbar::-webkit-scrollbar{width:8px;height:8px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent;border-radius:4px}.custom-scrollbar::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:4px;border:2px solid transparent;background-clip:content-box}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground) / .5);background-clip:content-box}.custom-scrollbar::-webkit-scrollbar-corner{background:transparent}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;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))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;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))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.hover\:border-muted-foreground\/50:hover{border-color:hsl(var(--muted-foreground) / .5)}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary) / .5)}.hover\:border-red-200:hover{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-amber-700:hover{--tw-bg-opacity: 1;background-color:rgb(180 83 9 / var(--tw-bg-opacity, 1))}.hover\:bg-background\/50:hover{background-color:hsl(var(--background) / .5)}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / 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-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted-foreground\/20:hover{background-color:hsl(var(--muted-foreground) / .2)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-orange-700:hover{--tw-bg-opacity: 1;background-color:rgb(194 65 12 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-secondary\/90:hover{background-color:hsl(var(--secondary) / .9)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-white\/30:hover{background-color:#ffffff4d}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:from-pink-500\/20:hover{--tw-gradient-from: rgb(236 72 153 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-purple-500\/20:hover{--tw-gradient-to: rgb(168 85 247 / .2) var(--tw-gradient-to-position)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-amber-900:hover{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(22 163 74 / 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-orange-700:hover{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / 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-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\:text-yellow-300:hover{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--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)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-2:hover{--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)}.hover\:ring-primary:hover{--tw-ring-color: hsl(var(--primary))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--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(0px + 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-visible\:ring-1:focus-visible{--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)}.focus-visible\:ring-2:focus-visible{--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-visible\:ring-red-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;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))}.active\:cursor-grabbing:active{cursor:grabbing}.active\:border-primary\/70:active{border-color:hsl(var(--primary) / .7)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group[open] .group-open\: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))}.group:hover .group-hover\:-translate-y-1{--tw-translate-y: -.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))}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;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))}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=inactive\]\:hidden[data-state=inactive]{display:none}.data-\[state\=inactive\]\:h-0[data-state=inactive]{height:0px}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .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))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--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))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--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))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.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))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;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))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--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))}.data-\[swipe\=cancel\]\:translate-y-0[data-swipe=cancel]{--tw-translate-y: 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))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);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))}.data-\[swipe\=end\]\:translate-y-\[var\(--radix-toast-swipe-end-y\)\][data-swipe=end]{--tw-translate-y: var(--radix-toast-swipe-end-y);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))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);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))}.data-\[swipe\=move\]\:translate-y-\[var\(--radix-toast-swipe-move-y\)\][data-swipe=move]{--tw-translate-y: var(--radix-toast-swipe-move-y);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 fade-out{0%{opacity:1}to{opacity:0}}.data-\[state\=closed\]\:animate-fade-out[data-state=closed]{animation:fade-out .15s ease-in}.data-\[state\=closed\]\:animate-slide-out-to-right[data-state=closed]{animation:slide-out-to-right .2s ease-in}.data-\[state\=closed\]\:animate-slide-out-to-top[data-state=closed]{animation:slide-out-to-top .2s ease-in}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.data-\[state\=open\]\:animate-fade-in[data-state=open]{animation:fade-in .2s ease-out}@keyframes slide-in-from-right{0%{transform:translate(100%)}to{transform:translate(0)}}.data-\[state\=open\]\:animate-slide-in-from-right[data-state=open]{animation:slide-in-from-right .3s ease-out}@keyframes slide-in-from-top{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.data-\[state\=open\]\:animate-slide-in-from-top[data-state=open]{animation:slide-in-from-top .3s ease-out}@keyframes slide-out-to-right{0%{transform:translate(0)}to{transform:translate(100%)}}.data-\[swipe\=end\]\:animate-slide-out-to-right[data-swipe=end]{animation:slide-out-to-right .2s ease-in}@keyframes slide-out-to-top{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.data-\[swipe\=end\]\:animate-slide-out-to-top[data-swipe=end]{animation:slide-out-to-top .2s ease-in}.data-\[range-end\=true\]\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-middle\=true\]\:rounded-none[data-range-middle=true]{border-radius:0}.data-\[range-start\=true\]\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\[selected\=true\]\:rounded-none[data-selected=true]{border-radius:0}.data-\[range-end\=true\]\:bg-primary[data-range-end=true]{background-color:hsl(var(--primary))}.data-\[range-middle\=true\]\:bg-accent[data-range-middle=true]{background-color:hsl(var(--accent))}.data-\[range-start\=true\]\:bg-primary[data-range-start=true],.data-\[selected-single\=true\]\:bg-primary[data-selected-single=true]{background-color:hsl(var(--primary))}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\[range-end\=true\]\:text-primary-foreground[data-range-end=true]{color:hsl(var(--primary-foreground))}.data-\[range-middle\=true\]\:text-accent-foreground[data-range-middle=true]{color:hsl(var(--accent-foreground))}.data-\[range-start\=true\]\:text-primary-foreground[data-range-start=true],.data-\[selected-single\=true\]\:text-primary-foreground[data-selected-single=true]{color:hsl(var(--primary-foreground))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--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)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--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)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=active\]\:duration-300[data-state=active]{transition-duration:.3s}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:relative{position:relative}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:z-10{z-index:10}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:border-ring{border-color:hsl(var(--ring))}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:ring-\[3px\]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:ring-ring\/50{--tw-ring-color: hsl(var(--ring) / .5)}@supports (backdrop-filter: var(--tw)){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:hsl(var(--background) / .6)}}.dark\:border-amber-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-blue-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity, 1))}.dark\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.dark\:border-green-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(20 83 45 / var(--tw-border-opacity, 1))}.dark\:border-orange-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(124 45 18 / var(--tw-border-opacity, 1))}.dark\:border-red-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity, 1))}.dark\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(133 77 14 / var(--tw-border-opacity, 1))}.dark\:border-yellow-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(113 63 18 / var(--tw-border-opacity, 1))}.dark\:bg-amber-950\/30:is(.dark *){background-color:#451a034d}.dark\:bg-blue-500\/20:is(.dark *){background-color:#3b82f633}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950\/20:is(.dark *){background-color:#17255433}.dark\:bg-blue-950\/30:is(.dark *){background-color:#1725544d}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900\/30:is(.dark *){background-color:#14532d4d}.dark\:bg-green-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 46 22 / var(--tw-bg-opacity, 1))}.dark\:bg-green-950\/20:is(.dark *){background-color:#052e1633}.dark\:bg-orange-950\/20:is(.dark *){background-color:#43140733}.dark\:bg-red-500\/20:is(.dark *){background-color:#ef444433}.dark\:bg-red-600\/30:is(.dark *){background-color:#dc26264d}.dark\:bg-red-900\/30:is(.dark *){background-color:#7f1d1d4d}.dark\:bg-red-950\/20:is(.dark *){background-color:#450a0a33}.dark\:bg-red-950\/50:is(.dark *){background-color:#450a0a80}.dark\:bg-yellow-500\/20:is(.dark *){background-color:#eab30833}.dark\:bg-yellow-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 32 6 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950\/30:is(.dark *){background-color:#4220064d}.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\:from-indigo-950\/20:is(.dark *){--tw-gradient-from: rgb(30 27 75 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 27 75 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-pink-950\/20:is(.dark *){--tw-gradient-from: rgb(80 7 36 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(80 7 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-rose-950\/20:is(.dark *){--tw-gradient-from: rgb(76 5 25 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(76 5 25 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-blue-950\/20:is(.dark *){--tw-gradient-to: rgb(23 37 84 / .2) var(--tw-gradient-to-position)}.dark\:to-orange-950\/20:is(.dark *){--tw-gradient-to: rgb(67 20 7 / .2) var(--tw-gradient-to-position)}.dark\:to-pink-950\/20:is(.dark *){--tw-gradient-to: rgb(80 7 36 / .2) var(--tw-gradient-to-position)}.dark\:to-purple-950\/20:is(.dark *){--tw-gradient-to: rgb(59 7 100 / .2) var(--tw-gradient-to-position)}.dark\:to-violet-950\/20:is(.dark *){--tw-gradient-to: rgb(46 16 101 / .2) var(--tw-gradient-to-position)}.dark\:text-amber-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.dark\:text-amber-200:is(.dark *){--tw-text-opacity: 1;color:rgb(253 230 138 / 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-amber-500:is(.dark *){--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.dark\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-cyan-500:is(.dark *){--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.dark\:text-orange-100:is(.dark *){--tw-text-opacity: 1;color:rgb(255 237 213 / var(--tw-text-opacity, 1))}.dark\:text-orange-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 215 170 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-red-500:is(.dark *){--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:text-yellow-500:is(.dark *){--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-amber-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity, 1))}.dark\:focus\:bg-gray-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}@media(min-width:640px){.sm\:right-2{right:.5rem}.sm\:right-3{right:.75rem}.sm\:top-2{top:.5rem}.sm\:top-3{top:.75rem}.sm\:order-1{order:1}.sm\:order-2{order:2}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:mb-3{margin-bottom:.75rem}.sm\:mb-4{margin-bottom:1rem}.sm\:mb-6{margin-bottom:1.5rem}.sm\:ml-0{margin-left:0}.sm\:ml-1{margin-left:.25rem}.sm\:mr-1{margin-right:.25rem}.sm\:mt-0{margin-top:0}.sm\:mt-2{margin-top:.5rem}.sm\:mt-3{margin-top:.75rem}.sm\:mt-6{margin-top:1.5rem}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-10{height:2.5rem}.sm\:h-12{height:3rem}.sm\:h-2{height:.5rem}.sm\:h-2\.5{height:.625rem}.sm\:h-24{height:6rem}.sm\:h-4{height:1rem}.sm\:h-5{height:1.25rem}.sm\:h-8{height:2rem}.sm\:h-9{height:2.25rem}.sm\:h-\[300px\]{height:300px}.sm\:h-\[400px\]{height:400px}.sm\:h-\[500px\]{height:500px}.sm\:h-\[85vh\]{height:85vh}.sm\:h-\[calc\(100vh-220px\)\]{height:calc(100vh - 220px)}.sm\:h-\[calc\(100vh-280px\)\]{height:calc(100vh - 280px)}.sm\:w-10{width:2.5rem}.sm\:w-2{width:.5rem}.sm\:w-2\.5{width:.625rem}.sm\:w-24{width:6rem}.sm\:w-28{width:7rem}.sm\:w-32{width:8rem}.sm\:w-4{width:1rem}.sm\:w-48{width:12rem}.sm\:w-5{width:1.25rem}.sm\:w-8{width:2rem}.sm\:w-80{width:20rem}.sm\:w-96{width:24rem}.sm\:w-\[200px\]{width:200px}.sm\:w-\[500px\]{width:500px}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:min-w-\[120px\]{min-width:120px}.sm\:max-w-2xl{max-width:42rem}.sm\:max-w-32{max-width:8rem}.sm\:max-w-\[420px\]{max-width:420px}.sm\:max-w-\[500px\]{max-width:500px}.sm\:max-w-\[70\%\]{max-width:70%}.sm\:max-w-\[900px\]{max-width:900px}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-1{flex:1 1 0%}.sm\:flex-none{flex:none}.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-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-0{gap:0px}.sm\:gap-1{gap:.25rem}.sm\:gap-2{gap:.5rem}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:gap-6{gap:1.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\: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))}.sm\: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))}.sm\: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))}.sm\: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))}.sm\:space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-3{padding:.75rem}.sm\:p-4{padding:1rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-2{padding-top:.5rem;padding-bottom:.5rem}.sm\:pb-3{padding-bottom:.75rem}.sm\:pt-6{padding-top:1.5rem}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-6xl{font-size:3.75rem;line-height:1}.sm\:text-\[200px\]{font-size:200px}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media(min-width:768px){.md\:top-4{top:1rem}.md\:col-span-2{grid-column:span 2 / span 2}.md\:mb-4{margin-bottom:1rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-8{margin-bottom:2rem}.md\:mt-8{margin-top:2rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-16{height:4rem}.md\:h-4{height:1rem}.md\:h-5{height:1.25rem}.md\:h-8{height:2rem}.md\:h-96{height:24rem}.md\:h-\[500px\]{height:500px}.md\:min-h-\[400px\]{min-height:400px}.md\:w-16{width:4rem}.md\:w-4{width:1rem}.md\:w-5{width:1.25rem}.md\:w-8{width:2rem}.md\:w-96{width:24rem}.md\:max-w-none{max-width:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:gap-2{gap:.5rem}.md\:gap-3{gap:.75rem}.md\:gap-4{gap:1rem}.md\:gap-6{gap:1.5rem}.md\: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))}.md\: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))}.md\:whitespace-normal{white-space:normal}.md\:p-12{padding:3rem}.md\:p-4{padding:1rem}.md\:p-6{padding:1.5rem}.md\:p-8{padding:2rem}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:text-base{font-size:1rem;line-height:1.5rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:text-xs{font-size:.75rem;line-height:1rem}}@media(min-width:1024px){.lg\:invisible{visibility:hidden}.lg\:relative{position:relative}.lg\:z-0{z-index:0}.lg\:col-span-1{grid-column:span 1 / span 1}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:mx-auto{margin-left:auto;margin-right:auto}.lg\:mb-1{margin-bottom:.25rem}.lg\:block{display:block}.lg\:inline{display:inline}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-12{width:3rem}.lg\:w-16{width:4rem}.lg\:w-64{width:16rem}.lg\:w-8{width:2rem}.lg\:w-\[130px\]{width:130px}.lg\:w-\[160px\]{width:160px}.lg\:w-\[75px\]{width:75px}.lg\:w-auto{width:auto}.lg\:w-full{width:100%}.lg\:max-w-0{max-width:0px}.lg\:flex-1{flex:1 1 0%}.lg\:flex-none{flex:none}.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-10{grid-template-columns:repeat(10,minmax(0,1fr))}.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-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-center{justify-content:center}.lg\:gap-0{gap:0px}.lg\: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))}.lg\:overflow-hidden{overflow:hidden}.lg\:p-2{padding:.5rem}.lg\:p-4{padding:1rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:pb-4{padding-bottom:1rem}.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:opacity-0{opacity:0}}@media(min-width:1280px){.xl\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}}@media print{.print\:hidden{display:none}.print\: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))}.print\:rounded-none{border-radius:0}.print\:p-0{padding:0}.print\: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)}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\:\:-webkit-scrollbar-thumb\:hover\]\:bg-border\/80::-webkit-scrollbar-thumb:hover{background-color:hsl(var(--border) / .8)}.\[\&\:\:-webkit-scrollbar-thumb\]\:rounded-full::-webkit-scrollbar-thumb{border-radius:9999px}.\[\&\:\:-webkit-scrollbar-thumb\]\:bg-border::-webkit-scrollbar-thumb{background-color:hsl(var(--border))}.\[\&\:\:-webkit-scrollbar-track\]\:bg-transparent::-webkit-scrollbar-track{background-color:transparent}.\[\&\:\:-webkit-scrollbar\]\:w-2\.5::-webkit-scrollbar{width:.625rem}.\[\&\:first-child\[data-selected\=true\]_button\]\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\:last-child\[data-selected\=true\]_button\]\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;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))}.\[\&\>div\]\:bg-green-500>div{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>span\]\:text-xs>span{font-size:.75rem;line-height:1rem}.\[\&\>span\]\:opacity-70>span{opacity:.7}.\[\&\>svg\+div\]\:translate-y-0>svg+div{--tw-translate-y: 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))}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;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))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:size-3\.5>svg{width:.875rem;height:.875rem}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\]\:text-muted-foreground>svg{color:hsl(var(--muted-foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--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))}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground))}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--border) / .5)}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border))}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted))}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}[data-slot=card-content] .\[\[data-slot\=card-content\]_\&\]\:bg-transparent,[data-slot=popover-content] .\[\[data-slot\=popover-content\]_\&\]\:bg-transparent{background-color:transparent}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCv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+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.27"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.uppy-Root{box-sizing:border-box;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;line-height:1;position:relative;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.uppy-Root[dir=rtl],[dir=rtl] .uppy-Root{text-align:right}.uppy-Root *,.uppy-Root :after,.uppy-Root :before{box-sizing:inherit}.uppy-Root [hidden]{display:none}.uppy-u-reset{all:initial;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;line-height:1}[dir=rtl] .uppy-u-reset{text-align:right}.uppy-truncate-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uppy-c-textInput{background-color:#fff;border:1px solid #ddd;border-radius:4px;font-family:inherit;font-size:14px;line-height:1.5;padding:6px 8px}.uppy-size--md .uppy-c-textInput{padding:8px 10px}.uppy-c-textInput:focus{border-color:#1269cf99;box-shadow:0 0 0 3px #1269cf26;outline:none}[data-uppy-theme=dark] .uppy-c-textInput{background-color:#333;border-color:#333;color:#eaeaea}[data-uppy-theme=dark] .uppy-c-textInput:focus{border-color:#525252;box-shadow:none}.uppy-c-icon{display:inline-block;max-height:100%;max-width:100%;overflow:hidden;fill:currentColor}.uppy-c-btn{align-items:center;color:inherit;display:inline-flex;font-family:inherit;font-size:inherit;font-weight:500;justify-content:center;line-height:1;transition-duration:.3s;transition-property:background-color,color;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.uppy-c-btn,[dir=rtl] .uppy-c-btn{text-align:center}.uppy-c-btn:not(:disabled):not(.disabled){cursor:pointer}.uppy-c-btn::-moz-focus-inner{border:0}.uppy-c-btn-primary{background-color:#1269cf;border-radius:4px;color:#fff;font-size:14px;padding:10px 18px}.uppy-c-btn-primary:not(:disabled):hover{background-color:#0e51a0}.uppy-c-btn-primary:focus{box-shadow:0 0 0 3px #1269cf66;outline:none}.uppy-size--md .uppy-c-btn-primary{padding:13px 22px}[data-uppy-theme=dark] .uppy-c-btn-primary{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-primary::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-c-btn-primary.uppy-c-btn--disabled{background-color:#8eb2db}.uppy-c-btn-link{background-color:initial;border-radius:4px;color:#525252;font-size:14px;line-height:1;padding:10px 15px}.uppy-c-btn-link:hover{color:#333}.uppy-c-btn-link:focus{box-shadow:0 0 0 3px #1269cf40;outline:none}.uppy-size--md .uppy-c-btn-link{padding:13px 18px}[data-uppy-theme=dark] .uppy-c-btn-link{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-link:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-link::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-link:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-c-btn-link:hover{color:#939393}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:6px}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list:after,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list:after{content:"";flex:auto}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{margin:0;position:relative;width:50%}.uppy-size--md .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--md .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:33.3333%}.uppy-size--lg .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--lg .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:25%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem:before,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem:before{content:"";display:block;padding-top:100%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected svg{opacity:.85}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--disabled,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--disabled{opacity:.5}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#93939333}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#eaeaea33}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{height:30%;width:30%;fill:#000000b3}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{fill:#fffc}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{border-radius:4px;height:calc(100% - 14px);inset:7px;overflow:hidden;position:absolute;text-align:center;width:calc(100% - 14px)}@media(hover:none){.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author{display:block}}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{box-shadow:0 0 0 3px #aae1ffb3}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner img{border-radius:4px;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author{background:#0000004d;bottom:0;color:#fff;display:none;font-size:12px;font-weight:500;left:0;margin:0;padding:5px;position:absolute;text-decoration:none;width:100%}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author:hover,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author:hover{background:#0006;text-decoration:underline}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox{background-color:#1269cf;border-radius:50%;height:26px;opacity:0;position:absolute;right:16px;top:16px;width:26px;z-index:1002}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{height:7px;inset-inline-start:7px;top:8px;width:12px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox{opacity:1}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author{display:block}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus{outline:none}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner{border:0}.uppy-ProviderBrowser-viewType--list{background-color:#fff}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list{background-color:#1f1f1f}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{align-items:center;display:flex;margin:0;padding:7px 15px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{color:#eaeaea}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem--disabled{opacity:.6}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{background-color:#fff;border:1px solid #cfcfcf;border-radius:3px;height:17px;margin-inline-end:15px;width:17px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border:1px solid #1269cf;box-shadow:0 0 0 3px #1269cf40;outline:none}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{height:5px;inset-inline-start:3px;opacity:0;top:4px;width:9px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border-color:#02baf2b3;box-shadow:0 0 0 3px #02baf233}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox{background-color:#1269cf;border-color:#1269cf}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox:after{opacity:1}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner{align-items:center;color:inherit;display:flex;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;overflow:hidden;padding:2px;text-overflow:ellipsis;white-space:nowrap}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner:focus{outline:none;text-decoration:underline}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-inline-end:8px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner span{line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--disabled .uppy-ProviderBrowserItem-inner{cursor:default}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{margin-inline-end:7px;width:20px}.uppy-ProviderBrowserItem-checkbox{cursor:pointer;flex-shrink:0;position:relative}.uppy-ProviderBrowserItem-checkbox:disabled,.uppy-ProviderBrowserItem-checkbox:disabled:after{cursor:default}[data-uppy-theme=dark] .uppy-ProviderBrowserItem-checkbox{background-color:#1f1f1f;border-color:#939393}[data-uppy-theme=dark] .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox{background-color:#333}.uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox:after{border-bottom:2px solid #eaeaea;border-left:2px solid #eaeaea;content:"";cursor:pointer;position:absolute;transform:rotate(-45deg)}.uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox:after{background-color:#eaeaea!important;content:""!important;height:2px!important;left:20%!important;position:absolute!important;right:20%!important;top:50%!important;transform:translateY(-50%)!important}.uppy-SearchProvider{align-items:center;display:flex;flex:1;flex-direction:column;height:100%;justify-content:center;width:100%}[data-uppy-theme=dark] .uppy-SearchProvider{background-color:#1f1f1f}.uppy-SearchProvider-input{margin-bottom:15px;max-width:650px;width:90%}.uppy-size--md .uppy-SearchProvider-input{margin-bottom:20px}.uppy-SearchProvider-input::-webkit-search-cancel-button{display:none}.uppy-SearchProvider-searchButton{padding:13px 25px}.uppy-size--md .uppy-SearchProvider-searchButton{padding:13px 30px}.uppy-DashboardContent-panelBody{align-items:center;display:flex;flex:1;justify-content:center}[data-uppy-theme=dark] .uppy-DashboardContent-panelBody{background-color:#1f1f1f}.uppy-Provider-auth,.uppy-Provider-empty,.uppy-Provider-error,.uppy-Provider-loading{align-items:center;color:#939393;display:flex;flex:1;flex-flow:column wrap;justify-content:center}.uppy-Provider-empty{color:#939393}.uppy-Provider-authIcon svg{height:75px;width:100px}.uppy-Provider-authTitle{color:#757575;font-size:17px;font-weight:400;line-height:1.4;margin-bottom:30px;max-width:500px;padding:0 15px;text-align:center}.uppy-size--md .uppy-Provider-authTitle{font-size:20px}[data-uppy-theme=dark] .uppy-Provider-authTitle{color:#cfcfcf}.uppy-Provider-btn-google{align-items:center;background:#4285f4;display:flex;padding:8px 12px!important}.uppy-Provider-btn-google:hover{background-color:#1266f1}.uppy-Provider-btn-google:focus{box-shadow:0 0 0 3px #4285f466;outline:none}.uppy-Provider-btn-google svg{margin-right:8px}.uppy-Provider-breadcrumbs{color:#525252;flex:1;font-size:12px;margin-bottom:10px;text-align:start}.uppy-size--md .uppy-Provider-breadcrumbs{margin-bottom:0}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs{color:#eaeaea}.uppy-Provider-breadcrumbsIcon{color:#525252;display:inline-block;line-height:1;margin-inline-end:4px;vertical-align:middle}.uppy-Provider-breadcrumbsIcon svg{height:13px;width:13px;fill:#525252}.uppy-Provider-breadcrumbs button{border-radius:3px;display:inline-block;line-height:inherit;padding:4px}.uppy-Provider-breadcrumbs button:focus{outline:none}.uppy-Provider-breadcrumbs button::-moz-focus-inner{border:0}.uppy-Provider-breadcrumbs button:hover{color:#0e51a0}.uppy-Provider-breadcrumbs button:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button:focus{background-color:#333}.uppy-Provider-breadcrumbs button:not(:last-of-type){text-decoration:underline}.uppy-Provider-breadcrumbs button:last-of-type{color:#333;cursor:normal;font-weight:500;pointer-events:none}.uppy-Provider-breadcrumbs button:hover{cursor:pointer}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button{color:#eaeaea}.uppy-ProviderBrowser{display:flex;flex:1;flex-direction:column;font-size:14px;font-weight:400;height:100%}.uppy-ProviderBrowser-user{color:#333;font-weight:500;margin:0 8px 0 0}[data-uppy-theme=dark] .uppy-ProviderBrowser-user{color:#eaeaea}.uppy-ProviderBrowser-user:after{color:#939393;content:"·";font-weight:400;inset-inline-start:4px;position:relative}.uppy-ProviderBrowser-header{border-bottom:1px solid #eaeaea;position:relative;z-index:1001}[data-uppy-theme=dark] .uppy-ProviderBrowser-header{border-bottom:1px solid #333}.uppy-ProviderBrowser-headerBar{background-color:#fafafa;color:#757575;font-size:12px;line-height:1.4;padding:7px 15px;z-index:1001}.uppy-size--md .uppy-ProviderBrowser-headerBar{align-items:center;display:flex}[data-uppy-theme=dark] .uppy-ProviderBrowser-headerBar{background-color:#1f1f1f}.uppy-ProviderBrowser-headerBar--simple{display:block;justify-content:center;text-align:center}.uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap{display:inline-block;flex:none;vertical-align:middle}.uppy-ProviderBrowser-searchFilter{align-items:center;display:flex;height:30px;margin-bottom:15px;margin-top:15px;padding-left:8px;padding-right:8px;position:relative;width:100%}.uppy-ProviderBrowser-searchFilterInput{background-color:#eaeaea;border:0;border-radius:4px;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;font-size:13px;height:30px;line-height:1.4;outline:0;padding-inline-end:30px;padding-inline-start:30px;width:100%;z-index:1001}.uppy-ProviderBrowser-searchFilterInput::-webkit-search-cancel-button{display:none}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput{background-color:#1f1f1f;color:#eaeaea}.uppy-ProviderBrowser-searchFilterInput:focus{background-color:#cfcfcf;border:0}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput:focus{background-color:#333}.uppy-ProviderBrowser-searchFilterIcon{color:#757575;height:12px;inset-inline-start:16px;position:absolute;width:12px;z-index:1002}.uppy-ProviderBrowser-searchFilterInput::-moz-placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-searchFilterInput::placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-searchFilterReset{border-radius:3px;color:#939393;cursor:pointer;height:22px;inset-inline-end:16px;padding:6px;position:absolute;width:22px;z-index:1002}.uppy-ProviderBrowser-searchFilterReset:focus{outline:none}.uppy-ProviderBrowser-searchFilterReset::-moz-focus-inner{border:0}.uppy-ProviderBrowser-searchFilterReset:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-searchFilterReset:hover{color:#757575}.uppy-ProviderBrowser-searchFilterReset svg{vertical-align:text-top}.uppy-ProviderBrowser-userLogout{border-radius:3px;color:#1269cf;cursor:pointer;line-height:inherit;padding:4px}.uppy-ProviderBrowser-userLogout:focus{outline:none}.uppy-ProviderBrowser-userLogout::-moz-focus-inner{border:0}.uppy-ProviderBrowser-userLogout:hover{color:#0e51a0}.uppy-ProviderBrowser-userLogout:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout:focus{background-color:#333}.uppy-ProviderBrowser-userLogout:hover{text-decoration:underline}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout{color:#eaeaea}.uppy-ProviderBrowser-body{flex:1;position:relative}.uppy-ProviderBrowser-list{background-color:#fff;border-spacing:0;display:block;flex:1;height:100%;inset:0;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;width:100%;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-ProviderBrowser-list{background-color:#1f1f1f}.uppy-ProviderBrowser-list:focus{outline:none}.uppy-ProviderBrowserItem-inner{cursor:pointer;font-size:13px;font-weight:500}.uppy-ProviderBrowser-footer{align-items:center;background-color:#fff;border-top:1px solid #eaeaea;display:flex;justify-content:space-between;padding:15px}.uppy-ProviderBrowser-footer button{margin-inline-end:8px}[data-uppy-theme=dark] .uppy-ProviderBrowser-footer{background-color:#1f1f1f;border-top:1px solid #333}.uppy-ProviderBrowser-footer-buttons{flex-shrink:0}.uppy-ProviderBrowser-footer-error{color:#e32437;line-height:18px}@media(max-width:426px){.uppy-ProviderBrowser-footer{align-items:stretch;flex-direction:column-reverse}.uppy-ProviderBrowser-footer-error{padding-bottom:10px}}.picker-dialog-bg{z-index:20000!important}.picker-dialog{z-index:20001!important}.uppy-Dashboard-Item-previewInnerWrap{align-items:center;border-radius:3px;box-shadow:0 0 2px #0006;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}.uppy-size--md .uppy-Dashboard-Item-previewInnerWrap{box-shadow:0 1px 2px #00000026}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewInnerWrap{box-shadow:none}.uppy-Dashboard-Item-previewInnerWrap:after{background-color:#000000a6;content:"";display:none;inset:0;position:absolute;z-index:1001}.uppy-Dashboard-Item-previewLink{inset:0;position:absolute;z-index:1002}.uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #579df0}[data-uppy-theme=dark] .uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #016c8d}.uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{border-radius:3px;height:100%;-o-object-fit:cover;object-fit:cover;transform:translateZ(0);width:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{height:auto;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;padding:10px;width:auto}.uppy-Dashboard-Item-progress{color:#fff;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);transition:all .35 ease;width:120px;z-index:1002}.uppy-Dashboard-Item-progressIndicator{color:#fff;display:inline-block;height:38px;opacity:.9;width:38px}.uppy-size--md .uppy-Dashboard-Item-progressIndicator{height:55px;width:55px}button.uppy-Dashboard-Item-progressIndicator{cursor:pointer}button.uppy-Dashboard-Item-progressIndicator:focus{outline:none}button.uppy-Dashboard-Item-progressIndicator::-moz-focus-inner{border:0}button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--bg,button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--retry{fill:#579df0}.uppy-Dashboard-Item-progressIcon--circle{height:100%;width:100%}.uppy-Dashboard-Item-progressIcon--bg{stroke:#fff6}.uppy-Dashboard-Item-progressIcon--progress{transition:stroke-dashoffset .5s ease-out;stroke:#fff}.uppy-Dashboard-Item-progressIcon--play{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--cancel{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--pause{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--check{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--retry{fill:#fff}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{inset-inline-end:-8px;inset-inline-start:auto;top:-9px;transform:none;width:auto}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{height:18px;width:18px}.uppy-size--md .uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{height:28px;width:28px}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{height:18px;opacity:1;width:18px}.uppy-size--md .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{height:22px;width:22px}.uppy-Dashboard-Item.is-processing .uppy-Dashboard-Item-progress{opacity:0}.uppy-Dashboard-Item-fileInfo{padding-inline-end:5px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-inline-end:10px}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-inline-end:15px}.uppy-Dashboard-Item-name{font-size:12px;font-weight:500;line-height:1.3;margin-bottom:5px;word-wrap:anywhere;word-break:break-all}[data-uppy-theme=dark] .uppy-Dashboard-Item-name{color:#eaeaea}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-name{font-size:14px;line-height:1.4}.uppy-Dashboard-Item-fileName{align-items:baseline;display:flex}.uppy-Dashboard-Item-fileName button{margin-left:5px}.uppy-Dashboard-Item-author{color:#757575;display:inline-block;font-size:11px;font-weight:400;line-height:1;margin-bottom:5px;vertical-align:bottom}.uppy-Dashboard-Item-author a{color:#757575}.uppy-Dashboard-Item-status{color:#757575;font-size:11px;font-weight:400;line-height:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-status{color:#bbb}.uppy-Dashboard-Item-statusSize{display:inline-block;margin-bottom:5px;text-transform:uppercase;vertical-align:bottom}.uppy-Dashboard-Item-reSelect{color:#1269cf;font-family:inherit;font-size:inherit;font-weight:600}.uppy-Dashboard-Item-errorMessage{background-color:#fdeff1;color:#a51523;font-size:11px;font-weight:500;line-height:1.3;padding:5px 6px}.uppy-Dashboard-Item-errorMessageBtn{color:#a51523;cursor:pointer;font-size:11px;font-weight:500;text-decoration:underline}.uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{display:none}.uppy-size--md .uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:1px solid #f7c2c8;bottom:0;display:block;left:0;line-height:1.4;padding:6px 8px;position:absolute;right:0}.uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{border:1px solid #f7c2c8;border-radius:3px;display:inline-block;position:static}.uppy-size--md .uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{display:none}.uppy-Dashboard-Item-action{color:#939393;cursor:pointer}.uppy-Dashboard-Item-action:focus{outline:none}.uppy-Dashboard-Item-action::-moz-focus-inner{border:0}.uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-Item-action:hover{color:#1f1f1f;opacity:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-action{color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{outline:none}[data-uppy-theme=dark] .uppy-Dashboard-Item-action::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:hover{color:#eaeaea}.uppy-Dashboard-Item-action--remove{color:#1f1f1f;opacity:.95}.uppy-Dashboard-Item-action--remove:hover{color:#000;opacity:1}.uppy-size--md .uppy-Dashboard-Item-action--remove{height:18px;inset-inline-end:-8px;padding:0;position:absolute;top:-8px;width:18px;z-index:1002}.uppy-size--md .uppy-Dashboard-Item-action--remove:focus{border-radius:50%}.uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{inset-inline-end:8px;position:absolute;top:8px}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove{color:#525252}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove:hover{color:#333}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-actionWrapper{align-items:center;display:flex}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action{height:22px;margin-left:3px;padding:3px;width:22px}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action:focus{border-radius:3px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink,.uppy-size--md .uppy-Dashboard-Item-action--edit{height:16px;padding:0;width:16px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink:focus,.uppy-size--md .uppy-Dashboard-Item-action--edit:focus{border-radius:3px}.uppy-Dashboard-Item{align-items:center;border-bottom:1px solid #eaeaea;display:flex;padding:10px}.uppy-Dashboard:not(.uppy-Dashboard--singleFile) .uppy-Dashboard-Item{padding-inline-end:0}[data-uppy-theme=dark] .uppy-Dashboard-Item{border-bottom:1px solid #333}.uppy-size--md .uppy-Dashboard-Item{border-bottom:0;display:block;float:inline-start;height:215px;margin:5px 15px;padding:0;position:relative;width:calc(33.333% - 30px)}.uppy-size--lg .uppy-Dashboard-Item{height:190px;margin:5px 15px;padding:0;width:calc(25% - 30px)}.uppy-size--xl .uppy-Dashboard-Item{height:210px;padding:0;width:calc(20% - 30px)}.uppy-Dashboard--singleFile .uppy-Dashboard-Item{border-bottom:0;display:flex;flex-direction:column;height:100%;max-width:400px;padding:15px;position:relative;width:100%}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-previewInnerWrap{opacity:.2}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-name{opacity:.7}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='39' viewBox='0 0 35 39'%3E%3Cpath fill='%2523000' d='M1.708 38.66c1.709 0 3.417-3.417 6.834-3.417s5.125 3.417 8.61 3.417c3.348 0 5.056-3.417 8.473-3.417 4.305 0 5.125 3.417 6.833 3.417.889 0 1.709-.889 1.709-1.709v-19.68C34.167-5.757 0-5.757 0 17.271v19.68c0 .82.888 1.709 1.708 1.709m8.542-17.084a3.383 3.383 0 0 1-3.417-3.416 3.383 3.383 0 0 1 3.417-3.417 3.383 3.383 0 0 1 3.417 3.417 3.383 3.383 0 0 1-3.417 3.416m13.667 0A3.383 3.383 0 0 1 20.5 18.16a3.383 3.383 0 0 1 3.417-3.417 3.383 3.383 0 0 1 3.416 3.417 3.383 3.383 0 0 1-3.416 3.416'/%3E%3C/svg%3E");background-position:50% 10px;background-repeat:no-repeat;background-size:25px;content:"";inset:0;opacity:.5;position:absolute;z-index:1005}.uppy-size--md .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:40px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:30%}.uppy-Dashboard-Item-preview{flex-grow:0;flex-shrink:0;height:50px;position:relative;width:50px}.uppy-size--md .uppy-Dashboard-Item-preview{height:140px;width:100%}.uppy-size--lg .uppy-Dashboard-Item-preview{height:120px}.uppy-size--xl .uppy-Dashboard-Item-preview{height:140px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview{flex-grow:1;max-height:75%;width:100%}.uppy-Dashboard--singleFile.uppy-size--md .uppy-Dashboard-Item-preview{max-height:100%}.uppy-Dashboard-Item-fileInfoAndButtons{align-items:center;display:flex;flex-grow:1;justify-content:space-between;padding-inline-end:8px;padding-inline-start:12px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons,.uppy-size--md .uppy-Dashboard-Item-fileInfoAndButtons{align-items:flex-start;padding:9px 0 0}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons{flex-grow:0;width:100%}.uppy-Dashboard-Item-fileInfo{flex-grow:1;flex-shrink:1}.uppy-Dashboard-Item-actionWrapper{flex-grow:0;flex-shrink:0}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-previewInnerWrap:after,.uppy-Dashboard-Item.is-inprogress .uppy-Dashboard-Item-previewInnerWrap:after{display:block}.uppy-Dashboard-Item-errorDetails{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#939393;border:none;border-radius:50%;color:#fff;cursor:help;flex-shrink:0;font-size:10px;font-weight:600;height:13px;inset-inline-start:2px;line-height:12px;position:relative;text-align:center;top:0;width:13px}.uppy-Dashboard-Item-errorDetails:after{line-height:1.3;word-wrap:break-word}.uppy-Dashboard-FileCard{background-color:#fff;border-radius:5px;box-shadow:0 0 10px 4px #0000001a;display:flex;flex-direction:column;height:100%;inset:0;position:absolute;width:100%;z-index:1005}.uppy-Dashboard-FileCard .uppy-DashboardContent-bar{border-top-left-radius:5px;border-top-right-radius:5px}.uppy-Dashboard-FileCard .uppy-Dashboard-FileCard-actions{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.uppy-Dashboard-FileCard-inner{display:flex;flex-direction:column;flex-grow:1;flex-shrink:1;height:100%;min-height:0}.uppy-Dashboard-FileCard-preview{align-items:center;border-bottom:1px solid #eaeaea;display:flex;flex-grow:0;flex-shrink:1;height:60%;justify-content:center;min-height:0;position:relative}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-preview{background-color:#333;border-bottom:0}.uppy-Dashboard-FileCard-preview img.uppy-Dashboard-Item-previewImg{border-radius:3px;box-shadow:0 3px 20px #00000026;flex:0 0 auto;max-height:90%;max-width:90%;-o-object-fit:cover;object-fit:cover}.uppy-Dashboard-FileCard-edit{background-color:#00000080;border-radius:50px;color:#fff;font-size:13px;inset-inline-end:10px;padding:7px 15px;position:absolute;top:10px}.uppy-Dashboard-FileCard-edit:focus{outline:none}.uppy-Dashboard-FileCard-edit::-moz-focus-inner{border:0}.uppy-Dashboard-FileCard-edit:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-FileCard-edit:hover{background-color:#000c}.uppy-Dashboard-FileCard-info{flex-grow:0;flex-shrink:0;height:40%;overflow-y:auto;padding:30px 20px 20px;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-info{background-color:#1f1f1f}.uppy-Dashboard-FileCard-fieldset{border:0;font-size:0;margin:auto auto 12px;max-width:640px;padding:0}.uppy-Dashboard-FileCard-label{color:#525252;display:inline-block;font-size:12px;vertical-align:middle;width:22%}.uppy-size--md .uppy-Dashboard-FileCard-label{font-size:14px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-label{color:#eaeaea}.uppy-Dashboard-FileCard-input{display:inline-block;vertical-align:middle;width:78%}.uppy-Dashboard-FileCard-actions{align-items:center;background-color:#fafafa;border-top:1px solid #eaeaea;display:flex;flex-grow:0;flex-shrink:0;height:55px;padding:0 15px}.uppy-size--md .uppy-Dashboard-FileCard-actions{height:65px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-actions{background-color:#1f1f1f;border-top:1px solid #333}.uppy-Dashboard-FileCard-actionsBtn{margin-inline-end:10px}.uppy-Informer{bottom:60px;left:0;position:absolute;right:0;text-align:center;z-index:1005}.uppy-Informer span>div{margin-bottom:6px}.uppy-Informer-animated{opacity:0;transform:translateY(350%);transition:all .3s ease-in;z-index:-1000}.uppy-Informer p{background-color:#757575;border-radius:18px;color:#fff;display:inline-block;font-size:12px;font-weight:400;line-height:1.4;margin:0;max-width:90%;padding:6px 15px}.uppy-size--md .uppy-Informer p{font-size:14px;line-height:1.3;max-width:500px;padding:10px 20px}[data-uppy-theme=dark] .uppy-Informer p{background-color:#333}.uppy-Informer p span{background-color:#fff;border-radius:50%;color:#525252;display:inline-block;font-size:10px;height:13px;inset-inline-start:3px;line-height:12px;margin-inline-start:-1px;position:relative;top:-1px;vertical-align:middle;width:13px}.uppy-Informer p span:hover{cursor:help}.uppy-Informer p span:after{line-height:1.3;word-wrap:break-word}.uppy-Root [aria-label][role~=tooltip]{position:relative}.uppy-Root [aria-label][role~=tooltip]:after,.uppy-Root [aria-label][role~=tooltip]:before{backface-visibility:hidden;box-sizing:border-box;opacity:0;pointer-events:none;position:absolute;transform:translateZ(0);transform-origin:top;transition:all var(--microtip-transition-duration,.18s) var(--microtip-transition-easing,ease-in-out) var(--microtip-transition-delay,0s);will-change:transform;z-index:10}.uppy-Root [aria-label][role~=tooltip]:before{background-size:100% auto!important;content:""}.uppy-Root [aria-label][role~=tooltip]:after{background:#111111e6;border-radius:4px;box-sizing:initial;color:#fff;content:attr(aria-label);font-size:var(--microtip-font-size,13px);font-weight:var(--microtip-font-weight,normal);padding:.5em 1em;text-transform:var(--microtip-text-transform,none);white-space:nowrap}.uppy-Root [aria-label][role~=tooltip]:focus:after,.uppy-Root [aria-label][role~=tooltip]:focus:before,.uppy-Root [aria-label][role~=tooltip]:hover:after,.uppy-Root [aria-label][role~=tooltip]:hover:before{opacity:1;pointer-events:auto}.uppy-Root [role~=tooltip][data-microtip-position|=top]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002S8.594 0 2.658 0'/%3E%3C/svg%3E") no-repeat;bottom:100%;height:6px;left:50%;margin-bottom:5px;transform:translate3d(-50%,0,0);width:18px}.uppy-Root [role~=tooltip][data-microtip-position|=top]:after{bottom:100%;left:50%;margin-bottom:11px;transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:after{bottom:100%;transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:after{bottom:100%;transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(-16px,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002S27.406 12 33.342 12'/%3E%3C/svg%3E") no-repeat;bottom:auto;height:6px;left:50%;margin-bottom:0;margin-top:5px;top:100%;transform:translate3d(-50%,-10px,0);width:18px}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:after{left:50%;margin-top:11px;top:100%;transform:translate3d(-50%,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:after{top:100%;transform:translate3d(calc(-100% + 16px),-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:after{top:100%;transform:translate3d(-16px,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:before{inset:50% 100% auto auto;transform:translate3d(10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M0 33.342V1.338c0 6 12.002 11.627 12.002 16.002S0 27.406 0 33.342'/%3E%3C/svg%3E") no-repeat;height:18px;margin-bottom:0;margin-right:5px;width:6px}.uppy-Root [role~=tooltip][data-microtip-position=left]:after{margin-right:11px}.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:before{bottom:auto;left:100%;top:50%;transform:translate3d(-10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M12 2.658v32.004c0-6-12.002-11.627-12.002-16.002S12 8.594 12 2.658'/%3E%3C/svg%3E") no-repeat;height:18px;margin-bottom:0;margin-left:5px;width:6px}.uppy-Root [role~=tooltip][data-microtip-position=right]:after{margin-left:11px}.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-size=small]:after{white-space:normal;width:80px}.uppy-Root [role~=tooltip][data-microtip-size=medium]:after{white-space:normal;width:150px}.uppy-Root [role~=tooltip][data-microtip-size=large]:after{white-space:normal;width:260px}.uppy-StatusBar{background-color:#fff;color:#fff;display:flex;font-size:12px;font-weight:400;height:46px;line-height:40px;position:relative;transition:height .2s;z-index:1001}[data-uppy-theme=dark] .uppy-StatusBar{background-color:#1f1f1f}.uppy-StatusBar:before{background-color:#eaeaea;content:"";height:2px;inset:0;position:absolute;width:100%}[data-uppy-theme=dark] .uppy-StatusBar:before{background-color:#757575}.uppy-StatusBar[aria-hidden=true]{height:0;overflow-y:hidden}.uppy-StatusBar.is-complete .uppy-StatusBar-progress{background-color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-progress{background-color:#e32437}.uppy-StatusBar.is-complete .uppy-StatusBar-statusIndicator{color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-statusIndicator{color:#e32437}.uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#fff;border-top:1px solid #eaeaea;height:65px}[data-uppy-theme=dark] .uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#1f1f1f;border-top:1px solid #333}.uppy-StatusBar-progress{background-color:#1269cf;height:2px;position:absolute;transition:background-color,width .3s ease-out;z-index:1001}.uppy-StatusBar-progress.is-indeterminate{animation:uppy-StatusBar-ProgressStripes 1s linear infinite;background-image:linear-gradient(45deg,#0000004d 25%,#0000 0 50%,#0000004d 0 75%,#0000 0,#0000);background-size:64px 64px}@keyframes uppy-StatusBar-ProgressStripes{0%{background-position:0 0}to{background-position:64px 0}}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-progress,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-progress{background-color:#f6a623}.uppy-StatusBar.is-waiting .uppy-StatusBar-progress{display:none}.uppy-StatusBar-content{align-items:center;color:#333;display:flex;height:100%;padding-inline-start:10px;position:relative;text-overflow:ellipsis;white-space:nowrap;z-index:1002}.uppy-size--md .uppy-StatusBar-content{padding-inline-start:15px}[data-uppy-theme=dark] .uppy-StatusBar-content{color:#eaeaea}.uppy-StatusBar-status{display:flex;flex-direction:column;font-weight:400;justify-content:center;line-height:1.4;padding-inline-end:.3em}.uppy-StatusBar-statusPrimary{display:flex;font-weight:500;line-height:1}.uppy-StatusBar-statusPrimary button.uppy-StatusBar-details{margin-left:5px}[data-uppy-theme=dark] .uppy-StatusBar-statusPrimary{color:#eaeaea}.uppy-StatusBar-statusSecondary{color:#757575;display:inline-block;font-size:11px;line-height:1.2;margin-top:1px;white-space:nowrap}[data-uppy-theme=dark] .uppy-StatusBar-statusSecondary{color:#bbb}.uppy-StatusBar-statusSecondaryHint{display:inline-block;line-height:1;margin-inline-end:5px;vertical-align:middle}.uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-inline-end:8px}.uppy-StatusBar-statusIndicator{color:#525252;margin-inline-end:7px;position:relative;top:1px}.uppy-StatusBar-statusIndicator svg{vertical-align:text-bottom}.uppy-StatusBar-actions{align-items:center;bottom:0;display:flex;inset-inline-end:10px;position:absolute;top:0;z-index:1004}.uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#fafafa;height:100%;padding:0 15px;position:static;width:100%}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#1f1f1f}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:column;height:90px}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:row;height:65px}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:column;justify-content:center}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:row;justify-content:normal}.uppy-StatusBar-actionCircleBtn{cursor:pointer;line-height:1;margin:3px;opacity:.9}.uppy-StatusBar-actionCircleBtn:focus{outline:none}.uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}.uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionCircleBtn:hover{opacity:1}.uppy-StatusBar-actionCircleBtn:focus{border-radius:50%}.uppy-StatusBar-actionCircleBtn svg{vertical-align:bottom}.uppy-StatusBar-actionBtn{color:#1269cf;display:inline-block;font-size:10px;line-height:inherit;vertical-align:middle}.uppy-size--md .uppy-StatusBar-actionBtn{font-size:11px}.uppy-StatusBar-actionBtn--disabled{opacity:.4}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--disabled{opacity:.7}.uppy-StatusBar-actionBtn--retry{background-color:#ff4b23;border-radius:8px;color:#fff;height:16px;line-height:1;margin-inline-end:6px;padding:1px 6px 3px 18px;position:relative}.uppy-StatusBar-actionBtn--retry:focus{outline:none}.uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionBtn--retry:hover{background-color:#f92d00}.uppy-StatusBar-actionBtn--retry svg{inset-inline-start:6px;position:absolute;top:3px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1bb240;color:#fff;font-size:14px;line-height:1;padding:15px 10px;width:100%}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#189c38}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1c8b37}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#18762f}.uppy-size--md .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{padding:13px 22px;width:auto}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1bb240;cursor:not-allowed}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1c8b37}.uppy-StatusBar:not(.is-waiting) .uppy-StatusBar-actionBtn--upload{background-color:initial;color:#1269cf}.uppy-StatusBar-actionBtn--uploadNewlyAdded{border-radius:3px;padding-inline-end:3px;padding-bottom:1px;padding-inline-start:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}.uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded{display:none}.uppy-StatusBar-actionBtn--done{border-radius:3px;line-height:1;padding:7px 8px}.uppy-StatusBar-actionBtn--done:focus{outline:none}.uppy-StatusBar-actionBtn--done::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--done:hover{color:#0e51a0}.uppy-StatusBar-actionBtn--done:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done:focus{background-color:#333}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done{color:#02baf2}.uppy-size--md .uppy-StatusBar-actionBtn--done{font-size:14px}.uppy-StatusBar-serviceMsg{color:#000;font-size:11px;line-height:1.1;padding-left:10px}.uppy-size--md .uppy-StatusBar-serviceMsg{font-size:14px;padding-left:15px}[data-uppy-theme=dark] .uppy-StatusBar-serviceMsg{color:#eaeaea}.uppy-StatusBar-serviceMsg-ghostsIcon{left:6px;opacity:.5;position:relative;top:2px;vertical-align:text-bottom;width:10px}.uppy-size--md .uppy-StatusBar-serviceMsg-ghostsIcon{left:10px;top:1px;width:15px}.uppy-StatusBar-details{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#939393;border-radius:50%;color:#fff;cursor:help;display:inline-block;font-size:10px;font-weight:600;height:13px;inset-inline-start:2px;line-height:12px;position:relative;text-align:center;top:0;vertical-align:middle;width:13px}.uppy-StatusBar-details:after{line-height:1.3;word-wrap:break-word}.uppy-StatusBar-spinner{animation-duration:1s;animation-iteration-count:infinite;animation-name:uppy-StatusBar-spinnerAnimation;animation-timing-function:linear;fill:#1269cf;margin-inline-end:10px}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-spinner,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-spinner{fill:#f6a623}@keyframes uppy-StatusBar-spinnerAnimation{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.uppy-transition-slideDownUp-enter{opacity:.01;transform:translate3d(0,-105%,0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-enter.uppy-transition-slideDownUp-enter-active{opacity:1;transform:translateZ(0)}.uppy-transition-slideDownUp-leave{opacity:1;transform:translateZ(0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-leave.uppy-transition-slideDownUp-leave-active{opacity:.01;transform:translate3d(0,-105%,0)}@keyframes uppy-Dashboard-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes uppy-Dashboard-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes uppy-Dashboard-slideDownAndFadeIn{0%{opacity:0;transform:translate3d(-50%,-70%,0)}to{opacity:1;transform:translate3d(-50%,-50%,0)}}@keyframes uppy-Dashboard-slideDownAndFadeIn--small{0%{opacity:0;transform:translate3d(0,-20%,0)}to{opacity:1;transform:translateZ(0)}}@keyframes uppy-Dashboard-slideUpFadeOut{0%{opacity:1;transform:translate3d(-50%,-50%,0)}to{opacity:0;transform:translate3d(-50%,-70%,0)}}@keyframes uppy-Dashboard-slideUpFadeOut--small{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20%,0)}}.uppy-Dashboard--modal{z-index:1001}.uppy-Dashboard--modal[aria-hidden=true]{display:none}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeIn .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeOut .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard-isFixed{height:100vh;overflow:hidden}.uppy-Dashboard--modal .uppy-Dashboard-overlay{background-color:#00000080;inset:0;position:fixed;z-index:1001}.uppy-Dashboard-inner{background-color:#f4f4f4;border:1px solid #eaeaea;border-radius:5px;max-height:100%;max-width:100%;outline:none;position:relative}.uppy-size--md .uppy-Dashboard-inner{min-height:auto}@media only screen and (min-width:820px){.uppy-Dashboard-inner{height:500px;width:650px}}.uppy-Dashboard--modal .uppy-Dashboard-inner{z-index:1002}[data-uppy-theme=dark] .uppy-Dashboard-inner{background-color:#1f1f1f}.uppy-Dashboard--isDisabled .uppy-Dashboard-inner{cursor:not-allowed}.uppy-Dashboard-innerWrap{border-radius:5px;display:flex;flex-direction:column;height:100%;opacity:0;overflow:hidden;position:relative}.uppy-Dashboard--isInnerWrapVisible .uppy-Dashboard-innerWrap{opacity:1}.uppy-Dashboard--isDisabled .uppy-Dashboard-innerWrap{cursor:not-allowed;filter:grayscale(100%);opacity:.6;-webkit-user-select:none;-moz-user-select:none;user-select:none}.uppy-Dashboard--isDisabled .uppy-ProviderIconBg{fill:#9f9f9f}.uppy-Dashboard--isDisabled [aria-disabled],.uppy-Dashboard--isDisabled [disabled]{cursor:not-allowed;pointer-events:none}.uppy-Dashboard--modal .uppy-Dashboard-inner{border:none;inset:35px 15px 15px;position:fixed}@media only screen and (min-width:820px){.uppy-Dashboard--modal .uppy-Dashboard-inner{box-shadow:0 5px 15px 4px #00000026;left:50%;right:auto;top:50%;transform:translate(-50%,-50%)}}.uppy-Dashboard-close{color:#ffffffe6;cursor:pointer;display:block;font-size:27px;inset-inline-end:-2px;position:absolute;top:-33px;z-index:1005}.uppy-Dashboard-close:focus{outline:none}.uppy-Dashboard-close::-moz-focus-inner{border:0}.uppy-Dashboard-close:focus{color:#6eabf2}@media only screen and (min-width:820px){.uppy-Dashboard-close{font-size:35px;inset-inline-end:-35px;top:-10px}}.uppy-Dashboard-serviceMsg{background-color:#fffbf7;border-bottom:1px solid #edd4b9;border-top:1px solid #edd4b9;font-size:12px;font-weight:500;line-height:1.3;padding:12px 0;position:relative;top:-1px;z-index:1004}.uppy-size--md .uppy-Dashboard-serviceMsg{font-size:14px;line-height:1.4}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg{background-color:#1f1f1f;border-bottom:1px solid #333;border-top:1px solid #333;color:#eaeaea}.uppy-Dashboard-serviceMsg-title{display:block;line-height:1;margin-bottom:4px;padding-left:42px}.uppy-Dashboard-serviceMsg-text{padding:0 15px}.uppy-Dashboard-serviceMsg-actionBtn{color:#1269cf;font-size:inherit;font-weight:inherit;vertical-align:initial}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg-actionBtn{color:#02baf2e6}.uppy-Dashboard-serviceMsg-icon{left:15px;position:absolute;top:10px}.uppy-Dashboard-AddFiles{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;position:relative;text-align:center}[data-uppy-drag-drop-supported=true] .uppy-Dashboard-AddFiles{border:1px dashed #dfdfdf;border-radius:3px;height:calc(100% - 14px);margin:7px}.uppy-Dashboard-AddFilesPanel .uppy-Dashboard-AddFiles{border:none;height:calc(100% - 54px)}.uppy-Dashboard--modal .uppy-Dashboard-AddFiles{border-color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles{border-color:#757575}.uppy-Dashboard-AddFiles-info{display:none;margin-top:auto;padding-bottom:15px;padding-top:15px}.uppy-size--height-md .uppy-Dashboard-AddFiles-info{display:block}.uppy-size--md .uppy-Dashboard-AddFiles-info{bottom:25px;left:0;padding-bottom:0;padding-top:30px;position:absolute;right:0}[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-info{margin-top:0}.uppy-Dashboard-browse{color:#1269cf;cursor:pointer}.uppy-Dashboard-browse:focus{outline:none}.uppy-Dashboard-browse::-moz-focus-inner{border:0}.uppy-Dashboard-browse:focus,.uppy-Dashboard-browse:hover{border-bottom:1px solid #1269cf}[data-uppy-theme=dark] .uppy-Dashboard-browse{color:#02baf2e6}[data-uppy-theme=dark] .uppy-Dashboard-browse:focus,[data-uppy-theme=dark] .uppy-Dashboard-browse:hover{border-bottom:1px solid #02baf2}.uppy-Dashboard-browseBtn{display:block;font-size:14px;font-weight:500;margin-bottom:5px;margin-top:8px;width:100%}.uppy-size--md .uppy-Dashboard-browseBtn{font-size:15px;margin:15px auto;padding:13px 44px;width:auto}.uppy-Dashboard-AddFiles-list{display:flex;flex:1;flex-direction:column;margin-top:2px;overflow-y:auto;padding:2px 0;width:100%;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;margin-top:15px;max-width:600px;overflow-y:visible;padding-top:0}.uppy-DashboardTab{border-bottom:1px solid #eaeaea;text-align:center;width:100%}[data-uppy-theme=dark] .uppy-DashboardTab{border-bottom:1px solid #333}.uppy-size--md .uppy-DashboardTab{border-bottom:none;display:inline-block;margin-bottom:10px;width:auto}.uppy-DashboardTab-btn{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:initial;color:#525252;cursor:pointer;flex-direction:row;height:100%;justify-content:left;padding:12px 15px;width:100%}.uppy-DashboardTab-btn:focus{outline:none}.uppy-size--md .uppy-DashboardTab-btn{border-radius:5px;flex-direction:column;margin-inline-end:1px;padding:10px 3px;width:86px}[data-uppy-theme=dark] .uppy-DashboardTab-btn{color:#eaeaea}.uppy-DashboardTab-btn::-moz-focus-inner{border:0}.uppy-DashboardTab-btn:hover{background-color:#e9ecef}[data-uppy-theme=dark] .uppy-DashboardTab-btn:hover{background-color:#333}.uppy-DashboardTab-btn:active,.uppy-DashboardTab-btn:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardTab-btn:active,[data-uppy-theme=dark] .uppy-DashboardTab-btn:focus{background-color:#525252}.uppy-DashboardTab-btn svg{display:inline-block;max-height:100%;max-width:100%;overflow:hidden;transition:transform .15s ease-in-out;vertical-align:text-top}.uppy-DashboardTab-inner{align-items:center;background-color:#fff;border-radius:8px;box-shadow:0 1px 1px #0000001a,0 1px 2px #0000001a,0 2px 3px #00000005;display:flex;height:32px;justify-content:center;margin-inline-end:10px;width:32px}.uppy-size--md .uppy-DashboardTab-inner{margin-inline-end:0}[data-uppy-theme=dark] .uppy-DashboardTab-inner{background-color:#323232;box-shadow:0 1px 1px #0003,0 1px 2px #0003,0 2px 3px #00000014}.uppy-DashboardTab-name{font-size:14px;font-weight:400}.uppy-size--md .uppy-DashboardTab-name{font-size:12px;line-height:15px;margin-bottom:0;margin-top:8px}.uppy-DashboardTab-iconMyDevice{color:#1269cf}[data-uppy-theme=dark] .uppy-DashboardTab-iconMyDevice{color:#02baf2}.uppy-DashboardTab-iconBox{color:#0061d5}[data-uppy-theme=dark] .uppy-DashboardTab-iconBox{color:#eaeaea}.uppy-DashboardTab-iconDropbox{color:#0061fe}[data-uppy-theme=dark] .uppy-DashboardTab-iconDropbox{color:#eaeaea}.uppy-DashboardTab-iconUnsplash{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconUnsplash{color:#eaeaea}.uppy-DashboardTab-iconWebdav{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconWebdav{color:#eaeaea}.uppy-DashboardTab-iconScreenRec{color:#2c3e50}[data-uppy-theme=dark] .uppy-DashboardTab-iconScreenRec{color:#eaeaea}.uppy-DashboardTab-iconAudio{color:#8030a3}[data-uppy-theme=dark] .uppy-DashboardTab-iconAudio{color:#bf6ee3}.uppy-Dashboard-input{height:.1px;opacity:0;overflow:hidden;position:absolute;width:.1px;z-index:-1}.uppy-DashboardContent-bar{align-items:center;background-color:#fafafa;border-bottom:1px solid #eaeaea;display:flex;flex-shrink:0;height:40px;justify-content:space-between;padding:0 10px;position:relative;width:100%;z-index:1004}.uppy-size--md .uppy-DashboardContent-bar{height:50px;padding:0 15px}[data-uppy-theme=dark] .uppy-DashboardContent-bar{background-color:#1f1f1f;border-bottom:1px solid #333}.uppy-DashboardContent-title{font-size:12px;font-weight:500;left:0;line-height:40px;margin:auto;max-width:170px;overflow-x:hidden;position:absolute;right:0;text-align:center;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}.uppy-size--md .uppy-DashboardContent-title{font-size:14px;line-height:50px;max-width:300px}[data-uppy-theme=dark] .uppy-DashboardContent-title{color:#eaeaea}.uppy-DashboardContent-back,.uppy-DashboardContent-save{-webkit-appearance:none;background:none;border:0;border-radius:3px;color:inherit;color:#1269cf;cursor:pointer;font-family:inherit;font-size:inherit;font-size:12px;font-weight:400;line-height:1;margin:0;margin-inline-start:-6px;padding:7px 6px}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{outline:none}.uppy-DashboardContent-back::-moz-focus-inner,.uppy-DashboardContent-save::-moz-focus-inner{border:0}.uppy-DashboardContent-back:hover,.uppy-DashboardContent-save:hover{color:#0e51a0}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-back:focus,[data-uppy-theme=dark] .uppy-DashboardContent-save:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-back,.uppy-size--md .uppy-DashboardContent-save{font-size:14px}[data-uppy-theme=dark] .uppy-DashboardContent-back,[data-uppy-theme=dark] .uppy-DashboardContent-save{color:#02baf2}.uppy-DashboardContent-addMore{-webkit-appearance:none;background:none;border:0;border-radius:3px;color:inherit;color:#1269cf;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:500;height:29px;line-height:1;margin:0;margin-inline-end:-5px;padding:7px 8px;width:29px}.uppy-DashboardContent-addMore:focus{outline:none}.uppy-DashboardContent-addMore::-moz-focus-inner{border:0}.uppy-DashboardContent-addMore:hover{color:#0e51a0}.uppy-DashboardContent-addMore:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-addMore:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-addMore{font-size:14px;height:auto;margin-inline-end:-8px;width:auto}[data-uppy-theme=dark] .uppy-DashboardContent-addMore{color:#02baf2}.uppy-DashboardContent-addMore svg{margin-inline-end:4px;vertical-align:initial}.uppy-size--md .uppy-DashboardContent-addMore svg{height:11px;width:11px}.uppy-DashboardContent-addMoreCaption{display:none}.uppy-size--md .uppy-DashboardContent-addMoreCaption{display:inline}.uppy-DashboardContent-panel{background-color:#f5f5f5;flex:1}.uppy-Dashboard-AddFilesPanel,.uppy-DashboardContent-panel{border-radius:5px;display:flex;flex-direction:column;inset:0;overflow:hidden;position:absolute;z-index:1005}.uppy-Dashboard-AddFilesPanel{background:#fafafa;background:linear-gradient(0deg,#fafafa 35%,#fafafad9);box-shadow:0 0 10px 5px #00000026}[data-uppy-theme=dark] .uppy-Dashboard-AddFilesPanel{background-color:#333;background-image:linear-gradient(0deg,#1f1f1f 35%,#1f1f1fd9)}.uppy-Dashboard--isAddFilesPanelVisible .uppy-Dashboard-files{filter:blur(2px)}.uppy-Dashboard-progress{bottom:0;height:12%;left:0;position:absolute;width:100%}.uppy-Dashboard-progressBarContainer.is-active{height:100%;left:0;position:absolute;top:0;width:100%;z-index:1004}.uppy-Dashboard-filesContainer{flex:1;margin:0;overflow-y:hidden;position:relative}.uppy-Dashboard-filesContainer:after{clear:both;content:"";display:table}.uppy-Dashboard-files{flex:1;margin:0;overflow-y:auto;padding:0 0 10px;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-files{padding-top:10px}.uppy-Dashboard--singleFile .uppy-Dashboard-filesInner{align-items:center;display:flex;height:100%;justify-content:center}.uppy-Dashboard-dropFilesHereHint{align-items:center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath fill='%231269CF' d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");background-position:50% 50%;background-repeat:no-repeat;border:1px dashed #1269cf;border-radius:3px;color:#757575;display:flex;font-size:16px;justify-content:center;inset:7px;padding-top:90px;position:absolute;text-align:center;visibility:hidden;z-index:2000}[data-uppy-theme=dark] .uppy-Dashboard-dropFilesHereHint{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath fill='%2302BAF2' d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");border-color:#02baf2;color:#bbb}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-dropFilesHereHint{pointer-events:none;visibility:visible}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-files,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-progressindicators,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-serviceMsg,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardContent-bar{opacity:.15}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-AddFiles{opacity:.03}.uppy-Dashboard-AddFiles-title{color:#000;font-size:17px;font-weight:500;line-height:1.35;margin-bottom:5px;margin-top:15px;padding:0 15px;text-align:inline-start;width:100%}.uppy-size--md .uppy-Dashboard-AddFiles-title{font-size:21px;font-weight:400;margin-top:5px;max-width:480px;padding:0 35px;text-align:center}[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-title{text-align:center}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title{color:#eaeaea}.uppy-Dashboard-AddFiles-title button{font-weight:500}.uppy-size--md .uppy-Dashboard-AddFiles-title button{font-weight:400}.uppy-Dashboard-note{color:#757575;font-size:14px;line-height:1.25;margin:auto;max-width:350px;padding:0 15px;text-align:center}.uppy-size--md .uppy-Dashboard-note{line-height:1.35;max-width:600px}[data-uppy-theme=dark] .uppy-Dashboard-note{color:#cfcfcf}a.uppy-Dashboard-poweredBy{color:#939393;display:inline-block;font-size:11px;margin-top:8px;text-align:center;text-decoration:none}.uppy-Dashboard-poweredByIcon{margin-left:1px;margin-right:1px;opacity:.9;position:relative;top:1px;vertical-align:text-top;fill:none;stroke:#939393}.uppy-Dashboard-Item-previewIcon{height:25px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:25px;z-index:100}.uppy-size--md .uppy-Dashboard-Item-previewIcon{height:38px;width:38px}.uppy-Dashboard-Item-previewIcon svg{height:100%;width:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIcon{height:100%;max-height:60%;max-width:60%;width:100%}.uppy-Dashboard-Item-previewIconWrap{height:76px;max-height:75%;position:relative}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIconWrap{height:100%;width:100%}.uppy-Dashboard-Item-previewIconBg{filter:drop-shadow(rgba(0,0,0,.1) 0 1px 1px);height:100%;width:100%}.uppy-Dashboard-upload{height:50px;position:relative;width:50px}.uppy-size--md .uppy-Dashboard-upload{height:60px;width:60px}.uppy-Dashboard-upload .uppy-c-icon{position:relative;top:1px;width:50%}.uppy-Dashboard-uploadCount{background-color:#1bb240;border-radius:50%;color:#fff;font-size:8px;height:16px;inset-inline-end:-12px;line-height:16px;position:absolute;top:-12px;width:16px}.uppy-size--md .uppy-Dashboard-uploadCount{font-size:9px;height:18px;line-height:18px;width:18px}.uppy-Dashboard-inner{border:none!important;background:transparent!important}.uppy-Dashboard-innerWrap{border-radius:.5rem;overflow:hidden}.uppy-Dashboard-AddFiles{border:2px dashed hsl(var(--border))!important;border-radius:.5rem!important;background:hsl(var(--muted) / .3)!important;transition:all .2s ease}.uppy-Dashboard-AddFiles:hover{border-color:hsl(var(--primary))!important;background:hsl(var(--muted) / .5)!important}.uppy-Dashboard-AddFiles-title{color:hsl(var(--foreground))!important;font-weight:500!important}.uppy-Dashboard-AddFiles-info{color:hsl(var(--muted-foreground))!important}.uppy-Dashboard-browse{color:hsl(var(--primary))!important;font-weight:500!important}.uppy-Dashboard-browse:hover{text-decoration:underline!important}.uppy-Dashboard-files{background:transparent!important}.uppy-Dashboard-Item{border-bottom-color:hsl(var(--border))!important}.uppy-Dashboard-Item-name{color:hsl(var(--foreground))!important}.uppy-Dashboard-Item-status{color:hsl(var(--muted-foreground))!important}.uppy-StatusBar{background:hsl(var(--muted))!important;border-top:1px solid hsl(var(--border))!important}.uppy-StatusBar-progress{background:hsl(var(--primary))!important}.uppy-StatusBar-content{color:hsl(var(--foreground))!important}.uppy-StatusBar-actionBtn--upload{background:hsl(var(--primary))!important;color:hsl(var(--primary-foreground))!important;border-radius:.375rem!important;font-weight:500!important;padding:.5rem 1rem!important}.uppy-StatusBar-actionBtn--upload:hover{background:hsl(var(--primary) / .9)!important}.uppy-Dashboard-note{color:hsl(var(--muted-foreground))!important;font-size:.75rem!important}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles,.dark .uppy-Dashboard-AddFiles{background:hsl(var(--muted) / .2)!important}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title,.dark .uppy-Dashboard-AddFiles-title{color:hsl(var(--foreground))!important}[data-uppy-theme=dark] .uppy-StatusBar,.dark .uppy-StatusBar{background:hsl(var(--muted) / .5)!important}.uppy-Dashboard{font-family:inherit!important}.uppy-Dashboard-Item-preview{border-radius:.375rem!important;overflow:hidden}.uppy-Dashboard-Item-action--remove{color:hsl(var(--destructive))!important}.uppy-Dashboard-Item-action--remove:hover{opacity:.8}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{color:hsl(var(--success, 142 76% 36%))!important}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progress{color:hsl(var(--destructive))!important}.uppy-Dashboard-files::-webkit-scrollbar{width:6px}.uppy-Dashboard-files::-webkit-scrollbar-track{background:transparent}.uppy-Dashboard-files::-webkit-scrollbar-thumb{background:hsl(var(--muted-foreground) / .3);border-radius:3px}.uppy-Dashboard-files::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground) / .5)}.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.react-flow__node.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%} diff --git a/webui/dist/assets/index-RB5cYCSR.css b/webui/dist/assets/index-RB5cYCSR.css deleted file mode 100644 index 39537543..00000000 --- a/webui/dist/assets/index-RB5cYCSR.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";*,: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:#e5e7eb}: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:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";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:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}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}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 221.2 83.2% 53.3%;--primary-foreground: 210 40% 98%;--primary-gradient: none;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 221.2 83.2% 53.3%;--radius: .5rem;--chart-1: 221.2 83.2% 53.3%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 217.2 91.2% 59.8%;--primary-foreground: 210 40% 98%;--primary-gradient: none;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 224.3 76.3% 48%;--chart-1: 217.2 91.2% 59.8%;--chart-2: 160 60% 50%;--chart-3: 30 80% 60%;--chart-4: 280 65% 65%;--chart-5: 340 75% 60%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-16{inset:4rem}.inset-8{inset:2rem}.inset-x-0{left:0;right:0}.inset-x-4{left:1rem;right:1rem}.inset-y-0{top:0;bottom:0}.-bottom-20{bottom:-5rem}.-left-20{left:-5rem}.-right-2{right:-.5rem}.-right-20{right:-5rem}.-top-2{top:-.5rem}.-top-20{top:-5rem}.bottom-0{bottom:0}.bottom-1\/4{bottom:25%}.bottom-24{bottom:6rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-1\/4{left:25%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\.5{right:.375rem}.right-1\/3{right:33.333333%}.right-1\/4{right:25%}.right-2{right:.5rem}.right-4{right:1rem}.right-8{right:2rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-1\/2{top:50%}.top-1\/4{top:25%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-3\/4{top:75%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.order-1{order:1}.order-2{order:2}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[1px\]{margin-bottom:1px}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-10{margin-left:2.5rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.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-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:16 / 9}.size-4{width:1rem;height:1rem}.size-\[--cell-size\]{width:var(--cell-size);height:var(--cell-size)}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[--cell-size\]{height:var(--cell-size)}.h-\[1\.25rem\]{height:1.25rem}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[250px\]{height:250px}.h-\[280px\]{height:280px}.h-\[2px\]{height:2px}.h-\[300px\]{height:300px}.h-\[350px\]{height:350px}.h-\[400px\]{height:400px}.h-\[600px\]{height:600px}.h-\[70vh\]{height:70vh}.h-\[90vh\]{height:90vh}.h-\[calc\(100vh-12rem\)\]{height:calc(100vh - 12rem)}.h-\[calc\(100vh-200px\)\]{height:calc(100vh - 200px)}.h-\[calc\(100vh-240px\)\]{height:calc(100vh - 240px)}.h-\[calc\(100vh-260px\)\]{height:calc(100vh - 260px)}.h-\[calc\(100vh-4rem\)\]{height:calc(100vh - 4rem)}.h-\[calc\(85vh-220px\)\]{height:calc(85vh - 220px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-64{max-height:16rem}.max-h-\[--radix-context-menu-content-available-height\]{max-height:var(--radix-context-menu-content-available-height)}.max-h-\[--radix-select-content-available-height\]{max-height:var(--radix-select-content-available-height)}.max-h-\[200px\]{max-height:200px}.max-h-\[300px\]{max-height:300px}.max-h-\[400px\]{max-height:400px}.max-h-\[60vh\]{max-height:60vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(90vh-120px\)\]{max-height:calc(90vh - 120px)}.max-h-\[calc\(90vh-8rem\)\]{max-height:calc(90vh - 8rem)}.max-h-full{max-height:100%}.max-h-none{max-height:none}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-\[100px\]{min-height:100px}.min-h-\[300px\]{min-height:300px}.min-h-\[400px\]{min-height:400px}.min-h-\[40px\]{min-height:40px}.min-h-\[60px\]{min-height:60px}.min-h-\[xxx\]{min-height:xxx}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[--cell-size\]{width:var(--cell-size)}.w-\[100px\]{width:100px}.w-\[120px\]{width:120px}.w-\[130px\]{width:130px}.w-\[140px\]{width:140px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[600px\]{width:600px}.w-\[65px\]{width:65px}.w-\[70px\]{width:70px}.w-\[95vw\]{width:95vw}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[--cell-size\]{min-width:var(--cell-size)}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-\[80px\]{min-width:80px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.max-w-24{max-width:6rem}.max-w-2xl{max-width:42rem}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-\[100px\]{max-width:100px}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[60px\]{max-width:60px}.max-w-\[75\%\]{max-width:75%}.max-w-\[90\%\]{max-width:90%}.max-w-\[95vw\]{max-width:95vw}.max-w-\[var\(--max-width\)\]{max-width:var(--max-width)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.origin-\[--radix-context-menu-content-transform-origin\]{transform-origin:var(--radix-context-menu-content-transform-origin)}.origin-\[--radix-popover-content-transform-origin\]{transform-origin:var(--radix-popover-content-transform-origin)}.origin-\[--radix-select-content-transform-origin\]{transform-origin:var(--radix-select-content-transform-origin)}.origin-\[--radix-tooltip-content-transform-origin\]{transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x: -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-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-32{--tw-translate-x: 8rem;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-\[-50\%\]{--tw-translate-x: -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-y-\[-50\%\]{--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))}.-rotate-90{--tw-rotate: -90deg;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))}.scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;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))}.transform{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))}.animate-\[ping_3s_ease-in-out_infinite\]{animation:ping 3s ease-in-out infinite}.animate-\[ping_3s_ease-in-out_infinite_0\.5s\]{animation:ping 3s ease-in-out infinite .5s}.animate-\[ping_3s_ease-in-out_infinite_1s\]{animation:ping 3s ease-in-out infinite 1s}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-rows-\[auto_1fr_auto\]{grid-template-rows:auto 1fr auto}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.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-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))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.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:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-sm{border-top-right-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[1\.5px\]{border-width:1.5px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[--color-border\]{border-color:var(--color-border)}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-current{border-color:currentColor}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity, 1))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(21 128 61 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/30{border-color:hsl(var(--muted-foreground) / .3)}.border-muted-foreground\/50{border-color:hsl(var(--muted-foreground) / .5)}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-orange-500\/20{border-color:#f9731633}.border-orange-600{--tw-border-opacity: 1;border-color:rgb(234 88 12 / var(--tw-border-opacity, 1))}.border-pink-500\/20{border-color:#ec489933}.border-primary{border-color:hsl(var(--primary))}.border-primary\/10{border-color:hsl(var(--primary) / .1)}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-primary\/30{border-color:hsl(var(--primary) / .3)}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.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-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/50{border-color:#ef444480}.border-transparent{border-color:transparent}.border-white\/30{border-color:#ffffff4d}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-yellow-500\/50{border-color:#eab30880}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[--color-bg\]{background-color:var(--color-bg)}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.bg-amber-700{--tw-bg-opacity: 1;background-color:rgb(180 83 9 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/50{background-color:hsl(var(--background) / .5)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-background\/95{background-color:hsl(var(--background) / .95)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/50{background-color:#00000080}.bg-black\/80{background-color:#000c}.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-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-card\/50{background-color:hsl(var(--card) / .5)}.bg-card\/80{background-color:hsl(var(--card) / .8)}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-800\/20{background-color:#1f293733}.bg-gray-800\/30{background-color:#1f29374d}.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-500\/20{background-color:#22c55e33}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground\/50{background-color:hsl(var(--muted-foreground) / .5)}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-muted\/60{background-color:hsl(var(--muted) / .6)}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-50\/10{background-color:#fff7ed1a}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-orange-500\/10{background-color:#f973161a}.bg-orange-500\/20{background-color:#f9731633}.bg-orange-600{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(236 72 153 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground\/20{background-color:hsl(var(--primary-foreground) / .2)}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/15{background-color:hsl(var(--primary) / .15)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-primary\/60{background-color:hsl(var(--primary) / .6)}.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-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-red-900\/20{background-color:#7f1d1d33}.bg-red-900\/30{background-color:#7f1d1d4d}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/5{background-color:hsl(var(--secondary) / .05)}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-300{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/5{background-color:#eab3080d}.bg-yellow-900\/20{background-color:#713f1233}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.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)}.from-background{--tw-gradient-from: hsl(var(--background)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #22c55e var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-50{--tw-gradient-from: #eef2ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(238 242 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500{--tw-gradient-from: #f97316 var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-50{--tw-gradient-from: #fdf2f8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(253 242 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500\/10{--tw-gradient-from: rgb(236 72 153 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary\/5{--tw-gradient-from: hsl(var(--primary) / .05) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #a855f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-rose-50{--tw-gradient-from: #fff1f2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 241 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-200{--tw-gradient-from: #e2e8f0 var(--tw-gradient-from-position);--tw-gradient-to: rgb(226 232 240 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-300{--tw-gradient-from: #cbd5e1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(203 213 225 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-slate-400{--tw-gradient-from: #94a3b8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(148 163 184 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-background{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background)) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-blue-50{--tw-gradient-to: #eff6ff var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #2563eb var(--tw-gradient-to-position)}.to-cyan-500{--tw-gradient-to: #06b6d4 var(--tw-gradient-to-position)}.to-emerald-500{--tw-gradient-to: #10b981 var(--tw-gradient-to-position)}.to-green-600{--tw-gradient-to: #16a34a var(--tw-gradient-to-position)}.to-muted\/50{--tw-gradient-to: hsl(var(--muted) / .5) var(--tw-gradient-to-position)}.to-orange-50{--tw-gradient-to: #fff7ed var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.to-pink-50{--tw-gradient-to: #fdf2f8 var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #ec4899 var(--tw-gradient-to-position)}.to-primary\/10{--tw-gradient-to: hsl(var(--primary) / .1) var(--tw-gradient-to-position)}.to-purple-50{--tw-gradient-to: #faf5ff var(--tw-gradient-to-position)}.to-purple-500{--tw-gradient-to: #a855f7 var(--tw-gradient-to-position)}.to-purple-500\/10{--tw-gradient-to: rgb(168 85 247 / .1) var(--tw-gradient-to-position)}.to-secondary\/5{--tw-gradient-to: hsl(var(--secondary) / .05) var(--tw-gradient-to-position)}.to-slate-700{--tw-gradient-to: #334155 var(--tw-gradient-to-position)}.to-slate-800{--tw-gradient-to: #1e293b var(--tw-gradient-to-position)}.to-slate-900{--tw-gradient-to: #0f172a var(--tw-gradient-to-position)}.to-violet-50{--tw-gradient-to: #f5f3ff var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-current{fill:currentColor}.fill-red-500{fill:#ef4444}.fill-yellow-400{fill:#facc15}.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-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[--cell-size\]{padding-left:var(--cell-size);padding-right:var(--cell-size)}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[150px\]{font-size:150px}.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-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.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-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-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/10{color:hsl(var(--muted-foreground) / .1)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-pink-500{--tw-text-opacity: 1;color:rgb(236 72 153 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary-foreground\/70{color:hsl(var(--primary-foreground) / .7)}.text-primary\/10{color:hsl(var(--primary) / .1)}.text-primary\/30{color:hsl(var(--primary) / .3)}.text-primary\/60{color:hsl(var(--primary) / .6)}.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-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-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(113 63 18 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.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-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px 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-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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(0px + 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-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-2{--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)}.ring-4{--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(4px + 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-border\/50{--tw-ring-color: hsl(var(--border) / .5)}.ring-orange-500\/50{--tw-ring-color: rgb(249 115 22 / .5)}.ring-primary{--tw-ring-color: hsl(var(--primary))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--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)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-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-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;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}.delay-150{transition-delay:.15s}.delay-300{transition-delay:.3s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.text-primary-gradient{color:hsl(var(--primary))}.has-gradient .text-primary-gradient{background:var(--primary-gradient);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}.\[--cell-size\:2rem\]{--cell-size: 2rem}@font-face{font-family:JetBrains Mono;src:url(/fonts/JetBrainsMono-Medium.ttf) format("truetype");font-weight:500;font-style:normal;font-display:swap}.no-animations *,.no-animations *:before,.no-animations *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}.no-animations *:hover{transition-duration:.01ms!important}::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:999}.__floater{z-index:99999!important;pointer-events:auto!important}.react-joyride__overlay,.react-joyride__spotlight{z-index:99998!important}.react-joyride__tooltip{pointer-events:auto!important}#tour-portal-container *{pointer-events:auto}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.custom-scrollbar::-webkit-scrollbar{width:8px;height:8px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent;border-radius:4px}.custom-scrollbar::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:4px;border:2px solid transparent;background-clip:content-box}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground) / .5);background-clip:content-box}.custom-scrollbar::-webkit-scrollbar-corner{background:transparent}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;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))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;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))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.hover\:border-muted-foreground\/50:hover{border-color:hsl(var(--muted-foreground) / .5)}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary) / .5)}.hover\:border-red-200:hover{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-amber-700:hover{--tw-bg-opacity: 1;background-color:rgb(180 83 9 / var(--tw-bg-opacity, 1))}.hover\:bg-background\/50:hover{background-color:hsl(var(--background) / .5)}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / 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-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted-foreground\/20:hover{background-color:hsl(var(--muted-foreground) / .2)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-orange-700:hover{--tw-bg-opacity: 1;background-color:rgb(194 65 12 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-secondary\/90:hover{background-color:hsl(var(--secondary) / .9)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-white\/30:hover{background-color:#ffffff4d}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:from-pink-500\/20:hover{--tw-gradient-from: rgb(236 72 153 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-purple-500\/20:hover{--tw-gradient-to: rgb(168 85 247 / .2) var(--tw-gradient-to-position)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-amber-900:hover{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(22 163 74 / 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-orange-700:hover{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / 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-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\:text-yellow-300:hover{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--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)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-2:hover{--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)}.hover\:ring-primary:hover{--tw-ring-color: hsl(var(--primary))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--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(0px + 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-visible\:ring-1:focus-visible{--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)}.focus-visible\:ring-2:focus-visible{--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-visible\:ring-red-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;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))}.active\:cursor-grabbing:active{cursor:grabbing}.active\:border-primary\/70:active{border-color:hsl(var(--primary) / .7)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group[open] .group-open\: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))}.group:hover .group-hover\:-translate-y-1{--tw-translate-y: -.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))}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;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))}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=inactive\]\:hidden[data-state=inactive]{display:none}.data-\[state\=inactive\]\:h-0[data-state=inactive]{height:0px}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .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))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--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))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--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))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.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))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;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))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--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))}.data-\[swipe\=cancel\]\:translate-y-0[data-swipe=cancel]{--tw-translate-y: 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))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);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))}.data-\[swipe\=end\]\:translate-y-\[var\(--radix-toast-swipe-end-y\)\][data-swipe=end]{--tw-translate-y: var(--radix-toast-swipe-end-y);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))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);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))}.data-\[swipe\=move\]\:translate-y-\[var\(--radix-toast-swipe-move-y\)\][data-swipe=move]{--tw-translate-y: var(--radix-toast-swipe-move-y);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 fade-out{0%{opacity:1}to{opacity:0}}.data-\[state\=closed\]\:animate-fade-out[data-state=closed]{animation:fade-out .15s ease-in}.data-\[state\=closed\]\:animate-slide-out-to-right[data-state=closed]{animation:slide-out-to-right .2s ease-in}.data-\[state\=closed\]\:animate-slide-out-to-top[data-state=closed]{animation:slide-out-to-top .2s ease-in}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.data-\[state\=open\]\:animate-fade-in[data-state=open]{animation:fade-in .2s ease-out}@keyframes slide-in-from-right{0%{transform:translate(100%)}to{transform:translate(0)}}.data-\[state\=open\]\:animate-slide-in-from-right[data-state=open]{animation:slide-in-from-right .3s ease-out}@keyframes slide-in-from-top{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.data-\[state\=open\]\:animate-slide-in-from-top[data-state=open]{animation:slide-in-from-top .3s ease-out}@keyframes slide-out-to-right{0%{transform:translate(0)}to{transform:translate(100%)}}.data-\[swipe\=end\]\:animate-slide-out-to-right[data-swipe=end]{animation:slide-out-to-right .2s ease-in}@keyframes slide-out-to-top{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.data-\[swipe\=end\]\:animate-slide-out-to-top[data-swipe=end]{animation:slide-out-to-top .2s ease-in}.data-\[range-end\=true\]\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-middle\=true\]\:rounded-none[data-range-middle=true]{border-radius:0}.data-\[range-start\=true\]\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\[selected\=true\]\:rounded-none[data-selected=true]{border-radius:0}.data-\[range-end\=true\]\:bg-primary[data-range-end=true]{background-color:hsl(var(--primary))}.data-\[range-middle\=true\]\:bg-accent[data-range-middle=true]{background-color:hsl(var(--accent))}.data-\[range-start\=true\]\:bg-primary[data-range-start=true],.data-\[selected-single\=true\]\:bg-primary[data-selected-single=true]{background-color:hsl(var(--primary))}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\[range-end\=true\]\:text-primary-foreground[data-range-end=true]{color:hsl(var(--primary-foreground))}.data-\[range-middle\=true\]\:text-accent-foreground[data-range-middle=true]{color:hsl(var(--accent-foreground))}.data-\[range-start\=true\]\:text-primary-foreground[data-range-start=true],.data-\[selected-single\=true\]\:text-primary-foreground[data-selected-single=true]{color:hsl(var(--primary-foreground))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--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)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--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)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=active\]\:duration-300[data-state=active]{transition-duration:.3s}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:relative{position:relative}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:z-10{z-index:10}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:border-ring{border-color:hsl(var(--ring))}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:ring-\[3px\]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group\/day[data-focused=true] .group-data-\[focused\=true\]\/day\:ring-ring\/50{--tw-ring-color: hsl(var(--ring) / .5)}@supports (backdrop-filter: var(--tw)){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:hsl(var(--background) / .6)}}.dark\:border-amber-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-blue-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity, 1))}.dark\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.dark\:border-green-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(20 83 45 / var(--tw-border-opacity, 1))}.dark\:border-orange-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(124 45 18 / var(--tw-border-opacity, 1))}.dark\:border-red-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity, 1))}.dark\:border-yellow-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(113 63 18 / var(--tw-border-opacity, 1))}.dark\:bg-amber-950\/30:is(.dark *){background-color:#451a034d}.dark\:bg-blue-500\/20:is(.dark *){background-color:#3b82f633}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950\/20:is(.dark *){background-color:#17255433}.dark\:bg-blue-950\/30:is(.dark *){background-color:#1725544d}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900\/30:is(.dark *){background-color:#14532d4d}.dark\:bg-green-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 46 22 / var(--tw-bg-opacity, 1))}.dark\:bg-green-950\/20:is(.dark *){background-color:#052e1633}.dark\:bg-orange-950\/20:is(.dark *){background-color:#43140733}.dark\:bg-red-500\/20:is(.dark *){background-color:#ef444433}.dark\:bg-red-600\/30:is(.dark *){background-color:#dc26264d}.dark\:bg-red-900\/30:is(.dark *){background-color:#7f1d1d4d}.dark\:bg-red-950\/20:is(.dark *){background-color:#450a0a33}.dark\:bg-red-950\/50:is(.dark *){background-color:#450a0a80}.dark\:bg-yellow-500\/20:is(.dark *){background-color:#eab30833}.dark\:bg-yellow-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950\/30:is(.dark *){background-color:#4220064d}.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\:from-indigo-950\/20:is(.dark *){--tw-gradient-from: rgb(30 27 75 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 27 75 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-pink-950\/20:is(.dark *){--tw-gradient-from: rgb(80 7 36 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(80 7 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-rose-950\/20:is(.dark *){--tw-gradient-from: rgb(76 5 25 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(76 5 25 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-blue-950\/20:is(.dark *){--tw-gradient-to: rgb(23 37 84 / .2) var(--tw-gradient-to-position)}.dark\:to-orange-950\/20:is(.dark *){--tw-gradient-to: rgb(67 20 7 / .2) var(--tw-gradient-to-position)}.dark\:to-pink-950\/20:is(.dark *){--tw-gradient-to: rgb(80 7 36 / .2) var(--tw-gradient-to-position)}.dark\:to-purple-950\/20:is(.dark *){--tw-gradient-to: rgb(59 7 100 / .2) var(--tw-gradient-to-position)}.dark\:to-violet-950\/20:is(.dark *){--tw-gradient-to: rgb(46 16 101 / .2) var(--tw-gradient-to-position)}.dark\:text-amber-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.dark\:text-amber-200:is(.dark *){--tw-text-opacity: 1;color:rgb(253 230 138 / 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-amber-500:is(.dark *){--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.dark\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-cyan-500:is(.dark *){--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.dark\:text-orange-100:is(.dark *){--tw-text-opacity: 1;color:rgb(255 237 213 / var(--tw-text-opacity, 1))}.dark\:text-orange-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 215 170 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-red-500:is(.dark *){--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:text-yellow-500:is(.dark *){--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-amber-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity, 1))}.dark\:focus\:bg-gray-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}@media(min-width:640px){.sm\:right-2{right:.5rem}.sm\:right-3{right:.75rem}.sm\:top-2{top:.5rem}.sm\:top-3{top:.75rem}.sm\:order-1{order:1}.sm\:order-2{order:2}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:mb-3{margin-bottom:.75rem}.sm\:mb-4{margin-bottom:1rem}.sm\:mb-6{margin-bottom:1.5rem}.sm\:ml-0{margin-left:0}.sm\:ml-1{margin-left:.25rem}.sm\:mr-1{margin-right:.25rem}.sm\:mt-0{margin-top:0}.sm\:mt-2{margin-top:.5rem}.sm\:mt-3{margin-top:.75rem}.sm\:mt-6{margin-top:1.5rem}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-10{height:2.5rem}.sm\:h-12{height:3rem}.sm\:h-2{height:.5rem}.sm\:h-2\.5{height:.625rem}.sm\:h-24{height:6rem}.sm\:h-4{height:1rem}.sm\:h-5{height:1.25rem}.sm\:h-8{height:2rem}.sm\:h-9{height:2.25rem}.sm\:h-\[300px\]{height:300px}.sm\:h-\[400px\]{height:400px}.sm\:h-\[500px\]{height:500px}.sm\:h-\[85vh\]{height:85vh}.sm\:h-\[calc\(100vh-220px\)\]{height:calc(100vh - 220px)}.sm\:h-\[calc\(100vh-280px\)\]{height:calc(100vh - 280px)}.sm\:w-10{width:2.5rem}.sm\:w-2{width:.5rem}.sm\:w-2\.5{width:.625rem}.sm\:w-24{width:6rem}.sm\:w-28{width:7rem}.sm\:w-32{width:8rem}.sm\:w-4{width:1rem}.sm\:w-48{width:12rem}.sm\:w-5{width:1.25rem}.sm\:w-8{width:2rem}.sm\:w-80{width:20rem}.sm\:w-96{width:24rem}.sm\:w-\[200px\]{width:200px}.sm\:w-\[500px\]{width:500px}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:min-w-\[120px\]{min-width:120px}.sm\:max-w-2xl{max-width:42rem}.sm\:max-w-32{max-width:8rem}.sm\:max-w-\[420px\]{max-width:420px}.sm\:max-w-\[500px\]{max-width:500px}.sm\:max-w-\[70\%\]{max-width:70%}.sm\:max-w-\[900px\]{max-width:900px}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-1{flex:1 1 0%}.sm\:flex-none{flex:none}.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-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-0{gap:0px}.sm\:gap-1{gap:.25rem}.sm\:gap-2{gap:.5rem}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:gap-6{gap:1.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\: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))}.sm\: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))}.sm\: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))}.sm\: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))}.sm\:space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-3{padding:.75rem}.sm\:p-4{padding:1rem}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-2{padding-top:.5rem;padding-bottom:.5rem}.sm\:pb-3{padding-bottom:.75rem}.sm\:pt-6{padding-top:1.5rem}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-6xl{font-size:3.75rem;line-height:1}.sm\:text-\[200px\]{font-size:200px}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media(min-width:768px){.md\:top-4{top:1rem}.md\:col-span-2{grid-column:span 2 / span 2}.md\:mb-4{margin-bottom:1rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-8{margin-bottom:2rem}.md\:mt-8{margin-top:2rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-16{height:4rem}.md\:h-4{height:1rem}.md\:h-5{height:1.25rem}.md\:h-8{height:2rem}.md\:h-96{height:24rem}.md\:h-\[500px\]{height:500px}.md\:min-h-\[400px\]{min-height:400px}.md\:w-16{width:4rem}.md\:w-4{width:1rem}.md\:w-5{width:1.25rem}.md\:w-8{width:2rem}.md\:w-96{width:24rem}.md\:max-w-none{max-width:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:gap-2{gap:.5rem}.md\:gap-3{gap:.75rem}.md\:gap-4{gap:1rem}.md\:gap-6{gap:1.5rem}.md\: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))}.md\: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))}.md\:whitespace-normal{white-space:normal}.md\:p-12{padding:3rem}.md\:p-4{padding:1rem}.md\:p-6{padding:1.5rem}.md\:p-8{padding:2rem}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:text-base{font-size:1rem;line-height:1.5rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:text-xs{font-size:.75rem;line-height:1rem}}@media(min-width:1024px){.lg\:invisible{visibility:hidden}.lg\:relative{position:relative}.lg\:z-0{z-index:0}.lg\:col-span-1{grid-column:span 1 / span 1}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:mx-auto{margin-left:auto;margin-right:auto}.lg\:mb-1{margin-bottom:.25rem}.lg\:block{display:block}.lg\:inline{display:inline}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-12{width:3rem}.lg\:w-16{width:4rem}.lg\:w-64{width:16rem}.lg\:w-8{width:2rem}.lg\:w-\[130px\]{width:130px}.lg\:w-\[160px\]{width:160px}.lg\:w-\[75px\]{width:75px}.lg\:w-auto{width:auto}.lg\:w-full{width:100%}.lg\:max-w-0{max-width:0px}.lg\:flex-1{flex:1 1 0%}.lg\:flex-none{flex:none}.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-10{grid-template-columns:repeat(10,minmax(0,1fr))}.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-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-center{justify-content:center}.lg\:gap-0{gap:0px}.lg\: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))}.lg\:overflow-hidden{overflow:hidden}.lg\:p-2{padding:.5rem}.lg\:p-4{padding:1rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:pb-4{padding-bottom:1rem}.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:opacity-0{opacity:0}}@media(min-width:1280px){.xl\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}}@media print{.print\:hidden{display:none}.print\: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))}.print\:rounded-none{border-radius:0}.print\:p-0{padding:0}.print\: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)}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\:\:-webkit-scrollbar-thumb\:hover\]\:bg-border\/80::-webkit-scrollbar-thumb:hover{background-color:hsl(var(--border) / .8)}.\[\&\:\:-webkit-scrollbar-thumb\]\:rounded-full::-webkit-scrollbar-thumb{border-radius:9999px}.\[\&\:\:-webkit-scrollbar-thumb\]\:bg-border::-webkit-scrollbar-thumb{background-color:hsl(var(--border))}.\[\&\:\:-webkit-scrollbar-track\]\:bg-transparent::-webkit-scrollbar-track{background-color:transparent}.\[\&\:\:-webkit-scrollbar\]\:w-2\.5::-webkit-scrollbar{width:.625rem}.\[\&\:first-child\[data-selected\=true\]_button\]\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\:last-child\[data-selected\=true\]_button\]\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;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))}.\[\&\>div\]\:bg-green-500>div{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>span\]\:text-xs>span{font-size:.75rem;line-height:1rem}.\[\&\>span\]\:opacity-70>span{opacity:.7}.\[\&\>svg\+div\]\:translate-y-0>svg+div{--tw-translate-y: 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))}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;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))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:size-3\.5>svg{width:.875rem;height:.875rem}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\]\:text-muted-foreground>svg{color:hsl(var(--muted-foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--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))}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground))}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--border) / .5)}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border))}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted))}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}[data-slot=card-content] .\[\[data-slot\=card-content\]_\&\]\:bg-transparent,[data-slot=popover-content] .\[\[data-slot\=popover-content\]_\&\]\:bg-transparent{background-color:transparent}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKm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UQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.27"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.uppy-Root{box-sizing:border-box;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;line-height:1;position:relative;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.uppy-Root[dir=rtl],[dir=rtl] .uppy-Root{text-align:right}.uppy-Root *,.uppy-Root :after,.uppy-Root :before{box-sizing:inherit}.uppy-Root [hidden]{display:none}.uppy-u-reset{all:initial;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;line-height:1}[dir=rtl] .uppy-u-reset{text-align:right}.uppy-truncate-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uppy-c-textInput{background-color:#fff;border:1px solid #ddd;border-radius:4px;font-family:inherit;font-size:14px;line-height:1.5;padding:6px 8px}.uppy-size--md .uppy-c-textInput{padding:8px 10px}.uppy-c-textInput:focus{border-color:#1269cf99;box-shadow:0 0 0 3px #1269cf26;outline:none}[data-uppy-theme=dark] .uppy-c-textInput{background-color:#333;border-color:#333;color:#eaeaea}[data-uppy-theme=dark] .uppy-c-textInput:focus{border-color:#525252;box-shadow:none}.uppy-c-icon{display:inline-block;max-height:100%;max-width:100%;overflow:hidden;fill:currentColor}.uppy-c-btn{align-items:center;color:inherit;display:inline-flex;font-family:inherit;font-size:inherit;font-weight:500;justify-content:center;line-height:1;transition-duration:.3s;transition-property:background-color,color;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.uppy-c-btn,[dir=rtl] .uppy-c-btn{text-align:center}.uppy-c-btn:not(:disabled):not(.disabled){cursor:pointer}.uppy-c-btn::-moz-focus-inner{border:0}.uppy-c-btn-primary{background-color:#1269cf;border-radius:4px;color:#fff;font-size:14px;padding:10px 18px}.uppy-c-btn-primary:not(:disabled):hover{background-color:#0e51a0}.uppy-c-btn-primary:focus{box-shadow:0 0 0 3px #1269cf66;outline:none}.uppy-size--md .uppy-c-btn-primary{padding:13px 22px}[data-uppy-theme=dark] .uppy-c-btn-primary{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-primary::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-c-btn-primary.uppy-c-btn--disabled{background-color:#8eb2db}.uppy-c-btn-link{background-color:initial;border-radius:4px;color:#525252;font-size:14px;line-height:1;padding:10px 15px}.uppy-c-btn-link:hover{color:#333}.uppy-c-btn-link:focus{box-shadow:0 0 0 3px #1269cf40;outline:none}.uppy-size--md .uppy-c-btn-link{padding:13px 18px}[data-uppy-theme=dark] .uppy-c-btn-link{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-link:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-link::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-link:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-c-btn-link:hover{color:#939393}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:6px}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list:after,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list:after{content:"";flex:auto}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{margin:0;position:relative;width:50%}.uppy-size--md .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--md .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:33.3333%}.uppy-size--lg .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--lg .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:25%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem:before,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem:before{content:"";display:block;padding-top:100%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected svg{opacity:.85}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--disabled,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--disabled{opacity:.5}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#93939333}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#eaeaea33}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{height:30%;width:30%;fill:#000000b3}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{fill:#fffc}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{border-radius:4px;height:calc(100% - 14px);inset:7px;overflow:hidden;position:absolute;text-align:center;width:calc(100% - 14px)}@media(hover:none){.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author{display:block}}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{box-shadow:0 0 0 3px #aae1ffb3}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner img{border-radius:4px;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author{background:#0000004d;bottom:0;color:#fff;display:none;font-size:12px;font-weight:500;left:0;margin:0;padding:5px;position:absolute;text-decoration:none;width:100%}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author:hover,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author:hover{background:#0006;text-decoration:underline}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox{background-color:#1269cf;border-radius:50%;height:26px;opacity:0;position:absolute;right:16px;top:16px;width:26px;z-index:1002}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{height:7px;inset-inline-start:7px;top:8px;width:12px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox{opacity:1}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author{display:block}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus{outline:none}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner{border:0}.uppy-ProviderBrowser-viewType--list{background-color:#fff}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list{background-color:#1f1f1f}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{align-items:center;display:flex;margin:0;padding:7px 15px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{color:#eaeaea}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem--disabled{opacity:.6}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{background-color:#fff;border:1px solid #cfcfcf;border-radius:3px;height:17px;margin-inline-end:15px;width:17px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border:1px solid #1269cf;box-shadow:0 0 0 3px #1269cf40;outline:none}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{height:5px;inset-inline-start:3px;opacity:0;top:4px;width:9px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border-color:#02baf2b3;box-shadow:0 0 0 3px #02baf233}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox{background-color:#1269cf;border-color:#1269cf}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox:after{opacity:1}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner{align-items:center;color:inherit;display:flex;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;overflow:hidden;padding:2px;text-overflow:ellipsis;white-space:nowrap}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner:focus{outline:none;text-decoration:underline}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-inline-end:8px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner span{line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--disabled .uppy-ProviderBrowserItem-inner{cursor:default}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{margin-inline-end:7px;width:20px}.uppy-ProviderBrowserItem-checkbox{cursor:pointer;flex-shrink:0;position:relative}.uppy-ProviderBrowserItem-checkbox:disabled,.uppy-ProviderBrowserItem-checkbox:disabled:after{cursor:default}[data-uppy-theme=dark] .uppy-ProviderBrowserItem-checkbox{background-color:#1f1f1f;border-color:#939393}[data-uppy-theme=dark] .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox{background-color:#333}.uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox:after{border-bottom:2px solid #eaeaea;border-left:2px solid #eaeaea;content:"";cursor:pointer;position:absolute;transform:rotate(-45deg)}.uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox:after{background-color:#eaeaea!important;content:""!important;height:2px!important;left:20%!important;position:absolute!important;right:20%!important;top:50%!important;transform:translateY(-50%)!important}.uppy-SearchProvider{align-items:center;display:flex;flex:1;flex-direction:column;height:100%;justify-content:center;width:100%}[data-uppy-theme=dark] .uppy-SearchProvider{background-color:#1f1f1f}.uppy-SearchProvider-input{margin-bottom:15px;max-width:650px;width:90%}.uppy-size--md .uppy-SearchProvider-input{margin-bottom:20px}.uppy-SearchProvider-input::-webkit-search-cancel-button{display:none}.uppy-SearchProvider-searchButton{padding:13px 25px}.uppy-size--md .uppy-SearchProvider-searchButton{padding:13px 30px}.uppy-DashboardContent-panelBody{align-items:center;display:flex;flex:1;justify-content:center}[data-uppy-theme=dark] .uppy-DashboardContent-panelBody{background-color:#1f1f1f}.uppy-Provider-auth,.uppy-Provider-empty,.uppy-Provider-error,.uppy-Provider-loading{align-items:center;color:#939393;display:flex;flex:1;flex-flow:column wrap;justify-content:center}.uppy-Provider-empty{color:#939393}.uppy-Provider-authIcon svg{height:75px;width:100px}.uppy-Provider-authTitle{color:#757575;font-size:17px;font-weight:400;line-height:1.4;margin-bottom:30px;max-width:500px;padding:0 15px;text-align:center}.uppy-size--md .uppy-Provider-authTitle{font-size:20px}[data-uppy-theme=dark] .uppy-Provider-authTitle{color:#cfcfcf}.uppy-Provider-btn-google{align-items:center;background:#4285f4;display:flex;padding:8px 12px!important}.uppy-Provider-btn-google:hover{background-color:#1266f1}.uppy-Provider-btn-google:focus{box-shadow:0 0 0 3px #4285f466;outline:none}.uppy-Provider-btn-google svg{margin-right:8px}.uppy-Provider-breadcrumbs{color:#525252;flex:1;font-size:12px;margin-bottom:10px;text-align:start}.uppy-size--md .uppy-Provider-breadcrumbs{margin-bottom:0}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs{color:#eaeaea}.uppy-Provider-breadcrumbsIcon{color:#525252;display:inline-block;line-height:1;margin-inline-end:4px;vertical-align:middle}.uppy-Provider-breadcrumbsIcon svg{height:13px;width:13px;fill:#525252}.uppy-Provider-breadcrumbs button{border-radius:3px;display:inline-block;line-height:inherit;padding:4px}.uppy-Provider-breadcrumbs button:focus{outline:none}.uppy-Provider-breadcrumbs button::-moz-focus-inner{border:0}.uppy-Provider-breadcrumbs button:hover{color:#0e51a0}.uppy-Provider-breadcrumbs button:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button:focus{background-color:#333}.uppy-Provider-breadcrumbs button:not(:last-of-type){text-decoration:underline}.uppy-Provider-breadcrumbs button:last-of-type{color:#333;cursor:normal;font-weight:500;pointer-events:none}.uppy-Provider-breadcrumbs button:hover{cursor:pointer}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button{color:#eaeaea}.uppy-ProviderBrowser{display:flex;flex:1;flex-direction:column;font-size:14px;font-weight:400;height:100%}.uppy-ProviderBrowser-user{color:#333;font-weight:500;margin:0 8px 0 0}[data-uppy-theme=dark] .uppy-ProviderBrowser-user{color:#eaeaea}.uppy-ProviderBrowser-user:after{color:#939393;content:"·";font-weight:400;inset-inline-start:4px;position:relative}.uppy-ProviderBrowser-header{border-bottom:1px solid #eaeaea;position:relative;z-index:1001}[data-uppy-theme=dark] .uppy-ProviderBrowser-header{border-bottom:1px solid #333}.uppy-ProviderBrowser-headerBar{background-color:#fafafa;color:#757575;font-size:12px;line-height:1.4;padding:7px 15px;z-index:1001}.uppy-size--md .uppy-ProviderBrowser-headerBar{align-items:center;display:flex}[data-uppy-theme=dark] .uppy-ProviderBrowser-headerBar{background-color:#1f1f1f}.uppy-ProviderBrowser-headerBar--simple{display:block;justify-content:center;text-align:center}.uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap{display:inline-block;flex:none;vertical-align:middle}.uppy-ProviderBrowser-searchFilter{align-items:center;display:flex;height:30px;margin-bottom:15px;margin-top:15px;padding-left:8px;padding-right:8px;position:relative;width:100%}.uppy-ProviderBrowser-searchFilterInput{background-color:#eaeaea;border:0;border-radius:4px;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;font-size:13px;height:30px;line-height:1.4;outline:0;padding-inline-end:30px;padding-inline-start:30px;width:100%;z-index:1001}.uppy-ProviderBrowser-searchFilterInput::-webkit-search-cancel-button{display:none}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput{background-color:#1f1f1f;color:#eaeaea}.uppy-ProviderBrowser-searchFilterInput:focus{background-color:#cfcfcf;border:0}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput:focus{background-color:#333}.uppy-ProviderBrowser-searchFilterIcon{color:#757575;height:12px;inset-inline-start:16px;position:absolute;width:12px;z-index:1002}.uppy-ProviderBrowser-searchFilterInput::-moz-placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-searchFilterInput::placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-searchFilterReset{border-radius:3px;color:#939393;cursor:pointer;height:22px;inset-inline-end:16px;padding:6px;position:absolute;width:22px;z-index:1002}.uppy-ProviderBrowser-searchFilterReset:focus{outline:none}.uppy-ProviderBrowser-searchFilterReset::-moz-focus-inner{border:0}.uppy-ProviderBrowser-searchFilterReset:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-searchFilterReset:hover{color:#757575}.uppy-ProviderBrowser-searchFilterReset svg{vertical-align:text-top}.uppy-ProviderBrowser-userLogout{border-radius:3px;color:#1269cf;cursor:pointer;line-height:inherit;padding:4px}.uppy-ProviderBrowser-userLogout:focus{outline:none}.uppy-ProviderBrowser-userLogout::-moz-focus-inner{border:0}.uppy-ProviderBrowser-userLogout:hover{color:#0e51a0}.uppy-ProviderBrowser-userLogout:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout:focus{background-color:#333}.uppy-ProviderBrowser-userLogout:hover{text-decoration:underline}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout{color:#eaeaea}.uppy-ProviderBrowser-body{flex:1;position:relative}.uppy-ProviderBrowser-list{background-color:#fff;border-spacing:0;display:block;flex:1;height:100%;inset:0;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;width:100%;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-ProviderBrowser-list{background-color:#1f1f1f}.uppy-ProviderBrowser-list:focus{outline:none}.uppy-ProviderBrowserItem-inner{cursor:pointer;font-size:13px;font-weight:500}.uppy-ProviderBrowser-footer{align-items:center;background-color:#fff;border-top:1px solid #eaeaea;display:flex;justify-content:space-between;padding:15px}.uppy-ProviderBrowser-footer button{margin-inline-end:8px}[data-uppy-theme=dark] .uppy-ProviderBrowser-footer{background-color:#1f1f1f;border-top:1px solid #333}.uppy-ProviderBrowser-footer-buttons{flex-shrink:0}.uppy-ProviderBrowser-footer-error{color:#e32437;line-height:18px}@media(max-width:426px){.uppy-ProviderBrowser-footer{align-items:stretch;flex-direction:column-reverse}.uppy-ProviderBrowser-footer-error{padding-bottom:10px}}.picker-dialog-bg{z-index:20000!important}.picker-dialog{z-index:20001!important}.uppy-Dashboard-Item-previewInnerWrap{align-items:center;border-radius:3px;box-shadow:0 0 2px #0006;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}.uppy-size--md .uppy-Dashboard-Item-previewInnerWrap{box-shadow:0 1px 2px #00000026}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewInnerWrap{box-shadow:none}.uppy-Dashboard-Item-previewInnerWrap:after{background-color:#000000a6;content:"";display:none;inset:0;position:absolute;z-index:1001}.uppy-Dashboard-Item-previewLink{inset:0;position:absolute;z-index:1002}.uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #579df0}[data-uppy-theme=dark] .uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #016c8d}.uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{border-radius:3px;height:100%;-o-object-fit:cover;object-fit:cover;transform:translateZ(0);width:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{height:auto;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;padding:10px;width:auto}.uppy-Dashboard-Item-progress{color:#fff;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);transition:all .35 ease;width:120px;z-index:1002}.uppy-Dashboard-Item-progressIndicator{color:#fff;display:inline-block;height:38px;opacity:.9;width:38px}.uppy-size--md .uppy-Dashboard-Item-progressIndicator{height:55px;width:55px}button.uppy-Dashboard-Item-progressIndicator{cursor:pointer}button.uppy-Dashboard-Item-progressIndicator:focus{outline:none}button.uppy-Dashboard-Item-progressIndicator::-moz-focus-inner{border:0}button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--bg,button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--retry{fill:#579df0}.uppy-Dashboard-Item-progressIcon--circle{height:100%;width:100%}.uppy-Dashboard-Item-progressIcon--bg{stroke:#fff6}.uppy-Dashboard-Item-progressIcon--progress{transition:stroke-dashoffset .5s ease-out;stroke:#fff}.uppy-Dashboard-Item-progressIcon--play{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--cancel{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--pause{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--check{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--retry{fill:#fff}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{inset-inline-end:-8px;inset-inline-start:auto;top:-9px;transform:none;width:auto}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{height:18px;width:18px}.uppy-size--md .uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{height:28px;width:28px}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{height:18px;opacity:1;width:18px}.uppy-size--md .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{height:22px;width:22px}.uppy-Dashboard-Item.is-processing .uppy-Dashboard-Item-progress{opacity:0}.uppy-Dashboard-Item-fileInfo{padding-inline-end:5px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-inline-end:10px}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-inline-end:15px}.uppy-Dashboard-Item-name{font-size:12px;font-weight:500;line-height:1.3;margin-bottom:5px;word-wrap:anywhere;word-break:break-all}[data-uppy-theme=dark] .uppy-Dashboard-Item-name{color:#eaeaea}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-name{font-size:14px;line-height:1.4}.uppy-Dashboard-Item-fileName{align-items:baseline;display:flex}.uppy-Dashboard-Item-fileName button{margin-left:5px}.uppy-Dashboard-Item-author{color:#757575;display:inline-block;font-size:11px;font-weight:400;line-height:1;margin-bottom:5px;vertical-align:bottom}.uppy-Dashboard-Item-author a{color:#757575}.uppy-Dashboard-Item-status{color:#757575;font-size:11px;font-weight:400;line-height:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-status{color:#bbb}.uppy-Dashboard-Item-statusSize{display:inline-block;margin-bottom:5px;text-transform:uppercase;vertical-align:bottom}.uppy-Dashboard-Item-reSelect{color:#1269cf;font-family:inherit;font-size:inherit;font-weight:600}.uppy-Dashboard-Item-errorMessage{background-color:#fdeff1;color:#a51523;font-size:11px;font-weight:500;line-height:1.3;padding:5px 6px}.uppy-Dashboard-Item-errorMessageBtn{color:#a51523;cursor:pointer;font-size:11px;font-weight:500;text-decoration:underline}.uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{display:none}.uppy-size--md .uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:1px solid #f7c2c8;bottom:0;display:block;left:0;line-height:1.4;padding:6px 8px;position:absolute;right:0}.uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{border:1px solid #f7c2c8;border-radius:3px;display:inline-block;position:static}.uppy-size--md .uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{display:none}.uppy-Dashboard-Item-action{color:#939393;cursor:pointer}.uppy-Dashboard-Item-action:focus{outline:none}.uppy-Dashboard-Item-action::-moz-focus-inner{border:0}.uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-Item-action:hover{color:#1f1f1f;opacity:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-action{color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{outline:none}[data-uppy-theme=dark] .uppy-Dashboard-Item-action::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:hover{color:#eaeaea}.uppy-Dashboard-Item-action--remove{color:#1f1f1f;opacity:.95}.uppy-Dashboard-Item-action--remove:hover{color:#000;opacity:1}.uppy-size--md .uppy-Dashboard-Item-action--remove{height:18px;inset-inline-end:-8px;padding:0;position:absolute;top:-8px;width:18px;z-index:1002}.uppy-size--md .uppy-Dashboard-Item-action--remove:focus{border-radius:50%}.uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{inset-inline-end:8px;position:absolute;top:8px}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove{color:#525252}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove:hover{color:#333}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-actionWrapper{align-items:center;display:flex}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action{height:22px;margin-left:3px;padding:3px;width:22px}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action:focus{border-radius:3px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink,.uppy-size--md .uppy-Dashboard-Item-action--edit{height:16px;padding:0;width:16px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink:focus,.uppy-size--md .uppy-Dashboard-Item-action--edit:focus{border-radius:3px}.uppy-Dashboard-Item{align-items:center;border-bottom:1px solid #eaeaea;display:flex;padding:10px}.uppy-Dashboard:not(.uppy-Dashboard--singleFile) .uppy-Dashboard-Item{padding-inline-end:0}[data-uppy-theme=dark] .uppy-Dashboard-Item{border-bottom:1px solid #333}.uppy-size--md .uppy-Dashboard-Item{border-bottom:0;display:block;float:inline-start;height:215px;margin:5px 15px;padding:0;position:relative;width:calc(33.333% - 30px)}.uppy-size--lg .uppy-Dashboard-Item{height:190px;margin:5px 15px;padding:0;width:calc(25% - 30px)}.uppy-size--xl .uppy-Dashboard-Item{height:210px;padding:0;width:calc(20% - 30px)}.uppy-Dashboard--singleFile .uppy-Dashboard-Item{border-bottom:0;display:flex;flex-direction:column;height:100%;max-width:400px;padding:15px;position:relative;width:100%}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-previewInnerWrap{opacity:.2}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-name{opacity:.7}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='39' viewBox='0 0 35 39'%3E%3Cpath fill='%2523000' d='M1.708 38.66c1.709 0 3.417-3.417 6.834-3.417s5.125 3.417 8.61 3.417c3.348 0 5.056-3.417 8.473-3.417 4.305 0 5.125 3.417 6.833 3.417.889 0 1.709-.889 1.709-1.709v-19.68C34.167-5.757 0-5.757 0 17.271v19.68c0 .82.888 1.709 1.708 1.709m8.542-17.084a3.383 3.383 0 0 1-3.417-3.416 3.383 3.383 0 0 1 3.417-3.417 3.383 3.383 0 0 1 3.417 3.417 3.383 3.383 0 0 1-3.417 3.416m13.667 0A3.383 3.383 0 0 1 20.5 18.16a3.383 3.383 0 0 1 3.417-3.417 3.383 3.383 0 0 1 3.416 3.417 3.383 3.383 0 0 1-3.416 3.416'/%3E%3C/svg%3E");background-position:50% 10px;background-repeat:no-repeat;background-size:25px;content:"";inset:0;opacity:.5;position:absolute;z-index:1005}.uppy-size--md .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:40px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:30%}.uppy-Dashboard-Item-preview{flex-grow:0;flex-shrink:0;height:50px;position:relative;width:50px}.uppy-size--md .uppy-Dashboard-Item-preview{height:140px;width:100%}.uppy-size--lg .uppy-Dashboard-Item-preview{height:120px}.uppy-size--xl .uppy-Dashboard-Item-preview{height:140px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview{flex-grow:1;max-height:75%;width:100%}.uppy-Dashboard--singleFile.uppy-size--md .uppy-Dashboard-Item-preview{max-height:100%}.uppy-Dashboard-Item-fileInfoAndButtons{align-items:center;display:flex;flex-grow:1;justify-content:space-between;padding-inline-end:8px;padding-inline-start:12px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons,.uppy-size--md .uppy-Dashboard-Item-fileInfoAndButtons{align-items:flex-start;padding:9px 0 0}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons{flex-grow:0;width:100%}.uppy-Dashboard-Item-fileInfo{flex-grow:1;flex-shrink:1}.uppy-Dashboard-Item-actionWrapper{flex-grow:0;flex-shrink:0}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-previewInnerWrap:after,.uppy-Dashboard-Item.is-inprogress .uppy-Dashboard-Item-previewInnerWrap:after{display:block}.uppy-Dashboard-Item-errorDetails{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#939393;border:none;border-radius:50%;color:#fff;cursor:help;flex-shrink:0;font-size:10px;font-weight:600;height:13px;inset-inline-start:2px;line-height:12px;position:relative;text-align:center;top:0;width:13px}.uppy-Dashboard-Item-errorDetails:after{line-height:1.3;word-wrap:break-word}.uppy-Dashboard-FileCard{background-color:#fff;border-radius:5px;box-shadow:0 0 10px 4px #0000001a;display:flex;flex-direction:column;height:100%;inset:0;position:absolute;width:100%;z-index:1005}.uppy-Dashboard-FileCard .uppy-DashboardContent-bar{border-top-left-radius:5px;border-top-right-radius:5px}.uppy-Dashboard-FileCard .uppy-Dashboard-FileCard-actions{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.uppy-Dashboard-FileCard-inner{display:flex;flex-direction:column;flex-grow:1;flex-shrink:1;height:100%;min-height:0}.uppy-Dashboard-FileCard-preview{align-items:center;border-bottom:1px solid #eaeaea;display:flex;flex-grow:0;flex-shrink:1;height:60%;justify-content:center;min-height:0;position:relative}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-preview{background-color:#333;border-bottom:0}.uppy-Dashboard-FileCard-preview img.uppy-Dashboard-Item-previewImg{border-radius:3px;box-shadow:0 3px 20px #00000026;flex:0 0 auto;max-height:90%;max-width:90%;-o-object-fit:cover;object-fit:cover}.uppy-Dashboard-FileCard-edit{background-color:#00000080;border-radius:50px;color:#fff;font-size:13px;inset-inline-end:10px;padding:7px 15px;position:absolute;top:10px}.uppy-Dashboard-FileCard-edit:focus{outline:none}.uppy-Dashboard-FileCard-edit::-moz-focus-inner{border:0}.uppy-Dashboard-FileCard-edit:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-FileCard-edit:hover{background-color:#000c}.uppy-Dashboard-FileCard-info{flex-grow:0;flex-shrink:0;height:40%;overflow-y:auto;padding:30px 20px 20px;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-info{background-color:#1f1f1f}.uppy-Dashboard-FileCard-fieldset{border:0;font-size:0;margin:auto auto 12px;max-width:640px;padding:0}.uppy-Dashboard-FileCard-label{color:#525252;display:inline-block;font-size:12px;vertical-align:middle;width:22%}.uppy-size--md .uppy-Dashboard-FileCard-label{font-size:14px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-label{color:#eaeaea}.uppy-Dashboard-FileCard-input{display:inline-block;vertical-align:middle;width:78%}.uppy-Dashboard-FileCard-actions{align-items:center;background-color:#fafafa;border-top:1px solid #eaeaea;display:flex;flex-grow:0;flex-shrink:0;height:55px;padding:0 15px}.uppy-size--md .uppy-Dashboard-FileCard-actions{height:65px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-actions{background-color:#1f1f1f;border-top:1px solid #333}.uppy-Dashboard-FileCard-actionsBtn{margin-inline-end:10px}.uppy-Informer{bottom:60px;left:0;position:absolute;right:0;text-align:center;z-index:1005}.uppy-Informer span>div{margin-bottom:6px}.uppy-Informer-animated{opacity:0;transform:translateY(350%);transition:all .3s ease-in;z-index:-1000}.uppy-Informer p{background-color:#757575;border-radius:18px;color:#fff;display:inline-block;font-size:12px;font-weight:400;line-height:1.4;margin:0;max-width:90%;padding:6px 15px}.uppy-size--md .uppy-Informer p{font-size:14px;line-height:1.3;max-width:500px;padding:10px 20px}[data-uppy-theme=dark] .uppy-Informer p{background-color:#333}.uppy-Informer p span{background-color:#fff;border-radius:50%;color:#525252;display:inline-block;font-size:10px;height:13px;inset-inline-start:3px;line-height:12px;margin-inline-start:-1px;position:relative;top:-1px;vertical-align:middle;width:13px}.uppy-Informer p span:hover{cursor:help}.uppy-Informer p span:after{line-height:1.3;word-wrap:break-word}.uppy-Root [aria-label][role~=tooltip]{position:relative}.uppy-Root [aria-label][role~=tooltip]:after,.uppy-Root [aria-label][role~=tooltip]:before{backface-visibility:hidden;box-sizing:border-box;opacity:0;pointer-events:none;position:absolute;transform:translateZ(0);transform-origin:top;transition:all var(--microtip-transition-duration,.18s) var(--microtip-transition-easing,ease-in-out) var(--microtip-transition-delay,0s);will-change:transform;z-index:10}.uppy-Root [aria-label][role~=tooltip]:before{background-size:100% auto!important;content:""}.uppy-Root [aria-label][role~=tooltip]:after{background:#111111e6;border-radius:4px;box-sizing:initial;color:#fff;content:attr(aria-label);font-size:var(--microtip-font-size,13px);font-weight:var(--microtip-font-weight,normal);padding:.5em 1em;text-transform:var(--microtip-text-transform,none);white-space:nowrap}.uppy-Root [aria-label][role~=tooltip]:focus:after,.uppy-Root [aria-label][role~=tooltip]:focus:before,.uppy-Root [aria-label][role~=tooltip]:hover:after,.uppy-Root [aria-label][role~=tooltip]:hover:before{opacity:1;pointer-events:auto}.uppy-Root [role~=tooltip][data-microtip-position|=top]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002S8.594 0 2.658 0'/%3E%3C/svg%3E") no-repeat;bottom:100%;height:6px;left:50%;margin-bottom:5px;transform:translate3d(-50%,0,0);width:18px}.uppy-Root [role~=tooltip][data-microtip-position|=top]:after{bottom:100%;left:50%;margin-bottom:11px;transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:after{bottom:100%;transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:after{bottom:100%;transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(-16px,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002S27.406 12 33.342 12'/%3E%3C/svg%3E") no-repeat;bottom:auto;height:6px;left:50%;margin-bottom:0;margin-top:5px;top:100%;transform:translate3d(-50%,-10px,0);width:18px}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:after{left:50%;margin-top:11px;top:100%;transform:translate3d(-50%,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:after{top:100%;transform:translate3d(calc(-100% + 16px),-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:after{top:100%;transform:translate3d(-16px,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:before{inset:50% 100% auto auto;transform:translate3d(10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M0 33.342V1.338c0 6 12.002 11.627 12.002 16.002S0 27.406 0 33.342'/%3E%3C/svg%3E") no-repeat;height:18px;margin-bottom:0;margin-right:5px;width:6px}.uppy-Root [role~=tooltip][data-microtip-position=left]:after{margin-right:11px}.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:before{bottom:auto;left:100%;top:50%;transform:translate3d(-10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M12 2.658v32.004c0-6-12.002-11.627-12.002-16.002S12 8.594 12 2.658'/%3E%3C/svg%3E") no-repeat;height:18px;margin-bottom:0;margin-left:5px;width:6px}.uppy-Root [role~=tooltip][data-microtip-position=right]:after{margin-left:11px}.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-size=small]:after{white-space:normal;width:80px}.uppy-Root [role~=tooltip][data-microtip-size=medium]:after{white-space:normal;width:150px}.uppy-Root [role~=tooltip][data-microtip-size=large]:after{white-space:normal;width:260px}.uppy-StatusBar{background-color:#fff;color:#fff;display:flex;font-size:12px;font-weight:400;height:46px;line-height:40px;position:relative;transition:height .2s;z-index:1001}[data-uppy-theme=dark] .uppy-StatusBar{background-color:#1f1f1f}.uppy-StatusBar:before{background-color:#eaeaea;content:"";height:2px;inset:0;position:absolute;width:100%}[data-uppy-theme=dark] .uppy-StatusBar:before{background-color:#757575}.uppy-StatusBar[aria-hidden=true]{height:0;overflow-y:hidden}.uppy-StatusBar.is-complete .uppy-StatusBar-progress{background-color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-progress{background-color:#e32437}.uppy-StatusBar.is-complete .uppy-StatusBar-statusIndicator{color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-statusIndicator{color:#e32437}.uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#fff;border-top:1px solid #eaeaea;height:65px}[data-uppy-theme=dark] .uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#1f1f1f;border-top:1px solid #333}.uppy-StatusBar-progress{background-color:#1269cf;height:2px;position:absolute;transition:background-color,width .3s ease-out;z-index:1001}.uppy-StatusBar-progress.is-indeterminate{animation:uppy-StatusBar-ProgressStripes 1s linear infinite;background-image:linear-gradient(45deg,#0000004d 25%,#0000 0 50%,#0000004d 0 75%,#0000 0,#0000);background-size:64px 64px}@keyframes uppy-StatusBar-ProgressStripes{0%{background-position:0 0}to{background-position:64px 0}}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-progress,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-progress{background-color:#f6a623}.uppy-StatusBar.is-waiting .uppy-StatusBar-progress{display:none}.uppy-StatusBar-content{align-items:center;color:#333;display:flex;height:100%;padding-inline-start:10px;position:relative;text-overflow:ellipsis;white-space:nowrap;z-index:1002}.uppy-size--md .uppy-StatusBar-content{padding-inline-start:15px}[data-uppy-theme=dark] .uppy-StatusBar-content{color:#eaeaea}.uppy-StatusBar-status{display:flex;flex-direction:column;font-weight:400;justify-content:center;line-height:1.4;padding-inline-end:.3em}.uppy-StatusBar-statusPrimary{display:flex;font-weight:500;line-height:1}.uppy-StatusBar-statusPrimary button.uppy-StatusBar-details{margin-left:5px}[data-uppy-theme=dark] .uppy-StatusBar-statusPrimary{color:#eaeaea}.uppy-StatusBar-statusSecondary{color:#757575;display:inline-block;font-size:11px;line-height:1.2;margin-top:1px;white-space:nowrap}[data-uppy-theme=dark] .uppy-StatusBar-statusSecondary{color:#bbb}.uppy-StatusBar-statusSecondaryHint{display:inline-block;line-height:1;margin-inline-end:5px;vertical-align:middle}.uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-inline-end:8px}.uppy-StatusBar-statusIndicator{color:#525252;margin-inline-end:7px;position:relative;top:1px}.uppy-StatusBar-statusIndicator svg{vertical-align:text-bottom}.uppy-StatusBar-actions{align-items:center;bottom:0;display:flex;inset-inline-end:10px;position:absolute;top:0;z-index:1004}.uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#fafafa;height:100%;padding:0 15px;position:static;width:100%}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#1f1f1f}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:column;height:90px}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:row;height:65px}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:column;justify-content:center}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:row;justify-content:normal}.uppy-StatusBar-actionCircleBtn{cursor:pointer;line-height:1;margin:3px;opacity:.9}.uppy-StatusBar-actionCircleBtn:focus{outline:none}.uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}.uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionCircleBtn:hover{opacity:1}.uppy-StatusBar-actionCircleBtn:focus{border-radius:50%}.uppy-StatusBar-actionCircleBtn svg{vertical-align:bottom}.uppy-StatusBar-actionBtn{color:#1269cf;display:inline-block;font-size:10px;line-height:inherit;vertical-align:middle}.uppy-size--md .uppy-StatusBar-actionBtn{font-size:11px}.uppy-StatusBar-actionBtn--disabled{opacity:.4}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--disabled{opacity:.7}.uppy-StatusBar-actionBtn--retry{background-color:#ff4b23;border-radius:8px;color:#fff;height:16px;line-height:1;margin-inline-end:6px;padding:1px 6px 3px 18px;position:relative}.uppy-StatusBar-actionBtn--retry:focus{outline:none}.uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionBtn--retry:hover{background-color:#f92d00}.uppy-StatusBar-actionBtn--retry svg{inset-inline-start:6px;position:absolute;top:3px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1bb240;color:#fff;font-size:14px;line-height:1;padding:15px 10px;width:100%}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#189c38}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1c8b37}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#18762f}.uppy-size--md .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{padding:13px 22px;width:auto}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1bb240;cursor:not-allowed}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1c8b37}.uppy-StatusBar:not(.is-waiting) .uppy-StatusBar-actionBtn--upload{background-color:initial;color:#1269cf}.uppy-StatusBar-actionBtn--uploadNewlyAdded{border-radius:3px;padding-inline-end:3px;padding-bottom:1px;padding-inline-start:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}.uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded{display:none}.uppy-StatusBar-actionBtn--done{border-radius:3px;line-height:1;padding:7px 8px}.uppy-StatusBar-actionBtn--done:focus{outline:none}.uppy-StatusBar-actionBtn--done::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--done:hover{color:#0e51a0}.uppy-StatusBar-actionBtn--done:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done:focus{background-color:#333}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done{color:#02baf2}.uppy-size--md .uppy-StatusBar-actionBtn--done{font-size:14px}.uppy-StatusBar-serviceMsg{color:#000;font-size:11px;line-height:1.1;padding-left:10px}.uppy-size--md .uppy-StatusBar-serviceMsg{font-size:14px;padding-left:15px}[data-uppy-theme=dark] .uppy-StatusBar-serviceMsg{color:#eaeaea}.uppy-StatusBar-serviceMsg-ghostsIcon{left:6px;opacity:.5;position:relative;top:2px;vertical-align:text-bottom;width:10px}.uppy-size--md .uppy-StatusBar-serviceMsg-ghostsIcon{left:10px;top:1px;width:15px}.uppy-StatusBar-details{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#939393;border-radius:50%;color:#fff;cursor:help;display:inline-block;font-size:10px;font-weight:600;height:13px;inset-inline-start:2px;line-height:12px;position:relative;text-align:center;top:0;vertical-align:middle;width:13px}.uppy-StatusBar-details:after{line-height:1.3;word-wrap:break-word}.uppy-StatusBar-spinner{animation-duration:1s;animation-iteration-count:infinite;animation-name:uppy-StatusBar-spinnerAnimation;animation-timing-function:linear;fill:#1269cf;margin-inline-end:10px}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-spinner,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-spinner{fill:#f6a623}@keyframes uppy-StatusBar-spinnerAnimation{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.uppy-transition-slideDownUp-enter{opacity:.01;transform:translate3d(0,-105%,0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-enter.uppy-transition-slideDownUp-enter-active{opacity:1;transform:translateZ(0)}.uppy-transition-slideDownUp-leave{opacity:1;transform:translateZ(0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-leave.uppy-transition-slideDownUp-leave-active{opacity:.01;transform:translate3d(0,-105%,0)}@keyframes uppy-Dashboard-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes uppy-Dashboard-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes uppy-Dashboard-slideDownAndFadeIn{0%{opacity:0;transform:translate3d(-50%,-70%,0)}to{opacity:1;transform:translate3d(-50%,-50%,0)}}@keyframes uppy-Dashboard-slideDownAndFadeIn--small{0%{opacity:0;transform:translate3d(0,-20%,0)}to{opacity:1;transform:translateZ(0)}}@keyframes uppy-Dashboard-slideUpFadeOut{0%{opacity:1;transform:translate3d(-50%,-50%,0)}to{opacity:0;transform:translate3d(-50%,-70%,0)}}@keyframes uppy-Dashboard-slideUpFadeOut--small{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20%,0)}}.uppy-Dashboard--modal{z-index:1001}.uppy-Dashboard--modal[aria-hidden=true]{display:none}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeIn .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeOut .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard-isFixed{height:100vh;overflow:hidden}.uppy-Dashboard--modal .uppy-Dashboard-overlay{background-color:#00000080;inset:0;position:fixed;z-index:1001}.uppy-Dashboard-inner{background-color:#f4f4f4;border:1px solid #eaeaea;border-radius:5px;max-height:100%;max-width:100%;outline:none;position:relative}.uppy-size--md .uppy-Dashboard-inner{min-height:auto}@media only screen and (min-width:820px){.uppy-Dashboard-inner{height:500px;width:650px}}.uppy-Dashboard--modal .uppy-Dashboard-inner{z-index:1002}[data-uppy-theme=dark] .uppy-Dashboard-inner{background-color:#1f1f1f}.uppy-Dashboard--isDisabled .uppy-Dashboard-inner{cursor:not-allowed}.uppy-Dashboard-innerWrap{border-radius:5px;display:flex;flex-direction:column;height:100%;opacity:0;overflow:hidden;position:relative}.uppy-Dashboard--isInnerWrapVisible .uppy-Dashboard-innerWrap{opacity:1}.uppy-Dashboard--isDisabled .uppy-Dashboard-innerWrap{cursor:not-allowed;filter:grayscale(100%);opacity:.6;-webkit-user-select:none;-moz-user-select:none;user-select:none}.uppy-Dashboard--isDisabled .uppy-ProviderIconBg{fill:#9f9f9f}.uppy-Dashboard--isDisabled [aria-disabled],.uppy-Dashboard--isDisabled [disabled]{cursor:not-allowed;pointer-events:none}.uppy-Dashboard--modal .uppy-Dashboard-inner{border:none;inset:35px 15px 15px;position:fixed}@media only screen and (min-width:820px){.uppy-Dashboard--modal .uppy-Dashboard-inner{box-shadow:0 5px 15px 4px #00000026;left:50%;right:auto;top:50%;transform:translate(-50%,-50%)}}.uppy-Dashboard-close{color:#ffffffe6;cursor:pointer;display:block;font-size:27px;inset-inline-end:-2px;position:absolute;top:-33px;z-index:1005}.uppy-Dashboard-close:focus{outline:none}.uppy-Dashboard-close::-moz-focus-inner{border:0}.uppy-Dashboard-close:focus{color:#6eabf2}@media only screen and (min-width:820px){.uppy-Dashboard-close{font-size:35px;inset-inline-end:-35px;top:-10px}}.uppy-Dashboard-serviceMsg{background-color:#fffbf7;border-bottom:1px solid #edd4b9;border-top:1px solid #edd4b9;font-size:12px;font-weight:500;line-height:1.3;padding:12px 0;position:relative;top:-1px;z-index:1004}.uppy-size--md .uppy-Dashboard-serviceMsg{font-size:14px;line-height:1.4}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg{background-color:#1f1f1f;border-bottom:1px solid #333;border-top:1px solid #333;color:#eaeaea}.uppy-Dashboard-serviceMsg-title{display:block;line-height:1;margin-bottom:4px;padding-left:42px}.uppy-Dashboard-serviceMsg-text{padding:0 15px}.uppy-Dashboard-serviceMsg-actionBtn{color:#1269cf;font-size:inherit;font-weight:inherit;vertical-align:initial}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg-actionBtn{color:#02baf2e6}.uppy-Dashboard-serviceMsg-icon{left:15px;position:absolute;top:10px}.uppy-Dashboard-AddFiles{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;position:relative;text-align:center}[data-uppy-drag-drop-supported=true] .uppy-Dashboard-AddFiles{border:1px dashed #dfdfdf;border-radius:3px;height:calc(100% - 14px);margin:7px}.uppy-Dashboard-AddFilesPanel .uppy-Dashboard-AddFiles{border:none;height:calc(100% - 54px)}.uppy-Dashboard--modal .uppy-Dashboard-AddFiles{border-color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles{border-color:#757575}.uppy-Dashboard-AddFiles-info{display:none;margin-top:auto;padding-bottom:15px;padding-top:15px}.uppy-size--height-md .uppy-Dashboard-AddFiles-info{display:block}.uppy-size--md .uppy-Dashboard-AddFiles-info{bottom:25px;left:0;padding-bottom:0;padding-top:30px;position:absolute;right:0}[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-info{margin-top:0}.uppy-Dashboard-browse{color:#1269cf;cursor:pointer}.uppy-Dashboard-browse:focus{outline:none}.uppy-Dashboard-browse::-moz-focus-inner{border:0}.uppy-Dashboard-browse:focus,.uppy-Dashboard-browse:hover{border-bottom:1px solid #1269cf}[data-uppy-theme=dark] .uppy-Dashboard-browse{color:#02baf2e6}[data-uppy-theme=dark] .uppy-Dashboard-browse:focus,[data-uppy-theme=dark] .uppy-Dashboard-browse:hover{border-bottom:1px solid #02baf2}.uppy-Dashboard-browseBtn{display:block;font-size:14px;font-weight:500;margin-bottom:5px;margin-top:8px;width:100%}.uppy-size--md .uppy-Dashboard-browseBtn{font-size:15px;margin:15px auto;padding:13px 44px;width:auto}.uppy-Dashboard-AddFiles-list{display:flex;flex:1;flex-direction:column;margin-top:2px;overflow-y:auto;padding:2px 0;width:100%;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;margin-top:15px;max-width:600px;overflow-y:visible;padding-top:0}.uppy-DashboardTab{border-bottom:1px solid #eaeaea;text-align:center;width:100%}[data-uppy-theme=dark] .uppy-DashboardTab{border-bottom:1px solid #333}.uppy-size--md .uppy-DashboardTab{border-bottom:none;display:inline-block;margin-bottom:10px;width:auto}.uppy-DashboardTab-btn{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:initial;color:#525252;cursor:pointer;flex-direction:row;height:100%;justify-content:left;padding:12px 15px;width:100%}.uppy-DashboardTab-btn:focus{outline:none}.uppy-size--md .uppy-DashboardTab-btn{border-radius:5px;flex-direction:column;margin-inline-end:1px;padding:10px 3px;width:86px}[data-uppy-theme=dark] .uppy-DashboardTab-btn{color:#eaeaea}.uppy-DashboardTab-btn::-moz-focus-inner{border:0}.uppy-DashboardTab-btn:hover{background-color:#e9ecef}[data-uppy-theme=dark] .uppy-DashboardTab-btn:hover{background-color:#333}.uppy-DashboardTab-btn:active,.uppy-DashboardTab-btn:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardTab-btn:active,[data-uppy-theme=dark] .uppy-DashboardTab-btn:focus{background-color:#525252}.uppy-DashboardTab-btn svg{display:inline-block;max-height:100%;max-width:100%;overflow:hidden;transition:transform .15s ease-in-out;vertical-align:text-top}.uppy-DashboardTab-inner{align-items:center;background-color:#fff;border-radius:8px;box-shadow:0 1px 1px #0000001a,0 1px 2px #0000001a,0 2px 3px #00000005;display:flex;height:32px;justify-content:center;margin-inline-end:10px;width:32px}.uppy-size--md .uppy-DashboardTab-inner{margin-inline-end:0}[data-uppy-theme=dark] .uppy-DashboardTab-inner{background-color:#323232;box-shadow:0 1px 1px #0003,0 1px 2px #0003,0 2px 3px #00000014}.uppy-DashboardTab-name{font-size:14px;font-weight:400}.uppy-size--md .uppy-DashboardTab-name{font-size:12px;line-height:15px;margin-bottom:0;margin-top:8px}.uppy-DashboardTab-iconMyDevice{color:#1269cf}[data-uppy-theme=dark] .uppy-DashboardTab-iconMyDevice{color:#02baf2}.uppy-DashboardTab-iconBox{color:#0061d5}[data-uppy-theme=dark] .uppy-DashboardTab-iconBox{color:#eaeaea}.uppy-DashboardTab-iconDropbox{color:#0061fe}[data-uppy-theme=dark] .uppy-DashboardTab-iconDropbox{color:#eaeaea}.uppy-DashboardTab-iconUnsplash{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconUnsplash{color:#eaeaea}.uppy-DashboardTab-iconWebdav{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconWebdav{color:#eaeaea}.uppy-DashboardTab-iconScreenRec{color:#2c3e50}[data-uppy-theme=dark] .uppy-DashboardTab-iconScreenRec{color:#eaeaea}.uppy-DashboardTab-iconAudio{color:#8030a3}[data-uppy-theme=dark] .uppy-DashboardTab-iconAudio{color:#bf6ee3}.uppy-Dashboard-input{height:.1px;opacity:0;overflow:hidden;position:absolute;width:.1px;z-index:-1}.uppy-DashboardContent-bar{align-items:center;background-color:#fafafa;border-bottom:1px solid #eaeaea;display:flex;flex-shrink:0;height:40px;justify-content:space-between;padding:0 10px;position:relative;width:100%;z-index:1004}.uppy-size--md .uppy-DashboardContent-bar{height:50px;padding:0 15px}[data-uppy-theme=dark] .uppy-DashboardContent-bar{background-color:#1f1f1f;border-bottom:1px solid #333}.uppy-DashboardContent-title{font-size:12px;font-weight:500;left:0;line-height:40px;margin:auto;max-width:170px;overflow-x:hidden;position:absolute;right:0;text-align:center;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}.uppy-size--md .uppy-DashboardContent-title{font-size:14px;line-height:50px;max-width:300px}[data-uppy-theme=dark] .uppy-DashboardContent-title{color:#eaeaea}.uppy-DashboardContent-back,.uppy-DashboardContent-save{-webkit-appearance:none;background:none;border:0;border-radius:3px;color:inherit;color:#1269cf;cursor:pointer;font-family:inherit;font-size:inherit;font-size:12px;font-weight:400;line-height:1;margin:0;margin-inline-start:-6px;padding:7px 6px}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{outline:none}.uppy-DashboardContent-back::-moz-focus-inner,.uppy-DashboardContent-save::-moz-focus-inner{border:0}.uppy-DashboardContent-back:hover,.uppy-DashboardContent-save:hover{color:#0e51a0}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-back:focus,[data-uppy-theme=dark] .uppy-DashboardContent-save:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-back,.uppy-size--md .uppy-DashboardContent-save{font-size:14px}[data-uppy-theme=dark] .uppy-DashboardContent-back,[data-uppy-theme=dark] .uppy-DashboardContent-save{color:#02baf2}.uppy-DashboardContent-addMore{-webkit-appearance:none;background:none;border:0;border-radius:3px;color:inherit;color:#1269cf;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:500;height:29px;line-height:1;margin:0;margin-inline-end:-5px;padding:7px 8px;width:29px}.uppy-DashboardContent-addMore:focus{outline:none}.uppy-DashboardContent-addMore::-moz-focus-inner{border:0}.uppy-DashboardContent-addMore:hover{color:#0e51a0}.uppy-DashboardContent-addMore:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-addMore:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-addMore{font-size:14px;height:auto;margin-inline-end:-8px;width:auto}[data-uppy-theme=dark] .uppy-DashboardContent-addMore{color:#02baf2}.uppy-DashboardContent-addMore svg{margin-inline-end:4px;vertical-align:initial}.uppy-size--md .uppy-DashboardContent-addMore svg{height:11px;width:11px}.uppy-DashboardContent-addMoreCaption{display:none}.uppy-size--md .uppy-DashboardContent-addMoreCaption{display:inline}.uppy-DashboardContent-panel{background-color:#f5f5f5;flex:1}.uppy-Dashboard-AddFilesPanel,.uppy-DashboardContent-panel{border-radius:5px;display:flex;flex-direction:column;inset:0;overflow:hidden;position:absolute;z-index:1005}.uppy-Dashboard-AddFilesPanel{background:#fafafa;background:linear-gradient(0deg,#fafafa 35%,#fafafad9);box-shadow:0 0 10px 5px #00000026}[data-uppy-theme=dark] .uppy-Dashboard-AddFilesPanel{background-color:#333;background-image:linear-gradient(0deg,#1f1f1f 35%,#1f1f1fd9)}.uppy-Dashboard--isAddFilesPanelVisible .uppy-Dashboard-files{filter:blur(2px)}.uppy-Dashboard-progress{bottom:0;height:12%;left:0;position:absolute;width:100%}.uppy-Dashboard-progressBarContainer.is-active{height:100%;left:0;position:absolute;top:0;width:100%;z-index:1004}.uppy-Dashboard-filesContainer{flex:1;margin:0;overflow-y:hidden;position:relative}.uppy-Dashboard-filesContainer:after{clear:both;content:"";display:table}.uppy-Dashboard-files{flex:1;margin:0;overflow-y:auto;padding:0 0 10px;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-files{padding-top:10px}.uppy-Dashboard--singleFile .uppy-Dashboard-filesInner{align-items:center;display:flex;height:100%;justify-content:center}.uppy-Dashboard-dropFilesHereHint{align-items:center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath fill='%231269CF' d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");background-position:50% 50%;background-repeat:no-repeat;border:1px dashed #1269cf;border-radius:3px;color:#757575;display:flex;font-size:16px;justify-content:center;inset:7px;padding-top:90px;position:absolute;text-align:center;visibility:hidden;z-index:2000}[data-uppy-theme=dark] .uppy-Dashboard-dropFilesHereHint{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath fill='%2302BAF2' d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");border-color:#02baf2;color:#bbb}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-dropFilesHereHint{pointer-events:none;visibility:visible}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-files,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-progressindicators,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-serviceMsg,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardContent-bar{opacity:.15}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-AddFiles{opacity:.03}.uppy-Dashboard-AddFiles-title{color:#000;font-size:17px;font-weight:500;line-height:1.35;margin-bottom:5px;margin-top:15px;padding:0 15px;text-align:inline-start;width:100%}.uppy-size--md .uppy-Dashboard-AddFiles-title{font-size:21px;font-weight:400;margin-top:5px;max-width:480px;padding:0 35px;text-align:center}[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-title{text-align:center}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title{color:#eaeaea}.uppy-Dashboard-AddFiles-title button{font-weight:500}.uppy-size--md .uppy-Dashboard-AddFiles-title button{font-weight:400}.uppy-Dashboard-note{color:#757575;font-size:14px;line-height:1.25;margin:auto;max-width:350px;padding:0 15px;text-align:center}.uppy-size--md .uppy-Dashboard-note{line-height:1.35;max-width:600px}[data-uppy-theme=dark] .uppy-Dashboard-note{color:#cfcfcf}a.uppy-Dashboard-poweredBy{color:#939393;display:inline-block;font-size:11px;margin-top:8px;text-align:center;text-decoration:none}.uppy-Dashboard-poweredByIcon{margin-left:1px;margin-right:1px;opacity:.9;position:relative;top:1px;vertical-align:text-top;fill:none;stroke:#939393}.uppy-Dashboard-Item-previewIcon{height:25px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:25px;z-index:100}.uppy-size--md .uppy-Dashboard-Item-previewIcon{height:38px;width:38px}.uppy-Dashboard-Item-previewIcon svg{height:100%;width:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIcon{height:100%;max-height:60%;max-width:60%;width:100%}.uppy-Dashboard-Item-previewIconWrap{height:76px;max-height:75%;position:relative}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIconWrap{height:100%;width:100%}.uppy-Dashboard-Item-previewIconBg{filter:drop-shadow(rgba(0,0,0,.1) 0 1px 1px);height:100%;width:100%}.uppy-Dashboard-upload{height:50px;position:relative;width:50px}.uppy-size--md .uppy-Dashboard-upload{height:60px;width:60px}.uppy-Dashboard-upload .uppy-c-icon{position:relative;top:1px;width:50%}.uppy-Dashboard-uploadCount{background-color:#1bb240;border-radius:50%;color:#fff;font-size:8px;height:16px;inset-inline-end:-12px;line-height:16px;position:absolute;top:-12px;width:16px}.uppy-size--md .uppy-Dashboard-uploadCount{font-size:9px;height:18px;line-height:18px;width:18px}.uppy-Dashboard-inner{border:none!important;background:transparent!important}.uppy-Dashboard-innerWrap{border-radius:.5rem;overflow:hidden}.uppy-Dashboard-AddFiles{border:2px dashed hsl(var(--border))!important;border-radius:.5rem!important;background:hsl(var(--muted) / .3)!important;transition:all .2s ease}.uppy-Dashboard-AddFiles:hover{border-color:hsl(var(--primary))!important;background:hsl(var(--muted) / .5)!important}.uppy-Dashboard-AddFiles-title{color:hsl(var(--foreground))!important;font-weight:500!important}.uppy-Dashboard-AddFiles-info{color:hsl(var(--muted-foreground))!important}.uppy-Dashboard-browse{color:hsl(var(--primary))!important;font-weight:500!important}.uppy-Dashboard-browse:hover{text-decoration:underline!important}.uppy-Dashboard-files{background:transparent!important}.uppy-Dashboard-Item{border-bottom-color:hsl(var(--border))!important}.uppy-Dashboard-Item-name{color:hsl(var(--foreground))!important}.uppy-Dashboard-Item-status{color:hsl(var(--muted-foreground))!important}.uppy-StatusBar{background:hsl(var(--muted))!important;border-top:1px solid hsl(var(--border))!important}.uppy-StatusBar-progress{background:hsl(var(--primary))!important}.uppy-StatusBar-content{color:hsl(var(--foreground))!important}.uppy-StatusBar-actionBtn--upload{background:hsl(var(--primary))!important;color:hsl(var(--primary-foreground))!important;border-radius:.375rem!important;font-weight:500!important;padding:.5rem 1rem!important}.uppy-StatusBar-actionBtn--upload:hover{background:hsl(var(--primary) / .9)!important}.uppy-Dashboard-note{color:hsl(var(--muted-foreground))!important;font-size:.75rem!important}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles,.dark .uppy-Dashboard-AddFiles{background:hsl(var(--muted) / .2)!important}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title,.dark .uppy-Dashboard-AddFiles-title{color:hsl(var(--foreground))!important}[data-uppy-theme=dark] .uppy-StatusBar,.dark .uppy-StatusBar{background:hsl(var(--muted) / .5)!important}.uppy-Dashboard{font-family:inherit!important}.uppy-Dashboard-Item-preview{border-radius:.375rem!important;overflow:hidden}.uppy-Dashboard-Item-action--remove{color:hsl(var(--destructive))!important}.uppy-Dashboard-Item-action--remove:hover{opacity:.8}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{color:hsl(var(--success, 142 76% 36%))!important}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progress{color:hsl(var(--destructive))!important}.uppy-Dashboard-files::-webkit-scrollbar{width:6px}.uppy-Dashboard-files::-webkit-scrollbar-track{background:transparent}.uppy-Dashboard-files::-webkit-scrollbar-thumb{background:hsl(var(--muted-foreground) / .3);border-radius:3px}.uppy-Dashboard-files::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground) / .5)}.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.react-flow__node.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%} diff --git a/webui/dist/index.html b/webui/dist/index.html index 1a5c946b..73dee5a9 100644 --- a/webui/dist/index.html +++ b/webui/dist/index.html @@ -11,7 +11,7 @@ MaiBot Dashboard - + @@ -25,7 +25,7 @@ - +
From 465fb9d865e400f6db5b724f2b1e61dd197ce15a Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Tue, 13 Jan 2026 00:47:22 +0800 Subject: [PATCH 03/10] =?UTF-8?q?remove=EF=BC=9A=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=AE=B0=E5=BF=86=E7=9A=84=20=E5=85=B3=E9=94=AE=E7=82=B9=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/database/database_model.py | 2 +- src/dream/dream_agent.py | 11 ++- src/dream/tools/create_chat_history_tool.py | 9 +- .../tools/get_chat_history_detail_tool.py | 3 +- src/dream/tools/update_chat_history_tool.py | 5 +- src/memory_system/chat_history_summarizer.py | 86 +++++++++++-------- .../retrieval_tools/query_chat_history.py | 12 --- 7 files changed, 63 insertions(+), 65 deletions(-) diff --git a/src/common/database/database_model.py b/src/common/database/database_model.py index 0615f012..f4543737 100644 --- a/src/common/database/database_model.py +++ b/src/common/database/database_model.py @@ -368,7 +368,7 @@ class ChatHistory(BaseModel): theme = TextField() # 主题:这段对话的主要内容,一个简短的标题 keywords = TextField() # 关键词:这段对话的关键词,JSON格式存储 summary = TextField() # 概括:对这段话的平文本概括 - key_point = TextField(null=True) # 关键信息:话题中的关键信息点,JSON格式存储 + # key_point = TextField(null=True) # 关键信息:话题中的关键信息点,JSON格式存储 count = IntegerField(default=0) # 被检索次数 forget_times = IntegerField(default=0) # 被遗忘检查的次数 diff --git a/src/dream/dream_agent.py b/src/dream/dream_agent.py index b516a88e..a7f4df0d 100644 --- a/src/dream/dream_agent.py +++ b/src/dream/dream_agent.py @@ -192,7 +192,6 @@ def init_dream_tools(chat_id: str) -> None: ("theme", ToolParamType.STRING, "新的主题标题,如果不需要修改可不填。", False, None), ("summary", ToolParamType.STRING, "新的概括内容,如果不需要修改可不填。", False, None), ("keywords", ToolParamType.STRING, "新的关键词 JSON 字符串,如 ['关键词1','关键词2']。", False, None), - ("key_point", ToolParamType.STRING, "新的关键信息 JSON 字符串,如 ['要点1','要点2']。", False, None), ], update_chat_history, ) @@ -201,7 +200,7 @@ def init_dream_tools(chat_id: str) -> None: _dream_tool_registry.register_tool( DreamTool( "create_chat_history", - "根据整理后的理解创建一条新的 ChatHistory 概括记录(主题、概括、关键词、关键信息等)。", + "根据整理后的理解创建一条新的 ChatHistory 概括记录(主题、概括、关键词等)。", [ ("theme", ToolParamType.STRING, "新的主题标题(必填)。", True, None), ("summary", ToolParamType.STRING, "新的概括内容(必填)。", True, None), @@ -212,10 +211,11 @@ def init_dream_tools(chat_id: str) -> None: True, None, ), + ("original_text", ToolParamType.STRING, "对话原文内容(必填)。", True, None), ( - "key_point", + "participants", ToolParamType.STRING, - "新的关键信息 JSON 字符串,如 ['要点1','要点2'](必填)。", + "参与人的 JSON 字符串,如 ['用户1','用户2'](必填)。", True, None, ), @@ -313,8 +313,7 @@ async def run_dream_agent_once( f"主题={record.theme or '无'}\n" f"关键词={record.keywords or '无'}\n" f"参与者={record.participants or '无'}\n" - f"概括={record.summary or '无'}\n" - f"关键信息={record.key_point or '无'}" + f"概括={record.summary or '无'}" ) logger.debug( diff --git a/src/dream/tools/create_chat_history_tool.py b/src/dream/tools/create_chat_history_tool.py index ccf27e4e..9d423b45 100644 --- a/src/dream/tools/create_chat_history_tool.py +++ b/src/dream/tools/create_chat_history_tool.py @@ -11,7 +11,8 @@ def make_create_chat_history(chat_id: str): theme: str, summary: str, keywords: str, - key_point: str, + original_text: str, + participants: str, start_time: float, end_time: float, ) -> str: @@ -20,7 +21,8 @@ def make_create_chat_history(chat_id: str): logger.info( f"[dream][tool] 调用 create_chat_history(" f"theme={bool(theme)}, summary={bool(summary)}, " - f"keywords={bool(keywords)}, key_point={bool(key_point)}, " + f"keywords={bool(keywords)}, original_text={bool(original_text)}, " + f"participants={bool(participants)}, " f"start_time={start_time}, end_time={end_time}) (chat_id={chat_id})" ) @@ -43,7 +45,8 @@ def make_create_chat_history(chat_id: str): theme=theme, summary=summary, keywords=keywords, - key_point=key_point, + original_text=original_text, + participants=participants, # 对于由 dream 整理产生的新概括,时间范围优先使用工具提供的时间,否则使用当前时间占位 start_time=start_ts, end_time=end_ts, diff --git a/src/dream/tools/get_chat_history_detail_tool.py b/src/dream/tools/get_chat_history_detail_tool.py index 47c427d0..5cf01955 100644 --- a/src/dream/tools/get_chat_history_detail_tool.py +++ b/src/dream/tools/get_chat_history_detail_tool.py @@ -32,8 +32,7 @@ def make_get_chat_history_detail(chat_id: str): # chat_id 目前未直接使用 f"主题={record.theme or '无'}\n" f"关键词={record.keywords or '无'}\n" f"参与者={record.participants or '无'}\n" - f"概括={record.summary or '无'}\n" - f"关键信息={record.key_point or '无'}" + f"概括={record.summary or '无'}" ) logger.debug(f"[dream][tool] get_chat_history_detail 成功,预览: {result[:200].replace(chr(10), ' ')}") return result diff --git a/src/dream/tools/update_chat_history_tool.py b/src/dream/tools/update_chat_history_tool.py index c2e92fb9..1797c714 100644 --- a/src/dream/tools/update_chat_history_tool.py +++ b/src/dream/tools/update_chat_history_tool.py @@ -13,13 +13,12 @@ def make_update_chat_history(chat_id: str): # chat_id 目前未直接使用, theme: Optional[str] = None, summary: Optional[str] = None, keywords: Optional[str] = None, - key_point: Optional[str] = None, ) -> str: """按字段更新 chat_history(字符串字段要求 JSON 的字段须传入已序列化的字符串)""" try: logger.info( f"[dream][tool] 调用 update_chat_history(memory_id={memory_id}, " - f"theme={bool(theme)}, summary={bool(summary)}, keywords={bool(keywords)}, key_point={bool(key_point)})" + f"theme={bool(theme)}, summary={bool(summary)}, keywords={bool(keywords)})" ) record = ChatHistory.get_or_none(ChatHistory.id == memory_id) if not record: @@ -34,8 +33,6 @@ def make_update_chat_history(chat_id: str): # chat_id 目前未直接使用, data["summary"] = summary if keywords is not None: data["keywords"] = keywords - if key_point is not None: - data["key_point"] = key_point if not data: return "未提供任何需要更新的字段。" diff --git a/src/memory_system/chat_history_summarizer.py b/src/memory_system/chat_history_summarizer.py index 8c2d0980..a0ad29cf 100644 --- a/src/memory_system/chat_history_summarizer.py +++ b/src/memory_system/chat_history_summarizer.py @@ -71,16 +71,14 @@ def init_prompt(): 1. 关键词:提取与话题相关的关键词,用列表形式返回(3-10个关键词) 2. 概括:对这段话的平文本概括(50-200字),要求: - 仔细地转述发生的事件和聊天内容; - - 可以适当摘取聊天记录中的原文; - 重点突出事件的发展过程和结果; - 围绕话题这个中心进行概括。 -3. 关键信息:提取话题中的关键信息点,用列表形式返回(3-8个关键信息点),每个关键信息点应该简洁明了。 + - 提取话题中的关键信息点,关键信息点应该简洁明了。 请以JSON格式返回,格式如下: {{ "keywords": ["关键词1", "关键词2", ...], - "summary": "概括内容", - "key_point": ["关键信息1", "关键信息2", ...] + "summary": "概括内容" }} 聊天记录: @@ -815,12 +813,38 @@ class ChatHistorySummarizer: original_text = "\n".join(item.messages) logger.info( - f"{self.log_prefix} 开始打包话题[{topic}] | 消息数: {len(item.messages)} | 时间范围: {start_time:.2f} - {end_time:.2f}" + f"{self.log_prefix} 开始将聊天记录构建成记忆:[{topic}] | 消息数: {len(item.messages)} | 时间范围: {start_time:.2f} - {end_time:.2f}" ) - # 使用 LLM 进行总结(基于话题名) - success, keywords, summary, key_point = await self._compress_with_llm(original_text, topic) - if not success: + # 使用 LLM 进行总结(基于话题名),带重试机制 + max_retries = 3 + attempt = 0 + success = False + keywords = [] + summary = "" + + while attempt < max_retries: + attempt += 1 + success, keywords, summary = await self._compress_with_llm(original_text, topic) + + if success and keywords and summary: + # 成功获取到有效的 keywords 和 summary + if attempt > 1: + logger.info( + f"{self.log_prefix} 话题[{topic}] LLM 概括在第 {attempt} 次重试后成功" + ) + break + + if attempt < max_retries: + logger.warning( + f"{self.log_prefix} 话题[{topic}] LLM 概括失败(第 {attempt} 次尝试),准备重试" + ) + else: + logger.error( + f"{self.log_prefix} 话题[{topic}] LLM 概括连续 {max_retries} 次失败,放弃存储" + ) + + if not success or not keywords or not summary: logger.warning(f"{self.log_prefix} 话题[{topic}] LLM 概括失败,不写入数据库") return @@ -834,14 +858,13 @@ class ChatHistorySummarizer: theme=topic, # 主题直接使用话题名 keywords=keywords, summary=summary, - key_point=key_point, ) logger.info( f"{self.log_prefix} 话题[{topic}] 成功打包并存储 | 消息数: {len(item.messages)} | 参与者数: {len(participants)}" ) - async def _compress_with_llm(self, original_text: str, topic: str) -> tuple[bool, List[str], str, List[str]]: + async def _compress_with_llm(self, original_text: str, topic: str) -> tuple[bool, List[str], str]: """ 使用LLM压缩聊天内容(用于单个话题的最终总结) @@ -850,7 +873,7 @@ class ChatHistorySummarizer: topic: 话题名称 Returns: - tuple[bool, List[str], str, List[str]]: (是否成功, 关键词列表, 概括, 关键信息列表) + tuple[bool, List[str], str]: (是否成功, 关键词列表, 概括) """ prompt = await global_prompt_manager.format_prompt( "hippo_topic_summary_prompt", @@ -920,24 +943,24 @@ class ChatHistorySummarizer: keywords = result.get("keywords", []) summary = result.get("summary", "") - key_point = result.get("key_point", []) - if not (keywords and summary) and key_point: - logger.warning(f"{self.log_prefix} LLM返回的JSON中缺少字段,原文\n{response}") + # 检查必需字段是否为空 + if not keywords or not summary: + logger.warning(f"{self.log_prefix} LLM返回的JSON中缺少必需字段,原文\n{response}") + # 返回失败,和模型出错一样,让上层进行重试 + return False, [], "" - # 确保keywords和key_point是列表 + # 确保keywords是列表 if isinstance(keywords, str): keywords = [keywords] - if isinstance(key_point, str): - key_point = [key_point] - return True, keywords, summary, key_point + return True, keywords, summary except Exception as e: logger.error(f"{self.log_prefix} LLM压缩聊天内容时出错: {e}") logger.error(f"{self.log_prefix} LLM响应: {response if 'response' in locals() else 'N/A'}") # 返回失败标志和默认值 - return False, [], "压缩失败,无法生成概括", [] + return False, [], "压缩失败,无法生成概括" async def _store_to_database( self, @@ -948,7 +971,6 @@ class ChatHistorySummarizer: theme: str, keywords: List[str], summary: str, - key_point: Optional[List[str]] = None, ): """存储到数据库""" try: @@ -968,10 +990,6 @@ class ChatHistorySummarizer: "count": 0, } - # 存储 key_point(如果存在) - if key_point is not None: - data["key_point"] = json.dumps(key_point, ensure_ascii=False) - # 使用db_save存储(使用start_time和chat_id作为唯一标识) # 由于可能有多条记录,我们使用组合键,但peewee不支持,所以使用start_time作为唯一标识 # 但为了避免冲突,我们使用组合键:chat_id + start_time @@ -991,7 +1009,6 @@ class ChatHistorySummarizer: await self._import_to_lpmm_knowledge( theme=theme, summary=summary, - key_point=key_point, participants=participants, original_text=original_text, ) @@ -1007,7 +1024,6 @@ class ChatHistorySummarizer: self, theme: str, summary: str, - key_point: Optional[List[str]], participants: List[str], original_text: str, ): @@ -1017,7 +1033,6 @@ class ChatHistorySummarizer: Args: theme: 话题主题 summary: 概括内容 - key_point: 关键信息点列表 participants: 参与者列表 original_text: 原始文本(可能很长,需要截断) """ @@ -1025,7 +1040,8 @@ class ChatHistorySummarizer: from src.chat.knowledge.lpmm_ops import lpmm_ops # 构造要导入的文本内容 - # 格式:主题 + 概括 + 关键信息点 + 参与者信息 + # 格式:主题 + 概括 + 参与者信息 + 原始内容摘要 + # 注意:使用单换行符连接,确保整个内容作为一段导入,不被LPMM分段 content_parts = [] # 1. 话题主题 @@ -1036,17 +1052,12 @@ class ChatHistorySummarizer: if summary: content_parts.append(f"概括:{summary}") - # 3. 关键信息点 - if key_point: - key_points_text = "、".join(key_point) - content_parts.append(f"关键信息:{key_points_text}") - - # 4. 参与者信息 + # 3. 参与者信息 if participants: participants_text = "、".join(participants) content_parts.append(f"参与者:{participants_text}") - # 5. 原始文本摘要(如果原始文本太长,只取前500字) + # 4. 原始文本摘要(如果原始文本太长,只取前500字) if original_text: # 截断原始文本,避免过长 max_original_length = 500 @@ -1056,8 +1067,9 @@ class ChatHistorySummarizer: else: content_parts.append(f"原始内容:{original_text}") - # 将所有部分合并为一个段落(用双换行分隔,符合lpmm_ops.add_content的格式要求) - content_to_import = "\n\n".join(content_parts) + # 将所有部分合并为一个完整段落(使用单换行符,避免被LPMM分段) + # LPMM使用 \n\n 作为段落分隔符,所以这里使用 \n 确保不会被分段 + content_to_import = "\n".join(content_parts) if not content_to_import.strip(): logger.warning(f"{self.log_prefix} 聊天历史总结内容为空,跳过导入知识库") diff --git a/src/memory_system/retrieval_tools/query_chat_history.py b/src/memory_system/retrieval_tools/query_chat_history.py index fa467272..4a7adfa1 100644 --- a/src/memory_system/retrieval_tools/query_chat_history.py +++ b/src/memory_system/retrieval_tools/query_chat_history.py @@ -463,18 +463,6 @@ async def get_chat_history_detail(chat_id: str, memory_ids: str) -> str: if record.summary: result_parts.append(f"概括:{record.summary}") - # 添加关键信息点 - if record.key_point: - try: - key_point_data = ( - json.loads(record.key_point) if isinstance(record.key_point, str) else record.key_point - ) - if isinstance(key_point_data, list) and key_point_data: - key_point_str = "\n".join([f" - {str(kp)}" for kp in key_point_data]) - result_parts.append(f"关键信息点:\n{key_point_str}") - except (json.JSONDecodeError, TypeError, ValueError): - pass - results.append("\n".join(result_parts)) if not results: From 523a7517a92936be98cb4937f21ae8a78f2c4d61 Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Tue, 13 Jan 2026 00:47:33 +0800 Subject: [PATCH 04/10] =?UTF-8?q?feat=EF=BC=9Aplanner=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E9=BB=91=E8=AF=9D=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/planner_actions/planner.py | 138 ++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/src/chat/planner_actions/planner.py b/src/chat/planner_actions/planner.py index da02e845..ca907406 100644 --- a/src/chat/planner_actions/planner.py +++ b/src/chat/planner_actions/planner.py @@ -4,6 +4,7 @@ import traceback import random import re from typing import Dict, Optional, Tuple, List, TYPE_CHECKING, Union +from collections import OrderedDict from rich.traceback import install from datetime import datetime from json_repair import repair_json @@ -110,6 +111,10 @@ class ActionPlanner: self.last_obs_time_mark = 0.0 self.plan_log: List[Tuple[str, float, Union[List[ActionPlannerInfo], str]]] = [] + + # 黑话缓存:使用 OrderedDict 实现 LRU,最多缓存10个 + self.unknown_words_cache: OrderedDict[str, None] = OrderedDict() + self.unknown_words_cache_limit = 10 def find_message_by_id( self, message_id: str, message_id_list: List[Tuple[str, "DatabaseMessages"]] @@ -299,6 +304,136 @@ class ActionPlanner: logger.warning(f"{self.log_prefix}检测消息发送者失败,缺少必要字段") return False + def _update_unknown_words_cache(self, new_words: List[str]) -> None: + """ + 更新黑话缓存,将新的黑话加入缓存 + + Args: + new_words: 新提取的黑话列表 + """ + for word in new_words: + if not isinstance(word, str): + continue + word = word.strip() + if not word: + continue + + # 如果已存在,移到末尾(LRU) + if word in self.unknown_words_cache: + self.unknown_words_cache.move_to_end(word) + else: + # 添加新词 + self.unknown_words_cache[word] = None + # 如果超过限制,移除最老的 + if len(self.unknown_words_cache) > self.unknown_words_cache_limit: + self.unknown_words_cache.popitem(last=False) + logger.debug(f"{self.log_prefix}黑话缓存已满,移除最老的黑话") + + def _merge_unknown_words_with_cache(self, new_words: Optional[List[str]]) -> List[str]: + """ + 合并新提取的黑话和缓存中的黑话 + + Args: + new_words: 新提取的黑话列表(可能为None) + + Returns: + 合并后的黑话列表(去重) + """ + # 清理新提取的黑话 + cleaned_new_words: List[str] = [] + if new_words: + for word in new_words: + if isinstance(word, str): + word = word.strip() + if word: + cleaned_new_words.append(word) + + # 获取缓存中的黑话列表 + cached_words = list(self.unknown_words_cache.keys()) + + # 合并并去重(保留顺序:新提取的在前,缓存的在后) + merged_words: List[str] = [] + seen = set() + + # 先添加新提取的 + for word in cleaned_new_words: + if word not in seen: + merged_words.append(word) + seen.add(word) + + # 再添加缓存的(如果不在新提取的列表中) + for word in cached_words: + if word not in seen: + merged_words.append(word) + seen.add(word) + + return merged_words + + def _process_unknown_words_cache( + self, actions: List[ActionPlannerInfo] + ) -> None: + """ + 处理黑话缓存逻辑: + 1. 检查是否有 reply action 提取了 unknown_words + 2. 如果没有提取,移除最老的1个 + 3. 如果缓存数量大于5,移除最老的2个 + 4. 对于每个 reply action,合并缓存和新提取的黑话 + 5. 更新缓存 + + Args: + actions: 解析后的动作列表 + """ + # 先检查缓存数量,如果大于5,移除最老的2个 + if len(self.unknown_words_cache) > 5: + # 移除最老的2个 + removed_count = 0 + for _ in range(2): + if len(self.unknown_words_cache) > 0: + self.unknown_words_cache.popitem(last=False) + removed_count += 1 + if removed_count > 0: + logger.debug(f"{self.log_prefix}缓存数量大于5,移除最老的{removed_count}个缓存") + + # 检查是否有 reply action 提取了 unknown_words + has_extracted_unknown_words = False + for action in actions: + if action.action_type == "reply": + action_data = action.action_data or {} + unknown_words = action_data.get("unknown_words") + if unknown_words and isinstance(unknown_words, list) and len(unknown_words) > 0: + has_extracted_unknown_words = True + break + + # 如果当前 plan 的 reply 没有提取,移除最老的1个 + if not has_extracted_unknown_words: + if len(self.unknown_words_cache) > 0: + self.unknown_words_cache.popitem(last=False) + logger.debug(f"{self.log_prefix}当前 plan 的 reply 没有提取黑话,移除最老的1个缓存") + + # 对于每个 reply action,合并缓存和新提取的黑话 + for action in actions: + if action.action_type == "reply": + action_data = action.action_data or {} + new_words = action_data.get("unknown_words") + + # 合并新提取的和缓存的黑话列表 + merged_words = self._merge_unknown_words_with_cache(new_words) + + # 更新 action_data + if merged_words: + action_data["unknown_words"] = merged_words + logger.debug( + f"{self.log_prefix}合并黑话:新提取 {len(new_words) if new_words else 0} 个," + f"缓存 {len(self.unknown_words_cache)} 个,合并后 {len(merged_words)} 个" + ) + else: + # 如果没有合并后的黑话,移除 unknown_words 字段 + action_data.pop("unknown_words", None) + + # 更新缓存(将新提取的黑话加入缓存) + if new_words: + self._update_unknown_words_cache(new_words) + async def plan( self, available_actions: Dict[str, ActionInfo], @@ -722,6 +857,9 @@ class ActionPlanner: random.shuffle(shuffled) actions = list({a.action_type: a for a in shuffled}.values()) + # 处理黑话缓存逻辑 + self._process_unknown_words_cache(actions) + logger.debug(f"{self.log_prefix}规划器选择了{len(actions)}个动作: {' '.join([a.action_type for a in actions])}") return extracted_reasoning, actions, llm_content, llm_reasoning, llm_duration_ms From 199a8a7dff741385978c6e30a5c83150c64f6715 Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Tue, 13 Jan 2026 00:47:55 +0800 Subject: [PATCH 05/10] =?UTF-8?q?feat=EF=BC=9A=E6=B7=BB=E5=8A=A0lpmm?= =?UTF-8?q?=E5=86=85=E9=83=A8=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8A=BD=E5=8F=96=E7=B1=BB=E5=92=8C=E4=B8=80=E4=B8=AA=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/lpmm_interactive_manager.py | 265 ++++++++++++++++++++++ src/chat/knowledge/ie_process.py | 49 +++- src/chat/knowledge/lpmm_ops.py | 331 ++++++++++++++++++++++++++++ 3 files changed, 644 insertions(+), 1 deletion(-) create mode 100644 scripts/lpmm_interactive_manager.py create mode 100644 src/chat/knowledge/lpmm_ops.py diff --git a/scripts/lpmm_interactive_manager.py b/scripts/lpmm_interactive_manager.py new file mode 100644 index 00000000..2d932d00 --- /dev/null +++ b/scripts/lpmm_interactive_manager.py @@ -0,0 +1,265 @@ +import asyncio +import os +import sys + +# 尽量统一控制台编码为 utf-8,避免中文输出报错 +try: + if hasattr(sys.stdout, "reconfigure"): + sys.stdout.reconfigure(encoding="utf-8") + if hasattr(sys.stderr, "reconfigure"): + sys.stderr.reconfigure(encoding="utf-8") +except Exception: + pass + +# 确保项目根目录在 sys.path 中,以便导入 src.* +PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) +if PROJECT_ROOT not in sys.path: + sys.path.append(PROJECT_ROOT) + +try: + # 显式从 src.chat.knowledge.lpmm_ops 导入单例对象 + from src.chat.knowledge.lpmm_ops import lpmm_ops + from src.common.logger import get_logger + from src.memory_system.retrieval_tools.query_lpmm_knowledge import query_lpmm_knowledge + from src.chat.knowledge import lpmm_start_up + from src.config.config import global_config +except ImportError as e: + print(f"导入失败,请确保在项目根目录下运行脚本: {e}") + sys.exit(1) + +logger = get_logger("lpmm_interactive_manager") + +async def interactive_add(): + """交互式导入知识""" + print("\n" + "=" * 40) + print(" --- 📥 导入知识 (Add) ---") + print("=" * 40) + print("说明:请输入要导入的文本内容。") + print(" - 支持多段落,段落间请保留空行。") + print(" - 输入完成后,在新起的一行输入 'EOF' 并回车结束输入。") + print("-" * 40) + + lines = [] + while True: + try: + line = input() + if line.strip().upper() == "EOF": + break + lines.append(line) + except EOFError: + break + + text = "\n".join(lines).strip() + if not text: + print("\n[!] 内容为空,操作已取消。") + return + + print("\n[进度] 正在调用 LPMM 接口进行信息抽取与向量化,请稍候...") + try: + # 使用 lpmm_ops.py 中的接口 + result = await lpmm_ops.add_content(text) + + if result["status"] == "success": + print(f"\n[√] 成功:{result['message']}") + print(f" 实际新增段落数: {result.get('count', 0)}") + else: + print(f"\n[×] 失败:{result['message']}") + except Exception as e: + print(f"\n[×] 发生异常: {e}") + logger.error(f"add_content 异常: {e}", exc_info=True) + +async def interactive_delete(): + """交互式删除知识""" + print("\n" + "=" * 40) + print(" --- 🗑️ 删除知识 (Delete) ---") + print("=" * 40) + print("删除模式:") + print(" 1. 关键词模糊匹配(删除包含关键词的所有段落)") + print(" 2. 完整文段匹配(删除完全匹配的段落)") + print("-" * 40) + + mode = input("请选择删除模式 (1/2): ").strip() + exact_match = False + + if mode == "2": + exact_match = True + print("\n[完整文段匹配模式]") + print("说明:请输入要删除的完整文段内容(必须完全一致)。") + print(" - 支持多行输入,输入完成后在新起的一行输入 'EOF' 并回车。") + print("-" * 40) + lines = [] + while True: + try: + line = input() + if line.strip().upper() == "EOF": + break + lines.append(line) + except EOFError: + break + keyword = "\n".join(lines).strip() + else: + if mode != "1": + print("\n[!] 无效选择,默认使用关键词模糊匹配模式。") + print("\n[关键词模糊匹配模式]") + keyword = input("请输入匹配关键词: ").strip() + + if not keyword: + print("\n[!] 输入为空,操作已取消。") + return + + print("-" * 40) + confirm = input(f"危险确认:确定要删除所有匹配 '{keyword[:50]}{'...' if len(keyword) > 50 else ''}' 的知识吗?(y/N): ").strip().lower() + if confirm != 'y': + print("\n[!] 已取消删除操作。") + return + + print("\n[进度] 正在执行删除并更新索引...") + try: + # 使用 lpmm_ops.py 中的接口 + result = await lpmm_ops.delete(keyword, exact_match=exact_match) + + if result["status"] == "success": + print(f"\n[√] 成功:{result['message']}") + print(f" 删除条数: {result.get('deleted_count', 0)}") + elif result["status"] == "info": + print(f"\n[i] 提示:{result['message']}") + else: + print(f"\n[×] 失败:{result['message']}") + except Exception as e: + print(f"\n[×] 发生异常: {e}") + logger.error(f"delete 异常: {e}", exc_info=True) + +async def interactive_clear(): + """交互式清空知识库""" + print("\n" + "=" * 40) + print(" --- ⚠️ 清空知识库 (Clear All) ---") + print("=" * 40) + print("警告:此操作将删除LPMM知识库中的所有内容!") + print(" - 所有段落向量") + print(" - 所有实体向量") + print(" - 所有关系向量") + print(" - 整个知识图谱") + print(" - 此操作不可恢复!") + print("-" * 40) + + # 双重确认 + confirm1 = input("⚠️ 第一次确认:确定要清空整个知识库吗?(输入 'YES' 继续): ").strip() + if confirm1 != "YES": + print("\n[!] 已取消清空操作。") + return + + print("\n" + "=" * 40) + confirm2 = input("⚠️ 第二次确认:此操作不可恢复,请再次输入 'CLEAR' 确认: ").strip() + if confirm2 != "CLEAR": + print("\n[!] 已取消清空操作。") + return + + print("\n[进度] 正在清空知识库...") + try: + # 使用 lpmm_ops.py 中的接口 + result = await lpmm_ops.clear_all() + + if result["status"] == "success": + print(f"\n[√] 成功:{result['message']}") + stats = result.get("stats", {}) + before = stats.get("before", {}) + after = stats.get("after", {}) + print("\n[统计信息]") + print(f" 清空前: 段落={before.get('paragraphs', 0)}, 实体={before.get('entities', 0)}, " + f"关系={before.get('relations', 0)}, KG节点={before.get('kg_nodes', 0)}, KG边={before.get('kg_edges', 0)}") + print(f" 清空后: 段落={after.get('paragraphs', 0)}, 实体={after.get('entities', 0)}, " + f"关系={after.get('relations', 0)}, KG节点={after.get('kg_nodes', 0)}, KG边={after.get('kg_edges', 0)}") + else: + print(f"\n[×] 失败:{result['message']}") + except Exception as e: + print(f"\n[×] 发生异常: {e}") + logger.error(f"clear_all 异常: {e}", exc_info=True) + +async def interactive_search(): + """交互式查询知识""" + print("\n" + "=" * 40) + print(" --- 🔍 查询知识 (Search) ---") + print("=" * 40) + print("说明:输入查询问题或关键词,系统会返回相关的知识段落。") + print("-" * 40) + + # 确保 LPMM 已初始化 + if not global_config.lpmm_knowledge.enable: + print("\n[!] 警告:LPMM 知识库在配置中未启用。") + return + + try: + lpmm_start_up() + except Exception as e: + print(f"\n[!] LPMM 初始化失败: {e}") + logger.error(f"LPMM 初始化失败: {e}", exc_info=True) + return + + query = input("请输入查询问题或关键词: ").strip() + + if not query: + print("\n[!] 查询内容为空,操作已取消。") + return + + # 询问返回条数 + print("-" * 40) + limit_str = input("希望返回的相关知识条数(默认3,直接回车使用默认值): ").strip() + try: + limit = int(limit_str) if limit_str else 3 + limit = max(1, min(limit, 20)) # 限制在1-20之间 + except ValueError: + limit = 3 + print("[!] 输入无效,使用默认值 3。") + + print("\n[进度] 正在查询知识库...") + try: + result = await query_lpmm_knowledge(query, limit=limit) + + print("\n" + "=" * 60) + print("[查询结果]") + print("=" * 60) + print(result) + print("=" * 60) + except Exception as e: + print(f"\n[×] 查询失败: {e}") + logger.error(f"查询异常: {e}", exc_info=True) + +async def main(): + """主循环""" + while True: + print("\n" + "╔" + "═" * 38 + "╗") + print("║ LPMM 知识库交互管理工具 ║") + print("╠" + "═" * 38 + "╣") + print("║ 1. 导入知识 (Add Content) ║") + print("║ 2. 删除知识 (Delete Content) ║") + print("║ 3. 查询知识 (Search Content) ║") + print("║ 4. 清空知识库 (Clear All) ⚠️ ║") + print("║ 0. 退出 (Exit) ║") + print("╚" + "═" * 38 + "╝") + + choice = input("请选择操作编号: ").strip() + + if choice == "1": + await interactive_add() + elif choice == "2": + await interactive_delete() + elif choice == "3": + await interactive_search() + elif choice == "4": + await interactive_clear() + elif choice in ("0", "q", "Q", "quit", "exit"): + print("\n已退出工具。") + break + else: + print("\n[!] 无效的选择,请输入 0, 1, 2, 3 或 4。") + +if __name__ == "__main__": + try: + # 运行主循环 + asyncio.run(main()) + except KeyboardInterrupt: + print("\n\n[!] 用户中断程序 (Ctrl+C)。") + except Exception as e: + print(f"\n[!] 程序运行出错: {e}") + logger.error(f"Main loop 异常: {e}", exc_info=True) + diff --git a/src/chat/knowledge/ie_process.py b/src/chat/knowledge/ie_process.py index 4f7bb68a..6d345ec9 100644 --- a/src/chat/knowledge/ie_process.py +++ b/src/chat/knowledge/ie_process.py @@ -1,7 +1,7 @@ import asyncio import json import time -from typing import List, Union +from typing import List, Union, Dict, Any from .global_logger import logger from . import prompt_template @@ -173,3 +173,50 @@ def info_extract_from_str( return None, None return entity_extract_result, rdf_triple_extract_result + + +class IEProcess: + """ + 信息抽取处理器类,提供更方便的批次处理接口。 + """ + + def __init__(self, llm_ner: LLMRequest, llm_rdf: LLMRequest = None): + self.llm_ner = llm_ner + self.llm_rdf = llm_rdf or llm_ner + + async def process_paragraphs(self, paragraphs: List[str]) -> List[dict]: + """ + 异步处理多个段落。 + """ + from .utils.hash import get_sha256 + + results = [] + total = len(paragraphs) + + for i, pg in enumerate(paragraphs, start=1): + # 打印进度日志,让用户知道没有卡死 + logger.info(f"[IEProcess] 正在处理第 {i}/{total} 段文本 (长度: {len(pg)})...") + + # 使用 asyncio.to_thread 包装同步阻塞调用,防止死锁 + # 这样 info_extract_from_str 内部的 asyncio.run 会在独立线程的新 loop 中运行 + try: + entities, triples = await asyncio.to_thread( + info_extract_from_str, self.llm_ner, self.llm_rdf, pg + ) + + if entities is not None: + results.append( + { + "idx": get_sha256(pg), + "passage": pg, + "extracted_entities": entities, + "extracted_triples": triples, + } + ) + logger.info(f"[IEProcess] 第 {i}/{total} 段处理完成,提取到 {len(entities)} 个实体") + else: + logger.warning(f"[IEProcess] 第 {i}/{total} 段提取失败(返回为空)") + except Exception as e: + logger.error(f"[IEProcess] 处理第 {i}/{total} 段时发生异常: {e}") + + return results diff --git a/src/chat/knowledge/lpmm_ops.py b/src/chat/knowledge/lpmm_ops.py new file mode 100644 index 00000000..1bbea230 --- /dev/null +++ b/src/chat/knowledge/lpmm_ops.py @@ -0,0 +1,331 @@ +import asyncio +from typing import List, Callable, Any +from src.chat.knowledge.embedding_store import EmbeddingManager +from src.chat.knowledge.kg_manager import KGManager +from src.chat.knowledge.qa_manager import QAManager +from src.common.logger import get_logger +from src.config.config import global_config +from src.chat.knowledge import get_qa_manager, lpmm_start_up + +logger = get_logger("LPMM-Plugin-API") + +class LPMMOperations: + """ + LPMM 内部操作接口。 + 封装了 LPMM 的核心操作,供插件系统 API 或其他内部组件调用。 + """ + + def __init__(self): + self._initialized = False + + async def _run_cancellable_executor( + self, func: Callable, *args, **kwargs + ) -> Any: + """ + 在线程池中执行可取消的同步操作。 + 当任务被取消时(如 Ctrl+C),会立即响应并抛出 CancelledError。 + 注意:线程池中的操作可能仍在运行,但协程会立即返回,不会阻塞主进程。 + + Args: + func: 要执行的同步函数 + *args: 函数的位置参数 + **kwargs: 函数的关键字参数 + + Returns: + 函数的返回值 + + Raises: + asyncio.CancelledError: 当任务被取消时 + """ + loop = asyncio.get_event_loop() + # 在线程池中执行,当协程被取消时会立即响应 + # 虽然线程池中的操作可能仍在运行,但协程不会阻塞 + return await loop.run_in_executor(None, func, *args, **kwargs) + + async def _get_managers(self) -> tuple[EmbeddingManager, KGManager, QAManager]: + """获取并确保 LPMM 管理器已初始化""" + qa_mgr = get_qa_manager() + if qa_mgr is None: + # 如果全局没初始化,尝试初始化 + if not global_config.lpmm_knowledge.enable: + logger.warning("LPMM 知识库在全局配置中未启用,操作可能受限。") + + lpmm_start_up() + qa_mgr = get_qa_manager() + + if qa_mgr is None: + raise RuntimeError("无法获取 LPMM QAManager,请检查 LPMM 是否已正确安装和配置。") + + return qa_mgr.embed_manager, qa_mgr.kg_manager, qa_mgr + + async def add_content(self, text: str) -> dict: + """ + 向知识库添加新内容。 + + Args: + text: 原始文本。支持多段文本(用双换行分隔)。 + + Returns: + dict: {"status": "success/error", "count": 导入段落数, "message": "描述"} + """ + try: + embed_mgr, kg_mgr, _ = await self._get_managers() + + # 1. 分段处理 + paragraphs = [p.strip() for p in text.split('\n\n') if p.strip()] + if not paragraphs: + return {"status": "error", "message": "文本内容为空"} + + # 2. 实体与三元组抽取 (内部调用大模型) + from src.chat.knowledge.ie_process import IEProcess + from src.llm_models.utils_model import LLMRequest + from src.config.config import model_config + + llm_ner = LLMRequest(model_set=model_config.model_task_config.lpmm_entity_extract, request_type="lpmm.entity_extract") + llm_rdf = LLMRequest(model_set=model_config.model_task_config.lpmm_rdf_build, request_type="lpmm.rdf_build") + ie_process = IEProcess(llm_ner, llm_rdf) + + logger.info(f"[Plugin API] 正在对 {len(paragraphs)} 段文本执行信息抽取...") + extracted_docs = await ie_process.process_paragraphs(paragraphs) + + # 3. 构造并导入数据 + # 这里我们手动实现导入逻辑,不依赖外部脚本 + # a. 准备段落 + raw_paragraphs = {doc["idx"]: doc["passage"] for doc in extracted_docs} + # b. 准备三元组 + triple_list_data = {doc["idx"]: doc["extracted_triples"] for doc in extracted_docs} + + # 向量化并入库 + # 注意:此处模仿 import_openie.py 的核心逻辑 + # 1. 先进行去重检查,只处理新段落 + # store_new_data_set 期望的格式:raw_paragraphs 的键是段落hash(不带前缀),值是段落文本 + new_raw_paragraphs = {} + new_triple_list_data = {} + + for pg_hash, passage in raw_paragraphs.items(): + key = f"paragraph-{pg_hash}" + if key not in embed_mgr.stored_pg_hashes: + new_raw_paragraphs[pg_hash] = passage + new_triple_list_data[pg_hash] = triple_list_data[pg_hash] + + if not new_raw_paragraphs: + return {"status": "success", "count": 0, "message": "内容已存在,无需重复导入"} + + # 2. 使用 EmbeddingManager 的标准方法存储段落、实体和关系的嵌入 + # store_new_data_set 会自动处理嵌入生成和存储 + # 将同步阻塞操作放到线程池中执行,避免阻塞事件循环 + await self._run_cancellable_executor( + embed_mgr.store_new_data_set, + new_raw_paragraphs, + new_triple_list_data + ) + + # 3. 构建知识图谱(只需要三元组数据和embedding_manager) + await self._run_cancellable_executor( + kg_mgr.build_kg, + new_triple_list_data, + embed_mgr + ) + + # 4. 持久化 + await self._run_cancellable_executor(embed_mgr.rebuild_faiss_index) + await self._run_cancellable_executor(embed_mgr.save_to_file) + await self._run_cancellable_executor(kg_mgr.save_to_file) + + return {"status": "success", "count": len(new_raw_paragraphs), "message": f"成功导入 {len(new_raw_paragraphs)} 条知识"} + + except asyncio.CancelledError: + logger.warning("[Plugin API] 导入操作被用户中断") + return {"status": "cancelled", "message": "导入操作已被用户中断"} + except Exception as e: + logger.error(f"[Plugin API] 导入知识失败: {e}", exc_info=True) + return {"status": "error", "message": str(e)} + + async def search(self, query: str, top_k: int = 3) -> List[str]: + """ + 检索知识库。 + + Args: + query: 查询问题。 + top_k: 返回最相关的条目数。 + + Returns: + List[str]: 相关文段列表。 + """ + try: + _, _, qa_mgr = await self._get_managers() + # 直接调用 QAManager 的检索接口 + knowledge = qa_mgr.get_knowledge(query, top_k=top_k) + # 返回通常是拼接好的字符串,这里我们可以尝试按其内部规则切分回列表,或者直接返回 + return [knowledge] if knowledge else [] + except Exception as e: + logger.error(f"[Plugin API] 检索知识失败: {e}") + return [] + + async def delete(self, keyword: str, exact_match: bool = False) -> dict: + """ + 根据关键词或完整文段删除知识库内容。 + + Args: + keyword: 匹配关键词或完整文段。 + exact_match: 是否使用完整文段匹配(True=完全匹配,False=关键词模糊匹配)。 + + Returns: + dict: {"status": "success/info", "deleted_count": 删除条数, "message": "描述"} + """ + try: + embed_mgr, kg_mgr, _ = await self._get_managers() + + # 1. 查找匹配的段落 + to_delete_keys = [] + to_delete_hashes = [] + + for key, item in embed_mgr.paragraphs_embedding_store.store.items(): + if exact_match: + # 完整文段匹配 + if item.str.strip() == keyword.strip(): + to_delete_keys.append(key) + to_delete_hashes.append(key.replace("paragraph-", "", 1)) + else: + # 关键词模糊匹配 + if keyword in item.str: + to_delete_keys.append(key) + to_delete_hashes.append(key.replace("paragraph-", "", 1)) + + if not to_delete_keys: + match_type = "完整文段" if exact_match else "关键词" + return {"status": "info", "deleted_count": 0, "message": f"未找到匹配的内容({match_type}匹配)"} + + # 2. 执行删除 + # 将同步阻塞操作放到线程池中执行,避免阻塞事件循环 + + # a. 从向量库删除 + deleted_count, _ = await self._run_cancellable_executor( + embed_mgr.paragraphs_embedding_store.delete_items, + to_delete_keys + ) + embed_mgr.stored_pg_hashes = set(embed_mgr.paragraphs_embedding_store.store.keys()) + + # b. 从知识图谱删除 + await self._run_cancellable_executor( + kg_mgr.delete_paragraphs, + to_delete_hashes, + True # remove_orphan_entities + ) + + # 3. 持久化 + await self._run_cancellable_executor(embed_mgr.rebuild_faiss_index) + await self._run_cancellable_executor(embed_mgr.save_to_file) + await self._run_cancellable_executor(kg_mgr.save_to_file) + + match_type = "完整文段" if exact_match else "关键词" + return {"status": "success", "deleted_count": deleted_count, "message": f"已成功删除 {deleted_count} 条相关知识({match_type}匹配)"} + + except asyncio.CancelledError: + logger.warning("[Plugin API] 删除操作被用户中断") + return {"status": "cancelled", "message": "删除操作已被用户中断"} + except Exception as e: + logger.error(f"[Plugin API] 删除知识失败: {e}", exc_info=True) + return {"status": "error", "message": str(e)} + + async def clear_all(self) -> dict: + """ + 清空整个LPMM知识库(删除所有段落、实体、关系和知识图谱数据)。 + + Returns: + dict: {"status": "success/error", "message": "描述", "stats": {...}} + """ + try: + embed_mgr, kg_mgr, _ = await self._get_managers() + + # 记录清空前的统计信息 + before_stats = { + "paragraphs": len(embed_mgr.paragraphs_embedding_store.store), + "entities": len(embed_mgr.entities_embedding_store.store), + "relations": len(embed_mgr.relation_embedding_store.store), + "kg_nodes": len(kg_mgr.graph.get_node_list()), + "kg_edges": len(kg_mgr.graph.get_edge_list()), + } + + # 将同步阻塞操作放到线程池中执行,避免阻塞事件循环 + + # 1. 清空所有向量库 + # 获取所有keys + para_keys = list(embed_mgr.paragraphs_embedding_store.store.keys()) + ent_keys = list(embed_mgr.entities_embedding_store.store.keys()) + rel_keys = list(embed_mgr.relation_embedding_store.store.keys()) + + # 删除所有段落向量 + para_deleted, _ = await self._run_cancellable_executor( + embed_mgr.paragraphs_embedding_store.delete_items, + para_keys + ) + embed_mgr.stored_pg_hashes.clear() + + # 删除所有实体向量 + if ent_keys: + ent_deleted, _ = await self._run_cancellable_executor( + embed_mgr.entities_embedding_store.delete_items, + ent_keys + ) + else: + ent_deleted = 0 + + # 删除所有关系向量 + if rel_keys: + rel_deleted, _ = await self._run_cancellable_executor( + embed_mgr.relation_embedding_store.delete_items, + rel_keys + ) + else: + rel_deleted = 0 + + # 2. 清空知识图谱 + # 获取所有段落hash + all_pg_hashes = list(kg_mgr.stored_paragraph_hashes) + if all_pg_hashes: + # 删除所有段落节点(这会自动清理相关的边和孤立实体) + await self._run_cancellable_executor( + kg_mgr.delete_paragraphs, + all_pg_hashes, + True # remove_orphan_entities + ) + + # 完全清空KG:创建新的空图 + from quick_algo import di_graph + kg_mgr.graph = di_graph.DiGraph() + kg_mgr.stored_paragraph_hashes.clear() + kg_mgr.ent_appear_cnt.clear() + + # 3. 重建索引并保存 + await self._run_cancellable_executor(embed_mgr.rebuild_faiss_index) + await self._run_cancellable_executor(embed_mgr.save_to_file) + await self._run_cancellable_executor(kg_mgr.save_to_file) + + after_stats = { + "paragraphs": len(embed_mgr.paragraphs_embedding_store.store), + "entities": len(embed_mgr.entities_embedding_store.store), + "relations": len(embed_mgr.relation_embedding_store.store), + "kg_nodes": len(kg_mgr.graph.get_node_list()), + "kg_edges": len(kg_mgr.graph.get_edge_list()), + } + + return { + "status": "success", + "message": f"已成功清空LPMM知识库(删除 {para_deleted} 个段落、{ent_deleted} 个实体、{rel_deleted} 个关系)", + "stats": { + "before": before_stats, + "after": after_stats, + } + } + + except asyncio.CancelledError: + logger.warning("[Plugin API] 清空操作被用户中断") + return {"status": "cancelled", "message": "清空操作已被用户中断"} + except Exception as e: + logger.error(f"[Plugin API] 清空知识库失败: {e}", exc_info=True) + return {"status": "error", "message": str(e)} + +# 内部使用的单例 +lpmm_ops = LPMMOperations() + From 25b405d191ba87ca1f671c9ad728e3dc18080c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Tue, 13 Jan 2026 06:18:07 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=AF=B9log=5Fviewer?= =?UTF-8?q?=E7=9A=84git=E8=BF=BD=E8=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- log_viewer/log_viewer_optimized.py | 1427 ---------------------------- 1 file changed, 1427 deletions(-) delete mode 100644 log_viewer/log_viewer_optimized.py diff --git a/log_viewer/log_viewer_optimized.py b/log_viewer/log_viewer_optimized.py deleted file mode 100644 index 8dd14d35..00000000 --- a/log_viewer/log_viewer_optimized.py +++ /dev/null @@ -1,1427 +0,0 @@ -import tkinter as tk -from tkinter import ttk, messagebox, filedialog, colorchooser -import json -from pathlib import Path -import threading -import toml -from datetime import datetime -from collections import defaultdict -import os -import time - - -class LogIndex: - """日志索引,用于快速检索和过滤""" - - def __init__(self): - self.entries = [] # 所有日志条目 - self.module_index = defaultdict(list) # 按模块索引 - self.level_index = defaultdict(list) # 按级别索引 - self.filtered_indices = [] # 当前过滤结果的索引 - self.total_entries = 0 - - def add_entry(self, index, entry): - """添加日志条目到索引""" - if index >= len(self.entries): - self.entries.extend([None] * (index - len(self.entries) + 1)) - - self.entries[index] = entry - self.total_entries = max(self.total_entries, index + 1) - - # 更新各种索引 - logger_name = entry.get("logger_name", "") - level = entry.get("level", "") - - self.module_index[logger_name].append(index) - self.level_index[level].append(index) - - def filter_entries(self, modules=None, level=None, search_text=None): - """根据条件过滤日志条目""" - if not modules and not level and not search_text: - self.filtered_indices = list(range(self.total_entries)) - return self.filtered_indices - - candidate_indices = set(range(self.total_entries)) - - # 模块过滤 - if modules and "全部" not in modules: - module_indices = set() - for module in modules: - module_indices.update(self.module_index.get(module, [])) - candidate_indices &= module_indices - - # 级别过滤 - if level and level != "全部": - level_indices = set(self.level_index.get(level, [])) - candidate_indices &= level_indices - - # 文本搜索过滤 - if search_text: - search_text = search_text.lower() - text_indices = set() - for i in candidate_indices: - if i < len(self.entries) and self.entries[i]: - entry = self.entries[i] - text_content = f"{entry.get('logger_name', '')} {entry.get('event', '')}".lower() - if search_text in text_content: - text_indices.add(i) - candidate_indices &= text_indices - - self.filtered_indices = sorted(list(candidate_indices)) - return self.filtered_indices - - def get_filtered_count(self): - """获取过滤后的条目数量""" - return len(self.filtered_indices) - - def get_entry_at_filtered_position(self, position): - """获取过滤结果中指定位置的条目""" - if 0 <= position < len(self.filtered_indices): - index = self.filtered_indices[position] - return self.entries[index] if index < len(self.entries) else None - return None - - -class LogFormatter: - """日志格式化器""" - - def __init__(self, config, custom_module_colors=None, custom_level_colors=None): - self.config = config - - # 日志级别颜色 - self.level_colors = { - "debug": "#FFA500", - "info": "#0000FF", - "success": "#008000", - "warning": "#FFFF00", - "error": "#FF0000", - "critical": "#800080", - } - - # 模块颜色映射 - self.module_colors = { - "api": "#00FF00", - "emoji": "#00FF00", - "chat": "#0080FF", - "config": "#FFFF00", - "common": "#FF00FF", - "tools": "#00FFFF", - "lpmm": "#00FFFF", - "plugin_system": "#FF0080", - "experimental": "#FFFFFF", - "person_info": "#008000", - "manager": "#800080", - "llm_models": "#008080", - "plugins": "#800000", - "plugin_api": "#808000", - "remote": "#8000FF", - } - - # 应用自定义颜色 - if custom_module_colors: - self.module_colors.update(custom_module_colors) - if custom_level_colors: - self.level_colors.update(custom_level_colors) - - # 根据配置决定颜色启用状态 - color_text = self.config.get("color_text", "full") - if color_text == "none": - self.enable_colors = False - self.enable_module_colors = False - self.enable_level_colors = False - elif color_text == "title": - self.enable_colors = True - self.enable_module_colors = True - self.enable_level_colors = False - elif color_text == "full": - self.enable_colors = True - self.enable_module_colors = True - self.enable_level_colors = True - else: - self.enable_colors = True - self.enable_module_colors = True - self.enable_level_colors = False - - def format_log_entry(self, log_entry): - """格式化日志条目,返回格式化后的文本和样式标签""" - timestamp = log_entry.get("timestamp", "") - level = log_entry.get("level", "info") - logger_name = log_entry.get("logger_name", "") - event = log_entry.get("event", "") - - # 格式化时间戳 - formatted_timestamp = self.format_timestamp(timestamp) - - # 构建输出部分 - parts = [] - tags = [] - - # 日志级别样式配置 - log_level_style = self.config.get("log_level_style", "lite") - - # 时间戳 - if formatted_timestamp: - if log_level_style == "lite" and self.enable_level_colors: - parts.append(formatted_timestamp) - tags.append(f"level_{level}") - else: - parts.append(formatted_timestamp) - tags.append("timestamp") - - # 日志级别显示 - if log_level_style == "full": - level_text = f"[{level.upper():>8}]" - parts.append(level_text) - if self.enable_level_colors: - tags.append(f"level_{level}") - else: - tags.append("level") - elif log_level_style == "compact": - level_text = f"[{level.upper()[0]:>8}]" - parts.append(level_text) - if self.enable_level_colors: - tags.append(f"level_{level}") - else: - tags.append("level") - - # 模块名称 - if logger_name: - module_text = f"[{logger_name}]" - parts.append(module_text) - if self.enable_module_colors: - tags.append(f"module_{logger_name}") - else: - tags.append("module") - - # 消息内容 - if isinstance(event, str): - parts.append(event) - elif isinstance(event, dict): - try: - parts.append(json.dumps(event, ensure_ascii=False, indent=None)) - except (TypeError, ValueError): - parts.append(str(event)) - else: - parts.append(str(event)) - tags.append("message") - - # 处理其他字段 - extras = [] - for key, value in log_entry.items(): - if key not in ("timestamp", "level", "logger_name", "event"): - if isinstance(value, (dict, list)): - try: - value_str = json.dumps(value, ensure_ascii=False, indent=None) - except (TypeError, ValueError): - value_str = str(value) - else: - value_str = str(value) - extras.append(f"{key}={value_str}") - - if extras: - parts.append(" ".join(extras)) - tags.append("extras") - - return parts, tags - - def format_timestamp(self, timestamp): - """格式化时间戳""" - if not timestamp: - return "" - - try: - if "T" in timestamp: - dt = datetime.fromisoformat(timestamp.replace("Z", "+00:00")) - else: - return timestamp - - date_style = self.config.get("date_style", "m-d H:i:s") - format_map = { - "Y": "%Y", - "m": "%m", - "d": "%d", - "H": "%H", - "i": "%M", - "s": "%S", - } - - python_format = date_style - for php_char, python_char in format_map.items(): - python_format = python_format.replace(php_char, python_char) - - return dt.strftime(python_format) - except Exception: - return timestamp - - -class VirtualLogDisplay: - """虚拟滚动日志显示组件""" - - def __init__(self, parent, formatter): - self.parent = parent - self.formatter = formatter - self.line_height = 20 # 每行高度(像素) - self.visible_lines = 30 # 可见行数 - - # 创建主框架 - self.main_frame = ttk.Frame(parent) - - # 创建文本框和滚动条 - self.scrollbar = ttk.Scrollbar(self.main_frame) - self.scrollbar.pack(side=tk.RIGHT, fill=tk.Y) - - self.text_widget = tk.Text( - self.main_frame, - wrap=tk.WORD, - yscrollcommand=self.scrollbar.set, - background="#1e1e1e", - foreground="#ffffff", - insertbackground="#ffffff", - selectbackground="#404040", - font=("Consolas", 10), - ) - self.text_widget.pack(side=tk.LEFT, fill=tk.BOTH, expand=True) - self.scrollbar.config(command=self.text_widget.yview) - - # 配置文本标签样式 - self.configure_text_tags() - - # 数据源 - self.log_index = None - self.current_page = 0 - self.page_size = 500 # 每页显示条数 - self.max_display_lines = 2000 # 最大显示行数 - - def pack(self, **kwargs): - """包装pack方法""" - self.main_frame.pack(**kwargs) - - def configure_text_tags(self): - """配置文本标签样式""" - # 基础标签 - self.text_widget.tag_configure("timestamp", foreground="#808080") - self.text_widget.tag_configure("level", foreground="#808080") - self.text_widget.tag_configure("module", foreground="#808080") - self.text_widget.tag_configure("message", foreground="#ffffff") - self.text_widget.tag_configure("extras", foreground="#808080") - - # 日志级别颜色标签 - for level, color in self.formatter.level_colors.items(): - self.text_widget.tag_configure(f"level_{level}", foreground=color) - - # 模块颜色标签 - for module, color in self.formatter.module_colors.items(): - self.text_widget.tag_configure(f"module_{module}", foreground=color) - - def set_log_index(self, log_index): - """设置日志索引数据源""" - self.log_index = log_index - self.current_page = 0 - self.refresh_display() - - def refresh_display(self): - """刷新显示""" - if not self.log_index: - self.text_widget.delete(1.0, tk.END) - return - - # 清空显示 - self.text_widget.delete(1.0, tk.END) - - # 批量加载和显示日志 - total_count = self.log_index.get_filtered_count() - if total_count == 0: - self.text_widget.insert(tk.END, "没有符合条件的日志记录\n") - return - - # 计算显示范围 - start_index = 0 - end_index = min(total_count, self.max_display_lines) - - # 批量处理和显示 - batch_size = 100 - for batch_start in range(start_index, end_index, batch_size): - batch_end = min(batch_start + batch_size, end_index) - self.display_batch(batch_start, batch_end) - - # 让UI有机会响应 - self.parent.update_idletasks() - - # 滚动到底部(如果需要) - self.text_widget.see(tk.END) - - def display_batch(self, start_index, end_index): - """批量显示日志条目""" - for i in range(start_index, end_index): - log_entry = self.log_index.get_entry_at_filtered_position(i) - if log_entry: - self.append_entry(log_entry, scroll=False) - - def append_entry(self, log_entry, scroll=True): - """将单个日志条目附加到文本小部件""" - # 检查在添加新内容之前视图是否已滚动到底部 - should_scroll = scroll and self.text_widget.yview()[1] > 0.99 - - parts, tags = self.formatter.format_log_entry(log_entry) - line_text = " ".join(parts) + "\n" - - # 获取插入前的末尾位置 - start_pos = self.text_widget.index(tk.END + "-1c") - self.text_widget.insert(tk.END, line_text) - - # 为每个部分应用正确的标签 - current_len = 0 - for part, tag_name in zip(parts, tags, strict=False): - start_index = f"{start_pos}+{current_len}c" - end_index = f"{start_pos}+{current_len + len(part)}c" - self.text_widget.tag_add(tag_name, start_index, end_index) - current_len += len(part) + 1 # 计入空格 - - if should_scroll: - self.text_widget.see(tk.END) - - -class AsyncLogLoader: - """异步日志加载器""" - - def __init__(self, callback): - self.callback = callback - self.loading = False - self.should_stop = False - - def load_file_async(self, file_path, progress_callback=None): - """异步加载日志文件""" - if self.loading: - return - - self.loading = True - self.should_stop = False - - def load_worker(): - try: - log_index = LogIndex() - - if not os.path.exists(file_path): - self.callback(log_index, "文件不存在") - return - - file_size = os.path.getsize(file_path) - processed_size = 0 - - with open(file_path, "r", encoding="utf-8") as f: - line_count = 0 - batch_size = 1000 # 批量处理 - - while not self.should_stop: - lines = [] - for _ in range(batch_size): - line = f.readline() - if not line: - break - lines.append(line) - processed_size += len(line.encode("utf-8")) - - if not lines: - break - - # 处理这批数据 - for line in lines: - try: - log_entry = json.loads(line.strip()) - log_index.add_entry(line_count, log_entry) - line_count += 1 - except json.JSONDecodeError: - continue - - # 更新进度 - if progress_callback: - progress = min(100, (processed_size / file_size) * 100) - progress_callback(progress, line_count) - - if not self.should_stop: - self.callback(log_index, None) - - except Exception as e: - self.callback(None, str(e)) - finally: - self.loading = False - - thread = threading.Thread(target=load_worker) - thread.daemon = True - thread.start() - - def stop_loading(self): - """停止加载""" - self.should_stop = True - self.loading = False - - -class LogViewer: - def __init__(self, root): - self.root = root - self.root.title("MaiBot日志查看器 (优化版)") - self.root.geometry("1200x800") - - # 加载配置 - self.load_config() - - # 初始化日志格式化器 - self.formatter = LogFormatter(self.log_config, self.custom_module_colors, self.custom_level_colors) - - # 初始化日志文件路径 - self.current_log_file = Path("logs/app.log.jsonl") - self.last_file_size = 0 - self.watching_thread = None - self.is_watching = tk.BooleanVar(value=True) - - # 初始化异步加载器 - self.async_loader = AsyncLogLoader(self.on_file_loaded) - - # 初始化日志索引 - self.log_index = LogIndex() - - # 创建主框架 - self.main_frame = ttk.Frame(root) - self.main_frame.pack(fill=tk.BOTH, expand=True, padx=5, pady=5) - - # 创建菜单栏 - self.create_menu() - - # 创建控制面板 - self.create_control_panel() - - # 创建虚拟滚动日志显示区域 - self.log_display = VirtualLogDisplay(self.main_frame, self.formatter) - self.log_display.pack(fill=tk.BOTH, expand=True) - - # 模块名映射 - self.module_name_mapping = { - "api": "API接口", - "async_task_manager": "异步任务管理器", - "background_tasks": "后台任务", - "base_tool": "基础工具", - "chat_stream": "聊天流", - "component_registry": "组件注册器", - "config": "配置", - "database_model": "数据库模型", - "emoji": "表情", - "heartflow": "心流", - "local_storage": "本地存储", - "lpmm": "LPMM", - "maibot_statistic": "MaiBot统计", - "main_message": "主消息", - "main": "主程序", - "memory": "内存", - "mood": "情绪", - "plugin_manager": "插件管理器", - "remote": "远程", - "willing": "意愿", - } - - # 加载自定义映射 - self.load_module_mapping() - - # 选中的模块集合 - self.selected_modules = set() - self.modules = set() - - # 绑定事件 - self.level_combo.bind("<>", self.filter_logs) - self.search_var.trace("w", self.filter_logs) - - # 绑定快捷键 - self.root.bind("", lambda e: self.select_log_file()) - self.root.bind("", lambda e: self.refresh_log_file()) - self.root.bind("", lambda e: self.export_logs()) - - # 初始加载文件 - if self.current_log_file.exists(): - self.load_log_file_async() - - def load_config(self): - """加载配置文件""" - # 默认配置 - self.default_config = { - "log": {"date_style": "m-d H:i:s", "log_level_style": "lite", "color_text": "full", "log_level": "INFO"}, - "viewer": { - "theme": "dark", - "font_size": 10, - "max_lines": 1000, - "auto_scroll": True, - "show_milliseconds": False, - "window": {"width": 1200, "height": 800, "remember_position": True}, - }, - } - - # 从bot_config.toml加载日志配置 - config_path = Path("config/bot_config.toml") - self.log_config = self.default_config["log"].copy() - self.viewer_config = self.default_config["viewer"].copy() - - try: - if config_path.exists(): - with open(config_path, "r", encoding="utf-8") as f: - bot_config = toml.load(f) - if "log" in bot_config: - self.log_config.update(bot_config["log"]) - except Exception as e: - print(f"加载bot配置失败: {e}") - - # 从viewer配置文件加载查看器配置 - viewer_config_path = Path("config/log_viewer_config.toml") - self.custom_module_colors = {} - self.custom_level_colors = {} - - try: - if viewer_config_path.exists(): - with open(viewer_config_path, "r", encoding="utf-8") as f: - viewer_config = toml.load(f) - if "viewer" in viewer_config: - self.viewer_config.update(viewer_config["viewer"]) - - # 加载自定义模块颜色 - if "module_colors" in viewer_config["viewer"]: - self.custom_module_colors = viewer_config["viewer"]["module_colors"] - - # 加载自定义级别颜色 - if "level_colors" in viewer_config["viewer"]: - self.custom_level_colors = viewer_config["viewer"]["level_colors"] - - if "log" in viewer_config: - self.log_config.update(viewer_config["log"]) - except Exception as e: - print(f"加载查看器配置失败: {e}") - - # 应用窗口配置 - window_config = self.viewer_config.get("window", {}) - window_width = window_config.get("width", 1200) - window_height = window_config.get("height", 800) - self.root.geometry(f"{window_width}x{window_height}") - - def save_viewer_config(self): - """保存查看器配置""" - # 准备完整的配置数据 - viewer_config_copy = self.viewer_config.copy() - - # 保存自定义颜色(只保存与默认值不同的颜色) - if self.custom_module_colors: - viewer_config_copy["module_colors"] = self.custom_module_colors - if self.custom_level_colors: - viewer_config_copy["level_colors"] = self.custom_level_colors - - config_data = {"log": self.log_config, "viewer": viewer_config_copy} - - config_path = Path("config/log_viewer_config.toml") - config_path.parent.mkdir(exist_ok=True) - - try: - with open(config_path, "w", encoding="utf-8") as f: - toml.dump(config_data, f) - except Exception as e: - print(f"保存查看器配置失败: {e}") - - def create_menu(self): - """创建菜单栏""" - menubar = tk.Menu(self.root) - self.root.config(menu=menubar) - - # 配置菜单 - config_menu = tk.Menu(menubar, tearoff=0) - menubar.add_cascade(label="配置", menu=config_menu) - config_menu.add_command(label="日志格式设置", command=self.show_format_settings) - config_menu.add_command(label="颜色设置", command=self.show_color_settings) - config_menu.add_command(label="查看器设置", command=self.show_viewer_settings) - config_menu.add_separator() - config_menu.add_command(label="重新加载配置", command=self.reload_config) - - # 文件菜单 - file_menu = tk.Menu(menubar, tearoff=0) - menubar.add_cascade(label="文件", menu=file_menu) - file_menu.add_command(label="选择日志文件", command=self.select_log_file, accelerator="Ctrl+O") - file_menu.add_command(label="刷新当前文件", command=self.refresh_log_file, accelerator="F5") - file_menu.add_separator() - file_menu.add_command(label="导出当前日志", command=self.export_logs, accelerator="Ctrl+S") - - # 工具菜单 - tools_menu = tk.Menu(menubar, tearoff=0) - menubar.add_cascade(label="工具", menu=tools_menu) - tools_menu.add_command(label="清空日志显示", command=self.clear_log_display) - - def show_format_settings(self): - """显示格式设置窗口""" - format_window = tk.Toplevel(self.root) - format_window.title("日志格式设置") - format_window.geometry("400x300") - - frame = ttk.Frame(format_window) - frame.pack(fill=tk.BOTH, expand=True, padx=10, pady=10) - - # 日期格式 - ttk.Label(frame, text="日期格式:").pack(anchor="w", pady=2) - date_style_var = tk.StringVar(value=self.log_config.get("date_style", "m-d H:i:s")) - date_entry = ttk.Entry(frame, textvariable=date_style_var, width=30) - date_entry.pack(anchor="w", pady=2) - ttk.Label(frame, text="格式说明: Y=年份, m=月份, d=日期, H=小时, i=分钟, s=秒", font=("", 8)).pack( - anchor="w", pady=2 - ) - - # 日志级别样式 - ttk.Label(frame, text="日志级别样式:").pack(anchor="w", pady=(10, 2)) - level_style_var = tk.StringVar(value=self.log_config.get("log_level_style", "lite")) - level_frame = ttk.Frame(frame) - level_frame.pack(anchor="w", pady=2) - - ttk.Radiobutton(level_frame, text="简洁(lite)", variable=level_style_var, value="lite").pack( - side="left", padx=(0, 10) - ) - ttk.Radiobutton(level_frame, text="紧凑(compact)", variable=level_style_var, value="compact").pack( - side="left", padx=(0, 10) - ) - ttk.Radiobutton(level_frame, text="完整(full)", variable=level_style_var, value="full").pack( - side="left", padx=(0, 10) - ) - - # 颜色文本设置 - ttk.Label(frame, text="文本颜色设置:").pack(anchor="w", pady=(10, 2)) - color_text_var = tk.StringVar(value=self.log_config.get("color_text", "full")) - color_frame = ttk.Frame(frame) - color_frame.pack(anchor="w", pady=2) - - ttk.Radiobutton(color_frame, text="无颜色(none)", variable=color_text_var, value="none").pack( - side="left", padx=(0, 10) - ) - ttk.Radiobutton(color_frame, text="仅标题(title)", variable=color_text_var, value="title").pack( - side="left", padx=(0, 10) - ) - ttk.Radiobutton(color_frame, text="全部(full)", variable=color_text_var, value="full").pack( - side="left", padx=(0, 10) - ) - - # 按钮 - button_frame = ttk.Frame(frame) - button_frame.pack(fill="x", pady=(20, 0)) - - def apply_format(): - self.log_config["date_style"] = date_style_var.get() - self.log_config["log_level_style"] = level_style_var.get() - self.log_config["color_text"] = color_text_var.get() - - # 重新初始化格式化器 - self.formatter = LogFormatter(self.log_config, self.custom_module_colors, self.custom_level_colors) - self.log_display.formatter = self.formatter - self.log_display.configure_text_tags() - - # 保存配置 - self.save_viewer_config() - - # 重新过滤日志以应用新格式 - self.filter_logs() - - format_window.destroy() - - ttk.Button(button_frame, text="应用", command=apply_format).pack(side="right", padx=(5, 0)) - ttk.Button(button_frame, text="取消", command=format_window.destroy).pack(side="right") - - def show_viewer_settings(self): - """显示查看器设置窗口""" - viewer_window = tk.Toplevel(self.root) - viewer_window.title("查看器设置") - viewer_window.geometry("350x250") - - frame = ttk.Frame(viewer_window) - frame.pack(fill=tk.BOTH, expand=True, padx=10, pady=10) - - # 主题设置 - ttk.Label(frame, text="主题:").pack(anchor="w", pady=2) - theme_var = tk.StringVar(value=self.viewer_config.get("theme", "dark")) - theme_frame = ttk.Frame(frame) - theme_frame.pack(anchor="w", pady=2) - ttk.Radiobutton(theme_frame, text="深色", variable=theme_var, value="dark").pack(side="left", padx=(0, 10)) - ttk.Radiobutton(theme_frame, text="浅色", variable=theme_var, value="light").pack(side="left") - - # 字体大小 - ttk.Label(frame, text="字体大小:").pack(anchor="w", pady=(10, 2)) - font_size_var = tk.IntVar(value=self.viewer_config.get("font_size", 10)) - font_size_spin = ttk.Spinbox(frame, from_=8, to=20, textvariable=font_size_var, width=10) - font_size_spin.pack(anchor="w", pady=2) - - # 最大行数 - ttk.Label(frame, text="最大显示行数:").pack(anchor="w", pady=(10, 2)) - max_lines_var = tk.IntVar(value=self.viewer_config.get("max_lines", 1000)) - max_lines_spin = ttk.Spinbox(frame, from_=100, to=10000, increment=100, textvariable=max_lines_var, width=10) - max_lines_spin.pack(anchor="w", pady=2) - - # 自动滚动 - auto_scroll_var = tk.BooleanVar(value=self.viewer_config.get("auto_scroll", True)) - ttk.Checkbutton(frame, text="自动滚动到底部", variable=auto_scroll_var).pack(anchor="w", pady=(10, 2)) - - # 按钮 - button_frame = ttk.Frame(frame) - button_frame.pack(fill="x", pady=(20, 0)) - - def apply_viewer_settings(): - self.viewer_config["theme"] = theme_var.get() - self.viewer_config["font_size"] = font_size_var.get() - self.viewer_config["max_lines"] = max_lines_var.get() - self.viewer_config["auto_scroll"] = auto_scroll_var.get() - - # 应用主题 - self.apply_theme() - - # 保存配置 - self.save_viewer_config() - - viewer_window.destroy() - - ttk.Button(button_frame, text="应用", command=apply_viewer_settings).pack(side="right", padx=(5, 0)) - ttk.Button(button_frame, text="取消", command=viewer_window.destroy).pack(side="right") - - def apply_theme(self): - """应用主题设置""" - theme = self.viewer_config.get("theme", "dark") - font_size = self.viewer_config.get("font_size", 10) - - # 更新虚拟显示组件的主题 - if theme == "dark": - bg_color = "#1e1e1e" - fg_color = "#ffffff" - select_bg = "#404040" - else: - bg_color = "#ffffff" - fg_color = "#000000" - select_bg = "#c0c0c0" - - self.log_display.text_widget.config( - background=bg_color, foreground=fg_color, selectbackground=select_bg, font=("Consolas", font_size) - ) - - # 重新配置标签样式 - self.log_display.configure_text_tags() - - def reload_config(self): - """重新加载配置""" - self.load_config() - self.formatter = LogFormatter(self.log_config, self.custom_module_colors, self.custom_level_colors) - self.log_display.formatter = self.formatter - self.log_display.configure_text_tags() - self.apply_theme() - self.filter_logs() - - def clear_log_display(self): - """清空日志显示""" - self.log_display.text_widget.delete(1.0, tk.END) - - def export_logs(self): - """导出当前显示的日志""" - filename = filedialog.asksaveasfilename( - defaultextension=".txt", filetypes=[("文本文件", "*.txt"), ("所有文件", "*.*")] - ) - if filename: - try: - # 获取当前显示的所有日志条目 - if self.log_index: - filtered_count = self.log_index.get_filtered_count() - log_lines = [] - for i in range(filtered_count): - log_entry = self.log_index.get_entry_at_filtered_position(i) - if log_entry: - parts, tags = self.formatter.format_log_entry(log_entry) - line_text = " ".join(parts) - log_lines.append(line_text) - - with open(filename, "w", encoding="utf-8") as f: - f.write("\n".join(log_lines)) - messagebox.showinfo("导出成功", f"日志已导出到: {filename}") - else: - messagebox.showwarning("导出失败", "没有日志可导出") - except Exception as e: - messagebox.showerror("导出失败", f"导出日志时出错: {e}") - - def load_module_mapping(self): - """加载自定义模块映射""" - mapping_file = Path("config/module_mapping.json") - if mapping_file.exists(): - try: - with open(mapping_file, "r", encoding="utf-8") as f: - custom_mapping = json.load(f) - self.module_name_mapping.update(custom_mapping) - except Exception as e: - print(f"加载模块映射失败: {e}") - - def save_module_mapping(self): - """保存自定义模块映射""" - mapping_file = Path("config/module_mapping.json") - mapping_file.parent.mkdir(exist_ok=True) - try: - with open(mapping_file, "w", encoding="utf-8") as f: - json.dump(self.module_name_mapping, f, ensure_ascii=False, indent=2) - except Exception as e: - print(f"保存模块映射失败: {e}") - - def show_color_settings(self): - """显示颜色设置窗口""" - color_window = tk.Toplevel(self.root) - color_window.title("颜色设置") - color_window.geometry("300x400") - - # 创建滚动框架 - frame = ttk.Frame(color_window) - frame.pack(fill=tk.BOTH, expand=True, padx=5, pady=5) - - # 创建滚动条 - scrollbar = ttk.Scrollbar(frame) - scrollbar.pack(side=tk.RIGHT, fill=tk.Y) - - # 创建颜色设置列表 - canvas = tk.Canvas(frame, yscrollcommand=scrollbar.set) - canvas.pack(side=tk.LEFT, fill=tk.BOTH, expand=True) - scrollbar.config(command=canvas.yview) - - # 创建内部框架 - inner_frame = ttk.Frame(canvas) - canvas.create_window((0, 0), window=inner_frame, anchor="nw") - - # 添加日志级别颜色设置 - ttk.Label(inner_frame, text="日志级别颜色", font=("", 10, "bold")).pack(anchor="w", padx=5, pady=5) - for level in ["info", "warning", "error"]: - frame = ttk.Frame(inner_frame) - frame.pack(fill=tk.X, padx=5, pady=2) - ttk.Label(frame, text=level).pack(side=tk.LEFT) - color_btn = ttk.Button( - frame, text="选择颜色", command=lambda level_name=level: self.choose_color(level_name) - ) - color_btn.pack(side=tk.RIGHT) - # 显示当前颜色 - color_label = ttk.Label(frame, text="■", foreground=self.formatter.level_colors[level]) - color_label.pack(side=tk.RIGHT, padx=5) - - # 添加模块颜色设置 - ttk.Label(inner_frame, text="\n模块颜色", font=("", 10, "bold")).pack(anchor="w", padx=5, pady=5) - for module in sorted(self.modules): - frame = ttk.Frame(inner_frame) - frame.pack(fill=tk.X, padx=5, pady=2) - ttk.Label(frame, text=module).pack(side=tk.LEFT) - color_btn = ttk.Button(frame, text="选择颜色", command=lambda m=module: self.choose_module_color(m)) - color_btn.pack(side=tk.RIGHT) - # 显示当前颜色 - color = self.formatter.module_colors.get(module, "black") - color_label = ttk.Label(frame, text="■", foreground=color) - color_label.pack(side=tk.RIGHT, padx=5) - - # 更新画布滚动区域 - inner_frame.update_idletasks() - canvas.config(scrollregion=canvas.bbox("all")) - - # 添加确定按钮 - ttk.Button(color_window, text="确定", command=color_window.destroy).pack(pady=5) - - def choose_color(self, level): - """选择日志级别颜色""" - color = colorchooser.askcolor(color=self.formatter.level_colors[level])[1] - if color: - self.formatter.level_colors[level] = color - self.custom_level_colors[level] = color # 保存到自定义颜色 - self.log_display.formatter = self.formatter - self.log_display.configure_text_tags() - self.save_viewer_config() # 自动保存配置 - self.filter_logs() - - def choose_module_color(self, module): - """选择模块颜色""" - color = colorchooser.askcolor(color=self.formatter.module_colors.get(module, "black"))[1] - if color: - self.formatter.module_colors[module] = color - self.custom_module_colors[module] = color # 保存到自定义颜色 - self.log_display.formatter = self.formatter - self.log_display.configure_text_tags() - self.save_viewer_config() # 自动保存配置 - self.filter_logs() - - def create_control_panel(self): - """创建控制面板""" - # 控制面板 - self.control_frame = ttk.Frame(self.main_frame) - self.control_frame.pack(fill=tk.X, pady=(0, 5)) - - # 文件选择框架 - self.file_frame = ttk.LabelFrame(self.control_frame, text="日志文件") - self.file_frame.pack(side=tk.TOP, fill=tk.X, padx=5, pady=(0, 5)) - - # 当前文件显示 - self.current_file_var = tk.StringVar(value=str(self.current_log_file)) - self.file_label = ttk.Label(self.file_frame, textvariable=self.current_file_var, foreground="blue") - self.file_label.pack(side=tk.LEFT, padx=5, pady=2) - - # 进度条 - self.progress_var = tk.DoubleVar() - self.progress_bar = ttk.Progressbar(self.file_frame, variable=self.progress_var, length=200) - self.progress_bar.pack(side=tk.LEFT, padx=5, pady=2) - self.progress_bar.pack_forget() - - # 状态标签 - self.status_var = tk.StringVar(value="就绪") - self.status_label = ttk.Label(self.file_frame, textvariable=self.status_var) - self.status_label.pack(side=tk.LEFT, padx=5, pady=2) - - # 按钮区域 - button_frame = ttk.Frame(self.file_frame) - button_frame.pack(side=tk.RIGHT, padx=5, pady=2) - - ttk.Button(button_frame, text="选择文件", command=self.select_log_file).pack(side=tk.LEFT, padx=2) - ttk.Button(button_frame, text="刷新", command=self.refresh_log_file).pack(side=tk.LEFT, padx=2) - ttk.Checkbutton(button_frame, text="实时更新", variable=self.is_watching, command=self.toggle_watching).pack( - side=tk.LEFT, padx=2 - ) - - # 模块选择框架 - self.module_frame = ttk.LabelFrame(self.control_frame, text="模块") - self.module_frame.pack(side=tk.LEFT, fill=tk.X, expand=True, padx=5) - - # 创建模块选择滚动区域 - self.module_canvas = tk.Canvas(self.module_frame, height=80) - self.module_canvas.pack(side=tk.LEFT, fill=tk.X, expand=True) - - # 创建模块选择内部框架 - self.module_inner_frame = ttk.Frame(self.module_canvas) - self.module_canvas.create_window((0, 0), window=self.module_inner_frame, anchor="nw") - - # 创建右侧控制区域(级别和搜索) - self.right_control_frame = ttk.Frame(self.control_frame) - self.right_control_frame.pack(side=tk.RIGHT, padx=5) - - # 映射编辑按钮 - mapping_btn = ttk.Button(self.right_control_frame, text="模块映射", command=self.edit_module_mapping) - mapping_btn.pack(side=tk.TOP, fill=tk.X, pady=1) - - # 日志级别选择 - level_frame = ttk.Frame(self.right_control_frame) - level_frame.pack(side=tk.TOP, fill=tk.X, pady=1) - ttk.Label(level_frame, text="级别:").pack(side=tk.LEFT, padx=2) - self.level_var = tk.StringVar(value="全部") - self.level_combo = ttk.Combobox(level_frame, textvariable=self.level_var, width=8) - self.level_combo["values"] = ["全部", "debug", "info", "warning", "error", "critical"] - self.level_combo.pack(side=tk.LEFT, padx=2) - - # 搜索框 - search_frame = ttk.Frame(self.right_control_frame) - search_frame.pack(side=tk.TOP, fill=tk.X, pady=1) - ttk.Label(search_frame, text="搜索:").pack(side=tk.LEFT, padx=2) - self.search_var = tk.StringVar() - self.search_entry = ttk.Entry(search_frame, textvariable=self.search_var, width=15) - self.search_entry.pack(side=tk.LEFT, padx=2) - - def on_file_loaded(self, log_index, error): - """文件加载完成回调""" - self.progress_bar.pack_forget() - - if error: - self.status_var.set(f"加载失败: {error}") - messagebox.showerror("错误", f"加载日志文件失败: {error}") - return - - self.log_index = log_index - try: - self.last_file_size = os.path.getsize(self.current_log_file) - except OSError: - self.last_file_size = 0 - self.status_var.set(f"已加载 {log_index.total_entries} 条日志") - - # 更新模块列表 - self.modules = set(log_index.module_index.keys()) - self.update_module_list() - - # 应用过滤并显示 - self.filter_logs() - - # 如果开启了实时更新,则开始监视 - if self.is_watching.get(): - self.start_watching() - - def on_loading_progress(self, progress, line_count): - """加载进度回调""" - self.root.after(0, lambda: self.update_progress(progress, line_count)) - - def update_progress(self, progress, line_count): - """更新进度显示""" - self.progress_var.set(progress) - self.status_var.set(f"正在加载... {line_count} 条 ({progress:.1f}%)") - - def load_log_file_async(self): - """异步加载日志文件""" - self.stop_watching() # 停止任何正在运行的监视器 - - if not self.current_log_file.exists(): - self.status_var.set("文件不存在") - return - - # 显示进度条 - self.progress_bar.pack(side=tk.LEFT, padx=5, pady=2, before=self.status_label) - self.progress_var.set(0) - self.status_var.set("正在加载...") - - # 清空当前数据 - self.log_index = LogIndex() - self.selected_modules.clear() - - # 开始异步加载 - self.async_loader.load_file_async(str(self.current_log_file), self.on_loading_progress) - - def filter_logs(self, *args): - """过滤日志""" - if not self.log_index: - return - - # 获取过滤条件 - selected_modules = self.selected_modules if self.selected_modules else None - level = self.level_var.get() if self.level_var.get() != "全部" else None - search_text = self.search_var.get().strip() if self.search_var.get().strip() else None - - # 应用过滤 - self.log_index.filter_entries(selected_modules, level, search_text) - - # 更新显示 - self.log_display.set_log_index(self.log_index) - - # 更新状态 - filtered_count = self.log_index.get_filtered_count() - total_count = self.log_index.total_entries - if filtered_count == total_count: - self.status_var.set(f"显示 {total_count} 条日志") - else: - self.status_var.set(f"显示 {filtered_count}/{total_count} 条日志") - - def select_log_file(self): - """选择日志文件""" - filename = filedialog.askopenfilename( - title="选择日志文件", - filetypes=[("JSONL日志文件", "*.jsonl"), ("所有文件", "*.*")], - initialdir="logs" if Path("logs").exists() else ".", - ) - if filename: - new_file = Path(filename) - if new_file != self.current_log_file: - self.current_log_file = new_file - self.current_file_var.set(str(self.current_log_file)) - self.load_log_file_async() - - def refresh_log_file(self): - """刷新日志文件""" - self.load_log_file_async() - - def toggle_watching(self): - """切换实时更新状态""" - if self.is_watching.get(): - self.start_watching() - else: - self.stop_watching() - - def start_watching(self): - """开始监视文件变化""" - if self.watching_thread and self.watching_thread.is_alive(): - return # 已经在监视 - - if not self.current_log_file.exists(): - self.is_watching.set(False) - messagebox.showwarning("警告", "日志文件不存在,无法开启实时更新。") - return - - self.watching_thread = threading.Thread(target=self.watch_file_loop, daemon=True) - self.watching_thread.start() - - def stop_watching(self): - """停止监视文件变化""" - self.is_watching.set(False) - # 线程通过检查 is_watching 变量来停止,这里不需要强制干预 - self.watching_thread = None - - def watch_file_loop(self): - """监视文件循环""" - while self.is_watching.get(): - try: - if not self.current_log_file.exists(): - self.root.after( - 0, - lambda: messagebox.showwarning("警告", "日志文件丢失,已停止实时更新。"), - ) - self.root.after(0, self.is_watching.set, False) - break - - current_size = os.path.getsize(self.current_log_file) - if current_size > self.last_file_size: - new_entries = self.read_new_logs(self.last_file_size) - self.last_file_size = current_size - if new_entries: - self.root.after(0, self.append_new_logs, new_entries) - elif current_size < self.last_file_size: - # 文件被截断或替换 - self.last_file_size = 0 - self.root.after(0, self.refresh_log_file) - break # 刷新会重新启动监视(如果需要),所以结束当前循环 - - except Exception as e: - print(f"监视日志文件时出错: {e}") - self.root.after(0, self.is_watching.set, False) - break - - time.sleep(1) - - self.watching_thread = None - - def read_new_logs(self, from_position): - """读取新的日志条目并返回它们""" - new_entries = [] - new_modules = set() # 收集新发现的模块 - with open(self.current_log_file, "r", encoding="utf-8") as f: - f.seek(from_position) - line_count = self.log_index.total_entries - for line in f: - if line.strip(): - try: - log_entry = json.loads(line) - self.log_index.add_entry(line_count, log_entry) - new_entries.append(log_entry) - - logger_name = log_entry.get("logger_name", "") - if logger_name and logger_name not in self.modules: - new_modules.add(logger_name) - - line_count += 1 - except json.JSONDecodeError: - continue - - # 如果发现了新模块,在主线程中更新模块集合 - if new_modules: - - def update_modules(): - self.modules.update(new_modules) - self.update_module_list() - - self.root.after(0, update_modules) - - return new_entries - - def append_new_logs(self, new_entries): - """将新日志附加到显示中""" - # 检查是否应附加或执行完全刷新(例如,如果过滤器处于活动状态) - selected_modules = ( - self.selected_modules if (self.selected_modules and "全部" not in self.selected_modules) else None - ) - level = self.level_var.get() if self.level_var.get() != "全部" else None - search_text = self.search_var.get().strip() if self.search_var.get().strip() else None - - is_filtered = selected_modules or level or search_text - - if is_filtered: - # 如果过滤器处于活动状态,我们必须执行完全刷新以应用它们 - self.filter_logs() - return - - # 如果没有过滤器,只需附加新日志 - for entry in new_entries: - self.log_display.append_entry(entry) - - # 更新状态 - total_count = self.log_index.total_entries - self.status_var.set(f"显示 {total_count} 条日志") - - def update_module_list(self): - """更新模块列表""" - # 清空现有选项 - for widget in self.module_inner_frame.winfo_children(): - widget.destroy() - - # 计算总模块数(包括"全部") - total_modules = len(self.modules) + 1 - max_cols = min(4, max(2, total_modules)) # 减少最大列数,避免超出边界 - - # 配置网格列权重,让每列平均分配空间 - for i in range(max_cols): - self.module_inner_frame.grid_columnconfigure(i, weight=1, uniform="module_col") - - # 创建一个多行布局 - current_row = 0 - current_col = 0 - - # 添加"全部"选项 - all_frame = ttk.Frame(self.module_inner_frame) - all_frame.grid(row=current_row, column=current_col, padx=3, pady=2, sticky="ew") - - all_var = tk.BooleanVar(value="全部" in self.selected_modules) - all_check = ttk.Checkbutton( - all_frame, text="全部", variable=all_var, command=lambda: self.toggle_module("全部", all_var) - ) - all_check.pack(side=tk.LEFT) - - # 使用颜色标签替代按钮 - all_color = self.formatter.module_colors.get("全部", "black") - all_color_label = ttk.Label(all_frame, text="■", foreground=all_color, width=2, cursor="hand2") - all_color_label.pack(side=tk.LEFT, padx=2) - all_color_label.bind("", lambda e: self.choose_module_color("全部")) - - current_col += 1 - - # 添加其他模块选项 - for module in sorted(self.modules): - if current_col >= max_cols: - current_row += 1 - current_col = 0 - - frame = ttk.Frame(self.module_inner_frame) - frame.grid(row=current_row, column=current_col, padx=3, pady=2, sticky="ew") - - var = tk.BooleanVar(value=module in self.selected_modules) - - # 使用中文映射名称显示 - display_name = self.get_display_name(module) - if len(display_name) > 12: - display_name = display_name[:10] + "..." - - check = ttk.Checkbutton( - frame, text=display_name, variable=var, command=lambda m=module, v=var: self.toggle_module(m, v) - ) - check.pack(side=tk.LEFT) - - # 添加工具提示显示完整名称和英文名 - full_tooltip = f"{self.get_display_name(module)}" - if module != self.get_display_name(module): - full_tooltip += f"\n({module})" - self.create_tooltip(check, full_tooltip) - - # 使用颜色标签替代按钮 - color = self.formatter.module_colors.get(module, "black") - color_label = ttk.Label(frame, text="■", foreground=color, width=2, cursor="hand2") - color_label.pack(side=tk.LEFT, padx=2) - color_label.bind("", lambda e, m=module: self.choose_module_color(m)) - - current_col += 1 - - # 更新画布滚动区域 - self.module_inner_frame.update_idletasks() - self.module_canvas.config(scrollregion=self.module_canvas.bbox("all")) - - # 添加垂直滚动条 - if not hasattr(self, "module_scrollbar"): - self.module_scrollbar = ttk.Scrollbar( - self.module_frame, orient=tk.VERTICAL, command=self.module_canvas.yview - ) - self.module_scrollbar.pack(side=tk.RIGHT, fill=tk.Y) - self.module_canvas.config(yscrollcommand=self.module_scrollbar.set) - - def create_tooltip(self, widget, text): - """为控件创建工具提示""" - - def on_enter(event): - tooltip = tk.Toplevel() - tooltip.wm_overrideredirect(True) - tooltip.wm_geometry(f"+{event.x_root + 10}+{event.y_root + 10}") - label = ttk.Label(tooltip, text=text, background="lightyellow", relief="solid", borderwidth=1) - label.pack() - widget.tooltip = tooltip - - def on_leave(event): - if hasattr(widget, "tooltip"): - widget.tooltip.destroy() - del widget.tooltip - - widget.bind("", on_enter) - widget.bind("", on_leave) - - def toggle_module(self, module, var): - """切换模块选择状态""" - if module == "全部": - if var.get(): - self.selected_modules = {"全部"} - else: - self.selected_modules.clear() - else: - if var.get(): - self.selected_modules.add(module) - if "全部" in self.selected_modules: - self.selected_modules.remove("全部") - else: - self.selected_modules.discard(module) - - self.filter_logs() - - def get_display_name(self, module_name): - """获取模块的显示名称""" - return self.module_name_mapping.get(module_name, module_name) - - def edit_module_mapping(self): - """编辑模块映射""" - mapping_window = tk.Toplevel(self.root) - mapping_window.title("编辑模块映射") - mapping_window.geometry("500x600") - - # 创建滚动框架 - frame = ttk.Frame(mapping_window) - frame.pack(fill=tk.BOTH, expand=True, padx=5, pady=5) - - # 创建滚动条 - scrollbar = ttk.Scrollbar(frame) - scrollbar.pack(side=tk.RIGHT, fill=tk.Y) - - # 创建映射编辑列表 - canvas = tk.Canvas(frame, yscrollcommand=scrollbar.set) - canvas.pack(side=tk.LEFT, fill=tk.BOTH, expand=True) - scrollbar.config(command=canvas.yview) - - # 创建内部框架 - inner_frame = ttk.Frame(canvas) - canvas.create_window((0, 0), window=inner_frame, anchor="nw") - - # 添加标题 - ttk.Label(inner_frame, text="模块映射编辑", font=("", 12, "bold")).pack(anchor="w", padx=5, pady=5) - ttk.Label(inner_frame, text="英文名 -> 中文名", font=("", 10)).pack(anchor="w", padx=5, pady=2) - - # 映射编辑字典 - mapping_vars = {} - - # 添加现有模块的映射编辑 - all_modules = sorted(self.modules) - for module in all_modules: - frame_row = ttk.Frame(inner_frame) - frame_row.pack(fill=tk.X, padx=5, pady=2) - - ttk.Label(frame_row, text=module, width=20).pack(side=tk.LEFT, padx=5) - ttk.Label(frame_row, text="->").pack(side=tk.LEFT, padx=5) - - var = tk.StringVar(value=self.module_name_mapping.get(module, module)) - mapping_vars[module] = var - entry = ttk.Entry(frame_row, textvariable=var, width=25) - entry.pack(side=tk.LEFT, padx=5) - - # 更新画布滚动区域 - inner_frame.update_idletasks() - canvas.config(scrollregion=canvas.bbox("all")) - - def save_mappings(): - # 更新映射 - for module, var in mapping_vars.items(): - new_name = var.get().strip() - if new_name and new_name != module: - self.module_name_mapping[module] = new_name - elif module in self.module_name_mapping and not new_name: - del self.module_name_mapping[module] - - # 保存到文件 - self.save_module_mapping() - # 更新模块列表显示 - self.update_module_list() - mapping_window.destroy() - - # 添加按钮 - button_frame = ttk.Frame(mapping_window) - button_frame.pack(fill=tk.X, padx=5, pady=5) - ttk.Button(button_frame, text="保存", command=save_mappings).pack(side=tk.RIGHT, padx=5) - ttk.Button(button_frame, text="取消", command=mapping_window.destroy).pack(side=tk.RIGHT, padx=5) - - -def main(): - root = tk.Tk() - LogViewer(root) - root.mainloop() - - -if __name__ == "__main__": - main() From a9187dc312101208d55c249ea41a09f6c2924e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Tue, 13 Jan 2026 06:18:27 +0800 Subject: [PATCH 07/10] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0log=5Fviewer?= =?UTF-8?q?=E5=88=B0.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index debe4266..5c29dff0 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ template/compare/model_config_template.toml CLAUDE.md MaiBot-Dashboard/ cloudflare-workers/ +log_viewer/ result.json # Byte-compiled / optimized / DLL files __pycache__/ From 812296590e21ecd8efc5291cc0a330e74786a6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Tue, 13 Jan 2026 06:24:35 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E7=9A=84WebUI=E5=89=8D=E7=AB=AF=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 23 +- dashboard/.gitignore | 1 + dashboard/.prettierrc | 8 + dashboard/LICENSE | 661 ++++++ dashboard/README.md | 377 ++++ dashboard/components.json | 20 + dashboard/docs/main.png | Bin 0 -> 422633 bytes dashboard/eslint.config.js | 35 + dashboard/index.html | 19 + dashboard/package.json | 95 + dashboard/postcss.config.js | 6 + .../public/fonts/JetBrainsMono-Medium.ttf | Bin 0 -> 273860 bytes dashboard/public/maimai.ico | Bin 0 -> 119148 bytes dashboard/src/assets/maimai.ico | Bin 0 -> 67715 bytes dashboard/src/assets/react.svg | 1 + dashboard/src/components/CodeEditor.tsx | 126 ++ dashboard/src/components/ListFieldEditor.tsx | 525 +++++ .../components/RestartingOverlay.legacy.tsx | 189 ++ .../src/components/animation-provider.tsx | 54 + dashboard/src/components/back-to-top.tsx | 101 + dashboard/src/components/emoji-thumbnail.tsx | 123 ++ dashboard/src/components/error-boundary.tsx | 307 +++ .../src/components/expression-reviewer.tsx | 1597 +++++++++++++++ .../src/components/http-warning-banner.tsx | 59 + dashboard/src/components/index.ts | 13 + dashboard/src/components/layout.tsx | 409 ++++ .../src/components/markdown-renderer.tsx | 134 ++ dashboard/src/components/plugin-stats.tsx | 302 +++ dashboard/src/components/restart-overlay.tsx | 412 ++++ dashboard/src/components/search-dialog.tsx | 237 +++ .../src/components/share-pack-dialog.tsx | 684 +++++++ dashboard/src/components/survey/index.ts | 8 + .../src/components/survey/survey-question.tsx | 247 +++ .../src/components/survey/survey-renderer.tsx | 407 ++++ .../src/components/survey/survey-results.tsx | 292 +++ dashboard/src/components/theme-provider.tsx | 139 ++ dashboard/src/components/tour/index.ts | 5 + dashboard/src/components/tour/tour-context.ts | 4 + .../src/components/tour/tour-provider.tsx | 177 ++ .../src/components/tour/tour-renderer.tsx | 217 ++ .../tour/tours/model-assignment-tour.ts | 244 +++ dashboard/src/components/tour/types.ts | 49 + dashboard/src/components/tour/use-tour.ts | 10 + dashboard/src/components/ui/accordion.tsx | 58 + dashboard/src/components/ui/alert-dialog.tsx | 141 ++ dashboard/src/components/ui/alert.tsx | 59 + dashboard/src/components/ui/avatar.tsx | 48 + dashboard/src/components/ui/badge.tsx | 37 + dashboard/src/components/ui/button.tsx | 58 + dashboard/src/components/ui/calendar.tsx | 211 ++ dashboard/src/components/ui/card.tsx | 76 + dashboard/src/components/ui/chart.tsx | 378 ++++ dashboard/src/components/ui/checkbox.tsx | 27 + dashboard/src/components/ui/collapsible.tsx | 11 + dashboard/src/components/ui/command.tsx | 152 ++ dashboard/src/components/ui/context-menu.tsx | 197 ++ dashboard/src/components/ui/dialog.tsx | 131 ++ dashboard/src/components/ui/dropdown-menu.tsx | 200 ++ .../src/components/ui/extra-params-dialog.tsx | 76 + dashboard/src/components/ui/help-tooltip.tsx | 63 + dashboard/src/components/ui/input.tsx | 22 + dashboard/src/components/ui/kbd.tsx | 43 + .../src/components/ui/key-value-editor.tsx | 180 ++ dashboard/src/components/ui/label.tsx | 24 + dashboard/src/components/ui/markdown.tsx | 28 + dashboard/src/components/ui/multi-select.tsx | 259 +++ .../components/ui/nested-key-value-editor.tsx | 475 +++++ dashboard/src/components/ui/pagination.tsx | 117 ++ dashboard/src/components/ui/popover.tsx | 31 + dashboard/src/components/ui/progress.tsx | 26 + dashboard/src/components/ui/radio-group.tsx | 41 + dashboard/src/components/ui/scroll-area.tsx | 51 + dashboard/src/components/ui/select.tsx | 158 ++ dashboard/src/components/ui/separator.tsx | 29 + dashboard/src/components/ui/skeleton.tsx | 15 + dashboard/src/components/ui/slider.tsx | 26 + dashboard/src/components/ui/switch.tsx | 27 + dashboard/src/components/ui/table.tsx | 120 ++ dashboard/src/components/ui/tabs.tsx | 55 + dashboard/src/components/ui/textarea.tsx | 110 + dashboard/src/components/ui/toast.tsx | 142 ++ dashboard/src/components/ui/toaster.tsx | 35 + dashboard/src/components/ui/tooltip.tsx | 30 + dashboard/src/components/use-theme.tsx | 47 + dashboard/src/components/waves-background.tsx | 382 ++++ dashboard/src/config/surveys/index.ts | 2 + .../src/config/surveys/maibot-feedback.ts | 103 + .../src/config/surveys/webui-feedback.ts | 107 + dashboard/src/hooks/use-animation.ts | 12 + dashboard/src/hooks/use-auth.ts | 68 + dashboard/src/hooks/use-media-query.ts | 35 + dashboard/src/hooks/use-toast.ts | 192 ++ dashboard/src/index.css | 205 ++ dashboard/src/main.tsx | 26 + dashboard/src/router.tsx | 304 +++ dashboard/src/routes/404.tsx | 61 + dashboard/src/routes/annual-report.tsx | 883 +++++++++ dashboard/src/routes/auth.tsx | 342 ++++ dashboard/src/routes/chat.tsx | 1590 +++++++++++++++ dashboard/src/routes/config/adapter.tsx | 1348 +++++++++++++ dashboard/src/routes/config/adapter/index.ts | 10 + dashboard/src/routes/config/adapter/types.ts | 105 + dashboard/src/routes/config/adapter/utils.ts | 285 +++ dashboard/src/routes/config/bot.tsx | 735 +++++++ .../src/routes/config/bot/hooks/index.ts | 6 + .../routes/config/bot/hooks/useAutoSave.ts | 166 ++ dashboard/src/routes/config/bot/index.ts | 24 + .../config/bot/sections/BotInfoSection.tsx | 192 ++ .../config/bot/sections/ChatSection.tsx | 610 ++++++ .../config/bot/sections/DebugSection.tsx | 97 + .../config/bot/sections/DreamSection.tsx | 215 ++ .../bot/sections/ExperimentalSection.tsx | 311 +++ .../config/bot/sections/ExpressionSection.tsx | 996 ++++++++++ .../config/bot/sections/FeaturesSection.tsx | 336 ++++ .../config/bot/sections/LPMMSection.tsx | 150 ++ .../routes/config/bot/sections/LogSection.tsx | 264 +++ .../bot/sections/MaimMessageSection.tsx | 203 ++ .../bot/sections/MessageReceiveSection.tsx | 259 +++ .../bot/sections/PersonalitySection.tsx | 164 ++ .../config/bot/sections/ProcessingSection.tsx | 1121 +++++++++++ .../config/bot/sections/TelemetrySection.tsx | 29 + .../config/bot/sections/VoiceSection.tsx | 27 + .../config/bot/sections/WebUISection.tsx | 287 +++ .../src/routes/config/bot/sections/index.ts | 19 + dashboard/src/routes/config/bot/types.ts | 259 +++ dashboard/src/routes/config/model.tsx | 1643 +++++++++++++++ .../config/model/components/ModelCardList.tsx | 105 + .../config/model/components/ModelTable.tsx | 142 ++ .../config/model/components/Pagination.tsx | 142 ++ .../model/components/TaskConfigCard.tsx | 155 ++ .../routes/config/model/components/index.ts | 8 + .../src/routes/config/model/constants.ts | 107 + .../src/routes/config/model/hooks/index.ts | 7 + .../config/model/hooks/useModelAutoSave.ts | 164 ++ .../config/model/hooks/useModelFetcher.ts | 143 ++ .../routes/config/model/hooks/useModelTour.ts | 109 + dashboard/src/routes/config/model/index.ts | 15 + dashboard/src/routes/config/model/types.ts | 71 + dashboard/src/routes/config/modelProvider.tsx | 1713 ++++++++++++++++ .../src/routes/config/modelProvider/index.ts | 11 + .../src/routes/config/modelProvider/types.ts | 33 + .../src/routes/config/modelProvider/utils.ts | 61 + dashboard/src/routes/config/pack-detail.tsx | 929 +++++++++ dashboard/src/routes/config/pack-market.tsx | 422 ++++ .../src/routes/config/providerTemplates.ts | 235 +++ dashboard/src/routes/index.tsx | 1054 ++++++++++ dashboard/src/routes/logs.tsx | 628 ++++++ dashboard/src/routes/model-presets.tsx | 68 + dashboard/src/routes/monitor/index.tsx | 86 + .../src/routes/monitor/planner-monitor.tsx | 636 ++++++ .../src/routes/monitor/replier-monitor.tsx | 648 ++++++ dashboard/src/routes/monitor/use-monitor.ts | 78 + dashboard/src/routes/person.tsx | 949 +++++++++ dashboard/src/routes/plugin-config.tsx | 911 +++++++++ dashboard/src/routes/plugin-detail.tsx | 674 +++++++ dashboard/src/routes/plugin-mirrors.tsx | 603 ++++++ dashboard/src/routes/plugins.tsx | 1163 +++++++++++ dashboard/src/routes/resource/emoji.tsx | 1688 ++++++++++++++++ dashboard/src/routes/resource/expression.tsx | 1159 +++++++++++ dashboard/src/routes/resource/jargon.tsx | 1064 ++++++++++ .../src/routes/resource/knowledge-base.tsx | 40 + .../src/routes/resource/knowledge-graph.tsx | 722 +++++++ dashboard/src/routes/settings.tsx | 1765 +++++++++++++++++ dashboard/src/routes/setup.tsx | 553 ++++++ dashboard/src/routes/setup/StepForms.tsx | 483 +++++ dashboard/src/routes/setup/api.ts | 289 +++ dashboard/src/routes/setup/types.ts | 46 + dashboard/src/routes/survey/index.ts | 2 + .../src/routes/survey/maibot-feedback.tsx | 110 + .../src/routes/survey/webui-feedback.tsx | 98 + dashboard/src/styles/uppy-custom.css | 159 ++ dashboard/src/types/config-schema.ts | 51 + dashboard/src/types/emoji.ts | 93 + dashboard/src/types/expression.ts | 174 ++ dashboard/src/types/jargon.ts | 131 ++ dashboard/src/types/person.ts | 95 + dashboard/src/types/plugin.ts | 158 ++ dashboard/src/types/survey.ts | 120 ++ dashboard/src/types/view-transitions.d.ts | 10 + dashboard/tailwind.config.js | 80 + dashboard/tsconfig.app.json | 34 + dashboard/tsconfig.json | 7 + dashboard/tsconfig.node.json | 26 + dashboard/vite.config.ts | 124 ++ 184 files changed, 47854 insertions(+), 1 deletion(-) create mode 100644 dashboard/.gitignore create mode 100644 dashboard/.prettierrc create mode 100644 dashboard/LICENSE create mode 100644 dashboard/README.md create mode 100644 dashboard/components.json create mode 100644 dashboard/docs/main.png create mode 100644 dashboard/eslint.config.js create mode 100644 dashboard/index.html create mode 100644 dashboard/package.json create mode 100644 dashboard/postcss.config.js create mode 100644 dashboard/public/fonts/JetBrainsMono-Medium.ttf create mode 100644 dashboard/public/maimai.ico create mode 100644 dashboard/src/assets/maimai.ico create mode 100644 dashboard/src/assets/react.svg create mode 100644 dashboard/src/components/CodeEditor.tsx create mode 100644 dashboard/src/components/ListFieldEditor.tsx create mode 100644 dashboard/src/components/RestartingOverlay.legacy.tsx create mode 100644 dashboard/src/components/animation-provider.tsx create mode 100644 dashboard/src/components/back-to-top.tsx create mode 100644 dashboard/src/components/emoji-thumbnail.tsx create mode 100644 dashboard/src/components/error-boundary.tsx create mode 100644 dashboard/src/components/expression-reviewer.tsx create mode 100644 dashboard/src/components/http-warning-banner.tsx create mode 100644 dashboard/src/components/index.ts create mode 100644 dashboard/src/components/layout.tsx create mode 100644 dashboard/src/components/markdown-renderer.tsx create mode 100644 dashboard/src/components/plugin-stats.tsx create mode 100644 dashboard/src/components/restart-overlay.tsx create mode 100644 dashboard/src/components/search-dialog.tsx create mode 100644 dashboard/src/components/share-pack-dialog.tsx create mode 100644 dashboard/src/components/survey/index.ts create mode 100644 dashboard/src/components/survey/survey-question.tsx create mode 100644 dashboard/src/components/survey/survey-renderer.tsx create mode 100644 dashboard/src/components/survey/survey-results.tsx create mode 100644 dashboard/src/components/theme-provider.tsx create mode 100644 dashboard/src/components/tour/index.ts create mode 100644 dashboard/src/components/tour/tour-context.ts create mode 100644 dashboard/src/components/tour/tour-provider.tsx create mode 100644 dashboard/src/components/tour/tour-renderer.tsx create mode 100644 dashboard/src/components/tour/tours/model-assignment-tour.ts create mode 100644 dashboard/src/components/tour/types.ts create mode 100644 dashboard/src/components/tour/use-tour.ts create mode 100644 dashboard/src/components/ui/accordion.tsx create mode 100644 dashboard/src/components/ui/alert-dialog.tsx create mode 100644 dashboard/src/components/ui/alert.tsx create mode 100644 dashboard/src/components/ui/avatar.tsx create mode 100644 dashboard/src/components/ui/badge.tsx create mode 100644 dashboard/src/components/ui/button.tsx create mode 100644 dashboard/src/components/ui/calendar.tsx create mode 100644 dashboard/src/components/ui/card.tsx create mode 100644 dashboard/src/components/ui/chart.tsx create mode 100644 dashboard/src/components/ui/checkbox.tsx create mode 100644 dashboard/src/components/ui/collapsible.tsx create mode 100644 dashboard/src/components/ui/command.tsx create mode 100644 dashboard/src/components/ui/context-menu.tsx create mode 100644 dashboard/src/components/ui/dialog.tsx create mode 100644 dashboard/src/components/ui/dropdown-menu.tsx create mode 100644 dashboard/src/components/ui/extra-params-dialog.tsx create mode 100644 dashboard/src/components/ui/help-tooltip.tsx create mode 100644 dashboard/src/components/ui/input.tsx create mode 100644 dashboard/src/components/ui/kbd.tsx create mode 100644 dashboard/src/components/ui/key-value-editor.tsx create mode 100644 dashboard/src/components/ui/label.tsx create mode 100644 dashboard/src/components/ui/markdown.tsx create mode 100644 dashboard/src/components/ui/multi-select.tsx create mode 100644 dashboard/src/components/ui/nested-key-value-editor.tsx create mode 100644 dashboard/src/components/ui/pagination.tsx create mode 100644 dashboard/src/components/ui/popover.tsx create mode 100644 dashboard/src/components/ui/progress.tsx create mode 100644 dashboard/src/components/ui/radio-group.tsx create mode 100644 dashboard/src/components/ui/scroll-area.tsx create mode 100644 dashboard/src/components/ui/select.tsx create mode 100644 dashboard/src/components/ui/separator.tsx create mode 100644 dashboard/src/components/ui/skeleton.tsx create mode 100644 dashboard/src/components/ui/slider.tsx create mode 100644 dashboard/src/components/ui/switch.tsx create mode 100644 dashboard/src/components/ui/table.tsx create mode 100644 dashboard/src/components/ui/tabs.tsx create mode 100644 dashboard/src/components/ui/textarea.tsx create mode 100644 dashboard/src/components/ui/toast.tsx create mode 100644 dashboard/src/components/ui/toaster.tsx create mode 100644 dashboard/src/components/ui/tooltip.tsx create mode 100644 dashboard/src/components/use-theme.tsx create mode 100644 dashboard/src/components/waves-background.tsx create mode 100644 dashboard/src/config/surveys/index.ts create mode 100644 dashboard/src/config/surveys/maibot-feedback.ts create mode 100644 dashboard/src/config/surveys/webui-feedback.ts create mode 100644 dashboard/src/hooks/use-animation.ts create mode 100644 dashboard/src/hooks/use-auth.ts create mode 100644 dashboard/src/hooks/use-media-query.ts create mode 100644 dashboard/src/hooks/use-toast.ts create mode 100644 dashboard/src/index.css create mode 100644 dashboard/src/main.tsx create mode 100644 dashboard/src/router.tsx create mode 100644 dashboard/src/routes/404.tsx create mode 100644 dashboard/src/routes/annual-report.tsx create mode 100644 dashboard/src/routes/auth.tsx create mode 100644 dashboard/src/routes/chat.tsx create mode 100644 dashboard/src/routes/config/adapter.tsx create mode 100644 dashboard/src/routes/config/adapter/index.ts create mode 100644 dashboard/src/routes/config/adapter/types.ts create mode 100644 dashboard/src/routes/config/adapter/utils.ts create mode 100644 dashboard/src/routes/config/bot.tsx create mode 100644 dashboard/src/routes/config/bot/hooks/index.ts create mode 100644 dashboard/src/routes/config/bot/hooks/useAutoSave.ts create mode 100644 dashboard/src/routes/config/bot/index.ts create mode 100644 dashboard/src/routes/config/bot/sections/BotInfoSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/ChatSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/DebugSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/DreamSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/ExperimentalSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/ExpressionSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/FeaturesSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/LPMMSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/LogSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/MaimMessageSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/MessageReceiveSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/PersonalitySection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/ProcessingSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/TelemetrySection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/VoiceSection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/WebUISection.tsx create mode 100644 dashboard/src/routes/config/bot/sections/index.ts create mode 100644 dashboard/src/routes/config/bot/types.ts create mode 100644 dashboard/src/routes/config/model.tsx create mode 100644 dashboard/src/routes/config/model/components/ModelCardList.tsx create mode 100644 dashboard/src/routes/config/model/components/ModelTable.tsx create mode 100644 dashboard/src/routes/config/model/components/Pagination.tsx create mode 100644 dashboard/src/routes/config/model/components/TaskConfigCard.tsx create mode 100644 dashboard/src/routes/config/model/components/index.ts create mode 100644 dashboard/src/routes/config/model/constants.ts create mode 100644 dashboard/src/routes/config/model/hooks/index.ts create mode 100644 dashboard/src/routes/config/model/hooks/useModelAutoSave.ts create mode 100644 dashboard/src/routes/config/model/hooks/useModelFetcher.ts create mode 100644 dashboard/src/routes/config/model/hooks/useModelTour.ts create mode 100644 dashboard/src/routes/config/model/index.ts create mode 100644 dashboard/src/routes/config/model/types.ts create mode 100644 dashboard/src/routes/config/modelProvider.tsx create mode 100644 dashboard/src/routes/config/modelProvider/index.ts create mode 100644 dashboard/src/routes/config/modelProvider/types.ts create mode 100644 dashboard/src/routes/config/modelProvider/utils.ts create mode 100644 dashboard/src/routes/config/pack-detail.tsx create mode 100644 dashboard/src/routes/config/pack-market.tsx create mode 100644 dashboard/src/routes/config/providerTemplates.ts create mode 100644 dashboard/src/routes/index.tsx create mode 100644 dashboard/src/routes/logs.tsx create mode 100644 dashboard/src/routes/model-presets.tsx create mode 100644 dashboard/src/routes/monitor/index.tsx create mode 100644 dashboard/src/routes/monitor/planner-monitor.tsx create mode 100644 dashboard/src/routes/monitor/replier-monitor.tsx create mode 100644 dashboard/src/routes/monitor/use-monitor.ts create mode 100644 dashboard/src/routes/person.tsx create mode 100644 dashboard/src/routes/plugin-config.tsx create mode 100644 dashboard/src/routes/plugin-detail.tsx create mode 100644 dashboard/src/routes/plugin-mirrors.tsx create mode 100644 dashboard/src/routes/plugins.tsx create mode 100644 dashboard/src/routes/resource/emoji.tsx create mode 100644 dashboard/src/routes/resource/expression.tsx create mode 100644 dashboard/src/routes/resource/jargon.tsx create mode 100644 dashboard/src/routes/resource/knowledge-base.tsx create mode 100644 dashboard/src/routes/resource/knowledge-graph.tsx create mode 100644 dashboard/src/routes/settings.tsx create mode 100644 dashboard/src/routes/setup.tsx create mode 100644 dashboard/src/routes/setup/StepForms.tsx create mode 100644 dashboard/src/routes/setup/api.ts create mode 100644 dashboard/src/routes/setup/types.ts create mode 100644 dashboard/src/routes/survey/index.ts create mode 100644 dashboard/src/routes/survey/maibot-feedback.tsx create mode 100644 dashboard/src/routes/survey/webui-feedback.tsx create mode 100644 dashboard/src/styles/uppy-custom.css create mode 100644 dashboard/src/types/config-schema.ts create mode 100644 dashboard/src/types/emoji.ts create mode 100644 dashboard/src/types/expression.ts create mode 100644 dashboard/src/types/jargon.ts create mode 100644 dashboard/src/types/person.ts create mode 100644 dashboard/src/types/plugin.ts create mode 100644 dashboard/src/types/survey.ts create mode 100644 dashboard/src/types/view-transitions.d.ts create mode 100644 dashboard/tailwind.config.js create mode 100644 dashboard/tsconfig.app.json create mode 100644 dashboard/tsconfig.json create mode 100644 dashboard/tsconfig.node.json create mode 100644 dashboard/vite.config.ts diff --git a/.gitignore b/.gitignore index 5c29dff0..3fb19310 100644 --- a/.gitignore +++ b/.gitignore @@ -46,9 +46,30 @@ config/lpmm_config.toml.bak template/compare/bot_config_template.toml template/compare/model_config_template.toml CLAUDE.md -MaiBot-Dashboard/ cloudflare-workers/ log_viewer/ +dev/ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* +node_modules/ +dist/ +dist-ssr/ +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? result.json # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/dashboard/.gitignore b/dashboard/.gitignore new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/dashboard/.gitignore @@ -0,0 +1 @@ + diff --git a/dashboard/.prettierrc b/dashboard/.prettierrc new file mode 100644 index 00000000..e999e95b --- /dev/null +++ b/dashboard/.prettierrc @@ -0,0 +1,8 @@ +{ + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "es5", + "printWidth": 100, + "plugins": ["prettier-plugin-tailwindcss"] +} diff --git a/dashboard/LICENSE b/dashboard/LICENSE new file mode 100644 index 00000000..0ad25db4 --- /dev/null +++ b/dashboard/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/dashboard/README.md b/dashboard/README.md new file mode 100644 index 00000000..b2a260f8 --- /dev/null +++ b/dashboard/README.md @@ -0,0 +1,377 @@ +# MaiBot Dashboard + +> MaiBot 的现代化 Web 管理面板 - 基于 React 19 + TypeScript + Vite 构建 + +
+ +[![React](https://img.shields.io/badge/React-19.2-61DAFB?logo=react&logoColor=white)](https://react.dev/) +[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/) +[![Vite](https://img.shields.io/badge/Vite-7.2-646CFF?logo=vite&logoColor=white)](https://vitejs.dev/) +[![TailwindCSS](https://img.shields.io/badge/TailwindCSS-3.4-38B2AC?logo=tailwind-css&logoColor=white)](https://tailwindcss.com/) + +
+ +## 📖 项目简介 + +MaiBot Dashboard 是 MaiBot 聊天机器人的 Web 管理界面,提供了直观的配置管理、实时监控、插件管理、资源管理等功能。通过自动解析后端配置类,动态生成表单,实现了配置的可视化编辑。 + +
+ MaiBot Dashboard 界面预览 +
+ +### ✨ 核心特性 + +- 🎨 **现代化 UI** - 基于 shadcn/ui 组件库,支持亮色/暗色主题切换 +- ⚡ **高性能** - 使用 Vite 7.2 构建,React 19 最新特性 +- 🔐 **安全认证** - Token 认证机制,支持自定义和自动生成 Token +- 📝 **智能配置** - 自动解析 Python dataclass,生成配置表单 +- 🎯 **类型安全** - 完整的 TypeScript 类型定义 +- 🔄 **实时更新** - WebSocket 实时日志流、配置自动保存 +- 📱 **响应式设计** - 完美适配桌面和移动设备 +- 💬 **本地对话** - 直接在 WebUI 与麦麦对话,无需外部平台 + +## 🎯 功能模块 + +### 📊 仪表盘(首页) +- **实时统计** - 总请求数、Token 消耗、费用统计、在线时长 +- **模型统计** - 各模型的使用次数、费用、平均响应时间 +- **趋势图表** - 每小时请求量、Token 消耗、费用趋势折线图 +- **模型分布** - 饼图展示模型使用占比 +- **最近活动** - 实时刷新的请求活动列表 + +### 💬 本地聊天室 +- **WebSocket 实时通信** - 与麦麦直接对话 +- **消息历史** - 自动加载 SQLite 存储的历史消息 +- **连接状态** - 实时显示 WebSocket 连接状态 +- **自定义昵称** - 可自定义用户身份 +- **移动端适配** - 完整的响应式聊天界面 + +### ⚙️ 配置管理 + +#### 麦麦主程序配置 +- **分组展示** - 配置项按功能分组(基础设置、功能开关等) +- **智能表单** - 根据配置类型自动生成对应控件 +- **自动保存** - 2秒防抖自动保存,无需手动操作 +- **一键重启** - 保存并重启麦麦,使配置生效 + +#### AI 模型厂商配置 +- **提供商管理** - 添加、编辑、删除 API 提供商 +- **模板选择** - 预设常用厂商模板(OpenAI、DeepSeek、硅基流动等) +- **连接测试** - ⚡ 测试提供商连接状态和 API Key 有效性 +- **批量操作** - 批量删除、批量测试所有提供商 +- **搜索过滤** - 按名称、URL、类型快速筛选 + +#### 模型管理与分配 +- **模型列表** - 管理可用的模型配置 +- **使用状态** - 显示模型是否被任务使用 +- **任务分配** - 为不同功能分配模型(回复、工具调用、VLM 等) +- **参数调整** - 温度、最大 Token 等参数配置 +- **新手引导** - 交互式引导教程 + +#### 适配器配置 +- **NapCat 配置** - 管理 QQ 机器人适配器 +- **Docker 支持** - 支持容器模式配置 +- **配置导入导出** - 跨环境迁移配置 + +### 📋 实时日志 +- **WebSocket 流式传输** - 实时接收后端日志 +- **虚拟滚动** - 高性能处理大量日志 +- **多级过滤** - 按日志级别(DEBUG/INFO/WARNING/ERROR)过滤 +- **模块过滤** - 按日志来源模块筛选 +- **时间范围** - 日期选择器筛选日志 +- **搜索高亮** - 关键字搜索并高亮显示 +- **字号调整** - 自定义日志显示字号和行间距 +- **日志导出** - 导出过滤后的日志 + +### 🔌 插件管理 +- **插件市场** - 浏览和搜索可用插件 +- **分类筛选** - 按类别、状态筛选插件 +- **一键安装** - 自动处理依赖并安装插件 +- **版本兼容** - 检查插件与 MaiBot 版本兼容性 +- **进度显示** - WebSocket 实时显示安装进度 +- **插件统计** - 下载量、更新时间等信息 +- **卸载更新** - 管理已安装插件 + +### 👤 人物关系管理 +- **人物列表** - 查看所有已知用户信息 +- **详情编辑** - 编辑用户昵称、备注等信息 +- **关系统计** - 查看消息数、互动频率等统计 +- **批量操作** - 批量删除用户记录 + +### 📦 资源管理 + +#### 表情包管理 +- **预览管理** - 图片/GIF 预览 +- **分类过滤** - 按注册状态、描述筛选 +- **编辑标签** - 修改表情包描述和属性 +- **批量禁用** - 启用/禁用表情包 + +#### 表达方式管理 +- **表达列表** - 查看麦麦学习的表达方式 +- **来源追踪** - 记录表达来源群组和用户 +- **编辑创建** - 手动添加或编辑表达 + +#### 知识图谱 +- **可视化展示** - ReactFlow 交互式图谱 +- **节点搜索** - 搜索实体和关系 +- **布局算法** - 自动布局优化 +- **详情查看** - 点击节点查看详细信息 + +### ⚙️ 系统设置 +- **主题切换** - 亮色/暗色/跟随系统 +- **动画控制** - 开启/关闭界面动画 +- **Token 管理** - 查看、复制、重新生成认证 Token +- **版本信息** - 查看前端和后端版本 + +## 🏗️ 技术架构 + +### 前端技术栈 + +``` +React 19.2.0 # UI 框架 +├── TypeScript 5.9 # 类型系统 +├── Vite 7.2 # 构建工具 +├── TanStack Router # 路由管理 +├── TanStack Virtual # 虚拟滚动 +├── Jotai # 状态管理 +├── Tailwind CSS 3.4 # 样式框架 +├── ReactFlow # 知识图谱可视化 +├── Recharts # 数据图表 +└── shadcn/ui # 组件库 + ├── Radix UI # 无障碍组件 + └── lucide-react # 图标库 +``` + +### 后端集成 + +``` +FastAPI # Python 后端框架 +├── WebSocket # 实时日志、聊天 +├── config_schema.py # 配置架构生成器 +├── config_routes.py # 配置管理 API +├── model_routes.py # 模型管理 API +├── chat_routes.py # 本地聊天 API +├── plugin_routes.py # 插件管理 API +├── person_routes.py # 人物管理 API +├── emoji_routes.py # 表情包管理 API +├── expression_routes.py # 表达管理 API +├── knowledge_routes.py # 知识图谱 API +├── logs_routes.py # 日志 API +└── tomlkit # TOML 文件处理 +``` + +## 📁 项目结构 + +``` +MaiBot-Dashboard/ +├── src/ +│ ├── components/ # 组件目录 +│ │ ├── ui/ # shadcn/ui 组件 +│ │ ├── layout.tsx # 布局组件(侧边栏+导航) +│ │ ├── tour/ # 新手引导组件 +│ │ ├── plugin-stats.tsx # 插件统计组件 +│ │ ├── RestartingOverlay.tsx # 重启遮罩 +│ │ └── use-theme.tsx # 主题管理 +│ ├── routes/ # 路由页面 +│ │ ├── index.tsx # 仪表盘首页 +│ │ ├── auth.tsx # 登录页 +│ │ ├── chat.tsx # 本地聊天室 +│ │ ├── logs.tsx # 日志查看 +│ │ ├── plugins.tsx # 插件管理 +│ │ ├── person.tsx # 人物管理 +│ │ ├── settings.tsx # 系统设置 +│ │ ├── config/ # 配置管理页面 +│ │ │ ├── bot.tsx # 麦麦主程序配置 +│ │ │ ├── modelProvider.tsx # 模型提供商 +│ │ │ ├── model.tsx # 模型管理 +│ │ │ └── adapter.tsx # 适配器配置 +│ │ └── resource/ # 资源管理页面 +│ │ ├── emoji.tsx # 表情包管理 +│ │ ├── expression.tsx # 表达方式管理 +│ │ └── knowledge-graph.tsx # 知识图谱 +│ ├── lib/ # 工具库 +│ │ ├── config-api.ts # 配置 API 客户端 +│ │ ├── plugin-api.ts # 插件 API 客户端 +│ │ ├── person-api.ts # 人物 API 客户端 +│ │ ├── expression-api.ts # 表达 API 客户端 +│ │ ├── log-websocket.ts # 日志 WebSocket +│ │ ├── fetch-with-auth.ts # 认证请求封装 +│ │ └── utils.ts # 通用工具函数 +│ ├── types/ # 类型定义 +│ │ ├── config-schema.ts # 配置架构类型 +│ │ ├── plugin.ts # 插件类型 +│ │ ├── person.ts # 人物类型 +│ │ └── expression.ts # 表达类型 +│ ├── hooks/ # React Hooks +│ │ ├── use-auth.ts # 认证逻辑 +│ │ ├── use-animation.ts # 动画控制 +│ │ └── use-toast.ts # 消息提示 +│ ├── store/ # 全局状态 +│ │ └── auth.ts # 认证状态 +│ ├── router.tsx # 路由配置 +│ ├── main.tsx # 应用入口 +│ └── index.css # 全局样式 +├── public/ # 静态资源 +├── vite.config.ts # Vite 配置 +├── tailwind.config.js # Tailwind 配置 +├── tsconfig.json # TypeScript 配置 +└── package.json # 依赖管理 +``` + +## 🚀 快速开始 + +### 环境要求 + +- Node.js >= 18.0.0 +- Bun >= 1.0.0 (推荐) 或 npm/yarn/pnpm + +### 安装依赖 + +```bash +# 使用 Bun(推荐) +bun install + +# 或使用 npm +npm install +``` + +### 开发模式 + +```bash +# 启动开发服务器 (默认端口: 7999) +bun run dev + +# 或 +npm run dev +``` + +访问 http://localhost:7999 查看应用。 + +### 生产构建 + +```bash +# 构建生产版本 +bun run build + +# 预览生产构建 +bun run preview +``` + +构建产物会输出到 `dist/` 目录,由 MaiBot 后端静态服务。 + +### 代码格式化 + +```bash +# 格式化代码 +bun run format +``` + +## 🔧 开发配置 + +### Vite 代理配置 + +开发模式下,Vite 会将 API 请求代理到后端: + +```typescript +// vite.config.ts +proxy: { + '/api': { + target: 'http://127.0.0.1:8001', + changeOrigin: true, + ws: true, // WebSocket 支持 + }, +}, +``` + +### 环境变量 + +开发环境默认使用 `http://localhost:7999`,生产环境使用相对路径。 + +## 📸 界面预览 + +### 仪表盘 +实时统计、模型使用分布、趋势图表 + +### 本地聊天 +直接与麦麦对话,消息实时同步 + +### 配置管理 +分组配置项,自动生成表单,自动保存 + +### 模型提供商 +一键测试连接状态,模板快速添加 + +### 日志查看 +实时日志流,多级过滤,虚拟滚动 + +## 📦 依赖说明 + +### 核心依赖 + +| 包名 | 版本 | 用途 | +|------|------|------| +| react | ^19.2.0 | UI 框架 | +| react-dom | ^19.2.0 | React DOM 渲染 | +| typescript | ~5.9.3 | 类型系统 | +| vite | ^7.2.2 | 构建工具 | +| @tanstack/react-router | ^1.136.1 | 路由管理 | +| @tanstack/react-virtual | ^3.x | 虚拟滚动 | +| jotai | ^2.15.1 | 状态管理 | +| axios | ^1.13.2 | HTTP 客户端 | +| recharts | ^2.x | 数据图表 | +| reactflow | ^11.x | 知识图谱可视化 | +| dagre | ^0.8.x | 图布局算法 | + +### UI 组件库 + +| 包名 | 版本 | 用途 | +|------|------|------| +| @radix-ui/react-* | ^1.x | 无障碍组件基础 | +| lucide-react | ^0.553.0 | 图标库 | +| tailwindcss | ^3.4 | CSS 框架 | +| class-variance-authority | ^0.7.1 | 类名管理 | +| tailwind-merge | ^3.4.0 | Tailwind 类合并 | +| date-fns | ^3.x | 日期处理 | + + +## 🤝 贡献指南 + +1. Fork 本仓库 +2. 创建特性分支 (`git checkout -b feature/AmazingFeature`) +3. 提交更改 (`git commit -m 'Add some AmazingFeature'`) +4. 推送到分支 (`git push origin feature/AmazingFeature`) +5. 开启 Pull Request + +### 代码规范 + +- 使用 TypeScript 严格模式 +- 遵循 ESLint 规则 +- 使用 Prettier 格式化代码 +- 组件使用函数式编写 +- 优先使用 Hooks +- 响应式设计优先(移动端适配) + +## 📄 开源协议 + +本项目基于 GPLv3 协议开源,详见 [LICENSE](./LICENSE) 文件。 + +## 👥 作者 + +**MotricSeven** - [GitHub](https://github.com/DrSmoothl) + +## 🙏 致谢 + +- [React](https://react.dev/) - UI 框架 +- [shadcn/ui](https://ui.shadcn.com/) - 组件库 +- [Radix UI](https://www.radix-ui.com/) - 无障碍组件 +- [TanStack Router](https://tanstack.com/router) - 路由解决方案 +- [TanStack Virtual](https://tanstack.com/virtual) - 虚拟滚动 +- [Tailwind CSS](https://tailwindcss.com/) - CSS 框架 +- [ReactFlow](https://reactflow.dev/) - 流程图/知识图谱 +- [Recharts](https://recharts.org/) - React 图表库 + +--- + +
+Made with ❤️ by MotricSeven and Mai-with-u +
diff --git a/dashboard/components.json b/dashboard/components.json new file mode 100644 index 00000000..106236b1 --- /dev/null +++ b/dashboard/components.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "tailwind.config.js", + "css": "src/index.css", + "baseColor": "slate", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "src/components", + "utils": "src/lib/utils", + "ui": "src/components/ui", + "lib": "src/lib", + "hooks": "src/hooks" + } +} diff --git a/dashboard/docs/main.png b/dashboard/docs/main.png new file mode 100644 index 0000000000000000000000000000000000000000..5a0feed3f94e1d36e814f68ce8c1f22562a831f4 GIT binary patch literal 422633 zcmbSzd0b52|Noh3N2P^ODoI7!M4@FuRFrIqqKS|tC82$0;!Tnip-7Fb4T(_FGLtq+ zjY^x;w5YVs)KoLmY`=4h_m?;C_ov72kGON^&b{}X^ID#-=j-)4VOus^Nlu$L4FDi% zV{N$&0OU~QuDB@t?;4m#MLr!muzuY(_2>@J`FQ^=AbOH$W4UIBAF8v+?d2l(&xAIP z|Kp>KhVGZgi!u!jZA9NUWFBwIl)1dW=}?nt@RN#10YtCb$QN}kd8=<7PIAv@mY&|X zEWUSHO!kL^(Mfu%H`--x-`h3uQP<~I`JO)R`04DrdUG-I_JhA&^2a9(*q6=^RHxxe6;UVtArKjY^cLO~V}sX$ zI_bF1aFk!h48k8p=AXagC8j>VipqyW2t_xb)kD|0yRE z3!F*H?VIm)pmR9!_qoz`;gu;E{{5b6Q(d5Ea3+x<{{E7>W~p#fpy9!W`<51{gauwH4we=Z)Xc>w4`LDg2vg?lJ0d#&VRH z&Hg%u?zTd%*QPd?W5ne?CCkl6hnRmDS5s42=cdNjkTJufP55nb}GewPD423dou##~x)qli4Ogy_cb;6nrTeD1jG94x$A}M7pUZq7f1})7rN!6EgalF(S^~Ph`#ABX5Do@h7x$gTkO!ZaAp_#Hm z48Wv#W#AWG)=4FcO}y9RZ6Wq^zR&N6soroE$KRda>zMyTz8a(NJ-P@chV2+ec!cQq zfOHe{GP*T`S25L_9zN>vb-M~4^Sdx*xKDXiSf5I%6eyNI1R3#J9IvgCZsS(r{ofQ1 zauT-kx1Sk_sKz)woL4gWYK_qcL4rh4Vfo9}gH5--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VZ4b38^-SRInLab%r|!QwG+NHk-CZ4DKqG@` zm5U@^gE*LyqzR}8E0lOMKneZ!s#q(jLv2cv$gCWnctgeq19$T&_It&SK6fe3og3&v zvBm4idzFS=+ZX7r$;6XQad5w-I;CaDR)|psh{dW%gUYJqw2ui%<1uStcjM|4$ z%W%kBLteuw@Ch?mCnk5^jy~IcYUUz_{7J|&!2ZNbAePhgc}WX+w=B7kL8Q(RMfpVs zQ$k%{MGu4dCq;kjs~j!q6dVkgCZERik2wH4Pf$k$tygIh1Taz4Ji~8;D~& zeg2I>Q { + acc[key] = 'warn' + return acc + }, {}), + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + // 关闭或降级其他规则 + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 'warn', + }, + }, +) diff --git a/dashboard/index.html b/dashboard/index.html new file mode 100644 index 00000000..98489824 --- /dev/null +++ b/dashboard/index.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + MaiBot Dashboard + + +

+ + + diff --git a/dashboard/package.json b/dashboard/package.json new file mode 100644 index 00000000..4266f5d4 --- /dev/null +++ b/dashboard/package.json @@ -0,0 +1,95 @@ +{ + "name": "maibot-dashboard", + "private": true, + "version": "0.11.6", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview", + "format": "prettier --write \"src/**/*.{ts,tsx,css}\"" + }, + "dependencies": { + "@codemirror/lang-javascript": "^6.2.4", + "@codemirror/lang-json": "^6.0.2", + "@codemirror/lang-python": "^6.2.1", + "@codemirror/legacy-modes": "^6.5.2", + "@codemirror/lint": "^6.9.2", + "@codemirror/theme-one-dark": "^6.1.3", + "@dnd-kit/core": "^6.3.1", + "@dnd-kit/sortable": "^10.0.0", + "@dnd-kit/utilities": "^3.2.2", + "@radix-ui/react-accordion": "^1.2.12", + "@radix-ui/react-alert-dialog": "^1.1.15", + "@radix-ui/react-avatar": "^1.1.11", + "@radix-ui/react-checkbox": "^1.3.3", + "@radix-ui/react-collapsible": "^1.1.12", + "@radix-ui/react-context-menu": "^2.2.16", + "@radix-ui/react-dialog": "^1.1.15", + "@radix-ui/react-dropdown-menu": "^2.1.16", + "@radix-ui/react-label": "^2.1.8", + "@radix-ui/react-popover": "^1.1.15", + "@radix-ui/react-progress": "^1.1.8", + "@radix-ui/react-radio-group": "^1.3.8", + "@radix-ui/react-scroll-area": "^1.2.10", + "@radix-ui/react-select": "^2.2.6", + "@radix-ui/react-separator": "^1.1.8", + "@radix-ui/react-slider": "^1.3.6", + "@radix-ui/react-slot": "^1.2.4", + "@radix-ui/react-switch": "^1.2.6", + "@radix-ui/react-tabs": "^1.1.13", + "@radix-ui/react-toast": "^1.2.15", + "@radix-ui/react-tooltip": "^1.2.8", + "@tanstack/react-router": "^1.140.0", + "@tanstack/react-virtual": "^3.13.13", + "@tanstack/router-devtools": "^1.140.0", + "@types/dagre": "^0.7.53", + "@uiw/react-codemirror": "^4.25.3", + "@uppy/core": "^5.2.0", + "@uppy/dashboard": "^5.1.0", + "@uppy/react": "^5.1.1", + "@uppy/xhr-upload": "^5.1.1", + "axios": "^1.13.2", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cmdk": "^1.1.1", + "dagre": "^0.8.5", + "date-fns": "^4.1.0", + "html-to-image": "^1.11.13", + "jotai": "^2.16.0", + "katex": "^0.16.27", + "lucide-react": "^0.556.0", + "react": "^19.2.1", + "react-day-picker": "^9.12.0", + "react-dom": "^19.2.1", + "react-joyride": "^2.9.3", + "react-markdown": "^10.1.0", + "reactflow": "^11.11.4", + "recharts": "3.5.1", + "rehype-katex": "^7.0.1", + "remark-gfm": "^4.0.1", + "remark-math": "^6.0.0", + "smol-toml": "^1.5.2", + "tailwind-merge": "^3.4.0" + }, + "devDependencies": { + "@eslint/js": "^9.39.1", + "@types/node": "^24.10.2", + "@types/react": "^19.2.7", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^5.1.2", + "autoprefixer": "^10.4.22", + "eslint": "^9.39.1", + "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-react-refresh": "^0.4.24", + "globals": "^16.5.0", + "postcss": "^8.5.6", + "prettier": "^3.7.4", + "prettier-plugin-tailwindcss": "^0.7.2", + "tailwindcss": "^3", + "typescript": "~5.9.3", + "typescript-eslint": "^8.49.0", + "vite": "^7.2.7" + } +} diff --git a/dashboard/postcss.config.js b/dashboard/postcss.config.js new file mode 100644 index 00000000..2e7af2b7 --- /dev/null +++ b/dashboard/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/dashboard/public/fonts/JetBrainsMono-Medium.ttf b/dashboard/public/fonts/JetBrainsMono-Medium.ttf new file mode 100644 index 0000000000000000000000000000000000000000..97671156df256e850498054fdebcd41d74a65d6b GIT binary patch literal 273860 zcmc${3!Ifx`~QEf`(A4|rNeYiW!tm&Ow(aXDw#B8%uELg>A(!pq=OJb2qA_5Z>sr@3-uJ!Mz4yLH zjEFSkA1m4Y%KG$evew-!;REwUg7*Ce9X%vE_l7Sdd}y^uVs*bE!%EtI^y)MTUr&mh z+~nvX2Xtw4`#w`e%xt_=jyhxHgyVC|*NE)bO{CjJQ_eW~ zfbcSr5mh4f>z*?5+zG^IQ{G%O>y+^qj=k=%IbVxRA1}f38RN!`9Nnr@N){C4~z;W>zBPUI0u)Ikb>65UJ zojLN1G4-<+JS5>@>?0RUIP2VrCmw%?m9T<(4D34LoG}xozcD8&at7^}_eJ|AIP%?z z*JO1Z(V*x@X%KE9Mn2gx_Cl}Yru|a1XF{;sR&pGXAeDpSM8aKrR*|{a_`1H77(q>CvgR;0G~ zRb_+fM)J!}Vv028h!Xx;D)p+XeI3GGrXVKfo=-j?SDS#*k(fmAc|3Ibe@IJwD-}@w zAE=W~Qyuw#fkV?iPC$qL2ee*Vrs|mgChf3SGVPi|_*_uU(1dUq9Qzmir@H-b(qfdS zsE>TmIvxi{g0{6LTE9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dashboard/public/maimai.ico new file mode 100644 index 0000000000000000000000000000000000000000..3c1b131edae2059a73c04b9eee7a1bb9d527d28b GIT binary patch literal 119148 zcmV)WK(4<400962000000096X09Mff02TlM0EtjeM-2)Z3IG5A4M|8uQUCw}00001 z00;&E003NasAd2F00D1uPE-NUqIa4A0Du5VL_t(|+U$J=cwE=D^=MekJQ|HgBOWm` zGlOLY8R9TAGlQMjmJDHLa>I!^)Ff@vG}JT=G@ORPy#BrSxigX-JJj_3>3h-loli6x z&D?wT+G}k(I^F;BkM8as-5qy4s7p>xk?$SxDb~P%;99fUa*bZE|J+CC1A|_N0ADjw z?J;Pr%)_jnI?U^@$GidhJkWr-KXZ-H-_HF7fA?Em{C@&h2*V!otFIiHV82-#`ABeKa&Q$mfEB z0-eEV*45S38$v=tGc6|TNk+ZldD;}4jkG!Zt!5~P0ILZ`gU?Q*!SIFAXu99eFK|*!Ok6nck8lEj zqmDU7*VNRctF5j5-EjUleB|Zj=|<+x)rEwF$oDa^@o|2B0SoEoZ!q}izcZ2H2Utu< zwnd?~G#f)*^_Vr-hB<>RvVrFEX4e3KzaJU=9RU8jz=}bj3A5>b4t3U{qA(M-s1W#? z^u+dv@fl3-69c%?-!GscAwJ$$_DpV`E;1}!mynR~y8->TeoUV|TLXYXozY;_CA*S+ zgMxxvO(x4tMuX`yy^kJNqaOC?a8ws%VYssfv&mcV8lep{LZ5~5_t(mrH&FjO0Q{FN zzJK$C!8OSJWFVL|(2V}p3KYAO5E&9cAizMN-%gC+6^qGyYD7eM>I3)Q=VObv>Gs=i zKV5Ng@$bg;-}aH2lcVb#?AL_^hw1?6LPJBH7PI+8lfm$sQRlPMOgB9;Gzi5xX&7j$ zrcKeLy!}9(SL>_gq5f+9rvc!X>g!*Vy8owN!~Zk@%kwD@&L_Qc}|IhV@(j;6P4fRFp280DwQ@YzYDW z{(;?Qv-w`5UjGdTfr9B~XF6@@s4v5effn)ja|Y@)yJ3qAB}V82lU}#eXwbiIwOURf*=Xl|BeP3k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7=dX$(>aYVG{^cqlew2? z08qfU0aJLMppfGKqF#wS1Q?tXiFy$>Fa%q}7;2B~FneT$SR*q?kIWD&g*NT=sd z46uYT$`Q?Lc%y9{KXi=q=c|2O0KHBiIwu5RXigMnbV+*d4nW2Kb1EZL8)NP;TEm-S?#Pyy zJ+eKoK@X=XF+AR;h7uadOt0{{Q3g{{TwG@>gCRbF=^e002ov JPDHLkV1o7By!8M8 literal 0 HcmV?d00001 diff --git a/dashboard/src/assets/maimai.ico b/dashboard/src/assets/maimai.ico new file mode 100644 index 0000000000000000000000000000000000000000..578b11cdd0c88dc8f590668a718303d939754f67 GIT binary patch literal 67715 zcmW(+1z3|`AAL7^fOOXo1q2k3?go*R27?X>>5h$7P#UB`5J9?;9w5@)IS?eIOLE({ z|F=DR_U_r9?Y{5s@BGd=_gnw~VekLlKmZhQAp`-m*y9hn+G?Z_MhNzhRQ;K<-hc1@ z_aMZ_KE3iNvHS0ptB1A$Xsp0D69C|Vy0U_S-{O7_0o*`kvd_5JYjtJY-_B!npgg^c zS>Xl63wZ?(d>RhU6ev#^p_SrKTpk4vRpkQQ0fqsIcj=Fg%FM^6C#CIu>_6jO#GTyO zWgKs{hrGtz81IyR{c0U=9pAaLvFthKJw|69UA$~cvys?(eBn|D&z&}HubxQS%wI?&|bN!w5 z;$`Aw(2)42wu28)w@8e3%kH-v=(6!EcNKM-eW5GO)i(cR2sL+t z!4Egf%bcMnt>qDMjWj$4JAo4_bl%3$k}}K_gRjpLH!fT+GpwO*`|kTETrld#X2Oqj za;4RMSG?&KF-S?r*WNRR!SC8mezD(N;?f-2^BR_V+5H(zosz2x3+|4jdt+kWH_0gC zxZj4p*=tJSGxaEP#DH#c2C<)!x}JUMswIiO+DLx>`AM*I(*IAOJf2EhoSkUh$OYB{ z@shFycpYa-Q%`U9s-pkSlzsl@1uKGhvjn4*hr_LUV;<(f(AUl9$j9F0N0UWEp>Ns) zii91fx&NSVkB}8`L3Q)a%SjD>nTsf=ed-`@||^MvZH;{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@m}`WYC~NYV@B&`$Nzbp|6|;Kta!U-)#}X|FqyA(d?sa0UQ&A8hiHarP9(e zjqsDGXNORH`Q;bF^jG#FijIz={QNw&2o|#sZ$$n2bf;rS4$x2gc9Y%oDb%)2Yce*{ zCwX`QR|O>139ti#V@t!z`TDap0&Tf4oi|ouyp|7R%jr_1o>8u0pNLo6#(GlcAPAG z^&lf-J++y+NqXznE$v#hZ23;>)~#v<>Q!18{;_=dats3bkE^Te0zW^$t!{2^PKOR1 z+CE~$h`aoF89L5jnksvy#^hI0e6R@S&2y%0+qPEG`bR1WzV2SSbeX7XQ)!rZuu-4` zjRec~Yy%2ar(a|c4^d902XzW2(-*GoL zI>N$!q{`HsKg#dN#xx;ZCwzVeS@E|@Ledv5`WnuI$GO=QcO`^k{Cy}!Lzr@ncT`{n zUm|uwL

+ ) + } + + const extensions = [ + ...(languageExtensions[language] || []), + EditorView.lineWrapping, + // 应用 JetBrains Mono 字体 + EditorView.theme({ + '&': { + fontFamily: '"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace', + }, + '.cm-content': { + fontFamily: '"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace', + }, + '.cm-gutters': { + fontFamily: '"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace', + }, + '.cm-scroller': { + fontFamily: '"JetBrains Mono", "Fira Code", "Consolas", "Monaco", monospace', + }, + }), + ] + + if (readOnly) { + extensions.push(EditorView.editable.of(false)) + } + + return ( +
+ +
+ ) +} + +export default CodeEditor diff --git a/dashboard/src/components/ListFieldEditor.tsx b/dashboard/src/components/ListFieldEditor.tsx new file mode 100644 index 00000000..ac3373f9 --- /dev/null +++ b/dashboard/src/components/ListFieldEditor.tsx @@ -0,0 +1,525 @@ +/** + * ListFieldEditor - 动态数组字段编辑器 + * + * 支持功能: + * - 字符串数组 (string[]) + * - 数字数组 (number[]) + * - 对象数组 (object[]) - 根据 item_fields 定义渲染 + * - 拖拽排序 + * - 动态增删项 + */ + +import { useState, useCallback, useMemo } from 'react' +import { + DndContext, + closestCenter, + KeyboardSensor, + PointerSensor, + useSensor, + useSensors, + type DragEndEvent, +} from '@dnd-kit/core' +import { + arrayMove, + SortableContext, + sortableKeyboardCoordinates, + useSortable, + verticalListSortingStrategy, +} from '@dnd-kit/sortable' +import { CSS } from '@dnd-kit/utilities' +import { Button } from '@/components/ui/button' +import { Input } from '@/components/ui/input' +import { Label } from '@/components/ui/label' +import { Card } from '@/components/ui/card' +import { Switch } from '@/components/ui/switch' +import { Slider } from '@/components/ui/slider' +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select' +import { GripVertical, Plus, Trash2, AlertCircle } from 'lucide-react' +import { cn } from '@/lib/utils' + +// ============ 类型定义 ============ + +export interface ItemFieldDefinition { + /** 字段类型: "string" | "number" | "boolean" | "select" */ + type: string + label?: string + placeholder?: string + default?: unknown + /** select 类型的选项 */ + choices?: unknown[] + /** slider 类型的最小值 */ + min?: number + /** slider 类型的最大值 */ + max?: number + /** slider 类型的步进 */ + step?: number +} + +export interface ListFieldEditorProps { + /** 当前值 */ + value: unknown[] | unknown + /** 值变化回调 */ + onChange: (value: unknown[]) => void + /** 数组元素类型: "string" | "number" | "object" */ + itemType?: string + /** 当 itemType="object" 时的字段定义 */ + itemFields?: Record + /** 最小元素数量 */ + minItems?: number + /** 最大元素数量 */ + maxItems?: number + /** 是否禁用 */ + disabled?: boolean + /** 新项的占位符文字 */ + placeholder?: string +} + +// ============ 可排序项组件 ============ + +interface SortableItemProps { + id: string + index: number + itemType: string + itemFields?: Record + value: unknown + onChange: (value: unknown) => void + onRemove: () => void + disabled?: boolean + canRemove: boolean + placeholder?: string +} + +function SortableItem({ + id, + index, + itemType, + itemFields, + value, + onChange, + onRemove, + disabled, + canRemove, + placeholder, +}: SortableItemProps) { + const { + attributes, + listeners, + setNodeRef, + transform, + transition, + isDragging, + } = useSortable({ id, disabled }) + + const style = { + transform: CSS.Transform.toString(transform), + transition, + } + + return ( +
+ {/* 拖拽手柄 */} + + + {/* 内容区域 */} +
+ {itemType === 'object' && itemFields ? ( + } + onChange={onChange} + fields={itemFields} + disabled={disabled} + /> + ) : itemType === 'number' ? ( + onChange(parseFloat(e.target.value) || 0)} + placeholder={placeholder ?? `第 ${index + 1} 项`} + disabled={disabled} + className="font-mono" + /> + ) : ( + onChange(e.target.value)} + placeholder={placeholder ?? `第 ${index + 1} 项`} + disabled={disabled} + /> + )} +
+ + {/* 删除按钮 */} + +
+ ) +} + +// ============ 对象项编辑器 ============ + +interface ObjectItemEditorProps { + value: Record + onChange: (value: Record) => void + fields: Record + disabled?: boolean +} + +function ObjectItemEditor({ + value, + onChange, + fields, + disabled, +}: ObjectItemEditorProps) { + const handleFieldChange = useCallback( + (fieldName: string, fieldValue: unknown) => { + onChange({ + ...value, + [fieldName]: fieldValue, + }) + }, + [value, onChange] + ) + + const renderField = (fieldName: string, fieldDef: ItemFieldDefinition) => { + const fieldValue = value?.[fieldName] + + // boolean / switch + if (fieldDef.type === 'boolean' || fieldDef.type === 'switch') { + return ( +
+ + handleFieldChange(fieldName, checked)} + disabled={disabled} + /> +
+ ) + } + + // slider (number with min/max) + if (fieldDef.type === 'slider' || (fieldDef.type === 'number' && fieldDef.min != null && fieldDef.max != null)) { + const numValue = (fieldValue as number) ?? (fieldDef.default as number) ?? fieldDef.min ?? 0 + return ( +
+
+ + {numValue} +
+ handleFieldChange(fieldName, v[0])} + min={fieldDef.min ?? 0} + max={fieldDef.max ?? 100} + step={fieldDef.step ?? 1} + disabled={disabled} + className="py-1" + /> +
+ ) + } + + // select + if (fieldDef.type === 'select' && fieldDef.choices) { + return ( +
+ + +
+ ) + } + + // number + if (fieldDef.type === 'number') { + return ( +
+ + + handleFieldChange(fieldName, parseFloat(e.target.value) || 0) + } + placeholder={fieldDef.placeholder} + disabled={disabled} + className="h-8 text-sm" + /> +
+ ) + } + + // string (default) + return ( +
+ + handleFieldChange(fieldName, e.target.value)} + placeholder={fieldDef.placeholder} + disabled={disabled} + className="h-8 text-sm" + /> +
+ ) + } + + return ( + + {Object.entries(fields).map(([fieldName, fieldDef]) => ( +
+ {renderField(fieldName, fieldDef)} +
+ ))} +
+ ) +} + +// ============ 主组件 ============ + +export function ListFieldEditor({ + value, + onChange, + itemType = 'string', + itemFields, + minItems, + maxItems, + disabled, + placeholder, +}: ListFieldEditorProps) { + // 确保 value 是数组 + const items: unknown[] = useMemo(() => { + if (Array.isArray(value)) return value + if (typeof value === 'string' && value.trim()) { + // 尝试解析逗号分隔的字符串 + return value.split(',').map((s: string) => s.trim()) + } + return [] + }, [value]) + + // 为每个项生成稳定的 ID + const [itemIds] = useState(() => new Map()) + const getItemId = useCallback( + (index: number) => { + if (!itemIds.has(index)) { + itemIds.set(index, `item-${Date.now()}-${index}-${Math.random().toString(36).slice(2)}`) + } + return itemIds.get(index)! + }, + [itemIds] + ) + + // 同步 itemIds + const sortableIds = useMemo(() => { + // 清理多余的 ID + const newIds: string[] = [] + for (let i = 0; i < items.length; i++) { + newIds.push(getItemId(i)) + } + return newIds + }, [items.length, getItemId]) + + // DnD 传感器配置 + const sensors = useSensors( + useSensor(PointerSensor, { + activationConstraint: { + distance: 8, + }, + }), + useSensor(KeyboardSensor, { + coordinateGetter: sortableKeyboardCoordinates, + }) + ) + + // 拖拽结束处理 + const handleDragEnd = useCallback( + (event: DragEndEvent) => { + const { active, over } = event + if (over && active.id !== over.id) { + const oldIndex = sortableIds.indexOf(active.id as string) + const newIndex = sortableIds.indexOf(over.id as string) + const newItems = arrayMove(items, oldIndex, newIndex) + onChange(newItems) + } + }, + [items, sortableIds, onChange] + ) + + // 添加新项 + const handleAddItem = useCallback(() => { + if (maxItems != null && items.length >= maxItems) return + + let newItem: unknown + if (itemType === 'object' && itemFields) { + // 创建包含默认值的对象 + newItem = Object.fromEntries( + Object.entries(itemFields).map(([k, v]) => [k, v.default ?? '']) + ) + } else if (itemType === 'number') { + newItem = 0 + } else { + newItem = '' + } + + onChange([...items, newItem]) + }, [items, maxItems, itemType, itemFields, onChange]) + + // 修改项 + const handleItemChange = useCallback( + (index: number, newValue: unknown) => { + const newItems = [...items] + newItems[index] = newValue + onChange(newItems) + }, + [items, onChange] + ) + + // 删除项 + const handleRemoveItem = useCallback( + (index: number) => { + if (minItems != null && items.length <= minItems) return + const newItems = items.filter((_: unknown, i: number) => i !== index) + // 清理 itemIds 映射 + itemIds.delete(index) + onChange(newItems) + }, + [items, minItems, itemIds, onChange] + ) + + const canAdd = maxItems == null || items.length < maxItems + const canRemove = minItems == null || items.length > minItems + + return ( +
+ {/* 列表项 */} + {items.length === 0 ? ( +
+ + 暂无数据,点击下方按钮添加 +
+ ) : ( + + +
+ {items.map((item: unknown, index: number) => ( + handleItemChange(index, newValue)} + onRemove={() => handleRemoveItem(index)} + disabled={disabled} + canRemove={canRemove} + placeholder={placeholder} + /> + ))} +
+
+
+ )} + + {/* 添加按钮 */} + + + {/* 限制提示 */} + {(minItems != null || maxItems != null) && (minItems !== null || maxItems !== null) && ( +

+ {minItems != null && maxItems != null + ? `允许 ${minItems} - ${maxItems} 项` + : minItems != null + ? `至少 ${minItems} 项` + : `最多 ${maxItems} 项`} +

+ )} +
+ ) +} + +export default ListFieldEditor diff --git a/dashboard/src/components/RestartingOverlay.legacy.tsx b/dashboard/src/components/RestartingOverlay.legacy.tsx new file mode 100644 index 00000000..aa368f1b --- /dev/null +++ b/dashboard/src/components/RestartingOverlay.legacy.tsx @@ -0,0 +1,189 @@ +import { useEffect, useState } from 'react' +import { Loader2, CheckCircle2, AlertCircle } from 'lucide-react' +import { Progress } from '@/components/ui/progress' + +/** + * @deprecated 请使用新的 RestartOverlay 组件 + * import { RestartOverlay } from '@/components/restart-overlay' + */ +interface RestartingOverlayProps { + onRestartComplete?: () => void + onRestartFailed?: () => void +} + +/** + * @deprecated 请使用新的 RestartOverlay 组件 + * import { RestartOverlay } from '@/components/restart-overlay' + */ +export function RestartingOverlay({ onRestartComplete, onRestartFailed }: RestartingOverlayProps) { + const [progress, setProgress] = useState(0) + const [status, setStatus] = useState<'restarting' | 'checking' | 'success' | 'failed'>('restarting') + const [elapsedTime, setElapsedTime] = useState(0) + const [checkAttempts, setCheckAttempts] = useState(0) + + useEffect(() => { + // 进度条动画 + const progressInterval = setInterval(() => { + setProgress((prev) => { + if (prev >= 90) return prev + return prev + 1 + }) + }, 200) + + // 计时器 + const timerInterval = setInterval(() => { + setElapsedTime((prev) => prev + 1) + }, 1000) + + // 等待3秒后开始检查状态(给后端重启时间) + const initialDelay = setTimeout(() => { + setStatus('checking') + startHealthCheck() + }, 3000) + + return () => { + clearInterval(progressInterval) + clearInterval(timerInterval) + clearTimeout(initialDelay) + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + + const startHealthCheck = () => { + const maxAttempts = 60 // 最多尝试60次(约2分钟) + + const checkHealth = async () => { + try { + setCheckAttempts((prev) => prev + 1) + + const response = await fetch('/api/webui/system/status', { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + signal: AbortSignal.timeout(3000), // 3秒超时 + }) + + if (response.ok) { + // 重启成功 + setProgress(100) + setStatus('success') + setTimeout(() => { + onRestartComplete?.() + }, 1500) + } else { + throw new Error('Status check failed') + } + } catch { + // 继续尝试 + if (checkAttempts < maxAttempts) { + setTimeout(checkHealth, 2000) // 2秒后重试 + } else { + // 超过最大尝试次数 + setStatus('failed') + onRestartFailed?.() + } + } + } + + checkHealth() + } + + const formatTime = (seconds: number) => { + const mins = Math.floor(seconds / 60) + const secs = seconds % 60 + return `${mins}:${secs.toString().padStart(2, '0')}` + } + + return ( +
+
+ {/* 图标和状态 */} +
+ {status === 'restarting' && ( + <> + +

正在重启麦麦

+

+ 请稍候,麦麦正在重启中... +

+ + )} + + {status === 'checking' && ( + <> + +

检查服务状态

+

+ 等待服务恢复... (尝试 {checkAttempts}/60) +

+ + )} + + {status === 'success' && ( + <> + +

重启成功

+

+ 正在跳转到登录页面... +

+ + )} + + {status === 'failed' && ( + <> + +

重启超时

+

+ 服务未能在预期时间内恢复,请手动检查或刷新页面 +

+ + )} +
+ + {/* 进度条 */} + {status !== 'failed' && ( +
+ +
+ {progress}% + 已用时: {formatTime(elapsedTime)} +
+
+ )} + + {/* 提示信息 */} +
+

+ {status === 'restarting' && '🔄 配置已保存,正在重启主程序...'} + {status === 'checking' && '⏳ 正在等待服务恢复,请勿关闭页面...'} + {status === 'success' && '✅ 配置已生效,服务运行正常'} + {status === 'failed' && '⚠️ 如果长时间无响应,请尝试手动重启'} +

+
+ + {/* 失败时的操作按钮 */} + {status === 'failed' && ( +
+ + +
+ )} +
+
+ ) +} diff --git a/dashboard/src/components/animation-provider.tsx b/dashboard/src/components/animation-provider.tsx new file mode 100644 index 00000000..2a72ba1d --- /dev/null +++ b/dashboard/src/components/animation-provider.tsx @@ -0,0 +1,54 @@ +import { useEffect, useState } from 'react' +import type { ReactNode } from 'react' +import { AnimationContext } from '@/lib/animation-context' + +type AnimationProviderProps = { + children: ReactNode + defaultEnabled?: boolean + defaultWavesEnabled?: boolean + storageKey?: string + wavesStorageKey?: string +} + +export function AnimationProvider({ + children, + defaultEnabled = true, + defaultWavesEnabled = true, + storageKey = 'enable-animations', + wavesStorageKey = 'enable-waves-background', +}: AnimationProviderProps) { + const [enableAnimations, setEnableAnimations] = useState(() => { + const stored = localStorage.getItem(storageKey) + return stored !== null ? stored === 'true' : defaultEnabled + }) + + const [enableWavesBackground, setEnableWavesBackground] = useState(() => { + const stored = localStorage.getItem(wavesStorageKey) + return stored !== null ? stored === 'true' : defaultWavesEnabled + }) + + useEffect(() => { + const root = document.documentElement + + if (enableAnimations) { + root.classList.remove('no-animations') + } else { + root.classList.add('no-animations') + } + + localStorage.setItem(storageKey, String(enableAnimations)) + }, [enableAnimations, storageKey]) + + useEffect(() => { + localStorage.setItem(wavesStorageKey, String(enableWavesBackground)) + }, [enableWavesBackground, wavesStorageKey]) + + const value = { + enableAnimations, + setEnableAnimations, + enableWavesBackground, + setEnableWavesBackground, + } + + return {children} +} diff --git a/dashboard/src/components/back-to-top.tsx b/dashboard/src/components/back-to-top.tsx new file mode 100644 index 00000000..3473566e --- /dev/null +++ b/dashboard/src/components/back-to-top.tsx @@ -0,0 +1,101 @@ +import { useEffect, useState, useRef } from 'react' +import { ArrowUp } from 'lucide-react' +import { cn } from '@/lib/utils' +import { Button } from '@/components/ui/button' + +export function BackToTop() { + const [progress, setProgress] = useState(0) + const [visible, setVisible] = useState(false) + const scrollerRef = useRef(null) + + useEffect(() => { + const handleScroll = (e: Event) => { + const target = e.target as HTMLElement + + // 简单的启发式:如果是主要滚动容器(通常高度较大) + // 我们假设页面中主要的滚动区域是高度最大的那个,或者就是当前触发滚动的这个 + // 只要它有足够的滚动空间 + if (target.scrollHeight > target.clientHeight + 100) { + scrollerRef.current = target + + const scrollTop = target.scrollTop + const height = target.scrollHeight - target.clientHeight + const scrolled = height > 0 ? (scrollTop / height) * 100 : 0 + + setProgress(scrolled) + setVisible(scrollTop > 300) + } + } + + // 使用捕获阶段监听所有滚动事件,因为 scroll 事件不冒泡 + window.addEventListener('scroll', handleScroll, { capture: true, passive: true }) + return () => window.removeEventListener('scroll', handleScroll, { capture: true }) + }, []) + + const scrollToTop = () => { + scrollerRef.current?.scrollTo({ top: 0, behavior: 'smooth' }) + } + + // SVG 环形进度条参数 + const radius = 18 + const circumference = 2 * Math.PI * radius + const strokeDashoffset = circumference - (progress / 100) * circumference + + return ( +
+ +
+ ) +} diff --git a/dashboard/src/components/emoji-thumbnail.tsx b/dashboard/src/components/emoji-thumbnail.tsx new file mode 100644 index 00000000..c92cd91a --- /dev/null +++ b/dashboard/src/components/emoji-thumbnail.tsx @@ -0,0 +1,123 @@ +/** + * 表情包缩略图组件 + * + * 特性: + * - 自动处理 202 响应(缩略图生成中) + * - 显示 Skeleton 占位符 + * - 自动重试加载 + * - 加载失败显示占位图标 + */ + +import { useState, useEffect, useCallback } from 'react' +import { Skeleton } from '@/components/ui/skeleton' +import { ImageIcon } from 'lucide-react' +import { cn } from '@/lib/utils' + +interface EmojiThumbnailProps { + src: string + alt?: string + className?: string + /** 最大重试次数 */ + maxRetries?: number + /** 重试间隔(毫秒) */ + retryInterval?: number +} + +type LoadingState = 'loading' | 'loaded' | 'generating' | 'error' + +export function EmojiThumbnail({ + src, + alt = '表情包', + className, + maxRetries = 5, + retryInterval = 1500, +}: EmojiThumbnailProps) { + const [state, setState] = useState('loading') + const [retryCount, setRetryCount] = useState(0) + const [imageSrc, setImageSrc] = useState(null) + const [currentSrc, setCurrentSrc] = useState(src) + + // 当 src 变化时重置状态 + if (src !== currentSrc) { + setState('loading') + setRetryCount(0) + setImageSrc(null) + setCurrentSrc(src) + } + + const loadImage = useCallback(async () => { + try { + const response = await fetch(src, { + credentials: 'include', // 携带 Cookie + }) + + if (response.status === 202) { + // 缩略图正在生成中 + setState('generating') + + if (retryCount < maxRetries) { + // 延迟后重试 + setTimeout(() => { + setRetryCount(prev => prev + 1) + }, retryInterval) + } else { + // 超过最大重试次数,显示错误 + setState('error') + } + return + } + + if (!response.ok) { + setState('error') + return + } + + // 成功获取图片 + const blob = await response.blob() + const objectUrl = URL.createObjectURL(blob) + setImageSrc(objectUrl) + setState('loaded') + } catch (error) { + console.error('加载缩略图失败:', error) + setState('error') + } + }, [src, retryCount, maxRetries, retryInterval]) + + useEffect(() => { + loadImage() + }, [loadImage]) + + // 清理 Object URL + useEffect(() => { + return () => { + if (imageSrc) { + URL.revokeObjectURL(imageSrc) + } + } + }, [imageSrc]) + + // 加载中或生成中显示 Skeleton + if (state === 'loading' || state === 'generating') { + return ( + + ) + } + + // 加载失败显示占位图标 + if (state === 'error' || !imageSrc) { + return ( +
+ +
+ ) + } + + // 加载成功显示图片 + return ( + {alt} + ) +} diff --git a/dashboard/src/components/error-boundary.tsx b/dashboard/src/components/error-boundary.tsx new file mode 100644 index 00000000..7e3e0700 --- /dev/null +++ b/dashboard/src/components/error-boundary.tsx @@ -0,0 +1,307 @@ +import { Component } from 'react' +import type { ErrorInfo, ReactNode } from 'react' +import { AlertTriangle, RefreshCw, Home, ChevronDown, ChevronUp, Copy, Check, Bug } from 'lucide-react' +import { Button } from '@/components/ui/button' +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' +import { Alert, AlertDescription } from '@/components/ui/alert' +import { ScrollArea } from '@/components/ui/scroll-area' +import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible' +import { useState } from 'react' + +interface Props { + children: ReactNode + fallback?: ReactNode +} + +interface State { + hasError: boolean + error: Error | null + errorInfo: ErrorInfo | null +} + +// 解析堆栈信息为结构化数据 +interface StackFrame { + functionName: string + fileName: string + lineNumber: string + columnNumber: string + raw: string +} + +function parseStackTrace(stack: string): StackFrame[] { + const lines = stack.split('\n').slice(1) // 跳过第一行(错误消息) + const frames: StackFrame[] = [] + + for (const line of lines) { + const trimmed = line.trim() + if (!trimmed.startsWith('at ')) continue + + // 匹配格式: at functionName (fileName:line:column) 或 at fileName:line:column + const match = trimmed.match(/at\s+(?:(.+?)\s+\()?(.+?):(\d+):(\d+)\)?$/) + if (match) { + frames.push({ + functionName: match[1] || '', + fileName: match[2], + lineNumber: match[3], + columnNumber: match[4], + raw: trimmed, + }) + } else { + frames.push({ + functionName: '', + fileName: '', + lineNumber: '', + columnNumber: '', + raw: trimmed, + }) + } + } + + return frames +} + +// 错误详情展示组件(函数组件,用于使用 hooks) +function ErrorDetails({ error, errorInfo }: { error: Error; errorInfo: ErrorInfo | null }) { + const [isStackOpen, setIsStackOpen] = useState(true) + const [isComponentStackOpen, setIsComponentStackOpen] = useState(false) + const [copied, setCopied] = useState(false) + + const stackFrames = error.stack ? parseStackTrace(error.stack) : [] + + const copyErrorInfo = async () => { + const errorText = ` +Error: ${error.name} +Message: ${error.message} + +Stack Trace: +${error.stack || 'No stack trace available'} + +Component Stack: +${errorInfo?.componentStack || 'No component stack available'} + +URL: ${window.location.href} +User Agent: ${navigator.userAgent} +Time: ${new Date().toISOString()} + `.trim() + + try { + await navigator.clipboard.writeText(errorText) + setCopied(true) + setTimeout(() => setCopied(false), 2000) + } catch (err) { + console.error('Failed to copy:', err) + } + } + + return ( +
+ {/* 错误消息 */} + + + + {error.name}: {error.message} + + + + {/* 堆栈跟踪 */} + {stackFrames.length > 0 && ( + + + + + + +
+ {stackFrames.map((frame, index) => ( +
+
+ + {index + 1}. + +
+ + {frame.functionName} + + {frame.fileName && ( +
+ {frame.fileName} + {frame.lineNumber && ( + + :{frame.lineNumber}:{frame.columnNumber} + + )} +
+ )} +
+
+
+ ))} +
+
+
+
+ )} + + {/* 组件堆栈 */} + {errorInfo?.componentStack && ( + + + + + + +
+                {errorInfo.componentStack}
+              
+
+
+
+ )} + + {/* 复制按钮 */} + +
+ ) +} + +// 错误回退 UI +function ErrorFallback({ + error, + errorInfo, +}: { + error: Error + errorInfo: ErrorInfo | null +}) { + const handleGoHome = () => { + window.location.href = '/' + } + + const handleRefresh = () => { + window.location.reload() + } + + return ( +
+ + +
+ +
+ 页面出现了问题 + + 应用程序遇到了意外错误。您可以尝试刷新页面或返回首页。 + +
+ + + + + {/* 操作按钮 */} +
+ + +
+ + {/* 提示信息 */} +

+ 如果问题持续存在,请将错误信息复制并反馈给开发者 +

+
+
+
+ ) +} + +// 错误边界类组件 +export class ErrorBoundary extends Component { + constructor(props: Props) { + super(props) + this.state = { + hasError: false, + error: null, + errorInfo: null, + } + } + + static getDerivedStateFromError(error: Error): Partial { + return { hasError: true, error } + } + + componentDidCatch(error: Error, errorInfo: ErrorInfo) { + console.error('ErrorBoundary caught an error:', error, errorInfo) + this.setState({ errorInfo }) + } + + handleReset = () => { + this.setState({ + hasError: false, + error: null, + errorInfo: null, + }) + } + + render() { + if (this.state.hasError && this.state.error) { + if (this.props.fallback) { + return this.props.fallback + } + + return ( + + ) + } + + return this.props.children + } +} + +// 路由级别的错误边界组件(用于 TanStack Router) +export function RouteErrorBoundary({ error }: { error: Error }) { + return ( + + ) +} diff --git a/dashboard/src/components/expression-reviewer.tsx b/dashboard/src/components/expression-reviewer.tsx new file mode 100644 index 00000000..512146ef --- /dev/null +++ b/dashboard/src/components/expression-reviewer.tsx @@ -0,0 +1,1597 @@ +/** + * 表达方式审核器弹窗组件 + * + * 功能: + * 1. 分页显示待审核/已通过/已拒绝的表达方式 + * 2. 支持单条通过/拒绝 + * 3. 支持批量操作 + * 4. 冲突检测(防止与AI自动检查冲突) + */ + +import { useState, useEffect, useCallback, useRef } from 'react' +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog' +import { Button } from '@/components/ui/button' +import { Input } from '@/components/ui/input' +import { Badge } from '@/components/ui/badge' +import { ScrollArea } from '@/components/ui/scroll-area' +import { Checkbox } from '@/components/ui/checkbox' +import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs' +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select' +import { + Pagination, + PaginationContent, + PaginationEllipsis, + PaginationItem, + PaginationLink, +} from '@/components/ui/pagination' +import { useToast } from '@/hooks/use-toast' +import { + CheckCircle2, + XCircle, + Clock, + Search, + RefreshCw, + ChevronLeft, + ChevronRight, + Bot, + User, + AlertCircle, + List, + Zap, + X, + Ban, +} from 'lucide-react' +import { cn } from '@/lib/utils' +import { + getReviewStats, + getReviewList, + batchReviewExpressions, + getChatList, +} from '@/lib/expression-api' +import type { Expression, ReviewStats, ChatInfo, BatchReviewItem } from '@/types/expression' + +interface ExpressionReviewerProps { + open: boolean + onOpenChange: (open: boolean) => void +} + +export function ExpressionReviewer({ open, onOpenChange }: ExpressionReviewerProps) { + // 审核模式:list(列表模式)或 quick(快速审核模式) + const [reviewMode, setReviewMode] = useState<'list' | 'quick'>('list') + const [stats, setStats] = useState(null) + const [expressions, setExpressions] = useState([]) + + // 快速审核模式状态 + const [quickFilterType, setQuickFilterType] = useState<'unchecked' | 'passed' | 'rejected' | 'all'>('unchecked') + const [quickExpressions, setQuickExpressions] = useState([]) + const [quickCurrentIndex, setQuickCurrentIndex] = useState(0) + const [quickLoading, setQuickLoading] = useState(false) + const [quickTotal, setQuickTotal] = useState(0) + const [quickPage, setQuickPage] = useState(1) + const [swipeDirection, setSwipeDirection] = useState<'left' | 'right' | null>(null) + const [swipeOffset, setSwipeOffset] = useState(0) + const [isAnimating, setIsAnimating] = useState(false) + const [conflictId, setConflictId] = useState(null) + const cardRef = useRef(null) + const dragStartRef = useRef<{ x: number; y: number } | null>(null) + const isDraggingRef = useRef(false) + const [loading, setLoading] = useState(false) + const [statsLoading, setStatsLoading] = useState(false) + const [total, setTotal] = useState(0) + const [page, setPage] = useState(1) + const [pageSize, setPageSize] = useState(20) + const [jumpPage, setJumpPage] = useState('') + const [filterType, setFilterType] = useState<'unchecked' | 'passed' | 'rejected' | 'all'>('unchecked') + const [search, setSearch] = useState('') + const [searchInput, setSearchInput] = useState('') + const [selectedIds, setSelectedIds] = useState>(new Set()) + const [processingIds, setProcessingIds] = useState>(new Set()) + const [chatNameMap, setChatNameMap] = useState>(new Map()) + const { toast } = useToast() + + // 加载统计数据 + const loadStats = useCallback(async () => { + try { + setStatsLoading(true) + const data = await getReviewStats() + setStats(data) + } catch (error) { + console.error('加载统计失败:', error) + } finally { + setStatsLoading(false) + } + }, []) + + // 加载列表 + const loadList = useCallback(async () => { + try { + setLoading(true) + const response = await getReviewList({ + page, + page_size: pageSize, + filter_type: filterType, + search: search || undefined, + }) + setExpressions(response.data) + setTotal(response.total) + } catch (error) { + toast({ + title: '加载失败', + description: error instanceof Error ? error.message : '无法加载列表', + variant: 'destructive', + }) + } finally { + setLoading(false) + } + }, [page, pageSize, filterType, search, toast]) + + // 加载聊天名称映射 + const loadChatNames = useCallback(async () => { + try { + const response = await getChatList() + if (response?.data) { + const nameMap = new Map() + response.data.forEach((chat: ChatInfo) => { + nameMap.set(chat.chat_id, chat.chat_name) + }) + setChatNameMap(nameMap) + } + } catch (error) { + console.error('加载聊天名称失败:', error) + } + }, []) + + // 快速审核模式 - 加载数据 + const loadQuickList = useCallback(async (resetIndex = true, append = false) => { + try { + setQuickLoading(true) + const pageToLoad = append ? quickPage + 1 : quickPage + const response = await getReviewList({ + page: pageToLoad, + page_size: 20, + filter_type: quickFilterType, + }) + + if (append) { + // 追加模式:拼接数据 + setQuickExpressions(prev => [...prev, ...response.data]) + setQuickPage(pageToLoad) + } else { + // 替换模式 + setQuickExpressions(response.data) + } + + setQuickTotal(response.total) + if (resetIndex) { + setQuickCurrentIndex(0) + } + } catch (error) { + toast({ + title: '加载失败', + description: error instanceof Error ? error.message : '无法加载列表', + variant: 'destructive', + }) + } finally { + setQuickLoading(false) + } + }, [quickPage, quickFilterType, toast]) + + // 快速审核模式 - 切换筛选时重置 + useEffect(() => { + if (reviewMode === 'quick') { + setQuickPage(1) + setQuickCurrentIndex(0) + } + }, [quickFilterType, reviewMode]) + + // 快速审核模式 - 加载数据 + useEffect(() => { + if (open && reviewMode === 'quick') { + loadQuickList() + loadStats() + } + }, [open, reviewMode, quickPage, quickFilterType, loadQuickList, loadStats]) + + // 获取当前卡片允许的滑动方向 + const getAllowedDirections = useCallback((expr: Expression | undefined) => { + if (!expr) return { left: false, right: false } + + if (quickFilterType === 'unchecked') { + // 待审核:左拒绝,右通过 + return { left: true, right: true } + } else if (quickFilterType === 'passed') { + // 已通过:只能左滑改为拒绝 + return { left: true, right: false } + } else if (quickFilterType === 'rejected') { + // 已拒绝:只能右滑改为通过 + return { left: false, right: true } + } else { + // 全部:智能判断 + if (!expr.checked) { + // 未审核:双向 + return { left: true, right: true } + } else if (expr.rejected) { + // 已拒绝:只能右滑 + return { left: false, right: true } + } else { + // 已通过:只能左滑 + return { left: true, right: false } + } + } + }, [quickFilterType]) + + // 快速审核 - 执行审核操作 + const handleQuickReview = useCallback(async (rejected: boolean) => { + const currentExpr = quickExpressions[quickCurrentIndex] + if (!currentExpr || isAnimating) return + + const directions = getAllowedDirections(currentExpr) + if ((rejected && !directions.left) || (!rejected && !directions.right)) { + return + } + + setIsAnimating(true) + setSwipeDirection(rejected ? 'left' : 'right') + setSwipeOffset(rejected ? -400 : 400) + + try { + const response = await batchReviewExpressions([{ + id: currentExpr.id, + rejected, + require_unchecked: quickFilterType === 'unchecked', + }]) + + if (response.results[0]?.success) { + toast({ + title: rejected ? '已拒绝' : '已通过', + description: `表达方式 #${currentExpr.id} ${rejected ? '已拒绝' : '已通过'}`, + }) + + // 从列表中移除当前项 + setTimeout(() => { + setQuickExpressions(prev => prev.filter((_, i) => i !== quickCurrentIndex)) + setQuickTotal(prev => prev - 1) + + // 如果当前索引超出范围,调整索引 + if (quickCurrentIndex >= quickExpressions.length - 1) { + setQuickCurrentIndex(Math.max(0, quickCurrentIndex - 1)) + } + + // 重置状态 + setSwipeDirection(null) + setSwipeOffset(0) + setIsAnimating(false) + + // 刷新统计 + loadStats() + + // 如果列表为空且还有更多数据,加载下一页 + if (quickExpressions.length <= 1 && quickTotal > 1) { + loadQuickList(false) + } + }, 300) + } else { + // 冲突处理 + setConflictId(currentExpr.id) + toast({ + title: '数据冲突', + description: '该条目已被后台任务处理,正在刷新数据...', + variant: 'destructive', + }) + + // 播放冲突动画后刷新 + setTimeout(() => { + setConflictId(null) + setSwipeDirection(null) + setSwipeOffset(0) + setIsAnimating(false) + loadQuickList(false) // 重新加载当前页 + loadStats() + }, 1500) + } + } catch (error) { + toast({ + title: '操作失败', + description: error instanceof Error ? error.message : '未知错误', + variant: 'destructive', + }) + setSwipeDirection(null) + setSwipeOffset(0) + setIsAnimating(false) + } + }, [quickExpressions, quickCurrentIndex, isAnimating, getAllowedDirections, quickFilterType, toast, loadStats, quickTotal, loadQuickList]) + + // 拖拽开始 + const handleDragStart = useCallback((clientX: number, clientY: number) => { + if (isAnimating) return + dragStartRef.current = { x: clientX, y: clientY } + isDraggingRef.current = false + }, [isAnimating]) + + // 触发无效操作动画 + const triggerInvalidAnimation = useCallback((direction: 'left' | 'right') => { + if (isAnimating) return + setIsAnimating(true) + // 模拟向该方向移动一点 + setSwipeOffset(direction === 'left' ? -30 : 30) + + setTimeout(() => { + setSwipeOffset(0) + setTimeout(() => setIsAnimating(false), 300) + }, 150) + }, [isAnimating]) + + // 拖拽移动 + const handleDragMove = useCallback((clientX: number) => { + if (!dragStartRef.current || isAnimating) return + + const deltaX = clientX - dragStartRef.current.x + const currentExpr = quickExpressions[quickCurrentIndex] + const directions = getAllowedDirections(currentExpr) + + // 检查方向限制 + if (deltaX < 0 && !directions.left) { + setSwipeOffset(deltaX * 0.2) // 提供阻力反馈 + setSwipeDirection(null) + return + } + if (deltaX > 0 && !directions.right) { + setSwipeOffset(deltaX * 0.2) + setSwipeDirection(null) + return + } + + isDraggingRef.current = true + setSwipeOffset(deltaX) + + if (Math.abs(deltaX) > 50) { + setSwipeDirection(deltaX > 0 ? 'right' : 'left') + } else { + setSwipeDirection(null) + } + }, [quickExpressions, quickCurrentIndex, getAllowedDirections, isAnimating]) + + // 拖拽结束 + const handleDragEnd = useCallback(() => { + if (!dragStartRef.current) return + + const threshold = 100 + if (Math.abs(swipeOffset) > threshold && swipeDirection) { + handleQuickReview(swipeDirection === 'left') + } else { + // 回弹 + setSwipeOffset(0) + setSwipeDirection(null) + } + + dragStartRef.current = null + isDraggingRef.current = false + }, [swipeOffset, swipeDirection, handleQuickReview]) + + // 鼠标事件处理 + const handleMouseDown = useCallback((e: React.MouseEvent) => { + handleDragStart(e.clientX, e.clientY) + }, [handleDragStart]) + + const handleMouseMove = useCallback((e: React.MouseEvent) => { + if (dragStartRef.current) { + e.preventDefault() + handleDragMove(e.clientX) + } + }, [handleDragMove]) + + const handleMouseUp = useCallback(() => { + handleDragEnd() + }, [handleDragEnd]) + + const handleMouseLeave = useCallback(() => { + if (dragStartRef.current) { + handleDragEnd() + } + }, [handleDragEnd]) + + // 触摸事件处理 + const handleTouchStart = useCallback((e: React.TouchEvent) => { + const touch = e.touches[0] + handleDragStart(touch.clientX, touch.clientY) + }, [handleDragStart]) + + const handleTouchMove = useCallback((e: React.TouchEvent) => { + const touch = e.touches[0] + handleDragMove(touch.clientX) + }, [handleDragMove]) + + const handleTouchEnd = useCallback(() => { + handleDragEnd() + }, [handleDragEnd]) + + // 键盘事件处理 + useEffect(() => { + if (!open || reviewMode !== 'quick') return + + const handleKeyDown = (e: KeyboardEvent) => { + // 只处理方向键 + if (!['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(e.key)) return + + // 阻止事件继续传播,避免被 Tabs 组件捕获 + e.preventDefault() + e.stopPropagation() + e.stopImmediatePropagation() + + if (isAnimating || quickLoading) return + + const currentExpr = quickExpressions[quickCurrentIndex] + const directions = getAllowedDirections(currentExpr) + + if (e.key === 'ArrowLeft') { + if (directions.left) { + handleQuickReview(true) // 拒绝 + } else { + triggerInvalidAnimation('left') + } + } else if (e.key === 'ArrowRight') { + if (directions.right) { + handleQuickReview(false) // 通过 + } else { + triggerInvalidAnimation('right') + } + } else if (e.key === 'ArrowDown') { + // 跳过当前项 + if (quickCurrentIndex < quickExpressions.length - 1) { + setQuickCurrentIndex(prev => prev + 1) + } + } else if (e.key === 'ArrowUp') { + // 返回上一项 + if (quickCurrentIndex > 0) { + setQuickCurrentIndex(prev => prev - 1) + } + } + } + + // 使用 capture 模式,在事件到达 Tabs 之前拦截 + window.addEventListener('keydown', handleKeyDown, true) + return () => window.removeEventListener('keydown', handleKeyDown, true) + }, [open, reviewMode, quickExpressions, quickCurrentIndex, isAnimating, quickLoading, getAllowedDirections, handleQuickReview, triggerInvalidAnimation]) + + // 动态加载更多数据 - 当接近列表末尾时自动加载 + useEffect(() => { + if (!open || reviewMode !== 'quick' || quickLoading) return + + // 距离末尾还有5个或更少时,且还有更多数据时,自动加载 + const remaining = quickExpressions.length - quickCurrentIndex - 1 + const hasMoreData = quickExpressions.length < quickTotal + + if (remaining <= 5 && hasMoreData) { + loadQuickList(false, true) // 追加模式 + } + }, [open, reviewMode, quickCurrentIndex, quickExpressions.length, quickTotal, quickLoading, loadQuickList]) + + // 初始加载 + useEffect(() => { + if (open) { + loadStats() + loadList() + loadChatNames() + } + }, [open, loadStats, loadList, loadChatNames]) + + // 切换筛选时重置页码 + useEffect(() => { + setPage(1) + setSelectedIds(new Set()) + }, [filterType, search]) + + // 列表加载时清空选择 + useEffect(() => { + setSelectedIds(new Set()) + }, [expressions]) + + // 搜索处理 + const handleSearch = () => { + setSearch(searchInput) + setPage(1) + } + + // 获取聊天名称 + const getChatName = (chatId: string): string => { + return chatNameMap.get(chatId) || chatId + } + + // 单条审核 + const handleReview = async (id: number, rejected: boolean) => { + try { + setProcessingIds((prev) => new Set(prev).add(id)) + + const response = await batchReviewExpressions([ + { id, rejected, require_unchecked: filterType === 'unchecked' } + ]) + + if (response.results[0]?.success) { + toast({ + title: rejected ? '已拒绝' : '已通过', + description: `表达方式 #${id} ${rejected ? '已拒绝' : '已通过'}`, + }) + // 刷新列表和统计 + loadList() + loadStats() + } else { + toast({ + title: '操作失败', + description: response.results[0]?.message || '未知错误', + variant: 'destructive', + }) + } + } catch (error) { + toast({ + title: '操作失败', + description: error instanceof Error ? error.message : '未知错误', + variant: 'destructive', + }) + } finally { + setProcessingIds((prev) => { + const next = new Set(prev) + next.delete(id) + return next + }) + } + } + + // 批量审核 + const handleBatchReview = async (rejected: boolean) => { + if (selectedIds.size === 0) { + toast({ + title: '请选择', + description: '请先选择要审核的表达方式', + variant: 'destructive', + }) + return + } + + try { + setLoading(true) + + const items: BatchReviewItem[] = Array.from(selectedIds).map((id) => ({ + id, + rejected, + require_unchecked: filterType === 'unchecked', + })) + + const response = await batchReviewExpressions(items) + + toast({ + title: '批量审核完成', + description: `成功 ${response.succeeded} 条,失败 ${response.failed} 条`, + variant: response.failed > 0 ? 'destructive' : 'default', + }) + + // 清空选择并刷新 + setSelectedIds(new Set()) + loadList() + loadStats() + } catch (error) { + toast({ + title: '批量审核失败', + description: error instanceof Error ? error.message : '未知错误', + variant: 'destructive', + }) + } finally { + setLoading(false) + } + } + + // 全选/取消全选 + const handleSelectAll = () => { + if (selectedIds.size === expressions.length) { + setSelectedIds(new Set()) + } else { + setSelectedIds(new Set(expressions.map((e) => e.id))) + } + } + + // 切换选择 + const toggleSelect = (id: number) => { + setSelectedIds((prev) => { + const next = new Set(prev) + if (next.has(id)) { + next.delete(id) + } else { + next.add(id) + } + return next + }) + } + + // 格式化时间 + const formatTime = (timestamp: number | null) => { + if (!timestamp) return '-' + return new Date(timestamp * 1000).toLocaleString('zh-CN', { + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + }) + } + + // 获取状态标签 + const getStatusBadge = (expr: Expression) => { + if (!expr.checked) { + return ( + + + 待审核 + + ) + } + if (expr.rejected) { + return ( + + + 已拒绝 + + ) + } + return ( + + + 已通过 + + ) + } + + // 获取修改者标签 + const getModifierBadge = (modifier: string | null) => { + if (!modifier) return null + if (modifier === 'ai') { + return ( + + + AI + + ) + } + return ( + + + 人工 + + ) + } + + const totalPages = Math.ceil(total / pageSize) + + // 生成页码数组 + const getPageNumbers = () => { + const pages: (number | 'ellipsis')[] = [] + if (totalPages <= 7) { + // 总页数不多,全部显示 + for (let i = 1; i <= totalPages; i++) { + pages.push(i) + } + } else { + // 总是显示第一页 + pages.push(1) + + if (page > 3) { + pages.push('ellipsis') + } + + // 当前页附近的页码 + const start = Math.max(2, page - 1) + const end = Math.min(totalPages - 1, page + 1) + + for (let i = start; i <= end; i++) { + pages.push(i) + } + + if (page < totalPages - 2) { + pages.push('ellipsis') + } + + // 总是显示最后一页 + if (totalPages > 1) { + pages.push(totalPages) + } + } + return pages + } + + // 处理页码跳转 + const handleJumpPage = () => { + const targetPage = parseInt(jumpPage, 10) + if (!isNaN(targetPage) && targetPage >= 1 && targetPage <= totalPages) { + setPage(targetPage) + setJumpPage('') + } + } + + return ( + + + {/* 浏览器标签页风格的模式切换器 */} +
+ {/* 列表模式标签 */} + + + {/* 快速审核标签 */} + + + {/* 右侧空白区域和关闭按钮 */} +
+ +
+ + {/* 列表模式内容 */} + {reviewMode === 'list' && ( + <> + + 表达方式审核 + + 审核麦麦学习到的表达方式。通过审核的项目才会被使用(可在配置中调整),被拒绝的项目永远不会被使用。 + + + {/* 统计卡片 */} +
+
+
+ {statsLoading ? '-' : stats?.unchecked ?? 0} +
+
待审核
+
+
+
+ {statsLoading ? '-' : stats?.passed ?? 0} +
+
已通过
+
+
+
+ {statsLoading ? '-' : stats?.rejected ?? 0} +
+
已拒绝
+
+
+
+ {statsLoading ? '-' : stats?.total ?? 0} +
+
总计
+
+
+
+ + {/* 筛选和操作栏 */} +
+ setFilterType(v as typeof filterType)} + className="w-full" + > + + + + 待审核 + 待审 + ({stats?.unchecked ?? 0}) + + + + 已通过 + 通过 + ({stats?.passed ?? 0}) + + + + 已拒绝 + 拒绝 + ({stats?.rejected ?? 0}) + + + 全部 + ({stats?.total ?? 0}) + + + + +
+
+ + setSearchInput(e.target.value)} + onKeyDown={(e) => e.key === 'Enter' && handleSearch()} + className="pl-9" + /> +
+
+ + +
+ + {/* 批量操作按钮 */} + {selectedIds.size > 0 && ( +
+ {filterType === 'unchecked' ? ( + // 待审核:显示批量通过和批量拒绝 + <> + + + + ) : filterType === 'passed' ? ( + // 已通过:只显示批量改为拒绝 + + ) : filterType === 'rejected' ? ( + // 已拒绝:只显示批量改为通过 + + ) : ( + // 全部:显示两个按钮 + <> + + + + )} +
+ )} +
+
+ + {/* 列表区域 */} + + {loading && expressions.length === 0 ? ( +
+ +
+ ) : expressions.length === 0 ? ( +
+ +

没有找到表达方式

+
+ ) : ( +
+ {/* 全选 */} + {expressions.length > 0 && ( +
+
+ 0} + onCheckedChange={handleSelectAll} + /> + + {selectedIds.size === expressions.length && expressions.length > 0 + ? `已全选当前页 (${expressions.length} 条)` + : `全选当前页 (${expressions.length} 条)`} + +
+ {selectedIds.size > 0 && ( + + )} +
+ )} + + {/* 表达方式列表 */} + {expressions.map((expr) => ( +
+
+ {/* 选择框 */} + toggleSelect(expr.id)} + disabled={processingIds.has(expr.id)} + className="mt-1" + /> + + {/* 内容 */} +
+ {/* 情景 */} +
+ 情景: +

{expr.situation}

+
+ + {/* 风格 */} +
+ 风格: +

{expr.style}

+
+ + {/* 元信息 */} +
+ #{expr.id} + · + + {getChatName(expr.chat_id)} + + · + {formatTime(expr.create_date)} +
+ {getStatusBadge(expr)} + {getModifierBadge(expr.modified_by)} +
+
+
+ + {/* 操作按钮 */} +
+ {filterType === 'unchecked' ? ( + <> + + + + ) : filterType === 'passed' ? ( + + ) : filterType === 'rejected' ? ( + + ) : ( + // all 模式下显示两个按钮 + <> + {expr.rejected ? ( + + ) : expr.checked ? ( + + ) : ( + <> + + + + )} + + )} +
+
+
+ ))} +
+ )} +
+ + {/* 分页 */} +
+ {/* 左侧:每页显示数量 */} +
+ 每页 + + + 共 {total} 条 +
+ + {/* 中间:页码导航 */} + + + + + + + {getPageNumbers().map((pageNum, idx) => ( + + {pageNum === 'ellipsis' ? ( + + ) : ( + { + e.preventDefault() + setPage(pageNum) + }} + className="h-8 w-8 cursor-pointer" + > + {pageNum} + + )} + + ))} + + + + + + + + {/* 右侧:跳转 */} +
+ 跳至 + setJumpPage(e.target.value)} + onKeyDown={(e) => e.key === 'Enter' && handleJumpPage()} + className="w-16 h-8 text-center" + placeholder={page.toString()} + /> + + +
+
+ + )} + + {/* 快速审核模式内容 */} + {reviewMode === 'quick' && ( +
+ {/* 顶部筛选和统计 */} +
+ {/* 统计信息 */} +
+
+ + 待审核: {stats?.unchecked ?? 0} + + + 已通过: {stats?.passed ?? 0} + + + 已拒绝: {stats?.rejected ?? 0} + +
+ +
+ + {/* 筛选标签 */} + setQuickFilterType(v as typeof quickFilterType)} + className="w-full" + > + + + + 待审核 + 待审 + + + + 已通过 + 通过 + + + + 已拒绝 + 拒绝 + + + 全部 + + + +
+ + {/* 卡片区域 */} +
+ {quickLoading && quickExpressions.length === 0 ? ( +
+ +

加载中...

+
+ ) : quickExpressions.length === 0 ? ( +
+
+ +
+

全部审核完成!

+

当前筛选条件下没有待处理的项目

+
+ ) : ( + <> + {/* 进度提示 */} +
+ {quickCurrentIndex + 1} / {quickExpressions.length} + {quickTotal > quickExpressions.length && ( + (共 {quickTotal} 条) + )} +
+ + {/* 方向提示 (仅针对当前卡片) */} +
+ {(() => { + const currentExpr = quickExpressions[quickCurrentIndex] + const directions = getAllowedDirections(currentExpr) + return ( + <> +
+ + 拒绝 +
+
+ 通过 + +
+ + ) + })()} +
+ + {/* 堆叠卡片 */} +
+ {quickExpressions + .slice(quickCurrentIndex, quickCurrentIndex + 5) + .reverse() + .map((expr, reverseIndex, array) => { + const index = array.length - 1 - reverseIndex // 0 is current, 1 is next... + const isCurrent = index === 0 + + // 计算样式 + let style: React.CSSProperties = { + zIndex: 5 - index, + position: 'absolute', + width: '100%', + transition: isCurrent && !isDraggingRef.current ? 'all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)' : 'none', + } + + if (isCurrent) { + // 当前卡片样式 + style = { + ...style, + transform: `translateX(${swipeOffset}px) rotate(${swipeOffset * 0.05}deg)`, + opacity: Math.max(0, 1 - Math.abs(swipeOffset) / 500), + cursor: 'grab', + } + } else { + // 后方卡片样式 + const progress = Math.min(Math.abs(swipeOffset) / 200, 1) // 0 to 1 + + // 计算指定索引的样式属性 + const getStyleForIndex = (i: number) => { + // 增加一些伪随机的错位感,让堆叠看起来不那么死板 + const randomRotate = (i * 7) % 5 + const randomX = (i * 13) % 7 + + return { + scale: 1 - i * 0.05, + translateY: i * 12, + // 错位效果:奇偶交替旋转 + 伪随机偏移 + rotate: (i % 2 === 0 ? 1 : -1) * (i * 2) + randomRotate, + translateX: (i % 2 === 0 ? -1 : 1) * (i * 4) + randomX, + } + } + + const base = getStyleForIndex(index) + const target = getStyleForIndex(index - 1) + + // 插值计算:所有后方卡片都会跟随第一张卡片的滑动而向前移动 + const currentScale = base.scale + (target.scale - base.scale) * progress + const currentTranslateY = base.translateY + (target.translateY - base.translateY) * progress + const currentRotate = base.rotate + (target.rotate - base.rotate) * progress + const currentTranslateX = base.translateX + (target.translateX - base.translateX) * progress + + style = { + ...style, + transform: `translate3d(${currentTranslateX}px, ${currentTranslateY}px, 0) scale(${currentScale}) rotate(${currentRotate}deg)`, + opacity: 1 - index * 0.15, + filter: `blur(${Math.max(0, index * 1 - progress)}px)`, // 模糊度也随之减小 + pointerEvents: 'none', + } + } + + return ( +
+ {/* 冲突提示遮罩 */} + {isCurrent && conflictId === expr.id && ( +
+
+
+ +
+

数据已更新

+

后台任务已处理此条目

+
+ )} + + {/* 无效操作提示 */} + {isCurrent && ( +
10 && !getAllowedDirections(expr).right)) + ? "opacity-100" + : "opacity-0" + )}> +
+ +
+
+ )} + +
+ {/* 状态和ID */} +
+ #{expr.id} +
+ {getStatusBadge(expr)} + {getModifierBadge(expr.modified_by)} +
+
+ + {/* 情景 */} +
+ +
+

{expr.situation}

+
+
+ + {/* 风格 */} +
+ +
+ {expr.style.split(/[,,]/).map((s, i) => ( + + {s.trim()} + + ))} +
+
+
+ + {/* 底部信息 */} +
+
+
+ +
+ + {getChatName(expr.chat_id)} + +
+ {formatTime(expr.create_date)} +
+
+ ) + })} +
+ + {/* 操作按钮(移动端) */} +
+ {(() => { + const currentExpr = quickExpressions[quickCurrentIndex] + const directions = getAllowedDirections(currentExpr) + return ( + <> + + + + ) + })()} +
+ + )} +
+ + {/* 底部快捷键提示(桌面端) */} +
+
+ + 拒绝 +
+
+ + 通过 +
+
+ + 上一条 +
+
+ + 下一条 +
+ | + 拖拽卡片滑动审核 +
+
+ )} + +
+ ) +} diff --git a/dashboard/src/components/http-warning-banner.tsx b/dashboard/src/components/http-warning-banner.tsx new file mode 100644 index 00000000..55735928 --- /dev/null +++ b/dashboard/src/components/http-warning-banner.tsx @@ -0,0 +1,59 @@ +import { useState } from 'react' +import { AlertTriangle, X } from 'lucide-react' +import { Button } from '@/components/ui/button' + +/** + * HTTP 警告横幅组件 + * 当用户通过 HTTP 访问时显示安全警告 + */ +export function HttpWarningBanner() { + // 直接计算初始状态,避免 effect 中调用 setState + const isHttp = window.location.protocol === 'http:' + const hostname = window.location.hostname.toLowerCase() + const isLocalhost = hostname === 'localhost' || hostname === '127.0.0.1' || hostname === '::1' + const dismissed = sessionStorage.getItem('http-warning-dismissed') === 'true' + + // 本地访问(localhost/127.0.0.1)不显示警告 + const [isVisible, setIsVisible] = useState(isHttp && !isLocalhost && !dismissed) + const [isDismissed, setIsDismissed] = useState(false) + + const handleDismiss = () => { + setIsDismissed(true) + setIsVisible(false) + sessionStorage.setItem('http-warning-dismissed', 'true') + } + + if (!isVisible || isDismissed) { + return null + } + + return ( +
+
+
+
+ +
+

+ 安全警告: + 您正在使用 HTTP 访问 MaiBot WebUI +

+

+ 如果这是公网服务器,您的数据(包括 Token、聊天记录等)可能在传输过程中被窃取。强烈建议使用 HTTPS 访问或仅在本地网络使用。 +

+
+
+ +
+
+
+ ) +} diff --git a/dashboard/src/components/index.ts b/dashboard/src/components/index.ts new file mode 100644 index 00000000..cc623fba --- /dev/null +++ b/dashboard/src/components/index.ts @@ -0,0 +1,13 @@ +export { CodeEditor } from './CodeEditor' +export type { Language } from './CodeEditor' + +// 重启遮罩层 +export { RestartOverlay } from './restart-overlay' +// 兼容旧版本 +export { RestartingOverlay } from './RestartingOverlay.legacy' + +// 列表编辑器 +export { ListFieldEditor } from './ListFieldEditor' + +// Markdown 渲染器 +export { MarkdownRenderer } from './markdown-renderer' diff --git a/dashboard/src/components/layout.tsx b/dashboard/src/components/layout.tsx new file mode 100644 index 00000000..4a675b9f --- /dev/null +++ b/dashboard/src/components/layout.tsx @@ -0,0 +1,409 @@ +import { Menu, Moon, Sun, ChevronLeft, Home, Settings, LogOut, FileText, Server, Boxes, Smile, MessageSquare, UserCircle, FileSearch, Package, BookOpen, Search, Sliders, Network, Hash, LayoutGrid, Database, Activity, PieChart } from 'lucide-react' +import { useState, useEffect } from 'react' +import { Link, useMatchRoute } from '@tanstack/react-router' +import { useTheme, toggleThemeWithTransition } from './use-theme' +import { useAuthGuard } from '@/hooks/use-auth' +import { logout } from '@/lib/fetch-with-auth' +import { Button } from '@/components/ui/button' +import { Kbd } from '@/components/ui/kbd' +import { SearchDialog } from '@/components/search-dialog' +import { ScrollArea } from '@/components/ui/scroll-area' +import { HttpWarningBanner } from '@/components/http-warning-banner' +import { BackToTop } from '@/components/back-to-top' +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from '@/components/ui/tooltip' +import { cn } from '@/lib/utils' +import { formatVersion } from '@/lib/version' +import type { ReactNode, ComponentType } from 'react' +import type { LucideProps } from 'lucide-react' + +interface LayoutProps { + children: ReactNode +} + +interface MenuItem { + icon: ComponentType + label: string + path: string + tourId?: string +} + +interface MenuSection { + title: string + items: MenuItem[] +} + +export function Layout({ children }: LayoutProps) { + const { checking } = useAuthGuard() // 检查认证状态 + + const [sidebarOpen, setSidebarOpen] = useState(true) + const [mobileMenuOpen, setMobileMenuOpen] = useState(false) + const [searchOpen, setSearchOpen] = useState(false) + const [tooltipsEnabled, setTooltipsEnabled] = useState(false) // 控制 tooltip 启用状态 + const { theme, setTheme } = useTheme() + const matchRoute = useMatchRoute() + + // 侧边栏状态变化时,延迟启用/禁用 tooltip + useEffect(() => { + if (sidebarOpen) { + // 侧边栏展开时,立即禁用 tooltip + setTooltipsEnabled(false) + } else { + // 侧边栏收起时,等待动画完成后再启用 tooltip + const timer = setTimeout(() => { + setTooltipsEnabled(true) + }, 350) // 稍大于 CSS transition duration (300ms) + return () => clearTimeout(timer) + } + }, [sidebarOpen]) + + // 搜索快捷键监听(Cmd/Ctrl + K) + useEffect(() => { + const handleKeyDown = (e: KeyboardEvent) => { + if ((e.metaKey || e.ctrlKey) && e.key === 'k') { + e.preventDefault() + setSearchOpen(true) + } + } + + window.addEventListener('keydown', handleKeyDown) + return () => window.removeEventListener('keydown', handleKeyDown) + }, []) + + // 认证检查中,显示加载状态 + if (checking) { + return ( +
+
正在验证登录状态...
+
+ ) + } + + // 菜单项配置 - 分块结构 + const menuSections: MenuSection[] = [ + { + title: '概览', + items: [ + { icon: Home, label: '首页', path: '/' }, + ], + }, + { + title: '麦麦配置编辑', + items: [ + { icon: FileText, label: '麦麦主程序配置', path: '/config/bot' }, + { icon: Server, label: 'AI模型厂商配置', path: '/config/modelProvider', tourId: 'sidebar-model-provider' }, + { icon: Boxes, label: '模型管理与分配', path: '/config/model', tourId: 'sidebar-model-management' }, + { icon: Sliders, label: '麦麦适配器配置', path: '/config/adapter' }, + ], + }, + { + title: '麦麦资源管理', + items: [ + { icon: Smile, label: '表情包管理', path: '/resource/emoji' }, + { icon: MessageSquare, label: '表达方式管理', path: '/resource/expression' }, + { icon: Hash, label: '黑话管理', path: '/resource/jargon' }, + { icon: UserCircle, label: '人物信息管理', path: '/resource/person' }, + { icon: Network, label: '知识库图谱可视化', path: '/resource/knowledge-graph' }, + { icon: Database, label: '麦麦知识库管理', path: '/resource/knowledge-base' }, + ], + }, + { + title: '扩展与监控', + items: [ + { icon: Package, label: '插件市场', path: '/plugins' }, + { icon: LayoutGrid, label: '配置模板市场', path: '/config/pack-market' }, + { icon: Sliders, label: '插件配置', path: '/plugin-config' }, + { icon: FileSearch, label: '日志查看器', path: '/logs' }, + { icon: Activity, label: '计划器&回复器监控', path: '/planner-monitor' }, + { icon: MessageSquare, label: '本地聊天室', path: '/chat' }, + ], + }, + { + title: '系统', + items: [ + { icon: Settings, label: '系统设置', path: '/settings' }, + ], + }, + ] + + // 获取实际应用的主题(处理 system 情况) + const getActualTheme = () => { + if (theme === 'system') { + return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' + } + return theme + } + + const actualTheme = getActualTheme() + + // 登出处理 + const handleLogout = async () => { + await logout() + } + + return ( + +
+ {/* Sidebar */} + + + {/* Mobile overlay */} + {mobileMenuOpen && ( +
setMobileMenuOpen(false)} + /> + )} + + {/* Main content */} +
+ {/* HTTP 安全警告横幅 */} + + + {/* Topbar */} +
+
+ {/* 移动端菜单按钮 */} + + + {/* 桌面端侧边栏收起/展开按钮 */} + +
+ +
+ {/* 年度总结入口 */} + + + + + {/* 搜索框 */} + + + {/* 搜索对话框 */} + + + {/* 麦麦文档链接 */} + + + {/* 主题切换按钮 */} + + + {/* 分隔线 */} +
+ + {/* 登出按钮 */} + +
+
+ + {/* Page content */} +
{children}
+ + {/* Back to Top Button */} + +
+
+ + ) +} diff --git a/dashboard/src/components/markdown-renderer.tsx b/dashboard/src/components/markdown-renderer.tsx new file mode 100644 index 00000000..429ea41f --- /dev/null +++ b/dashboard/src/components/markdown-renderer.tsx @@ -0,0 +1,134 @@ +import ReactMarkdown from 'react-markdown' +import remarkGfm from 'remark-gfm' +import remarkMath from 'remark-math' +import rehypeKatex from 'rehype-katex' +import 'katex/dist/katex.min.css' +import type { ComponentPropsWithoutRef } from 'react' + +interface MarkdownRendererProps { + content: string + className?: string +} + +export function MarkdownRenderer({ content, className = '' }: MarkdownRendererProps) { + return ( +
+ & { inline?: boolean }) { + return inline ? ( + + {children} + + ) : ( + + {children} + + ) + }, + // 自定义表格样式 + table({ children, ...props }) { + return ( +
+ + {children} +
+
+ ) + }, + th({ children, ...props }) { + return ( + + {children} + + ) + }, + td({ children, ...props }) { + return ( + + {children} + + ) + }, + // 自定义链接样式 + a({ children, ...props }) { + return ( +
+ {children} + + ) + }, + // 自定义引用块样式 + blockquote({ children, ...props }) { + return ( +
+ {children} +
+ ) + }, + // 自定义标题样式 + h1({ children, ...props }) { + return ( +

+ {children} +

+ ) + }, + h2({ children, ...props }) { + return ( +

+ {children} +

+ ) + }, + h3({ children, ...props }) { + return ( +

+ {children} +

+ ) + }, + h4({ children, ...props }) { + return ( +

+ {children} +

+ ) + }, + // 自定义列表样式 + ul({ children, ...props }) { + return ( +
    + {children} +
+ ) + }, + ol({ children, ...props }) { + return ( +
    + {children} +
+ ) + }, + // 自定义段落样式 + p({ children, ...props }) { + return ( +

+ {children} +

+ ) + }, + // 自定义分隔线样式 + hr({ ...props }) { + return
+ }, + }} + > + {content} + +
+ ) +} diff --git a/dashboard/src/components/plugin-stats.tsx b/dashboard/src/components/plugin-stats.tsx new file mode 100644 index 00000000..63bee1b8 --- /dev/null +++ b/dashboard/src/components/plugin-stats.tsx @@ -0,0 +1,302 @@ +/** + * 插件统计组件 + * 显示点赞、点踩、评分和下载量 + */ + +import { useState, useEffect } from 'react' +import { ThumbsUp, ThumbsDown, Star, Download } from 'lucide-react' +import { Button } from '@/components/ui/button' +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from '@/components/ui/dialog' +import { Textarea } from '@/components/ui/textarea' +import { useToast } from '@/hooks/use-toast' +import { + getPluginStats, + likePlugin, + dislikePlugin, + ratePlugin, + type PluginStatsData, +} from '@/lib/plugin-stats' + +interface PluginStatsProps { + pluginId: string + compact?: boolean // 紧凑模式(只显示数字) +} + +export function PluginStats({ pluginId, compact = false }: PluginStatsProps) { + const [stats, setStats] = useState(null) + const [loading, setLoading] = useState(true) + const [userRating, setUserRating] = useState(0) + const [userComment, setUserComment] = useState('') + const [isRatingDialogOpen, setIsRatingDialogOpen] = useState(false) + const { toast } = useToast() + + // 加载统计数据 + const loadStats = async () => { + setLoading(true) + const data = await getPluginStats(pluginId) + if (data) { + setStats(data) + } + setLoading(false) + } + + useEffect(() => { + loadStats() + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [pluginId]) + + // 处理点赞 + const handleLike = async () => { + const result = await likePlugin(pluginId) + + if (result.success) { + toast({ title: '已点赞', description: '感谢你的支持!' }) + loadStats() // 重新加载统计数据 + } else { + toast({ + title: '点赞失败', + description: result.error || '未知错误', + variant: 'destructive', + }) + } + } + + // 处理点踩 + const handleDislike = async () => { + const result = await dislikePlugin(pluginId) + + if (result.success) { + toast({ title: '已反馈', description: '感谢你的反馈!' }) + loadStats() + } else { + toast({ + title: '操作失败', + description: result.error || '未知错误', + variant: 'destructive', + }) + } + } + + // 提交评分 + const handleSubmitRating = async () => { + if (userRating === 0) { + toast({ + title: '请选择评分', + description: '至少选择 1 颗星', + variant: 'destructive', + }) + return + } + + const result = await ratePlugin(pluginId, userRating, userComment || undefined) + + if (result.success) { + toast({ title: '评分成功', description: '感谢你的评价!' }) + setIsRatingDialogOpen(false) + setUserRating(0) + setUserComment('') + loadStats() + } else { + toast({ + title: '评分失败', + description: result.error || '未知错误', + variant: 'destructive', + }) + } + } + + if (loading) { + return ( +
+
+ + - +
+
+ + - +
+
+ ) + } + + if (!stats) { + return null + } + + // 紧凑模式 + if (compact) { + return ( +
+
+ + {stats.downloads.toLocaleString()} +
+
+ + {stats.rating.toFixed(1)} +
+
+ + {stats.likes} +
+
+ ) + } + + // 完整模式 + return ( +
+ {/* 统计数字 */} +
+
+ + {stats.downloads.toLocaleString()} + 下载量 +
+ +
+ + {stats.rating.toFixed(1)} + {stats.rating_count} 条评价 +
+ +
+ + {stats.likes} + 点赞 +
+ +
+ + {stats.dislikes} + 点踩 +
+
+ + {/* 操作按钮 */} +
+ + + + + + + + + + + 为插件评分 + 分享你的使用体验,帮助其他用户 + + +
+ {/* 星级评分 */} +
+
+ {[1, 2, 3, 4, 5].map((star) => ( + + ))} +
+ + {userRating === 0 && '点击星星进行评分'} + {userRating === 1 && '很差'} + {userRating === 2 && '一般'} + {userRating === 3 && '还行'} + {userRating === 4 && '不错'} + {userRating === 5 && '非常好'} + +
+ + {/* 评论 */} +
+ +