System.register(["./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.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.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./index-legacy-DEYz4m3y.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.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,a){"use strict";var t,l,i,n,s,u,r,c,p,o,g,f,d,_,y,v,m,b,S,W,j,x,h,w,k,$,T;return{setters:[e=>{t=e._},e=>{l=e._},e=>{i=e.i,n=e.p},e=>{s=e.u},e=>{u=e.u},e=>{r=e.o,c=e.p,p=e.g},e=>{o=e._},e=>{g=e._},e=>{f=e.k,d=e.R,_=e.r,y=e.e,v=e.$,m=e.Z,b=e.a0,S=e.a9,W=e._,j=e.S,x=e.j,h=e.aa},e=>{w=e.a1,k=e.a6,$=e.b,T=e.B},null,null,null,null,null,null],execute:function(){const a={class:"p-20px"},U={class:"w-100px mr-8px"},R={class:"w-220px"},B={class:"w-328px"},C={class:"w-100px"},L=f({__name:"form",props:{isEdit:{type:Boolean,default:!1}},emits:["refresh"],setup(e,{expose:t,emit:l}){const i=l,{t:n}=d(),s=_(null),u=y({sType:"url",uri:"",param:"",type:1}),c=[{label:n("Waf.Setting.config_75"),value:"url"},{label:n("Waf.Setting.config_76"),value:"regular"}],p=[{label:n("Waf.Setting.config_68"),value:1},{label:n("Waf.Setting.config_69"),value:2},{label:n("Waf.Setting.config_70"),value:3},{label:n("Waf.Setting.config_71"),value:4}],f={uri:{trigger:["blur","input"],validator:()=>""!==u.uri.trim()||new Error(n("Waf.Setting.config_55"))}};return t({onConfirm:async()=>{await(s.value?.validate()),await r({stype:u.sType,uri:u.uri,param:u.param.replace(/\n/g,",").split(","),type:u.type}),i("refresh")}}),(e,t)=>{const l=k,i=$,n=w,r=g,d=o;return v(),m("div",a,[b(d,{ref_key:"formRef",ref:s,model:j(u),rules:f},{default:S((()=>[b(n,{label:e.$t("Waf.Setting.config_73"),path:"uri"},{default:S((()=>[W("div",U,[b(l,{value:j(u).sType,"onUpdate:value":t[0]||(t[0]=e=>j(u).sType=e),options:c},null,8,["value"])]),W("div",R,[b(i,{value:j(u).uri,"onUpdate:value":t[1]||(t[1]=e=>j(u).uri=e),placeholder:"URL"},null,8,["value"])])])),_:1},8,["label"]),b(n,{label:e.$t("Waf.Setting.config_65"),path:"param"},{default:S((()=>[W("div",B,[b(r,{value:j(u).param,"onUpdate:value":t[2]||(t[2]=e=>j(u).param=e),rows:4,placeholder:e.$t("Waf.Setting.config_74")},null,8,["value","placeholder"])])])),_:1},8,["label"]),b(n,{label:e.$t("Waf.Setting.config_67"),path:"type","show-feedback":!1},{default:S((()=>[W("div",C,[b(l,{value:j(u).type,"onUpdate:value":t[3]||(t[3]=e=>j(u).type=e),"consistent-menu-width":!1,options:p},null,8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}}),E={class:"p-20px"},D={class:"flex mb-16px"};e("default",f({__name:"config",setup(e){const{t:a}=d(),r=async()=>{var e;e={title:a("Waf.Setting.config_64"),data:{isEdit:!1}},n({title:e.title,width:550,footer:!0,data:{...e.data,onRefresh:()=>{_()}},component:L})},{table:o,columns:g,setLoading:f}=u([{key:"url",title:"URL",ellipsis:{tooltip:!0}},{key:"param",title:a("Waf.Setting.config_65"),width:120,ellipsis:{tooltip:!0},render:e=>e.param?e.param.join(", "):"--"},{key:"sType",title:a("Waf.Setting.config_66"),width:80,render:e=>"regular"==e.sType?a("Waf.Setting.config_72"):"URL"},{key:"type",title:a("Waf.Setting.config_67"),width:90,render:e=>{var t="";switch(e.type){case 1:t=a("Waf.Setting.config_68");break;case 2:t=a("Waf.Setting.config_69");break;case 3:t=a("Waf.Setting.config_70");break;case 4:t=a("Waf.Setting.config_71")}return t}},s({width:60,options:e=>[{label:a("Public.Btn.Del"),onClick:async()=>{await c({uri:e.url}),_()}}]})]),_=async()=>{try{f(!0);const{message:e}=await p();i(e)&&(o.data=Object.entries(e.url_cc_param).map((([e,a])=>({url:e,type:a.type,param:a.param,sType:a.stype}))))}finally{f(!1)}};return _(),(e,a)=>{const i=T,n=l,s=t;return v(),m("div",E,[W("div",D,[b(i,{type:"primary",onClick:r},{default:S((()=>[x(h(e.$t("Public.Btn.Add")),1)])),_:1})]),b(n,{"max-height":368,loading:j(o).loading,data:j(o).data,columns:j(g)},null,8,["loading","data","columns"]),b(s,{class:"mt-12px"},{default:S((()=>[W("li",null,h(e.$t("Waf.Setting.config_60")),1),W("li",null,h(e.$t("Waf.Setting.config_61")),1),W("li",null,h(e.$t("Waf.Setting.config_62")),1),W("li",null,h(e.$t("Waf.Setting.config_63")),1)])),_:1})])}}}))}}}));
