System.register(["./public-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./setting-legacy.js?v=1763625242172","./index-legacy99.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172"],(function(t,e){"use strict";var a,n,l,i,o,c,u,s,r,f,d,g,p,_,m,v,y,x,w,S,j,b,W,h,C,k,P,$,B,U,E;return{setters:[t=>{a=t.c,n=t.f,l=t.u,i=t.a,o=t.h,c=t._},t=>{u=t.k,s=t.P,r=t.r,f=t.R,d=t.S,g=t.U,p=t.X,_=t.V,m=t.aj,v=t.ak,y=t.a3,x=t.j,w=t.a4},t=>{S=t.c,j=t.m,b=t.hc},t=>{W=t.P,h=t.g,C=t.Q,k=t.R,P=t.S},t=>{$=t._},t=>{B=t.au,U=t.aC,E=t.d9},null,null],execute:function(){const e={class:"p-20px"},R={class:"flex mb-16px"},A={class:"flex-1 mr-16px"};t("default",u({__name:"config",setup(t){const{t:u}=s(),D=r(""),H=async()=>{""!==D.value.trim()?(await C({text:D.value}),D.value="",q()):j.error(u("Waf.Setting.config_176"))},I=()=>{const t=r("");l({title:u("Waf.Setting.config_187"),width:440,footer:!0,content:()=>p("div",{class:"p-20px"},[p($,{value:t.value,"onUpdate:value":e=>t.value=e,rows:14,placeholder:u("Waf.Setting.config_188")},null)]),onConfirm:async()=>{if(""===t.value.trim())return j.error(u("Waf.Setting.config_179")),!1;await k({text:t.value}),q()}})},K=()=>{const t=r(Q.data.map((t=>t.word)).join("\n"));l({title:u("Waf.Setting.config_177"),width:440,footer:!0,content:()=>p("div",{class:"p-20px"},[p($,{value:t.value,"onUpdate:value":e=>t.value=e,rows:14,readonly:!0},null)]),onConfirm:()=>(b(t.value,"body_intercept.json"),!1)})},L=()=>{i({title:u("Waf.Setting.config_180"),content:u("Waf.Setting.config_181"),onConfirm:async()=>{await P(),q()}})},{table:Q,columns:V,setLoading:X}=a([{key:"word",title:u("Waf.Setting.config_184")},n({width:80,options:t=>[{label:u("Public.Btn.Del"),onClick:async()=>{await W({text:t.word}),q()}}]})]),q=async()=>{try{X(!0);const{message:t}=await h();S(t)&&(Q.data=t.body_intercept.map((t=>({word:t}))))}finally{X(!1)}};return q(),(t,a)=>{const n=B,l=U,i=o,u=E,s=c;return f(),d("div",e,[g("div",R,[g("div",A,[p(n,{value:_(D),"onUpdate:value":a[0]||(a[0]=t=>m(D)?D.value=t:null),placeholder:t.$t("Waf.Setting.config_184"),onKeyup:v(H,["enter"])},null,8,["value","placeholder"])]),p(l,{type:"primary",onClick:H},{default:y((()=>[x(w(t.$t("Public.Btn.Add")),1)])),_:1})]),p(i,{"max-height":258,loading:_(Q).loading,data:_(Q).data,columns:_(V)},null,8,["loading","data","columns"]),p(u,{class:"mt-16px"},{default:y((()=>[p(l,{onClick:I},{default:y((()=>[x(w(t.$t("Public.Btn.Import")),1)])),_:1}),p(l,{onClick:K},{default:y((()=>[x(w(t.$t("Public.Btn.Export")),1)])),_:1}),p(l,{onClick:L},{default:y((()=>[x(w(t.$t("Public.Btn.Empty")),1)])),_:1})])),_:1}),p(s,{class:"mt-16px"},{default:y((()=>[g("li",null,w(t.$t("Waf.Setting.config_185")),1),g("li",null,w(t.$t("Waf.Setting.config_186")),1)])),_:1})])}}}))}}}));
