import{_ as e}from"./index133.js?v=1761009159";import{e as s,k as a,$ as l,d as o,_ as t}from"./utils-lib.js?v=1761009159";import{c as n,q as i,H as r,I as p,y as d,v as m,x as c,z as u,e as _,B as k,F as x,b0 as f,N as b,A as y,C as h,D as C,J as v,ak as j,al as g,G as P,an as V,aY as H}from"./base-lib.js?v=1761009159";import{_ as I}from"./index104.js?v=1761009159";import{i as w,v as T,a as U,b as z,e as S,h as q,s as A,p as B,c as D,d as F,f as G,g as J,j as M,k as N,o as Y,l as $,n as E,q as K}from"./useController21.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./column.js?v=1761009159";import"./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./site.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./useController5.js?v=1761009159";import"./useController6.js?v=1761009159";import"./useMethod5.js?v=1761009159";import"./useController20.js?v=1761009159";import"./useStore13.js?v=1761009159";const L={class:"border-b border-dashed border-darker mb-[2.2rem] pb-[2.2rem]"},O={class:"flex mb-[20px]"},Q={class:"border-b border-dashed border-darker my-[2.2rem] pb-[2.2rem]"},R={class:"flex mb-[20px]"},W={class:"my-[2.2rem] relative"},X={class:"flex mb-[20px] items-center"},Z={class:"title-span"},ee={class:"ml-[2rem]"},se={class:"ml-[2rem]"},ae={class:"w-[37rem] ml-[2rem]"},le={key:1},oe={class:"text-small flex items-center font-bold"},te=t(n({__name:"index",setup:(t,{expose:n})=>(i(w),n({init:w}),(t,n)=>{const i=s,w=j,te=g,ne=a,ie=P,re=l,pe=V,de=I,me=H,ce=o,ue=e,_e=r("bt-loading");return p((m(),c("div",null,[u("div",L,[u("div",O,[n[10]||(n[10]=u("div",{class:"title-span"},"PHP版本",-1)),_(te,{modelValue:d(U).phpVersion,"onUpdate:modelValue":n[0]||(n[0]=e=>d(U).phpVersion=e),placeholder:"请选择PHP版本",class:"!w-[14rem] mr-1rem",onChange:d(S)},{default:k(()=>[(m(!0),c(x,null,f(d(U).options,(e,s)=>(m(),b(w,{key:s,label:e.title,value:e.key,disabled:!e.status},{default:k(()=>[u("span",null,[u("span",null,y(e.label),1),e.status?C("",!0):(m(),c(x,{key:0},[n[6]||(n[6]=h(" [ ",-1)),_(i,{class:"my-[4px]",onClick:s=>d(z)(e.key)},{default:k(()=>n[5]||(n[5]=[h("未安装",-1)])),_:2,__:[5]},1032,["onClick"]),n[7]||(n[7]=h(" ] ",-1))],64))])]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["modelValue","onChange"]),p(_(ne,{modelValue:d(U).other,"onUpdate:modelValue":[n[1]||(n[1]=e=>d(U).other=e),d(q)],ref:"otherInput",class:"mr-[.5rem]",width:"30rem",placeholder:"连接配置，如：1.1.1.1:9001或unix:/tmp/php.sock"},null,8,["modelValue","onUpdate:modelValue"]),[[v,"other"===d(U).phpVersion]]),d(U).toggleShow?(m(),b(ie,{key:0,type:"primary",class:"mr-1rem",onClick:d(A)},{default:k(()=>n[8]||(n[8]=[h("切换",-1)])),_:1,__:[8]},8,["onClick"])):C("",!0),d(U).noInstall?(m(),b(ie,{key:1,type:"primary",onClick:n[2]||(n[2]=e=>d(z)())},{default:k(()=>n[9]||(n[9]=[h("安装",-1)])),_:1,__:[9]})):C("",!0)]),_(re,{options:d(B)[d(U).helpIndex],class:"ml-[20px] mt-[20px]"},null,8,["options"])]),u("div",Q,[u("div",R,[n[11]||(n[11]=u("div",{class:"title-span"},"session隔离",-1)),_(pe,{modelValue:d(D).status,"onUpdate:modelValue":n[3]||(n[3]=e=>d(D).status=e),onChange:d(F)},null,8,["modelValue","onChange"])]),_(re,{options:d(G),class:"ml-[20px] mt-[20px]"},null,8,["options"])]),u("div",W,[u("div",X,[u("div",Z,[_(de,{name:"icon-ltd",size:"1.6",class:"mr-[4px]"}),n[12]||(n[12]=h(" 站点防护 ",-1))]),_(pe,{modelValue:d(J).status,"onUpdate:modelValue":n[4]||(n[4]=e=>d(J).status=e),onChange:d(M)},null,8,["modelValue","onChange"]),u("span",ee,"今日："+y(d(J).today),1),u("span",se,"总告警数："+y(d(J).total),1),p(u("div",ae,[_(me,{type:"warning",closable:!1},{title:k(()=>[n[14]||(n[14]=u("span",null,"未启用PHP安全告警，请先",-1)),d(J).safeTip.alarmTip?(m(),b(i,{key:0,type:"danger",onClick:d(N),class:"!inline-block"},{default:k(()=>n[13]||(n[13]=[h("设置告警",-1)])),_:1,__:[13]},8,["onClick"])):C("",!0),d(J).safeTip.allTip?(m(),c("span",le,"和")):C("",!0),d(J).safeTip.safeTip?(m(),b(i,{key:2,type:"danger",onClick:d(Y)},{default:k(()=>[h("开启PHP-"+y(d(J).version)+"防护",1)]),_:1},8,["onClick"])):C("",!0)]),_:1})],512),[[v,d(J).safeTip.show]])]),_(re,{options:d($),class:"ml-[20px] mt-[20px]"},null,8,["options"]),d(J).tips?(m(),b(ue,{key:0},{content:k(()=>[_(ce,{icon:"el-warning",size:"20",class:"mr-[8px]",color:"orange"}),u("div",oe,[0===d(J).tipsIndex?(m(),c(x,{key:0},[h("当前PHP版本不兼容此功能,请切换其他PHP版本")],64)):C("",!0),1===d(J).tipsIndex?(m(),c(x,{key:1},[n[16]||(n[16]=h(" 如需使用【PHP网站安全告警】功能，请先安装， ",-1)),_(i,{onClick:d(E)},{default:k(()=>n[15]||(n[15]=[h("点击安装",-1)])),_:1,__:[15]},8,["onClick"])],64)):C("",!0),2===d(J).tipsIndex?(m(),c(x,{key:2},[n[18]||(n[18]=h(" 如需使用【PHP网站安全告警】功能，请先购买， ",-1)),_(i,{onClick:d(K)},{default:k(()=>n[17]||(n[17]=[h("点击购买",-1)])),_:1,__:[17]},8,["onClick"])],64)):C("",!0)])]),_:1})):C("",!0)])])),[[_e,d(T)]])})}),[["__scopeId","data-v-6f8d7a11"]]);export{te as default};
