System.register(["./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./setting-legacy-DG9cBT-a.js?v=1773287522785","./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.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 l,a,n,i,c,s,u,r,o,d,f,y,g,p,_,m,v,x,b,w,j,h,S,q,W,k,E,$,U;return{setters:[e=>{l=e._},e=>{a=e.i,n=e.p},e=>{i=e.g},e=>{c=e.u},e=>{s=e.u},e=>{u=e.k,r=e.l,o=e.n,d=e.g},e=>{f=e._},e=>{y=e._},e=>{g=e.k,p=e.R,_=e.r,m=e.e,v=e.$,x=e.Z,b=e.a0,w=e.a9,j=e._,h=e.S,S=e.aa,q=e.N,W=e.j},e=>{k=e.a1,E=e.b,$=e._,U=e.B},null,null,null,null,null],execute:function(){const t={class:"p-20px"},B={class:"w-220px"},C={class:"ml-8px text-desc"},P={class:"w-220px mr-8px"},R={class:"text-desc"},L={class:"w-220px mr-8px"},T={class:"text-desc"},D=g({__name:"form",props:{isEdit:{type:Boolean,default:!1},row:{}},emits:["refresh"],setup(e,{expose:l,emit:a}){const n=e,i=a,{t:c}=p(),s=_(null),o=m({url:"",frequency:30,cycle:60}),d={url:{trigger:["blur","input"],validator:()=>""!==o.url.trim()||new Error(c("Waf.Setting.config_55"))},frequency:{trigger:["blur","input"],validator:()=>!!o.frequency||new Error(c("Waf.Setting.config_56"))},cycle:{trigger:["blur","input"],validator:()=>!!o.cycle||new Error(c("Waf.Setting.config_57"))}};return(()=>{const{row:e,isEdit:t}=n;t&&e&&(o.url=e.url,o.frequency=e.frequency,o.cycle=e.cycle)})(),l({onConfirm:async()=>{await(s.value?.validate()),n.isEdit?await u(q(o)):await r(q(o)),i("refresh")}}),(e,l)=>{const a=E,n=k,i=$,c=y,u=f;return v(),x("div",t,[b(c,{ref_key:"formRef",ref:s,model:h(o),rules:d},{default:w((()=>[b(n,{label:"URL",path:"url"},{default:w((()=>[j("div",B,[b(a,{value:h(o).url,"onUpdate:value":l[0]||(l[0]=e=>h(o).url=e),placeholder:"/index.php"},null,8,["value"])]),j("span",C,S(e.$t("Waf.Setting.config_51")),1)])),_:1}),b(n,{label:e.$t("Waf.Setting.config_48"),path:"frequency"},{default:w((()=>[j("div",P,[b(i,{value:h(o).frequency,"onUpdate:value":l[1]||(l[1]=e=>h(o).frequency=e),min:1,"show-button":!1},null,8,["value"])]),j("span",R,S(e.$t("Public.Unit.Time",h(o).frequency)),1)])),_:1},8,["label"]),b(n,{label:e.$t("Waf.Setting.config_49"),path:"cycle"},{default:w((()=>[j("div",L,[b(i,{value:h(o).cycle,"onUpdate:value":l[2]||(l[2]=e=>h(o).cycle=e),min:1,"show-button":!1},null,8,["value"])]),j("span",T,S(e.$t("Public.Unit.Second",h(o).cycle)),1)])),_:1},8,["label"])])),_:1},8,["model"]),b(u,{class:"mt-12px"},{default:w((()=>[j("li",null,S(e.$t("Waf.Setting.config_54")),1)])),_:1})])}}}),Z={class:"p-20px"},A={class:"flex mb-16px"};e("default",g({__name:"config",setup(e){const{t:t}=p(),u=e=>{n({title:e.title,width:570,footer:!0,data:{...e.data,onRefresh:()=>{_()}},component:D})},r=async()=>{u({title:t("Waf.Setting.config_46"),data:{isEdit:!1}})},{table:f,columns:y,setLoading:g}=s([{key:"url",title:"URL",ellipsis:{tooltip:!0}},{key:"frequency",title:t("Waf.Setting.config_48"),width:100,ellipsis:{tooltip:!0}},{key:"cycle",title:t("Waf.Setting.config_49"),width:120,ellipsis:{tooltip:!0},render:e=>t("Waf.Setting.config_50",[e.cycle])},c({width:100,options:e=>[{label:t("Public.Btn.Edit"),onClick:async()=>{(async e=>{u({title:t("Waf.Setting.config_47"),data:{row:e,isEdit:!0}})})(e)}},{label:t("Public.Btn.Del"),onClick:async()=>{await o({url:e.url}),_()}}]})]),_=async()=>{try{g(!0);const{message:e}=await d();a(e)&&(f.data=Object.entries(e.cc_uri_frequency).map((([e,t])=>({url:e,frequency:i(t.frequency),cycle:i(t.cycle)}))))}finally{g(!1)}};return _(),(e,t)=>{const a=U,n=l;return v(),x("div",Z,[j("div",A,[b(a,{type:"primary",onClick:r},{default:w((()=>[W(S(e.$t("Public.Btn.Add")),1)])),_:1})]),b(n,{"max-height":368,loading:h(f).loading,data:h(f).data,columns:h(y)},null,8,["loading","data","columns"])])}}}))}}}));
