System.register(["./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785"],(function(t,e){"use strict";var s,o,i,n,a;return{setters:[t=>{s=t.a4,o=t.e},t=>{i=t.as,n=t.a3,a=t.i}],execute:function(){t("g",(()=>i.post("/plugin?action=a&name=btwaf&s=get_customize_list"))),t("s",(t=>i.post("/plugin?action=a&name=btwaf&s=set_status_customize_rule",t,{requestOptions:{loading:n.global.t("Waf.Api.custom_35"),successMessage:!0}}))),t("a",(t=>i.post("/plugin?action=a&name=btwaf&s=create_customize_rule",{infos:JSON.stringify(t)},{requestOptions:{loading:n.global.t("Waf.Api.custom_36"),successMessage:!0}}))),t("e",(t=>i.post("/plugin?action=a&name=btwaf&s=update_customize_rule",{id:t.id,infos:JSON.stringify(t.infos)},{requestOptions:{loading:n.global.t("Waf.Api.custom_37"),successMessage:!0}}))),t("r",(t=>i.post("/plugin?action=a&name=btwaf&s=remove_customize_rule",t,{requestOptions:{loading:n.global.t("Waf.Api.custom_38"),successMessage:!0}}))),t("u",s("waf-custom-rule",(()=>{const t=o({action:[],operators:{},options:[],sitemap:{}}),e=e=>{const s=t.options.find((t=>t.type===e));return s?s.text:"--"};return{config:t,getConfig:async()=>{const{message:e}=await i.post("/plugin?action=a&name=btwaf&s=get_customize_config_help");a(e)&&(t.action=e.action,t.operators=e.operators,t.options=e.options,t.sitemap=e.sitemap)},clearConfig:()=>{t.action=[],t.operators={},t.options=[],t.sitemap={}},getSiteName:e=>e.map((e=>t.sitemap[e]||"--")).join(", "),getConditionName:e,getMatchCondition:t=>{const s=[],o=t=>{for(let e=0;e<t.length;e++)if("block"===t[e].type)o(t[e].children);else if("option"===t[e].type){const{option:o}=t[e];o&&s.push(o.type)}};return o(t.children),[...new Set(s)].map((t=>e(t))).join("，")},getExecuteAction:(e,s)=>{const o=t.action.find((t=>t.type===e));if(o){const t=o.response.find((t=>t.type===s));return t?`${o.text} (${t.text})`:o.text}return"--"},getOperatorName:e=>t.operators[e]?t.operators[e].text:"--"}})))}}}));
