System.register(["./page_layout-legacy.js?v=1753954525509","./index-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy4.js?v=1753954525509","./public-legacy.js?v=1753954525509","./useModal-legacy3.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509"],(function(e,a){"use strict";var t,s,i,n,l,o,r,d,c,u,_,p,f,g,y,b,m,w,x,W,h,A,v,j,k;return{setters:[e=>{t=e.v,s=e.i,i=e.w,n=e.a},e=>{l=e._},e=>{o=e._},e=>{r=e.e,d=e.b,c=e.h,u=e.f},e=>{_=e.u},e=>{p=e.c5,f=e.cG,g=e.cD,y=e.ay},e=>{b=e.k,m=e.P,w=e.Q,x=e.U,W=e.a1,h=e.a2,A=e.j,v=e.a3,j=e.X,k=e._}],execute:function(){e("g",(()=>t.post("/plugin?action=a&name=btwaf&s=reg_domains"))),e("a",(e=>t.post("/plugin?action=a&name=btwaf&s=add_reg_tions",e,{requestOptions:{loading:s.global.t("Waf.Api.area_32"),successMessage:!0}})));const O=e=>t.post("/plugin?action=a&name=btwaf&s="+(0===e.select?"edit_reg_tions":"edit_city"),{id:e.id,open:e.open,status:e.status},{requestOptions:{loading:s.global.t("Waf.Api.area_34"),successMessage:!0}}),M=b({__name:"index",setup(e){const b=k((()=>n((()=>a.import("./index-legacy220.js?v=1753954525509")),void 0))),{t:M}=m(),q=r(M("Waf.Area.index_1"),{onRefresh:()=>{S()}}),U=()=>{q.show=!0},{table:z,columns:C,setLoading:P}=d([{key:"region",title:M("Waf.Area.index_2"),minWidth:300,render:e=>Object.entries(e.region).filter((([,e])=>1==e)).map((([e])=>e)).join(", ")},{key:"open",title:M("Waf.Area.index_3"),minWidth:80,render:(e,a)=>w(p,{value:e.open,size:"small",onUpdateValue:async t=>{await O({select:e.select,id:a,open:t,status:e.status}),e.open=t}},null)},{key:"status",title:M("Waf.Area.index_4"),width:"14%",render:(e,a)=>w("div",{class:"w-210px"},[w(f,{value:e.status,size:"small",options:[{label:M("Waf.Area.index_5"),value:200},{label:M("Waf.Area.index_6"),value:404},{label:M("Waf.Area.index_7"),value:403},{label:M("Waf.Area.index_8"),value:444},{label:M("Waf.Area.index_9"),value:502},{label:M("Waf.Area.index_10"),value:503}],onUpdateValue:async t=>{await O({select:e.select,id:a,open:e.open,status:t}),e.status=t}},null)])},{key:"site",title:M("Waf.Area.index_11"),minWidth:260,render:e=>Object.entries(e.site).filter((([,e])=>1==e)).map((([e])=>"allsite"===e?M("Waf.Area.index_12"):e)).join(", ")},{key:"types",title:M("Waf.Area.index_13"),minWidth:90,render:e=>"refuse"===e.types?M("Waf.Area.index_15"):M("Waf.Area.index_14")},c({width:120,options:(e,a)=>[{label:M("Waf.Area.index_16"),onClick:()=>{_({path:`/www/server/btwaf/html/${e.reqfile}`})}},{label:M("Public.Btn.Del"),onClick:async()=>{var i;await(i={select:e.select,id:a},t.post("/plugin?action=a&name=btwaf&s="+(0===i.select?"del_reg_tions":"del_city"),{id:i.id},{requestOptions:{loading:s.global.t("Waf.Api.area_33"),successMessage:!0}})),S()}}]})]),S=async()=>{try{P(!0);const{message:e}=await t.post("/btwaf/get_reg_tions.json");i(e)&&(e.forEach(((e,a)=>{e.forEach((e=>{e.select=a}))})),z.data=e.reduce(((e,a)=>e.concat(a)),[]))}finally{P(!1)}};return S(),(e,a)=>{const t=y,s=u,i=o,n=l,r=g;return x(),W(r,{class:"p-16px"},{default:h((()=>[w(i,null,{toolsLeft:h((()=>[w(t,{type:"primary",onClick:U},{default:h((()=>[A(v(e.$t("Waf.Area.index_1")),1)])),_:1})])),table:h((()=>[w(s,{loading:j(z).loading,data:j(z).data,columns:j(C)},null,8,["loading","data","columns"])])),_:1}),w(n,{show:j(q).show,"onUpdate:show":a[0]||(a[0]=e=>j(q).show=e),title:j(q).title,data:j(q).data,width:720,"min-height":454,footer:!0,component:j(b)},null,8,["show","title","data","component"])])),_:1})}}}),q=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));e("i",q)}}}));
