const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["MkCaptcha-B4uZZlk7.js","MkCaptcha.vue_vue_type_script_setup_true_lang-BXhUIZsD.js","app-QjDgb7aF.js","vue-Cm77DuTi.js","charts-3gEHPHRq.js","media-DuCIZ-3n.js","app-CV_aoXZ3.css"])))=>i.map(i=>d[i]);
import{b as n,a7 as B,M as I,l as z,d as D,P as A,br as H,aA as G,a8 as M,aB as Q}from"./app-QjDgb7aF.js";import{_ as X}from"./radios.vue_vue_type_style_index_0_lang-DGNN0Cq9.js";import{F as L}from"./suspense-jJyLIr98.js";import{F as U}from"./slot-BIWBfzr1.js";import{b as T,j as S,p as P,k as s,i as e,q as u,I as y,u as l,D as i,F as w,J as t,g as C,H as K,d as Y,a as c,E as R,_ as E,f as F}from"./vue-Cm77DuTi.js";import{F as x}from"./folder-DKyFtE95.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";import"./radio-Co0R5AcD.js";const Z={class:"_formRoot"},$={value:null},ee=T({__name:"bot-protection",setup(N){const V=Y(()=>z(()=>import("./MkCaptcha-B4uZZlk7.js"),__vite__mapDeps([0,1,2,3,4,5,6])));let k=c(null),b=c(null),m=c(null),r=c(null),f=c(null);async function v(){const h=await D("admin/meta");b.value=h.hcaptchaSiteKey,m.value=h.hcaptchaSecretKey,r.value=h.recaptchaSiteKey,f.value=h.recaptchaSecretKey,k.value=h.enableHcaptcha?"hcaptcha":h.enableRecaptcha?"recaptcha":null}function g(){A("admin/update-meta",{enableHcaptcha:k.value==="hcaptcha",hcaptchaSiteKey:b.value,hcaptchaSecretKey:m.value,enableRecaptcha:k.value==="recaptcha",recaptchaSiteKey:r.value,recaptchaSecretKey:f.value}).then(()=>{H()})}return(h,o)=>(S(),P("div",null,[s(L,{p:v},{default:e(()=>[u("div",Z,[s(X,{modelValue:l(k),"onUpdate:modelValue":o[0]||(o[0]=d=>y(k)?k.value=d:k=d),class:"_formBlock"},{default:e(()=>[u("option",$,i(l(n).ts.none)+" ("+i(l(n).ts.notRecommended)+") ",1),o[5]||(o[5]=u("option",{value:"hcaptcha"},"hCaptcha",-1)),o[6]||(o[6]=u("option",{value:"recaptcha"},"reCAPTCHA",-1))]),_:1},8,["modelValue"]),l(k)==="hcaptcha"?(S(),P(w,{key:0},[s(B,{modelValue:l(b),"onUpdate:modelValue":o[1]||(o[1]=d=>y(b)?b.value=d:b=d),class:"_formBlock"},{prefix:e(()=>[...o[7]||(o[7]=[u("i",{class:"ph-key ph-bold ph-lg"},null,-1)])]),label:e(()=>[t(i(l(n).ts.hcaptchaSiteKey),1)]),_:1},8,["modelValue"]),s(B,{modelValue:l(m),"onUpdate:modelValue":o[2]||(o[2]=d=>y(m)?m.value=d:m=d),class:"_formBlock"},{prefix:e(()=>[...o[8]||(o[8]=[u("i",{class:"ph-key ph-bold ph-lg"},null,-1)])]),label:e(()=>[t(i(l(n).ts.hcaptchaSecretKey),1)]),_:1},8,["modelValue"]),s(U,{class:"_formBlock"},{label:e(()=>[t(i(l(n).ts.preview),1)]),default:e(()=>[s(l(V),{provider:"hcaptcha",sitekey:l(b)||"10000000-ffff-ffff-ffff-000000000001"},null,8,["sitekey"])]),_:1})],64)):l(k)==="recaptcha"?(S(),P(w,{key:1},[s(B,{modelValue:l(r),"onUpdate:modelValue":o[3]||(o[3]=d=>y(r)?r.value=d:r=d),class:"_formBlock"},{prefix:e(()=>[...o[9]||(o[9]=[u("i",{class:"ph-key ph-bold ph-lg"},null,-1)])]),label:e(()=>[t(i(l(n).ts.recaptchaSiteKey),1)]),_:1},8,["modelValue"]),s(B,{modelValue:l(f),"onUpdate:modelValue":o[4]||(o[4]=d=>y(f)?f.value=d:f=d),class:"_formBlock"},{prefix:e(()=>[...o[10]||(o[10]=[u("i",{class:"ph-key ph-bold ph-lg"},null,-1)])]),label:e(()=>[t(i(l(n).ts.recaptchaSecretKey),1)]),_:1},8,["modelValue"]),l(r)?(S(),C(U,{key:0,class:"_formBlock"},{label:e(()=>[t(i(l(n).ts.preview),1)]),default:e(()=>[s(l(V),{provider:"recaptcha",sitekey:l(r)},null,8,["sitekey"])]),_:1})):K("",!0)],64)):K("",!0),s(I,{primary:"",onClick:g},{default:e(()=>[o[11]||(o[11]=u("i",{class:"ph-floppy-disk-back ph-bold ph-lg"},null,-1)),t(" "+i(l(n).ts.save),1)]),_:1})])]),_:1})]))}}),le={class:"_formRoot"},ae={class:"_formRoot"},te={class:"_formBlock"},oe={class:"_formRoot"},se={class:"_formRoot"},ne={class:"_formRoot"},ye=T({__name:"security",setup(N){let V=c(""),k=c(!1),b=c(!1),m=c(!1),r=c(!1),f=c(!1),v=c(!1),g=c("");async function h(){const _=await D("admin/meta");V.value=_.summalyProxy,k.value=_.enableHcaptcha,b.value=_.enableRecaptcha,m.value=_.enableIpLogging,r.value=_.enableActiveEmailValidation,f.value=_.secureMode,v.value=_.privateMode,g.value=_.allowedHosts.join(`
`)}function o(){A("admin/update-meta",{summalyProxy:V.value,enableIpLogging:m.value,enableActiveEmailValidation:r.value}).then(()=>{H()})}function d(){A("admin/update-meta",{secureMode:f.value,privateMode:v.value,allowedHosts:g.value.split(`
`)}).then(()=>{H()})}const j=F(()=>[]),q=F(()=>[]);return G({title:n.ts.security,icon:"ph-lock ph-bold ph-lg"}),(_,a)=>{const J=R("MkPageHeader"),O=R("MkSpacer"),W=R("MkStickyContainer");return S(),C(W,null,{header:e(()=>[s(J,{actions:j.value,tabs:q.value,"display-back-button":!0},null,8,["actions","tabs"])]),default:e(()=>[s(O,{"content-max":700,"margin-min":16,"margin-max":32},{default:e(()=>[s(L,{p:h},{default:e(()=>[u("div",le,[s(x,{class:"_formBlock"},E({icon:e(()=>[a[6]||(a[6]=u("i",{class:"ph-robot ph-bold ph-lg"},null,-1))]),label:e(()=>[t(i(l(n).ts.botProtection),1)]),default:e(()=>[s(ee)]),_:2},[l(k)?{name:"suffix",fn:e(()=>[a[7]||(a[7]=t("hCaptcha",-1))]),key:"0"}:l(b)?{name:"suffix",fn:e(()=>[a[8]||(a[8]=t("reCAPTCHA",-1))]),key:"1"}:{name:"suffix",fn:e(()=>[t(i(l(n).ts.none)+" ("+i(l(n).ts.notRecommended)+")",1)]),key:"2"}]),1024),s(x,{class:"_formBlock"},E({label:e(()=>[a[9]||(a[9]=t("Active Email Validation",-1))]),default:e(()=>[u("div",ae,[u("span",te,i(l(n).ts.activeEmailValidationDescription),1),s(M,{modelValue:l(r),"onUpdate:modelValue":[a[0]||(a[0]=p=>y(r)?r.value=p:r=p),o],class:"_formBlock"},{label:e(()=>[...a[12]||(a[12]=[t("Enable",-1)])]),_:1},8,["modelValue"])])]),_:2},[l(r)?{name:"suffix",fn:e(()=>[a[10]||(a[10]=t("Enabled",-1))]),key:"0"}:{name:"suffix",fn:e(()=>[a[11]||(a[11]=t("Disabled",-1))]),key:"1"}]),1024),s(x,{class:"_formBlock"},E({label:e(()=>[a[13]||(a[13]=t("Log IP address",-1))]),default:e(()=>[u("div",oe,[s(M,{modelValue:l(m),"onUpdate:modelValue":[a[1]||(a[1]=p=>y(m)?m.value=p:m=p),o],class:"_formBlock"},{label:e(()=>[...a[16]||(a[16]=[t("Enable",-1)])]),_:1},8,["modelValue"])])]),_:2},[l(m)?{name:"suffix",fn:e(()=>[a[14]||(a[14]=t("Enabled",-1))]),key:"0"}:{name:"suffix",fn:e(()=>[a[15]||(a[15]=t("Disabled",-1))]),key:"1"}]),1024),s(x,{class:"_formBlock"},{label:e(()=>[...a[17]||(a[17]=[t("Summaly Proxy",-1)])]),default:e(()=>[u("div",se,[s(B,{modelValue:l(V),"onUpdate:modelValue":a[2]||(a[2]=p=>y(V)?V.value=p:V=p),class:"_formBlock"},{prefix:e(()=>[...a[18]||(a[18]=[u("i",{class:"ph-link-simple ph-bold ph-lg"},null,-1)])]),label:e(()=>[...a[19]||(a[19]=[t("Summaly Proxy URL",-1)])]),_:1},8,["modelValue"]),s(I,{primary:"",class:"_formBlock",onClick:o},{default:e(()=>[a[20]||(a[20]=u("i",{class:"ph-floppy-disk-back ph-bold ph-lg"},null,-1)),t(" "+i(l(n).ts.save),1)]),_:1})])]),_:1}),s(x,{class:"_formBlock"},{label:e(()=>[t(i(l(n).ts.instanceSecurity),1)]),default:e(()=>[u("div",ne,[l(v)?K("",!0):(S(),C(M,{key:0,modelValue:l(f),"onUpdate:modelValue":a[3]||(a[3]=p=>y(f)?f.value=p:f=p)},{label:e(()=>[t(i(l(n).ts.secureMode),1)]),caption:e(()=>[t(i(l(n).ts.secureModeInfo),1)]),_:1},8,["modelValue"])),s(M,{modelValue:l(v),"onUpdate:modelValue":a[4]||(a[4]=p=>y(v)?v.value=p:v=p)},{label:e(()=>[t(i(l(n).ts.privateMode),1)]),caption:e(()=>[t(i(l(n).ts.privateModeInfo),1)]),_:1},8,["modelValue"]),l(v)?(S(),C(Q,{key:1,modelValue:l(g),"onUpdate:modelValue":a[5]||(a[5]=p=>y(g)?g.value=p:g=p)},{label:e(()=>[t(i(l(n).ts.allowedInstances),1)]),caption:e(()=>[t(i(l(n).ts.allowedInstancesDescription),1)]),_:1},8,["modelValue"])):K("",!0),s(I,{primary:"",class:"_formBlock",onClick:d},{default:e(()=>[a[21]||(a[21]=u("i",{class:"ph-floppy-disk-back ph-bold ph-lg"},null,-1)),t(" "+i(l(n).ts.save),1)]),_:1})])]),_:1})])]),_:1})]),_:1})]),_:1})}}});export{ye as default};
//# sourceMappingURL=security-CXmA2WG9.js.map
