const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/details.js?v=1763625242172","js/index178.js?v=1763625242172","js/__commonjsHelpers__.js?v=1763625242172","js/page_layout.js?v=1763625242172","js/vue.js?v=1763625242172","js/naive.js?v=1763625242172","js/common.js?v=1763625242172","js/public.js?v=1763625242172","css/public.css?v=1763625242172","css/page_layout.css?v=1763625242172","css/index27.css?v=1763625242172","js/rules.js?v=1763625242172","css/details2.css?v=1763625242172"])))=>i.map(i=>d[i]);
import{bf as a,i as t,m as s,a as e}from"./page_layout.js?v=1763625242172";import{a as o,u as l}from"./public.js?v=1763625242172";import{a as i}from"./rules.js?v=1763625242172";import{r as n,X as p,ab as c,F as _,_ as r,u as g}from"./vue.js?v=1763625242172";import{_ as u}from"./naive.js?v=1763625242172";const f=t=>a.post("/btwaf/attack_report_log.json",t),b=t=>a.post("/btwaf/get_logs",t),d=()=>a.post("/plugin?action=a&name=btwaf&s=get_site_config"),m=s=>a.post("/plugin?action=a&name=btwaf&s=remove_log",{...s,site_logs:JSON.stringify(1===s.site_all?[]:s.site_logs)},{requestOptions:{loading:t.global.t("Waf.Api.block_16"),successMessage:!0}}),k=t=>a.post("/plugin?action=a&name=btwaf&s=get_safe_logs_sql",t),w=s=>a.post("/plugin?action=a&name=btwaf&s=remove_waf_drop_ip",s,{requestOptions:{loading:t.global.t("Waf.Api.block_17"),successMessage:!0}}),h=()=>a.post("/plugin?action=a&name=btwaf&s=clean_waf_drop_ip",{},{requestOptions:{loading:t.global.t("Waf.Api.block_18"),successMessage:!0}}),v=t=>a.post("/plugin?action=a&name=btwaf&s=get_rule_hit_list",t),W=()=>a.post("/plugin?action=a&name=btwaf&s=delete_rule_hit_list",{},{requestOptions:{loading:t.global.t("Waf.Api.block_19"),successMessage:!0}}),x=()=>a.post("/plugin?action=a&name=btwaf&s=get_rule_hit_type_list"),O=s=>a.post("/plugin?action=a&name=btwaf&s=set_hit_type",{data:JSON.stringify(s.data)},{requestOptions:{loading:t.global.t("Waf.Api.block_20"),successMessage:!0}});function j(a){return"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!g(a)}const y=e=>{const l=n(!1);o({title:t.global.t("Waf.Block.index_74"),content:()=>{let a;return p(_,null,[p(c,{tag:"div",keypath:"Waf.Block.index_82",scope:"global"},{ip:()=>p("span",{class:"text-error"},[e.ip])}),p(u,{checked:l.value,"onUpdate:checked":a=>l.value=a,class:"mt-12px"},j(a=t.global.t("Waf.Block.index_79"))?a:{default:()=>[a]})])},onConfirm:async()=>{if(l.value){const l=e.ip.replace(/\d{1,3}$/,"0/24");await(o={s_Name:"ip_black",pdata:l},a.post("/plugin?action=a&name=btwaf&s=import_data",o,{requestOptions:{loading:t.global.t("Waf.Api.block_14")}})),s.success(t.global.t("Waf.Block.index_75"))}else await i({start_ip:e.ip,end_ip:e.ip});var o}})},B=(e,l=!0)=>{if("/"===e.uri)return void s.error(t.global.t("Waf.Block.index_76"));const i=n(!1);o({title:t.global.t("Waf.Block.index_77"),content:()=>{let a;return p(_,null,[p("div",null,[t.global.t("Waf.Block.index_80")]),l?p(u,{checked:i.value,"onUpdate:checked":a=>i.value=a,class:"mt-12px"},j(a=t.global.t("Waf.Block.index_81"))?a:{default:()=>[a]}):""])},onConfirm:async()=>{let s=e.http_log;if(1===e.http_log_path){const{message:a}=await b({path:e.http_log});s=a.result}var o;await(o={url_rule:e.uri,error_log:e.ip+" >> "+e.incoming_value,http_log:s,...i.value?{param:1}:{}},a.post("/plugin?action=a&name=btwaf&s=wubao_url_white",o,{requestOptions:{loading:t.global.t("Waf.Api.block_15"),successMessage:!0}}))}})},q=a=>{l({title:t.global.t("Waf.Block.index_78",[a.time_localtime]),width:840,minHeight:630,data:{row:a},component:r((()=>e((()=>import("./details.js?v=1763625242172")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))))})};export{y as a,B as b,k as c,h as d,v as e,W as f,f as g,b as h,d as i,x as j,O as k,m as r,q as s,w as u};
