Files
CloudSearch/source_clean/frontend/assets/SystemConfig-C3is0eeI.js

17 lines
44 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{d as Tl,o as Il,E as u,x as Ol,a as p,c as y,K as q,L as M,f as a,w as i,b as l,v as D,h as g,i as Z,j as V,l as r,k as Re,N as jl,e as W,t as b,n as $e,y as k,M as Al,F as O,r as j,z as Bl,u as El}from"./index-D279dJND.js";import{k as Ll,w as Rl,x as $l,p as Nl,y as Fl,z as Gl,A as ee,B as Wl,C as Kl,D as ql,_ as Ml}from"./_plugin-vue_export-helper-1Z-znrfZ.js";const Dl={class:"system-config"},Jl={class:"fallback-upload-wrap"},Hl={class:"fallback-upload-row"},Yl={key:0,class:"fallback-preview"},Ql=["src"],Xl={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},Zl={key:0,style:{"font-size":"11px",color:"#e6a23c","white-space":"nowrap"}},et={class:"pansou-status-grid"},lt={class:"db-stat-item"},tt={class:"db-stat-item"},st={class:"db-stat-value"},at={class:"db-stat-item"},ot={class:"db-stat-value"},nt={class:"db-stat-item"},it={class:"db-stat-value"},dt={class:"db-stat-item"},rt={class:"db-stat-value"},ut={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},pt={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},ft={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},ct={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},vt={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},mt={key:0,style:{"text-align":"center",padding:"16px"}},yt={key:1,class:"db-status-grid"},_t={class:"db-stat-item"},gt={class:"db-stat-item"},bt={class:"db-stat-value"},wt={class:"db-stat-item"},xt={class:"db-stat-value"},kt={class:"db-stat-item"},Vt={class:"db-stat-value"},ht={class:"db-stat-item"},Ct={class:"db-stat-value"},Pt={class:"db-stat-item"},St={class:"db-stat-value"},Ut={class:"strategy-section"},zt={class:"field-block"},Tt={class:"field-label-row"},It={class:"field-block"},Ot={class:"field-label-row"},jt={class:"strategy-grid"},At={class:"grid-cell"},Bt={class:"field-label-row"},Et={class:"grid-cell"},Lt={class:"field-label-row"},Rt={class:"grid-cell"},$t={class:"field-label-row"},Nt={class:"grid-cell"},Ft={class:"field-label-row"},Gt={class:"grid-cell"},Wt={class:"field-label-row"},Kt={class:"grid-cell"},qt={class:"field-label-row"},Mt={class:"field-block"},Dt={style:{display:"flex",gap:"8px","align-items":"stretch"}},Jt={key:0,class:"tag-list"},Ht={key:1,class:"tag-empty"},Yt={class:"field-block"},Qt={style:{display:"flex",gap:"8px","align-items":"stretch"}},Xt={key:0,class:"tag-list"},Zt={key:1,class:"tag-empty"},es={class:"field-block"},ls={style:{display:"flex",gap:"8px","align-items":"stretch"}},ts={key:0,class:"tag-list"},ss={key:1,class:"tag-empty"},as={class:"field-block"},os={style:{display:"flex",gap:"8px","align-items":"stretch"}},ns={key:0,class:"tag-list"},is={key:1,class:"tag-empty"},ds={class:"field-block"},rs={style:{display:"flex",gap:"8px","align-items":"stretch"}},us={key:0,class:"tag-list"},ps={key:1,class:"tag-empty"},fs={class:"strategy-section"},cs={style:{display:"grid","grid-template-columns":"repeat(2,1fr)",gap:"8px"}},vs={style:{display:"flex","align-items":"center",gap:"8px","margin-bottom":"6px"}},ms={key:0},ys={style:{display:"flex","flex-wrap":"wrap",gap:"16px"}},_s={style:{border:"1px solid var(--el-border-color-light)","border-radius":"6px",padding:"12px 16px","margin-bottom":"16px"}},gs={style:{display:"flex","align-items":"center",gap:"12px","flex-wrap":"wrap"}},bs={key:1,style:{color:"#ccc"}},ws={key:1,style:{color:"#ccc"}},xs={key:1,style:{color:"#ccc"}},ks={key:1,style:{color:"#ccc"}},Vs={key:0,style:{color:"#909399","font-size":"12px"}},hs={class:"save-bar"},Cs=Tl({__name:"SystemConfig",props:{section:{}},setup(Ne){const Fe=Ne,Ge=Bl();El();const U=D(()=>Fe.section||Ge.query.section||""),_e=g(),ue=g([]),d=Z({}),E=g([]),J=g(""),L=g([]),H=g(""),R=g([]),Y=g(""),$=g([]),Q=g(""),X=g(""),N=g([]),pe=g(!1),fe=g(!1),A=Z({db_size:"-",save_records:0,search_stats:0,cloud_configs:0,content_cache:0,redis_status:"未连接"}),ge=g(!0),le=g(!1),te=g(!1),se=g(!1),ae=g(!1),oe=g(!1),ne=g(!1),P=g(null),be=g(!0),ie=g(!1),ce=D({get:()=>String(d.search_proxy_enabled)==="true",set:t=>{d.search_proxy_enabled=t?"true":"false"}}),we=D({get:()=>String(d.pansou_web_enabled)==="true",set:t=>{d.pansou_web_enabled=t?"true":"false"}}),xe=D({get:()=>String(d.search_all_channels)==="true",set:t=>{d.search_all_channels=t?"true":"false"}}),ke=D({get:()=>String(d.auto_update_enabled)==="true",set:t=>{d.auto_update_enabled=t?"true":"false"}}),Ve=g([]),F=g({}),ve=g(!1),he=g([]);async function We(){try{const t=await fetch("/api/admin/cloud-configs",{headers:{Authorization:"Bearer "+(localStorage.getItem("admin_token")||"")}});if(!t.ok)return;const e=await t.json(),s=Array.isArray(e)?[...new Set(e.map(o=>o.promotion_account||"").filter(Boolean))]:[];he.value=s}catch{}}const v=Z({id:null,account:"",channels:[],events:{on_save_success:!0,on_save_fail:!0,on_cookie_expire:!0,on_cleanup:!1}}),Ke=D(()=>{var e;const t={};for(const[s,o]of Object.entries(F.value))(e=m.channels[s])!=null&&e._enabled&&(t[s]=o);return t}),m=Z({channels:{},events:{on_save_success:!0,on_save_fail:!0,on_cookie_expire:!0,on_cleanup:!1}});function qe(t){var e,s,o,w;if(t){v.id=t.id,v.account=t.account;const f=t.notify_config||{};v.channels=Object.keys(f.channels||{}),v.events={on_save_success:((e=f.events)==null?void 0:e.on_save_success)!==!1,on_save_fail:((s=f.events)==null?void 0:s.on_save_fail)!==!1,on_cookie_expire:((o=f.events)==null?void 0:o.on_cookie_expire)!==!1,on_cleanup:((w=f.events)==null?void 0:w.on_cleanup)===!0}}else v.id=null,v.account="",v.channels=[],v.events={on_save_success:!0,on_save_fail:!0,on_cookie_expire:!0,on_cleanup:!1}}function Me(){v.id=null,v.account="",v.channels=[],v.events={on_save_success:!0,on_save_fail:!0,on_cookie_expire:!0,on_cleanup:!1}}function de(t,e){return((t.notify_config||{}).events||{})[e]===!0}async function De(){if(!v.account){u.warning("请填写推广账号");return}ve.value=!0;try{const t={account:v.account,notify_config:{channels:{},events:v.events}},e={};for(const o of v.channels)e[o]={};t.notify_config.channels=e,v.id?await fetch("/api/admin/push-users/"+v.id,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:"Bearer "+(localStorage.getItem("admin_token")||"")},body:JSON.stringify(t)}):await fetch("/api/admin/push-users",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+(localStorage.getItem("admin_token")||"")},body:JSON.stringify(t)});const s=!!v.id;v.id=null,v.account="",v.channels=[],v.events={on_save_success:!0,on_save_fail:!0,on_cookie_expire:!0,on_cleanup:!1},u.success(s?"推送用户已更新":"推送用户已添加"),await me()}catch(t){u.error(t.message||"保存失败")}finally{ve.value=!1}}async function me(){try{const t=await fetch("/api/admin/push-users",{headers:{Authorization:"Bearer "+(localStorage.getItem("admin_token")||"")}});t.ok&&(Ve.value=await t.json())}catch(t){console.error("Failed to load push users",t)}}async function Je(){try{F.value=await $l()}catch(t){console.error("Failed to load providers",t)}}async function He(t){try{await fetch("/api/admin/push-users/"+t.id,{method:"DELETE",headers:{Authorization:"Bearer "+(localStorage.getItem("admin_token")||"")}}),u.success("已删除"),await me()}catch(e){u.error(e.message||"删除失败")}}function Ce(t){var s;return((s=t.notify_config)==null?void 0:s.channels)||{}}function Ye(t){var e;return((e=F.value[t])==null?void 0:e.label)||t}function Qe(t){return Object.keys(Ce(t)).length>0}function Xe(){const t={};for(const[e,s]of Object.entries(F.value)){t[e]={_enabled:!1,_testing:!1};for(const o of s.params||[])t[e][o.key]=o.default||""}m.channels=t,m.events={on_save_success:!0,on_save_fail:!0,on_cookie_expire:!0,on_cleanup:!1}}async function Ze(){try{const s=(await(await fetch("/api/admin/system-configs",{headers:{Authorization:"Bearer "+(localStorage.getItem("admin_token")||"")}})).json()).find(o=>o.key==="global_notify_config");if(s&&s.value)try{const o=JSON.parse(s.value),w=o.channels||{};for(const[f,h]of Object.entries(w))if(m.channels[f]){m.channels[f]._enabled=!0;for(const[z,x]of Object.entries(h))m.channels[f][z]=x}o.events&&(m.events.on_save_success=o.events.on_save_success!==!1,m.events.on_save_fail=o.events.on_save_fail!==!1,m.events.on_cookie_expire=o.events.on_cookie_expire!==!1,m.events.on_cleanup=o.events.on_cleanup===!0)}catch{}}catch{}}async function el(t){const e=m.channels[t];if(!(!e||!e._enabled)){e._testing=!0;try{const s=await Fl(t);s.success?u.success(s.message):u.error(s.message)}catch(s){u.error(s.message||"测试失败")}finally{e._testing=!1}}}const S=Z({oldPassword:"",newPassword:"",confirmPassword:""}),ll={oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"},{min:6,message:"新密码至少需要6个字符",trigger:"blur"}],confirmPassword:[{required:!0,message:"请确认新密码",trigger:"blur"},{validator:(t,e,s)=>{e!==S.newPassword?s(new Error("两次输入的密码不一致")):s()},trigger:"blur"}]};Il(async()=>{try{ue.value=await Ll();for(const f of ue.value)d[f.key]=f.value;const t=String(d.title_filter_rules||"");E.value=t.split(`
`).filter(f=>f.trim());const e=String(d.link_invalid_keywords||"");L.value=e.split(`
`).filter(f=>f.trim());const s=String(d.quark_ad_keywords||"");R.value=s.split(`
`).filter(f=>f.trim());const o=String(d.quark_warning_folder_names||"");$.value=o.split(`
`).filter(f=>f.trim());const w=String(d.quark_sus_extensions||"");N.value=w.split(`
`).filter(f=>f.trim())}catch{u.error("加载系统配置失败")}try{const t=await Rl();Object.assign(A,t)}catch{A.db_size="无法读取"}finally{ge.value=!1}ye(),await Je(),Xe(),await Ze(),me(),We()}),Ol(F,()=>{for(const[t,e]of Object.entries(F.value))if(!m.channels[t]){m.channels[t]={_enabled:!1,_testing:!1};for(const s of e.params||[])m.channels[t][s.key]=s.default||""}});async function tl(){var e,s;const t=String(d.redis_url||"redis://redis:6379");le.value=!0;try{const o=await Gl(t);o.ok?u.success(`✅ Redis 连接成功 — ${o.info}`):u.error(`❌ Redis 连接失败 — ${o.info}`)}catch(o){u.error(((s=(e=o.response)==null?void 0:e.data)==null?void 0:s.error)||"测试请求失败")}finally{le.value=!1}}async function ye(){be.value=!0;try{const t=localStorage.getItem("admin_token"),e={};t&&(e.Authorization="Bearer "+t);const s=await fetch("/api/admin/pansou-info",{headers:e});if(!s.ok)throw new Error("HTTP "+s.status);const o=await s.json();P.value=o}catch{P.value={status:"disconnected",version:"-",channelCount:0,pluginCount:0,diskCount:0}}finally{be.value=!1}}async function sl(){ie.value=!0;try{const t=localStorage.getItem("admin_token"),e={"Content-Type":"application/json"};t&&(e.Authorization="Bearer "+t);const o=await(await fetch("/api/admin/update-pansou",{method:"POST",headers:e})).json();o.ok?(u.success("✅ PanSou 已更新并重启"),setTimeout(()=>ye(),3e3)):u.error("❌ 更新失败 — "+(o.error||"未知错误"))}catch(t){u.error(t.message||"更新请求失败")}finally{ie.value=!1}}async function al(){var t,e;te.value=!0;try{const s=await ee({type:"pansou",url:String(d.pansou_url||"")});s.ok?(ye(),u.success(`✅ PanSou 连接成功 — ${s.info}`)):u.error(`❌ PanSou 连接失败 — ${s.info}`)}catch(s){u.error(((e=(t=s.response)==null?void 0:t.data)==null?void 0:e.error)||"测试请求失败")}finally{te.value=!1}}async function ol(){var t,e;se.value=!0;try{const s=await ee({type:"video_parser",url:String(d.video_parser_url||"")});s.ok?u.success(`✅ 视频解析服务连接成功 — ${s.info}`):u.error(`❌ 视频解析服务连接失败 — ${s.info}`)}catch(s){u.error(((e=(t=s.response)==null?void 0:t.data)==null?void 0:e.error)||"测试请求失败")}finally{se.value=!1}}async function nl(){var t,e;ae.value=!0;try{const s=await ee({type:"tmdb",token:String(d.tmdb_api_token||"")});s.ok?u.success(`✅ TMDB 令牌有效 — ${s.info}`):u.error(`❌ TMDB 连接失败 — ${s.info}`)}catch(s){u.error(((e=(t=s.response)==null?void 0:t.data)==null?void 0:e.error)||"测试请求失败")}finally{ae.value=!1}}async function il(){var t,e;oe.value=!0;try{const s=await ee({type:"proxy",url:String(d.search_proxy_url||"")});s.ok?u.success(`✅ 搜索代理可用 — ${s.info}`):u.error(`❌ 搜索代理不可用 — ${s.info}`)}catch(s){u.error(((e=(t=s.response)==null?void 0:t.data)==null?void 0:e.error)||"测试请求失败")}finally{oe.value=!1}}async function dl(){var t,e;ne.value=!0;try{const s=String(d.ip_geo_api_url||"");if(!s){u.warning("请先输入 IP 归属地查询 API 地址");return}const o=await ee({type:"ip_geo",url:s});o.ok?u.success("✅ IP 归属地接口可用 — "+o.info):u.error("❌ IP 归属地接口不可用 — "+o.info)}catch(s){u.error(((e=(t=s.response)==null?void 0:t.data)==null?void 0:e.error)||"测试请求失败")}finally{ne.value=!1}}function rl(){const t=J.value.trim();if(!t)return;const e=t.split(`
`).map(o=>o.trim()).filter(o=>o);let s=0;for(const o of e)E.value.includes(o)||(E.value.push(o),s++);J.value="",Pe(),s>0?u.success(`已添加 ${s} 条规则`):u.info("所有规则已存在")}function ul(t){E.value.splice(t,1),Pe()}function pl(t){return t.startsWith("#")?"info":t.startsWith("/")&&(t.endsWith("/")||t.endsWith("/g")||t.endsWith("/i")||t.endsWith("/gi"))?"warning":""}function Pe(){d.title_filter_rules=E.value.join(`
`)}function fl(){const t=H.value.trim();if(!t)return;const e=t.split(`
`).map(o=>o.trim()).filter(o=>o);let s=0;for(const o of e)L.value.includes(o)||(L.value.push(o),s++);H.value="",Se(),s>0?u.success(`已添加 ${s} 个关键词`):u.info("所有关键词已存在")}function cl(t){L.value.splice(t,1),Se()}function Se(){d.link_invalid_keywords=L.value.join(`
`)}function vl(){const t=Y.value.trim();if(!t)return;const e=t.split(`
`).map(o=>o.trim()).filter(o=>o);let s=0;for(const o of e)R.value.includes(o)||(R.value.push(o),s++);Y.value="",Ue(),s>0?u.success():u.info("所有关键词已存在")}function ml(t){R.value.splice(t,1),Ue()}function Ue(){d.quark_ad_keywords=R.value.join(`
`)}function yl(){const t=Q.value.trim();if(!t)return;const e=t.split(`
`).map(o=>o.trim()).filter(o=>o);let s=0;for(const o of e)$.value.includes(o)||($.value.push(o),s++);Q.value="",ze(),s>0?u.success():u.info("所有文件夹名已存在")}function _l(t){$.value.splice(t,1),ze()}function ze(){d.quark_warning_folder_names=$.value.join(`
`)}function gl(){const t=X.value.trim();if(!t)return;const e=t.split(`
`).map(o=>o.trim().toLowerCase().replace(/^\./,"")).filter(o=>o);let s=0;for(const o of e)N.value.includes(o)||(N.value.push(o),s++);X.value="",Te(),s>0?u.success("已添加 ${added} 个后缀"):u.info("所有后缀已存在")}function bl(t){N.value.splice(t,1),Te()}function Te(){d.quark_sus_extensions=N.value.join(`
`)}async function wl(){var t,e;pe.value=!0;try{const s={};for(const[w,f]of Object.entries(m.channels))if(f._enabled){const h={};for(const[z,x]of Object.entries(f))!z.startsWith("_")&&x!==""&&(h[z]=String(x));Object.keys(h).length>0&&(s[w]=h)}const o=ue.value.map(w=>({key:w.key,value:String(d[w.key]??w.value)}));o.push({key:"global_notify_config",value:JSON.stringify({channels:s,events:m.events})}),await Nl(o),u.success("配置已保存")}catch(s){u.error(((e=(t=s.response)==null?void 0:t.data)==null?void 0:e.error)||"保存失败")}finally{pe.value=!1}}async function xl(){var e,s,o;if(await((e=_e.value)==null?void 0:e.validate().catch(()=>!1))){fe.value=!0;try{const w=await Wl(S.oldPassword,S.newPassword);w.success?(u.success("✅ 密码修改成功,下次登录请使用新密码"),S.oldPassword="",S.newPassword="",S.confirmPassword=""):u.error(w.message)}catch(w){u.error(((o=(s=w.response)==null?void 0:s.data)==null?void 0:o.error)||"密码修改失败")}finally{fe.value=!1}}}const Ie=g();function kl(){var t;(t=Ie.value)==null||t.click()}async function Vl(t){var o,w,f;const e=t.target,s=(o=e.files)==null?void 0:o[0];if(s){if(!s.type.startsWith("image/")){u.error("仅支持图片文件JPEG/PNG/WebP"),e.value="";return}if(s.size>2*1024*1024){u.error("图片大小不能超过 2MB"),e.value="";return}try{const h=await Kl(s);h.success?(d.site_logo=h.url,u.success("✅ LOGO 已上传并生效")):u.error(h.message)}catch(h){u.error(((f=(w=h.response)==null?void 0:w.data)==null?void 0:f.error)||"上传失败")}e.value=""}}async function hl(){try{d.site_logo="",await ql("site_logo",""),u.success("已移除 LOGO")}catch{u.error("移除失败")}}return(t,e)=>{const s=V("el-input"),o=V("el-form-item"),w=V("el-icon"),f=V("el-button"),h=V("el-form"),z=V("el-card"),x=V("el-switch"),B=V("el-divider"),Oe=V("el-radio"),Cl=V("el-radio-group"),K=V("el-input-number"),T=V("el-tag"),Pl=V("el-collapse-item"),Sl=V("el-collapse"),je=V("el-option"),Ae=V("el-select"),G=V("el-table-column"),Ul=V("el-popconfirm"),zl=V("el-table");return p(),y("div",Dl,[q(a(z,{id:"section-sys-site"},{header:i(()=>[...e[40]||(e[40]=[l("span",null,"🌐 网站设置",-1)])]),default:i(()=>[a(h,{"label-width":"180px","label-position":"left"},{default:i(()=>[a(o,{label:"网站名称"},{default:i(()=>[a(s,{modelValue:d.site_name,"onUpdate:modelValue":e[0]||(e[0]=n=>d.site_name=n),placeholder:"CloudSearch",style:{"max-width":"300px"}},null,8,["modelValue"]),e[41]||(e[41]=l("div",{class:"form-tip"},"显示在网站标题和页脚",-1))]),_:1}),a(o,{label:"网站 LOGO"},{default:i(()=>[l("div",Jl,[l("div",Hl,[a(f,{type:"primary",onClick:kl},{icon:i(()=>[a(w,null,{default:i(()=>[a(Re(jl))]),_:1})]),default:i(()=>[e[42]||(e[42]=r(" 选择LOGO图片并上传 ",-1))]),_:1}),l("input",{ref_key:"logoInputRef",ref:Ie,type:"file",accept:".jpg,.jpeg,.png,.webp",hidden:"",onChange:Vl},null,544),e[43]||(e[43]=l("div",{class:"form-tip",style:{"margin-left":"12px"}},[r(" 推荐 "),l("strong",null,"320×60"),r(" 或宽比例(如 4:1JPEG/PNG/WebP最大 2MB。"),l("br"),r(" LOGO 同时也作为搜索结果无封面图时的兜底图使用。 ")],-1))]),d.site_logo?(p(),y("div",Yl,[l("img",{src:String(d.site_logo),alt:"LOGO预览",onError:e[1]||(e[1]=n=>n.target.style.display="none")},null,40,Ql),a(f,{size:"small",type:"danger",plain:"",onClick:hl},{default:i(()=>[...e[44]||(e[44]=[r("移除",-1)])]),_:1})])):W("",!0)])]),_:1}),a(o,{label:"底部免责声明"},{default:i(()=>[a(s,{modelValue:d.site_disclaimer,"onUpdate:modelValue":e[2]||(e[2]=n=>d.site_disclaimer=n),type:"textarea",rows:4,placeholder:"输入免责声明内容"},null,8,["modelValue"]),e[45]||(e[45]=l("div",{class:"form-tip"},"显示在网站底部,留空则不显示",-1))]),_:1}),a(o,{label:"滚动通知文字"},{default:i(()=>[a(s,{modelValue:d.site_marquee,"onUpdate:modelValue":e[3]||(e[3]=n=>d.site_marquee=n),placeholder:"📢 欢迎使用CloudSearch",style:{"max-width":"500px"}},null,8,["modelValue"]),e[46]||(e[46]=l("div",{class:"form-tip"},"搜索栏下方滚动的通知条(从右往左滚动),留空则不显示",-1))]),_:1}),a(o,{label:"系统时区"},{default:i(()=>[a(s,{modelValue:d.timezone,"onUpdate:modelValue":e[4]||(e[4]=n=>d.timezone=n),placeholder:"Asia/Shanghai",style:{"max-width":"300px"}},null,8,["modelValue"]),e[47]||(e[47]=l("div",{class:"form-tip"},"例如 Asia/Shanghai、America/New_York、UTC修改后保存配置即可生效",-1))]),_:1})]),_:1})]),_:1},512),[[M,!U.value||U.value==="sys-site"]]),q(a(z,{id:"section-sys-services"},{header:i(()=>[...e[48]||(e[48]=[l("span",null,"🔗 外部服务 & 缓存",-1)])]),default:i(()=>[a(h,{"label-width":"180px","label-position":"left"},{default:i(()=>{var n,c,_,I,Be,Ee;return[a(o,{label:"PanSou 搜索引擎地址"},{default:i(()=>{var C,Le;return[l("div",Xl,[a(s,{modelValue:d.pansou_url,"onUpdate:modelValue":e[5]||(e[5]=re=>d.pansou_url=re),placeholder:"http://pansou:8888",style:{"max-width":"360px"}},null,8,["modelValue"]),a(f,{type:"primary",loading:te.value,onClick:al,size:"default",style:{width:"100px"}},{default:i(()=>[r(b(te.value?"测试中...":"验证连接"),1)]),_:1},8,["loading"]),a(f,{type:"warning",loading:ie.value,onClick:sl,size:"default",style:{width:"130px"},disabled:!((C=P.value)!=null&&C.hasUpdate)},{default:i(()=>{var re;return[r(b(ie.value?"更新中...":(re=P.value)!=null&&re.hasUpdate?"🔄 有新版本":"无更新"),1)]}),_:1},8,["loading","disabled"]),(Le=P.value)!=null&&Le.latestVersion?(p(),y("span",Zl,b(P.value.latestVersion),1)):W("",!0)]),e[49]||(e[49]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},"盘搜搜索引擎的地址",-1))]}),_:1}),l("div",et,[l("div",lt,[l("div",{class:$e(["db-stat-value",((n=P.value)==null?void 0:n.status)==="connected"?"text-success":"text-warning"])},b(((c=P.value)==null?void 0:c.status)==="connected"?"已连接":P.value?"未连接":"-"),3),e[50]||(e[50]=l("div",{class:"db-stat-label"},"PanSou 状态",-1))]),l("div",tt,[l("div",st,b(((_=P.value)==null?void 0:_.channelCount)??"-"),1),e[51]||(e[51]=l("div",{class:"db-stat-label"},"频道数量",-1))]),l("div",at,[l("div",ot,b(((I=P.value)==null?void 0:I.pluginCount)??"-"),1),e[52]||(e[52]=l("div",{class:"db-stat-label"},"插件数量",-1))]),l("div",nt,[l("div",it,b(((Be=P.value)==null?void 0:Be.diskCount)??"-"),1),e[53]||(e[53]=l("div",{class:"db-stat-label"},"网盘数量",-1))]),l("div",dt,[l("div",rt,b(((Ee=P.value)==null?void 0:Ee.version)||"-"),1),e[54]||(e[54]=l("div",{class:"db-stat-label"},"版本",-1))])]),a(o,{label:"PanSou Web 端访问"},{default:i(()=>[a(x,{modelValue:we.value,"onUpdate:modelValue":e[6]||(e[6]=C=>we.value=C),"active-text":"启用","inactive-text":"关闭"},null,8,["modelValue"]),e[55]||(e[55]=l("div",{class:"form-tip",style:{"margin-left":"12px"}},[r(" 开启后可通过 "),l("code",null,"/pansou/"),r(" 路径访问 PanSou 搜索引擎管理界面 ")],-1))]),_:1}),a(o,{label:"启用代理"},{default:i(()=>[a(x,{modelValue:ce.value,"onUpdate:modelValue":e[7]||(e[7]=C=>ce.value=C),"active-text":"启用","inactive-text":"关闭"},null,8,["modelValue"]),e[56]||(e[56]=l("div",{class:"form-tip",style:{"margin-left":"8px"}}," 仅 PanSou 需要此配置,开启后搜索请求将经过代理转发 ",-1))]),_:1}),ce.value?(p(),k(o,{key:0,label:"代理地址",style:{"margin-top":"-12px"}},{default:i(()=>[l("div",ut,[a(s,{modelValue:d.search_proxy_url,"onUpdate:modelValue":e[8]||(e[8]=C=>d.search_proxy_url=C),placeholder:"http://127.0.0.1:7890",style:{"max-width":"360px"}},null,8,["modelValue"]),a(f,{type:"primary",loading:oe.value,onClick:il,size:"default",style:{width:"100px"}},{default:i(()=>[r(b(oe.value?"测试中...":"测试代理"),1)]),_:1},8,["loading"])]),e[57]||(e[57]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},"HTTP 或 SOCKS5 协议地址",-1))]),_:1})):W("",!0),a(o,{label:"视频解析服务地址"},{default:i(()=>[l("div",pt,[a(s,{modelValue:d.video_parser_url,"onUpdate:modelValue":e[9]||(e[9]=C=>d.video_parser_url=C),placeholder:"http://video-parser:3001",style:{"max-width":"360px"}},null,8,["modelValue"]),a(f,{type:"primary",loading:se.value,onClick:ol,size:"default",style:{width:"100px"}},{default:i(()=>[r(b(se.value?"测试中...":"验证连接"),1)]),_:1},8,["loading"])]),e[58]||(e[58]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},"视频链接解析服务地址",-1))]),_:1}),a(o,{label:"TMDB 读取令牌"},{default:i(()=>[l("div",ft,[a(s,{modelValue:d.tmdb_api_token,"onUpdate:modelValue":e[10]||(e[10]=C=>d.tmdb_api_token=C),type:"password","show-password":"",placeholder:"输入 TMDB API 读取令牌Bearer Token",style:{"max-width":"360px"}},null,8,["modelValue"]),a(f,{type:"primary",loading:ae.value,onClick:nl,size:"default",style:{width:"100px"}},{default:i(()=>[r(b(ae.value?"测试中...":"验证令牌"),1)]),_:1},8,["loading"])]),e[59]||(e[59]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},[r(" 用于搜索 TMDB 获取评分、导演、演员等完整内容信息。 "),l("a",{href:"https://www.themoviedb.org/settings/api",target:"_blank",rel:"noopener",style:{color:"var(--primary-color)"}},"获取令牌 →")],-1))]),_:1}),a(o,{label:"IP 归属地查询"},{default:i(()=>[l("div",ct,[a(s,{modelValue:d.ip_geo_api_url,"onUpdate:modelValue":e[11]||(e[11]=C=>d.ip_geo_api_url=C),placeholder:"https://cn.apihz.cn/api/ip/chaapi.php?id=xxx&key=***&ip={ip}&td=0",style:{"max-width":"360px"}},null,8,["modelValue"]),a(f,{type:"primary",loading:ne.value,onClick:dl,size:"default",style:{width:"100px"}},{default:i(()=>[r(b(ne.value?"测试中...":"验证接口"),1)]),_:1},8,["loading"])]),e[60]||(e[60]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},[r(" IP 归属地查询 API 地址,"),l("code",null,"{ip}"),r(" 会被替换为实际 IP。 ")],-1)),e[61]||(e[61]=l("div",{style:{color:"var(--el-color-warning)","font-size":"13px","margin-top":"2px",width:"100%"}}," ⚠ 当前仅支持 接口盒子(apihz.cn) 格式 ",-1))]),_:1}),a(B,{"content-position":"left"},{default:i(()=>[...e[62]||(e[62]=[r("Redis 缓存",-1)])]),_:1}),a(o,{label:"Redis 连接地址"},{default:i(()=>[l("div",vt,[a(s,{modelValue:d.redis_url,"onUpdate:modelValue":e[12]||(e[12]=C=>d.redis_url=C),placeholder:"redis://:***@172.17.0.1:6379",style:{"max-width":"360px"}},null,8,["modelValue"]),a(f,{type:"primary",size:"default",loading:le.value,onClick:tl,style:{width:"100px"}},{default:i(()=>[r(b(le.value?"测试中...":"验证连接"),1)]),_:1},8,["loading"])]),e[63]||(e[63]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},[r(" Redis 用于缓存搜索验证结果,提升响应速度。"),l("br"),l("strong",null,"带密码格式:"),l("code",null,"redis://:你的密码@地址:6379"),l("br"),r(" 修改后保存配置即可生效,无需重启。"),l("strong",null,"切换 Redis 只会清空缓存,不影响任何重要数据。")],-1))]),_:1})]}),_:1}),ge.value?(p(),y("div",mt,[a(w,{class:"is-loading",size:20},{default:i(()=>[a(Re(Al))]),_:1}),e[64]||(e[64]=l("span",{style:{"margin-left":"8px",color:"#909399"}},"加载中...",-1))])):(p(),y("div",yt,[l("div",_t,[l("div",{class:$e(["db-stat-value",A.redis_status==="已连接"?"text-success":"text-warning"])},b(A.redis_status),3),e[65]||(e[65]=l("div",{class:"db-stat-label"},"Redis 状态",-1))]),l("div",gt,[l("div",bt,b(A.db_size),1),e[66]||(e[66]=l("div",{class:"db-stat-label"},"数据库大小",-1))]),l("div",wt,[l("div",xt,b(A.save_records),1),e[67]||(e[67]=l("div",{class:"db-stat-label"},"转存记录",-1))]),l("div",kt,[l("div",Vt,b(A.search_stats),1),e[68]||(e[68]=l("div",{class:"db-stat-label"},"搜索记录",-1))]),l("div",ht,[l("div",Ct,b(A.cloud_configs),1),e[69]||(e[69]=l("div",{class:"db-stat-label"},"网盘配置",-1))]),l("div",Pt,[l("div",St,b(A.content_cache),1),e[70]||(e[70]=l("div",{class:"db-stat-label"},"内容缓存",-1))])]))]),_:1},512),[[M,!U.value||U.value==="sys-services"]]),q(a(z,{id:"section-sys-strategy"},{header:i(()=>[...e[71]||(e[71]=[l("span",null,"🔧 性能配置",-1)])]),default:i(()=>[l("div",Ut,[a(B,{"content-position":"left"},{default:i(()=>[...e[72]||(e[72]=[r("搜索结果返回方式",-1)])]),_:1}),l("div",zt,[l("div",Tt,[e[73]||(e[73]=l("span",{class:"field-label"},"开启资源链接有效性监测",-1)),a(x,{modelValue:d.link_validation_enabled,"onUpdate:modelValue":e[13]||(e[13]=n=>d.link_validation_enabled=n),"active-value":"true","inactive-value":"false","active-text":"开启","inactive-text":"关闭"},null,8,["modelValue"])]),e[74]||(e[74]=l("div",{class:"field-desc"},"开启后搜索时会自动检测链接是否有效,过滤失效链接。关闭则直接返回所有结果(更快)",-1))]),l("div",It,[l("div",Ot,[e[77]||(e[77]=l("span",{class:"field-label"},"搜索结果方式",-1)),a(Cl,{modelValue:d.search_strategy,"onUpdate:modelValue":e[14]||(e[14]=n=>d.search_strategy=n)},{default:i(()=>[a(Oe,{value:"wait_all"},{default:i(()=>[...e[75]||(e[75]=[r("等待全部结果后展示",-1)])]),_:1}),a(Oe,{value:"stream_channel"},{default:i(()=>[...e[76]||(e[76]=[r("频道结果逐步展示",-1)])]),_:1})]),_:1},8,["modelValue"])]),e[78]||(e[78]=l("div",{class:"field-desc"},"逐步展示会分频道并发请求并优先展示先返回的频道;该模式下频道顺序按返回先后,不按配置顺序。",-1))]),a(B,{"content-position":"left"},{default:i(()=>[...e[79]||(e[79]=[r("搜索策略",-1)])]),_:1}),l("div",jt,[l("div",At,[l("div",Bt,[e[80]||(e[80]=l("span",{class:"field-label"},"使用所有频道参与搜索",-1)),a(x,{modelValue:xe.value,"onUpdate:modelValue":e[15]||(e[15]=n=>xe.value=n),"active-text":"开启","inactive-text":"关闭"},null,8,["modelValue"])]),e[81]||(e[81]=l("div",{class:"field-desc"},"包含未启用频道,命中更广但请求压力更高。",-1))]),l("div",Et,[l("div",Lt,[e[82]||(e[82]=l("span",{class:"field-label"},"每类网盘有效结果数",-1)),a(K,{modelValue:d.search_result_limit,"onUpdate:modelValue":e[16]||(e[16]=n=>d.search_result_limit=n),min:1,max:100},null,8,["modelValue"])]),e[83]||(e[83]=l("div",{class:"field-desc"},"每个网盘类型最多展示的有效链接数量",-1))]),l("div",Rt,[l("div",$t,[e[84]||(e[84]=l("span",{class:"field-label"},"验证并发数",-1)),a(K,{modelValue:d.validation_concurrency,"onUpdate:modelValue":e[17]||(e[17]=n=>d.validation_concurrency=n),min:1,max:50},null,8,["modelValue"])]),e[85]||(e[85]=l("div",{class:"field-desc"},"同时验证的链接数量",-1))]),l("div",Nt,[l("div",Ft,[e[86]||(e[86]=l("span",{class:"field-label"},"有效链接缓存 (s)",-1)),a(K,{modelValue:d.validation_cache_ttl_valid,"onUpdate:modelValue":e[18]||(e[18]=n=>d.validation_cache_ttl_valid=n),min:60,max:86400,step:60},null,8,["modelValue"])]),e[87]||(e[87]=l("div",{class:"field-desc"},"有效验证结果的缓存时间",-1))]),l("div",Gt,[l("div",Wt,[e[88]||(e[88]=l("span",{class:"field-label"},"无效链接缓存 (s)",-1)),a(K,{modelValue:d.validation_cache_ttl_invalid,"onUpdate:modelValue":e[19]||(e[19]=n=>d.validation_cache_ttl_invalid=n),min:60,max:86400,step:60},null,8,["modelValue"])]),e[89]||(e[89]=l("div",{class:"field-desc"},"无效验证结果的缓存时间",-1))]),l("div",Kt,[l("div",qt,[e[90]||(e[90]=l("span",{class:"field-label"},"验证超时 (ms)",-1)),a(K,{modelValue:d.validation_timeout,"onUpdate:modelValue":e[20]||(e[20]=n=>d.validation_timeout=n),min:1e3,max:3e4,step:500},null,8,["modelValue"])]),e[91]||(e[91]=l("div",{class:"field-desc"},"单个链接验证超时毫秒数",-1))])]),a(B,{"content-position":"left"},{default:i(()=>[...e[92]||(e[92]=[r("链接检测配置",-1)])]),_:1}),l("div",Mt,[e[94]||(e[94]=l("div",{class:"field-label-row"},[l("span",{class:"field-label"},"搜索标题过滤规则")],-1)),l("div",Dt,[a(s,{modelValue:J.value,"onUpdate:modelValue":e[21]||(e[21]=n=>J.value=n),type:"textarea",rows:1,placeholder:"每行一条规则,回车分隔",style:{"max-width":"420px","font-family":"monospace","font-size":"12px"}},null,8,["modelValue"]),a(f,{type:"primary",onClick:rl,disabled:!J.value.trim()},{default:i(()=>[...e[93]||(e[93]=[r(" 确认添加 ",-1)])]),_:1},8,["disabled"])]),E.value.length>0?(p(),y("div",Jt,[(p(!0),y(O,null,j(E.value,(n,c)=>(p(),k(T,{key:c,closable:"",type:pl(n),"disable-transitions":!1,onClose:_=>ul(c)},{default:i(()=>[r(b(n),1)]),_:2},1032,["type","onClose"]))),128))])):(p(),y("div",Ht,"暂无过滤规则")),e[95]||(e[95]=l("div",{class:"filter-rule-help"},[l("div",{class:"help-title"},"📖 规则说明"),l("div",{class:"help-row"},[l("code",null,"# 注释内容"),r(" — "),l("code",null,"#"),r(" 后必须跟"),l("strong",null,"空格"),r("才会被识别为注释,单纯的 "),l("code",null,"#动漫"),r(" 会被当作要移除的文本")]),l("div",{class:"help-row"},[l("code",null,"/正则表达式/标志"),r(" — 正则匹配,匹配到的内容会被删除。如 "),l("code",null,"/^\\\\d+[、,.\\\\s]/"),r(" 去掉开头的序号")]),l("div",{class:"help-row"},[l("code",null,"纯文本"),r(" — 直接写要移除的文字(支持 emoji凡是标题中含有的都会被删除")])],-1))]),l("div",Yt,[e[97]||(e[97]=l("div",{class:"field-label-row"},[l("span",{class:"field-label"},"失效关键词")],-1)),l("div",Qt,[a(s,{modelValue:H.value,"onUpdate:modelValue":e[22]||(e[22]=n=>H.value=n),type:"textarea",rows:1,placeholder:"每行一个关键词,回车分隔",style:{"max-width":"420px","font-family":"monospace","font-size":"12px"}},null,8,["modelValue"]),a(f,{type:"danger",onClick:fl,disabled:!H.value.trim()},{default:i(()=>[...e[96]||(e[96]=[r(" 确认添加 ",-1)])]),_:1},8,["disabled"])]),e[98]||(e[98]=l("div",{class:"field-desc"},"自定义失效关键词PanSou 检测 summary 或 HTML 页面内容包含即判为失效。",-1)),L.value.length>0?(p(),y("div",Xt,[(p(!0),y(O,null,j(L.value,(n,c)=>(p(),k(T,{key:c,closable:"",type:"danger","disable-transitions":!1,onClose:_=>cl(c)},{default:i(()=>[r(b(n),1)]),_:2},1032,["onClose"]))),128))])):(p(),y("div",Zt,"暂无失效关键词,所有链接将默认判为有效"))]),a(B,{"content-position":"left"},{default:i(()=>[...e[99]||(e[99]=[r("夸克网盘转存清理",-1)])]),_:1}),l("div",es,[e[101]||(e[101]=l("div",{class:"field-label-row"},[l("span",{class:"field-label"},"广告关键词")],-1)),l("div",ls,[a(s,{modelValue:Y.value,"onUpdate:modelValue":e[23]||(e[23]=n=>Y.value=n),type:"textarea",rows:1,placeholder:"每行一个关键词,回车分隔",style:{"max-width":"420px","font-family":"monospace","font-size":"12px"}},null,8,["modelValue"]),a(f,{type:"danger",onClick:vl,disabled:!Y.value.trim()},{default:i(()=>[...e[100]||(e[100]=[r(" 确认添加 ",-1)])]),_:1},8,["disabled"])]),e[102]||(e[102]=l("div",{class:"field-desc"},"夸克转存完成后自动删除文件名/文件夹名含这些关键词的内容(防广告病毒)",-1)),R.value.length>0?(p(),y("div",ts,[(p(!0),y(O,null,j(R.value,(n,c)=>(p(),k(T,{key:c,closable:"",type:"warning","disable-transitions":!1,onClose:_=>ml(c)},{default:i(()=>[r(b(n),1)]),_:2},1032,["onClose"]))),128))])):(p(),y("div",ss,"暂未配置广告关键词,不会进行广告清理"))]),l("div",as,[e[104]||(e[104]=l("div",{class:"field-label-row"},[l("span",{class:"field-label"},"警示文件夹名")],-1)),l("div",os,[a(s,{modelValue:Q.value,"onUpdate:modelValue":e[24]||(e[24]=n=>Q.value=n),type:"textarea",rows:1,placeholder:"每行一个文件夹名,回车分隔",style:{"max-width":"420px","font-family":"monospace","font-size":"12px"}},null,8,["modelValue"]),a(f,{type:"primary",onClick:yl,disabled:!Q.value.trim()},{default:i(()=>[...e[103]||(e[103]=[r(" 确认添加 ",-1)])]),_:1},8,["disabled"])]),e[105]||(e[105]=l("div",{class:"field-desc"},"夸克转存完成后在网盘根目录自动创建这些警示文件夹(自动加上 ⚠️ 前缀)",-1)),$.value.length>0?(p(),y("div",ns,[(p(!0),y(O,null,j($.value,(n,c)=>(p(),k(T,{key:c,closable:"",type:"info","disable-transitions":!1,onClose:_=>_l(c)},{default:i(()=>[r(b(n),1)]),_:2},1032,["onClose"]))),128))])):(p(),y("div",is,"暂未配置警示文件夹"))]),l("div",ds,[e[107]||(e[107]=l("div",{class:"field-label-row"},[l("span",{class:"field-label"},"可疑文件后缀")],-1)),l("div",rs,[a(s,{modelValue:X.value,"onUpdate:modelValue":e[25]||(e[25]=n=>X.value=n),type:"textarea",rows:1,placeholder:"每行一个后缀,不要带点号,回车分隔",style:{"max-width":"420px","font-family":"monospace","font-size":"12px"}},null,8,["modelValue"]),a(f,{type:"danger",onClick:gl,disabled:!X.value.trim()},{default:i(()=>[...e[106]||(e[106]=[r(" 确认添加 ",-1)])]),_:1},8,["disabled"])]),e[108]||(e[108]=l("div",{class:"field-desc"},"夸克转存完成后自动删除后缀匹配的文件(防病毒,如 bat、exe、scr 等)",-1)),N.value.length>0?(p(),y("div",us,[(p(!0),y(O,null,j(N.value,(n,c)=>(p(),k(T,{key:c,closable:"",type:"danger","disable-transitions":!1,onClose:_=>bl(c)},{default:i(()=>[r("."+b(n),1)]),_:2},1032,["onClose"]))),128))])):(p(),y("div",ps,"暂无配置使用默认列表bat、exe、vbs、scr、cmd、com、pif、js、jar、msi、reg、inf、ps1"))])])]),_:1},512),[[M,!U.value||U.value==="sys-strategy"]]),q(a(z,{id:"section-sys-password"},{header:i(()=>[...e[109]||(e[109]=[l("span",null,"🔑 修改管理员密码",-1)])]),default:i(()=>[a(h,{ref_key:"passwordFormRef",ref:_e,model:S,rules:ll,"label-width":"120px","label-position":"left"},{default:i(()=>[a(o,{label:"原密码",prop:"oldPassword"},{default:i(()=>[a(s,{modelValue:S.oldPassword,"onUpdate:modelValue":e[26]||(e[26]=n=>S.oldPassword=n),type:"password","show-password":"",placeholder:"输入原密码",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1}),a(o,{label:"新密码",prop:"newPassword"},{default:i(()=>[a(s,{modelValue:S.newPassword,"onUpdate:modelValue":e[27]||(e[27]=n=>S.newPassword=n),type:"password","show-password":"",placeholder:"输入新密码至少6位",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1}),a(o,{label:"确认新密码",prop:"confirmPassword"},{default:i(()=>[a(s,{modelValue:S.confirmPassword,"onUpdate:modelValue":e[28]||(e[28]=n=>S.confirmPassword=n),type:"password","show-password":"",placeholder:"再次输入新密码",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1}),a(o,null,{default:i(()=>[a(f,{type:"primary",loading:fe.value,onClick:xl},{default:i(()=>[...e[110]||(e[110]=[r("修改密码",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1},512),[[M,!U.value||U.value==="sys-password"]]),q(a(z,{id:"section-sys-notify"},{header:i(()=>[...e[111]||(e[111]=[l("div",{style:{display:"flex","align-items":"center","justify-content":"space-between"}},[l("span",null,"📬 消息推送")],-1)])]),default:i(()=>[a(Sl,{"model-value":["global"]},{default:i(()=>[a(Pl,{title:"全局推送(管理员兜底)",name:"global"},{default:i(()=>[l("div",fs,[a(h,{"label-width":"140px","label-position":"left"},{default:i(()=>[l("div",cs,[(p(!0),y(O,null,j(F.value,(n,c)=>(p(),y("div",{key:c,style:{border:"1px solid var(--el-border-color-light)","border-radius":"6px",padding:"8px 12px"}},[l("div",vs,[a(x,{modelValue:m.channels[c]._enabled,"onUpdate:modelValue":_=>m.channels[c]._enabled=_,size:"small"},null,8,["modelValue","onUpdate:modelValue"]),l("strong",null,b(n.label),1),m.channels[c]._enabled?(p(),k(f,{key:0,size:"small",text:"",type:"primary",onClick:_=>el(c),loading:m.channels[c]._testing},{default:i(()=>[...e[112]||(e[112]=[r("测试",-1)])]),_:1},8,["onClick","loading"])):W("",!0)]),m.channels[c]._enabled?(p(),y("div",ms,[(p(!0),y(O,null,j(n.params,_=>(p(),k(o,{key:_.key,label:_.label,style:{"margin-bottom":"6px"}},{default:i(()=>[_.type==="password"?(p(),k(s,{key:0,modelValue:m.channels[c][_.key],"onUpdate:modelValue":I=>m.channels[c][_.key]=I,type:"password","show-password":"",placeholder:_.placeholder||"",style:{"max-width":"360px"}},null,8,["modelValue","onUpdate:modelValue","placeholder"])):_.type==="switch"?(p(),k(x,{key:1,modelValue:m.channels[c][_.key],"onUpdate:modelValue":I=>m.channels[c][_.key]=I},null,8,["modelValue","onUpdate:modelValue"])):_.type==="number"?(p(),k(K,{key:2,modelValue:m.channels[c][_.key],"onUpdate:modelValue":I=>m.channels[c][_.key]=I,min:1,max:10,style:{"max-width":"160px"}},null,8,["modelValue","onUpdate:modelValue"])):(p(),k(s,{key:3,modelValue:m.channels[c][_.key],"onUpdate:modelValue":I=>m.channels[c][_.key]=I,placeholder:_.placeholder||"",style:{"max-width":"360px"}},null,8,["modelValue","onUpdate:modelValue","placeholder"]))]),_:2},1032,["label"]))),128))])):W("",!0)]))),128))]),a(B,{"content-position":"left"},{default:i(()=>[...e[113]||(e[113]=[r("全局事件开关",-1)])]),_:1}),l("div",ys,[a(x,{modelValue:m.events.on_save_success,"onUpdate:modelValue":e[29]||(e[29]=n=>m.events.on_save_success=n),"active-text":"转存成功"},null,8,["modelValue"]),a(x,{modelValue:m.events.on_save_fail,"onUpdate:modelValue":e[30]||(e[30]=n=>m.events.on_save_fail=n),"active-text":"转存失败"},null,8,["modelValue"]),a(x,{modelValue:m.events.on_cookie_expire,"onUpdate:modelValue":e[31]||(e[31]=n=>m.events.on_cookie_expire=n),"active-text":"Cookie过期"},null,8,["modelValue"]),a(x,{modelValue:m.events.on_cleanup,"onUpdate:modelValue":e[32]||(e[32]=n=>m.events.on_cleanup=n),"active-text":"清理完成"},null,8,["modelValue"])]),e[114]||(e[114]=l("div",{class:"form-tip",style:{"margin-top":"8px"}},"全局推送作为兜底通道。设置了推送用户的网盘配置走用户推送,未设置的走全局推送。",-1))]),_:1})])]),_:1})]),_:1}),e[124]||(e[124]=r()),a(B,{"content-position":"left"},{default:i(()=>[...e[115]||(e[115]=[r("添加推送用户",-1)])]),_:1}),l("div",_s,[l("div",gs,[a(Ae,{modelValue:v.account,"onUpdate:modelValue":e[33]||(e[33]=n=>v.account=n),filterable:"","allow-create":"",clearable:"",placeholder:"选择推广账户",style:{width:"200px"}},{default:i(()=>[(p(!0),y(O,null,j(he.value,n=>(p(),k(je,{key:n,label:n,value:n},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(Ae,{modelValue:v.channels,"onUpdate:modelValue":e[34]||(e[34]=n=>v.channels=n),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"选择您所需的消息频道",style:{width:"260px"}},{default:i(()=>[(p(!0),y(O,null,j(Ke.value,(n,c)=>(p(),k(je,{key:c,label:n.label,value:c},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(x,{modelValue:v.events.on_save_success,"onUpdate:modelValue":e[35]||(e[35]=n=>v.events.on_save_success=n),"active-text":"转存成功"},null,8,["modelValue"]),a(x,{modelValue:v.events.on_save_fail,"onUpdate:modelValue":e[36]||(e[36]=n=>v.events.on_save_fail=n),"active-text":"转存失败"},null,8,["modelValue"]),a(x,{modelValue:v.events.on_cookie_expire,"onUpdate:modelValue":e[37]||(e[37]=n=>v.events.on_cookie_expire=n),"active-text":"Cookie过期"},null,8,["modelValue"]),a(x,{modelValue:v.events.on_cleanup,"onUpdate:modelValue":e[38]||(e[38]=n=>v.events.on_cleanup=n),"active-text":"清理完成"},null,8,["modelValue"]),a(f,{type:"primary",size:"small",loading:ve.value,onClick:De},{default:i(()=>[r(b(v.id?"更新":"确认添加"),1)]),_:1},8,["loading"]),v.id?(p(),k(f,{key:0,size:"small",onClick:Me},{default:i(()=>[...e[116]||(e[116]=[r("取消编辑",-1)])]),_:1})):W("",!0)])]),a(B,{"content-position":"left"},{default:i(()=>[...e[117]||(e[117]=[r("推送用户列表",-1)])]),_:1}),a(zl,{data:Ve.value,stripe:"",style:{width:"100%"},"empty-text":"暂无推送用户"},{default:i(()=>[a(G,{prop:"account",label:"推广账号","min-width":"140"}),a(G,{label:"转存成功",width:"90",align:"center"},{default:i(({row:n})=>[de(n,"on_save_success")?(p(),k(T,{key:0,type:"success",size:"small"},{default:i(()=>[...e[118]||(e[118]=[r("✔",-1)])]),_:1})):(p(),y("span",bs,"—"))]),_:1}),a(G,{label:"转存失败",width:"90",align:"center"},{default:i(({row:n})=>[de(n,"on_save_fail")?(p(),k(T,{key:0,type:"success",size:"small"},{default:i(()=>[...e[119]||(e[119]=[r("✔",-1)])]),_:1})):(p(),y("span",ws,"—"))]),_:1}),a(G,{label:"Cookie过期",width:"90",align:"center"},{default:i(({row:n})=>[de(n,"on_cookie_expire")?(p(),k(T,{key:0,type:"success",size:"small"},{default:i(()=>[...e[120]||(e[120]=[r("✔",-1)])]),_:1})):(p(),y("span",xs,"—"))]),_:1}),a(G,{label:"清理完成",width:"90",align:"center"},{default:i(({row:n})=>[de(n,"on_cleanup")?(p(),k(T,{key:0,type:"success",size:"small"},{default:i(()=>[...e[121]||(e[121]=[r("✔",-1)])]),_:1})):(p(),y("span",ks,"—"))]),_:1}),a(G,{label:"已启用的通道","min-width":"220"},{default:i(({row:n})=>[(p(!0),y(O,null,j(Ce(n),(c,_)=>(p(),k(T,{key:_,size:"small",style:{"margin-right":"4px","margin-bottom":"2px"}},{default:i(()=>[r(b(Ye(_)),1)]),_:2},1024))),128)),Qe(n)?W("",!0):(p(),y("span",Vs,"走全局推送"))]),_:1}),a(G,{label:"操作",width:"180",fixed:"right"},{default:i(({row:n})=>[a(f,{text:"",type:"primary",size:"small",onClick:c=>qe(n)},{default:i(()=>[...e[122]||(e[122]=[r("编辑",-1)])]),_:1},8,["onClick"]),a(Ul,{title:"确定删除该推送用户?",onConfirm:c=>He(n)},{reference:i(()=>[a(f,{text:"",type:"danger",size:"small"},{default:i(()=>[...e[123]||(e[123]=[r("删除",-1)])]),_:1})]),_:1},8,["onConfirm"])]),_:1})]),_:1},8,["data"])]),_:1},512),[[M,!U.value||U.value==="sys-notify"]]),q(a(z,{id:"section-sys-maintenance"},{header:i(()=>[...e[125]||(e[125]=[l("span",null,"🔄 系统维护",-1)])]),default:i(()=>[e[130]||(e[130]=r()),a(h,{"label-width":"180px","label-position":"left"},{default:i(()=>[a(o,{label:"自动更新镜像"},{default:i(()=>[a(x,{modelValue:ke.value,"onUpdate:modelValue":e[39]||(e[39]=n=>ke.value=n),"active-text":"启用","inactive-text":"禁用"},null,8,["modelValue"]),e[126]||(e[126]=r()),e[127]||(e[127]=l("div",{class:"form-tip"},"启用后 CloudSearch 将自动检测并更新到最新镜像版本",-1)),e[128]||(e[128]=r()),e[129]||(e[129]=l("div",{class:"form-tip",style:{color:"var(--(--el-color-warning,#e6a23c))"}}," 当前需手动在服务器执行docker-compose -f /opt/CloudSearch/docker-compose.yml pull && docker-compose -f /opt/CloudSearch/docker-compose.yml up -d ",-1))]),_:1})]),_:1})]),_:1},512),[[M,!U.value||U.value==="sys-maintenance"]]),l("div",hs,[a(f,{type:"primary",size:"large",loading:pe.value,onClick:wl},{default:i(()=>[...e[131]||(e[131]=[r(" 保存配置 ",-1)])]),_:1},8,["loading"])])])}}}),Us=Ml(Cs,[["__scopeId","data-v-641a8223"]]);export{Us as default};