auto-vue-basic 0.0.53 → 0.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1570,7 +1570,7 @@ const ll = /* @__PURE__ */ q({
1570
1570
  MenuAll: {},
1571
1571
  MenuList: {},
1572
1572
  MenuIndeterminate: {}
1573
- }), { options: c, refresh: n } = ne(te(h, "modelValue"), b, { key: "RULE_CHECK", api: I, url: I.urls.rules, isArray: !0 }, !1);
1573
+ }), { options: c, refresh: n } = ne(te(h, "modelValue"), b, { key: "RULE_CHECK", api: I, url: I.urls.rules, isArray: !0 }, { autoRefresh: !1 });
1574
1574
  function v() {
1575
1575
  c.value.forEach((k) => {
1576
1576
  var o;
@@ -1717,7 +1717,7 @@ const ll = /* @__PURE__ */ q({
1717
1717
  for (const [g, h] of w)
1718
1718
  V[g] = h;
1719
1719
  return V;
1720
- }, rl = /* @__PURE__ */ xe(nl, [["__scopeId", "data-v-487a9d12"]]), dl = /* @__PURE__ */ q({
1720
+ }, rl = /* @__PURE__ */ xe(nl, [["__scopeId", "data-v-7adb5f76"]]), dl = /* @__PURE__ */ q({
1721
1721
  __name: "RoleFormModal",
1722
1722
  emits: ["refresh"],
1723
1723
  setup(M, { expose: w, emit: V }) {
@@ -2373,10 +2373,12 @@ const ll = /* @__PURE__ */ q({
2373
2373
  } = ne(te(h, "modelValue"), g, {
2374
2374
  key: "SITE_LIST",
2375
2375
  api: le,
2376
- isArray: !0,
2376
+ isArray: !0
2377
+ }, {
2377
2378
  formatOptions: (v) => v.map((u) => {
2378
2379
  var f;
2379
2380
  return {
2381
+ ...u,
2380
2382
  label: u.prefix + "." + ((f = u.domain) == null ? void 0 : f.name),
2381
2383
  value: u.id
2382
2384
  };
@@ -1 +1 @@
1
- (function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.AutoVueBasic={},L.Vue,L["auto-vue-manual"]))})(this,function(L,e,l){"use strict";const z=l.ApiUtils.routineApi("admin","key"),$=l.ApiUtils.routineApi("role","key"),ee=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:f,title:s,form:d,formData:p,requesting:t,executing:T,open:a,modify:m,submit:i,closed:N}=l.useForm(b,_,z),k={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("base.placeholder.select menu.Role"),trigger:"change"}]},C=e.ref([]),r=async()=>{const n=await $.list();C.value=Array.isArray(n==null?void 0:n.data)?n.data:[]};return e.onBeforeMount(async()=>{await r()}),w({open:a,modify:m}),(n,o)=>{const g=e.resolveComponent("el-input"),c=e.resolveComponent("el-form-item"),V=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),U=e.resolveComponent("el-checkbox"),R=e.resolveComponent("el-checkbox-group"),A=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":o[7]||(o[7]=B=>e.isRef(f)?f.value=B:null),title:e.unref(s)(),width:"600px",executing:e.unref(T),onClosed:e.unref(N),onSubmit:e.unref(i)},{default:e.withCtx(()=>[e.createVNode(A,{ref_key:"form",ref:d,model:e.unref(p),"label-width":"auto",rules:k,disabled:e.unref(t)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(c,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).username,"onUpdate:modelValue":o[0]||(o[0]=B=>e.unref(p).username=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).phone,"onUpdate:modelValue":o[1]||(o[1]=B=>e.unref(p).phone=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(p).key},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).password,"onUpdate:modelValue":o[2]||(o[2]=B=>e.unref(p).password=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(c,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).email,"onUpdate:modelValue":o[3]||(o[3]=B=>e.unref(p).email=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(p).language,"onUpdate:modelValue":o[4]||(o[4]=B=>e.unref(p).language=B)},{default:e.withCtx(()=>[e.createVNode(V,{value:"zh-CN"},{default:e.withCtx(()=>o[8]||(o[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(V,{value:"en-US"},{default:e.withCtx(()=>o[9]||(o[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(p).roles,"onUpdate:modelValue":o[5]||(o[5]=B=>e.unref(p).roles=B)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,B=>(e.openBlock(),e.createBlock(U,{key:B.key,value:B.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).remark,"onUpdate:modelValue":o[6]||(o[6]=B=>e.unref(p).remark=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),j=e.defineComponent({__name:"index",setup(y){const w={keyword:""},h=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:m})=>e.createVNode(l.BasicAvatar,{src:m.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:m})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[m.username]),e.createVNode("div",null,[m.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:m})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:m.key})},null)}],{requesting:b}=l.useLoading(z),{tableRef:_,formModalRef:f,keyword:s,search:d,reset:p,refresh:t,openFormModal:T,editFormModal:a}=l.useCrudPage(w);return(m,i)=>{const N=e.resolveComponent("el-input"),k=e.resolveComponent("el-space"),C=e.resolveComponent("el-page-header"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(C,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(p)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(k,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":i[0]||(i[0]=n=>e.unref(s).keyword=n),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(n=>e.unref(d)(),["enter"])),onClear:i[2]||(i[2]=n=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:i[3]||(i[3]=n=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(z).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),autoSearch:""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),le=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"})),P=l.ApiUtils.routineApi("translation","key"),re=e.defineComponent({__name:"LangFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,key:"",module:"",language:"",result:"",remark:""},f={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,P);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-input"),o=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-radio-button"),c=e.resolveComponent("el-radio-group"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[5]||(r[5]=x=>e.isRef(s)?s.value=x:null),title:e.unref(d)(),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[0]||(r[0]=x=>e.unref(t).module=x),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).key,"onUpdate:modelValue":r[1]||(r[1]=x=>e.unref(t).key=x),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).language,"onUpdate:modelValue":r[2]||(r[2]=x=>e.unref(t).language=x)},{default:e.withCtx(()=>[e.createVNode(g,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(g,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).result,"onUpdate:modelValue":r[3]||(r[3]=x=>e.unref(t).result=x),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=x=>e.unref(t).remark=x),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),I=e.defineComponent({__name:"index",setup(y){const w={keyword:"",status:0},h=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:P.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:m})=>e.createVNode(l.ModifyButton,{onModify:()=>a({id:m.id})},null)}],{requesting:b}=l.useLoading(P),{tableRef:_,formModalRef:f,keyword:s,search:d,reset:p,refresh:t,openFormModal:T,editFormModal:a}=l.useCrudPage(w);return(m,i)=>{const N=e.resolveComponent("el-input"),k=e.resolveComponent("el-radio-button"),C=e.resolveComponent("el-radio-group"),r=e.resolveComponent("el-space"),n=e.resolveComponent("el-page-header"),o=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(o,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(n,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(p)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(r,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":i[0]||(i[0]=g=>e.unref(s).keyword=g),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(g=>e.unref(d)(),["enter"])),onClear:i[2]||(i[2]=g=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(C,{modelValue:e.unref(s).status,"onUpdate:modelValue":i[3]||(i[3]=g=>e.unref(s).status=g),onChange:i[4]||(i[4]=g=>e.unref(d)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],g=>e.createVNode(k,{key:g,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${g}`),value:g},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:i[5]||(i[5]=g=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(P).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),autoSearch:""},null,8,["url","search-param"]),e.createVNode(re,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),te=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"})),ne={tops:"tops",rules:"rules"},S=l.ApiUtils.routineApi("menu","id",ne,{},["TOP_MENU_LIST","MENU_LIST"]),K=l.ApiUtils.routineApi("rule","key");/*! Element Plus Icons Vue v2.3.1 */var oe=e.defineComponent({name:"Key",__name:"key",setup(y){return(w,h)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),ae=oe;const de=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{emit:w}){const h=w,b=y,{requesting:_}=l.useLoading(S),{value:f,options:s,change:d,refresh:p,filterOptions:t}=l.useSelect(e.toRef(b,"modelValue"),h,{key:"TOP_MENU_LIST",api:S,url:S.urls.tops,isArray:!0});return(T,a)=>{const m=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(m,{class:"w-full",modelValue:e.unref(f),"onUpdate:modelValue":a[1]||(a[1]=i=>e.isRef(f)?f.value=i:null),options:e.unref(s),multiple:y.multiple,disabled:e.unref(_),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=i=>e.unref(p)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),se=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}},f={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,S);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-col"),g=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-row"),V=e.resolveComponent("el-input"),x=e.resolveComponent("el-switch"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[17]||(r[17]=R=>e.isRef(s)?s.value=R:null),title:e.unref(d)(),width:"1000px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(c,{gutter:20},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(c,{gutter:10},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(de,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=R=>e.unref(t).menu_id=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(g,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=R=>e.unref(t).sort=R),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(n,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[2]||(r[2]=R=>e.unref(t).module=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=R=>e.unref(t).name=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[4]||(r[4]=R=>e.unref(t).en_name=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).component,"onUpdate:modelValue":r[5]||(r[5]=R=>e.unref(t).component=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).url,"onUpdate:modelValue":r[6]||(r[6]=R=>e.unref(t).url=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=R=>e.unref(t).remark=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).icon,"onUpdate:modelValue":r[8]||(r[8]=R=>e.unref(t).icon=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=R=>{e.unref(t).meta.icon=R})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(t).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).meta.title,"onUpdate:modelValue":r[10]||(r[10]=R=>e.unref(t).meta.title=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).meta.active,"onUpdate:modelValue":r[11]||(r[11]=R=>e.unref(t).meta.active=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.link,"onUpdate:modelValue":r[12]||(r[12]=R=>e.unref(t).meta.link=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=R=>e.unref(t).meta.keep_alive=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=R=>e.unref(t).meta.hide=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.full,"onUpdate:modelValue":r[15]||(r[15]=R=>e.unref(t).meta.full=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=R=>e.unref(t).meta.affix=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),ie=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{emit:w}){const h=w,b=y,{requesting:_}=l.useLoading(S),{value:f,options:s,change:d,refresh:p,filterOptions:t}=l.useSelect(e.toRef(b,"modelValue"),h,{key:"MENU_LIST",api:S,isArray:!0});return(T,a)=>{const m=e.resolveComponent("el-space"),i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{class:"w-full",modelValue:e.unref(f),"onUpdate:modelValue":a[1]||(a[1]=N=>e.isRef(f)?f.value=N:null),options:e.unref(s),multiple:y.multiple,disabled:e.unref(_),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=N=>e.unref(p)(!0))},null,8,["loading"])]),default:e.withCtx(({item:N})=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${N.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(N.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),pe=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},f={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input menu.rules"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,K);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-input"),c=e.resolveComponent("el-col"),V=e.resolveComponent("el-row"),x=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[6]||(r[6]=U=>e.isRef(s)?s.value=U:null),title:e.unref(d)("menu.rules"),width:"1000px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(x,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(V,{gutter:20},{default:e.withCtx(()=>[e.createVNode(c,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(ie,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=U=>e.unref(t).menu_id=U)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(o,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=U=>e.unref(t).sort=U),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=U=>e.unref(t).name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=U=>e.unref(t).en_name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=U=>e.unref(t).remark=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).urls,"onUpdate:modelValue":r[5]||(r[5]=U=>e.unref(t).urls=U),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function Y(y){return typeof y=="function"||Object.prototype.toString.call(y)==="[object Object]"&&!e.isVNode(y)}const W=e.defineComponent({__name:"index",setup(y){const w={keyword:"",status:0},h=e.ref(""),b=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:r})=>{var n;return e.createVNode(e.Fragment,null,[(n=r.menu)==null?void 0:n.translate])}},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.url"),prop:"url",align:"left",width:200},{label:l.Translate("menu.component"),prop:"component",align:"left",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var n;return[(n=r.rules)==null?void 0:n.map(o=>e.createVNode(e.resolveComponent("el-popover"),{visible:h.value===o.key,title:l.Translate("message.title.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:o.key,onClick:()=>k({key:o.key}),onClose:()=>h.value=o.key},{default:()=>[o.translate]}),default:()=>{let g,c;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete menu.rules")}: ${r.translate}-${o.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>h.value=""},Y(g=l.Translate("base.cancel"))?g:{default:()=>[g]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>C(o.key)},Y(c=l.Translate("base.confirm"))?c:{default:()=>[c]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:S.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:r})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>m({id:r.id})},null)}],{requesting:_}=l.useLoading(S),{tableRef:f,formModalRef:s,keyword:d,search:p,refresh:t,reset:T,openFormModal:a,editFormModal:m}=l.useCrudPage(w),{formModalRef:i,openFormModal:N,editFormModal:k}=l.useCrudPage(),C=r=>{K[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{h.value="",t()})};return(r,n)=>{const o=e.resolveComponent("el-button"),g=e.resolveComponent("el-input"),c=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-space"),U=e.resolveComponent("el-page-header"),R=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(R,{class:"basic-card flex-full","body-class":"flex-1",onClick:n[5]||(n[5]=()=>h.value="")},{header:e.withCtx(()=>[e.createVNode(U,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(T)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"]),e.createVNode(o,{circle:"",icon:e.unref(ae),onClick:e.unref(N)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(x,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(d).keyword,"onUpdate:modelValue":n[0]||(n[0]=A=>e.unref(d).keyword=A),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(A=>e.unref(p)(),["enter"])),onClear:n[2]||(n[2]=A=>e.unref(p)())},null,8,["modelValue","placeholder"]),e.createVNode(V,{modelValue:e.unref(d).status,"onUpdate:modelValue":n[3]||(n[3]=A=>e.unref(d).status=A),onChange:n[4]||(n[4]=A=>e.unref(p)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],A=>e.createVNode(c,{key:A,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${A}`),value:A},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:e.unref(p)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:f,size:"small",columns:b,url:e.unref(S).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(d),autoSearch:""},null,8,["url","search-param"]),e.createVNode(se,{ref_key:"formModalRef",ref:s,onRefresh:e.unref(t)},null,8,["onRefresh"]),e.createVNode(pe,{ref_key:"ruleFormModalRef",ref:i,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),fe=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),me={class:"rule-check"},ce={style:{width:"80px","line-height":"36px"}},be=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{expose:w,emit:h}){const{requesting:b}=l.useLoading(S),_=y,f=h,s=e.ref(!1),d=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:p,refresh:t}=l.useSelect(e.toRef(_,"modelValue"),f,{key:"RULE_CHECK",api:S,url:S.urls.rules,isArray:!0},!1);function T(){p.value.forEach(C=>{var r;(r=C.rules)!=null&&r.length&&(d.MenuAll[C.id]=!1,d.MenuIndeterminate[C.id]=!1,d.MenuList[C.id]=[])})}function a(C){p.value.forEach(r=>{var n;(n=r.rules)!=null&&n.length&&(d.MenuList[r.id]=C?r.rules.map(o=>o.key):[])}),i()}function m(C,r){const n=p.value.find(o=>o.id===r);d.MenuList[r]=C&&n?n.rules.map(o=>o.key):[],i()}function i(){p.value.forEach(C=>{var o,g;const r=((o=C.rules)==null?void 0:o.length)||0,n=((g=d.MenuList[C.id])==null?void 0:g.length)||0;d.MenuAll[C.id]=n===r&&r>0,d.MenuIndeterminate[C.id]=n>0&&n<r}),d.checkAll=Object.values(d.MenuAll).every(Boolean),d.indeterminate=!d.checkAll&&Object.values(d.MenuList).some(C=>C.length>0),f("update:modelValue",Object.values(d.MenuList).flat())}function N(){d.checkAll=!1,d.indeterminate=!1,d.MenuAll={},d.MenuList={},d.MenuIndeterminate={},T(),f("update:modelValue",[]),s.value=!1}function k(C){var r;if(Array.isArray(p.value)&&p.value.length>0){for(let n of p.value)if(Array.isArray(n.rules)&&n.rules.length>0)for(let o of n.rules)C.some(g=>g===o.key)&&(d.MenuList[n.id]=(((r=d.MenuList)==null?void 0:r[n.id])||[]).concat([o.key]));i(),s.value=!0}}return e.onMounted(async()=>{var C;(C=p.value)!=null&&C.length||await t(),!s.value&&_.modelValue&&k(_.modelValue)}),e.watch(()=>_.modelValue,C=>{e.nextTick(()=>{var r;s.value||!((r=p.value)!=null&&r.length)||C&&C.length>0&&k(C)})},{deep:!0,immediate:!0}),w({generateOption:k,cleanChecked:N}),(C,r)=>{const n=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),g=e.resolveComponent("el-text"),c=e.resolveComponent("el-divider"),V=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",me,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":d.checkAll,indeterminate:d.indeterminate,id:"all",disabled:y.disabled,onChange:a},{default:e.withCtx(()=>r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),text:"",size:"small",onRefresh:r[0]||(r[0]=x=>e.unref(t)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),x=>(e.openBlock(),e.createElementBlock("div",{key:x.id},[e.createVNode(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":d.MenuAll[x.id],disabled:y.disabled||!x.rules||x.rules.length<=0,indeterminate:d.MenuIndeterminate[x.id],onChange:U=>m(U,x.id)},{default:e.withCtx(()=>[e.createVNode(g,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(c,{direction:"vertical"}),x.rules?(e.openBlock(),e.createBlock(V,{key:0,modelValue:d.MenuList[x.id],"onUpdate:modelValue":U=>d.MenuList[x.id]=U,disabled:y.disabled,style:{margin:"auto"},onChange:i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.rules,U=>(e.openBlock(),e.createBlock(n,{key:U.key,value:U.key},{default:e.withCtx(()=>[e.createElementVNode("div",ce,e.toDisplayString(U.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),G=(y,w)=>{const h=y.__vccOpts||y;for(const[b,_]of w)h[b]=_;return h},_e=G(be,[["__scopeId","data-v-487a9d12"]]),he=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_=e.ref(),f={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},s={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:d,title:p,form:t,formData:T,requesting:a,executing:m,open:i,modify:N,submit:k,closed:C}=l.useForm(b,f,$),r=()=>{var n;(n=_.value)==null||n.cleanChecked(),C()};return w({open:i,modify:N}),(n,o)=>{const g=e.resolveComponent("el-input"),c=e.resolveComponent("el-form-item"),V=e.resolveComponent("el-col"),x=e.resolveComponent("el-input-number"),U=e.resolveComponent("el-row"),R=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(d),"onUpdate:modelValue":o[6]||(o[6]=A=>e.isRef(d)?d.value=A:null),title:e.unref(p)(),width:"1000px",executing:e.unref(m),onClosed:r,onSubmit:e.unref(k)},{default:e.withCtx(()=>[e.createVNode(R,{ref_key:"form",ref:t,model:e.unref(T),"label-width":"auto",rules:s,disabled:e.unref(a)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(V,{span:12},{default:e.withCtx(()=>[e.createVNode(c,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(T).module,"onUpdate:modelValue":o[0]||(o[0]=A=>e.unref(T).module=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(V,{span:12},{default:e.withCtx(()=>[e.createVNode(c,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(x,{class:"w-full",modelValue:e.unref(T).sort,"onUpdate:modelValue":o[1]||(o[1]=A=>e.unref(T).sort=A),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(c,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(T).name,"onUpdate:modelValue":o[2]||(o[2]=A=>e.unref(T).name=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(T).en_name,"onUpdate:modelValue":o[3]||(o[3]=A=>e.unref(T).en_name=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(T).remark,"onUpdate:modelValue":o[4]||(o[4]=A=>e.unref(T).remark=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(_e,{ref_key:"rulesCheck",ref:_,modelValue:e.unref(T).rules,"onUpdate:modelValue":o[5]||(o[5]=A=>e.unref(T).rules=A),disabled:e.unref(a)||e.unref(m)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),H=e.defineComponent({__name:"index",setup(y){const w={keyword:""},h=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:m})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:m.key})},null)}],{requesting:b}=l.useLoading($),{tableRef:_,formModalRef:f,keyword:s,search:d,reset:p,refresh:t,openFormModal:T,editFormModal:a}=l.useCrudPage(w);return(m,i)=>{const N=e.resolveComponent("el-input"),k=e.resolveComponent("el-space"),C=e.resolveComponent("el-page-header"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(C,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(p)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(k,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":i[0]||(i[0]=n=>e.unref(s).keyword=n),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(n=>e.unref(d)(),["enter"])),onClear:i[2]||(i[2]=n=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:i[3]||(i[3]=n=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref($).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),autoSearch:""},null,8,["url","search-param"]),e.createVNode(he,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),ge=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),Ce={check:"check"},D=l.ApiUtils.routineApi("site","id",Ce),F=l.ApiUtils.routineApi("domain"),Q=e.defineComponent({__name:"DomainSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{expose:w,emit:h}){const b=h,_=y,{requesting:f}=l.useLoading(F),{key:s,options:d,refresh:p,change:t}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"DOMAIN_LIST",api:F,isArray:!0});return w({refresh:p}),(T,a)=>{const m=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(m,{modelValue:e.unref(s),"onUpdate:modelValue":a[0]||(a[0]=i=>e.isRef(s)?s.value=i:null),options:e.unref(d),disabled:y.disabled||e.unref(f),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(f),onRefresh:e.unref(p)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Te=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},f={domain_id:[{required:!0,message:l.Translate("base.placeholder.input config.domain"),trigger:"blur"}],prefix:[{required:!0,message:l.Translate("base.placeholder.input base.prefix"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,D);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[7]||(r[7]=c=>e.isRef(s)?s.value=c:null),title:e.unref(d)("config.site"),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:e.unref(t).domain_id,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(t).domain_id=c),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).prefix,"onUpdate:modelValue":r[1]||(r[1]=c=>e.unref(t).prefix=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=c=>e.unref(t).name=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=c=>e.unref(t).en_name=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"dns",label:e.unref(l.Translate)("config.dns")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).dns,"onUpdate:modelValue":r[4]||(r[4]=c=>e.unref(t).dns=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"git",label:e.unref(l.Translate)("config.git")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).git,"onUpdate:modelValue":r[5]||(r[5]=c=>e.unref(t).git=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[6]||(r[6]=c=>e.unref(t).remark=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),q=l.ApiUtils.routineApi("domain_provider"),we=e.defineComponent({__name:"DomainProviderSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{expose:w,emit:h}){const b=h,_=y,{requesting:f}=l.useLoading(q),{key:s,options:d,refresh:p,change:t}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"DOMAIN_PROVIDER_LIST",api:q,isArray:!0});return w({refresh:p}),(T,a)=>{const m=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(m,{modelValue:e.unref(s),"onUpdate:modelValue":a[0]||(a[0]=i=>e.isRef(s)?s.value=i:null),options:e.unref(d),disabled:y.disabled||e.unref(f),placeholder:e.unref(l.Translate)("base.select config.domain config.provider"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(f),onRefresh:e.unref(p)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),xe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},f={provider_id:[{required:!0,message:l.Translate("base.placeholder.input config.domain config.provider"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,F);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),g=e.resolveComponent("el-date-picker"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[4]||(r[4]=V=>e.isRef(s)?s.value=V:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"provider_id",label:e.unref(l.Translate)("config.provider")},{default:e.withCtx(()=>[e.createVNode(we,{modelValue:e.unref(t).provider_id,"onUpdate:modelValue":r[0]||(r[0]=V=>e.unref(t).provider_id=V),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[1]||(r[1]=V=>e.unref(t).name=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"expired_at",required:"",label:e.unref(l.Translate)("base.expired_at")},{default:e.withCtx(()=>[e.createVNode(g,{type:"date",style:{width:"100%"},modelValue:e.unref(t).expired_at,"onUpdate:modelValue":r[2]||(r[2]=V=>e.unref(t).expired_at=V),disabled:e.unref(a),"value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,placeholder:e.unref(l.Translate)("base.placeholder.select")},null,8,["modelValue","disabled","value-format","format","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[3]||(r[3]=V=>e.unref(t).remark=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Ne={gen:"gen"},E=l.ApiUtils.routineApi("SSL","id",Ne),ke=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{expose:w,emit:h}){const b=h,_=y,{requesting:f}=l.useLoading(D),{key:s,options:d,refresh:p,change:t}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"SITE_LIST",api:D,isArray:!0,formatOptions:T=>T.map(a=>{var m;return{label:a.prefix+"."+((m=a.domain)==null?void 0:m.name),value:a.id}})});return w({refresh:p}),(T,a)=>{const m=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(m,{modelValue:e.unref(s),"onUpdate:modelValue":a[0]||(a[0]=i=>e.isRef(s)?s.value=i:null),options:e.unref(d),disabled:y.disabled||e.unref(f),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(f),onRefresh:e.unref(p)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),J=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},f={domain_id:[{required:!0,message:l.Translate("base.placeholder.select config.domain "),trigger:"blur"}],client:[{required:!0,message:l.Translate("base.placeholder.select config.client "),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],path:[{required:!0,message:l.Translate("base.placeholder.input base.path"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],encryption:[{required:!0,message:l.Translate("base.placeholder.input config.encryption"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,E);return w({open:m,modify:i,formData:t}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-input"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[8]||(r[8]=x=>e.isRef(s)?s.value=x:null),title:e.unref(d)("ssl.ssl"),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:e.unref(t).domain_id,"onUpdate:modelValue":r[0]||(r[0]=x=>e.unref(t).domain_id=x),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"client",label:e.unref(l.Translate)("ssl.client")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).client,"onUpdate:modelValue":r[1]||(r[1]=x=>e.unref(t).client=x)},{default:e.withCtx(()=>[e.createVNode(o,{label:"Lego",value:"Lego"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{prop:"site_id",label:e.unref(l.Translate)("config.site")},{default:e.withCtx(()=>[e.createVNode(ke,{modelValue:e.unref(t).site_id,"onUpdate:modelValue":r[2]||(r[2]=x=>e.unref(t).site_id=x),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=x=>e.unref(t).name=x),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"path",label:e.unref(l.Translate)("base.path")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).path,"onUpdate:modelValue":r[4]||(r[4]=x=>e.unref(t).path=x),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"email",label:e.unref(l.Translate)("base.email")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).email,"onUpdate:modelValue":r[5]||(r[5]=x=>e.unref(t).email=x),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"encryption",label:e.unref(l.Translate)("config.encryption")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).encryption,"onUpdate:modelValue":r[6]||(r[6]=x=>e.unref(t).encryption=x)},{default:e.withCtx(()=>[e.createVNode(o,{label:"RSA2048",value:"RSA2048"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=x=>e.unref(t).remark=x),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),ye=e.defineComponent({__name:"DomainProviderFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},f={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"},key:{required:!0,message:l.Translate("base.placeholder.input base.key"),trigger:"blur"},secret:{required:!0,message:l.Translate("base.placeholder.input config.secret"),trigger:"blur"},end_point:{required:!0,message:l.Translate("base.placeholder.input config.endpoint"),trigger:"blur"}},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,q);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-input"),o=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[6]||(r[6]=c=>e.isRef(s)?s.value=c:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(t).name=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[1]||(r[1]=c=>e.unref(t).en_name=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"key",label:e.unref(l.Translate)("base.key")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).key,"onUpdate:modelValue":r[2]||(r[2]=c=>e.unref(t).key=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"secret",label:e.unref(l.Translate)("config.secret")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).secret,"onUpdate:modelValue":r[3]||(r[3]=c=>e.unref(t).secret=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"end_point",label:e.unref(l.Translate)("config.end_point")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).end_point,"onUpdate:modelValue":r[4]||(r[4]=c=>e.unref(t).end_point=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[5]||(r[5]=c=>e.unref(t).remark=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Re=e.defineComponent({__name:"DomainProviderTableDrawer",setup(y,{expose:w}){const{requesting:h}=l.useLoading(q),b=e.ref(!1),{tableRef:_,formModalRef:f,refresh:s,openFormModal:d,editFormModal:p}=l.useCrudPage({}),t=[{prop:"name",label:l.Translate("base.name"),width:0,minWidth:140},{prop:"en_name",label:l.Translate("base.en_name"),width:120},{prop:"actions",label:l.Translate("base.action"),width:60,align:"center",render:({rowData:a})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>p({id:a.id})},null)]})}];return w({open:()=>{b.value=!0}}),(a,m)=>{const i=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:b.value,"onUpdate:modelValue":m[0]||(m[0]=N=>b.value=N),width:"400px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(i,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain config.provider")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s),size:"default",loading:e.unref(h)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small","row-key":"id",url:e.unref(q).urls.list,columns:t,loading:e.unref(h)},null,8,["url","loading"]),e.createVNode(ye,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Ve=e.defineComponent({__name:"DomainTableDrawer",setup(y,{expose:w}){const{requesting:h}=l.useLoading(F),b=e.ref(!1),{tableRef:_,formModalRef:f,refresh:s,openFormModal:d,editFormModal:p}=l.useCrudPage(),{formModalRef:t,openFormModal:T,editFormModal:a}=l.useCrudPage(),{formModalRef:m,openFormModal:i}=l.useCrudPage(),N=[{prop:"provider",label:l.Translate("config.domain config.provider"),width:120,cellRenderer:({rowData:C})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var r;return[(r=C.provider)==null?void 0:r.name]}})},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"expired_text",label:l.Translate("base.expired_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:100,align:"center",render:({rowData:C})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>p({id:C.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{var r;C.ssl&&C.ssl.id?a({id:(r=C.ssl)==null?void 0:r.id}):(t.value.formData.domain_id=C.id,t.value.formData.site_id=0,T())}},null)]})}];return w({open:()=>{b.value=!0}}),(C,r)=>{const n=e.resolveComponent("el-space"),o=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:b.value,"onUpdate:modelValue":r[0]||(r[0]=g=>b.value=g),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(o,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s),size:"default",loading:e.unref(h)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(n,{class:"w-full extra-tool",alignment:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(i),type:"danger"},null,8,["onOpen"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small","row-key":"id",url:e.unref(F).urls.list,columns:N,loading:e.unref(h)},null,8,["url","loading"]),e.createVNode(xe,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(J,{ref_key:"sslFormModalRef",ref:t,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(Re,{ref_key:"providerTableDrawerRef",ref:m},null,512)]),_:1},8,["modelValue"])}}}),Ue=e.defineComponent({__name:"SSLTableDrawer",setup(y,{expose:w}){const{requesting:h,executing:b}=l.useLoading(E),_=e.ref(0),f=e.ref(!1),{tableRef:s,formModalRef:d,refresh:p,openFormModal:t,editFormModal:T}=l.useCrudPage(),a=[{prop:"client",label:l.Translate("ssl.client"),width:100},{prop:"encryption",label:l.Translate("ssl.encryption"),width:100},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"path",label:l.Translate("base.path"),width:120},{prop:"renewal_days",label:l.Translate("ssl.renewal_days"),width:100},{prop:"checked_at",label:l.Translate("ssl.checked_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:160,align:"center",render:({rowData:k})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",icon:"icon-edit",t:"",disabled:b.value,onModify:()=>T({id:k.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:b.value&&_.value!==k.id,loading:_.value==k.id,onClick:()=>i(k.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:b.value&&_.value!==k.id,loading:_.value==k.id,onClick:()=>N(k)},null)]})}],m=()=>{f.value=!0},i=k=>{E.gen({id:k}).then(C=>{console.warn("Res:",C)})};function N(k){const C=l.AssetsUtils.getDownloadUrl(k.path+".zip");fetch(C).then(r=>r.blob()).then(r=>{let n=URL.createObjectURL(r),o=document.createElement("a");o.style.display="none",o.href=n,o.download=k.name+".zip",o.click(),URL.revokeObjectURL(r)})}return w({open:m}),(k,C)=>{const r=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:f.value,"onUpdate:modelValue":C[0]||(C[0]=n=>f.value=n),width:"1000px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(r,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("ssl.ssl")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(p),size:"default",loading:e.unref(h)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:s,size:"default","row-key":"id",url:e.unref(E).urls.list,columns:a,loading:e.unref(h)},null,8,["url","loading"]),e.createVNode(J,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(p)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),X=l.ApiUtils.routineApi("SSLLog","id"),Ae=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(y,{expose:w}){const h=y,{requesting:b,executing:_}=l.useLoading([X,E]),f=e.ref(!1),{tableRef:s,refresh:d}=l.useCrudPage(),p=[{prop:"status_text",label:l.Translate("base.status"),width:100},{prop:"at",label:l.Translate("base.time"),width:180},{prop:"type_text",label:l.Translate("base.type"),width:80},{prop:"result",label:l.Translate("base.result"),width:0}],t=()=>{f.value=!0};function T(){E.gen({id:h.ssl.id}).then(m=>{console.warn("Res:",m)})}function a(){const m=l.AssetsUtils.getDownloadUrl(h.ssl.path+".zip");fetch(m).then(i=>i.blob()).then(i=>{let N=URL.createObjectURL(i),k=document.createElement("a");k.style.display="none",k.href=N,k.download=h.ssl.name+".zip",k.click(),URL.revokeObjectURL(i)})}return w({open:t}),(m,i)=>{const N=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:f.value,"onUpdate:modelValue":i[0]||(i[0]=k=>f.value=k),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(N,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.ssl base.log")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d),size:"default",loading:e.unref(b)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-key",disabled:e.unref(_),loading:e.unref(_),onClick:T},null,8,["disabled","loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"primary",icon:"icon-cloud-download",disabled:e.unref(_),loading:e.unref(_),onClick:a},null,8,["disabled","loading"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:s,size:"small","row-key":"id",url:e.unref(X).urls.search,columns:p,loading:e.unref(b)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),Z=G(e.defineComponent({__name:"index",setup(y){const w=e.ref(),{requesting:h,executing:b}=l.useLoading(D),{tableRef:_,formModalRef:f,reset:s,refresh:d,openFormModal:p,editFormModal:t}=l.useCrudPage(),{formModalRef:T,openFormModal:a}=l.useCrudPage(),{formModalRef:m,openFormModal:i}=l.useCrudPage(),{formModalRef:N,openFormModal:k}=l.useCrudPage(),C=[{prop:"domain.name",label:l.Translate("config.domain"),width:129,type:"copy"},{prop:"name",label:l.Translate("base.name"),width:100},{prop:"dns",label:l.Translate("config.dns"),width:160,type:"copy"},{prop:"git",label:l.Translate("config.git"),width:300,type:"copy"},{prop:"expired_at",label:l.Translate("config.ssl base.expired_at"),align:"center",width:140,cellRenderer:({rowData:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var g;return[(g=o.ssl)==null?void 0:g.renewal_days,e.createTextVNode(" 天")]}}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"primary",text:!0,onClick:g=>{g.stopPropagation(),o.ssl&&o.ssl.id&&(w.value=o.ssl,k())}},{default:()=>[e.createVNode("span",{class:"icon iconfont icon-reloadtime"},null)]})]})},{prop:"remark",label:l.Translate("base.remark"),width:0,minWidth:160},{prop:"operation",label:l.Translate("base.action"),width:100,align:"center",cellRenderer:({rowData:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>t({id:o.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:b.value,loading:r.value==o.id&&b.value,onClick:()=>n(o)},null)]})}],r=e.ref(0),n=o=>{r.value=o.id,D.check({id:o.id}).then(g=>{g.data&&(l.notification(g),d())}).finally(()=>{r.value=0})};return(o,g)=>{const c=e.resolveComponent("el-space"),V=e.resolveComponent("el-page-header"),x=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(x,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(V,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(c,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(s)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(p)},null,8,["onOpen"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a),icon:"icon-compass"},null,8,["onOpen"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(i),icon:"icon-safetycertificate-f"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small","row-key":"id",url:e.unref(D).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:C},null,8,["url"]),e.createVNode(Te,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(Ve,{ref_key:"domainTableDrawerRef",ref:T},null,512),e.createVNode(Ue,{ref_key:"sslTableDrawerRef",ref:m},null,512),e.createVNode(Ae,{ref_key:"sslLogTableDrawerRef",ref:N},null,512)]),_:1})}}}),[["__scopeId","data-v-e8ad951f"]]),Be=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),Le={request:"request",error:"error",sql:"SQL"},O=l.ApiUtils.routineApi("log","id",Le),u=e.defineComponent({__name:"index",setup(y){const w={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},h=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:p})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(p.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(O),{tableRef:_,keyword:f,search:s,reset:d}=l.useCrudPage(w);return(p,t)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),m=e.resolveComponent("el-page-header"),i=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(i,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(m,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(f).dates,"onUpdate:modelValue":t[0]||(t[0]=N=>e.unref(f).dates=N),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_HOUR_FORMAT,format:e.unref(l.TimeUtils).DATE_SHOW_FORMAT,type:"datetimerange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=N=>e.unref(s)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:t[2]||(t[2]=N=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(O).urls.request,"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),Se=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"})),M=e.defineComponent({__name:"index",setup(y){const w={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_VALUE_FORMAT)]},h=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:p})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(p.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(O),{tableRef:_,keyword:f,search:s,reset:d}=l.useCrudPage(w);return(p,t)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),m=e.resolveComponent("el-page-header"),i=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(i,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(m,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(f).dates,"onUpdate:modelValue":t[0]||(t[0]=N=>e.unref(f).dates=N),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=N=>e.unref(s)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:t[2]||(t[2]=N=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(O).urls.error,"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),De=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),v=e.defineComponent({__name:"index",setup(y){const w={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_VALUE_FORMAT)]},h=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:p})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(p.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(O),{tableRef:_,keyword:f,search:s,reset:d}=l.useCrudPage(w);return(p,t)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),m=e.resolveComponent("el-page-header"),i=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(i,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(m,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(f).dates,"onUpdate:modelValue":t[0]||(t[0]=N=>e.unref(f).dates=N),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_HOUR_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=N=>e.unref(s)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:t[2]||(t[2]=N=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(O).urls.sql,"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"})),Oe=()=>Promise.resolve().then(()=>Se),Fe=()=>Promise.resolve().then(()=>De),qe=()=>Promise.resolve().then(()=>Ee),$e=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:Oe,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Fe,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:qe,meta:{title:l.Translate("menu.SqlLog")}}],Pe={install:y=>{Reflect.ownKeys(y._context.provides).some(w=>String(w)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.warn(Reflect.ownKeys(y._context.provides))},version:"__VERSION__"},ze=Object.assign({"./views/admin/index.vue":le,"./views/language/index.vue":te,"./views/menu/index.vue":fe,"./views/role/index.vue":ge,"./views/site/index.vue":Be});L.AdminsPage=j,L.ErrorLogsPage=M,L.LanguagesPage=I,L.LogRoutes=$e,L.MenusPage=W,L.RequestLogsPage=u,L.RolesPage=H,L.SQLLogsPage=v,L.SitePage=Z,L.basicModules=ze,L.default=Pe,Object.defineProperties(L,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.AutoVueBasic={},L.Vue,L["auto-vue-manual"]))})(this,function(L,e,l){"use strict";const z=l.ApiUtils.routineApi("admin","key"),$=l.ApiUtils.routineApi("role","key"),ee=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:f,title:s,form:d,formData:p,requesting:t,executing:T,open:a,modify:m,submit:i,closed:N}=l.useForm(b,_,z),k={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("base.placeholder.select menu.Role"),trigger:"change"}]},C=e.ref([]),r=async()=>{const n=await $.list();C.value=Array.isArray(n==null?void 0:n.data)?n.data:[]};return e.onBeforeMount(async()=>{await r()}),w({open:a,modify:m}),(n,o)=>{const g=e.resolveComponent("el-input"),c=e.resolveComponent("el-form-item"),V=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),U=e.resolveComponent("el-checkbox"),R=e.resolveComponent("el-checkbox-group"),A=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(f),"onUpdate:modelValue":o[7]||(o[7]=B=>e.isRef(f)?f.value=B:null),title:e.unref(s)(),width:"600px",executing:e.unref(T),onClosed:e.unref(N),onSubmit:e.unref(i)},{default:e.withCtx(()=>[e.createVNode(A,{ref_key:"form",ref:d,model:e.unref(p),"label-width":"auto",rules:k,disabled:e.unref(t)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(c,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).username,"onUpdate:modelValue":o[0]||(o[0]=B=>e.unref(p).username=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).phone,"onUpdate:modelValue":o[1]||(o[1]=B=>e.unref(p).phone=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(p).key},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).password,"onUpdate:modelValue":o[2]||(o[2]=B=>e.unref(p).password=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(c,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).email,"onUpdate:modelValue":o[3]||(o[3]=B=>e.unref(p).email=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(p).language,"onUpdate:modelValue":o[4]||(o[4]=B=>e.unref(p).language=B)},{default:e.withCtx(()=>[e.createVNode(V,{value:"zh-CN"},{default:e.withCtx(()=>o[8]||(o[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(V,{value:"en-US"},{default:e.withCtx(()=>o[9]||(o[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:e.unref(p).roles,"onUpdate:modelValue":o[5]||(o[5]=B=>e.unref(p).roles=B)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,B=>(e.openBlock(),e.createBlock(U,{key:B.key,value:B.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(p).remark,"onUpdate:modelValue":o[6]||(o[6]=B=>e.unref(p).remark=B),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),j=e.defineComponent({__name:"index",setup(y){const w={keyword:""},h=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:m})=>e.createVNode(l.BasicAvatar,{src:m.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:m})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[m.username]),e.createVNode("div",null,[m.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:m})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:m.key})},null)}],{requesting:b}=l.useLoading(z),{tableRef:_,formModalRef:f,keyword:s,search:d,reset:p,refresh:t,openFormModal:T,editFormModal:a}=l.useCrudPage(w);return(m,i)=>{const N=e.resolveComponent("el-input"),k=e.resolveComponent("el-space"),C=e.resolveComponent("el-page-header"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(C,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(p)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(k,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":i[0]||(i[0]=n=>e.unref(s).keyword=n),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(n=>e.unref(d)(),["enter"])),onClear:i[2]||(i[2]=n=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:i[3]||(i[3]=n=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(z).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),autoSearch:""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),le=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"})),P=l.ApiUtils.routineApi("translation","key"),re=e.defineComponent({__name:"LangFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,key:"",module:"",language:"",result:"",remark:""},f={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,P);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-input"),o=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-radio-button"),c=e.resolveComponent("el-radio-group"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[5]||(r[5]=x=>e.isRef(s)?s.value=x:null),title:e.unref(d)(),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[0]||(r[0]=x=>e.unref(t).module=x),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).key,"onUpdate:modelValue":r[1]||(r[1]=x=>e.unref(t).key=x),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).language,"onUpdate:modelValue":r[2]||(r[2]=x=>e.unref(t).language=x)},{default:e.withCtx(()=>[e.createVNode(g,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(g,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).result,"onUpdate:modelValue":r[3]||(r[3]=x=>e.unref(t).result=x),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=x=>e.unref(t).remark=x),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),I=e.defineComponent({__name:"index",setup(y){const w={keyword:"",status:0},h=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:P.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:m})=>e.createVNode(l.ModifyButton,{onModify:()=>a({id:m.id})},null)}],{requesting:b}=l.useLoading(P),{tableRef:_,formModalRef:f,keyword:s,search:d,reset:p,refresh:t,openFormModal:T,editFormModal:a}=l.useCrudPage(w);return(m,i)=>{const N=e.resolveComponent("el-input"),k=e.resolveComponent("el-radio-button"),C=e.resolveComponent("el-radio-group"),r=e.resolveComponent("el-space"),n=e.resolveComponent("el-page-header"),o=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(o,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(n,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(p)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(r,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":i[0]||(i[0]=g=>e.unref(s).keyword=g),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(g=>e.unref(d)(),["enter"])),onClear:i[2]||(i[2]=g=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(C,{modelValue:e.unref(s).status,"onUpdate:modelValue":i[3]||(i[3]=g=>e.unref(s).status=g),onChange:i[4]||(i[4]=g=>e.unref(d)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],g=>e.createVNode(k,{key:g,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${g}`),value:g},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:i[5]||(i[5]=g=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(P).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),autoSearch:""},null,8,["url","search-param"]),e.createVNode(re,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),te=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"})),ne={tops:"tops",rules:"rules"},S=l.ApiUtils.routineApi("menu","id",ne,{},["TOP_MENU_LIST","MENU_LIST"]),K=l.ApiUtils.routineApi("rule","key");/*! Element Plus Icons Vue v2.3.1 */var oe=e.defineComponent({name:"Key",__name:"key",setup(y){return(w,h)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),ae=oe;const de=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{emit:w}){const h=w,b=y,{requesting:_}=l.useLoading(S),{value:f,options:s,change:d,refresh:p,filterOptions:t}=l.useSelect(e.toRef(b,"modelValue"),h,{key:"TOP_MENU_LIST",api:S,url:S.urls.tops,isArray:!0});return(T,a)=>{const m=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(m,{class:"w-full",modelValue:e.unref(f),"onUpdate:modelValue":a[1]||(a[1]=i=>e.isRef(f)?f.value=i:null),options:e.unref(s),multiple:y.multiple,disabled:e.unref(_),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=i=>e.unref(p)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),se=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}},f={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,S);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-col"),g=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-row"),V=e.resolveComponent("el-input"),x=e.resolveComponent("el-switch"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[17]||(r[17]=R=>e.isRef(s)?s.value=R:null),title:e.unref(d)(),width:"1000px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(c,{gutter:20},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(c,{gutter:10},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(de,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=R=>e.unref(t).menu_id=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(g,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=R=>e.unref(t).sort=R),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(n,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).module,"onUpdate:modelValue":r[2]||(r[2]=R=>e.unref(t).module=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=R=>e.unref(t).name=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[4]||(r[4]=R=>e.unref(t).en_name=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).component,"onUpdate:modelValue":r[5]||(r[5]=R=>e.unref(t).component=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).url,"onUpdate:modelValue":r[6]||(r[6]=R=>e.unref(t).url=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=R=>e.unref(t).remark=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).icon,"onUpdate:modelValue":r[8]||(r[8]=R=>e.unref(t).icon=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=R=>{e.unref(t).meta.icon=R})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(t).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).meta.title,"onUpdate:modelValue":r[10]||(r[10]=R=>e.unref(t).meta.title=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(t).meta.active,"onUpdate:modelValue":r[11]||(r[11]=R=>e.unref(t).meta.active=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.link,"onUpdate:modelValue":r[12]||(r[12]=R=>e.unref(t).meta.link=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=R=>e.unref(t).meta.keep_alive=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.hide,"onUpdate:modelValue":r[14]||(r[14]=R=>e.unref(t).meta.hide=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.full,"onUpdate:modelValue":r[15]||(r[15]=R=>e.unref(t).meta.full=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(t).meta.affix,"onUpdate:modelValue":r[16]||(r[16]=R=>e.unref(t).meta.affix=R)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),ie=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{emit:w}){const h=w,b=y,{requesting:_}=l.useLoading(S),{value:f,options:s,change:d,refresh:p,filterOptions:t}=l.useSelect(e.toRef(b,"modelValue"),h,{key:"MENU_LIST",api:S,isArray:!0});return(T,a)=>{const m=e.resolveComponent("el-space"),i=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(i,{class:"w-full",modelValue:e.unref(f),"onUpdate:modelValue":a[1]||(a[1]=N=>e.isRef(f)?f.value=N:null),options:e.unref(s),multiple:y.multiple,disabled:e.unref(_),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(t),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=N=>e.unref(p)(!0))},null,8,["loading"])]),default:e.withCtx(({item:N})=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${N.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(N.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),pe=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},f={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input menu.rules"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,K);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-input"),c=e.resolveComponent("el-col"),V=e.resolveComponent("el-row"),x=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[6]||(r[6]=U=>e.isRef(s)?s.value=U:null),title:e.unref(d)("menu.rules"),width:"1000px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(x,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(V,{gutter:20},{default:e.withCtx(()=>[e.createVNode(c,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(ie,{modelValue:e.unref(t).menu_id,"onUpdate:modelValue":r[0]||(r[0]=U=>e.unref(t).menu_id=U)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(o,{class:"w-full",modelValue:e.unref(t).sort,"onUpdate:modelValue":r[1]||(r[1]=U=>e.unref(t).sort=U),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=U=>e.unref(t).name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=U=>e.unref(t).en_name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[4]||(r[4]=U=>e.unref(t).remark=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).urls,"onUpdate:modelValue":r[5]||(r[5]=U=>e.unref(t).urls=U),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function Y(y){return typeof y=="function"||Object.prototype.toString.call(y)==="[object Object]"&&!e.isVNode(y)}const W=e.defineComponent({__name:"index",setup(y){const w={keyword:"",status:0},h=e.ref(""),b=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:r})=>{var n;return e.createVNode(e.Fragment,null,[(n=r.menu)==null?void 0:n.translate])}},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.url"),prop:"url",align:"left",width:200},{label:l.Translate("menu.component"),prop:"component",align:"left",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var n;return[(n=r.rules)==null?void 0:n.map(o=>e.createVNode(e.resolveComponent("el-popover"),{visible:h.value===o.key,title:l.Translate("message.title.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:o.key,onClick:()=>k({key:o.key}),onClose:()=>h.value=o.key},{default:()=>[o.translate]}),default:()=>{let g,c;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete menu.rules")}: ${r.translate}-${o.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>h.value=""},Y(g=l.Translate("base.cancel"))?g:{default:()=>[g]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>C(o.key)},Y(c=l.Translate("base.confirm"))?c:{default:()=>[c]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:S.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:r})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>m({id:r.id})},null)}],{requesting:_}=l.useLoading(S),{tableRef:f,formModalRef:s,keyword:d,search:p,refresh:t,reset:T,openFormModal:a,editFormModal:m}=l.useCrudPage(w),{formModalRef:i,openFormModal:N,editFormModal:k}=l.useCrudPage(),C=r=>{K[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{h.value="",t()})};return(r,n)=>{const o=e.resolveComponent("el-button"),g=e.resolveComponent("el-input"),c=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-space"),U=e.resolveComponent("el-page-header"),R=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(R,{class:"basic-card flex-full","body-class":"flex-1",onClick:n[5]||(n[5]=()=>h.value="")},{header:e.withCtx(()=>[e.createVNode(U,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(T)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"]),e.createVNode(o,{circle:"",icon:e.unref(ae),onClick:e.unref(N)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(x,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(d).keyword,"onUpdate:modelValue":n[0]||(n[0]=A=>e.unref(d).keyword=A),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(A=>e.unref(p)(),["enter"])),onClear:n[2]||(n[2]=A=>e.unref(p)())},null,8,["modelValue","placeholder"]),e.createVNode(V,{modelValue:e.unref(d).status,"onUpdate:modelValue":n[3]||(n[3]=A=>e.unref(d).status=A),onChange:n[4]||(n[4]=A=>e.unref(p)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],A=>e.createVNode(c,{key:A,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${A}`),value:A},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:e.unref(p)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:f,size:"small",columns:b,url:e.unref(S).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(d),autoSearch:""},null,8,["url","search-param"]),e.createVNode(se,{ref_key:"formModalRef",ref:s,onRefresh:e.unref(t)},null,8,["onRefresh"]),e.createVNode(pe,{ref_key:"ruleFormModalRef",ref:i,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),fe=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),me={class:"rule-check"},ce={style:{width:"80px","line-height":"36px"}},be=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{expose:w,emit:h}){const{requesting:b}=l.useLoading(S),_=y,f=h,s=e.ref(!1),d=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:p,refresh:t}=l.useSelect(e.toRef(_,"modelValue"),f,{key:"RULE_CHECK",api:S,url:S.urls.rules,isArray:!0},{autoRefresh:!1});function T(){p.value.forEach(C=>{var r;(r=C.rules)!=null&&r.length&&(d.MenuAll[C.id]=!1,d.MenuIndeterminate[C.id]=!1,d.MenuList[C.id]=[])})}function a(C){p.value.forEach(r=>{var n;(n=r.rules)!=null&&n.length&&(d.MenuList[r.id]=C?r.rules.map(o=>o.key):[])}),i()}function m(C,r){const n=p.value.find(o=>o.id===r);d.MenuList[r]=C&&n?n.rules.map(o=>o.key):[],i()}function i(){p.value.forEach(C=>{var o,g;const r=((o=C.rules)==null?void 0:o.length)||0,n=((g=d.MenuList[C.id])==null?void 0:g.length)||0;d.MenuAll[C.id]=n===r&&r>0,d.MenuIndeterminate[C.id]=n>0&&n<r}),d.checkAll=Object.values(d.MenuAll).every(Boolean),d.indeterminate=!d.checkAll&&Object.values(d.MenuList).some(C=>C.length>0),f("update:modelValue",Object.values(d.MenuList).flat())}function N(){d.checkAll=!1,d.indeterminate=!1,d.MenuAll={},d.MenuList={},d.MenuIndeterminate={},T(),f("update:modelValue",[]),s.value=!1}function k(C){var r;if(Array.isArray(p.value)&&p.value.length>0){for(let n of p.value)if(Array.isArray(n.rules)&&n.rules.length>0)for(let o of n.rules)C.some(g=>g===o.key)&&(d.MenuList[n.id]=(((r=d.MenuList)==null?void 0:r[n.id])||[]).concat([o.key]));i(),s.value=!0}}return e.onMounted(async()=>{var C;(C=p.value)!=null&&C.length||await t(),!s.value&&_.modelValue&&k(_.modelValue)}),e.watch(()=>_.modelValue,C=>{e.nextTick(()=>{var r;s.value||!((r=p.value)!=null&&r.length)||C&&C.length>0&&k(C)})},{deep:!0,immediate:!0}),w({generateOption:k,cleanChecked:N}),(C,r)=>{const n=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),g=e.resolveComponent("el-text"),c=e.resolveComponent("el-divider"),V=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",me,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":d.checkAll,indeterminate:d.indeterminate,id:"all",disabled:y.disabled,onChange:a},{default:e.withCtx(()=>r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),text:"",size:"small",onRefresh:r[0]||(r[0]=x=>e.unref(t)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),x=>(e.openBlock(),e.createElementBlock("div",{key:x.id},[e.createVNode(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":d.MenuAll[x.id],disabled:y.disabled||!x.rules||x.rules.length<=0,indeterminate:d.MenuIndeterminate[x.id],onChange:U=>m(U,x.id)},{default:e.withCtx(()=>[e.createVNode(g,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(c,{direction:"vertical"}),x.rules?(e.openBlock(),e.createBlock(V,{key:0,modelValue:d.MenuList[x.id],"onUpdate:modelValue":U=>d.MenuList[x.id]=U,disabled:y.disabled,style:{margin:"auto"},onChange:i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.rules,U=>(e.openBlock(),e.createBlock(n,{key:U.key,value:U.key},{default:e.withCtx(()=>[e.createElementVNode("div",ce,e.toDisplayString(U.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),G=(y,w)=>{const h=y.__vccOpts||y;for(const[b,_]of w)h[b]=_;return h},_e=G(be,[["__scopeId","data-v-7adb5f76"]]),he=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_=e.ref(),f={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},s={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:d,title:p,form:t,formData:T,requesting:a,executing:m,open:i,modify:N,submit:k,closed:C}=l.useForm(b,f,$),r=()=>{var n;(n=_.value)==null||n.cleanChecked(),C()};return w({open:i,modify:N}),(n,o)=>{const g=e.resolveComponent("el-input"),c=e.resolveComponent("el-form-item"),V=e.resolveComponent("el-col"),x=e.resolveComponent("el-input-number"),U=e.resolveComponent("el-row"),R=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(d),"onUpdate:modelValue":o[6]||(o[6]=A=>e.isRef(d)?d.value=A:null),title:e.unref(p)(),width:"1000px",executing:e.unref(m),onClosed:r,onSubmit:e.unref(k)},{default:e.withCtx(()=>[e.createVNode(R,{ref_key:"form",ref:t,model:e.unref(T),"label-width":"auto",rules:s,disabled:e.unref(a)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(V,{span:12},{default:e.withCtx(()=>[e.createVNode(c,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(T).module,"onUpdate:modelValue":o[0]||(o[0]=A=>e.unref(T).module=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(V,{span:12},{default:e.withCtx(()=>[e.createVNode(c,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(x,{class:"w-full",modelValue:e.unref(T).sort,"onUpdate:modelValue":o[1]||(o[1]=A=>e.unref(T).sort=A),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(c,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(T).name,"onUpdate:modelValue":o[2]||(o[2]=A=>e.unref(T).name=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(T).en_name,"onUpdate:modelValue":o[3]||(o[3]=A=>e.unref(T).en_name=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(T).remark,"onUpdate:modelValue":o[4]||(o[4]=A=>e.unref(T).remark=A),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(_e,{ref_key:"rulesCheck",ref:_,modelValue:e.unref(T).rules,"onUpdate:modelValue":o[5]||(o[5]=A=>e.unref(T).rules=A),disabled:e.unref(a)||e.unref(m)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),H=e.defineComponent({__name:"index",setup(y){const w={keyword:""},h=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:m})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:m.key})},null)}],{requesting:b}=l.useLoading($),{tableRef:_,formModalRef:f,keyword:s,search:d,reset:p,refresh:t,openFormModal:T,editFormModal:a}=l.useCrudPage(w);return(m,i)=>{const N=e.resolveComponent("el-input"),k=e.resolveComponent("el-space"),C=e.resolveComponent("el-page-header"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(C,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(p)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(k,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(N,{class:"basic-search-input",modelValue:e.unref(s).keyword,"onUpdate:modelValue":i[0]||(i[0]=n=>e.unref(s).keyword=n),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:i[1]||(i[1]=e.withKeys(n=>e.unref(d)(),["enter"])),onClear:i[2]||(i[2]=n=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:i[3]||(i[3]=n=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref($).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(s),autoSearch:""},null,8,["url","search-param"]),e.createVNode(he,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(t)},null,8,["onRefresh"])]),_:1})}}}),ge=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),Ce={check:"check"},D=l.ApiUtils.routineApi("site","id",Ce),F=l.ApiUtils.routineApi("domain"),Q=e.defineComponent({__name:"DomainSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{expose:w,emit:h}){const b=h,_=y,{requesting:f}=l.useLoading(F),{key:s,options:d,refresh:p,change:t}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"DOMAIN_LIST",api:F,isArray:!0});return w({refresh:p}),(T,a)=>{const m=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(m,{modelValue:e.unref(s),"onUpdate:modelValue":a[0]||(a[0]=i=>e.isRef(s)?s.value=i:null),options:e.unref(d),disabled:y.disabled||e.unref(f),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(f),onRefresh:e.unref(p)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Te=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},f={domain_id:[{required:!0,message:l.Translate("base.placeholder.input config.domain"),trigger:"blur"}],prefix:[{required:!0,message:l.Translate("base.placeholder.input base.prefix"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,D);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[7]||(r[7]=c=>e.isRef(s)?s.value=c:null),title:e.unref(d)("config.site"),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:e.unref(t).domain_id,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(t).domain_id=c),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).prefix,"onUpdate:modelValue":r[1]||(r[1]=c=>e.unref(t).prefix=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[2]||(r[2]=c=>e.unref(t).name=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[3]||(r[3]=c=>e.unref(t).en_name=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"dns",label:e.unref(l.Translate)("config.dns")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).dns,"onUpdate:modelValue":r[4]||(r[4]=c=>e.unref(t).dns=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"git",label:e.unref(l.Translate)("config.git")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).git,"onUpdate:modelValue":r[5]||(r[5]=c=>e.unref(t).git=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[6]||(r[6]=c=>e.unref(t).remark=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),q=l.ApiUtils.routineApi("domain_provider"),we=e.defineComponent({__name:"DomainProviderSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{expose:w,emit:h}){const b=h,_=y,{requesting:f}=l.useLoading(q),{key:s,options:d,refresh:p,change:t}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"DOMAIN_PROVIDER_LIST",api:q,isArray:!0});return w({refresh:p}),(T,a)=>{const m=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(m,{modelValue:e.unref(s),"onUpdate:modelValue":a[0]||(a[0]=i=>e.isRef(s)?s.value=i:null),options:e.unref(d),disabled:y.disabled||e.unref(f),placeholder:e.unref(l.Translate)("base.select config.domain config.provider"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(f),onRefresh:e.unref(p)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),xe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},f={provider_id:[{required:!0,message:l.Translate("base.placeholder.input config.domain config.provider"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,F);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),g=e.resolveComponent("el-date-picker"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[4]||(r[4]=V=>e.isRef(s)?s.value=V:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"provider_id",label:e.unref(l.Translate)("config.provider")},{default:e.withCtx(()=>[e.createVNode(we,{modelValue:e.unref(t).provider_id,"onUpdate:modelValue":r[0]||(r[0]=V=>e.unref(t).provider_id=V),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[1]||(r[1]=V=>e.unref(t).name=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"expired_at",required:"",label:e.unref(l.Translate)("base.expired_at")},{default:e.withCtx(()=>[e.createVNode(g,{type:"date",style:{width:"100%"},modelValue:e.unref(t).expired_at,"onUpdate:modelValue":r[2]||(r[2]=V=>e.unref(t).expired_at=V),disabled:e.unref(a),"value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,placeholder:e.unref(l.Translate)("base.placeholder.select")},null,8,["modelValue","disabled","value-format","format","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[3]||(r[3]=V=>e.unref(t).remark=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Ne={gen:"gen"},E=l.ApiUtils.routineApi("SSL","id",Ne),ke=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(y,{expose:w,emit:h}){const b=h,_=y,{requesting:f}=l.useLoading(D),{key:s,options:d,refresh:p,change:t}=l.useSelect(e.toRef(_,"modelValue"),b,{key:"SITE_LIST",api:D,isArray:!0},{formatOptions:T=>T.map(a=>{var m;return{...a,label:a.prefix+"."+((m=a.domain)==null?void 0:m.name),value:a.id}})});return w({refresh:p}),(T,a)=>{const m=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(m,{modelValue:e.unref(s),"onUpdate:modelValue":a[0]||(a[0]=i=>e.isRef(s)?s.value=i:null),options:e.unref(d),disabled:y.disabled||e.unref(f),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(t)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(f),onRefresh:e.unref(p)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),J=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},f={domain_id:[{required:!0,message:l.Translate("base.placeholder.select config.domain "),trigger:"blur"}],client:[{required:!0,message:l.Translate("base.placeholder.select config.client "),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],path:[{required:!0,message:l.Translate("base.placeholder.input base.path"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],encryption:[{required:!0,message:l.Translate("base.placeholder.input config.encryption"),trigger:"blur"}]},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,E);return w({open:m,modify:i,formData:t}),(C,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-input"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[8]||(r[8]=x=>e.isRef(s)?s.value=x:null),title:e.unref(d)("ssl.ssl"),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:e.unref(t).domain_id,"onUpdate:modelValue":r[0]||(r[0]=x=>e.unref(t).domain_id=x),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"client",label:e.unref(l.Translate)("ssl.client")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).client,"onUpdate:modelValue":r[1]||(r[1]=x=>e.unref(t).client=x)},{default:e.withCtx(()=>[e.createVNode(o,{label:"Lego",value:"Lego"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{prop:"site_id",label:e.unref(l.Translate)("config.site")},{default:e.withCtx(()=>[e.createVNode(ke,{modelValue:e.unref(t).site_id,"onUpdate:modelValue":r[2]||(r[2]=x=>e.unref(t).site_id=x),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[3]||(r[3]=x=>e.unref(t).name=x),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"path",label:e.unref(l.Translate)("base.path")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).path,"onUpdate:modelValue":r[4]||(r[4]=x=>e.unref(t).path=x),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"email",label:e.unref(l.Translate)("base.email")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).email,"onUpdate:modelValue":r[5]||(r[5]=x=>e.unref(t).email=x),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"encryption",label:e.unref(l.Translate)("config.encryption")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).encryption,"onUpdate:modelValue":r[6]||(r[6]=x=>e.unref(t).encryption=x)},{default:e.withCtx(()=>[e.createVNode(o,{label:"RSA2048",value:"RSA2048"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[7]||(r[7]=x=>e.unref(t).remark=x),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),ye=e.defineComponent({__name:"DomainProviderFormModal",emits:["refresh"],setup(y,{expose:w,emit:h}){const b=h,_={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},f={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"},key:{required:!0,message:l.Translate("base.placeholder.input base.key"),trigger:"blur"},secret:{required:!0,message:l.Translate("base.placeholder.input config.secret"),trigger:"blur"},end_point:{required:!0,message:l.Translate("base.placeholder.input config.endpoint"),trigger:"blur"}},{modal:s,title:d,form:p,formData:t,requesting:T,executing:a,open:m,modify:i,submit:N,closed:k}=l.useForm(b,_,q);return w({open:m,modify:i}),(C,r)=>{const n=e.resolveComponent("el-input"),o=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":r[6]||(r[6]=c=>e.isRef(s)?s.value=c:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(k),onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:p,model:e.unref(t),"label-width":"auto",rules:f,disabled:e.unref(T)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).name,"onUpdate:modelValue":r[0]||(r[0]=c=>e.unref(t).name=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"en_name",label:e.unref(l.Translate)("base.en_name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).en_name,"onUpdate:modelValue":r[1]||(r[1]=c=>e.unref(t).en_name=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"key",label:e.unref(l.Translate)("base.key")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).key,"onUpdate:modelValue":r[2]||(r[2]=c=>e.unref(t).key=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"secret",label:e.unref(l.Translate)("config.secret")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).secret,"onUpdate:modelValue":r[3]||(r[3]=c=>e.unref(t).secret=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"end_point",label:e.unref(l.Translate)("config.end_point")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).end_point,"onUpdate:modelValue":r[4]||(r[4]=c=>e.unref(t).end_point=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(t).remark,"onUpdate:modelValue":r[5]||(r[5]=c=>e.unref(t).remark=c),disabled:e.unref(a),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Re=e.defineComponent({__name:"DomainProviderTableDrawer",setup(y,{expose:w}){const{requesting:h}=l.useLoading(q),b=e.ref(!1),{tableRef:_,formModalRef:f,refresh:s,openFormModal:d,editFormModal:p}=l.useCrudPage({}),t=[{prop:"name",label:l.Translate("base.name"),width:0,minWidth:140},{prop:"en_name",label:l.Translate("base.en_name"),width:120},{prop:"actions",label:l.Translate("base.action"),width:60,align:"center",render:({rowData:a})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>p({id:a.id})},null)]})}];return w({open:()=>{b.value=!0}}),(a,m)=>{const i=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:b.value,"onUpdate:modelValue":m[0]||(m[0]=N=>b.value=N),width:"400px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(i,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain config.provider")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s),size:"default",loading:e.unref(h)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small","row-key":"id",url:e.unref(q).urls.list,columns:t,loading:e.unref(h)},null,8,["url","loading"]),e.createVNode(ye,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Ve=e.defineComponent({__name:"DomainTableDrawer",setup(y,{expose:w}){const{requesting:h}=l.useLoading(F),b=e.ref(!1),{tableRef:_,formModalRef:f,refresh:s,openFormModal:d,editFormModal:p}=l.useCrudPage(),{formModalRef:t,openFormModal:T,editFormModal:a}=l.useCrudPage(),{formModalRef:m,openFormModal:i}=l.useCrudPage(),N=[{prop:"provider",label:l.Translate("config.domain config.provider"),width:120,cellRenderer:({rowData:C})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var r;return[(r=C.provider)==null?void 0:r.name]}})},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"expired_text",label:l.Translate("base.expired_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:100,align:"center",render:({rowData:C})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>p({id:C.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{var r;C.ssl&&C.ssl.id?a({id:(r=C.ssl)==null?void 0:r.id}):(t.value.formData.domain_id=C.id,t.value.formData.site_id=0,T())}},null)]})}];return w({open:()=>{b.value=!0}}),(C,r)=>{const n=e.resolveComponent("el-space"),o=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:b.value,"onUpdate:modelValue":r[0]||(r[0]=g=>b.value=g),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(o,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.domain")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s),size:"default",loading:e.unref(h)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(n,{class:"w-full extra-tool",alignment:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(i),type:"danger"},null,8,["onOpen"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small","row-key":"id",url:e.unref(F).urls.list,columns:N,loading:e.unref(h)},null,8,["url","loading"]),e.createVNode(xe,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(J,{ref_key:"sslFormModalRef",ref:t,onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(Re,{ref_key:"providerTableDrawerRef",ref:m},null,512)]),_:1},8,["modelValue"])}}}),Ue=e.defineComponent({__name:"SSLTableDrawer",setup(y,{expose:w}){const{requesting:h,executing:b}=l.useLoading(E),_=e.ref(0),f=e.ref(!1),{tableRef:s,formModalRef:d,refresh:p,openFormModal:t,editFormModal:T}=l.useCrudPage(),a=[{prop:"client",label:l.Translate("ssl.client"),width:100},{prop:"encryption",label:l.Translate("ssl.encryption"),width:100},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"path",label:l.Translate("base.path"),width:120},{prop:"renewal_days",label:l.Translate("ssl.renewal_days"),width:100},{prop:"checked_at",label:l.Translate("ssl.checked_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:160,align:"center",render:({rowData:k})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",icon:"icon-edit",t:"",disabled:b.value,onModify:()=>T({id:k.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:b.value&&_.value!==k.id,loading:_.value==k.id,onClick:()=>i(k.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:b.value&&_.value!==k.id,loading:_.value==k.id,onClick:()=>N(k)},null)]})}],m=()=>{f.value=!0},i=k=>{E.gen({id:k}).then(C=>{console.warn("Res:",C)})};function N(k){const C=l.AssetsUtils.getDownloadUrl(k.path+".zip");fetch(C).then(r=>r.blob()).then(r=>{let n=URL.createObjectURL(r),o=document.createElement("a");o.style.display="none",o.href=n,o.download=k.name+".zip",o.click(),URL.revokeObjectURL(r)})}return w({open:m}),(k,C)=>{const r=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:f.value,"onUpdate:modelValue":C[0]||(C[0]=n=>f.value=n),width:"1000px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(r,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("ssl.ssl")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(p),size:"default",loading:e.unref(h)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(t)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:s,size:"default","row-key":"id",url:e.unref(E).urls.list,columns:a,loading:e.unref(h)},null,8,["url","loading"]),e.createVNode(J,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(p)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),X=l.ApiUtils.routineApi("SSLLog","id"),Ae=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(y,{expose:w}){const h=y,{requesting:b,executing:_}=l.useLoading([X,E]),f=e.ref(!1),{tableRef:s,refresh:d}=l.useCrudPage(),p=[{prop:"status_text",label:l.Translate("base.status"),width:100},{prop:"at",label:l.Translate("base.time"),width:180},{prop:"type_text",label:l.Translate("base.type"),width:80},{prop:"result",label:l.Translate("base.result"),width:0}],t=()=>{f.value=!0};function T(){E.gen({id:h.ssl.id}).then(m=>{console.warn("Res:",m)})}function a(){const m=l.AssetsUtils.getDownloadUrl(h.ssl.path+".zip");fetch(m).then(i=>i.blob()).then(i=>{let N=URL.createObjectURL(i),k=document.createElement("a");k.style.display="none",k.href=N,k.download=h.ssl.name+".zip",k.click(),URL.revokeObjectURL(i)})}return w({open:t}),(m,i)=>{const N=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:f.value,"onUpdate:modelValue":i[0]||(i[0]=k=>f.value=k),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(N,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.ssl base.log")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d),size:"default",loading:e.unref(b)},null,8,["onRefresh","loading"])]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-key",disabled:e.unref(_),loading:e.unref(_),onClick:T},null,8,["disabled","loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"primary",icon:"icon-cloud-download",disabled:e.unref(_),loading:e.unref(_),onClick:a},null,8,["disabled","loading"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:s,size:"small","row-key":"id",url:e.unref(X).urls.search,columns:p,loading:e.unref(b)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),Z=G(e.defineComponent({__name:"index",setup(y){const w=e.ref(),{requesting:h,executing:b}=l.useLoading(D),{tableRef:_,formModalRef:f,reset:s,refresh:d,openFormModal:p,editFormModal:t}=l.useCrudPage(),{formModalRef:T,openFormModal:a}=l.useCrudPage(),{formModalRef:m,openFormModal:i}=l.useCrudPage(),{formModalRef:N,openFormModal:k}=l.useCrudPage(),C=[{prop:"domain.name",label:l.Translate("config.domain"),width:129,type:"copy"},{prop:"name",label:l.Translate("base.name"),width:100},{prop:"dns",label:l.Translate("config.dns"),width:160,type:"copy"},{prop:"git",label:l.Translate("config.git"),width:300,type:"copy"},{prop:"expired_at",label:l.Translate("config.ssl base.expired_at"),align:"center",width:140,cellRenderer:({rowData:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var g;return[(g=o.ssl)==null?void 0:g.renewal_days,e.createTextVNode(" 天")]}}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"primary",text:!0,onClick:g=>{g.stopPropagation(),o.ssl&&o.ssl.id&&(w.value=o.ssl,k())}},{default:()=>[e.createVNode("span",{class:"icon iconfont icon-reloadtime"},null)]})]})},{prop:"remark",label:l.Translate("base.remark"),width:0,minWidth:160},{prop:"operation",label:l.Translate("base.action"),width:100,align:"center",cellRenderer:({rowData:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>t({id:o.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:b.value,loading:r.value==o.id&&b.value,onClick:()=>n(o)},null)]})}],r=e.ref(0),n=o=>{r.value=o.id,D.check({id:o.id}).then(g=>{g.data&&(l.notification(g),d())}).finally(()=>{r.value=0})};return(o,g)=>{const c=e.resolveComponent("el-space"),V=e.resolveComponent("el-page-header"),x=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(x,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(V,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(c,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(s)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(p)},null,8,["onOpen"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a),icon:"icon-compass"},null,8,["onOpen"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(i),icon:"icon-safetycertificate-f"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small","row-key":"id",url:e.unref(D).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:C},null,8,["url"]),e.createVNode(Te,{ref_key:"formModalRef",ref:f,onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(Ve,{ref_key:"domainTableDrawerRef",ref:T},null,512),e.createVNode(Ue,{ref_key:"sslTableDrawerRef",ref:m},null,512),e.createVNode(Ae,{ref_key:"sslLogTableDrawerRef",ref:N},null,512)]),_:1})}}}),[["__scopeId","data-v-e8ad951f"]]),Be=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),Le={request:"request",error:"error",sql:"SQL"},O=l.ApiUtils.routineApi("log","id",Le),u=e.defineComponent({__name:"index",setup(y){const w={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},h=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:p})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(p.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(O),{tableRef:_,keyword:f,search:s,reset:d}=l.useCrudPage(w);return(p,t)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),m=e.resolveComponent("el-page-header"),i=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(i,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(m,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(f).dates,"onUpdate:modelValue":t[0]||(t[0]=N=>e.unref(f).dates=N),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_HOUR_FORMAT,format:e.unref(l.TimeUtils).DATE_SHOW_FORMAT,type:"datetimerange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=N=>e.unref(s)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:t[2]||(t[2]=N=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(O).urls.request,"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),Se=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"})),M=e.defineComponent({__name:"index",setup(y){const w={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_VALUE_FORMAT)]},h=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:p})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(p.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(O),{tableRef:_,keyword:f,search:s,reset:d}=l.useCrudPage(w);return(p,t)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),m=e.resolveComponent("el-page-header"),i=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(i,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(m,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(f).dates,"onUpdate:modelValue":t[0]||(t[0]=N=>e.unref(f).dates=N),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_VALUE_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=N=>e.unref(s)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:t[2]||(t[2]=N=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(O).urls.error,"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),De=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),v=e.defineComponent({__name:"index",setup(y){const w={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_VALUE_FORMAT)]},h=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:p})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(p.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:b}=l.useLoading(O),{tableRef:_,keyword:f,search:s,reset:d}=l.useCrudPage(w);return(p,t)=>{const T=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),m=e.resolveComponent("el-page-header"),i=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(i,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(m,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(b),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(T,{modelValue:e.unref(f).dates,"onUpdate:modelValue":t[0]||(t[0]=N=>e.unref(f).dates=N),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_HOUR_FORMAT,format:e.unref(l.TimeUtils).DATE_FORMAT,type:"daterange","range-separator":"-","start-placeholder":e.unref(l.Translate)("base.start_at"),"end-placeholder":e.unref(l.Translate)("base.end_at"),clearable:!1,onChange:t[1]||(t[1]=N=>e.unref(s)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(b),onSearch:t[2]||(t[2]=N=>e.unref(s)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:h,url:e.unref(O).urls.sql,"search-param":e.unref(f),autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"})),Oe=()=>Promise.resolve().then(()=>Se),Fe=()=>Promise.resolve().then(()=>De),qe=()=>Promise.resolve().then(()=>Ee),$e=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:Oe,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Fe,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:qe,meta:{title:l.Translate("menu.SqlLog")}}],Pe={install:y=>{Reflect.ownKeys(y._context.provides).some(w=>String(w)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.warn(Reflect.ownKeys(y._context.provides))},version:"__VERSION__"},ze=Object.assign({"./views/admin/index.vue":le,"./views/language/index.vue":te,"./views/menu/index.vue":fe,"./views/role/index.vue":ge,"./views/site/index.vue":Be});L.AdminsPage=j,L.ErrorLogsPage=M,L.LanguagesPage=I,L.LogRoutes=$e,L.MenusPage=W,L.RequestLogsPage=u,L.RolesPage=H,L.SQLLogsPage=v,L.SitePage=Z,L.basicModules=ze,L.default=Pe,Object.defineProperties(L,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .rule-check[data-v-487a9d12]{width:100%;border-radius:4px}.rule-check-content[data-v-487a9d12]{height:360px;overflow-y:auto}.rule-check-content[data-v-487a9d12]::-webkit-scrollbar{display:none}.config-card[data-v-e8ad951f]{margin-bottom:12px;border-radius:8px}.config-card[data-v-e8ad951f] .el-card__header{padding:12px 20px}.config-card .logo[data-v-e8ad951f],.config-card .transparent-background[data-v-e8ad951f]{background-color:transparent}.config-card .title[data-v-e8ad951f]{font-size:18px}
1
+ .rule-check[data-v-7adb5f76]{width:100%;border-radius:4px}.rule-check-content[data-v-7adb5f76]{height:360px;overflow-y:auto}.rule-check-content[data-v-7adb5f76]::-webkit-scrollbar{display:none}.config-card[data-v-e8ad951f]{margin-bottom:12px;border-radius:8px}.config-card[data-v-e8ad951f] .el-card__header{padding:12px 20px}.config-card .logo[data-v-e8ad951f],.config-card .transparent-background[data-v-e8ad951f]{background-color:transparent}.config-card .title[data-v-e8ad951f]{font-size:18px}
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const __VERSION__ = "0.0.52'
1
+ export const __VERSION__ = "0.0.53'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-vue-basic",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "type": "module",
5
5
  "main": "./dist/auto-vue-basic.umd.js",
6
6
  "module": "./dist/auto-vue-basic.es.js",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@element-plus/icons-vue": "^2.3.1",
24
- "auto-vue-manual": ">=0.2.29",
24
+ "auto-vue-manual": ">=0.2.33",
25
25
  "axios": "^1.7.9",
26
26
  "element-plus": "^2.9.3",
27
27
  "mitt": "^3.0.1",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "peerDependencies": {
59
59
  "@element-plus/icons-vue": "^2.3.1",
60
- "auto-vue-manual": ">=0.2.29",
60
+ "auto-vue-manual": ">=0.2.33",
61
61
  "element-plus": "^2.9.3",
62
62
  "sass": "^1.77.6",
63
63
  "sass-loader": "^16.0.4",