System.register(["./public-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./setting-legacy.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./index-legacy99.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172"],(function(e,a){"use strict";var t,l,i,n,r,s,o,u,c,p,g,f,d,_,y,m,v,S,b,W,h,w,x,j,k,$,U;return{setters:[e=>{t=e.c,l=e.f,i=e.h,n=e._,r=e.u},e=>{s=e.c},e=>{o=e.o,u=e.p,c=e.g},e=>{p=e._},e=>{g=e._},e=>{f=e.k,d=e.P,_=e.r,y=e.e,m=e.R,v=e.S,S=e.X,b=e.a3,W=e.U,h=e.V,w=e.j,x=e.a4},e=>{j=e.dV,k=e.au,$=e.dP,U=e.aC},null,null],execute:function(){const a={class:"p-20px"},T={class:"w-100px mr-8px"},R={class:"w-220px"},C={class:"w-328px"},L={class:"w-100px"},P=f({__name:"form",props:{isEdit:{type:Boolean,default:!1}},emits:["refresh"],setup(e,{expose:t,emit:l}){const i=l,{t:n}=d(),r=_(null),s=y({sType:"url",uri:"",param:"",type:1}),u=[{label:n("Waf.Setting.config_75"),value:"url"},{label:n("Waf.Setting.config_76"),value:"regular"}],c=[{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:()=>""!==s.uri.trim()||new Error(n("Waf.Setting.config_55"))}};return t({onConfirm:async()=>{await(r.value?.validate()),await o({stype:s.sType,uri:s.uri,param:s.param.replace(/\n/g,",").split(","),type:s.type}),i("refresh")}}),(e,t)=>{const l=j,i=k,n=$,o=g,d=p;return m(),v("div",a,[S(d,{ref_key:"formRef",ref:r,model:h(s),rules:f},{default:b((()=>[S(n,{label:e.$t("Waf.Setting.config_73"),path:"uri"},{default:b((()=>[W("div",T,[S(l,{value:h(s).sType,"onUpdate:value":t[0]||(t[0]=e=>h(s).sType=e),options:u},null,8,["value"])]),W("div",R,[S(i,{value:h(s).uri,"onUpdate:value":t[1]||(t[1]=e=>h(s).uri=e),placeholder:"URL"},null,8,["value"])])])),_:1},8,["label"]),S(n,{label:e.$t("Waf.Setting.config_65"),path:"param"},{default:b((()=>[W("div",C,[S(o,{value:h(s).param,"onUpdate:value":t[2]||(t[2]=e=>h(s).param=e),rows:4,placeholder:e.$t("Waf.Setting.config_74")},null,8,["value","placeholder"])])])),_:1},8,["label"]),S(n,{label:e.$t("Waf.Setting.config_67"),path:"type","show-feedback":!1},{default:b((()=>[W("div",L,[S(l,{value:h(s).type,"onUpdate:value":t[3]||(t[3]=e=>h(s).type=e),"consistent-menu-width":!1,options:c},null,8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}}),B={class:"p-20px"},E={class:"flex mb-16px"};e("default",f({__name:"config",setup(e){const{t:a}=d(),o=async()=>{var e;e={title:a("Waf.Setting.config_64"),data:{isEdit:!1}},r({title:e.title,width:550,footer:!0,data:{...e.data,onRefresh:()=>{_()}},component:P})},{table:p,columns:g,setLoading:f}=t([{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}},l({width:60,options:e=>[{label:a("Public.Btn.Del"),onClick:async()=>{await u({uri:e.url}),_()}}]})]),_=async()=>{try{f(!0);const{message:e}=await c();s(e)&&(p.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 t=U,l=i,r=n;return m(),v("div",B,[W("div",E,[S(t,{type:"primary",onClick:o},{default:b((()=>[w(x(e.$t("Public.Btn.Add")),1)])),_:1})]),S(l,{"max-height":368,loading:h(p).loading,data:h(p).data,columns:h(g)},null,8,["loading","data","columns"]),S(r,{class:"mt-12px"},{default:b((()=>[W("li",null,x(e.$t("Waf.Setting.config_60")),1),W("li",null,x(e.$t("Waf.Setting.config_61")),1),W("li",null,x(e.$t("Waf.Setting.config_62")),1),W("li",null,x(e.$t("Waf.Setting.config_63")),1)])),_:1})])}}}))}}}));
