import{ax as e,c as a,bI as s,x as t,bJ as u,bK as n,bL as o,ap as i,p as l}from"./page_layout.js?v=1763625242172";import{r as c,k as p,ae as r,R as d,S as m,X as v,a3 as _,q as b,U as f,a4 as h,V as k,I as y,F as w,ap as g}from"./vue.js?v=1763625242172";import{_ as x,dh as I}from"./naive.js?v=1763625242172";const S=c({listenIpv6:!1,offlineMode:!1,debugMode:!1,apiInterface:!1,cdn_status:!1,lang:null,langList:[],webname:"",session_timeout:"",session_timeout_source:0,sites_path:"",backup_path:"",serverIp:"",systemDate:"",username:"",account:"",icon_status:!1,backup_info:{auto_backup:0,backup_number:0,total_size:0}}),C=c({panelSSL:!1,basicAuth:!1,dynamicPwd:!1,pwdComplexity:!1,domain:"",limitIp:"",port:"7800",adminPath:"/",statusCode:404,pwdSetDay:0,pwdExpireDay:0,pwdExpireTime:0,uaAstrict:!1}),D=c([]);async function L(){const{message:s}=await e();a(s)&&(function(e){S.value.listenIpv6="checked"===e.ipv6,S.value.offlineMode="checked"===e.is_local,S.value.debugMode="checked"===e.debug,S.value.apiInterface="checked"===e.api,S.value.lang=e.language,S.value.cdn_status=e.cdn_status,S.value.langList=e.language_list.map((e=>({label:e.title,value:e.name}))),S.value.webname=e.webname||"",S.value.session_timeout=e.session_timeout||"",S.value.session_timeout_source=e.session_timeout_source||86400,S.value.sites_path=e.sites_path||"",S.value.backup_path=e.backup_path||"",S.value.systemDate=e.systemdate||"",S.value.username=e.username||"",S.value.icon_status=e.icon_status;const{panel:s,user_info:t}=e;a(s)&&(S.value.serverIp=s.address||"",S.value.backup_info=s.backup_info);a(t)&&(S.value.account=t.data.username)}(s),function(e){var s;const{panel:t,SSL:u}=e;C.value.panelSSL=u||location.protocol.indexOf("https:")>-1,C.value.basicAuth=(null==(s=e.basic_auth)?void 0:s.open)||!1,C.value.statusCode=e.status_code||404,a(t)&&(C.value.domain=t.domain||"",C.value.limitIp=t.limitip||"",C.value.port=t.listen_port||"7800",C.value.adminPath=t.admin_path||"/")}(s))}async function M(){const{message:e}=await s();D.value=t(e)?e:[]}async function P(){const{message:e}=await u();a(e)&&(C.value.dynamicPwd=e.result)}async function A(){const{message:e}=await n();a(e)&&(C.value.pwdSetDay=e.expire,C.value.pwdExpireDay=e.expire_day,C.value.pwdExpireTime=e.expire_time,C.value.pwdComplexity=e.password_safe)}async function E(){const{message:e}=await o();a(e)&&(C.value.uaAstrict="0"!==e.status)}function T(){return{webname:S.value.webname||"",session_timeout:S.value.session_timeout_source||86400,domain:C.value.domain,limitip:C.value.limitIp,sites_path:S.value.sites_path,backup_path:S.value.backup_path,address:S.value.serverIp,systemdate:S.value.systemDate,port:C.value.port,backup_number:S.value.backup_info.backup_number,auto_backup:S.value.backup_info.auto_backup}}function $(){S.value={listenIpv6:!1,offlineMode:!1,debugMode:!1,apiInterface:!1,cdn_status:!1,lang:null,langList:[],webname:"",session_timeout:"",session_timeout_source:0,sites_path:"",backup_path:"",serverIp:"",systemDate:"",username:"",account:"",icon_status:!1,backup_info:{auto_backup:0,backup_number:0,total_size:0}},C.value={panelSSL:!1,basicAuth:!1,dynamicPwd:!1,pwdComplexity:!1,domain:"",limitIp:"",port:"7800",adminPath:"/",statusCode:404,pwdSetDay:0,pwdExpireDay:0,pwdExpireTime:0,uaAstrict:!1},D.value=[]}function j(){S.value=null,C.value=null,D.value=[]}const R=p({__name:"index",props:{checked:{type:[String,Number,Boolean]},checkedModifiers:{}},emits:["update:checked"],setup(e,{expose:a}){const s=r(e,"checked"),t=i(),u=c(0),n=c(0),o=c(!1),l=c(),p=()=>{const e=l.value.$el.getClientRects(),{x:a,y:s}=e[0];u.value=a-5,n.value=s-3,o.value=!0,S()},S=g((()=>{o.value=!1}),2500);return a({validate:()=>new Promise(((e,a)=>{s.value?e(!0):(p(),a(!1))})),showTips:p}),(e,a)=>{const i=x,c=I;return d(),m(w,null,[v(i,{ref_key:"checkboxRef",ref:l,checked:s.value,"onUpdate:checked":a[0]||(a[0]=e=>s.value=e)},{default:_((()=>[b(e.$slots,"default")])),_:3},8,["checked"]),v(c,{show:k(o),x:k(u),y:k(n),trigger:"manual",placement:"top-start",style:y({backgroundColor:k(t).errorColor,color:"#fff"}),"arrow-style":{backgroundColor:k(t).errorColor}},{default:_((()=>[f("span",null,h(e.$t("Config.Safe.index_169")),1)])),_:1},8,["show","x","y","style","arrow-style"])],64)}}}),z={class:"confirm-tips"};const U=l({},[["render",function(e,a){return d(),m("ul",z,[b(e.$slots,"default",{},void 0,!0)])}],["__scopeId","data-v-c3009f11"]]);export{U as _,M as a,P as b,A as c,E as d,j as e,R as f,L as g,T as h,$ as i,D as m,S as p,C as s};
