System.register(["./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./setting-legacy-DG9cBT-a.js?v=1773287522785","./index-legacy-DEYz4m3y.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./index-legacy-hh1mlQOF.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-B9P08_gB.js?v=1773287522785","./index-legacy-BFkuWVH1.js?v=1773287522785"],(function(e,t){"use strict";var a,l,n,i,c,o,u,s,r,g,d,f,_,p,y,v,m,x,j,w,S,b,h,W,C,k,$,B,P,U,D;return{setters:[e=>{a=e._},e=>{l=e._},e=>{n=e.k,i=e.R,c=e.r,o=e.$,u=e.Z,s=e._,r=e.a0,g=e.ai,d=e.X,f=e.S,_=e.a9,p=e.j,y=e.aa},e=>{v=e.i,m=e.m,x=e.p,j=e.ht,w=e.h},e=>{S=e.u},e=>{b=e.u},e=>{h=e.P,W=e.g,C=e.Q,k=e.R,$=e.S},e=>{B=e._},e=>{P=e.b,U=e.B,D=e.k},null,null,null,null,null,null],execute:function(){const t={class:"p-20px"},E={class:"flex mb-16px"},R={class:"flex-1 mr-16px"};e("default",n({__name:"config",setup(e){const{t:n}=i(),T=c(""),A=async()=>{""!==T.value.trim()?(await C({text:T.value}),T.value="",q()):m.error(n("Waf.Setting.config_176"))},I=()=>{const e=c("");x({title:n("Waf.Setting.config_187"),width:440,footer:!0,content:()=>r("div",{class:"p-20px"},[r(B,{value:e.value,"onUpdate:value":t=>e.value=t,rows:14,placeholder:n("Waf.Setting.config_188")},null)]),onConfirm:async()=>{if(""===e.value.trim())return m.error(n("Waf.Setting.config_179")),!1;await k({text:e.value}),q()}})},K=()=>{const e=c(Q.data.map((e=>e.word)).join("\n"));x({title:n("Waf.Setting.config_177"),width:440,footer:!0,content:()=>r("div",{class:"p-20px"},[r(B,{value:e.value,"onUpdate:value":t=>e.value=t,rows:14,readonly:!0},null)]),onConfirm:()=>(j(e.value,"body_intercept.json"),!1)})},L=()=>{w({title:n("Waf.Setting.config_180"),content:n("Waf.Setting.config_181"),onConfirm:async()=>{await $(),q()}})},{table:Q,columns:X,setLoading:Z}=b([{key:"word",title:n("Waf.Setting.config_184")},S({width:80,options:e=>[{label:n("Public.Btn.Del"),onClick:async()=>{await h({text:e.word}),q()}}]})]),q=async()=>{try{Z(!0);const{message:e}=await W();v(e)&&(Q.data=e.body_intercept.map((e=>({word:e}))))}finally{Z(!1)}};return q(),(e,n)=>{const i=P,c=U,v=l,m=D,x=a;return o(),u("div",t,[s("div",E,[s("div",R,[r(i,{value:f(T),"onUpdate:value":n[0]||(n[0]=e=>d(T)?T.value=e:null),placeholder:e.$t("Waf.Setting.config_184"),onKeyup:g(A,["enter"])},null,8,["value","placeholder"])]),r(c,{type:"primary",onClick:A},{default:_((()=>[p(y(e.$t("Public.Btn.Add")),1)])),_:1})]),r(v,{"max-height":258,loading:f(Q).loading,data:f(Q).data,columns:f(X)},null,8,["loading","data","columns"]),r(m,{class:"mt-16px"},{default:_((()=>[r(c,{onClick:I},{default:_((()=>[p(y(e.$t("Public.Btn.Import")),1)])),_:1}),r(c,{onClick:K},{default:_((()=>[p(y(e.$t("Public.Btn.Export")),1)])),_:1}),r(c,{onClick:L},{default:_((()=>[p(y(e.$t("Public.Btn.Empty")),1)])),_:1})])),_:1}),r(x,{class:"mt-16px"},{default:_((()=>[s("li",null,y(e.$t("Waf.Setting.config_185")),1),s("li",null,y(e.$t("Waf.Setting.config_186")),1)])),_:1})])}}}))}}}));
