auto-vue-basic 0.0.82 → 0.0.83
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.
|
@@ -4149,7 +4149,11 @@ const Wl = /* @__PURE__ */ O({
|
|
|
4149
4149
|
key: "LANGUAGE_SELECT",
|
|
4150
4150
|
url: W.urls.languages,
|
|
4151
4151
|
api: W,
|
|
4152
|
-
isArray: !0
|
|
4152
|
+
isArray: !0,
|
|
4153
|
+
formatOptions: (p) => ({
|
|
4154
|
+
value: p,
|
|
4155
|
+
label: p
|
|
4156
|
+
})
|
|
4153
4157
|
});
|
|
4154
4158
|
return (p, t) => {
|
|
4155
4159
|
const v = s("el-space"), u = s("el-radio-button"), f = s("el-radio-group");
|
|
@@ -4160,11 +4164,11 @@ const Wl = /* @__PURE__ */ O({
|
|
|
4160
4164
|
onChange: e(i)
|
|
4161
4165
|
}, {
|
|
4162
4166
|
default: o(() => [(S(!0), I(G, null, ee(e(m), (_) => (S(), T(u, {
|
|
4163
|
-
key: _
|
|
4164
|
-
value: _
|
|
4167
|
+
key: _,
|
|
4168
|
+
value: _
|
|
4165
4169
|
}, {
|
|
4166
4170
|
default: o(() => [l(v, null, {
|
|
4167
|
-
default: o(() => [P("span", null, z(_
|
|
4171
|
+
default: o(() => [P("span", null, z(_), 1)]),
|
|
4168
4172
|
_: 2
|
|
4169
4173
|
}, 1024)]),
|
|
4170
4174
|
_: 2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(A,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):(A=typeof globalThis<"u"?globalThis:A||self,e(A.AutoVueBasic={},A.Vue,A["auto-vue-manual"]))})(this,(function(A,e,l){"use strict";const ce={tops:"tops",rules:"rules"},L=l.ApiUtils.routineApi("menu","id",ce,{},["TOP_MENU_LIST","MENU_LIST"]),H=l.ApiUtils.routineApi("rule","key");/*! Element Plus Icons Vue v2.3.2 */var me=e.defineComponent({name:"Key",__name:"key",setup(x){return(k,C)=>(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"})]))}}),_e=me,be=e.defineComponent({name:"Search",__name:"search",setup(x){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),he=be;const Q=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:k}){const C=k,h=x,{requesting:_}=l.useLoading(L),{value:m,options:i,change:d,refresh:s,filterOptions:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"TOP_MENU_LIST",api:L,url:L.urls.tops,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),c=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(c,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(_),placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=b=>e.unref(s)(!0))},null,8,["loading"])]),default:e.withCtx(({item:b})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${b.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(b.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),ge=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={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}},m={sort:[{required:!0,type:"number",message:l.Translate("placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("placeholder.input menu.component"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,L);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),g=e.resolveComponent("el-input-number"),p=e.resolveComponent("el-row"),U=e.resolveComponent("el-input"),V=e.resolveComponent("el-switch"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[17]||(t[17]=y=>e.isRef(i)?i.value=y:null),title:e.unref(d)(),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(S,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(p,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(p,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:e.unref(r).menu_id,"onUpdate:modelValue":t[0]||(t[0]=y=>e.unref(r).menu_id=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{"label-width":"60px",label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(g,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=y=>e.unref(r).sort=y),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).module,"onUpdate:modelValue":t[2]||(t[2]=y=>e.unref(r).module=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=y=>e.unref(r).name=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[4]||(t[4]=y=>e.unref(r).en_name=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).component,"onUpdate:modelValue":t[5]||(t[5]=y=>e.unref(r).component=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).url,"onUpdate:modelValue":t[6]||(t[6]=y=>e.unref(r).url=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=y=>e.unref(r).remark=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).icon,"onUpdate:modelValue":t[8]||(t[8]=y=>e.unref(r).icon=y),placeholder:e.unref(l.Translate)("placeholder.input"),onInput:t[9]||(t[9]=y=>{e.unref(r).meta.icon=y})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(r).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).meta.title,"onUpdate:modelValue":t[10]||(t[10]=y=>e.unref(r).meta.title=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).meta.active,"onUpdate:modelValue":t[11]||(t[11]=y=>e.unref(r).meta.active=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.link,"onUpdate:modelValue":t[12]||(t[12]=y=>e.unref(r).meta.link=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.keep_alive,"onUpdate:modelValue":t[13]||(t[13]=y=>e.unref(r).meta.keep_alive=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.hide,"onUpdate:modelValue":t[14]||(t[14]=y=>e.unref(r).meta.hide=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.full,"onUpdate:modelValue":t[15]||(t[15]=y=>e.unref(r).meta.full=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.affix,"onUpdate:modelValue":t[16]||(t[16]=y=>e.unref(r).meta.affix=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),J=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:k}){const C=k,h=x,{requesting:_}=l.useLoading(L),{value:m,options:i,change:d,refresh:s,filterOptions:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"MENU_LIST",api:L,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),c=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(c,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(_),placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=b=>e.unref(s)(!0))},null,8,["loading"])]),default:e.withCtx(({item:b})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${b.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(b.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Ce=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},m={menu_id:[{required:!0,type:"number",message:l.Translate("placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("placeholder.input menu.rules"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,H);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-input"),p=e.resolveComponent("el-col"),U=e.resolveComponent("el-row"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[6]||(t[6]=S=>e.isRef(i)?i.value=S:null),title:e.unref(d)("menu.rules"),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(p,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:e.unref(r).menu_id,"onUpdate:modelValue":t[0]||(t[0]=S=>e.unref(r).menu_id=S)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=S=>e.unref(r).sort=S),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=S=>e.unref(r).name=S),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=S=>e.unref(r).en_name=S),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[4]||(t[4]=S=>e.unref(r).remark=S),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(p,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).urls,"onUpdate:modelValue":t[5]||(t[5]=S=>e.unref(r).urls=S),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function X(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const Z=e.defineComponent({__name:"index",setup(x){const k={keyword:"",status:0},C=e.ref(""),h=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:t})=>e.createVNode("span",{class:"iconfont "+t.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:t})=>{var o;return e.createVNode(e.Fragment,null,[(o=t.menu)==null?void 0:o.translate])}},{label:l.Translate("base.name"),prop:"translate",width:160},{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:t})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=t.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:C.value===n.key,title:l.Translate("message.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R({key:n.key}),onClose:()=>C.value=n.key},{default:()=>[n.translate]}),default:()=>{let g,p;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.space base.delete base.space menu.rules")}: ${t.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>C.value=""},X(g=l.Translate("base.cancel"))?g:{default:()=>[g]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>T(n.key)},X(p=l.Translate("base.confirm"))?p:{default:()=>[p]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:L.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:t})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>f({id:t.id})},null)}],{requesting:_}=l.useLoading(L),{tableRef:m,formModalRef:i,keyword:d,search:s,refresh:r,reset:w,openFormModal:a,editFormModal:f}=l.useCrudPage(k),{formModalRef:c,openFormModal:b,editFormModal:R}=l.useCrudPage(),T=t=>{H[l.DEFAULT_REMOVE_KEY]({key:t}).then(()=>{C.value="",r()})};return(t,o)=>{const n=e.resolveComponent("el-button"),g=e.resolveComponent("el-input"),p=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),V=e.resolveComponent("el-space"),S=e.resolveComponent("el-page-header"),y=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(y,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[5]||(o[5]=()=>C.value="")},{header:e.withCtx(()=>[e.createVNode(S,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(w)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"]),e.createVNode(n,{circle:"",icon:e.unref(_e),onClick:e.unref(b)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(d).keyword,"onUpdate:modelValue":o[0]||(o[0]=B=>e.unref(d).keyword=B),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(B=>e.unref(s)(),["enter"])),onClear:o[2]||(o[2]=B=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(U,{modelValue:e.unref(d).status,"onUpdate:modelValue":o[3]||(o[3]=B=>e.unref(d).status=B),onChange:o[4]||(o[4]=B=>e.unref(s)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],B=>e.createVNode(p,{key:B,label:e.unref(l.Translate)(`status.${B}`),value:B},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:e.unref(s)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:m,size:"small",columns:h,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(d),"auto-search":""},null,8,["url","search-param"]),e.createVNode(ge,{ref_key:"formModalRef",ref:i,onRefresh:e.unref(r)},null,8,["onRefresh"]),e.createVNode(Ce,{ref_key:"ruleFormModalRef",ref:c,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),we=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),K=l.ApiUtils.routineApi("role","key"),xe={class:"rule-check"},Te={style:{width:"80px","line-height":"36px"}},ke=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(x,{expose:k,emit:C}){const{requesting:h}=l.useLoading(L),_=x,m=C,i=e.ref(!1),d=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:s,refresh:r}=l.useSelect(e.toRef(_,"modelValue"),m,{key:"RULE_CHECK",api:L,url:L.urls.rules,isArray:!0},{autoRefresh:!1});function w(){s.value.forEach(T=>{var t;(t=T.rules)!=null&&t.length&&(d.MenuAll[T.id]=!1,d.MenuIndeterminate[T.id]=!1,d.MenuList[T.id]=[])})}function a(T){s.value.forEach(t=>{var o;(o=t.rules)!=null&&o.length&&(d.MenuList[t.id]=T?t.rules.map(n=>n.key):[])}),c()}function f(T,t){const o=s.value.find(n=>n.id===t);d.MenuList[t]=T&&o?o.rules.map(n=>n.key):[],c()}function c(){s.value.forEach(T=>{var n,g;const t=((n=T.rules)==null?void 0:n.length)||0,o=((g=d.MenuList[T.id])==null?void 0:g.length)||0;d.MenuAll[T.id]=o===t&&t>0,d.MenuIndeterminate[T.id]=o>0&&o<t}),d.checkAll=Object.values(d.MenuAll).every(Boolean),d.indeterminate=!d.checkAll&&Object.values(d.MenuList).some(T=>T.length>0),m("update:modelValue",Object.values(d.MenuList).flat())}function b(){d.checkAll=!1,d.indeterminate=!1,d.MenuAll={},d.MenuList={},d.MenuIndeterminate={},w(),m("update:modelValue",[]),i.value=!1}function R(T){var t;if(Array.isArray(s.value)&&s.value.length>0){for(let o of s.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)T.some(g=>g===n.key)&&(d.MenuList[o.id]=(((t=d.MenuList)==null?void 0:t[o.id])||[]).concat([n.key]));c(),i.value=!0}}return e.onMounted(async()=>{var T;(T=s.value)!=null&&T.length||await r(),!i.value&&_.modelValue&&R(_.modelValue)}),e.watch(()=>_.modelValue,T=>{e.nextTick(()=>{var t;i.value||!((t=s.value)!=null&&t.length)||T&&T.length>0&&R(T)})},{deep:!0,immediate:!0}),k({generateOption:R,cleanChecked:b}),(T,t)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),g=e.resolveComponent("el-text"),p=e.resolveComponent("el-divider"),U=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":d.checkAll,indeterminate:d.indeterminate,id:"all",disabled:x.disabled,onChange:a},{default:e.withCtx(()=>[...t[1]||(t[1]=[e.createElementVNode("span",null,"全选",-1)])]),_:1},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),text:"",size:"small",onRefresh:t[0]||(t[0]=V=>e.unref(r)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),V=>(e.openBlock(),e.createElementBlock("div",{key:V.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":d.MenuAll[V.id],disabled:x.disabled||!V.rules||V.rules.length<=0,indeterminate:d.MenuIndeterminate[V.id],onChange:S=>f(S,V.id)},{default:e.withCtx(()=>[e.createVNode(g,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(p,{direction:"vertical"}),V.rules?(e.openBlock(),e.createBlock(U,{key:0,modelValue:d.MenuList[V.id],"onUpdate:modelValue":S=>d.MenuList[V.id]=S,disabled:x.disabled,style:{margin:"auto"},onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.rules,S=>(e.openBlock(),e.createBlock(o,{key:S.key,value:S.key},{default:e.withCtx(()=>[e.createElementVNode("div",Te,e.toDisplayString(S.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),u=(x,k)=>{const C=x.__vccOpts||x;for(const[h,_]of k)C[h]=_;return C},Ne=u(ke,[["__scopeId","data-v-7adb5f76"]]),ye=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_=e.ref(),m={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},i={name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}]},{modal:d,title:s,form:r,formData:w,requesting:a,executing:f,open:c,modify:b,submit:R,closed:T}=l.useForm(h,m,K),t=()=>{var o;(o=_.value)==null||o.cleanChecked(),T()};return k({open:c,modify:b}),(o,n)=>{const g=e.resolveComponent("el-input"),p=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-col"),V=e.resolveComponent("el-input-number"),S=e.resolveComponent("el-row"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(d),"onUpdate:modelValue":n[6]||(n[6]=B=>e.isRef(d)?d.value=B:null),title:e.unref(s)(),width:"1000px",executing:e.unref(f),onClosed:t,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(y,{ref_key:"form",ref:r,model:e.unref(w),"label-width":"auto",rules:i,disabled:e.unref(a)||e.unref(f)},{default:e.withCtx(()=>[e.createVNode(S,{gutter:20},{default:e.withCtx(()=>[e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(p,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).module,"onUpdate:modelValue":n[0]||(n[0]=B=>e.unref(w).module=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(p,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(V,{class:"w-full",modelValue:e.unref(w).sort,"onUpdate:modelValue":n[1]||(n[1]=B=>e.unref(w).sort=B),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(p,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).name,"onUpdate:modelValue":n[2]||(n[2]=B=>e.unref(w).name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).en_name,"onUpdate:modelValue":n[3]||(n[3]=B=>e.unref(w).en_name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).remark,"onUpdate:modelValue":n[4]||(n[4]=B=>e.unref(w).remark=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(Ne,{ref_key:"rulesCheck",ref:_,modelValue:e.unref(w).rules,"onUpdate:modelValue":n[5]||(n[5]=B=>e.unref(w).rules=B),disabled:e.unref(a)||e.unref(f)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),M=e.defineComponent({__name:"index",setup(x){const k={keyword:""},C=[{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("time.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:65,align:"center",render:({row:f})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>a({key:f.key})},null)}],{requesting:h}=l.useLoading(K),{tableRef:_,formModalRef:m,keyword:i,search:d,reset:s,refresh:r,openFormModal:w,editFormModal:a}=l.useCrudPage(k);return(f,c)=>{const b=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),T=e.resolveComponent("el-page-header"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(T,{class:"basic-header"},{title: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(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(b,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":c[0]||(c[0]=o=>e.unref(i).keyword=o),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:c[1]||(c[1]=e.withKeys(o=>e.unref(d)(),["enter"])),onClear:c[2]||(c[2]=o=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:c[3]||(c[3]=o=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,columns:C,url:e.unref(K).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(ye,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),Ve=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),D=l.ApiUtils.routineApi("I18N","uuid",{modules:"modules",languages:"languages"},{gen:"gen"},["I18N_MODULES"]),O=l.ApiUtils.routineApi("I18N_template","uuid",{apps:"apps"}),v=e.defineComponent({__name:"ModuleSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},allowCreate:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(x,{emit:k}){const C=k,h=x,{requesting:_}=l.useLoading(D),{value:m,options:i,change:d,refresh:s,filterOptions:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"I18N_MODULES",url:D.urls.modules,api:D,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),c=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(c,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(_),clearable:x.clearable,filterable:"","allow-create":x.allowCreate,"default-first-option":"",placeholder:e.unref(l.Translate)("placeholder.select"),filterOptions:e.unref(r),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=b=>e.unref(s)(!0))},null,8,["loading"])]),default:e.withCtx(({item:b})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(b.value),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","clearable","allow-create","placeholder","filterOptions","onChange"])}}}),Re=e.defineComponent({__name:"I18N",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={uuid:"",key:"",module:void 0,language:{"zh-CN":"","en-US":""},remark:""},m={module:[{required:!0,message:l.Translate("i18n.verify.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("i18n.verify.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("i18n.verify.language"),trigger:"change"}]},i=e.ref([]),d=l.useCacheStore();function s(){const n={isArray:!0,key:"I18N_LANGUAGES",url:D.urls.languages,params:{}};d.GET_CACHE({...n,force:!0}).then(g=>{i.value=g})}s();const{modal:r,title:w,form:a,formData:f,requesting:c,executing:b,open:R,modify:T,submit:t,closed:o}=l.useForm(h,_,D);return k({open:R,modify:T}),(n,g)=>{const p=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-input"),V=e.resolveComponent("el-space"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(r),"onUpdate:modelValue":g[3]||(g[3]=y=>e.isRef(r)?r.value=y:null),title:e.unref(w)(),width:"600px",executing:e.unref(b),onClosed:e.unref(o),onSubmit:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(S,{ref_key:"form",ref:a,model:e.unref(f),"label-width":"auto",rules:m,disabled:e.unref(c)||e.unref(b)},{default:e.withCtx(()=>[e.createVNode(p,{label:e.unref(l.Translate)("i18n.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(v,{modelValue:e.unref(f).module,"onUpdate:modelValue":g[0]||(g[0]=y=>e.unref(f).module=y),"allow-create":""},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("i18n.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(f).key,"onUpdate:modelValue":g[1]||(g[1]=y=>e.unref(f).key=y),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("i18n.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(V,{direction:"vertical",fill:"",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y},[e.createVNode(U,{modelValue:e.unref(f).language[y],"onUpdate:modelValue":B=>e.unref(f).language[y]=B,placeholder:e.unref(l.Translate)("i18n.placeholder.language")},{prepend:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128))]),_:1})]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(f).remark,"onUpdate:modelValue":g[2]||(g[2]=y=>e.unref(f).remark=y),placeholder:e.unref(l.Translate)("placeholder.remark")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function Ue(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const ee=e.defineComponent({__name:"I18N",emits:["closed","choosed"],setup(x,{expose:k,emit:C}){const h=e.ref(!1),_=C,m={keyword:"",module:void 0,status:0},i=[{label:l.Translate("i18n.module"),prop:"module",width:120},{label:l.Translate("i18n.key"),prop:"key",width:200},{label:l.Translate("i18n.i18n"),align:"left",prop:"language",render:({row:g})=>{const U=Object.keys(g.language).filter(V=>!!g.language[V]).map(V=>`${V}: ${g.language[V]}`).join("; ");return e.createVNode(e.resolveComponent("el-space"),null,Ue(U)?U:{default:()=>[U]})}},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:D.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:({row:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",onModify:()=>T({uuid:g.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:s.value,onClick:()=>t(g.uuid)},null)]})}],{requesting:d,executing:s}=l.useLoading(D),{tableRef:r,formModalRef:w,keyword:a,search:f,reset:c,refresh:b,openFormModal:R,editFormModal:T}=l.useCrudPage(m);function t(g){return D.remove({uuid:g}).finally(()=>{b()})}const o=()=>{h.value=!0};function n(g){_("choosed",g)}return e.watch(()=>h.value,g=>{g||_("closed")}),k({open:o}),(g,p)=>{const U=e.resolveComponent("el-input"),V=e.resolveComponent("el-radio-button"),S=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-space"),B=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:h.value,"onUpdate:modelValue":p[7]||(p[7]=N=>h.value=N),width:"880px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(B,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(d),onRefresh:e.unref(c)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(R),disabled:e.unref(d)},null,8,["onOpen","disabled"])]),content:e.withCtx(()=>[e.createVNode(y,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(U,{style:{width:"160px"},modelValue:e.unref(a).keyword,"onUpdate:modelValue":p[0]||(p[0]=N=>e.unref(a).keyword=N),disabled:e.unref(d),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:p[1]||(p[1]=e.withKeys(N=>e.unref(f)(),["enter"])),onClear:p[2]||(p[2]=N=>e.unref(f)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(v,{modelValue:e.unref(a).module,"onUpdate:modelValue":p[3]||(p[3]=N=>e.unref(a).module=N),clearable:!0,disabled:e.unref(d),style:{width:"160px"}},null,8,["modelValue","disabled"]),e.createVNode(S,{modelValue:e.unref(a).status,"onUpdate:modelValue":p[4]||(p[4]=N=>e.unref(a).status=N),onChange:p[5]||(p[5]=N=>e.unref(f)()),disabled:e.unref(d)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],N=>e.createVNode(V,{key:N,label:e.unref(l.Translate)(`status.${N}`),value:N},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(d),onSearch:p[6]||(p[6]=N=>e.unref(f)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:r,columns:i,url:e.unref(D).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),onRowDblclick:n,"auto-search":""},null,8,["url","search-param"]),e.createVNode(Re,{ref_key:"formModalRef",ref:w,onRefresh:e.unref(b)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Be={key:0},Se={key:1},Ae=e.defineComponent({__name:"template",emits:["refresh"],setup(x,{expose:k,emit:C}){const{formModalRef:h,openFormModal:_}=l.useCrudPage(),m=C,i=e.ref("600px"),d=e.ref({"zh-CN":"primary","en-US":"success"}),s=e.ref({}),r={uuid:"",app:1,keys:"",values:[],remark:""},w={app:[{required:!0,message:l.Translate("i18n.verify.app"),trigger:"blur"}],keys:[{required:!0,message:l.Translate("i18n.verify.keys"),trigger:"blur"}],values:[{required:!0,message:l.Translate("i18n.verify.values"),trigger:"change"}]},{modal:a,title:f,form:c,formData:b,requesting:R,executing:T,open:t,modify:o,submit:n,closed:g}=l.useForm(m,r,O);function p(){i.value="1080px",_()}function U(){i.value="600px"}function V(B){let N=B.module.toLowerCase()+"."+B.key.toLowerCase();b.keys=N,b.values.push(N);for(const P in B.language)s.value[P]||(s.value[P]=[]),s.value[P].push(B.language[P])}function S(){i.value="600px",y()}function y(){b.keys="",b.values=[],s.value={"zh-CN":[],"en-US":[]}}return e.watch(()=>a.value,B=>{B?S():g()}),k({open:t,modify:o}),(B,N)=>{const P=e.resolveComponent("el-page-header"),j=e.resolveComponent("el-form-item"),tl=e.resolveComponent("el-button"),fe=e.resolveComponent("el-input"),nl=e.resolveComponent("el-tag"),ol=e.resolveComponent("el-space"),al=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(a),"onUpdate:modelValue":N[3]||(N[3]=E=>e.isRef(a)?a.value=E:null),width:i.value,"show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(P,{class:"basic-header"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("i18n.template")),1)]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"default",icon:"icon-clear",loading:e.unref(T),onClick:y},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{circle:!1,size:"default",type:"primary",icon:"icon-save",plain:!1,loading:e.unref(T),onClick:e.unref(n)},null,8,["loading","onClick"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(al,{ref_key:"form",ref:c,model:e.unref(b),"label-width":"auto",rules:w,disabled:e.unref(R)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(j,{label:e.unref(l.Translate)("base.app"),prop:"app",required:""},{default:e.withCtx(()=>[e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(b).app,"onUpdate:modelValue":N[0]||(N[0]=E=>e.unref(b).app=E),"cache-key":"I18NAPPS",hidden:[0],url:e.unref(O).urls.apps},null,8,["modelValue","url"])]),_:1},8,["label"]),e.createVNode(j,{label:e.unref(l.Translate)("i18n.keys"),prop:"keys",required:""},{default:e.withCtx(()=>[e.createVNode(fe,{modelValue:e.unref(b).keys,"onUpdate:modelValue":N[1]||(N[1]=E=>e.unref(b).keys=E),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{append:e.withCtx(()=>[e.createVNode(tl,{icon:e.unref(he),onClick:p},null,8,["icon"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(j,{label:e.unref(l.Translate)("i18n.values"),prop:"values",required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).values.join(":")),1)]),_:1},8,["label"]),e.createVNode(j,{label:e.unref(l.Translate)("i18n.values")},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(E,Y)=>(e.openBlock(),e.createElementBlock("div",{key:Y,class:"w-full"},[e.createVNode(ol,null,{default:e.withCtx(()=>[e.createVNode(nl,{type:d.value[Y],style:{"min-width":"80px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Y),1)]),_:2},1032,["type"]),Y=="zh-CN"?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(E.join("")),1)):(e.openBlock(),e.createElementBlock("span",Se,e.toDisplayString(E.join(" ")),1))]),_:2},1024)]))),128))]),_:1},8,["label"]),e.createVNode(j,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(fe,{modelValue:e.unref(b).remark,"onUpdate:modelValue":N[2]||(N[2]=E=>e.unref(b).remark=E),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"]),e.createVNode(ee,{ref_key:"I18nTableDrawerRef",ref:h,onChoosed:V,onClosed:U},null,512)]),_:1},8,["modelValue","width"])}}}),De=l.ApiUtils.routineApi("gateway","id",{gen:"gen_translation"});function Le(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const le=e.defineComponent({__name:"index",setup(x){const k={keyword:"",app:0,status:0},C=[{label:l.Translate("base.app"),prop:"app",width:120,render:({row:o})=>{let n;return e.createVNode(e.resolveComponent("el-tag"),{type:l.Translate("i18n.app.colors."+o.app),style:"min-width: 80px"},Le(n=l.Translate("i18n.app."+o.app))?n:{default:()=>[n]})}},{label:l.Translate("i18n.keys"),prop:"keys",width:200},{label:l.Translate("i18n.values"),prop:"values",width:200},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:O.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.created_at"),prop:"created_at",width:160},{label:l.Translate("time.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:({row:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",disabled:_.value,onModify:()=>b({uuid:o.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:_.value,onClick:()=>R(o.uuid)},null)]})}],{requesting:h,executing:_}=l.useLoading(O),{formModalRef:m,openFormModal:i}=l.useCrudPage(),{tableRef:d,formModalRef:s,keyword:r,search:w,reset:a,refresh:f,openFormModal:c,editFormModal:b}=l.useCrudPage(k);function R(o){return O.remove({uuid:o}).finally(()=>{f()})}function T(){return D.gen().finally(()=>{f()})}function t(){De.gen().finally(()=>{f()})}return(o,n)=>{const g=e.resolveComponent("el-input"),p=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),V=e.resolveComponent("el-space"),S=e.resolveComponent("el-divider"),y=e.resolveComponent("el-page-header"),B=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(B,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(y,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(a)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(c)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(r).keyword,"onUpdate:modelValue":n[0]||(n[0]=N=>e.unref(r).keyword=N),disabled:e.unref(h)||e.unref(_),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(N=>e.unref(w)(),["enter"])),onClear:n[2]||(n[2]=N=>e.unref(w)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(r).app,"onUpdate:modelValue":n[3]||(n[3]=N=>e.unref(r).app=N),"cache-key":"I18NAPPS",disabled:e.unref(h)||e.unref(_),url:e.unref(O).urls.apps,onChange:n[4]||(n[4]=N=>e.unref(w)())},null,8,["modelValue","disabled","url"]),e.createVNode(U,{modelValue:e.unref(r).status,"onUpdate:modelValue":n[5]||(n[5]=N=>e.unref(r).status=N),disabled:e.unref(h)||e.unref(_),onChange:n[6]||(n[6]=N=>e.unref(w)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],N=>e.createVNode(p,{key:N,label:e.unref(l.Translate)(`status.${N}`),value:N},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h)||e.unref(_),onSearch:n[7]||(n[7]=N=>e.unref(w)())},null,8,["disabled"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"warning",icon:"icon-cloud-upload",plain:!1,loading:e.unref(_),onClick:T},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-translate",plain:!1,loading:e.unref(_),onClick:t},null,8,["loading"]),e.createVNode(S,{direction:"vertical"}),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(i),icon:"icon-en-US"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:d,columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(r),"auto-search":""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"I18nTableDrawerRef",ref:m,onRefresh:e.unref(f)},null,8,["onRefresh"]),e.createVNode(Ae,{ref_key:"formModalRef",ref:s,onRefresh:e.unref(f)},null,8,["onRefresh"])]),_:1})}}}),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"})),G=l.ApiUtils.routineApi("admin","key"),Oe=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:m,title:i,form:d,formData:s,requesting:r,executing:w,open:a,modify:f,submit:c,closed:b}=l.useForm(h,_,G),R={username:[{required:!0,message:l.Translate("placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("placeholder.select menu.Role"),trigger:"change"}]},T=e.ref([]),t=async()=>{const o=await K.list();T.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return e.onBeforeMount(async()=>{await t()}),k({open:a,modify:f}),(o,n)=>{const g=e.resolveComponent("el-input"),p=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),S=e.resolveComponent("el-checkbox"),y=e.resolveComponent("el-checkbox-group"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":n[7]||(n[7]=N=>e.isRef(m)?m.value=N:null),title:e.unref(i)(),width:"600px",executing:e.unref(w),onClosed:e.unref(b),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:d,model:e.unref(s),"label-width":"auto",rules:R,disabled:e.unref(r)||e.unref(w)},{default:e.withCtx(()=>[e.createVNode(p,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).username,"onUpdate:modelValue":n[0]||(n[0]=N=>e.unref(s).username=N),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).phone,"onUpdate:modelValue":n[1]||(n[1]=N=>e.unref(s).phone=N),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(s).key},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).password,"onUpdate:modelValue":n[2]||(n[2]=N=>e.unref(s).password=N),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(p,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).email,"onUpdate:modelValue":n[3]||(n[3]=N=>e.unref(s).email=N),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(s).language,"onUpdate:modelValue":n[4]||(n[4]=N=>e.unref(s).language=N)},{default:e.withCtx(()=>[e.createVNode(U,{value:"zh-CN"},{default:e.withCtx(()=>[...n[8]||(n[8]=[e.createTextVNode("zh-CN",-1)])]),_:1}),e.createVNode(U,{value:"en-US"},{default:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode("en-US",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(s).roles,"onUpdate:modelValue":n[5]||(n[5]=N=>e.unref(s).roles=N)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,N=>(e.openBlock(),e.createBlock(S,{key:N.key,value:N.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).remark,"onUpdate:modelValue":n[6]||(n[6]=N=>e.unref(s).remark=N),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),re=e.defineComponent({__name:"index",setup(x){const k={keyword:""},C=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:f})=>e.createVNode(l.BasicAvatar,{src:f.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:f})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[f.username]),e.createVNode("div",null,[f.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.login_at"),prop:"login_at",width:160},{label:l.Translate("time.created_at"),prop:"created_at",width:160},{label:l.Translate("time.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:f})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:f.key})},null)}],{requesting:h}=l.useLoading(G),{tableRef:_,formModalRef:m,keyword:i,search:d,reset:s,refresh:r,openFormModal:w,editFormModal:a}=l.useCrudPage(k);return(f,c)=>{const b=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),T=e.resolveComponent("el-page-header"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(T,{class:"basic-header"},{title: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(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(b,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":c[0]||(c[0]=o=>e.unref(i).keyword=o),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:c[1]||(c[1]=e.withKeys(o=>e.unref(d)(),["enter"])),onClear:c[2]||(c[2]=o=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:c[3]||(c[3]=o=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:C,url:e.unref(G).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Oe,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),qe=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"})),Fe={check:"check"},q=l.ApiUtils.routineApi("site","id",Fe),z=l.ApiUtils.routineApi("domain"),W=e.defineComponent({__name:"DomainSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:k,emit:C}){const h=C,_=x,{requesting:m}=l.useLoading(z),{key:i,options:d,refresh:s,change:r}=l.useSelect(e.toRef(_,"modelValue"),h,{key:"DOMAIN_LIST",api:z,isArray:!0});return k({refresh:s}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(i),"onUpdate:modelValue":a[0]||(a[0]=c=>e.isRef(i)?i.value=c:null),options:e.unref(d),disabled:x.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),$e=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},m={domain_id:[{required:!0,message:l.Translate("placeholder.input config.domain"),trigger:"blur"}],prefix:[{required:!0,message:l.Translate("placeholder.input base.prefix"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,q);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[7]||(t[7]=p=>e.isRef(i)?i.value=p:null),title:e.unref(d)("config.site"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:e.unref(r).domain_id,"onUpdate:modelValue":t[0]||(t[0]=p=>e.unref(r).domain_id=p),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).prefix,"onUpdate:modelValue":t[1]||(t[1]=p=>e.unref(r).prefix=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=p=>e.unref(r).name=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("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(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=p=>e.unref(r).en_name=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"dns",label:e.unref(l.Translate)("config.dns")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).dns,"onUpdate:modelValue":t[4]||(t[4]=p=>e.unref(r).dns=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"git",label:e.unref(l.Translate)("config.git")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).git,"onUpdate:modelValue":t[5]||(t[5]=p=>e.unref(r).git=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("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(r).remark,"onUpdate:modelValue":t[6]||(t[6]=p=>e.unref(r).remark=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),I=l.ApiUtils.routineApi("domain_provider"),te=e.defineComponent({__name:"DomainProviderSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:k,emit:C}){const h=C,_=x,{requesting:m}=l.useLoading(I),{key:i,options:d,refresh:s,change:r}=l.useSelect(e.toRef(_,"modelValue"),h,{key:"DOMAIN_PROVIDER_LIST",api:I,isArray:!0});return k({refresh:s}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(i),"onUpdate:modelValue":a[0]||(a[0]=c=>e.isRef(i)?i.value=c:null),options:e.unref(d),disabled:x.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain config.provider"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Pe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},m={provider_id:[{required:!0,message:l.Translate("placeholder.input config.domain config.provider"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,z);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),g=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[4]||(t[4]=U=>e.isRef(i)?i.value=U:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(p,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"provider_id",label:e.unref(l.Translate)("config.provider")},{default:e.withCtx(()=>[e.createVNode(te,{modelValue:e.unref(r).provider_id,"onUpdate:modelValue":t[0]||(t[0]=U=>e.unref(r).provider_id=U),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[1]||(t[1]=U=>e.unref(r).name=U),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"expired_at",required:"",label:e.unref(l.Translate)("time.expired_at")},{default:e.withCtx(()=>[e.createVNode(g,{type:"date",style:{width:"100%"},modelValue:e.unref(r).expired_at,"onUpdate:modelValue":t[2]||(t[2]=U=>e.unref(r).expired_at=U),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)("placeholder.select")},null,8,["modelValue","disabled","value-format","format","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(r).remark,"onUpdate:modelValue":t[3]||(t[3]=U=>e.unref(r).remark=U),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),ze={gen:"gen"},F=l.ApiUtils.routineApi("SSL","id",ze),ne=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:k,emit:C}){const h=C,_=x,{requesting:m}=l.useLoading(q),{key:i,options:d,refresh:s,change:r}=l.useSelect(e.toRef(_,"modelValue"),h,{key:"SITE_LIST",api:q,isArray:!0},{formatOptions:w=>w.map(a=>{var f;return{...a,label:a.prefix+"."+((f=a.domain)==null?void 0:f.name),value:a.id}})});return k({refresh:s}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(i),"onUpdate:modelValue":a[0]||(a[0]=c=>e.isRef(i)?i.value=c:null),options:e.unref(d),disabled:x.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),oe=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},m={domain_id:[{required:!0,message:l.Translate("placeholder.select config.domain "),trigger:"blur"}],client:[{required:!0,message:l.Translate("placeholder.select config.client "),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],path:[{required:!0,message:l.Translate("placeholder.input base.path"),trigger:"blur"}],email:[{required:!0,message:l.Translate("placeholder.input base.email"),trigger:"blur"}],encryption:[{required:!0,message:l.Translate("placeholder.input config.encryption"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,F);return k({open:f,modify:c,formData:r}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),p=e.resolveComponent("el-input"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[8]||(t[8]=V=>e.isRef(i)?i.value=V:null),title:e.unref(d)("ssl.ssl"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:e.unref(r).domain_id,"onUpdate:modelValue":t[0]||(t[0]=V=>e.unref(r).domain_id=V),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"client",label:e.unref(l.Translate)("ssl.client")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).client,"onUpdate:modelValue":t[1]||(t[1]=V=>e.unref(r).client=V)},{default:e.withCtx(()=>[e.createVNode(n,{label:"Lego",value:"Lego"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{prop:"site_id",label:e.unref(l.Translate)("config.site")},{default:e.withCtx(()=>[e.createVNode(ne,{modelValue:e.unref(r).site_id,"onUpdate:modelValue":t[2]||(t[2]=V=>e.unref(r).site_id=V),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=V=>e.unref(r).name=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"path",label:e.unref(l.Translate)("base.path")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).path,"onUpdate:modelValue":t[4]||(t[4]=V=>e.unref(r).path=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"email",label:e.unref(l.Translate)("base.email")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).email,"onUpdate:modelValue":t[5]||(t[5]=V=>e.unref(r).email=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"encryption",label:e.unref(l.Translate)("config.encryption")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).encryption,"onUpdate:modelValue":t[6]||(t[6]=V=>e.unref(r).encryption=V)},{default:e.withCtx(()=>[e.createVNode(n,{label:"RSA2048",value:"RSA2048"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=V=>e.unref(r).remark=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Ie=e.defineComponent({__name:"DomainProviderFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},m={name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"},key:{required:!0,message:l.Translate("placeholder.input base.key"),trigger:"blur"},secret:{required:!0,message:l.Translate("placeholder.input config.secret"),trigger:"blur"},end_point:{required:!0,message:l.Translate("placeholder.input config.endpoint"),trigger:"blur"}},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,I);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[6]||(t[6]=p=>e.isRef(i)?i.value=p:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[0]||(t[0]=p=>e.unref(r).name=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("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(r).en_name,"onUpdate:modelValue":t[1]||(t[1]=p=>e.unref(r).en_name=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"key",label:e.unref(l.Translate)("base.key")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).key,"onUpdate:modelValue":t[2]||(t[2]=p=>e.unref(r).key=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"secret",label:e.unref(l.Translate)("config.secret")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).secret,"onUpdate:modelValue":t[3]||(t[3]=p=>e.unref(r).secret=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"end_point",label:e.unref(l.Translate)("config.end_point")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).end_point,"onUpdate:modelValue":t[4]||(t[4]=p=>e.unref(r).end_point=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("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(r).remark,"onUpdate:modelValue":t[5]||(t[5]=p=>e.unref(r).remark=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),je=e.defineComponent({__name:"DomainProviderTableDrawer",setup(x,{expose:k}){const{requesting:C}=l.useLoading(I),h=e.ref(!1),{tableRef:_,formModalRef:m,refresh:i,openFormModal:d,editFormModal:s}=l.useCrudPage({}),r=[{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:()=>s({id:a.id})},null)]})}];return k({open:()=>{h.value=!0}}),(a,f)=>{const c=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:h.value,"onUpdate:modelValue":f[0]||(f[0]=b=>h.value=b),width:"400px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(c,{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(i),size:"default",loading:e.unref(C)},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(I).urls.list,columns:r,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(Ie,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(i)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Ke=e.defineComponent({__name:"DomainTableDrawer",setup(x,{expose:k}){const{requesting:C}=l.useLoading(z),h=e.ref(!1),{tableRef:_,formModalRef:m,refresh:i,openFormModal:d,editFormModal:s}=l.useCrudPage(),{formModalRef:r,openFormModal:w,editFormModal:a}=l.useCrudPage(),{formModalRef:f,openFormModal:c}=l.useCrudPage(),b=[{prop:"provider",label:l.Translate("config.domain config.provider"),width:120,cellRenderer:({rowData:T})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var t;return[(t=T.provider)==null?void 0:t.name]}})},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"expired_text",label:l.Translate("time.expired_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:100,align:"center",render:({rowData:T})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>s({id:T.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{var t;T.ssl&&T.ssl.id?a({id:(t=T.ssl)==null?void 0:t.id}):(r.value.formData.domain_id=T.id,r.value.formData.site_id=0,w())}},null)]})}];return k({open:()=>{h.value=!0}}),(T,t)=>{const o=e.resolveComponent("el-space"),n=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=g=>h.value=g),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.domain")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(i),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(o,{class:"w-full extra-tool",alignment:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(c),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(z).urls.list,columns:b,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(Pe,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(i)},null,8,["onRefresh"]),e.createVNode(oe,{ref_key:"sslFormModalRef",ref:r,onRefresh:e.unref(i)},null,8,["onRefresh"]),e.createVNode(je,{ref_key:"providerTableDrawerRef",ref:f},null,512)]),_:1},8,["modelValue"])}}}),Ye=e.defineComponent({__name:"SSLTableDrawer",setup(x,{expose:k}){const{requesting:C,executing:h}=l.useLoading(F),_=e.ref(0),m=e.ref(!1),{tableRef:i,formModalRef:d,refresh:s,openFormModal:r,editFormModal:w}=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:R})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",icon:"icon-edit",t:"",disabled:h.value,onModify:()=>w({id:R.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:h.value&&_.value!==R.id,loading:_.value==R.id,onClick:()=>c(R.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:h.value&&_.value!==R.id,loading:_.value==R.id,onClick:()=>b(R)},null)]})}],f=()=>{m.value=!0},c=R=>{F.gen({id:R}).then(T=>{console.warn("Res:",T)})};function b(R){const T=l.AssetsUtils.getDownloadUrl(R.path+".zip");fetch(T).then(t=>t.blob()).then(t=>{let o=URL.createObjectURL(t),n=document.createElement("a");n.style.display="none",n.href=o,n.download=R.name+".zip",n.click(),URL.revokeObjectURL(t)})}return k({open:f}),(R,T)=>{const t=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:m.value,"onUpdate:modelValue":T[0]||(T[0]=o=>m.value=o),width:"1000px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(t,{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(s),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(r)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:i,size:"default","row-key":"id",url:e.unref(F).urls.list,columns:a,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(oe,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ae=l.ApiUtils.routineApi("SSLLog","id"),Ge=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(x,{expose:k}){const C=x,{requesting:h,executing:_}=l.useLoading([ae,F]),m=e.ref(!1),{tableRef:i,refresh:d}=l.useCrudPage(),s=[{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}],r=()=>{m.value=!0};function w(){F.gen({id:C.ssl.id}).then(f=>{console.warn("Res:",f)})}function a(){const f=l.AssetsUtils.getDownloadUrl(C.ssl.path+".zip");fetch(f).then(c=>c.blob()).then(c=>{let b=URL.createObjectURL(c),R=document.createElement("a");R.style.display="none",R.href=b,R.download=C.ssl.name+".zip",R.click(),URL.revokeObjectURL(c)})}return k({open:r}),(f,c)=>{const b=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:m.value,"onUpdate:modelValue":c[0]||(c[0]=R=>m.value=R),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(b,{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(h)},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:w},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:i,size:"small","row-key":"id",url:e.unref(ae).urls.search,columns:s,loading:e.unref(h)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),de=u(e.defineComponent({__name:"index",setup(x){const k=e.ref(),{requesting:C,executing:h}=l.useLoading(q),{tableRef:_,formModalRef:m,reset:i,refresh:d,openFormModal:s,editFormModal:r}=l.useCrudPage(),{formModalRef:w,openFormModal:a}=l.useCrudPage(),{formModalRef:f,openFormModal:c}=l.useCrudPage(),{formModalRef:b,openFormModal:R}=l.useCrudPage(),T=[{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("time.expired_at"),align:"center",width:140,cellRenderer:({rowData:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var g;return[(g=n.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(),n.ssl&&n.ssl.id&&(k.value=n.ssl,R())}},{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:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>r({id:n.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:h.value,loading:t.value==n.id&&h.value,onClick:()=>o(n)},null)]})}],t=e.ref(0),o=n=>{t.value=n.id,q.check({id:n.id}).then(g=>{g.data&&(l.notification(g),d())}).finally(()=>{t.value=0})};return(n,g)=>{const p=e.resolveComponent("el-space"),U=e.resolveComponent("el-page-header"),V=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(V,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(U,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(p,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(i)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(s)},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(c),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(q).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:T},null,8,["url"]),e.createVNode($e,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(Ke,{ref_key:"domainTableDrawerRef",ref:w},null,512),e.createVNode(Ye,{ref_key:"sslTableDrawerRef",ref:f},null,512),e.createVNode(Ge,{ref_key:"sslLogTableDrawerRef",ref:b},null,512)]),_:1})}}}),[["__scopeId","data-v-17c31592"]]),We=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"})),He={request:"request",error:"error",sql:"SQL"},$=l.ApiUtils.routineApi("log","id",He),se=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:h}=l.useLoading($),{tableRef:_,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(s,r)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=b=>e.unref(m).dates=b),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_VALUE_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:r[1]||(r[1]=b=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:r[2]||(r[2]=b=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:C,url:e.unref($).urls.request,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Qe=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"})),ie=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:h}=l.useLoading($),{tableRef:_,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(s,r)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=b=>e.unref(m).dates=b),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_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:r[1]||(r[1]=b=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:r[2]||(r[2]=b=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:C,url:e.unref($).urls.error,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Je=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"})),pe=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:h}=l.useLoading($),{tableRef:_,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(s,r)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=b=>e.unref(m).dates=b),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_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:r[1]||(r[1]=b=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:r[2]||(r[2]=b=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:C,url:e.unref($).urls.sql,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Xe=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"})),Ze=e.defineComponent({__name:"LanguageSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},allowCreate:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(x,{emit:k}){const C=k,h=x,{requesting:_}=l.useLoading(D),{value:m,options:i,change:d}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"LANGUAGE_SELECT",url:D.urls.languages,api:D,isArray:!0});return(s,r)=>{const w=e.resolveComponent("el-space"),a=e.resolveComponent("el-radio-button"),f=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(m),"onUpdate:modelValue":r[0]||(r[0]=c=>e.isRef(m)?m.value=c:null),disabled:e.unref(_),onChange:e.unref(d)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),c=>(e.openBlock(),e.createBlock(a,{key:c.value,value:c.value},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.label),1)]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])}}}),ue=()=>Promise.resolve().then(()=>Qe),Me=()=>Promise.resolve().then(()=>Je),ve=()=>Promise.resolve().then(()=>Xe),el=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:ue,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Me,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:ve,meta:{title:l.Translate("menu.SqlLog")}}],ll={install:x=>{Reflect.ownKeys(x._context.provides).some(k=>String(k)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.",Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},rl=Object.assign({"./views/admin/index.vue":()=>Promise.resolve().then(()=>qe),"./views/language/index.vue":()=>Promise.resolve().then(()=>Ee),"./views/menu/index.vue":()=>Promise.resolve().then(()=>we),"./views/role/index.vue":()=>Promise.resolve().then(()=>Ve),"./views/site/index.vue":()=>Promise.resolve().then(()=>We)});A.AdminsPage=re,A.DomainProviderSelect=te,A.DomainSelect=W,A.ErrorLogsPage=ie,A.LanguageSelect=Ze,A.LanguagesPage=le,A.LogRoutes=el,A.MenuSelect=J,A.MenusPage=Z,A.RequestLogsPage=se,A.RolesPage=M,A.SQLLogsPage=pe,A.SitePage=de,A.SiteSelect=ne,A.TopMenuSelect=Q,A.basicModules=rl,A.default=ll,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(A,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):(A=typeof globalThis<"u"?globalThis:A||self,e(A.AutoVueBasic={},A.Vue,A["auto-vue-manual"]))})(this,(function(A,e,l){"use strict";const ce={tops:"tops",rules:"rules"},L=l.ApiUtils.routineApi("menu","id",ce,{},["TOP_MENU_LIST","MENU_LIST"]),H=l.ApiUtils.routineApi("rule","key");/*! Element Plus Icons Vue v2.3.2 */var me=e.defineComponent({name:"Key",__name:"key",setup(x){return(k,C)=>(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"})]))}}),_e=me,be=e.defineComponent({name:"Search",__name:"search",setup(x){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),he=be;const Q=e.defineComponent({__name:"TopMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:k}){const C=k,h=x,{requesting:_}=l.useLoading(L),{value:m,options:i,change:d,refresh:s,filterOptions:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"TOP_MENU_LIST",api:L,url:L.urls.tops,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),c=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(c,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(_),placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=b=>e.unref(s)(!0))},null,8,["loading"])]),default:e.withCtx(({item:b})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${b.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(b.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),ge=e.defineComponent({__name:"MenuFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={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}},m={sort:[{required:!0,type:"number",message:l.Translate("placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("placeholder.input menu.component"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,L);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),g=e.resolveComponent("el-input-number"),p=e.resolveComponent("el-row"),U=e.resolveComponent("el-input"),V=e.resolveComponent("el-switch"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[17]||(t[17]=y=>e.isRef(i)?i.value=y:null),title:e.unref(d)(),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(S,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(p,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(p,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:e.unref(r).menu_id,"onUpdate:modelValue":t[0]||(t[0]=y=>e.unref(r).menu_id=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{"label-width":"60px",label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(g,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=y=>e.unref(r).sort=y),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).module,"onUpdate:modelValue":t[2]||(t[2]=y=>e.unref(r).module=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=y=>e.unref(r).name=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[4]||(t[4]=y=>e.unref(r).en_name=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).component,"onUpdate:modelValue":t[5]||(t[5]=y=>e.unref(r).component=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).url,"onUpdate:modelValue":t[6]||(t[6]=y=>e.unref(r).url=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=y=>e.unref(r).remark=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).icon,"onUpdate:modelValue":t[8]||(t[8]=y=>e.unref(r).icon=y),placeholder:e.unref(l.Translate)("placeholder.input"),onInput:t[9]||(t[9]=y=>{e.unref(r).meta.icon=y})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+e.unref(r).icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).meta.title,"onUpdate:modelValue":t[10]||(t[10]=y=>e.unref(r).meta.title=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(r).meta.active,"onUpdate:modelValue":t[11]||(t[11]=y=>e.unref(r).meta.active=y),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.link,"onUpdate:modelValue":t[12]||(t[12]=y=>e.unref(r).meta.link=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.keep_alive,"onUpdate:modelValue":t[13]||(t[13]=y=>e.unref(r).meta.keep_alive=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.hide,"onUpdate:modelValue":t[14]||(t[14]=y=>e.unref(r).meta.hide=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.full,"onUpdate:modelValue":t[15]||(t[15]=y=>e.unref(r).meta.full=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).meta.affix,"onUpdate:modelValue":t[16]||(t[16]=y=>e.unref(r).meta.affix=y)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),J=e.defineComponent({__name:"MenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{emit:k}){const C=k,h=x,{requesting:_}=l.useLoading(L),{value:m,options:i,change:d,refresh:s,filterOptions:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"MENU_LIST",api:L,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),c=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(c,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(_),placeholder:e.unref(l.Translate)("placeholder.select"),filterable:"",filterOptions:e.unref(r),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=b=>e.unref(s)(!0))},null,8,["loading"])]),default:e.withCtx(({item:b})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(`icon iconfont ${b.icon}`)},null,2),e.createElementVNode("span",null,e.toDisplayString(b.translate),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Ce=e.defineComponent({__name:"MenuRuleFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""},m={menu_id:[{required:!0,type:"number",message:l.Translate("placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("placeholder.input menu.rules"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,H);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-input"),p=e.resolveComponent("el-col"),U=e.resolveComponent("el-row"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[6]||(t[6]=S=>e.isRef(i)?i.value=S:null),title:e.unref(d)("menu.rules"),width:"1000px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(U,{gutter:20},{default:e.withCtx(()=>[e.createVNode(p,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:e.unref(r).menu_id,"onUpdate:modelValue":t[0]||(t[0]=S=>e.unref(r).menu_id=S)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{class:"w-full",modelValue:e.unref(r).sort,"onUpdate:modelValue":t[1]||(t[1]=S=>e.unref(r).sort=S),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=S=>e.unref(r).name=S),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=S=>e.unref(r).en_name=S),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[4]||(t[4]=S=>e.unref(r).remark=S),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(p,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).urls,"onUpdate:modelValue":t[5]||(t[5]=S=>e.unref(r).urls=S),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function X(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const Z=e.defineComponent({__name:"index",setup(x){const k={keyword:"",status:0},C=e.ref(""),h=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:t})=>e.createVNode("span",{class:"iconfont "+t.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:t})=>{var o;return e.createVNode(e.Fragment,null,[(o=t.menu)==null?void 0:o.translate])}},{label:l.Translate("base.name"),prop:"translate",width:160},{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:t})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=t.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:C.value===n.key,title:l.Translate("message.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R({key:n.key}),onClose:()=>C.value=n.key},{default:()=>[n.translate]}),default:()=>{let g,p;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.space base.delete base.space menu.rules")}: ${t.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>C.value=""},X(g=l.Translate("base.cancel"))?g:{default:()=>[g]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>T(n.key)},X(p=l.Translate("base.confirm"))?p:{default:()=>[p]})])])}}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:L.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:t})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>f({id:t.id})},null)}],{requesting:_}=l.useLoading(L),{tableRef:m,formModalRef:i,keyword:d,search:s,refresh:r,reset:w,openFormModal:a,editFormModal:f}=l.useCrudPage(k),{formModalRef:c,openFormModal:b,editFormModal:R}=l.useCrudPage(),T=t=>{H[l.DEFAULT_REMOVE_KEY]({key:t}).then(()=>{C.value="",r()})};return(t,o)=>{const n=e.resolveComponent("el-button"),g=e.resolveComponent("el-input"),p=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),V=e.resolveComponent("el-space"),S=e.resolveComponent("el-page-header"),y=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(y,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[5]||(o[5]=()=>C.value="")},{header:e.withCtx(()=>[e.createVNode(S,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(_),onRefresh:e.unref(w)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(a)},null,8,["onOpen"]),e.createVNode(n,{circle:"",icon:e.unref(_e),onClick:e.unref(b)},null,8,["icon","onClick"])]),content:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(d).keyword,"onUpdate:modelValue":o[0]||(o[0]=B=>e.unref(d).keyword=B),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:o[1]||(o[1]=e.withKeys(B=>e.unref(s)(),["enter"])),onClear:o[2]||(o[2]=B=>e.unref(s)())},null,8,["modelValue","placeholder"]),e.createVNode(U,{modelValue:e.unref(d).status,"onUpdate:modelValue":o[3]||(o[3]=B=>e.unref(d).status=B),onChange:o[4]||(o[4]=B=>e.unref(s)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],B=>e.createVNode(p,{key:B,label:e.unref(l.Translate)(`status.${B}`),value:B},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(_),onSearch:e.unref(s)},null,8,["disabled","onSearch"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:m,size:"small",columns:h,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(d),"auto-search":""},null,8,["url","search-param"]),e.createVNode(ge,{ref_key:"formModalRef",ref:i,onRefresh:e.unref(r)},null,8,["onRefresh"]),e.createVNode(Ce,{ref_key:"ruleFormModalRef",ref:c,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),we=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),K=l.ApiUtils.routineApi("role","key"),xe={class:"rule-check"},Te={style:{width:"80px","line-height":"36px"}},ke=e.defineComponent({__name:"RulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(x,{expose:k,emit:C}){const{requesting:h}=l.useLoading(L),_=x,m=C,i=e.ref(!1),d=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:s,refresh:r}=l.useSelect(e.toRef(_,"modelValue"),m,{key:"RULE_CHECK",api:L,url:L.urls.rules,isArray:!0},{autoRefresh:!1});function w(){s.value.forEach(T=>{var t;(t=T.rules)!=null&&t.length&&(d.MenuAll[T.id]=!1,d.MenuIndeterminate[T.id]=!1,d.MenuList[T.id]=[])})}function a(T){s.value.forEach(t=>{var o;(o=t.rules)!=null&&o.length&&(d.MenuList[t.id]=T?t.rules.map(n=>n.key):[])}),c()}function f(T,t){const o=s.value.find(n=>n.id===t);d.MenuList[t]=T&&o?o.rules.map(n=>n.key):[],c()}function c(){s.value.forEach(T=>{var n,g;const t=((n=T.rules)==null?void 0:n.length)||0,o=((g=d.MenuList[T.id])==null?void 0:g.length)||0;d.MenuAll[T.id]=o===t&&t>0,d.MenuIndeterminate[T.id]=o>0&&o<t}),d.checkAll=Object.values(d.MenuAll).every(Boolean),d.indeterminate=!d.checkAll&&Object.values(d.MenuList).some(T=>T.length>0),m("update:modelValue",Object.values(d.MenuList).flat())}function b(){d.checkAll=!1,d.indeterminate=!1,d.MenuAll={},d.MenuList={},d.MenuIndeterminate={},w(),m("update:modelValue",[]),i.value=!1}function R(T){var t;if(Array.isArray(s.value)&&s.value.length>0){for(let o of s.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)T.some(g=>g===n.key)&&(d.MenuList[o.id]=(((t=d.MenuList)==null?void 0:t[o.id])||[]).concat([n.key]));c(),i.value=!0}}return e.onMounted(async()=>{var T;(T=s.value)!=null&&T.length||await r(),!i.value&&_.modelValue&&R(_.modelValue)}),e.watch(()=>_.modelValue,T=>{e.nextTick(()=>{var t;i.value||!((t=s.value)!=null&&t.length)||T&&T.length>0&&R(T)})},{deep:!0,immediate:!0}),k({generateOption:R,cleanChecked:b}),(T,t)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),g=e.resolveComponent("el-text"),p=e.resolveComponent("el-divider"),U=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":d.checkAll,indeterminate:d.indeterminate,id:"all",disabled:x.disabled,onChange:a},{default:e.withCtx(()=>[...t[1]||(t[1]=[e.createElementVNode("span",null,"全选",-1)])]),_:1},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),text:"",size:"small",onRefresh:t[0]||(t[0]=V=>e.unref(r)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start",class:"rule-check-content"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),V=>(e.openBlock(),e.createElementBlock("div",{key:V.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":d.MenuAll[V.id],disabled:x.disabled||!V.rules||V.rules.length<=0,indeterminate:d.MenuIndeterminate[V.id],onChange:S=>f(S,V.id)},{default:e.withCtx(()=>[e.createVNode(g,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(p,{direction:"vertical"}),V.rules?(e.openBlock(),e.createBlock(U,{key:0,modelValue:d.MenuList[V.id],"onUpdate:modelValue":S=>d.MenuList[V.id]=S,disabled:x.disabled,style:{margin:"auto"},onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.rules,S=>(e.openBlock(),e.createBlock(o,{key:S.key,value:S.key},{default:e.withCtx(()=>[e.createElementVNode("div",Te,e.toDisplayString(S.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),u=(x,k)=>{const C=x.__vccOpts||x;for(const[h,_]of k)C[h]=_;return C},Ne=u(ke,[["__scopeId","data-v-7adb5f76"]]),ye=e.defineComponent({__name:"RoleFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_=e.ref(),m={key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]},i={name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}]},{modal:d,title:s,form:r,formData:w,requesting:a,executing:f,open:c,modify:b,submit:R,closed:T}=l.useForm(h,m,K),t=()=>{var o;(o=_.value)==null||o.cleanChecked(),T()};return k({open:c,modify:b}),(o,n)=>{const g=e.resolveComponent("el-input"),p=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-col"),V=e.resolveComponent("el-input-number"),S=e.resolveComponent("el-row"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(d),"onUpdate:modelValue":n[6]||(n[6]=B=>e.isRef(d)?d.value=B:null),title:e.unref(s)(),width:"1000px",executing:e.unref(f),onClosed:t,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(y,{ref_key:"form",ref:r,model:e.unref(w),"label-width":"auto",rules:i,disabled:e.unref(a)||e.unref(f)},{default:e.withCtx(()=>[e.createVNode(S,{gutter:20},{default:e.withCtx(()=>[e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(p,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).module,"onUpdate:modelValue":n[0]||(n[0]=B=>e.unref(w).module=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(p,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(V,{class:"w-full",modelValue:e.unref(w).sort,"onUpdate:modelValue":n[1]||(n[1]=B=>e.unref(w).sort=B),min:0,placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(p,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).name,"onUpdate:modelValue":n[2]||(n[2]=B=>e.unref(w).name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).en_name,"onUpdate:modelValue":n[3]||(n[3]=B=>e.unref(w).en_name=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(w).remark,"onUpdate:modelValue":n[4]||(n[4]=B=>e.unref(w).remark=B),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("menu.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(Ne,{ref_key:"rulesCheck",ref:_,modelValue:e.unref(w).rules,"onUpdate:modelValue":n[5]||(n[5]=B=>e.unref(w).rules=B),disabled:e.unref(a)||e.unref(f)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),M=e.defineComponent({__name:"index",setup(x){const k={keyword:""},C=[{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("time.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:65,align:"center",render:({row:f})=>e.createVNode(l.ModifyButton,{size:"default",onModify:()=>a({key:f.key})},null)}],{requesting:h}=l.useLoading(K),{tableRef:_,formModalRef:m,keyword:i,search:d,reset:s,refresh:r,openFormModal:w,editFormModal:a}=l.useCrudPage(k);return(f,c)=>{const b=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),T=e.resolveComponent("el-page-header"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(T,{class:"basic-header"},{title: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(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(b,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":c[0]||(c[0]=o=>e.unref(i).keyword=o),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:c[1]||(c[1]=e.withKeys(o=>e.unref(d)(),["enter"])),onClear:c[2]||(c[2]=o=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:c[3]||(c[3]=o=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,columns:C,url:e.unref(K).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(ye,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),Ve=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),D=l.ApiUtils.routineApi("I18N","uuid",{modules:"modules",languages:"languages"},{gen:"gen"},["I18N_MODULES"]),O=l.ApiUtils.routineApi("I18N_template","uuid",{apps:"apps"}),v=e.defineComponent({__name:"ModuleSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},allowCreate:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(x,{emit:k}){const C=k,h=x,{requesting:_}=l.useLoading(D),{value:m,options:i,change:d,refresh:s,filterOptions:r}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"I18N_MODULES",url:D.urls.modules,api:D,isArray:!0});return(w,a)=>{const f=e.resolveComponent("el-space"),c=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(c,{class:"w-full",modelValue:e.unref(m),"onUpdate:modelValue":a[1]||(a[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(i),multiple:x.multiple,disabled:e.unref(_),clearable:x.clearable,filterable:"","allow-create":x.allowCreate,"default-first-option":"",placeholder:e.unref(l.Translate)("placeholder.select"),filterOptions:e.unref(r),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(_),onRefresh:a[0]||(a[0]=b=>e.unref(s)(!0))},null,8,["loading"])]),default:e.withCtx(({item:b})=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(b.value),1)]),_:2},1024)]),_:1},8,["modelValue","options","multiple","disabled","clearable","allow-create","placeholder","filterOptions","onChange"])}}}),Re=e.defineComponent({__name:"I18N",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={uuid:"",key:"",module:void 0,language:{"zh-CN":"","en-US":""},remark:""},m={module:[{required:!0,message:l.Translate("i18n.verify.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("i18n.verify.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("i18n.verify.language"),trigger:"change"}]},i=e.ref([]),d=l.useCacheStore();function s(){const n={isArray:!0,key:"I18N_LANGUAGES",url:D.urls.languages,params:{}};d.GET_CACHE({...n,force:!0}).then(g=>{i.value=g})}s();const{modal:r,title:w,form:a,formData:f,requesting:c,executing:b,open:R,modify:T,submit:t,closed:o}=l.useForm(h,_,D);return k({open:R,modify:T}),(n,g)=>{const p=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-input"),V=e.resolveComponent("el-space"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(r),"onUpdate:modelValue":g[3]||(g[3]=y=>e.isRef(r)?r.value=y:null),title:e.unref(w)(),width:"600px",executing:e.unref(b),onClosed:e.unref(o),onSubmit:e.unref(t)},{default:e.withCtx(()=>[e.createVNode(S,{ref_key:"form",ref:a,model:e.unref(f),"label-width":"auto",rules:m,disabled:e.unref(c)||e.unref(b)},{default:e.withCtx(()=>[e.createVNode(p,{label:e.unref(l.Translate)("i18n.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(v,{modelValue:e.unref(f).module,"onUpdate:modelValue":g[0]||(g[0]=y=>e.unref(f).module=y),"allow-create":""},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("i18n.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(f).key,"onUpdate:modelValue":g[1]||(g[1]=y=>e.unref(f).key=y),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("i18n.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(V,{direction:"vertical",fill:"",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y},[e.createVNode(U,{modelValue:e.unref(f).language[y],"onUpdate:modelValue":B=>e.unref(f).language[y]=B,placeholder:e.unref(l.Translate)("i18n.placeholder.language")},{prepend:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128))]),_:1})]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:e.unref(f).remark,"onUpdate:modelValue":g[2]||(g[2]=y=>e.unref(f).remark=y),placeholder:e.unref(l.Translate)("placeholder.remark")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function Ue(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const ee=e.defineComponent({__name:"I18N",emits:["closed","choosed"],setup(x,{expose:k,emit:C}){const h=e.ref(!1),_=C,m={keyword:"",module:void 0,status:0},i=[{label:l.Translate("i18n.module"),prop:"module",width:120},{label:l.Translate("i18n.key"),prop:"key",width:200},{label:l.Translate("i18n.i18n"),align:"left",prop:"language",render:({row:g})=>{const U=Object.keys(g.language).filter(V=>!!g.language[V]).map(V=>`${V}: ${g.language[V]}`).join("; ");return e.createVNode(e.resolveComponent("el-space"),null,Ue(U)?U:{default:()=>[U]})}},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:D.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:({row:g})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",onModify:()=>T({uuid:g.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:s.value,onClick:()=>t(g.uuid)},null)]})}],{requesting:d,executing:s}=l.useLoading(D),{tableRef:r,formModalRef:w,keyword:a,search:f,reset:c,refresh:b,openFormModal:R,editFormModal:T}=l.useCrudPage(m);function t(g){return D.remove({uuid:g}).finally(()=>{b()})}const o=()=>{h.value=!0};function n(g){_("choosed",g)}return e.watch(()=>h.value,g=>{g||_("closed")}),k({open:o}),(g,p)=>{const U=e.resolveComponent("el-input"),V=e.resolveComponent("el-radio-button"),S=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-space"),B=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:h.value,"onUpdate:modelValue":p[7]||(p[7]=N=>h.value=N),width:"880px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(B,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(d),onRefresh:e.unref(c)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(R),disabled:e.unref(d)},null,8,["onOpen","disabled"])]),content:e.withCtx(()=>[e.createVNode(y,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(U,{style:{width:"160px"},modelValue:e.unref(a).keyword,"onUpdate:modelValue":p[0]||(p[0]=N=>e.unref(a).keyword=N),disabled:e.unref(d),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:p[1]||(p[1]=e.withKeys(N=>e.unref(f)(),["enter"])),onClear:p[2]||(p[2]=N=>e.unref(f)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(v,{modelValue:e.unref(a).module,"onUpdate:modelValue":p[3]||(p[3]=N=>e.unref(a).module=N),clearable:!0,disabled:e.unref(d),style:{width:"160px"}},null,8,["modelValue","disabled"]),e.createVNode(S,{modelValue:e.unref(a).status,"onUpdate:modelValue":p[4]||(p[4]=N=>e.unref(a).status=N),onChange:p[5]||(p[5]=N=>e.unref(f)()),disabled:e.unref(d)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],N=>e.createVNode(V,{key:N,label:e.unref(l.Translate)(`status.${N}`),value:N},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(d),onSearch:p[6]||(p[6]=N=>e.unref(f)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:r,columns:i,url:e.unref(D).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),onRowDblclick:n,"auto-search":""},null,8,["url","search-param"]),e.createVNode(Re,{ref_key:"formModalRef",ref:w,onRefresh:e.unref(b)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Be={key:0},Se={key:1},Ae=e.defineComponent({__name:"template",emits:["refresh"],setup(x,{expose:k,emit:C}){const{formModalRef:h,openFormModal:_}=l.useCrudPage(),m=C,i=e.ref("600px"),d=e.ref({"zh-CN":"primary","en-US":"success"}),s=e.ref({}),r={uuid:"",app:1,keys:"",values:[],remark:""},w={app:[{required:!0,message:l.Translate("i18n.verify.app"),trigger:"blur"}],keys:[{required:!0,message:l.Translate("i18n.verify.keys"),trigger:"blur"}],values:[{required:!0,message:l.Translate("i18n.verify.values"),trigger:"change"}]},{modal:a,title:f,form:c,formData:b,requesting:R,executing:T,open:t,modify:o,submit:n,closed:g}=l.useForm(m,r,O);function p(){i.value="1080px",_()}function U(){i.value="600px"}function V(B){let N=B.module.toLowerCase()+"."+B.key.toLowerCase();b.keys=N,b.values.push(N);for(const P in B.language)s.value[P]||(s.value[P]=[]),s.value[P].push(B.language[P])}function S(){i.value="600px",y()}function y(){b.keys="",b.values=[],s.value={"zh-CN":[],"en-US":[]}}return e.watch(()=>a.value,B=>{B?S():g()}),k({open:t,modify:o}),(B,N)=>{const P=e.resolveComponent("el-page-header"),j=e.resolveComponent("el-form-item"),tl=e.resolveComponent("el-button"),fe=e.resolveComponent("el-input"),nl=e.resolveComponent("el-tag"),ol=e.resolveComponent("el-space"),al=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:e.unref(a),"onUpdate:modelValue":N[3]||(N[3]=E=>e.isRef(a)?a.value=E:null),width:i.value,"show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(P,{class:"basic-header"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("i18n.template")),1)]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"default",icon:"icon-clear",loading:e.unref(T),onClick:y},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{circle:!1,size:"default",type:"primary",icon:"icon-save",plain:!1,loading:e.unref(T),onClick:e.unref(n)},null,8,["loading","onClick"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(al,{ref_key:"form",ref:c,model:e.unref(b),"label-width":"auto",rules:w,disabled:e.unref(R)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(j,{label:e.unref(l.Translate)("base.app"),prop:"app",required:""},{default:e.withCtx(()=>[e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(b).app,"onUpdate:modelValue":N[0]||(N[0]=E=>e.unref(b).app=E),"cache-key":"I18NAPPS",hidden:[0],url:e.unref(O).urls.apps},null,8,["modelValue","url"])]),_:1},8,["label"]),e.createVNode(j,{label:e.unref(l.Translate)("i18n.keys"),prop:"keys",required:""},{default:e.withCtx(()=>[e.createVNode(fe,{modelValue:e.unref(b).keys,"onUpdate:modelValue":N[1]||(N[1]=E=>e.unref(b).keys=E),placeholder:e.unref(l.Translate)("i18n.placeholder.key")},{append:e.withCtx(()=>[e.createVNode(tl,{icon:e.unref(he),onClick:p},null,8,["icon"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(j,{label:e.unref(l.Translate)("i18n.values"),prop:"values",required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b).values.join(":")),1)]),_:1},8,["label"]),e.createVNode(j,{label:e.unref(l.Translate)("i18n.values")},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(E,Y)=>(e.openBlock(),e.createElementBlock("div",{key:Y,class:"w-full"},[e.createVNode(ol,null,{default:e.withCtx(()=>[e.createVNode(nl,{type:d.value[Y],style:{"min-width":"80px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Y),1)]),_:2},1032,["type"]),Y=="zh-CN"?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(E.join("")),1)):(e.openBlock(),e.createElementBlock("span",Se,e.toDisplayString(E.join(" ")),1))]),_:2},1024)]))),128))]),_:1},8,["label"]),e.createVNode(j,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(fe,{modelValue:e.unref(b).remark,"onUpdate:modelValue":N[2]||(N[2]=E=>e.unref(b).remark=E),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"]),e.createVNode(ee,{ref_key:"I18nTableDrawerRef",ref:h,onChoosed:V,onClosed:U},null,512)]),_:1},8,["modelValue","width"])}}}),De=l.ApiUtils.routineApi("gateway","id",{gen:"gen_translation"});function Le(x){return typeof x=="function"||Object.prototype.toString.call(x)==="[object Object]"&&!e.isVNode(x)}const le=e.defineComponent({__name:"index",setup(x){const k={keyword:"",app:0,status:0},C=[{label:l.Translate("base.app"),prop:"app",width:120,render:({row:o})=>{let n;return e.createVNode(e.resolveComponent("el-tag"),{type:l.Translate("i18n.app.colors."+o.app),style:"min-width: 80px"},Le(n=l.Translate("i18n.app."+o.app))?n:{default:()=>[n]})}},{label:l.Translate("i18n.keys"),prop:"keys",width:200},{label:l.Translate("i18n.values"),prop:"values",width:200},{label:l.Translate("base.status"),prop:"checked",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:O.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.created_at"),prop:"created_at",width:160},{label:l.Translate("time.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:120,align:"center",render:({row:o})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",disabled:_.value,onModify:()=>b({uuid:o.uuid})},null),e.createVNode(l.RequestButton,{size:"default",text:!0,type:"danger",loading:_.value,onClick:()=>R(o.uuid)},null)]})}],{requesting:h,executing:_}=l.useLoading(O),{formModalRef:m,openFormModal:i}=l.useCrudPage(),{tableRef:d,formModalRef:s,keyword:r,search:w,reset:a,refresh:f,openFormModal:c,editFormModal:b}=l.useCrudPage(k);function R(o){return O.remove({uuid:o}).finally(()=>{f()})}function T(){return D.gen().finally(()=>{f()})}function t(){De.gen().finally(()=>{f()})}return(o,n)=>{const g=e.resolveComponent("el-input"),p=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),V=e.resolveComponent("el-space"),S=e.resolveComponent("el-divider"),y=e.resolveComponent("el-page-header"),B=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(B,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(y,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(a)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(c)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(r).keyword,"onUpdate:modelValue":n[0]||(n[0]=N=>e.unref(r).keyword=N),disabled:e.unref(h)||e.unref(_),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:n[1]||(n[1]=e.withKeys(N=>e.unref(w)(),["enter"])),onClear:n[2]||(n[2]=N=>e.unref(w)())},null,8,["modelValue","disabled","placeholder"]),e.createVNode(e.unref(l.BasicRadioButton),{modelValue:e.unref(r).app,"onUpdate:modelValue":n[3]||(n[3]=N=>e.unref(r).app=N),"cache-key":"I18NAPPS",disabled:e.unref(h)||e.unref(_),url:e.unref(O).urls.apps,onChange:n[4]||(n[4]=N=>e.unref(w)())},null,8,["modelValue","disabled","url"]),e.createVNode(U,{modelValue:e.unref(r).status,"onUpdate:modelValue":n[5]||(n[5]=N=>e.unref(r).status=N),disabled:e.unref(h)||e.unref(_),onChange:n[6]||(n[6]=N=>e.unref(w)())},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],N=>e.createVNode(p,{key:N,label:e.unref(l.Translate)(`status.${N}`),value:N},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h)||e.unref(_),onSearch:n[7]||(n[7]=N=>e.unref(w)())},null,8,["disabled"])]),_:1})]),extra:e.withCtx(()=>[e.createVNode(e.unref(l.RequestButton),{size:"default",type:"warning",icon:"icon-cloud-upload",plain:!1,loading:e.unref(_),onClick:T},null,8,["loading"]),e.createVNode(e.unref(l.RequestButton),{size:"default",type:"danger",icon:"icon-translate",plain:!1,loading:e.unref(_),onClick:t},null,8,["loading"]),e.createVNode(S,{direction:"vertical"}),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(i),icon:"icon-en-US"},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:d,columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(r),"auto-search":""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"I18nTableDrawerRef",ref:m,onRefresh:e.unref(f)},null,8,["onRefresh"]),e.createVNode(Ae,{ref_key:"formModalRef",ref:s,onRefresh:e.unref(f)},null,8,["onRefresh"])]),_:1})}}}),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"})),G=l.ApiUtils.routineApi("admin","key"),Oe=e.defineComponent({__name:"AdminFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]},{modal:m,title:i,form:d,formData:s,requesting:r,executing:w,open:a,modify:f,submit:c,closed:b}=l.useForm(h,_,G),R={username:[{required:!0,message:l.Translate("placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("placeholder.input base.phone"),trigger:"blur"}],password:[{required:!1,message:l.Translate("placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"Array",message:l.Translate("placeholder.select menu.Role"),trigger:"change"}]},T=e.ref([]),t=async()=>{const o=await K.list();T.value=Array.isArray(o==null?void 0:o.data)?o.data:[]};return e.onBeforeMount(async()=>{await t()}),k({open:a,modify:f}),(o,n)=>{const g=e.resolveComponent("el-input"),p=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),S=e.resolveComponent("el-checkbox"),y=e.resolveComponent("el-checkbox-group"),B=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":n[7]||(n[7]=N=>e.isRef(m)?m.value=N:null),title:e.unref(i)(),width:"600px",executing:e.unref(w),onClosed:e.unref(b),onSubmit:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(B,{ref_key:"form",ref:d,model:e.unref(s),"label-width":"auto",rules:R,disabled:e.unref(r)||e.unref(w)},{default:e.withCtx(()=>[e.createVNode(p,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).username,"onUpdate:modelValue":n[0]||(n[0]=N=>e.unref(s).username=N),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).phone,"onUpdate:modelValue":n[1]||(n[1]=N=>e.unref(s).phone=N),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.password"),prop:"password",required:!e.unref(s).key},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).password,"onUpdate:modelValue":n[2]||(n[2]=N=>e.unref(s).password=N),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(p,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).email,"onUpdate:modelValue":n[3]||(n[3]=N=>e.unref(s).email=N),placeholder:e.unref(l.Translate)("placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(s).language,"onUpdate:modelValue":n[4]||(n[4]=N=>e.unref(s).language=N)},{default:e.withCtx(()=>[e.createVNode(U,{value:"zh-CN"},{default:e.withCtx(()=>[...n[8]||(n[8]=[e.createTextVNode("zh-CN",-1)])]),_:1}),e.createVNode(U,{value:"en-US"},{default:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode("en-US",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("menu.Role"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(s).roles,"onUpdate:modelValue":n[5]||(n[5]=N=>e.unref(s).roles=N)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,N=>(e.openBlock(),e.createBlock(S,{key:N.key,value:N.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.translate),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(p,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(s).remark,"onUpdate:modelValue":n[6]||(n[6]=N=>e.unref(s).remark=N),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),re=e.defineComponent({__name:"index",setup(x){const k={keyword:""},C=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:f})=>e.createVNode(l.BasicAvatar,{src:f.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:f})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[f.username]),e.createVNode("div",null,[f.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("time.login_at"),prop:"login_at",width:160},{label:l.Translate("time.created_at"),prop:"created_at",width:160},{label:l.Translate("time.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:f})=>e.createVNode(l.ModifyButton,{onModify:()=>a({key:f.key})},null)}],{requesting:h}=l.useLoading(G),{tableRef:_,formModalRef:m,keyword:i,search:d,reset:s,refresh:r,openFormModal:w,editFormModal:a}=l.useCrudPage(k);return(f,c)=>{const b=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),T=e.resolveComponent("el-page-header"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(T,{class:"basic-header"},{title: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(w)},null,8,["onOpen"])]),content:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(b,{class:"basic-search-input",modelValue:e.unref(i).keyword,"onUpdate:modelValue":c[0]||(c[0]=o=>e.unref(i).keyword=o),placeholder:e.unref(l.Translate)("placeholder.keyword"),clearable:"",onKeyup:c[1]||(c[1]=e.withKeys(o=>e.unref(d)(),["enter"])),onClear:c[2]||(c[2]=o=>e.unref(d)())},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:c[3]||(c[3]=o=>e.unref(d)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:_,size:"small",columns:C,url:e.unref(G).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(i),"auto-search":""},null,8,["url","search-param"]),e.createVNode(Oe,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(r)},null,8,["onRefresh"])]),_:1})}}}),qe=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"})),Fe={check:"check"},q=l.ApiUtils.routineApi("site","id",Fe),z=l.ApiUtils.routineApi("domain"),W=e.defineComponent({__name:"DomainSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:k,emit:C}){const h=C,_=x,{requesting:m}=l.useLoading(z),{key:i,options:d,refresh:s,change:r}=l.useSelect(e.toRef(_,"modelValue"),h,{key:"DOMAIN_LIST",api:z,isArray:!0});return k({refresh:s}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(i),"onUpdate:modelValue":a[0]||(a[0]=c=>e.isRef(i)?i.value=c:null),options:e.unref(d),disabled:x.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),$e=e.defineComponent({__name:"SiteFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={id:0,domain_id:0,prefix:"",name:"",en_name:"",dns:"",git:"",status:1,remark:""},m={domain_id:[{required:!0,message:l.Translate("placeholder.input config.domain"),trigger:"blur"}],prefix:[{required:!0,message:l.Translate("placeholder.input base.prefix"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,q);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[7]||(t[7]=p=>e.isRef(i)?i.value=p:null),title:e.unref(d)("config.site"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:e.unref(r).domain_id,"onUpdate:modelValue":t[0]||(t[0]=p=>e.unref(r).domain_id=p),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"prefix",label:e.unref(l.Translate)("config.prefix")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).prefix,"onUpdate:modelValue":t[1]||(t[1]=p=>e.unref(r).prefix=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[2]||(t[2]=p=>e.unref(r).name=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("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(r).en_name,"onUpdate:modelValue":t[3]||(t[3]=p=>e.unref(r).en_name=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"dns",label:e.unref(l.Translate)("config.dns")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).dns,"onUpdate:modelValue":t[4]||(t[4]=p=>e.unref(r).dns=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"git",label:e.unref(l.Translate)("config.git")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).git,"onUpdate:modelValue":t[5]||(t[5]=p=>e.unref(r).git=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("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(r).remark,"onUpdate:modelValue":t[6]||(t[6]=p=>e.unref(r).remark=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),I=l.ApiUtils.routineApi("domain_provider"),te=e.defineComponent({__name:"DomainProviderSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:k,emit:C}){const h=C,_=x,{requesting:m}=l.useLoading(I),{key:i,options:d,refresh:s,change:r}=l.useSelect(e.toRef(_,"modelValue"),h,{key:"DOMAIN_PROVIDER_LIST",api:I,isArray:!0});return k({refresh:s}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(i),"onUpdate:modelValue":a[0]||(a[0]=c=>e.isRef(i)?i.value=c:null),options:e.unref(d),disabled:x.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain config.provider"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),Pe=e.defineComponent({__name:"DomainFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={id:0,provider_id:0,name:"",expired_at:"",status:1,remark:""},m={provider_id:[{required:!0,message:l.Translate("placeholder.input config.domain config.provider"),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,z);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),g=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[4]||(t[4]=U=>e.isRef(i)?i.value=U:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(p,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"provider_id",label:e.unref(l.Translate)("config.provider")},{default:e.withCtx(()=>[e.createVNode(te,{modelValue:e.unref(r).provider_id,"onUpdate:modelValue":t[0]||(t[0]=U=>e.unref(r).provider_id=U),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[1]||(t[1]=U=>e.unref(r).name=U),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"expired_at",required:"",label:e.unref(l.Translate)("time.expired_at")},{default:e.withCtx(()=>[e.createVNode(g,{type:"date",style:{width:"100%"},modelValue:e.unref(r).expired_at,"onUpdate:modelValue":t[2]||(t[2]=U=>e.unref(r).expired_at=U),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)("placeholder.select")},null,8,["modelValue","disabled","value-format","format","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(r).remark,"onUpdate:modelValue":t[3]||(t[3]=U=>e.unref(r).remark=U),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),ze={gen:"gen"},F=l.ApiUtils.routineApi("SSL","id",ze),ne=e.defineComponent({__name:"SiteSelect",props:{modelValue:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(x,{expose:k,emit:C}){const h=C,_=x,{requesting:m}=l.useLoading(q),{key:i,options:d,refresh:s,change:r}=l.useSelect(e.toRef(_,"modelValue"),h,{key:"SITE_LIST",api:q,isArray:!0},{formatOptions:w=>w.map(a=>{var f;return{...a,label:a.prefix+"."+((f=a.domain)==null?void 0:f.name),value:a.id}})});return k({refresh:s}),(w,a)=>{const f=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(i),"onUpdate:modelValue":a[0]||(a[0]=c=>e.isRef(i)?i.value=c:null),options:e.unref(d),disabled:x.disabled||e.unref(m),placeholder:e.unref(l.Translate)("base.select config.domain"),onChange:e.unref(r)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(m),onRefresh:e.unref(s)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","disabled","placeholder","onChange"])}}}),oe=e.defineComponent({__name:"SSLFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={id:0,domain_id:void 0,client:"Lego",site_id:void 0,name:"",path:"",email:"",encryption:"RSA2048",remark:""},m={domain_id:[{required:!0,message:l.Translate("placeholder.select config.domain "),trigger:"blur"}],client:[{required:!0,message:l.Translate("placeholder.select config.client "),trigger:"blur"}],name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],path:[{required:!0,message:l.Translate("placeholder.input base.path"),trigger:"blur"}],email:[{required:!0,message:l.Translate("placeholder.input base.email"),trigger:"blur"}],encryption:[{required:!0,message:l.Translate("placeholder.input config.encryption"),trigger:"blur"}]},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,F);return k({open:f,modify:c,formData:r}),(T,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),p=e.resolveComponent("el-input"),U=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[8]||(t[8]=V=>e.isRef(i)?i.value=V:null),title:e.unref(d)("ssl.ssl"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(U,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(o,{prop:"domain_id",label:e.unref(l.Translate)("config.domain")},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:e.unref(r).domain_id,"onUpdate:modelValue":t[0]||(t[0]=V=>e.unref(r).domain_id=V),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"client",label:e.unref(l.Translate)("ssl.client")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).client,"onUpdate:modelValue":t[1]||(t[1]=V=>e.unref(r).client=V)},{default:e.withCtx(()=>[e.createVNode(n,{label:"Lego",value:"Lego"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{prop:"site_id",label:e.unref(l.Translate)("config.site")},{default:e.withCtx(()=>[e.createVNode(ne,{modelValue:e.unref(r).site_id,"onUpdate:modelValue":t[2]||(t[2]=V=>e.unref(r).site_id=V),disabled:e.unref(a)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),e.createVNode(o,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[3]||(t[3]=V=>e.unref(r).name=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"path",label:e.unref(l.Translate)("base.path")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).path,"onUpdate:modelValue":t[4]||(t[4]=V=>e.unref(r).path=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"email",label:e.unref(l.Translate)("base.email")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).email,"onUpdate:modelValue":t[5]||(t[5]=V=>e.unref(r).email=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{prop:"encryption",label:e.unref(l.Translate)("config.encryption")},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).encryption,"onUpdate:modelValue":t[6]||(t[6]=V=>e.unref(r).encryption=V)},{default:e.withCtx(()=>[e.createVNode(n,{label:"RSA2048",value:"RSA2048"})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{prop:"remark",label:e.unref(l.Translate)("base.remark")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(r).remark,"onUpdate:modelValue":t[7]||(t[7]=V=>e.unref(r).remark=V),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),Ie=e.defineComponent({__name:"DomainProviderFormModal",emits:["refresh"],setup(x,{expose:k,emit:C}){const h=C,_={id:0,name:"",en_name:"",key:"",secret:"",end_point:"",status:1,remark:""},m={name:[{required:!0,message:l.Translate("placeholder.input base.name"),trigger:"blur"}],en_name:{required:!0,message:l.Translate("placeholder.input base.en_name"),trigger:"blur"},key:{required:!0,message:l.Translate("placeholder.input base.key"),trigger:"blur"},secret:{required:!0,message:l.Translate("placeholder.input config.secret"),trigger:"blur"},end_point:{required:!0,message:l.Translate("placeholder.input config.endpoint"),trigger:"blur"}},{modal:i,title:d,form:s,formData:r,requesting:w,executing:a,open:f,modify:c,submit:b,closed:R}=l.useForm(h,_,I);return k({open:f,modify:c}),(T,t)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(i),"onUpdate:modelValue":t[6]||(t[6]=p=>e.isRef(i)?i.value=p:null),title:e.unref(d)("config.domain"),width:"600px",executing:e.unref(a),onClosed:e.unref(R),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:s,model:e.unref(r),"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(a)},{default:e.withCtx(()=>[e.createVNode(n,{prop:"name",label:e.unref(l.Translate)("base.name")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).name,"onUpdate:modelValue":t[0]||(t[0]=p=>e.unref(r).name=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("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(r).en_name,"onUpdate:modelValue":t[1]||(t[1]=p=>e.unref(r).en_name=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"key",label:e.unref(l.Translate)("base.key")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).key,"onUpdate:modelValue":t[2]||(t[2]=p=>e.unref(r).key=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"secret",label:e.unref(l.Translate)("config.secret")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).secret,"onUpdate:modelValue":t[3]||(t[3]=p=>e.unref(r).secret=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{prop:"end_point",label:e.unref(l.Translate)("config.end_point")},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:e.unref(r).end_point,"onUpdate:modelValue":t[4]||(t[4]=p=>e.unref(r).end_point=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("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(r).remark,"onUpdate:modelValue":t[5]||(t[5]=p=>e.unref(r).remark=p),disabled:e.unref(a),placeholder:e.unref(l.Translate)("placeholder.input")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),je=e.defineComponent({__name:"DomainProviderTableDrawer",setup(x,{expose:k}){const{requesting:C}=l.useLoading(I),h=e.ref(!1),{tableRef:_,formModalRef:m,refresh:i,openFormModal:d,editFormModal:s}=l.useCrudPage({}),r=[{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:()=>s({id:a.id})},null)]})}];return k({open:()=>{h.value=!0}}),(a,f)=>{const c=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:h.value,"onUpdate:modelValue":f[0]||(f[0]=b=>h.value=b),width:"400px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(c,{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(i),size:"default",loading:e.unref(C)},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(I).urls.list,columns:r,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(Ie,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(i)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),Ke=e.defineComponent({__name:"DomainTableDrawer",setup(x,{expose:k}){const{requesting:C}=l.useLoading(z),h=e.ref(!1),{tableRef:_,formModalRef:m,refresh:i,openFormModal:d,editFormModal:s}=l.useCrudPage(),{formModalRef:r,openFormModal:w,editFormModal:a}=l.useCrudPage(),{formModalRef:f,openFormModal:c}=l.useCrudPage(),b=[{prop:"provider",label:l.Translate("config.domain config.provider"),width:120,cellRenderer:({rowData:T})=>e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var t;return[(t=T.provider)==null?void 0:t.name]}})},{prop:"name",label:l.Translate("base.name"),width:0,minWidth:120},{prop:"expired_text",label:l.Translate("time.expired_at"),width:160},{prop:"actions",label:l.Translate("base.action"),width:100,align:"center",render:({rowData:T})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>s({id:T.id})},null),e.createVNode(l.OpenButton,{icon:"icon-safetycertificate-f",type:"primary",size:"small",link:!0,onOpen:()=>{var t;T.ssl&&T.ssl.id?a({id:(t=T.ssl)==null?void 0:t.id}):(r.value.formData.domain_id=T.id,r.value.formData.site_id=0,w())}},null)]})}];return k({open:()=>{h.value=!0}}),(T,t)=>{const o=e.resolveComponent("el-space"),n=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=g=>h.value=g),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.domain")),1)]),content:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(i),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(d)},null,8,["onOpen"])]),extra:e.withCtx(()=>[e.createVNode(o,{class:"w-full extra-tool",alignment:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(c),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(z).urls.list,columns:b,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(Pe,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(i)},null,8,["onRefresh"]),e.createVNode(oe,{ref_key:"sslFormModalRef",ref:r,onRefresh:e.unref(i)},null,8,["onRefresh"]),e.createVNode(je,{ref_key:"providerTableDrawerRef",ref:f},null,512)]),_:1},8,["modelValue"])}}}),Ye=e.defineComponent({__name:"SSLTableDrawer",setup(x,{expose:k}){const{requesting:C,executing:h}=l.useLoading(F),_=e.ref(0),m=e.ref(!1),{tableRef:i,formModalRef:d,refresh:s,openFormModal:r,editFormModal:w}=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:R})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{size:"default",icon:"icon-edit",t:"",disabled:h.value,onModify:()=>w({id:R.id})},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-key",t:"",text:!0,disabled:h.value&&_.value!==R.id,loading:_.value==R.id,onClick:()=>c(R.id)},null),e.createVNode(l.RequestButton,{size:"default",icon:"icon-cloud-download",t:"",text:!0,disabled:h.value&&_.value!==R.id,loading:_.value==R.id,onClick:()=>b(R)},null)]})}],f=()=>{m.value=!0},c=R=>{F.gen({id:R}).then(T=>{console.warn("Res:",T)})};function b(R){const T=l.AssetsUtils.getDownloadUrl(R.path+".zip");fetch(T).then(t=>t.blob()).then(t=>{let o=URL.createObjectURL(t),n=document.createElement("a");n.style.display="none",n.href=o,n.download=R.name+".zip",n.click(),URL.revokeObjectURL(t)})}return k({open:f}),(R,T)=>{const t=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:m.value,"onUpdate:modelValue":T[0]||(T[0]=o=>m.value=o),width:"1000px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(t,{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(s),size:"default",loading:e.unref(C)},null,8,["onRefresh","loading"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(r)},null,8,["onOpen"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:i,size:"default","row-key":"id",url:e.unref(F).urls.list,columns:a,loading:e.unref(C)},null,8,["url","loading"]),e.createVNode(oe,{ref_key:"formModalRef",ref:d,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1},8,["modelValue"])}}}),ae=l.ApiUtils.routineApi("SSLLog","id"),Ge=e.defineComponent({__name:"SSLLogTableDrawer",props:{ssl:{type:Object,default:()=>({})}},setup(x,{expose:k}){const C=x,{requesting:h,executing:_}=l.useLoading([ae,F]),m=e.ref(!1),{tableRef:i,refresh:d}=l.useCrudPage(),s=[{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}],r=()=>{m.value=!0};function w(){F.gen({id:C.ssl.id}).then(f=>{console.warn("Res:",f)})}function a(){const f=l.AssetsUtils.getDownloadUrl(C.ssl.path+".zip");fetch(f).then(c=>c.blob()).then(c=>{let b=URL.createObjectURL(c),R=document.createElement("a");R.style.display="none",R.href=b,R.download=C.ssl.name+".zip",R.click(),URL.revokeObjectURL(c)})}return k({open:r}),(f,c)=>{const b=e.resolveComponent("el-page-header");return e.openBlock(),e.createBlock(e.unref(l.BasicDrawer),{modelValue:m.value,"onUpdate:modelValue":c[0]||(c[0]=R=>m.value=R),width:"600px","show-close":!1,class:"basic-drawer"},{title:e.withCtx(()=>[e.createVNode(b,{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(h)},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:w},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:i,size:"small","row-key":"id",url:e.unref(ae).urls.search,columns:s,loading:e.unref(h)},null,8,["url","loading"])]),_:1},8,["modelValue"])}}}),de=u(e.defineComponent({__name:"index",setup(x){const k=e.ref(),{requesting:C,executing:h}=l.useLoading(q),{tableRef:_,formModalRef:m,reset:i,refresh:d,openFormModal:s,editFormModal:r}=l.useCrudPage(),{formModalRef:w,openFormModal:a}=l.useCrudPage(),{formModalRef:f,openFormModal:c}=l.useCrudPage(),{formModalRef:b,openFormModal:R}=l.useCrudPage(),T=[{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("time.expired_at"),align:"center",width:140,cellRenderer:({rowData:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(e.resolveComponent("el-text"),null,{default:()=>{var g;return[(g=n.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(),n.ssl&&n.ssl.id&&(k.value=n.ssl,R())}},{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:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>[e.createVNode(l.ModifyButton,{icon:"icon-edit",t:"",onModify:()=>r({id:n.id})},null),e.createVNode(l.RequestButton,{icon:"icon-securityscan",type:"primary",size:"small",link:!0,disabled:h.value,loading:t.value==n.id&&h.value,onClick:()=>o(n)},null)]})}],t=e.ref(0),o=n=>{t.value=n.id,q.check({id:n.id}).then(g=>{g.data&&(l.notification(g),d())}).finally(()=>{t.value=0})};return(n,g)=>{const p=e.resolveComponent("el-space"),U=e.resolveComponent("el-page-header"),V=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(V,{"body-style":{padding:"12px",height:"450px"},"body-class":"flex-1",class:"config-card"},{header:e.withCtx(()=>[e.createVNode(U,{icon:""},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(l.Translate)("config.keys.sites")),1)]),content:e.withCtx(()=>[e.createVNode(p,{alignment:"center",style:{height:"32px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(C),onRefresh:e.unref(i)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(s)},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(c),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(q).urls[e.unref(l.DEFAULT_LIST_URL)],"auto-search":"",columns:T},null,8,["url"]),e.createVNode($e,{ref_key:"formModalRef",ref:m,onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(Ke,{ref_key:"domainTableDrawerRef",ref:w},null,512),e.createVNode(Ye,{ref_key:"sslTableDrawerRef",ref:f},null,512),e.createVNode(Ge,{ref_key:"sslLogTableDrawerRef",ref:b},null,512)]),_:1})}}}),[["__scopeId","data-v-17c31592"]]),We=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"})),He={request:"request",error:"error",sql:"SQL"},$=l.ApiUtils.routineApi("log","id",He),se=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentHour().format(l.TimeUtils.DATE_VALUE_FORMAT),l.TimeUtils.getCurrentHour(1).format(l.TimeUtils.DATE_VALUE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:h}=l.useLoading($),{tableRef:_,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(s,r)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=b=>e.unref(m).dates=b),class:"basic-search-datetimerange","value-format":e.unref(l.TimeUtils).DATE_VALUE_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:r[1]||(r[1]=b=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:r[2]||(r[2]=b=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:C,url:e.unref($).urls.request,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Qe=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"})),ie=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate(0).format(l.TimeUtils.DATE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:h}=l.useLoading($),{tableRef:_,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(s,r)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=b=>e.unref(m).dates=b),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_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:r[1]||(r[1]=b=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:r[2]||(r[2]=b=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:C,url:e.unref($).urls.error,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Je=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"})),pe=e.defineComponent({__name:"index",setup(x){const k={dates:[l.TimeUtils.getCurrentDate(-7).format(l.TimeUtils.DATE_FORMAT),l.TimeUtils.getCurrentDate().format(l.TimeUtils.DATE_FORMAT)]},C=[{label:l.Translate("base.sort"),type:"index",width:60},{label:l.Translate("base.time"),prop:"time",width:180,render:({rowData:s})=>e.createVNode(e.Fragment,null,[l.TimeUtils.formatDate(s.time)])},{label:l.Translate("base.url"),prop:"url",align:"left",width:200}],{requesting:h}=l.useLoading($),{tableRef:_,keyword:m,search:i,reset:d}=l.useCrudPage(k);return(s,r)=>{const w=e.resolveComponent("el-date-picker"),a=e.resolveComponent("el-space"),f=e.resolveComponent("el-page-header"),c=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(c,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(f,{class:"basic-header"},{title:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(h),onRefresh:e.unref(d)},null,8,["loading","onRefresh"])]),content:e.withCtx(()=>[e.createVNode(a,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(m).dates,"onUpdate:modelValue":r[0]||(r[0]=b=>e.unref(m).dates=b),class:"basic-search-daterange","value-format":e.unref(l.TimeUtils).DATE_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:r[1]||(r[1]=b=>e.unref(i)())},null,8,["modelValue","value-format","format","start-placeholder","end-placeholder"]),e.createVNode(e.unref(l.SearchButton),{disabled:e.unref(h),onSearch:r[2]||(r[2]=b=>e.unref(i)())},null,8,["disabled"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTableList),{ref_key:"tableRef",ref:_,size:"small",columns:C,url:e.unref($).urls.sql,"search-param":e.unref(m),"auto-search":""},null,8,["url","search-param"])]),_:1})}}}),Xe=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"})),Ze=e.defineComponent({__name:"LanguageSelect",props:{modelValue:{type:String,default:void 0,required:!1},multiple:{type:Boolean,default:!1},allowCreate:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","update:value","change"],setup(x,{emit:k}){const C=k,h=x,{requesting:_}=l.useLoading(D),{value:m,options:i,change:d}=l.useSelect(e.toRef(h,"modelValue"),C,{key:"LANGUAGE_SELECT",url:D.urls.languages,api:D,isArray:!0,formatOptions:s=>({value:s,label:s})});return(s,r)=>{const w=e.resolveComponent("el-space"),a=e.resolveComponent("el-radio-button"),f=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(m),"onUpdate:modelValue":r[0]||(r[0]=c=>e.isRef(m)?m.value=c:null),disabled:e.unref(_),onChange:e.unref(d)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),c=>(e.openBlock(),e.createBlock(a,{key:c,value:c},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c),1)]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])}}}),ue=()=>Promise.resolve().then(()=>Qe),Me=()=>Promise.resolve().then(()=>Je),ve=()=>Promise.resolve().then(()=>Xe),el=[{path:l.REQUEST_LOG_URL,name:"RequestLog",component:ue,meta:{title:l.Translate("menu.RequestLog")}},{path:l.ERROR_LOG_URL,name:"ErrorLog",component:Me,meta:{title:l.Translate("menu.ErrorLog")}},{path:l.SQL_LOG_URL,name:"SqlLog",component:ve,meta:{title:l.Translate("menu.SqlLog")}}],ll={install:x=>{Reflect.ownKeys(x._context.provides).some(k=>String(k)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.",Reflect.ownKeys(x._context.provides))},version:"__VERSION__"},rl=Object.assign({"./views/admin/index.vue":()=>Promise.resolve().then(()=>qe),"./views/language/index.vue":()=>Promise.resolve().then(()=>Ee),"./views/menu/index.vue":()=>Promise.resolve().then(()=>we),"./views/role/index.vue":()=>Promise.resolve().then(()=>Ve),"./views/site/index.vue":()=>Promise.resolve().then(()=>We)});A.AdminsPage=re,A.DomainProviderSelect=te,A.DomainSelect=W,A.ErrorLogsPage=ie,A.LanguageSelect=Ze,A.LanguagesPage=le,A.LogRoutes=el,A.MenuSelect=J,A.MenusPage=Z,A.RequestLogsPage=se,A.RolesPage=M,A.SQLLogsPage=pe,A.SitePage=de,A.SiteSelect=ne,A.TopMenuSelect=Q,A.basicModules=rl,A.default=ll,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __VERSION__ = "0.0.
|
|
1
|
+
export const __VERSION__ = "0.0.82'
|