File: /www/server/panel/BTPanel/static/js/index52.js
import{c as C,e as o,aJ as se,aI as U,aK as le,r as R,j as h,k as v,F as S,B as E,q as t,M as O,s as x,C as M,O as ne,G as J,aC as oe,aV as ae,x as F,H as ie,p as l,L as P,v as y,J as D,K as T,m as V,bt as N,bm as q,Q as ce,y as K,bz as re,bA as ue,g as G,o as de,aH as _e,w as te,az as pe,i as me,z as fe,aX as he,a8 as ge,bM as ve,bk as be}from"./base-lib.js?v=1777008528";import{jG as we,M as xe,a0 as ke,e as ye,cQ as Se,R as Ce,cZ as j,d8 as $e,aY as Ee,da as Le,c7 as Ae,c as De}from"./utils-lib.js?v=1777008528";import{bO as Te}from"./firewall.js?v=1777008528";import{a as Re}from"./useController6.js?v=1777008528";import{o as Fe}from"./index3.js?v=1777008528";import"./index161.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./useStore9.js?v=1777008528";import"./useController5.js?v=1777008528";import"./useStore10.js?v=1777008528";import"./site.js?v=1777008528";import"./useStore8.js?v=1777008528";import"./index119.js?v=1777008528";import"./index116.js?v=1777008528";const W={beforeEnter(a){a.style.height="0",a.style.overflow="hidden"},enter(a,s){const u=a.scrollHeight;a.style.transition="height 320ms ease",requestAnimationFrame(()=>{a.style.height=u+"px"});const n=()=>{a.style.height="",a.style.transition="",a.style.overflow="",a.removeEventListener("transitionend",n),s()};a.addEventListener("transitionend",n)},beforeLeave(a){a.style.height=a.scrollHeight+"px",a.style.overflow="hidden"},leave(a,s){a.style.transition="height 320ms ease",requestAnimationFrame(()=>{a.style.height="0"});const u=()=>{a.style.transition="",a.removeEventListener("transitionend",u),s()};a.addEventListener("transitionend",u)}},Q=C({props:{title:{type:String,default:""}},setup(a,{slots:s}){return()=>{var u;return o("div",{class:"module-ui"},[o("div",{class:"text-medium font-bold text-default"},[a.title]),o("div",{class:"w-full mt-[1rem]"},[(u=s.default)==null?void 0:u.call(s)])])}}}),I=se("SITE-SAFE-STORE",()=>{const a=le("firewall-site-safe",!1),s=R(!0),u=R(null),{trigger:n}=we(),m=R(""),c=R({progress:0,msg:"",duration:0,details:{backup:[],fileleak:[],webshell:[],weakpass:[],weblog:[],webscan:[]},detailsNum:{backup:0,fileleak:0,webshell:0,weakpass:0,weblog:0,webscan:0},detailsChecked:{backup:!1,fileleak:!1,webshell:!1,weakpass:!1,weblog:!1,webscan:!1},currentScan:"",ip_top:[],risk_count:{high:0,middle:0,low:0},scan_time:"",score:0,total_attack:{xss:0,sql_injection:0,file_traversal:0,php_execution:0,sensitive_files:0},web_count:0}),k=e=>{var b,g,$,f,A,w,L,z,H,B,Y,Z,X,ee;return{progress:(e==null?void 0:e.progress)||0,msg:(e==null?void 0:e.msg)||"",duration:(e==null?void 0:e.duration)||0,details:(e==null?void 0:e.details)||{backup:[],fileleak:[],webshell:[],weakpass:[],weblog:[],webscan:[]},detailsNum:{backup:((b=e==null?void 0:e.details.backup)==null?void 0:b.length)||0,fileleak:((g=e==null?void 0:e.details.fileleak)==null?void 0:g.length)||0,webshell:(($=e==null?void 0:e.details.webshell)==null?void 0:$.length)||0,weakpass:((f=e==null?void 0:e.details.weakpass)==null?void 0:f.length)||0,weblog:((A=e==null?void 0:e.details.weblog)==null?void 0:A.length)||0,webscan:((w=e==null?void 0:e.details.webscan)==null?void 0:w.length)||0},detailsChecked:{backup:!!e,fileleak:!!e,webshell:!!e,weakpass:!!e,weblog:!!e,webscan:!!e},currentScan:"",ip_top:(e==null?void 0:e.ip_top)||[],risk_count:{high:((L=e==null?void 0:e.risk_count)==null?void 0:L.high)||0,middle:((z=e==null?void 0:e.risk_count)==null?void 0:z.middle)||0,low:((H=e==null?void 0:e.risk_count)==null?void 0:H.low)||0},scan_time:(e==null?void 0:e.scan_time)||"",score:(e==null?void 0:e.score)||0,total_attack:{xss:((B=e==null?void 0:e.total_attack)==null?void 0:B.xss)||0,sql_injection:((Y=e==null?void 0:e.total_attack)==null?void 0:Y.sql_injection)||0,file_traversal:((Z=e==null?void 0:e.total_attack)==null?void 0:Z.file_traversal)||0,php_execution:((X=e==null?void 0:e.total_attack)==null?void 0:X.php_execution)||0,sensitive_files:((ee=e==null?void 0:e.total_attack)==null?void 0:ee.sensitive_files)||0},web_count:(e==null?void 0:e.web_count)||0}},r=async(e=!1)=>{try{const b=await Te();c.value=k(b.data),a.value=!!b.data.scan_time,e===!0&&b.data.score>=90&&setTimeout(()=>{n()},500)}catch(b){c.value=k(null),a.value=!1,m.value&&xe.error(m.value)}finally{setTimeout(()=>s.value=!1,500)}},i=()=>{c.value.scan_time?_():a.value?p():_()},d=(e,b)=>{var $,f;const g=JSON.parse(b.data);if(g.hasOwnProperty("end")&&(c.value.progress=g.bar,c.value.msg=g.info,g.type&&(c.value.currentScan=g.type,c.value.detailsChecked[g.type]||(c.value.detailsChecked[g.type]=!0)),($=g.results)!=null&&$.length&&(c.value.details[g.type].push(...g.results),c.value.detailsNum[g.type]+=g.results.length),g.end)){(f=u.value)==null||f.close(),r(!0),m.value=g.info;return}},_=()=>{var e;a.value=!0,c.value=k(null),m.value="",(e=u.value)==null||e.close(),u.value=ke({route:"/ws_project",onMessage:d,onConnected:()=>{var b;(b=u.value)==null||b.send({model_index:"safe",mod_name:"webbasicscanning",def_name:"ScanAllSite",ws_callback:"123"})}})},p=()=>{var e;(e=u.value)==null||e.close(),a.value=!1,c.value=k(null)};return{scanEvent:i,scanStatus:a,getLastSiteSafeScanResult:r,scanResult:c,stopScan:p,loading:s}}),Pe=()=>{const a=I();return{refs:U(a),...a}},je={class:"flex items-center justify-between"},Be={class:"w-[6rem] flex-shrink-0 inline-block font-bold text-right whitespace-nowrap flex items-center"},Me={class:"ml-[1rem] text-large"},Ie={class:"leading-[1.6rem] text-tertiary"},ze={class:"grid grid-cols-7 gap-[1.6rem]"},He={class:"text-secondary font-bold whitespace-nowrap mr-[1rem]"},Oe={class:"text-default"},Ve=C({__name:"log-scan-result",props:{data:{}},setup(a){const s=C({props:{row:{type:Object,default:()=>({})},value:{type:String,default:""},onClick:{type:Function,default:()=>{}}},setup(i){return()=>o("span",{class:"font-bold whitespace-nowrap cursor-pointer ".concat(i.row[i.value]>0?"text-danger":""),onClick:d=>i.onClick(d)},[i.row[i.value]])}}),u=C({props:{row:{type:Object,default:()=>({})},value:{type:String,default:""},onClick:{type:Function,default:()=>{}}},setup(i){return()=>o("span",{class:"font-bold whitespace-nowrap ".concat(i.value!=="total"?"cursor-pointer":""),onClick:d=>i.value!=="total"&&i.onClick(d)},[i.row[i.value]])}}),n=[{label:"XSS",value:"xss",render:s},{label:"SQL",value:"sql",render:s},{label:"扫描",value:"san",render:s},{label:"PHP攻击",value:"php",render:s},{label:"IP(TOP100)",value:"ip",render:u},{label:"URL(TOP100)",value:"url",render:u},{label:"合计",value:"total",render:u}],m=C({name:"DetailDialog",props:{detailData:{type:Object,default:()=>({})},type:{type:String,default:""}},setup(i){const d=oe("popupClose"),_=["sql","san","xss","php"],{BtTable:p}=Se({request:async()=>({data:i.detailData,total:i.detailData.length}),columns:[..._.includes(i.type)?[{label:"攻击ip",prop:"ip"},{label:"攻击时间",prop:"time",render:b=>o("span",null,[Ce(b.time)])},{label:"user-agent",prop:"ua",showOverflowTooltip:!0},{label:"请求URL",width:210,render(b){return i.type==="san"?b.url:o("span",{class:"bg-lighter text-danger break-words"},[b.url])}}]:[{label:"访问次数",prop:"num",width:80},{label:i.type==="url"?"访问URL":"访问ip",prop:"path",showOverflowTooltip:!0}]]}),e=()=>{Fe({name:"btwaf"}),d()};return()=>o("div",{class:"p-[20px]"},[o(ae,{closable:!1,class:"!mb-[20px]","show-icon":!0},{title:()=>o("span",null,[F("为了保护您的网站安全,建议使用【"),o("span",{class:"bt-link",onClick:e},[F("Nginx防火墙")]),F("】以有效防御当前站点的sql攻击")])}),o(p,{"max-height":"500"},null)])}}),c=async(i,d)=>{ye({title:"日志详情",area:72,component:()=>o(m,{detailData:i,type:d},null)})},k={0:"var(--el-color-primary)",1:"var(--el-color-danger)"},r=({xss:i,sql:d,san:_,php:p})=>k[i||d||_||p?1:0];return(i,d)=>{const _=J;return h(),v("div",null,[(h(!0),v(S,null,E(a.data,p=>(h(),v("div",{key:p.id,class:"flex flex-col p-[1.6rem] text-small progress_item_info"},[t("div",je,[t("span",Be,[t("span",{class:"w-[.5rem] h-[.5rem] rounded-[50%] flex-shrink-0 inline-block",style:O({backgroundColor:r(p)})},null,4),t("span",Me,x(p.name),1)]),t("span",Ie,"耗时:"+x(p.duration.toFixed(2))+"秒",1)]),o(_,{class:"!my-8px"}),t("div",ze,[(h(),v(S,null,E(n,e=>t("div",{key:e.value},[t("span",He,x(e.label)+": ",1),t("span",Oe,[(h(),M(ne(e.render),{row:p,value:e.value,onClick:b=>c(p["".concat(e.value,"_detail")],e.value)},null,8,["row","value","onClick"]))])])),64))])]))),128))])}}}),Ne=j(Ve,[["__scopeId","data-v-609d9319"]]),qe={class:"progress-cont-list"},We=["onClick"],Ue={class:"progress_type"},Qe={class:"flex-1"},Ge={key:0},Je={key:1},Ke={key:2,class:"text-primary"},Ye={key:3,class:"text-danger mr-[4px]"},Ze={key:4,class:"text-primary"},Xe={class:"progress_fold text-small flex items-center"},et={class:"mr-4px"},tt={class:"progress_item_body"},st={class:"progress_item_body"},lt={class:"flex items-center justify-between w-full"},nt={class:"flex items-center ml-12px"},ot=["innerHTML"],at={class:"flex flex-col py-[1rem] px-[1.6rem] text-small progress_item_info"},it={class:"flex items-center"},ct=["innerHTML"],rt={class:"flex"},ut=["innerHTML"],dt=C({__name:"scan-result",setup(a){const s=I(),{scanStatus:u,scanResult:n}=U(s),m=R(["item"]),c=ie({active:{backup:!1,fileleak:!1,webshell:!1,weakpass:!1,weblog:!1,webscan:!1}}),k=[{name:"webscan",title:"网站配置安全性",icon:"webscan"},{name:"fileleak",title:"文件泄露检测",icon:"filescan"},{name:"webshell",title:"木马检测",icon:"webhorse"},{name:"backup",title:"备份文件",icon:"backup"},{name:"weakpass",title:"弱口令检测",icon:"backend"},{name:"weblog",title:"网站日志",icon:"ftps"}],r={0:{text:"警告",bg:"rgba(252, 109, 38, 0.1)",color:"#fc6d26"},1:{text:"低风险",bg:"rgba(232, 213, 68, 0.1)",color:"#D4BB00"},2:{text:"中风险",bg:"rgba(240, 173, 78, 0.14)",color:"#E97B00"},3:{text:"高风险",bg:"rgba(239, 8, 8, 0.1)",color:"#CC1515"}},i=_=>{c.active[_]||(c.active[_]=!1),c.active[_]=!c.active[_]},d=_=>"/scan/scanning-".concat(_,"-ico.svg");return(_,p)=>{const e=$e,b=J,g=re,$=ue;return h(),v("div",qe,[l(u)?(h(),v(S,{key:0},E(k,(f,A)=>t("div",{key:A,class:P([f.name+"_item "+(l(c).active[f.name]?"active":""),"progress_item"])},[t("div",{class:"progress_item_header",onClick:w=>i(f.name)},[t("div",Ue,[o(e,{class:"mr-12px w-[2rem]",src:d(f.icon)},null,8,["src"]),t("span",null,x(f.title),1)]),t("div",Qe,[l(u)&&l(n).currentScan==f.name?(h(),v("span",Ge," 正在扫描... ")):l(u)&&!l(n).detailsChecked[f.name]&&!l(n).detailsNum[f.name]?(h(),v("span",Je," 等待扫描 ")):f.name==="weblog"?(h(),v("span",Ke,"日志安全分析已完成")):l(n).detailsNum[f.name]?(h(),v("span",Ye," 发现"+x(l(n).detailsNum[f.name])+"项风险 ",1)):(h(),v("span",Ze,"无风险项"))]),t("div",Xe,[t("span",et,x(l(c).active[f.name]?"收起":"展开"),1),t("i",{class:P(l(c).active[f.name]?"svgtofont-el-arrow-up":"svgtofont-el-arrow-down")},null,2)])],8,We),f.name==="weblog"?(h(),M(q,V({key:0,css:!1},N(l(W))),{default:y(()=>[D(t("div",tt,[o(Ne,{data:l(n).details[f.name]},null,8,["data"])],512),[[T,l(c).active[f.name]]])]),_:2},1040)):(h(),M(q,V({key:1,css:!1},N(l(W))),{default:y(()=>[D(t("div",st,[o($,{modelValue:l(m),"onUpdate:modelValue":p[0]||(p[0]=w=>ce(m)?m.value=w:null)},{default:y(()=>[(h(!0),v(S,null,E(l(n).details[f.name],(w,L)=>(h(),M(g,{key:L,name:"item",disabled:""},{title:y(()=>[t("div",lt,[t("div",nt,[t("span",{class:"text-small h-[2.2rem] flex items-center px-[8px] rounded-small mr-[1rem]",style:O({color:r[w.dangerous||0].color,backgroundColor:r[w.dangerous||0].bg})},x(r[w.dangerous||0].text),5),t("span",{style:O({color:r[w.dangerous||0].color}),innerHTML:w.name},null,12,ot)])])]),default:y(()=>[t("div",at,[t("div",it,[p[1]||(p[1]=t("span",{class:"w-[6rem] flex-shrink-0 inline-block font-bold text-right whitespace-nowrap"}," 详情: ",-1)),t("span",{class:"leading-[1.6rem] text-tertiary",innerHTML:w.info.replace(/\r\n/g,"<br>")},null,8,ct)]),o(b,{class:"!my-8px"}),t("div",rt,[p[2]||(p[2]=t("span",{class:"w-[6rem] flex-shrink-0 inline-block font-bold whitespace-nowrap"}," 修复方案: ",-1)),t("span",{class:"text-tertiary",innerHTML:w.repair},null,8,ut)])])]),_:2},1024))),128))]),_:2},1032,["modelValue"])],512),[[T,l(c).active[f.name]]])]),_:2},1040))],2)),64)):K("",!0)])}}}),_t=j(dt,[["__scopeId","data-v-407b0c7e"]]),pt=C({__name:"score-chart",props:{high:{},medium:{},low:{},score:{default:0},colors:{default:()=>({high:"#ff6b81",medium:"#ffb84d",low:"#F7E459"})},successColor:{default:"#52c41a"},gapDeg:{default:10},startAngle:{default:180},endAngle:{default:0},radius:{default:"122%"},barWidth:{default:14},backgroundColor:{default:"transparent"},fontSize:{default:44},subtext:{default:"正在扫描..."}},setup(a){const s=a,u=R(null);let n=null;const m=G(()=>[{value:Math.max(0,s.high),color:s.colors.high,name:"高风险"},{value:Math.max(0,s.medium),color:s.colors.medium,name:"中风险"},{value:Math.max(0,s.low),color:s.colors.low,name:"低风险"}]),c=G(()=>m.value.filter(_=>_.value>0));function k(){const _=c.value.length>0,p=s.radius,e=s.barWidth,b=s.startAngle-s.endAngle,g=[{type:"gauge",startAngle:s.startAngle,endAngle:s.endAngle,radius:p,pointer:{show:!1},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},progress:{show:!1},axisLine:{lineStyle:{width:e,color:[[1,s.backgroundColor]]}},detail:{show:!1},center:["50%","70%"],data:[{value:0}]}];if(!_)return g.push({type:"gauge",name:"安全",startAngle:s.startAngle,endAngle:s.endAngle,radius:p,pointer:{show:!1},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},axisLine:{lineStyle:{width:e,color:[[1,s.backgroundColor]]}},center:["50%","70%"],progress:{show:!0,width:e,roundCap:!0,itemStyle:{color:s.successColor}},detail:{show:!1},data:[{value:100}]}),g;const $=c.value.reduce((w,L)=>w+L.value,0);let f=s.startAngle;const A=c.value.length>1?Math.max(0,s.gapDeg):0;return c.value.forEach((w,L)=>{const z=L===c.value.length-1?f-s.endAngle:b*(w.value/$)-A,H=f,B=Math.max(s.endAngle,f-Math.max(0,z));f=B-A,g.push({type:"gauge",name:"".concat(w.name,": ").concat(w.value),min:0,max:100,startAngle:H,endAngle:B,radius:p,pointer:{show:!1},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},axisLine:{lineStyle:{width:e,color:[[1,s.backgroundColor]]}},progress:{show:!0,width:e,roundCap:!0,itemStyle:{color:w.color}},detail:{show:!1},center:["50%","70%"],data:[{value:100}]})}),g}const r=getComputedStyle(document.documentElement).getPropertyValue("--el-color-text-primary").trim(),i=getComputedStyle(document.documentElement).getPropertyValue("--el-color-text-tertiary").trim();function d(){var _;n&&n.setOption({title:{text:String((_=s.score)!=null?_:""),subtext:s.subtext,left:"center",top:"45%",textStyle:{fontSize:s.fontSize,fontWeight:600,color:r},subtextStyle:{color:i}},legend:{bottom:"0%",orient:"horizontal",selectedMode:!1,itemWidth:14,itemHeight:14,data:[{name:"高风险: ".concat(s.high),icon:"rect",textStyle:{color:"#ff6b81",fontSize:14},itemStyle:{color:"#ff6b81"}},{name:"中风险: ".concat(s.medium),icon:"rect",textStyle:{color:"#ffb84d",fontSize:14},itemStyle:{color:"#ffb84d"}},{name:"低风险: ".concat(s.low),icon:"rect",textStyle:{color:"#F7E459",fontSize:14},itemStyle:{color:"#F7E459"}}]},series:k()},{notMerge:!0,lazyUpdate:!0})}return de(()=>{if(!u.value)return;n=Ee(u.value),d();const _=()=>n==null?void 0:n.resize();window.addEventListener("resize",_),_e(()=>{window.removeEventListener("resize",_),n==null||n.dispose(),n=null})}),te(()=>({high:s.high,medium:s.medium,low:s.low,score:s.score,subtext:s.subtext}),()=>d(),{deep:!0}),(_,p)=>(h(),v("div",{ref_key:"chartEl",ref:u,class:"risk-gauge"},null,512))}}),mt=j(pt,[["__scopeId","data-v-cc603ee8"]]),ft={key:0,class:"mt-[1rem]"},ht={class:"grid grid-cols-3 gap-4 h-[29.5rem]"},gt={class:"col-span-1"},vt={class:"col-span-2"},bt={class:"grid grid-cols-5 gap-4 mt-[1rem]"},wt={class:"mb-[1.4rem] text-secondary text-medium font-bold"},xt={class:"mb-[1.4rem]"},kt={class:"text-extraLarge font-bold"},yt={class:"text-base"},St={class:"text-extraLarge font-bold"},Ct={class:"text-small text-tertiary"};function $t(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!me(a)}const Et=C({__name:"index",setup(a){const s=I(),{scanStatus:u,scanResult:n}=U(s),m=G(()=>[{id:1,title:"耗时",value:n.value.duration,unit:"秒",description:"本次网站扫描总耗时",iconClass:"card-icon-1"},{id:2,title:"XSS",value:n.value.total_attack.xss,unit:"",description:"本次网站扫描XSS攻击数量",iconClass:"card-icon-2"},{id:3,title:"SQL",value:n.value.total_attack.sql_injection,unit:"",description:"本次网站扫描SQL注入攻击数量",iconClass:"card-icon-3"},{id:4,title:"恶意扫描",value:n.value.total_attack.file_traversal,unit:"",description:"本次网站扫描恶意扫描数量",iconClass:"card-icon-4"},{id:5,title:"PHP攻击",value:n.value.total_attack.php_execution,unit:"",description:"本次网站扫描PHP攻击数量",iconClass:"card-icon-5"}]),{BtTable:c,refresh:k}=Le({request:()=>({data:n.value.ip_top||[]}),columns:[{label:"IP地址",prop:"ip",minWidth:100,render:r=>{const i=r.ip;return o(Ae,{class:r.deny_status?"line-through !text-tertiary":"",onClick:async()=>{(await Re({...r,address:i},"网站安全页面点击IP手动封禁")).status&&s.getLastSiteSafeScanResult()}},$t(i)?i:{default:()=>[i]})}},{label:"访问次数",prop:"count"}],empty:()=>o(S,null,[u&&!n.value.scan_time&&o("div",{class:"flex flex-col items-center justify-center h-[19rem]"},[o("i",{class:"svgtofont-el-loading text-secondary !text-large50 animate-spin"},null),o("span",{class:"text-tertiary text-medium mt-[1rem]"},[F("正在扫描...")])]),!(u&&!n.value.scan_time)&&o(pe,{description:"暂无数据"},null)])});return te(()=>n.value.ip_top,()=>{k()},{deep:!0}),(r,i)=>l(u)?(h(),v("section",ft,[t("div",ht,[t("div",gt,[o(l(Q),{title:"网站安全评分"},{default:y(()=>[o(mt,{class:"h-[22rem] w-full",high:l(n).risk_count.high,medium:l(n).risk_count.middle,low:l(n).risk_count.low,subtext:l(u)&&l(n).scan_time?"评分":"正在扫描...",score:l(u)&&l(n).scan_time?l(n).score:"..."},null,8,["high","medium","low","subtext","score"])]),_:1})]),t("div",vt,[o(l(Q),{title:"IP (TOP 5排行)",class:"h-[29.5rem]"},{default:y(()=>[o(l(c))]),_:1})])]),t("div",bt,[(h(!0),v(S,null,E(l(m),d=>(h(),v("div",{key:d.id,class:"module-ui relative col-span-1"},[t("div",{class:P(["absolute top-[.8rem] right-[1.2rem] card-icon",d.iconClass])},null,2),t("div",wt,x(d.title),1),t("div",xt,[D(t("div",kt,[F(x(d.value),1),t("span",yt,x(d.unit),1)],512),[[T,l(n).scan_time]]),D(t("div",St,"正在扫描...",512),[[T,!l(n).scan_time]])]),t("div",Ct,x(d.description),1)]))),128))]),o(l(Q),{title:"安全项目",class:"mt-[1rem]"},{default:y(()=>[o(_t)]),_:1})])):K("",!0)}}),Lt=j(Et,[["__scopeId","data-v-53823351"]]),At={class:"w-full h-[50px] flex flex-col justify-center items-center"},Dt={class:"description-header w-full flex"},Tt={class:"header-left"},Rt={class:"header-left"},Ft={class:"header-left-scan-title"},Pt={class:"header-scan-desc"},jt={class:"text-base text-secondary"},Bt={class:"header-right ml-[5rem]"},Mt={key:0},It={class:"flex items-center justify-evenly py-[2rem]"},zt={class:"flex flex-col"},Ht={class:"feature-title"},Ot={class:"feature-desc"},Vt=C({__name:"index",setup(a){const s=I(),{scanEvent:u}=s,{scanStatus:n,scanResult:m}=U(s),c=[{id:1,iconClass:"feature-icon-1",title:"免费且强大的全能网站入侵扫描",desc:"免费全能扫描,全面拦截网站入侵风险"},{id:2,iconClass:"feature-icon-2",title:"深度检测是否存在危险木马",desc:"深度木马检测,精准排查隐藏威胁程序"},{id:3,iconClass:"feature-icon-3",title:"专业分析网站访问日志",desc:"通过日志分析,挖掘访问异常与安全隐患"}];return(k,r)=>{const i=fe,d=he,_=J;return h(),v("section",{class:P(["module-ui",{"!p-[1.6rem]":l(n)}])},[t("div",At,[t("div",Dt,[D(t("div",Tt,[...r[0]||(r[0]=[t("div",{class:"header-left-title"},[t("span",null,"智能网站安全")],-1),t("div",{class:"header-left-description"},[t("span",null,"基于强大引擎打造的免费网站安全,一键即可检查网站风险信号,宝塔自动给出优化和修复建议,用户仅需简单操作即可加固网站。")],-1)])],512),[[T,!l(n)]]),D(t("div",Rt,[t("div",Ft,[t("span",null,x(l(m).scan_time?"上次扫描时间:":"正在扫描"),1),t("div",Pt,[t("span",jt,x(l(m).scan_time?"".concat(l(m).scan_time):l(m).msg),1)])])],512),[[T,l(n)]]),t("div",Bt,[o(i,{type:l(n)&&!l(m).scan_time?"warning":"primary",plain:l(n)&&!l(m).scan_time,size:"large",style:{padding:"0.8rem 3.6rem !important"},onClick:l(u)},{default:y(()=>[F(x(l(n)&&!l(m).scan_time?"取消扫描":"立即扫描"),1)]),_:1},8,["type","plain","onClick"])])]),D(o(d,{percentage:l(m).progress||0,color:"#20a53a","show-text":!1,"stroke-width":6,class:"w-full mt-[1.2rem]"},null,8,["percentage"]),[[T,l(n)&&!l(m).scan_time]])]),o(q,V({css:!1},N(l(W))),{default:y(()=>[l(n)?K("",!0):(h(),v("div",Mt,[r[1]||(r[1]=t("div",{class:"w-full h-[1rem]"},null,-1)),o(_),t("div",It,[(h(),v(S,null,E(c,p=>t("div",{key:p.id,class:"flex items-start gap-[1.5rem]"},[t("div",{class:P(["feature-icon",p.iconClass])},null,2),t("div",zt,[t("div",Ht,x(p.title),1),t("div",Ot,x(p.desc),1)])])),64))]),o(_),r[2]||(r[2]=t("div",{class:"overview"},[t("div",{class:"flex items-center justify-center"},[t("span",{class:"overview-icon"}),t("div",{class:"text-extraLarge font-bold ml-[1rem] text-default"},"功能概览")]),t("div",{class:"flex items-center justify-center mt-[2.4rem]"},[t("img",{class:"w-[90rem] h-[120rem]",src:"https://www.bt.cn/Public/new/plugin/site_safe/siteSafe.png",alt:"介绍图片"})])],-1))]))]),_:1},16)],2)}}}),Nt=j(Vt,[["__scopeId","data-v-20e8ef87"]]),qt={class:"module-ui site-safe-skeleton__control"},Wt={class:"site-safe-skeleton__header"},Ut={class:"flex flex-col gap-[0.8rem] flex-1"},Qt={class:"site-safe-skeleton__scan"},Gt={class:"grid grid-cols-3 gap-4"},Jt={class:"module-ui site-safe-skeleton__card"},Kt={class:"module-ui site-safe-skeleton__card col-span-2"},Yt={class:"site-safe-skeleton__table"},Zt={class:"grid grid-cols-5 gap-4 mt-[1rem]"},Xt={class:"module-ui site-safe-skeleton__card mt-[1rem]"},es={class:"site-safe-skeleton__list"},ts=C({__name:"index",setup(a){const{globalTheme:s}=De(),{getLastSiteSafeScanResult:u,stopScan:n}=I(),{refs:{loading:m}}=Pe();return u(),ge(()=>{n(),m.value=!0}),(c,k)=>{const r=ve,i=be;return h(),v("div",{class:P([{"h-[calc(100vh-200px)]":l(m),"overflow-hidden":l(m)}]),style:O({"max-width":l(s).interface.container_width==="100%"?"137rem":l(s).interface.container_width})},[l(m)?(h(),M(i,{key:0,animated:"",class:"site-safe-skeleton"},{template:y(()=>[t("section",qt,[t("div",Wt,[t("div",Ut,[o(r,{variant:"text",class:"site-safe-skeleton__title"}),o(r,{variant:"text",class:"site-safe-skeleton__subtitle"})]),o(r,{variant:"button",class:"site-safe-skeleton__action"})])]),t("div",Qt,[t("div",Gt,[t("div",Jt,[o(r,{variant:"text",class:"site-safe-skeleton__card-title"}),o(r,{variant:"rect",class:"site-safe-skeleton__chart"})]),t("div",Kt,[o(r,{variant:"text",class:"site-safe-skeleton__card-title"}),t("div",Yt,[(h(),v(S,null,E(4,d=>o(r,{key:"table-".concat(d),variant:"text",class:"site-safe-skeleton__table-row"})),64))])])]),t("div",Zt,[(h(),v(S,null,E(5,d=>t("div",{key:"stat-".concat(d),class:"module-ui site-safe-skeleton__stats-card"},[o(r,{variant:"text",class:"site-safe-skeleton__stats-title"}),o(r,{variant:"text",class:"site-safe-skeleton__stats-value"}),o(r,{variant:"text",class:"site-safe-skeleton__stats-desc"})])),64))]),t("div",Xt,[o(r,{variant:"text",class:"site-safe-skeleton__card-title"}),t("div",es,[(h(),v(S,null,E(6,d=>o(r,{key:"list-".concat(d),variant:"text",class:"site-safe-skeleton__list-row"})),64))])])])]),_:1})):(h(),v(S,{key:1},[o(Nt),o(q,V({css:!1},N(l(W))),{default:y(()=>[o(Lt)]),_:1},16)],64))],6)}}}),hs=j(ts,[["__scopeId","data-v-622a7fcb"]]);export{hs as default};