From 9d8308ace0dd67bbb5de760ede48fab3c55b1f49 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Wed, 13 Nov 2024 17:36:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E7=9B=98=E5=9C=A8=E6=A3=80=E6=B5=8B=E9=87=8D=E5=90=AF=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/{BlankLayout-4dff50d8.js => BlankLayout-fa6b0499.js} | 2 +- .../assets/{ConfigPage-bf9717b1.js => ConfigPage-b223906d.js} | 2 +- .../assets/{ConsolePage-23f81a17.js => ConsolePage-025371c0.js} | 2 +- ...efaultDashboard-8fc755bb.js => DefaultDashboard-058a0350.js} | 2 +- .../{ExtensionPage-fe933741.js => ExtensionPage-ad46d9b6.js} | 2 +- .../{FineTunePage-1bb5ec2e.js => FineTunePage-ccc77380.js} | 2 +- .../assets/{FullLayout-695e0d90.js => FullLayout-1f7c066a.js} | 2 +- .../assets/{LoginPage-81777e38.js => LoginPage-6ceceb71.js} | 2 +- dashboard/dist/assets/WaitingForRestart-47f65a77.js | 1 + dashboard/dist/assets/WaitingForRestart-dd7c3e40.js | 1 - dashboard/dist/assets/{index-3360c831.js => index-59964cc6.js} | 2 +- dashboard/dist/assets/{md5-f9642456.js => md5-7290f9de.js} | 2 +- dashboard/dist/index.html | 2 +- 13 files changed, 12 insertions(+), 12 deletions(-) rename dashboard/dist/assets/{BlankLayout-4dff50d8.js => BlankLayout-fa6b0499.js} (70%) rename dashboard/dist/assets/{ConfigPage-bf9717b1.js => ConfigPage-b223906d.js} (99%) rename dashboard/dist/assets/{ConsolePage-23f81a17.js => ConsolePage-025371c0.js} (99%) rename dashboard/dist/assets/{DefaultDashboard-8fc755bb.js => DefaultDashboard-058a0350.js} (99%) rename dashboard/dist/assets/{ExtensionPage-fe933741.js => ExtensionPage-ad46d9b6.js} (99%) rename dashboard/dist/assets/{FineTunePage-1bb5ec2e.js => FineTunePage-ccc77380.js} (91%) rename dashboard/dist/assets/{FullLayout-695e0d90.js => FullLayout-1f7c066a.js} (98%) rename dashboard/dist/assets/{LoginPage-81777e38.js => LoginPage-6ceceb71.js} (99%) create mode 100644 dashboard/dist/assets/WaitingForRestart-47f65a77.js delete mode 100644 dashboard/dist/assets/WaitingForRestart-dd7c3e40.js rename dashboard/dist/assets/{index-3360c831.js => index-59964cc6.js} (99%) rename dashboard/dist/assets/{md5-f9642456.js => md5-7290f9de.js} (99%) diff --git a/dashboard/dist/assets/BlankLayout-4dff50d8.js b/dashboard/dist/assets/BlankLayout-fa6b0499.js similarity index 70% rename from dashboard/dist/assets/BlankLayout-4dff50d8.js rename to dashboard/dist/assets/BlankLayout-fa6b0499.js index 123720028..27a149b06 100644 --- a/dashboard/dist/assets/BlankLayout-4dff50d8.js +++ b/dashboard/dist/assets/BlankLayout-fa6b0499.js @@ -1 +1 @@ -import{k as e,o as a,c as t,w as o,b as s,u as n,R as r,T as c}from"./index-3360c831.js";const f=e({__name:"BlankLayout",setup(u){return(p,_)=>(a(),t(r,null,{default:o(()=>[s(n(c))]),_:1}))}});export{f as default}; +import{k as e,o as a,c as t,w as o,b as s,u as n,R as r,T as c}from"./index-59964cc6.js";const f=e({__name:"BlankLayout",setup(u){return(p,_)=>(a(),t(r,null,{default:o(()=>[s(n(c))]),_:1}))}});export{f as default}; diff --git a/dashboard/dist/assets/ConfigPage-bf9717b1.js b/dashboard/dist/assets/ConfigPage-b223906d.js similarity index 99% rename from dashboard/dist/assets/ConfigPage-bf9717b1.js rename to dashboard/dist/assets/ConfigPage-b223906d.js index f6b748a15..db81a635b 100644 --- a/dashboard/dist/assets/ConfigPage-bf9717b1.js +++ b/dashboard/dist/assets/ConfigPage-b223906d.js @@ -1 +1 @@ -import{k as Be,s as te,X as x,a6 as Le,a7 as F,a8 as X,a9 as ve,v as _e,aa as oe,ab as be,U as ee,o as d,l as h,t as C,g as S,b as o,w as n,F as M,r as j,n as v,c as f,W as he,H,ac as pe,a0 as Ve,a1 as ye,V as we,A as Ce,y as B,f as Se,e as b,ad as Ue,D as Me,B as G,a2 as ze,q as de,ae as Ne,af as Y,E as D,ag as Q,ah as I,ai as k,aj as A,u as De,ak as Z,_ as se,$ as ue}from"./index-3360c831.js";import{_ as Ie}from"./_plugin-vue_export-helper-c27b6911.js";import{W as Oe}from"./WaitingForRestart-dd7c3e40.js";var ke=Object.defineProperty,Ae=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,me=(l,e,a)=>e in l?ke(l,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[e]=a,R=(l,e)=>{for(var a in e||(e={}))qe.call(e,a)&&me(l,a,e[a]);if(re)for(var a of re(e))We.call(e,a)&&me(l,a,e[a]);return l},He=(l,e)=>Ae(l,Fe(e));const $={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}};function Je(l,e){const a=x(()=>{const{width:u,height:t}=l;return He(R({},$.wrapper),{width:u,height:t})}),m=x(()=>R(R({},$.fullWidth),!e.value&&$.hide));return{wrapperStyle:a,containerStyle:m}}function Xe(){const l=te(oe.__getMonacoInstance()),e=_e(!1);let a;return ve(()=>{l.value||(a=oe.init(),a.then(u=>l.value=u).catch(u=>{(u==null?void 0:u.type)!=="cancelation"&&(e.value=!0,console.error("Monaco initialization error:",u))}))}),{monacoRef:l,unload:()=>a==null?void 0:a.cancel(),isLoadFailed:e}}function fe(l){return typeof l=="function"?l():l}function ae(l){return l===void 0}function Pe(l,e,a,m){return Ge(l,m)||Ye(l,e,a,m)}function Ge(l,e){return l.editor.getModel(Ke(l,e))}function Ye(l,e,a,m){return l.editor.createModel(e,a,m?Ke(l,m):void 0)}function Ke(l,e){return l.Uri.parse(e)}var Qe=Object.defineProperty,ce=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,ge=(l,e,a)=>e in l?Qe(l,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[e]=a,$e=(l,e)=>{for(var a in e||(e={}))Ze.call(e,a)&&ge(l,a,e[a]);if(ce)for(var a of ce(e))Re.call(e,a)&&ge(l,a,e[a]);return l};const xe={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"};var Ee=Be({name:"VueMonacoEditor",model:{prop:"value",event:"update:value"},props:{defaultValue:String,defaultPath:String,defaultLanguage:String,value:String,language:String,path:String,theme:{type:String,default:"vs"},line:Number,options:{type:Object,default:()=>({})},overrideServices:{type:Object,default:()=>({})},saveViewState:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:String},emits:["update:value","beforeMount","mount","change","validate"],setup(l,e){const a=new Map,m=te(null),{monacoRef:u,unload:t,isLoadFailed:r}=Xe(),{editorRef:s}=ea(e,l,u,m),{disposeValidator:p}=aa(e,l,u,s),V=x(()=>!!u.value&&!!s.value),{wrapperStyle:i,containerStyle:O}=Je(l,V);return Le(()=>{var c,y;(c=p.value)==null||c.call(p),s.value?((y=s.value.getModel())==null||y.dispose(),s.value.dispose()):t()}),F([()=>l.path,()=>l.value,()=>l.language,()=>l.line],([c,y,U,w],[P,L,K,E])=>{if(V.value){if(c!==P){const T=Pe(u.value,y||l.defaultValue||"",U||l.defaultLanguage||"",c||l.defaultPath||"");l.saveViewState&&a.set(P,s.value.saveViewState()),s.value.setModel(T),l.saveViewState&&s.value.restoreViewState(a.get(c)),ae(w)||s.value.revealLine(w);return}s.value.getValue()!==y&&s.value.setValue(y),U!==K&&u.value.editor.setModelLanguage(s.value.getModel(),U),!ae(w)&&w!==E&&s.value.revealLine(w)}}),F(()=>l.options,c=>s.value&&s.value.updateOptions(c),{deep:!0}),F(()=>l.theme,c=>u.value&&u.value.editor.setTheme(c)),{containerRef:m,isEditorReady:V,isLoadFailed:r,wrapperStyle:i,containerStyle:O}},render(){const{$slots:l,isEditorReady:e,isLoadFailed:a,wrapperStyle:m,containerStyle:u,className:t}=this;return X("div",{style:m},[!e&&X("div",{style:xe},a?l.failure?fe(l.failure):"load failed":l.default?fe(l.default):"loading..."),X("div",{ref:"containerRef",key:"monaco_editor_container",style:u,class:t})])}});function ea({emit:l},e,a,m){const u=te(null);ve(()=>{const r=F(a,()=>{m.value&&a.value&&(be(()=>r()),t())},{immediate:!0})});function t(){var r;if(!m.value||!a.value||u.value)return;l("beforeMount",a.value);const s=e.path||e.defaultPath,p=Pe(a.value,e.value||e.defaultValue||"",e.language||e.defaultLanguage||"",s||"");u.value=a.value.editor.create(m.value,$e({model:p,theme:e.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},e.options),e.overrideServices),(r=u.value)==null||r.onDidChangeModelContent(V=>{const i=u.value.getValue();i!==e.value&&(l("update:value",i),l("change",i,V))}),u.value&&!ae(e.line)&&u.value.revealLine(e.line),l("mount",u.value,a.value)}return{editorRef:u}}function aa({emit:l},e,a,m){const u=_e(null),t=F([a,m],()=>{if(a.value&&m.value){be(()=>t());const r=a.value.editor.onDidChangeMarkers(s=>{var p,V;const i=(V=(p=m.value)==null?void 0:p.getModel())==null?void 0:V.uri;if(i&&s.find(c=>c.path===i.path)){const c=a.value.editor.getModelMarkers({resource:i});l("validate",c)}});u.value=()=>r==null?void 0:r.dispose()}});return{disposeValidator:u}}const ta={props:{metadata:Object,iterable:Object,metadataKey:String}},la={key:0,style:{"margin-bottom":"8px"}},na={style:{display:"flex","align-items":"center","justify-content":"center",gap:"16px"}},ia={style:{width:"100%"}},oa={key:6,style:{border:"1px solid #e0e0e0",padding:"8px","margin-bottom":"16px","border-radius":"10px"}},da={key:0};function sa(l,e,a,m,u,t){var s,p;const r=ee("AstrBotConfig",!0);return d(),h(M,null,[a.iterable&&((s=a.metadata[a.metadataKey])==null?void 0:s.type)==="object"?(d(),h("h3",la,C((p=a.metadata[a.metadataKey])==null?void 0:p.description),1)):S("",!0),o(Me,null,{default:n(()=>[(d(!0),h(M,null,j(a.iterable,(V,i)=>{var O,c,y,U,w,P,L,K,E,T,g,N,q,W,J,le,ne;return d(),h("div",{key:i,style:{"margin-bottom":"0.5px"}},[v("div",na,[v("div",ia,[(O=a.metadata[a.metadataKey].items[i])!=null&&O.options?(d(),f(he,{key:0,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,variant:"outlined",items:(c=a.metadata[a.metadataKey].items[i])==null?void 0:c.options,label:((y=a.metadata[a.metadataKey].items[i])==null?void 0:y.description)+"("+i+")",dense:""},null,8,["modelValue","onUpdate:modelValue","items","label"])):((U=a.metadata[a.metadataKey].items[i])==null?void 0:U.type)==="string"?(d(),f(H,{key:1,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,label:((w=a.metadata[a.metadataKey].items[i])==null?void 0:w.description)+"("+i+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((P=a.metadata[a.metadataKey].items[i])==null?void 0:P.type)==="int"||((L=a.metadata[a.metadataKey].items[i])==null?void 0:L.type)==="float"?(d(),f(H,{key:2,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,label:((K=a.metadata[a.metadataKey].items[i])==null?void 0:K.description)+"("+i+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((E=a.metadata[a.metadataKey].items[i])==null?void 0:E.type)==="text"?(d(),f(pe,{key:3,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,label:((T=a.metadata[a.metadataKey].items[i])==null?void 0:T.description)+"("+i+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((g=a.metadata[a.metadataKey].items[i])==null?void 0:g.type)==="bool"?(d(),f(Ve,{key:4,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,label:((N=a.metadata[a.metadataKey].items[i])==null?void 0:N.description)+"("+i+")",color:"primary",inset:""},null,8,["modelValue","onUpdate:modelValue","label"])):((q=a.metadata[a.metadataKey].items[i])==null?void 0:q.type)==="list"?(d(),f(ye,{key:5,variant:"outlined",modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,chips:"",clearable:"",label:((W=a.metadata[a.metadataKey].items[i])==null?void 0:W.description)+"("+i+")",multiple:"","prepend-icon":"mdi-tag-multiple-outline"},{selection:n(({attrs:_,item:ie,select:Te,selected:je})=>[o(we,Ce(_,{"model-value":je,closable:"",onClick:Te,"onClick:close":Va=>l.remove(ie)}),{default:n(()=>[v("strong",null,C(ie),1)]),_:2},1040,["model-value","onClick","onClick:close"])]),_:2},1032,["modelValue","onUpdate:modelValue","label"])):((J=a.metadata[a.metadataKey].items[i])==null?void 0:J.type)==="object"?(d(),h("div",oa,[o(r,{metadata:a.metadata[a.metadataKey].items,iterable:a.iterable[i],metadataKey:i},null,8,["metadata","iterable","metadataKey"])])):S("",!0)]),(le=a.metadata[a.metadataKey].items[i])!=null&&le.hint&&((ne=a.metadata[a.metadataKey].items[i])==null?void 0:ne.type)!=="object"?(d(),h("div",da,[o(B,{icon:"",size:"x-small",style:{"margin-bottom":"22px"}},{default:n(()=>[o(Se,{size:"x-small"},{default:n(()=>[b("mdi-help")]),_:1}),o(Ue,{activator:"parent",location:"start"},{default:n(()=>{var _;return[b(C((_=a.metadata[a.metadataKey].items[i])==null?void 0:_.hint),1)]}),_:2},1024)]),_:2},1024)])):S("",!0)])])}),128))]),_:1})],64)}const z=Ie(ta,[["render",sa]]);const ua={key:2,style:{"margin-left":"16px"}},ra=v("span",{style:{"font-weight":"1000"}},"再",-1),ma=v("h3",null,"消息平台适配器",-1),fa=v("h3",null,"消息平台通用配置",-1),ca=v("h3",null,"大语言模型提供商",-1),ga=v("h3",null,"大语言模型通用配置",-1),va={style:{display:"flex","align-items":"center","justify-content":"center",gap:"16px"}},_a={style:{width:"100%"}},ba={key:0},ha=v("div",{style:{"margin-left":"16px","padding-bottom":"16px"}},[v("small",null,[b("不了解配置?请见 "),v("a",{href:"https://astrbot.soulter.top/docs/%E5%BC%80%E5%A7%8B%E4%B8%8A%E6%89%8B/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"},"官方文档"),b(" 或 "),v("a",{href:"https://qm.qq.com/cgi-bin/qm/qr?k=EYGsuUTfe00_iOu9JTXS7_TEpMkXOvwv&jump_from=webapi&authKey=uUEMKCROfsseS+8IzqPjzV3y1tzy4AkykwTib2jNkOFdzezF9s9XknqnIaf3CDft"},"加群询问"),b("。")])],-1),pa={name:"ConfigPage",components:{AstrBotConfig:z,VueMonacoEditor:Ee,WaitingForRestart:Oe},watch:{config_data_str:function(l){this.config_data_has_changed=!0}},data(){return{config_data_has_changed:!1,config_data_str:"",config_data:{config:{platform:[],llm:[],platform_settings:{},content_safety:{},llm_settings:{}}},fetched:!1,metadata:{},save_message_snack:!1,save_message:"",save_message_success:"",namespace:"",tab:0,tabPlatform:0,tabLLM:0,tabs_key:["消息平台","大语言模型","其他配置"],common_configs_key:[],editorTab:0}},mounted(){this.getConfig()},methods:{getConfig(){de.get("/api/config/get").then(l=>{this.config_data=l.data.data.config,this.fetched=!0,this.metadata=l.data.data.metadata;for(let e in this.config_data)e!="platform"&&e!="llm"&&e!="platform_settings"&&e!="llm_settings"&&e!="content_safety"&&this.common_configs_key.push(e)}).catch(l=>{save_message=l,save_message_snack=!0,save_message_success="error"})},updateConfig(){this.fetched&&de.post("/api/config/astrbot/update",this.config_data).then(l=>{l.data.status==="ok"?(this.save_message=l.data.message,this.save_message_snack=!0,this.save_message_success="success",this.$refs.wfr.check()):(this.save_message=l.data.message,this.save_message_snack=!0,this.save_message_success="error")}).catch(l=>{this.save_message=l,this.save_message_snack=!0,this.save_message_success="error"})},configToString(){this.config_data_str=JSON.stringify(this.config_data,null,2),this.config_data_has_changed=!1},applyStrConfig(){try{this.config_data=JSON.parse(this.config_data_str),this.config_data_has_changed=!1,this.save_message_success="success",this.save_message="配置成功应用。如要保存,需再点击右下角保存按钮。",this.save_message_snack=!0}catch{this.save_message_success="error",this.save_message="配置未应用,Json 格式错误。",this.save_message_snack=!0}}}},Sa=Object.assign(pa,{setup(l){return(e,a)=>{const m=ee("v-tabs-window-item"),u=ee("v-tabs-window");return d(),h(M,null,[o(G,{style:{"margin-bottom":"16px"}},{default:n(()=>[o(Me,{style:{padding:"0"}},{default:n(()=>[v("div",null,[o(Ne,{variant:"outlined",divided:""},{default:n(()=>[o(B,{icon:"mdi-text-box-edit-outline",style:{width:"80px"},color:e.editorTab===0?"primary":"",onClick:a[0]||(a[0]=t=>e.editorTab=0)},null,8,["color"]),o(B,{icon:"mdi-code-json",style:{width:"80px"},color:e.editorTab===1?"primary":"",onClick:a[1]||(a[1]=t=>{e.configToString(),e.editorTab=1})},null,8,["color"])]),_:1}),e.editorTab===1?(d(),f(B,{key:0,style:{"margin-left":"16px"},size:"small",onClick:a[2]||(a[2]=t=>e.configToString())},{default:n(()=>[b("回到更改前的代码")]),_:1})):S("",!0),e.editorTab===1&&e.config_data_has_changed?(d(),f(B,{key:1,style:{"margin-left":"16px"},size:"small",onClick:a[3]||(a[3]=t=>e.applyStrConfig())},{default:n(()=>[b("应用此配置")]),_:1})):S("",!0),e.editorTab===1?(d(),h("small",ua,[b("💡 `应用此配置` 将配置暂存并应用到可视化。如要保存,需"),ra,b("点击右下角保存按钮。")])):S("",!0)])]),_:1})]),_:1}),e.editorTab===0?(d(),f(G,{key:0},{default:n(()=>[o(Y,{modelValue:e.tab,"onUpdate:modelValue":a[4]||(a[4]=t=>e.tab=t),"align-tabs":"left",color:"deep-purple-accent-4"},{default:n(()=>[(d(!0),h(M,null,j(e.tabs_key,(t,r)=>(d(),f(Z,{key:r,value:r,style:{"font-weight":"1000","font-size":"15px"}},{default:n(()=>[b(C(t),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),o(u,{modelValue:e.tab,"onUpdate:modelValue":a[9]||(a[9]=t=>e.tab=t)},{default:n(()=>[e.tab===0?(d(),f(m,{key:0},{default:n(()=>[o(D,{fluid:""},{default:n(()=>[o(Q,{variant:"accordion"},{default:n(()=>[o(I,null,{default:n(()=>[o(k,null,{default:n(()=>[ma]),_:1}),o(A,null,{default:n(()=>[o(Y,{style:{"margin-top":"16px"},modelValue:e.tabPlatform,"onUpdate:modelValue":a[5]||(a[5]=t=>e.tabPlatform=t),"align-tabs":"left",color:"deep-purple-accent-4"},{default:n(()=>{var t;return[(d(!0),h(M,null,j((t=e.config_data)==null?void 0:t.platform,(r,s)=>(d(),f(Z,{key:s,value:s},{default:n(()=>[b(C(r.id)+"("+C(r.name)+") ",1)]),_:2},1032,["value"]))),128))]}),_:1},8,["modelValue"]),o(u,{modelValue:e.tabPlatform,"onUpdate:modelValue":a[6]||(a[6]=t=>e.tabPlatform=t)},{default:n(()=>{var t;return[(d(!0),h(M,null,j((t=e.config_data)==null?void 0:t.platform,(r,s)=>se((d(),f(m,{key:s,value:s},{default:n(()=>[o(D,null,{default:n(()=>[o(z,{metadata:e.metadata,iterable:r,metadataKey:"platform"},null,8,["metadata","iterable"])]),_:2},1024)]),_:2},1032,["value"])),[[ue,e.tabPlatform===s]])),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),o(I,null,{default:n(()=>[o(k,null,{default:n(()=>[fa]),_:1}),o(A,null,{default:n(()=>{var t,r;return[o(z,{metadata:e.metadata,iterable:(t=e.config_data)==null?void 0:t.platform_settings,metadataKey:"platform_settings"},null,8,["metadata","iterable"]),o(z,{metadata:e.metadata,iterable:(r=e.config_data)==null?void 0:r.content_safety,metadataKey:"content_safety"},null,8,["metadata","iterable"])]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):S("",!0),e.tab===1?(d(),f(m,{key:1},{default:n(()=>[o(D,{fluid:""},{default:n(()=>[o(Q,{variant:"accordion"},{default:n(()=>[o(I,null,{default:n(()=>[o(k,null,{default:n(()=>[ca]),_:1}),o(A,null,{default:n(()=>[o(Y,{modelValue:e.tabLLM,"onUpdate:modelValue":a[7]||(a[7]=t=>e.tabLLM=t),"align-tabs":"left",color:"deep-purple-accent-4"},{default:n(()=>{var t;return[(d(!0),h(M,null,j((t=e.config_data)==null?void 0:t.llm,(r,s)=>(d(),f(Z,{key:s,value:s},{default:n(()=>[b(C(r.name),1)]),_:2},1032,["value"]))),128))]}),_:1},8,["modelValue"]),o(u,{modelValue:e.tabLLM,"onUpdate:modelValue":a[8]||(a[8]=t=>e.tabLLM=t)},{default:n(()=>{var t;return[(d(!0),h(M,null,j((t=e.config_data)==null?void 0:t.llm,(r,s)=>se((d(),f(m,{key:s,value:s},{default:n(()=>[o(D,null,{default:n(()=>[o(z,{metadata:e.metadata,iterable:r,metadataKey:"llm"},null,8,["metadata","iterable"])]),_:2},1024)]),_:2},1032,["value"])),[[ue,e.tabLLM===s]])),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),o(I,null,{default:n(()=>[o(k,null,{default:n(()=>[ga]),_:1}),o(A,null,{default:n(()=>{var t;return[o(z,{metadata:e.metadata,iterable:(t=e.config_data)==null?void 0:t.llm_settings,metadataKey:"llm_settings"},null,8,["metadata","iterable"])]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):S("",!0),e.tab===2?(d(),f(m,{key:2},{default:n(()=>[o(D,{fluid:""},{default:n(()=>[o(Q,{variant:"accordion"},{default:n(()=>[(d(!0),h(M,null,j(e.common_configs_key,t=>(d(),f(I,{key:t},{default:n(()=>[o(k,null,{default:n(()=>{var r;return[v("h3",null,C((r=e.metadata[t])==null?void 0:r.description),1)]}),_:2},1024),o(A,null,{default:n(()=>{var r,s,p,V,i,O,c,y,U,w,P,L,K,E,T;return[v("div",va,[v("div",_a,[(r=e.metadata[t])!=null&&r.options?(d(),f(he,{key:0,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,variant:"outlined",items:(s=e.metadata[t])==null?void 0:s.options,label:((p=e.metadata[t])==null?void 0:p.description)+"("+t+")",dense:""},null,8,["modelValue","onUpdate:modelValue","items","label"])):((V=e.metadata[t])==null?void 0:V.type)==="string"?(d(),f(H,{key:1,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,label:((i=e.metadata[t])==null?void 0:i.description)+"("+t+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((O=e.metadata[t])==null?void 0:O.type)==="int"?(d(),f(H,{key:2,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,label:((c=e.metadata[t])==null?void 0:c.description)+"("+t+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((y=e.metadata[t])==null?void 0:y.type)==="text"?(d(),f(pe,{key:3,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,label:((U=e.metadata[t])==null?void 0:U.description)+"("+t+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((w=e.metadata[t])==null?void 0:w.type)==="bool"?(d(),f(Ve,{key:4,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,label:((P=e.metadata[t])==null?void 0:P.description)+"("+t+")",color:"primary",inset:""},null,8,["modelValue","onUpdate:modelValue","label"])):((L=e.metadata[t])==null?void 0:L.type)==="list"?(d(),f(ye,{key:5,variant:"outlined",modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,chips:"",clearable:"",label:((K=e.metadata[t])==null?void 0:K.description)+"("+t+")",multiple:"","prepend-icon":"mdi-tag-multiple-outline"},{selection:n(({attrs:g,item:N,select:q,selected:W})=>[o(we,Ce(g,{"model-value":W,closable:"",onClick:q,"onClick:close":J=>e.remove(N)}),{default:n(()=>[v("strong",null,C(N),1)]),_:2},1040,["model-value","onClick","onClick:close"])]),_:2},1032,["modelValue","onUpdate:modelValue","label"])):S("",!0)]),(E=e.metadata[t])!=null&&E.hint&&((T=e.metadata[t])==null?void 0:T.type)!=="object"?(d(),h("div",ba,[o(B,{icon:"",size:"x-small",style:{"margin-bottom":"22px"}},{default:n(()=>[o(Se,{size:"x-small"},{default:n(()=>[b("mdi-help")]),_:1}),o(Ue,{activator:"parent",location:"start"},{default:n(()=>{var g;return[b(C((g=e.metadata[t])==null?void 0:g.hint),1)]}),_:2},1024)]),_:2},1024)])):S("",!0)])]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})):S("",!0),ha]),_:1},8,["modelValue"])]),_:1})):(d(),f(G,{key:1,style:{"background-color":"#1e1e1e"}},{default:n(()=>[o(De(Ee),{theme:"vs-dark",language:"json",height:"80vh",style:{"padding-top":"16px","padding-bottom":"16px"},value:e.config_data_str,"onUpdate:value":a[10]||(a[10]=t=>e.config_data_str=t)},null,8,["value"])]),_:1})),o(B,{icon:"mdi-content-save",size:"x-large",style:{position:"fixed",right:"52px",bottom:"52px"},color:"darkprimary",onClick:e.updateConfig},null,8,["onClick"]),o(ze,{timeout:3e3,elevation:"24",color:e.save_message_success,modelValue:e.save_message_snack,"onUpdate:modelValue":a[11]||(a[11]=t=>e.save_message_snack=t)},{default:n(()=>[b(C(e.save_message),1)]),_:1},8,["color","modelValue"]),o(Oe,{ref:"wfr"},null,512)],64)}}});export{Sa as default}; +import{k as Be,s as te,X as x,a6 as Le,a7 as F,a8 as X,a9 as ve,v as _e,aa as oe,ab as be,U as ee,o as d,l as h,t as C,g as S,b as o,w as n,F as M,r as j,n as v,c as f,W as he,H,ac as pe,a0 as Ve,a1 as ye,V as we,A as Ce,y as B,f as Se,e as b,ad as Ue,D as Me,B as G,a2 as ze,q as de,ae as Ne,af as Y,E as D,ag as Q,ah as I,ai as k,aj as A,u as De,ak as Z,_ as se,$ as ue}from"./index-59964cc6.js";import{_ as Ie}from"./_plugin-vue_export-helper-c27b6911.js";import{W as Oe}from"./WaitingForRestart-47f65a77.js";var ke=Object.defineProperty,Ae=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,me=(l,e,a)=>e in l?ke(l,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[e]=a,R=(l,e)=>{for(var a in e||(e={}))qe.call(e,a)&&me(l,a,e[a]);if(re)for(var a of re(e))We.call(e,a)&&me(l,a,e[a]);return l},He=(l,e)=>Ae(l,Fe(e));const $={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}};function Je(l,e){const a=x(()=>{const{width:u,height:t}=l;return He(R({},$.wrapper),{width:u,height:t})}),m=x(()=>R(R({},$.fullWidth),!e.value&&$.hide));return{wrapperStyle:a,containerStyle:m}}function Xe(){const l=te(oe.__getMonacoInstance()),e=_e(!1);let a;return ve(()=>{l.value||(a=oe.init(),a.then(u=>l.value=u).catch(u=>{(u==null?void 0:u.type)!=="cancelation"&&(e.value=!0,console.error("Monaco initialization error:",u))}))}),{monacoRef:l,unload:()=>a==null?void 0:a.cancel(),isLoadFailed:e}}function fe(l){return typeof l=="function"?l():l}function ae(l){return l===void 0}function Pe(l,e,a,m){return Ge(l,m)||Ye(l,e,a,m)}function Ge(l,e){return l.editor.getModel(Ke(l,e))}function Ye(l,e,a,m){return l.editor.createModel(e,a,m?Ke(l,m):void 0)}function Ke(l,e){return l.Uri.parse(e)}var Qe=Object.defineProperty,ce=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,ge=(l,e,a)=>e in l?Qe(l,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[e]=a,$e=(l,e)=>{for(var a in e||(e={}))Ze.call(e,a)&&ge(l,a,e[a]);if(ce)for(var a of ce(e))Re.call(e,a)&&ge(l,a,e[a]);return l};const xe={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"};var Ee=Be({name:"VueMonacoEditor",model:{prop:"value",event:"update:value"},props:{defaultValue:String,defaultPath:String,defaultLanguage:String,value:String,language:String,path:String,theme:{type:String,default:"vs"},line:Number,options:{type:Object,default:()=>({})},overrideServices:{type:Object,default:()=>({})},saveViewState:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:String},emits:["update:value","beforeMount","mount","change","validate"],setup(l,e){const a=new Map,m=te(null),{monacoRef:u,unload:t,isLoadFailed:r}=Xe(),{editorRef:s}=ea(e,l,u,m),{disposeValidator:p}=aa(e,l,u,s),V=x(()=>!!u.value&&!!s.value),{wrapperStyle:i,containerStyle:O}=Je(l,V);return Le(()=>{var c,y;(c=p.value)==null||c.call(p),s.value?((y=s.value.getModel())==null||y.dispose(),s.value.dispose()):t()}),F([()=>l.path,()=>l.value,()=>l.language,()=>l.line],([c,y,U,w],[P,L,K,E])=>{if(V.value){if(c!==P){const T=Pe(u.value,y||l.defaultValue||"",U||l.defaultLanguage||"",c||l.defaultPath||"");l.saveViewState&&a.set(P,s.value.saveViewState()),s.value.setModel(T),l.saveViewState&&s.value.restoreViewState(a.get(c)),ae(w)||s.value.revealLine(w);return}s.value.getValue()!==y&&s.value.setValue(y),U!==K&&u.value.editor.setModelLanguage(s.value.getModel(),U),!ae(w)&&w!==E&&s.value.revealLine(w)}}),F(()=>l.options,c=>s.value&&s.value.updateOptions(c),{deep:!0}),F(()=>l.theme,c=>u.value&&u.value.editor.setTheme(c)),{containerRef:m,isEditorReady:V,isLoadFailed:r,wrapperStyle:i,containerStyle:O}},render(){const{$slots:l,isEditorReady:e,isLoadFailed:a,wrapperStyle:m,containerStyle:u,className:t}=this;return X("div",{style:m},[!e&&X("div",{style:xe},a?l.failure?fe(l.failure):"load failed":l.default?fe(l.default):"loading..."),X("div",{ref:"containerRef",key:"monaco_editor_container",style:u,class:t})])}});function ea({emit:l},e,a,m){const u=te(null);ve(()=>{const r=F(a,()=>{m.value&&a.value&&(be(()=>r()),t())},{immediate:!0})});function t(){var r;if(!m.value||!a.value||u.value)return;l("beforeMount",a.value);const s=e.path||e.defaultPath,p=Pe(a.value,e.value||e.defaultValue||"",e.language||e.defaultLanguage||"",s||"");u.value=a.value.editor.create(m.value,$e({model:p,theme:e.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},e.options),e.overrideServices),(r=u.value)==null||r.onDidChangeModelContent(V=>{const i=u.value.getValue();i!==e.value&&(l("update:value",i),l("change",i,V))}),u.value&&!ae(e.line)&&u.value.revealLine(e.line),l("mount",u.value,a.value)}return{editorRef:u}}function aa({emit:l},e,a,m){const u=_e(null),t=F([a,m],()=>{if(a.value&&m.value){be(()=>t());const r=a.value.editor.onDidChangeMarkers(s=>{var p,V;const i=(V=(p=m.value)==null?void 0:p.getModel())==null?void 0:V.uri;if(i&&s.find(c=>c.path===i.path)){const c=a.value.editor.getModelMarkers({resource:i});l("validate",c)}});u.value=()=>r==null?void 0:r.dispose()}});return{disposeValidator:u}}const ta={props:{metadata:Object,iterable:Object,metadataKey:String}},la={key:0,style:{"margin-bottom":"8px"}},na={style:{display:"flex","align-items":"center","justify-content":"center",gap:"16px"}},ia={style:{width:"100%"}},oa={key:6,style:{border:"1px solid #e0e0e0",padding:"8px","margin-bottom":"16px","border-radius":"10px"}},da={key:0};function sa(l,e,a,m,u,t){var s,p;const r=ee("AstrBotConfig",!0);return d(),h(M,null,[a.iterable&&((s=a.metadata[a.metadataKey])==null?void 0:s.type)==="object"?(d(),h("h3",la,C((p=a.metadata[a.metadataKey])==null?void 0:p.description),1)):S("",!0),o(Me,null,{default:n(()=>[(d(!0),h(M,null,j(a.iterable,(V,i)=>{var O,c,y,U,w,P,L,K,E,T,g,N,q,W,J,le,ne;return d(),h("div",{key:i,style:{"margin-bottom":"0.5px"}},[v("div",na,[v("div",ia,[(O=a.metadata[a.metadataKey].items[i])!=null&&O.options?(d(),f(he,{key:0,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,variant:"outlined",items:(c=a.metadata[a.metadataKey].items[i])==null?void 0:c.options,label:((y=a.metadata[a.metadataKey].items[i])==null?void 0:y.description)+"("+i+")",dense:""},null,8,["modelValue","onUpdate:modelValue","items","label"])):((U=a.metadata[a.metadataKey].items[i])==null?void 0:U.type)==="string"?(d(),f(H,{key:1,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,label:((w=a.metadata[a.metadataKey].items[i])==null?void 0:w.description)+"("+i+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((P=a.metadata[a.metadataKey].items[i])==null?void 0:P.type)==="int"||((L=a.metadata[a.metadataKey].items[i])==null?void 0:L.type)==="float"?(d(),f(H,{key:2,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,label:((K=a.metadata[a.metadataKey].items[i])==null?void 0:K.description)+"("+i+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((E=a.metadata[a.metadataKey].items[i])==null?void 0:E.type)==="text"?(d(),f(pe,{key:3,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,label:((T=a.metadata[a.metadataKey].items[i])==null?void 0:T.description)+"("+i+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((g=a.metadata[a.metadataKey].items[i])==null?void 0:g.type)==="bool"?(d(),f(Ve,{key:4,modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,label:((N=a.metadata[a.metadataKey].items[i])==null?void 0:N.description)+"("+i+")",color:"primary",inset:""},null,8,["modelValue","onUpdate:modelValue","label"])):((q=a.metadata[a.metadataKey].items[i])==null?void 0:q.type)==="list"?(d(),f(ye,{key:5,variant:"outlined",modelValue:a.iterable[i],"onUpdate:modelValue":_=>a.iterable[i]=_,chips:"",clearable:"",label:((W=a.metadata[a.metadataKey].items[i])==null?void 0:W.description)+"("+i+")",multiple:"","prepend-icon":"mdi-tag-multiple-outline"},{selection:n(({attrs:_,item:ie,select:Te,selected:je})=>[o(we,Ce(_,{"model-value":je,closable:"",onClick:Te,"onClick:close":Va=>l.remove(ie)}),{default:n(()=>[v("strong",null,C(ie),1)]),_:2},1040,["model-value","onClick","onClick:close"])]),_:2},1032,["modelValue","onUpdate:modelValue","label"])):((J=a.metadata[a.metadataKey].items[i])==null?void 0:J.type)==="object"?(d(),h("div",oa,[o(r,{metadata:a.metadata[a.metadataKey].items,iterable:a.iterable[i],metadataKey:i},null,8,["metadata","iterable","metadataKey"])])):S("",!0)]),(le=a.metadata[a.metadataKey].items[i])!=null&&le.hint&&((ne=a.metadata[a.metadataKey].items[i])==null?void 0:ne.type)!=="object"?(d(),h("div",da,[o(B,{icon:"",size:"x-small",style:{"margin-bottom":"22px"}},{default:n(()=>[o(Se,{size:"x-small"},{default:n(()=>[b("mdi-help")]),_:1}),o(Ue,{activator:"parent",location:"start"},{default:n(()=>{var _;return[b(C((_=a.metadata[a.metadataKey].items[i])==null?void 0:_.hint),1)]}),_:2},1024)]),_:2},1024)])):S("",!0)])])}),128))]),_:1})],64)}const z=Ie(ta,[["render",sa]]);const ua={key:2,style:{"margin-left":"16px"}},ra=v("span",{style:{"font-weight":"1000"}},"再",-1),ma=v("h3",null,"消息平台适配器",-1),fa=v("h3",null,"消息平台通用配置",-1),ca=v("h3",null,"大语言模型提供商",-1),ga=v("h3",null,"大语言模型通用配置",-1),va={style:{display:"flex","align-items":"center","justify-content":"center",gap:"16px"}},_a={style:{width:"100%"}},ba={key:0},ha=v("div",{style:{"margin-left":"16px","padding-bottom":"16px"}},[v("small",null,[b("不了解配置?请见 "),v("a",{href:"https://astrbot.soulter.top/docs/%E5%BC%80%E5%A7%8B%E4%B8%8A%E6%89%8B/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"},"官方文档"),b(" 或 "),v("a",{href:"https://qm.qq.com/cgi-bin/qm/qr?k=EYGsuUTfe00_iOu9JTXS7_TEpMkXOvwv&jump_from=webapi&authKey=uUEMKCROfsseS+8IzqPjzV3y1tzy4AkykwTib2jNkOFdzezF9s9XknqnIaf3CDft"},"加群询问"),b("。")])],-1),pa={name:"ConfigPage",components:{AstrBotConfig:z,VueMonacoEditor:Ee,WaitingForRestart:Oe},watch:{config_data_str:function(l){this.config_data_has_changed=!0}},data(){return{config_data_has_changed:!1,config_data_str:"",config_data:{config:{platform:[],llm:[],platform_settings:{},content_safety:{},llm_settings:{}}},fetched:!1,metadata:{},save_message_snack:!1,save_message:"",save_message_success:"",namespace:"",tab:0,tabPlatform:0,tabLLM:0,tabs_key:["消息平台","大语言模型","其他配置"],common_configs_key:[],editorTab:0}},mounted(){this.getConfig()},methods:{getConfig(){de.get("/api/config/get").then(l=>{this.config_data=l.data.data.config,this.fetched=!0,this.metadata=l.data.data.metadata;for(let e in this.config_data)e!="platform"&&e!="llm"&&e!="platform_settings"&&e!="llm_settings"&&e!="content_safety"&&this.common_configs_key.push(e)}).catch(l=>{save_message=l,save_message_snack=!0,save_message_success="error"})},updateConfig(){this.fetched&&de.post("/api/config/astrbot/update",this.config_data).then(l=>{l.data.status==="ok"?(this.save_message=l.data.message,this.save_message_snack=!0,this.save_message_success="success",this.$refs.wfr.check()):(this.save_message=l.data.message,this.save_message_snack=!0,this.save_message_success="error")}).catch(l=>{this.save_message=l,this.save_message_snack=!0,this.save_message_success="error"})},configToString(){this.config_data_str=JSON.stringify(this.config_data,null,2),this.config_data_has_changed=!1},applyStrConfig(){try{this.config_data=JSON.parse(this.config_data_str),this.config_data_has_changed=!1,this.save_message_success="success",this.save_message="配置成功应用。如要保存,需再点击右下角保存按钮。",this.save_message_snack=!0}catch{this.save_message_success="error",this.save_message="配置未应用,Json 格式错误。",this.save_message_snack=!0}}}},Sa=Object.assign(pa,{setup(l){return(e,a)=>{const m=ee("v-tabs-window-item"),u=ee("v-tabs-window");return d(),h(M,null,[o(G,{style:{"margin-bottom":"16px"}},{default:n(()=>[o(Me,{style:{padding:"0"}},{default:n(()=>[v("div",null,[o(Ne,{variant:"outlined",divided:""},{default:n(()=>[o(B,{icon:"mdi-text-box-edit-outline",style:{width:"80px"},color:e.editorTab===0?"primary":"",onClick:a[0]||(a[0]=t=>e.editorTab=0)},null,8,["color"]),o(B,{icon:"mdi-code-json",style:{width:"80px"},color:e.editorTab===1?"primary":"",onClick:a[1]||(a[1]=t=>{e.configToString(),e.editorTab=1})},null,8,["color"])]),_:1}),e.editorTab===1?(d(),f(B,{key:0,style:{"margin-left":"16px"},size:"small",onClick:a[2]||(a[2]=t=>e.configToString())},{default:n(()=>[b("回到更改前的代码")]),_:1})):S("",!0),e.editorTab===1&&e.config_data_has_changed?(d(),f(B,{key:1,style:{"margin-left":"16px"},size:"small",onClick:a[3]||(a[3]=t=>e.applyStrConfig())},{default:n(()=>[b("应用此配置")]),_:1})):S("",!0),e.editorTab===1?(d(),h("small",ua,[b("💡 `应用此配置` 将配置暂存并应用到可视化。如要保存,需"),ra,b("点击右下角保存按钮。")])):S("",!0)])]),_:1})]),_:1}),e.editorTab===0?(d(),f(G,{key:0},{default:n(()=>[o(Y,{modelValue:e.tab,"onUpdate:modelValue":a[4]||(a[4]=t=>e.tab=t),"align-tabs":"left",color:"deep-purple-accent-4"},{default:n(()=>[(d(!0),h(M,null,j(e.tabs_key,(t,r)=>(d(),f(Z,{key:r,value:r,style:{"font-weight":"1000","font-size":"15px"}},{default:n(()=>[b(C(t),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),o(u,{modelValue:e.tab,"onUpdate:modelValue":a[9]||(a[9]=t=>e.tab=t)},{default:n(()=>[e.tab===0?(d(),f(m,{key:0},{default:n(()=>[o(D,{fluid:""},{default:n(()=>[o(Q,{variant:"accordion"},{default:n(()=>[o(I,null,{default:n(()=>[o(k,null,{default:n(()=>[ma]),_:1}),o(A,null,{default:n(()=>[o(Y,{style:{"margin-top":"16px"},modelValue:e.tabPlatform,"onUpdate:modelValue":a[5]||(a[5]=t=>e.tabPlatform=t),"align-tabs":"left",color:"deep-purple-accent-4"},{default:n(()=>{var t;return[(d(!0),h(M,null,j((t=e.config_data)==null?void 0:t.platform,(r,s)=>(d(),f(Z,{key:s,value:s},{default:n(()=>[b(C(r.id)+"("+C(r.name)+") ",1)]),_:2},1032,["value"]))),128))]}),_:1},8,["modelValue"]),o(u,{modelValue:e.tabPlatform,"onUpdate:modelValue":a[6]||(a[6]=t=>e.tabPlatform=t)},{default:n(()=>{var t;return[(d(!0),h(M,null,j((t=e.config_data)==null?void 0:t.platform,(r,s)=>se((d(),f(m,{key:s,value:s},{default:n(()=>[o(D,null,{default:n(()=>[o(z,{metadata:e.metadata,iterable:r,metadataKey:"platform"},null,8,["metadata","iterable"])]),_:2},1024)]),_:2},1032,["value"])),[[ue,e.tabPlatform===s]])),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),o(I,null,{default:n(()=>[o(k,null,{default:n(()=>[fa]),_:1}),o(A,null,{default:n(()=>{var t,r;return[o(z,{metadata:e.metadata,iterable:(t=e.config_data)==null?void 0:t.platform_settings,metadataKey:"platform_settings"},null,8,["metadata","iterable"]),o(z,{metadata:e.metadata,iterable:(r=e.config_data)==null?void 0:r.content_safety,metadataKey:"content_safety"},null,8,["metadata","iterable"])]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):S("",!0),e.tab===1?(d(),f(m,{key:1},{default:n(()=>[o(D,{fluid:""},{default:n(()=>[o(Q,{variant:"accordion"},{default:n(()=>[o(I,null,{default:n(()=>[o(k,null,{default:n(()=>[ca]),_:1}),o(A,null,{default:n(()=>[o(Y,{modelValue:e.tabLLM,"onUpdate:modelValue":a[7]||(a[7]=t=>e.tabLLM=t),"align-tabs":"left",color:"deep-purple-accent-4"},{default:n(()=>{var t;return[(d(!0),h(M,null,j((t=e.config_data)==null?void 0:t.llm,(r,s)=>(d(),f(Z,{key:s,value:s},{default:n(()=>[b(C(r.name),1)]),_:2},1032,["value"]))),128))]}),_:1},8,["modelValue"]),o(u,{modelValue:e.tabLLM,"onUpdate:modelValue":a[8]||(a[8]=t=>e.tabLLM=t)},{default:n(()=>{var t;return[(d(!0),h(M,null,j((t=e.config_data)==null?void 0:t.llm,(r,s)=>se((d(),f(m,{key:s,value:s},{default:n(()=>[o(D,null,{default:n(()=>[o(z,{metadata:e.metadata,iterable:r,metadataKey:"llm"},null,8,["metadata","iterable"])]),_:2},1024)]),_:2},1032,["value"])),[[ue,e.tabLLM===s]])),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),o(I,null,{default:n(()=>[o(k,null,{default:n(()=>[ga]),_:1}),o(A,null,{default:n(()=>{var t;return[o(z,{metadata:e.metadata,iterable:(t=e.config_data)==null?void 0:t.llm_settings,metadataKey:"llm_settings"},null,8,["metadata","iterable"])]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):S("",!0),e.tab===2?(d(),f(m,{key:2},{default:n(()=>[o(D,{fluid:""},{default:n(()=>[o(Q,{variant:"accordion"},{default:n(()=>[(d(!0),h(M,null,j(e.common_configs_key,t=>(d(),f(I,{key:t},{default:n(()=>[o(k,null,{default:n(()=>{var r;return[v("h3",null,C((r=e.metadata[t])==null?void 0:r.description),1)]}),_:2},1024),o(A,null,{default:n(()=>{var r,s,p,V,i,O,c,y,U,w,P,L,K,E,T;return[v("div",va,[v("div",_a,[(r=e.metadata[t])!=null&&r.options?(d(),f(he,{key:0,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,variant:"outlined",items:(s=e.metadata[t])==null?void 0:s.options,label:((p=e.metadata[t])==null?void 0:p.description)+"("+t+")",dense:""},null,8,["modelValue","onUpdate:modelValue","items","label"])):((V=e.metadata[t])==null?void 0:V.type)==="string"?(d(),f(H,{key:1,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,label:((i=e.metadata[t])==null?void 0:i.description)+"("+t+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((O=e.metadata[t])==null?void 0:O.type)==="int"?(d(),f(H,{key:2,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,label:((c=e.metadata[t])==null?void 0:c.description)+"("+t+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((y=e.metadata[t])==null?void 0:y.type)==="text"?(d(),f(pe,{key:3,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,label:((U=e.metadata[t])==null?void 0:U.description)+"("+t+")",variant:"outlined",dense:""},null,8,["modelValue","onUpdate:modelValue","label"])):((w=e.metadata[t])==null?void 0:w.type)==="bool"?(d(),f(Ve,{key:4,modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,label:((P=e.metadata[t])==null?void 0:P.description)+"("+t+")",color:"primary",inset:""},null,8,["modelValue","onUpdate:modelValue","label"])):((L=e.metadata[t])==null?void 0:L.type)==="list"?(d(),f(ye,{key:5,variant:"outlined",modelValue:e.config_data[t],"onUpdate:modelValue":g=>e.config_data[t]=g,chips:"",clearable:"",label:((K=e.metadata[t])==null?void 0:K.description)+"("+t+")",multiple:"","prepend-icon":"mdi-tag-multiple-outline"},{selection:n(({attrs:g,item:N,select:q,selected:W})=>[o(we,Ce(g,{"model-value":W,closable:"",onClick:q,"onClick:close":J=>e.remove(N)}),{default:n(()=>[v("strong",null,C(N),1)]),_:2},1040,["model-value","onClick","onClick:close"])]),_:2},1032,["modelValue","onUpdate:modelValue","label"])):S("",!0)]),(E=e.metadata[t])!=null&&E.hint&&((T=e.metadata[t])==null?void 0:T.type)!=="object"?(d(),h("div",ba,[o(B,{icon:"",size:"x-small",style:{"margin-bottom":"22px"}},{default:n(()=>[o(Se,{size:"x-small"},{default:n(()=>[b("mdi-help")]),_:1}),o(Ue,{activator:"parent",location:"start"},{default:n(()=>{var g;return[b(C((g=e.metadata[t])==null?void 0:g.hint),1)]}),_:2},1024)]),_:2},1024)])):S("",!0)])]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})):S("",!0),ha]),_:1},8,["modelValue"])]),_:1})):(d(),f(G,{key:1,style:{"background-color":"#1e1e1e"}},{default:n(()=>[o(De(Ee),{theme:"vs-dark",language:"json",height:"80vh",style:{"padding-top":"16px","padding-bottom":"16px"},value:e.config_data_str,"onUpdate:value":a[10]||(a[10]=t=>e.config_data_str=t)},null,8,["value"])]),_:1})),o(B,{icon:"mdi-content-save",size:"x-large",style:{position:"fixed",right:"52px",bottom:"52px"},color:"darkprimary",onClick:e.updateConfig},null,8,["onClick"]),o(ze,{timeout:3e3,elevation:"24",color:e.save_message_success,modelValue:e.save_message_snack,"onUpdate:modelValue":a[11]||(a[11]=t=>e.save_message_snack=t)},{default:n(()=>[b(C(e.save_message),1)]),_:1},8,["color","modelValue"]),o(Oe,{ref:"wfr"},null,512)],64)}}});export{Sa as default}; diff --git a/dashboard/dist/assets/ConsolePage-23f81a17.js b/dashboard/dist/assets/ConsolePage-025371c0.js similarity index 99% rename from dashboard/dist/assets/ConsolePage-23f81a17.js rename to dashboard/dist/assets/ConsolePage-025371c0.js index 9816789dc..f2632df27 100644 --- a/dashboard/dist/assets/ConsolePage-23f81a17.js +++ b/dashboard/dist/assets/ConsolePage-025371c0.js @@ -1,4 +1,4 @@ -import{o as Ce,l as be,n as he,t as ge,b as ye,w as we,y as Ee,F as ke,e as Le}from"./index-3360c831.js";var pe={exports:{}};(function(Q,ne){(function(ce,oe){Q.exports=oe()})(self,()=>(()=>{var ce={4567:function(I,r,a){var l=this&&this.__decorate||function(i,o,c,v){var m,h=arguments.length,g=h<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,c):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,o,c,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(g=(h<3?m(g):h>3?m(o,c,g):m(o,c))||g);return h>3&&g&&Object.defineProperty(o,c,g),g},u=this&&this.__param||function(i,o){return function(c,v){o(c,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=a(9042),d=a(6114),f=a(9924),p=a(844),_=a(5596),e=a(4725),s=a(3656);let t=r.AccessibilityManager=class extends p.Disposable{constructor(i,o){super(),this._terminal=i,this._renderService=o,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let c=0;cthis._handleBoundaryFocus(c,0),this._bottomBoundaryFocusListener=c=>this._handleBoundaryFocus(c,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(c=>this._handleResize(c.rows))),this.register(this._terminal.onRender(c=>this._refreshRows(c.start,c.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(c=>this._handleChar(c))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` +import{o as Ce,l as be,n as he,t as ge,b as ye,w as we,y as Ee,F as ke,e as Le}from"./index-59964cc6.js";var pe={exports:{}};(function(Q,ne){(function(ce,oe){Q.exports=oe()})(self,()=>(()=>{var ce={4567:function(I,r,a){var l=this&&this.__decorate||function(i,o,c,v){var m,h=arguments.length,g=h<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,c):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,o,c,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(g=(h<3?m(g):h>3?m(o,c,g):m(o,c))||g);return h>3&&g&&Object.defineProperty(o,c,g),g},u=this&&this.__param||function(i,o){return function(c,v){o(c,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=a(9042),d=a(6114),f=a(9924),p=a(844),_=a(5596),e=a(4725),s=a(3656);let t=r.AccessibilityManager=class extends p.Disposable{constructor(i,o){super(),this._terminal=i,this._renderService=o,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let c=0;cthis._handleBoundaryFocus(c,0),this._bottomBoundaryFocusListener=c=>this._handleBoundaryFocus(c,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(c=>this._handleResize(c.rows))),this.register(this._terminal.onRender(c=>this._refreshRows(c.start,c.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(c=>this._handleChar(c))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` `))),this.register(this._terminal.onA11yTab(c=>this._handleTab(c))),this.register(this._terminal.onKey(c=>this._handleKey(c.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new _.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,p.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let o=0;o0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===` `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),/\p{Control}/u.test(i)||this._charsToConsume.push(i)}_refreshRows(i,o){this._liveRegionDebouncer.refresh(i,o,this._terminal.rows)}_renderRows(i,o){const c=this._terminal.buffer,v=c.lines.length.toString();for(let m=i;m<=o;m++){const h=c.translateBufferLineToString(c.ydisp+m,!0),g=(c.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",g),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,o){const c=i.target,v=this._rowElements[o===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(o===0?(m=c,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=c,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{const g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(o===0?-1:1),this._rowElements[o===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let o=this._rowContainer.children.length;oi;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i{function a(d){return d.replace(/\r?\n/g,"\r")}function l(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function u(d,f,p,_){d=l(d=a(d),p.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),p.triggerDataEvent(d,!0),f.value=""}function n(d,f,p){const _=p.getBoundingClientRect(),e=d.clientX-_.left-10,s=d.clientY-_.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=l,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,p,_){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),f,p,_)},r.paste=u,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,p,_,e){n(d,f,p),e&&_.rightClickSelect(d),f.value=_.selectionText,f.select()}},7239:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const l=a(1505);r.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(u,n,d){this._css.set(u,n,d)}getCss(u,n){return this._css.get(u,n)}setColor(u,n,d){this._color.set(u,n,d)}getColor(u,n){return this._color.get(u,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,l,u,n){a.addEventListener(l,u,n);let d=!1;return{dispose:()=>{d||(d=!0,a.removeEventListener(l,u,n))}}}},6465:function(I,r,a){var l=this&&this.__decorate||function(e,s,t,i){var o,c=arguments.length,v=c<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(o=e[m])&&(v=(c<3?o(v):c>3?o(s,t,v):o(s,t))||v);return c>3&&v&&Object.defineProperty(s,t,v),v},u=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=a(3656),d=a(8460),f=a(844),p=a(2585);let _=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i{c==null||c.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let o=!1;for(const[c,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(c)&&(o=this._checkLinkProviderResult(c,e,o)):v.provideLinks(e.y,m=>{var h,g;if(this._isMouseOut)return;const b=m==null?void 0:m.map(L=>({link:L}));(h=this._activeProviderReplies)===null||h===void 0||h.set(c,b),o=this._checkLinkProviderResult(c,e,o),((g=this._activeProviderReplies)===null||g===void 0?void 0:g.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;ie?this._bufferService.cols:v.link.range.end.x;for(let g=m;g<=h;g++){if(t.has(g)){o.splice(c--,1);break}t.add(g)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const o=this._activeProviderReplies.get(e);let c=!1;for(let v=0;vthis._linkAtPosition(m.link,s));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;vthis._linkAtPosition(h.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,o;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((o=this._element)===null||o===void 0||o.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,o,c;!((i=this._currentLink)===null||i===void 0)&&i.state&&((c=(o=this._currentLink)===null||o===void 0?void 0:o.state)===null||c===void 0?void 0:c.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,o=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=o&&(this._clearCurrentLink(i,o),this._lastMouseEvent&&this._element)){const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._askForLink(c,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,o=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(o)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,o=s.y*this._bufferService.cols+s.x;return t<=o&&o<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,o){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:o}}};r.Linkifier2=_=l([u(0,p.IBufferService)],_)},9042:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(I,r,a){var l=this&&this.__decorate||function(_,e,s,t){var i,o=arguments.length,c=o<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(_,e,s,t);else for(var v=_.length-1;v>=0;v--)(i=_[v])&&(c=(o<3?i(c):o>3?i(e,s,c):i(e,s))||c);return o>3&&c&&Object.defineProperty(e,s,c),c},u=this&&this.__param||function(_,e){return function(s,t){e(s,t,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=a(511),d=a(2585);let f=r.OscLinkProvider=class{constructor(_,e,s){this._bufferService=_,this._optionsService=e,this._oscLinkService=s}provideLinks(_,e){var s;const t=this._bufferService.buffer.lines.get(_-1);if(!t)return void e(void 0);const i=[],o=this._optionsService.rawOptions.linkHandler,c=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,g=!1;for(let b=0;bo?o.activate(x,T,y):p(0,T),hover:(x,T)=>{var O;return(O=o==null?void 0:o.hover)===null||O===void 0?void 0:O.call(o,x,T,y)},leave:(x,T)=>{var O;return(O=o==null?void 0:o.leave)===null||O===void 0?void 0:O.call(o,x,T,y)}})}g=!1,c.hasExtendedAttrs()&&c.extended.urlId?(h=b,m=c.extended.urlId):(h=-1,m=-1)}}e(i)}};function p(_,e){if(confirm(`Do you want to navigate to ${e}? diff --git a/dashboard/dist/assets/DefaultDashboard-8fc755bb.js b/dashboard/dist/assets/DefaultDashboard-058a0350.js similarity index 99% rename from dashboard/dist/assets/DefaultDashboard-8fc755bb.js rename to dashboard/dist/assets/DefaultDashboard-058a0350.js index 13e711de8..85382d4e8 100644 --- a/dashboard/dist/assets/DefaultDashboard-8fc755bb.js +++ b/dashboard/dist/assets/DefaultDashboard-058a0350.js @@ -1 +1 @@ -import{o as i,c as _,w as e,b as t,n as a,y as m,f as p,L as x,M as l,t as u,D as h,B as r,l as y,z as S,F as w,U as c,W as T,X as C,m as M,r as L,e as j,j as B,q as D}from"./index-3360c831.js";import{_ as $}from"./_plugin-vue_export-helper-c27b6911.js";const P={class:"d-flex align-start mb-3"},F={class:"text-h1 font-weight-medium"},I=a("span",{class:"text-subtitle-1 text-medium-emphasis text-white"},"消息总数",-1),N={name:"TotalMessage",props:["stat"],data:()=>({stat:{message_count:0}}),mounted(){}},R=Object.assign(N,{setup(s){return(o,n)=>(i(),_(r,{elevation:"0",class:"bg-secondary overflow-hidden bubble-shape bubble-secondary-shape"},{default:e(()=>[t(h,null,{default:e(()=>[a("div",P,[t(m,{icon:"",rounded:"sm",color:"darksecondary",variant:"flat"},{default:e(()=>[t(p,{icon:"mdi-account-multiple-outline"})]),_:1})]),t(x,null,{default:e(()=>[t(l,{cols:"6"},{default:e(()=>[a("h2",F,u(s.stat.message_count),1),I]),_:1})]),_:1})]),_:1})]),_:1}))}}),z={class:"d-flex align-start mb-3"},H={class:"text-h1 font-weight-medium"},U=a("span",{class:"text-subtitle-1 text-medium-emphasis text-white"},"消息平台数",-1),q={name:"TotalSession",props:["stat"],data:()=>({stat:{platform_count:0}})},E=Object.assign(q,{setup(s){return(o,n)=>(i(),_(r,{elevation:"0",class:"bg-primary overflow-hidden bubble-shape bubble-primary-shape"},{default:e(()=>[t(h,null,{default:e(()=>[a("div",z,[t(m,{icon:"",rounded:"sm",color:"darkprimary",variant:"flat"},{default:e(()=>[t(p,{icon:"mdi-account-multiple-outline"})]),_:1})]),t(x,null,{default:e(()=>[t(l,{cols:"6"},{default:e(()=>[a("h2",H,u(s.stat.platform_count),1),U]),_:1})]),_:1})]),_:1})]),_:1}))}}),W={name:"OnlineTime",components:{},props:["stat"],watch:{},data:()=>({stat:{memory:"Loading",running:"Loading"}}),mounted(){}},X={class:"d-flex align-center gap-3"},A={class:"text-h4 font-weight-medium"},G=a("span",{class:"text-subtitle-2 text-medium-emphasis text-white"},"运行时间",-1),J={class:"d-flex align-center gap-3"},K={class:"text-h4 font-weight-medium"},Q=a("span",{class:"text-subtitle-2 text-disabled font-weight-medium"},"占用内存",-1);function Y(s,o,n,f,d,v){return i(),y(w,null,[t(r,{elevation:"0",class:"bg-primary overflow-hidden bubble-shape-sm bubble-primary mb-6"},{default:e(()=>[t(h,{class:"pa-5"},{default:e(()=>[a("div",X,[t(m,{color:"darkprimary",icon:"",rounded:"sm",variant:"flat"},{default:e(()=>[t(p,{icon:"mdi-clock"})]),_:1}),a("div",null,[a("h4",A,u(n.stat.running),1),G]),t(S),a("div",null,[t(m,{icon:"",rounded:"sm",variant:"plain"},{default:e(()=>[t(p,{color:"black",icon:"mdi-stop",size:"32"})]),_:1})])])]),_:1})]),_:1}),t(r,{elevation:"0",class:"bubble-shape-sm overflow-hidden bubble-warning"},{default:e(()=>[t(h,{class:"pa-5"},{default:e(()=>{var b,g;return[a("div",J,[t(m,{color:"lightwarning",icon:"",rounded:"sm",variant:"flat"},{default:e(()=>[t(p,{icon:"mdi-memory"})]),_:1}),a("div",null,[a("h4",K,u((b=n.stat.memory)==null?void 0:b.process)+" / "+u((g=n.stat.memory)==null?void 0:g.system)+" MiB",1),Q])])]}),_:1})]),_:1})],64)}const Z=$(W,[["render",Y]]),tt=a("span",{class:"text-subtitle-2 text-disabled font-weight-bold"},"总消息趋势",-1),et={class:"mt-4"},at={name:"MessageStat",components:{},props:["stat"],data:()=>({total_cnt:0,select:{state:"Today",abbr:"FL"},items:[{state:"过去 1 天",abbr:"FL"}],chartOptions1:{chart:{type:"area",height:400,fontFamily:"inherit",foreColor:"#a1aab2"},colors:["#5e35b1"],dataLabels:{enabled:!1},stroke:{curve:"smooth",width:1},tooltip:{fixed:{enabled:!1},x:{show:!0,format:"yyyy-MM-dd HH:mm"},y:{title:{formatter:()=>"消息条数 "}}},xaxis:{type:"datetime",title:{text:"时间"}},yaxis:{title:{text:"消息条数"}},grid:{show:!0}},lineChart1:{series:[{name:"消息条数",data:[]}]}}),watch:{stat:{handler:function(s,o){s=s.message_time_series,this.lineChart1.series[0].data=s.map(n=>[new Date(n[0]*1e3).getTime(),n[1]])},deep:!0}}},st=Object.assign(at,{setup(s){return(o,n)=>{const f=c("apexchart");return i(),_(r,{elevation:"0"},{default:e(()=>[t(r,{variant:"outlined"},{default:e(()=>[t(h,null,{default:e(()=>[t(x,null,{default:e(()=>[t(l,{cols:"12",sm:"7"},{default:e(()=>[tt]),_:1}),t(l,{cols:"12",sm:"5"},{default:e(()=>[t(T,{color:"primary",variant:"outlined","hide-details":"",modelValue:o.select,"onUpdate:modelValue":n[0]||(n[0]=d=>o.select=d),items:o.items,"item-title":"state","item-value":"abbr",label:"Select","persistent-hint":"","return-object":"","single-line":""},null,8,["modelValue","items"])]),_:1})]),_:1}),a("div",et,[t(f,{type:"area",height:"280",options:o.chartOptions1,series:o.lineChart1.series,ref:"rtchart"},null,8,["options","series"])])]),_:1})]),_:1})]),_:1})}}}),ot=a("div",{class:"d-flex align-center"},[a("h4",{class:"text-h4 mt-1"},"各平台消息数")],-1),nt={class:"mt-4"},lt={class:"d-inline-flex align-center justify-space-between w-100"},it={class:"text-subtitle-1 text-medium-emphasis font-weight-bold"},rt={class:"ml-auto text-subtitle-1 text-medium-emphasis font-weight-bold"},dt={class:"text-center mt-3"},ct={name:"PlatformStat",components:{},props:["stat"],watch:{stat:{handler:function(s,o){this.platforms=s.platform},deep:!0}},data:()=>({platforms:[]}),mounted(){}},ut=Object.assign(ct,{setup(s){return C(()=>({chart:{type:"area",height:95,fontFamily:"inherit",foreColor:"#a1aab2",sparkline:{enabled:!0}},colors:["#5e35b1"],dataLabels:{enabled:!1},stroke:{curve:"smooth",width:1},tooltip:{theme:"dark",fixed:{enabled:!1},x:{show:!1},y:{title:{formatter:()=>"消息条数 "}},marker:{show:!1}}})),(o,n)=>{const f=c("ChevronRightIcon");return i(),_(r,{elevation:"0"},{default:e(()=>[t(r,{variant:"outlined"},{default:e(()=>[t(h,null,{default:e(()=>[ot,a("div",nt,[t(M,{lines:"two",class:"py-0",style:{height:"270px"}},{default:e(()=>[(i(!0),y(w,null,L(o.platforms,(d,v)=>(i(),_(B,{key:v,value:d,color:"secondary",rounded:"sm"},{default:e(()=>[a("div",lt,[a("div",null,[a("h6",it,u(d.name),1)]),a("div",rt,u(d.count)+" 条",1)])]),_:2},1032,["value"]))),128))]),_:1}),a("div",dt,[t(m,{color:"primary",variant:"text"},{append:e(()=>[t(f,{"stroke-width":"1.5",width:"20"})]),default:e(()=>[j("详情 ")]),_:1})])])]),_:1})]),_:1})]),_:1})}}}),mt={name:"DefaultDashboard",components:{TotalMessage:R,OnlinePlatform:E,OnlineTime:Z,MessageStat:st,PlatformStat:ut},data:()=>({stat:{}}),mounted(){D.get("/api/stat/get").then(s=>{this.stat=s.data.data})}};function _t(s,o,n,f,d,v){const b=c("TotalMessage"),g=c("OnlinePlatform"),V=c("OnlineTime"),k=c("MessageStat"),O=c("PlatformStat");return i(),_(x,null,{default:e(()=>[t(l,{cols:"12",md:"4"},{default:e(()=>[t(b,{stat:s.stat},null,8,["stat"])]),_:1}),t(l,{cols:"12",md:"4"},{default:e(()=>[t(g,{stat:s.stat},null,8,["stat"])]),_:1}),t(l,{cols:"12",md:"4"},{default:e(()=>[t(V,{stat:s.stat},null,8,["stat"])]),_:1}),t(l,{cols:"12",lg:"8"},{default:e(()=>[t(k,{stat:s.stat},null,8,["stat"])]),_:1}),t(l,{cols:"12",lg:"4"},{default:e(()=>[t(O,{stat:s.stat},null,8,["stat"])]),_:1})]),_:1})}const pt=$(mt,[["render",_t]]);export{pt as default}; +import{o as i,c as _,w as e,b as t,n as a,y as m,f as p,L as x,M as l,t as u,D as h,B as r,l as y,z as S,F as w,U as c,W as T,X as C,m as M,r as L,e as j,j as B,q as D}from"./index-59964cc6.js";import{_ as $}from"./_plugin-vue_export-helper-c27b6911.js";const P={class:"d-flex align-start mb-3"},F={class:"text-h1 font-weight-medium"},I=a("span",{class:"text-subtitle-1 text-medium-emphasis text-white"},"消息总数",-1),N={name:"TotalMessage",props:["stat"],data:()=>({stat:{message_count:0}}),mounted(){}},R=Object.assign(N,{setup(s){return(o,n)=>(i(),_(r,{elevation:"0",class:"bg-secondary overflow-hidden bubble-shape bubble-secondary-shape"},{default:e(()=>[t(h,null,{default:e(()=>[a("div",P,[t(m,{icon:"",rounded:"sm",color:"darksecondary",variant:"flat"},{default:e(()=>[t(p,{icon:"mdi-account-multiple-outline"})]),_:1})]),t(x,null,{default:e(()=>[t(l,{cols:"6"},{default:e(()=>[a("h2",F,u(s.stat.message_count),1),I]),_:1})]),_:1})]),_:1})]),_:1}))}}),z={class:"d-flex align-start mb-3"},H={class:"text-h1 font-weight-medium"},U=a("span",{class:"text-subtitle-1 text-medium-emphasis text-white"},"消息平台数",-1),q={name:"TotalSession",props:["stat"],data:()=>({stat:{platform_count:0}})},E=Object.assign(q,{setup(s){return(o,n)=>(i(),_(r,{elevation:"0",class:"bg-primary overflow-hidden bubble-shape bubble-primary-shape"},{default:e(()=>[t(h,null,{default:e(()=>[a("div",z,[t(m,{icon:"",rounded:"sm",color:"darkprimary",variant:"flat"},{default:e(()=>[t(p,{icon:"mdi-account-multiple-outline"})]),_:1})]),t(x,null,{default:e(()=>[t(l,{cols:"6"},{default:e(()=>[a("h2",H,u(s.stat.platform_count),1),U]),_:1})]),_:1})]),_:1})]),_:1}))}}),W={name:"OnlineTime",components:{},props:["stat"],watch:{},data:()=>({stat:{memory:"Loading",running:"Loading"}}),mounted(){}},X={class:"d-flex align-center gap-3"},A={class:"text-h4 font-weight-medium"},G=a("span",{class:"text-subtitle-2 text-medium-emphasis text-white"},"运行时间",-1),J={class:"d-flex align-center gap-3"},K={class:"text-h4 font-weight-medium"},Q=a("span",{class:"text-subtitle-2 text-disabled font-weight-medium"},"占用内存",-1);function Y(s,o,n,f,d,v){return i(),y(w,null,[t(r,{elevation:"0",class:"bg-primary overflow-hidden bubble-shape-sm bubble-primary mb-6"},{default:e(()=>[t(h,{class:"pa-5"},{default:e(()=>[a("div",X,[t(m,{color:"darkprimary",icon:"",rounded:"sm",variant:"flat"},{default:e(()=>[t(p,{icon:"mdi-clock"})]),_:1}),a("div",null,[a("h4",A,u(n.stat.running),1),G]),t(S),a("div",null,[t(m,{icon:"",rounded:"sm",variant:"plain"},{default:e(()=>[t(p,{color:"black",icon:"mdi-stop",size:"32"})]),_:1})])])]),_:1})]),_:1}),t(r,{elevation:"0",class:"bubble-shape-sm overflow-hidden bubble-warning"},{default:e(()=>[t(h,{class:"pa-5"},{default:e(()=>{var b,g;return[a("div",J,[t(m,{color:"lightwarning",icon:"",rounded:"sm",variant:"flat"},{default:e(()=>[t(p,{icon:"mdi-memory"})]),_:1}),a("div",null,[a("h4",K,u((b=n.stat.memory)==null?void 0:b.process)+" / "+u((g=n.stat.memory)==null?void 0:g.system)+" MiB",1),Q])])]}),_:1})]),_:1})],64)}const Z=$(W,[["render",Y]]),tt=a("span",{class:"text-subtitle-2 text-disabled font-weight-bold"},"总消息趋势",-1),et={class:"mt-4"},at={name:"MessageStat",components:{},props:["stat"],data:()=>({total_cnt:0,select:{state:"Today",abbr:"FL"},items:[{state:"过去 1 天",abbr:"FL"}],chartOptions1:{chart:{type:"area",height:400,fontFamily:"inherit",foreColor:"#a1aab2"},colors:["#5e35b1"],dataLabels:{enabled:!1},stroke:{curve:"smooth",width:1},tooltip:{fixed:{enabled:!1},x:{show:!0,format:"yyyy-MM-dd HH:mm"},y:{title:{formatter:()=>"消息条数 "}}},xaxis:{type:"datetime",title:{text:"时间"}},yaxis:{title:{text:"消息条数"}},grid:{show:!0}},lineChart1:{series:[{name:"消息条数",data:[]}]}}),watch:{stat:{handler:function(s,o){s=s.message_time_series,this.lineChart1.series[0].data=s.map(n=>[new Date(n[0]*1e3).getTime(),n[1]])},deep:!0}}},st=Object.assign(at,{setup(s){return(o,n)=>{const f=c("apexchart");return i(),_(r,{elevation:"0"},{default:e(()=>[t(r,{variant:"outlined"},{default:e(()=>[t(h,null,{default:e(()=>[t(x,null,{default:e(()=>[t(l,{cols:"12",sm:"7"},{default:e(()=>[tt]),_:1}),t(l,{cols:"12",sm:"5"},{default:e(()=>[t(T,{color:"primary",variant:"outlined","hide-details":"",modelValue:o.select,"onUpdate:modelValue":n[0]||(n[0]=d=>o.select=d),items:o.items,"item-title":"state","item-value":"abbr",label:"Select","persistent-hint":"","return-object":"","single-line":""},null,8,["modelValue","items"])]),_:1})]),_:1}),a("div",et,[t(f,{type:"area",height:"280",options:o.chartOptions1,series:o.lineChart1.series,ref:"rtchart"},null,8,["options","series"])])]),_:1})]),_:1})]),_:1})}}}),ot=a("div",{class:"d-flex align-center"},[a("h4",{class:"text-h4 mt-1"},"各平台消息数")],-1),nt={class:"mt-4"},lt={class:"d-inline-flex align-center justify-space-between w-100"},it={class:"text-subtitle-1 text-medium-emphasis font-weight-bold"},rt={class:"ml-auto text-subtitle-1 text-medium-emphasis font-weight-bold"},dt={class:"text-center mt-3"},ct={name:"PlatformStat",components:{},props:["stat"],watch:{stat:{handler:function(s,o){this.platforms=s.platform},deep:!0}},data:()=>({platforms:[]}),mounted(){}},ut=Object.assign(ct,{setup(s){return C(()=>({chart:{type:"area",height:95,fontFamily:"inherit",foreColor:"#a1aab2",sparkline:{enabled:!0}},colors:["#5e35b1"],dataLabels:{enabled:!1},stroke:{curve:"smooth",width:1},tooltip:{theme:"dark",fixed:{enabled:!1},x:{show:!1},y:{title:{formatter:()=>"消息条数 "}},marker:{show:!1}}})),(o,n)=>{const f=c("ChevronRightIcon");return i(),_(r,{elevation:"0"},{default:e(()=>[t(r,{variant:"outlined"},{default:e(()=>[t(h,null,{default:e(()=>[ot,a("div",nt,[t(M,{lines:"two",class:"py-0",style:{height:"270px"}},{default:e(()=>[(i(!0),y(w,null,L(o.platforms,(d,v)=>(i(),_(B,{key:v,value:d,color:"secondary",rounded:"sm"},{default:e(()=>[a("div",lt,[a("div",null,[a("h6",it,u(d.name),1)]),a("div",rt,u(d.count)+" 条",1)])]),_:2},1032,["value"]))),128))]),_:1}),a("div",dt,[t(m,{color:"primary",variant:"text"},{append:e(()=>[t(f,{"stroke-width":"1.5",width:"20"})]),default:e(()=>[j("详情 ")]),_:1})])])]),_:1})]),_:1})]),_:1})}}}),mt={name:"DefaultDashboard",components:{TotalMessage:R,OnlinePlatform:E,OnlineTime:Z,MessageStat:st,PlatformStat:ut},data:()=>({stat:{}}),mounted(){D.get("/api/stat/get").then(s=>{this.stat=s.data.data})}};function _t(s,o,n,f,d,v){const b=c("TotalMessage"),g=c("OnlinePlatform"),V=c("OnlineTime"),k=c("MessageStat"),O=c("PlatformStat");return i(),_(x,null,{default:e(()=>[t(l,{cols:"12",md:"4"},{default:e(()=>[t(b,{stat:s.stat},null,8,["stat"])]),_:1}),t(l,{cols:"12",md:"4"},{default:e(()=>[t(g,{stat:s.stat},null,8,["stat"])]),_:1}),t(l,{cols:"12",md:"4"},{default:e(()=>[t(V,{stat:s.stat},null,8,["stat"])]),_:1}),t(l,{cols:"12",lg:"8"},{default:e(()=>[t(k,{stat:s.stat},null,8,["stat"])]),_:1}),t(l,{cols:"12",lg:"4"},{default:e(()=>[t(O,{stat:s.stat},null,8,["stat"])]),_:1})]),_:1})}const pt=$(mt,[["render",_t]]);export{pt as default}; diff --git a/dashboard/dist/assets/ExtensionPage-fe933741.js b/dashboard/dist/assets/ExtensionPage-ad46d9b6.js similarity index 99% rename from dashboard/dist/assets/ExtensionPage-fe933741.js rename to dashboard/dist/assets/ExtensionPage-ad46d9b6.js index 061360cab..6a040efe7 100644 --- a/dashboard/dist/assets/ExtensionPage-fe933741.js +++ b/dashboard/dist/assets/ExtensionPage-ad46d9b6.js @@ -1 +1 @@ -import{k as A,o as i,c as r,w as e,b as a,n as d,C as V,e as u,t as p,z as k,y as g,Y as z,G as R,Z as U,D as y,B as C,l as c,_ as j,$ as G,F as f,r as x,a0 as H,H as M,a1 as q,V as N,A as B,g as v,L as b,K as w,a2 as O,q as m,a3 as W,M as _,E as $,J as E,a4 as Z,f as D,a5 as J}from"./index-3360c831.js";import{W as P}from"./WaitingForRestart-dd7c3e40.js";import"./_plugin-vue_export-helper-c27b6911.js";const K={class:"d-sm-flex align-center justify-space-between"},L=A({__name:"ExtensionCard",props:{title:String,link:String},setup(n){const t=n,o=l=>{window.open(l,"_blank")};return(l,s)=>(i(),r(C,{variant:"outlined",elevation:"0",class:"withbg"},{default:e(()=>[a(z,{style:{padding:"10px 14px"}},{default:e(()=>[d("div",K,[a(V,{style:{"font-size":"17px"}},{default:e(()=>[u(p(t.title),1)]),_:1}),a(k),a(g,{variant:"plain",onClick:s[0]||(s[0]=h=>o(t.link))},{default:e(()=>[u("仓库")]),_:1})])]),_:1}),a(R),a(y,null,{default:e(()=>[U(l.$slots,"default")]),_:3})]),_:3}))}}),Y={class:"d-sm-flex align-center justify-space-between"},Q=A({__name:"UiParentCard",props:{title:String},setup(n){const t=n;return(o,l)=>(i(),r(C,{variant:"outlined",elevation:"0",class:"withbg"},{default:e(()=>[a(z,null,{default:e(()=>[d("div",Y,[a(V,null,{default:e(()=>[u(p(t.title),1)]),_:1}),U(o.$slots,"action")])]),_:3}),a(R),a(y,null,{default:e(()=>[U(o.$slots,"default")]),_:3})]),_:3}))}}),F={__name:"ConfigDetailCard",props:{config:Array},setup(n){return(t,o)=>(i(),c(f,null,[j(d("a",null,"该插件没有配置",512),[[G,n.config.length===0]]),(i(!0),c(f,null,x(n.config,l=>(i(),r(Q,{key:l.name,title:l.name,style:{"margin-bottom":"16px"}},{default:e(()=>[(i(!0),c(f,null,x(l.body,s=>(i(),c(f,null,[s.config_type==="item"?(i(),c(f,{key:0},[s.val_type==="bool"?(i(),r(H,{key:0,modelValue:s.value,"onUpdate:modelValue":h=>s.value=h,label:s.name,hint:s.description,color:"primary",inset:""},null,8,["modelValue","onUpdate:modelValue","label","hint"])):s.val_type==="str"?(i(),r(M,{key:1,modelValue:s.value,"onUpdate:modelValue":h=>s.value=h,label:s.name,hint:s.description,style:{"margin-bottom":"8px"},variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","label","hint"])):s.val_type==="int"?(i(),r(M,{key:2,modelValue:s.value,"onUpdate:modelValue":h=>s.value=h,label:s.name,hint:s.description,style:{"margin-bottom":"8px"},variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","label","hint"])):s.val_type==="list"?(i(),c(f,{key:3},[d("span",null,p(s.name),1),a(q,{modelValue:s.value,"onUpdate:modelValue":h=>s.value=h,chips:"",clearable:"",label:"请添加",multiple:"","prepend-icon":"mdi-tag-multiple-outline"},{selection:e(({attrs:h,item:S,select:I,selected:T})=>[a(N,B(h,{"model-value":T,closable:"",onClick:I,"onClick:close":mt=>t.remove(S)}),{default:e(()=>[d("strong",null,p(S),1)]),_:2},1040,["model-value","onClick","onClick:close"])]),_:2},1032,["modelValue","onUpdate:modelValue"])],64)):v("",!0)],64)):s.config_type==="divider"?(i(),r(R,{key:1,style:{"margin-top":"8px","margin-bottom":"8px"}})):v("",!0)],64))),256))]),_:2},1032,["title"]))),128))],64))}},X=d("div",{style:{"background-color":"white",width:"100%",padding:"16px","border-radius":"10px"}},[d("h3",null,"🧩 已安装的插件")],-1),tt={style:{"min-height":"150px","max-height":"150px",overflow:"hidden"}},at={class:"d-flex align-center gap-2"},et=d("div",{style:{"background-color":"white",width:"100%",padding:"16px","border-radius":"10px"}},[d("h3",null,"🧩 插件市场")],-1),lt={style:{"min-height":"150px","max-height":"150px",overflow:"hidden"}},nt={class:"d-flex align-center gap-2"},ot=d("span",{class:"text-h5"},"插件配置",-1),st=d("span",{class:"text-h5"},"安装插件",-1),it=d("h3",null,"从 GitHub 上在线下载",-1),dt=d("small",null,"请输入合法的 GitHub 仓库链接,当前仅支持 GitHub。如:https://github.com/Soulter/astrbot_plugin_aiocqhttp",-1),ut=d("h3",null,"从本机上传 .zip 压缩包",-1),rt=d("small",null,"请保证插件文件存在压缩包根目录中的第一个文件夹中(即类似于从 GitHub 仓库页上下载的 Zip 压缩包的格式)。",-1),gt=d("br",null,null,-1),pt={class:"text-h5"},ht={key:0,class:"py-12 text-center"},ct={class:"text-h4 font-weight-bold"},ft={name:"ExtensionPage",components:{ExtensionCard:L,ConfigDetailCard:F,WaitingForRestart:P},data(){return{extension_data:{data:[]},extension_url:"",status:"",dialog:!1,snack_message:"",snack_show:!1,snack_success:"success",loading_:!1,configDialog:!1,extension_config:{},upload_file:null,pluginMarketData:{},loadingDialog:{show:!1,title:"加载中...",statusCode:0,statusMessage:"",result:""}}},mounted(){this.getExtensions(),this.fetchPluginCollection()},methods:{toast(n,t){this.snack_message=n,this.snack_show=!0,this.snack_success=t},onLoadingDialogResult(n,t,o=2e3){this.loadingDialog.statusCode=n,this.loadingDialog.result=t,setTimeout(()=>{this.loadingDialog={show:!1,title:"加载中...",statusCode:0,statusMessage:"",result:""}},o)},getExtensions(){m.get("/api/plugin/get").then(n=>{this.extension_data.data=n.data.data,this.checkAlreadyInstalled()})},newExtension(){if(this.extension_url===""&&this.upload_file===null){this.toast("请填写插件链接或上传插件文件","error");return}if(this.extension_url!==""&&this.upload_file!==null){this.toast("请不要同时填写插件链接和上传插件文件","error");return}if(this.loading_=!0,this.loadingDialog.show=!0,this.upload_file!==null){this.toast("正在从文件安装插件","primary");const n=new FormData;n.append("file",this.upload_file[0]),m.post("/api/plugin/install-upload",n,{headers:{"Content-Type":"multipart/form-data"}}).then(t=>{if(this.loading_=!1,t.data.status==="error"){this.onLoadingDialogResult(2,t.data.message);return}this.extension_data.data=t.data.data,this.upload_file="",this.onLoadingDialogResult(1,t.data.message),this.dialog=!1,this.$refs.wfr.check()}).catch(t=>{this.loading_=!1,this.onLoadingDialogResult(2,t)});return}else this.toast("正在从链接 "+this.extension_url+" 安装插件...","primary"),m.post("/api/plugin/install",{url:this.extension_url}).then(n=>{if(this.loading_=!1,n.data.status==="error"){this.onLoadingDialogResult(2,n.data.message);return}this.extension_data.data=n.data.data,console.log(this.extension_data),this.extension_url="",this.onLoadingDialogResult(1,n.data.message),this.dialog=!1,this.$refs.wfr.check()}).catch(n=>{this.loading_=!1,this.onLoadingDialogResult(2,n)})},uninstallExtension(n){this.toast("正在卸载"+n,"primary"),m.post("/api/plugin/uninstall",{name:n}).then(t=>{if(t.data.status==="error"){this.toast(t.data.message,"error");return}this.extension_data.data=t.data.data,this.toast(t.data.message,"success"),this.dialog=!1,this.getExtensions()}).catch(t=>{this.toast(t,"error")})},updateExtension(n){this.loadingDialog.show=!0,m.post("/api/plugin/update",{name:n}).then(t=>{if(t.data.status==="error"){this.onLoadingDialogResult(2,t.data.message);return}this.extension_data.data=t.data.data,console.log(this.extension_data),this.onLoadingDialogResult(1,t.data.message),this.dialog=!1,this.$refs.wfr.check()}).catch(t=>{this.toast(t,"error")})},openExtensionConfig(n){this.curr_namespace=n,this.configDialog=!0,m.get("/api/config/get?namespace="+n).then(t=>{this.extension_config=t.data.data,console.log(this.extension_config)}).catch(t=>{this.toast(t,"error")})},updateConfig(){m.post("/api/config/plugin/update",{config:this.extension_config,namespace:this.curr_namespace}).then(n=>{n.data.status==="ok"?(this.toast(n.data.message,"success"),this.$refs.wfr.check()):this.toast(n.data.message,"error")}).catch(n=>{this.toast(n,"error")})},fetchPluginCollection(){let n="https://soulter.github.io/AstrBot_Plugins_Collection/plugins.json";m.get(n).then(t=>{let o=[];this.pluginMarketDataOrigin=t.data;for(let l in t.data)o.push({name:l,desc:t.data[l].desc,author:t.data[l].author,repo:t.data[l].repo,installed:!1});this.pluginMarketData=o,this.checkAlreadyInstalled()}).catch(t=>{this.toast("获取插件市场数据失败: "+t,"error")})},checkAlreadyInstalled(){for(let n=0;n(i(),c(f,null,[a(b,null,{default:e(()=>[a(W,{style:{margin:"16px"},text:"1. 如果因为网络问题安装失败,可以前往 配置->其他配置->插件仓库镜像 修改安装镜像源。2. 如需插件帮助请点击 `仓库` 查看 README",title:"💡小提示",type:"info",variant:"tonal"}),a(_,{cols:"12",md:"12"},{default:e(()=>[X]),_:1}),(i(!0),c(f,null,x(t.extension_data.data,l=>(i(),r(_,{cols:"12",md:"6",lg:"4"},{default:e(()=>[(i(),r(L,{key:l.name,title:l.name,link:l.repo,style:{"margin-bottom":"4px"}},{default:e(()=>[d("p",tt,p(l.desc),1),d("div",at,[a(D,null,{default:e(()=>[u("mdi-account")]),_:1}),d("span",null,p(l.author),1),a(k),a(g,{variant:"plain",onClick:s=>t.openExtensionConfig(l.name)},{default:e(()=>[u("配置")]),_:2},1032,["onClick"]),a(g,{variant:"plain",onClick:s=>t.updateExtension(l.name)},{default:e(()=>[u("更新")]),_:2},1032,["onClick"]),a(g,{variant:"plain",onClick:s=>t.uninstallExtension(l.name)},{default:e(()=>[u("卸载")]),_:2},1032,["onClick"])])]),_:2},1032,["title","link"]))]),_:2},1024))),256)),a(_,{cols:"12",md:"12"},{default:e(()=>[et]),_:1}),(i(!0),c(f,null,x(t.pluginMarketData,l=>(i(),r(_,{cols:"12",md:"6",lg:"4"},{default:e(()=>[(i(),r(L,{key:l.name,title:l.name,link:l.repo,style:{"margin-bottom":"4px"}},{default:e(()=>[d("p",lt,p(l.desc),1),d("div",nt,[a(D,null,{default:e(()=>[u("mdi-account")]),_:1}),d("span",null,p(l.author),1),a(k),l.installed?(i(),r(g,{key:1,variant:"plain",disabled:""},{default:e(()=>[u("已安装")]),_:1})):(i(),r(g,{key:0,variant:"plain",onClick:s=>{t.extension_url=l.repo,t.newExtension()}},{default:e(()=>[u("安装")]),_:2},1032,["onClick"]))])]),_:2},1032,["title","link"]))]),_:2},1024))),256))]),_:1}),a(w,{modelValue:t.configDialog,"onUpdate:modelValue":o[1]||(o[1]=l=>t.configDialog=l),width:"750"},{activator:e(({props:l})=>[]),default:e(()=>[a(C,null,{default:e(()=>[a(V,null,{default:e(()=>[ot]),_:1}),a(y,null,{default:e(()=>[a($,null,{default:e(()=>[a(F,{config:t.extension_config},null,8,["config"])]),_:1})]),_:1}),a(E,null,{default:e(()=>[a(k),a(g,{color:"blue-darken-1",variant:"text",onClick:t.updateConfig},{default:e(()=>[u(" 保存并关闭 ")]),_:1},8,["onClick"]),a(g,{color:"blue-darken-1",variant:"text",onClick:o[0]||(o[0]=l=>t.configDialog=!1)},{default:e(()=>[u(" 关闭 ")]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),a(w,{modelValue:t.dialog,"onUpdate:modelValue":o[6]||(o[6]=l=>t.dialog=l),persistent:"",width:"700"},{activator:e(({props:l})=>[a(g,B(l,{icon:"mdi-plus",size:"x-large",style:{position:"fixed",right:"52px",bottom:"52px"},color:"darkprimary"}),null,16)]),default:e(()=>[a(C,null,{default:e(()=>[a(V,null,{default:e(()=>[st]),_:1}),a(y,null,{default:e(()=>[a($,null,{default:e(()=>[a(b,null,{default:e(()=>[it,a(_,{cols:"12"},{default:e(()=>[dt,a(M,{label:"仓库链接",modelValue:t.extension_url,"onUpdate:modelValue":o[2]||(o[2]=l=>t.extension_url=l),variant:"outlined",required:""},null,8,["modelValue"])]),_:1})]),_:1}),a(b,null,{default:e(()=>[ut,a(_,{cols:"12"},{default:e(()=>[rt,a(Z,{label:"选择文件",modelValue:t.upload_file,"onUpdate:modelValue":o[3]||(o[3]=l=>t.upload_file=l),accept:".zip",outlined:"",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),gt,d("small",null,p(t.status),1)]),_:1}),a(E,null,{default:e(()=>[a(k),a(g,{color:"blue-darken-1",variant:"text",onClick:o[4]||(o[4]=l=>t.dialog=!1)},{default:e(()=>[u(" 关闭 ")]),_:1}),a(g,{color:"blue-darken-1",variant:"text",loading:t.loading_,onClick:o[5]||(o[5]=l=>t.newExtension())},{default:e(()=>[u(" 安装 ")]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),a(w,{modelValue:t.loadingDialog.show,"onUpdate:modelValue":o[8]||(o[8]=l=>t.loadingDialog.show=l),width:"500",persistent:""},{default:e(()=>[a(C,null,{default:e(()=>[a(V,null,{default:e(()=>[d("span",pt,p(t.loadingDialog.title),1)]),_:1}),a(y,null,{default:e(()=>[a($,null,{default:e(()=>[a(b,null,{default:e(()=>[a(_,{cols:"12"},{default:e(()=>[t.loadingDialog.statusCode===0?(i(),r(J,{key:0,indeterminate:"",color:"primary"})):v("",!0)]),_:1})]),_:1}),t.loadingDialog.statusCode!==0?(i(),c("div",ht,[t.loadingDialog.statusCode===1?(i(),r(D,{key:0,class:"mb-6",color:"success",icon:"mdi-check-circle-outline",size:"128"})):v("",!0),t.loadingDialog.statusCode===2?(i(),r(D,{key:1,class:"mb-6",color:"error",icon:"mdi-alert-circle-outline",size:"128"})):v("",!0),d("div",ct,p(t.loadingDialog.result),1)])):v("",!0)]),_:1})]),_:1}),a(E,null,{default:e(()=>[a(k),a(g,{color:"blue-darken-1",variant:"text",onClick:o[7]||(o[7]=l=>t.loadingDialog.show=!1)},{default:e(()=>[u(" 关闭 ")]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),a(O,{timeout:2e3,elevation:"24",color:t.snack_success,modelValue:t.snack_show,"onUpdate:modelValue":o[9]||(o[9]=l=>t.snack_show=l)},{default:e(()=>[u(p(t.snack_message),1)]),_:1},8,["color","modelValue"]),a(P,{ref:"wfr"},null,512)],64))}});export{Vt as default}; +import{k as A,o as i,c as r,w as e,b as a,n as d,C as V,e as u,t as p,z as k,y as g,Y as z,G as R,Z as U,D as y,B as C,l as c,_ as j,$ as G,F as f,r as x,a0 as H,H as M,a1 as q,V as N,A as B,g as v,L as b,K as w,a2 as O,q as m,a3 as W,M as _,E as $,J as E,a4 as Z,f as D,a5 as J}from"./index-59964cc6.js";import{W as P}from"./WaitingForRestart-47f65a77.js";import"./_plugin-vue_export-helper-c27b6911.js";const K={class:"d-sm-flex align-center justify-space-between"},L=A({__name:"ExtensionCard",props:{title:String,link:String},setup(n){const t=n,o=l=>{window.open(l,"_blank")};return(l,s)=>(i(),r(C,{variant:"outlined",elevation:"0",class:"withbg"},{default:e(()=>[a(z,{style:{padding:"10px 14px"}},{default:e(()=>[d("div",K,[a(V,{style:{"font-size":"17px"}},{default:e(()=>[u(p(t.title),1)]),_:1}),a(k),a(g,{variant:"plain",onClick:s[0]||(s[0]=h=>o(t.link))},{default:e(()=>[u("仓库")]),_:1})])]),_:1}),a(R),a(y,null,{default:e(()=>[U(l.$slots,"default")]),_:3})]),_:3}))}}),Y={class:"d-sm-flex align-center justify-space-between"},Q=A({__name:"UiParentCard",props:{title:String},setup(n){const t=n;return(o,l)=>(i(),r(C,{variant:"outlined",elevation:"0",class:"withbg"},{default:e(()=>[a(z,null,{default:e(()=>[d("div",Y,[a(V,null,{default:e(()=>[u(p(t.title),1)]),_:1}),U(o.$slots,"action")])]),_:3}),a(R),a(y,null,{default:e(()=>[U(o.$slots,"default")]),_:3})]),_:3}))}}),F={__name:"ConfigDetailCard",props:{config:Array},setup(n){return(t,o)=>(i(),c(f,null,[j(d("a",null,"该插件没有配置",512),[[G,n.config.length===0]]),(i(!0),c(f,null,x(n.config,l=>(i(),r(Q,{key:l.name,title:l.name,style:{"margin-bottom":"16px"}},{default:e(()=>[(i(!0),c(f,null,x(l.body,s=>(i(),c(f,null,[s.config_type==="item"?(i(),c(f,{key:0},[s.val_type==="bool"?(i(),r(H,{key:0,modelValue:s.value,"onUpdate:modelValue":h=>s.value=h,label:s.name,hint:s.description,color:"primary",inset:""},null,8,["modelValue","onUpdate:modelValue","label","hint"])):s.val_type==="str"?(i(),r(M,{key:1,modelValue:s.value,"onUpdate:modelValue":h=>s.value=h,label:s.name,hint:s.description,style:{"margin-bottom":"8px"},variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","label","hint"])):s.val_type==="int"?(i(),r(M,{key:2,modelValue:s.value,"onUpdate:modelValue":h=>s.value=h,label:s.name,hint:s.description,style:{"margin-bottom":"8px"},variant:"outlined"},null,8,["modelValue","onUpdate:modelValue","label","hint"])):s.val_type==="list"?(i(),c(f,{key:3},[d("span",null,p(s.name),1),a(q,{modelValue:s.value,"onUpdate:modelValue":h=>s.value=h,chips:"",clearable:"",label:"请添加",multiple:"","prepend-icon":"mdi-tag-multiple-outline"},{selection:e(({attrs:h,item:S,select:I,selected:T})=>[a(N,B(h,{"model-value":T,closable:"",onClick:I,"onClick:close":mt=>t.remove(S)}),{default:e(()=>[d("strong",null,p(S),1)]),_:2},1040,["model-value","onClick","onClick:close"])]),_:2},1032,["modelValue","onUpdate:modelValue"])],64)):v("",!0)],64)):s.config_type==="divider"?(i(),r(R,{key:1,style:{"margin-top":"8px","margin-bottom":"8px"}})):v("",!0)],64))),256))]),_:2},1032,["title"]))),128))],64))}},X=d("div",{style:{"background-color":"white",width:"100%",padding:"16px","border-radius":"10px"}},[d("h3",null,"🧩 已安装的插件")],-1),tt={style:{"min-height":"150px","max-height":"150px",overflow:"hidden"}},at={class:"d-flex align-center gap-2"},et=d("div",{style:{"background-color":"white",width:"100%",padding:"16px","border-radius":"10px"}},[d("h3",null,"🧩 插件市场")],-1),lt={style:{"min-height":"150px","max-height":"150px",overflow:"hidden"}},nt={class:"d-flex align-center gap-2"},ot=d("span",{class:"text-h5"},"插件配置",-1),st=d("span",{class:"text-h5"},"安装插件",-1),it=d("h3",null,"从 GitHub 上在线下载",-1),dt=d("small",null,"请输入合法的 GitHub 仓库链接,当前仅支持 GitHub。如:https://github.com/Soulter/astrbot_plugin_aiocqhttp",-1),ut=d("h3",null,"从本机上传 .zip 压缩包",-1),rt=d("small",null,"请保证插件文件存在压缩包根目录中的第一个文件夹中(即类似于从 GitHub 仓库页上下载的 Zip 压缩包的格式)。",-1),gt=d("br",null,null,-1),pt={class:"text-h5"},ht={key:0,class:"py-12 text-center"},ct={class:"text-h4 font-weight-bold"},ft={name:"ExtensionPage",components:{ExtensionCard:L,ConfigDetailCard:F,WaitingForRestart:P},data(){return{extension_data:{data:[]},extension_url:"",status:"",dialog:!1,snack_message:"",snack_show:!1,snack_success:"success",loading_:!1,configDialog:!1,extension_config:{},upload_file:null,pluginMarketData:{},loadingDialog:{show:!1,title:"加载中...",statusCode:0,statusMessage:"",result:""}}},mounted(){this.getExtensions(),this.fetchPluginCollection()},methods:{toast(n,t){this.snack_message=n,this.snack_show=!0,this.snack_success=t},onLoadingDialogResult(n,t,o=2e3){this.loadingDialog.statusCode=n,this.loadingDialog.result=t,setTimeout(()=>{this.loadingDialog={show:!1,title:"加载中...",statusCode:0,statusMessage:"",result:""}},o)},getExtensions(){m.get("/api/plugin/get").then(n=>{this.extension_data.data=n.data.data,this.checkAlreadyInstalled()})},newExtension(){if(this.extension_url===""&&this.upload_file===null){this.toast("请填写插件链接或上传插件文件","error");return}if(this.extension_url!==""&&this.upload_file!==null){this.toast("请不要同时填写插件链接和上传插件文件","error");return}if(this.loading_=!0,this.loadingDialog.show=!0,this.upload_file!==null){this.toast("正在从文件安装插件","primary");const n=new FormData;n.append("file",this.upload_file[0]),m.post("/api/plugin/install-upload",n,{headers:{"Content-Type":"multipart/form-data"}}).then(t=>{if(this.loading_=!1,t.data.status==="error"){this.onLoadingDialogResult(2,t.data.message);return}this.extension_data.data=t.data.data,this.upload_file="",this.onLoadingDialogResult(1,t.data.message),this.dialog=!1,this.$refs.wfr.check()}).catch(t=>{this.loading_=!1,this.onLoadingDialogResult(2,t)});return}else this.toast("正在从链接 "+this.extension_url+" 安装插件...","primary"),m.post("/api/plugin/install",{url:this.extension_url}).then(n=>{if(this.loading_=!1,n.data.status==="error"){this.onLoadingDialogResult(2,n.data.message);return}this.extension_data.data=n.data.data,console.log(this.extension_data),this.extension_url="",this.onLoadingDialogResult(1,n.data.message),this.dialog=!1,this.$refs.wfr.check()}).catch(n=>{this.loading_=!1,this.onLoadingDialogResult(2,n)})},uninstallExtension(n){this.toast("正在卸载"+n,"primary"),m.post("/api/plugin/uninstall",{name:n}).then(t=>{if(t.data.status==="error"){this.toast(t.data.message,"error");return}this.extension_data.data=t.data.data,this.toast(t.data.message,"success"),this.dialog=!1,this.getExtensions()}).catch(t=>{this.toast(t,"error")})},updateExtension(n){this.loadingDialog.show=!0,m.post("/api/plugin/update",{name:n}).then(t=>{if(t.data.status==="error"){this.onLoadingDialogResult(2,t.data.message);return}this.extension_data.data=t.data.data,console.log(this.extension_data),this.onLoadingDialogResult(1,t.data.message),this.dialog=!1,this.$refs.wfr.check()}).catch(t=>{this.toast(t,"error")})},openExtensionConfig(n){this.curr_namespace=n,this.configDialog=!0,m.get("/api/config/get?namespace="+n).then(t=>{this.extension_config=t.data.data,console.log(this.extension_config)}).catch(t=>{this.toast(t,"error")})},updateConfig(){m.post("/api/config/plugin/update",{config:this.extension_config,namespace:this.curr_namespace}).then(n=>{n.data.status==="ok"?(this.toast(n.data.message,"success"),this.$refs.wfr.check()):this.toast(n.data.message,"error")}).catch(n=>{this.toast(n,"error")})},fetchPluginCollection(){let n="https://soulter.github.io/AstrBot_Plugins_Collection/plugins.json";m.get(n).then(t=>{let o=[];this.pluginMarketDataOrigin=t.data;for(let l in t.data)o.push({name:l,desc:t.data[l].desc,author:t.data[l].author,repo:t.data[l].repo,installed:!1});this.pluginMarketData=o,this.checkAlreadyInstalled()}).catch(t=>{this.toast("获取插件市场数据失败: "+t,"error")})},checkAlreadyInstalled(){for(let n=0;n(i(),c(f,null,[a(b,null,{default:e(()=>[a(W,{style:{margin:"16px"},text:"1. 如果因为网络问题安装失败,可以前往 配置->其他配置->插件仓库镜像 修改安装镜像源。2. 如需插件帮助请点击 `仓库` 查看 README",title:"💡小提示",type:"info",variant:"tonal"}),a(_,{cols:"12",md:"12"},{default:e(()=>[X]),_:1}),(i(!0),c(f,null,x(t.extension_data.data,l=>(i(),r(_,{cols:"12",md:"6",lg:"4"},{default:e(()=>[(i(),r(L,{key:l.name,title:l.name,link:l.repo,style:{"margin-bottom":"4px"}},{default:e(()=>[d("p",tt,p(l.desc),1),d("div",at,[a(D,null,{default:e(()=>[u("mdi-account")]),_:1}),d("span",null,p(l.author),1),a(k),a(g,{variant:"plain",onClick:s=>t.openExtensionConfig(l.name)},{default:e(()=>[u("配置")]),_:2},1032,["onClick"]),a(g,{variant:"plain",onClick:s=>t.updateExtension(l.name)},{default:e(()=>[u("更新")]),_:2},1032,["onClick"]),a(g,{variant:"plain",onClick:s=>t.uninstallExtension(l.name)},{default:e(()=>[u("卸载")]),_:2},1032,["onClick"])])]),_:2},1032,["title","link"]))]),_:2},1024))),256)),a(_,{cols:"12",md:"12"},{default:e(()=>[et]),_:1}),(i(!0),c(f,null,x(t.pluginMarketData,l=>(i(),r(_,{cols:"12",md:"6",lg:"4"},{default:e(()=>[(i(),r(L,{key:l.name,title:l.name,link:l.repo,style:{"margin-bottom":"4px"}},{default:e(()=>[d("p",lt,p(l.desc),1),d("div",nt,[a(D,null,{default:e(()=>[u("mdi-account")]),_:1}),d("span",null,p(l.author),1),a(k),l.installed?(i(),r(g,{key:1,variant:"plain",disabled:""},{default:e(()=>[u("已安装")]),_:1})):(i(),r(g,{key:0,variant:"plain",onClick:s=>{t.extension_url=l.repo,t.newExtension()}},{default:e(()=>[u("安装")]),_:2},1032,["onClick"]))])]),_:2},1032,["title","link"]))]),_:2},1024))),256))]),_:1}),a(w,{modelValue:t.configDialog,"onUpdate:modelValue":o[1]||(o[1]=l=>t.configDialog=l),width:"750"},{activator:e(({props:l})=>[]),default:e(()=>[a(C,null,{default:e(()=>[a(V,null,{default:e(()=>[ot]),_:1}),a(y,null,{default:e(()=>[a($,null,{default:e(()=>[a(F,{config:t.extension_config},null,8,["config"])]),_:1})]),_:1}),a(E,null,{default:e(()=>[a(k),a(g,{color:"blue-darken-1",variant:"text",onClick:t.updateConfig},{default:e(()=>[u(" 保存并关闭 ")]),_:1},8,["onClick"]),a(g,{color:"blue-darken-1",variant:"text",onClick:o[0]||(o[0]=l=>t.configDialog=!1)},{default:e(()=>[u(" 关闭 ")]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),a(w,{modelValue:t.dialog,"onUpdate:modelValue":o[6]||(o[6]=l=>t.dialog=l),persistent:"",width:"700"},{activator:e(({props:l})=>[a(g,B(l,{icon:"mdi-plus",size:"x-large",style:{position:"fixed",right:"52px",bottom:"52px"},color:"darkprimary"}),null,16)]),default:e(()=>[a(C,null,{default:e(()=>[a(V,null,{default:e(()=>[st]),_:1}),a(y,null,{default:e(()=>[a($,null,{default:e(()=>[a(b,null,{default:e(()=>[it,a(_,{cols:"12"},{default:e(()=>[dt,a(M,{label:"仓库链接",modelValue:t.extension_url,"onUpdate:modelValue":o[2]||(o[2]=l=>t.extension_url=l),variant:"outlined",required:""},null,8,["modelValue"])]),_:1})]),_:1}),a(b,null,{default:e(()=>[ut,a(_,{cols:"12"},{default:e(()=>[rt,a(Z,{label:"选择文件",modelValue:t.upload_file,"onUpdate:modelValue":o[3]||(o[3]=l=>t.upload_file=l),accept:".zip",outlined:"",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),gt,d("small",null,p(t.status),1)]),_:1}),a(E,null,{default:e(()=>[a(k),a(g,{color:"blue-darken-1",variant:"text",onClick:o[4]||(o[4]=l=>t.dialog=!1)},{default:e(()=>[u(" 关闭 ")]),_:1}),a(g,{color:"blue-darken-1",variant:"text",loading:t.loading_,onClick:o[5]||(o[5]=l=>t.newExtension())},{default:e(()=>[u(" 安装 ")]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),a(w,{modelValue:t.loadingDialog.show,"onUpdate:modelValue":o[8]||(o[8]=l=>t.loadingDialog.show=l),width:"500",persistent:""},{default:e(()=>[a(C,null,{default:e(()=>[a(V,null,{default:e(()=>[d("span",pt,p(t.loadingDialog.title),1)]),_:1}),a(y,null,{default:e(()=>[a($,null,{default:e(()=>[a(b,null,{default:e(()=>[a(_,{cols:"12"},{default:e(()=>[t.loadingDialog.statusCode===0?(i(),r(J,{key:0,indeterminate:"",color:"primary"})):v("",!0)]),_:1})]),_:1}),t.loadingDialog.statusCode!==0?(i(),c("div",ht,[t.loadingDialog.statusCode===1?(i(),r(D,{key:0,class:"mb-6",color:"success",icon:"mdi-check-circle-outline",size:"128"})):v("",!0),t.loadingDialog.statusCode===2?(i(),r(D,{key:1,class:"mb-6",color:"error",icon:"mdi-alert-circle-outline",size:"128"})):v("",!0),d("div",ct,p(t.loadingDialog.result),1)])):v("",!0)]),_:1})]),_:1}),a(E,null,{default:e(()=>[a(k),a(g,{color:"blue-darken-1",variant:"text",onClick:o[7]||(o[7]=l=>t.loadingDialog.show=!1)},{default:e(()=>[u(" 关闭 ")]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),a(O,{timeout:2e3,elevation:"24",color:t.snack_success,modelValue:t.snack_show,"onUpdate:modelValue":o[9]||(o[9]=l=>t.snack_show=l)},{default:e(()=>[u(p(t.snack_message),1)]),_:1},8,["color","modelValue"]),a(P,{ref:"wfr"},null,512)],64))}});export{Vt as default}; diff --git a/dashboard/dist/assets/FineTunePage-1bb5ec2e.js b/dashboard/dist/assets/FineTunePage-ccc77380.js similarity index 91% rename from dashboard/dist/assets/FineTunePage-1bb5ec2e.js rename to dashboard/dist/assets/FineTunePage-ccc77380.js index cf7c2c5fa..3ddecbbc5 100644 --- a/dashboard/dist/assets/FineTunePage-1bb5ec2e.js +++ b/dashboard/dist/assets/FineTunePage-ccc77380.js @@ -1 +1 @@ -import{_ as n}from"./_plugin-vue_export-helper-c27b6911.js";import{o as t,c as a,w as l,B as o,b as s,D as c,n as e}from"./index-3360c831.js";const r={},u=e("div",{style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"24px"}},[e("h3",null,"即将支持。"),e("p",null,"AstrBot 将会支持使用消息记录微调 LLM,并强化人格功能,包括但不限于:"),e("ul",null,[e("li",null,"更像人类的回答"),e("li",null,"长期记忆"),e("li",null,"表情包理解与回复"),e("li",null,"基于兴趣的主动话题展开")])],-1);function i(d,_){return t(),a(o,null,{default:l(()=>[s(c,null,{default:l(()=>[u]),_:1})]),_:1})}const x=n(r,[["render",i]]);export{x as default}; +import{_ as n}from"./_plugin-vue_export-helper-c27b6911.js";import{o as t,c as a,w as l,B as o,b as s,D as c,n as e}from"./index-59964cc6.js";const r={},u=e("div",{style:{display:"flex","flex-direction":"column","justify-content":"center",padding:"24px"}},[e("h3",null,"即将支持。"),e("p",null,"AstrBot 将会支持使用消息记录微调 LLM,并强化人格功能,包括但不限于:"),e("ul",null,[e("li",null,"更像人类的回答"),e("li",null,"长期记忆"),e("li",null,"表情包理解与回复"),e("li",null,"基于兴趣的主动话题展开")])],-1);function i(d,_){return t(),a(o,null,{default:l(()=>[s(c,null,{default:l(()=>[u]),_:1})]),_:1})}const x=n(r,[["render",i]]);export{x as default}; diff --git a/dashboard/dist/assets/FullLayout-695e0d90.js b/dashboard/dist/assets/FullLayout-1f7c066a.js similarity index 98% rename from dashboard/dist/assets/FullLayout-695e0d90.js rename to dashboard/dist/assets/FullLayout-1f7c066a.js index f93a048fd..bca17efe4 100644 --- a/dashboard/dist/assets/FullLayout-695e0d90.js +++ b/dashboard/dist/assets/FullLayout-1f7c066a.js @@ -1 +1 @@ -import{d as J,o as v,c as V,a as K,w as t,b as e,V as O,e as d,t as w,f as B,g as D,h as Q,i as X,j as Y,k as A,s as Z,l as T,r as ee,F as te,m as ae,n as o,u as i,p as le,q as x,v as h,x as L,y as p,z as k,A as P,B as U,C as M,D as F,E as I,G as se,H as z,I as b,J as $,K as q,L as ie,M as oe,N as ne,O as de,P as re,Q as ue,R as me,S as ce,T as fe}from"./index-3360c831.js";import{m as H}from"./md5-f9642456.js";const y={Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,fontTheme:"Roboto",inputBg:!1},E=J({id:"customizer",state:()=>({Sidebar_drawer:y.Sidebar_drawer,Customizer_drawer:y.Customizer_drawer,mini_sidebar:y.mini_sidebar,fontTheme:"Poppins",inputBg:y.inputBg}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(a){this.mini_sidebar=a},SET_FONT(a){this.fontTheme=a}}}),pe=[{title:"面板",icon:"mdi-view-dashboard",to:"/dashboard/default"},{title:"配置",icon:"mdi-cog",to:"/config"},{title:"插件",icon:"mdi-puzzle",to:"/extension"},{title:"控制台",icon:"mdi-console",to:"/console"},{title:"模型微调",icon:"mdi-grain",to:"/fine-tune"}],W={__name:"NavItem",props:{item:Object,level:Number},setup(a){return(c,r)=>(v(),V(Y,{to:a.item.type==="external"?"":a.item.to,href:a.item.type==="external"?a.item.to:"",rounded:"",class:"mb-1",color:"secondary",disabled:a.item.disabled,target:a.item.type==="external"?"_blank":""},K({prepend:t(()=>[a.item.icon?(v(),V(B,{key:0,size:a.item.iconSize,class:"hide-menu",icon:a.item.icon},null,8,["size","icon"])):D("",!0)]),default:t(()=>[e(Q,null,{default:t(()=>[d(w(a.item.title),1)]),_:1}),a.item.subCaption?(v(),V(X,{key:0,class:"text-caption mt-n1 hide-menu"},{default:t(()=>[d(w(a.item.subCaption),1)]),_:1})):D("",!0)]),_:2},[a.item.chip?{name:"append",fn:t(()=>[e(O,{color:a.item.chipColor,class:"sidebarchip hide-menu",size:a.item.chipIcon?"small":"default",variant:a.item.chipVariant,"prepend-icon":a.item.chipIcon},{default:t(()=>[d(w(a.item.chip),1)]),_:1},8,["color","size","variant","prepend-icon"])]),key:"0"}:void 0]),1032,["to","href","disabled","target"]))}},ve={class:"text-center"},he={name:"VerticalSidebar",components:{NavItem:W},data:()=>({version:"-"}),mounted(){this.get_version()},methods:{get_version(){x.get("/api/stat/version").then(a=>{this.version=a.data.data.version}).catch(a=>{console.log(a)})}}},_e=A({...he,setup(a){const c=E(),r=Z(pe);return(f,u)=>(v(),V(le,{left:"",modelValue:i(c).Sidebar_drawer,"onUpdate:modelValue":u[0]||(u[0]=m=>i(c).Sidebar_drawer=m),elevation:"0","rail-width":"80","mobile-breakpoint":"960",app:"",class:"leftSidebar",rail:i(c).mini_sidebar},{default:t(()=>[e(ae,{class:"pa-4 listitem",style:{height:"auto"}},{default:t(()=>[(v(!0),T(te,null,ee(r.value,(m,g)=>(v(),V(W,{key:g,item:m,class:"leftPadding"},null,8,["item"]))),128))]),_:1}),o("div",ve,[e(O,{color:"inputBorder",size:"small"},{default:t(()=>[d(" v"+w(f.version),1)]),_:1})])]),_:1},8,["modelValue","rail"]))}}),be=o("span",{style:{"margin-left":"16px","font-size":"24px","font-weight":"1000"}},[d("Astr"),o("span",{style:{"font-weight":"normal"}},"Bot")],-1),Ve={class:"mr-4"},ge={key:0},we={key:1},Se=o("span",{class:"text-h5"},"更新项目",-1),ye=o("h3",{class:"mb-4"},"升级到最新版本",-1),xe={style:{"margin-top":"16px"}},Ce=o("h3",{class:"mb-4"},"切换到指定版本或指定提交",-1),ke=o("div",{class:"mb-4"},[o("small",null,"如 v3.3.16 (不带 SHA) 或 42e5ec5d80b93b6bfe8b566754d45ffac4c3fe0b"),o("br"),o("a",{href:"https://github.com/Soulter/AstrBot/commits/master"},[o("small",null,"查看 master 分支提交记录(点击右边的 copy 即可复制)")])],-1),ze=o("span",{class:"text-h5"},"密码修改",-1),Be=o("small",null,"如果是第一次修改密码,原密码请留空。",-1),Te=o("br",null,null,-1),Ie=A({__name:"VerticalHeader",setup(a){const c=E();h(!1);let r=h(!1),f=h(!1),u=h(""),m=h(""),g=h(""),_=h(""),C=h(!1),S=h("");const j=n=>{window.open(n,"_blank")};function G(){u.value!=""&&(u.value=H.md5(u.value)),m.value=H.md5(m.value),x.post("/api/auth/password/reset",{password:u.value,new_password:m.value}).then(n=>{if(n.data.status=="error"){g.value=n.data.message,u.value="",m.value="";return}r.value=!r.value,g.value=n.data.message,setTimeout(()=>{de().logout()},1e3)}).catch(n=>{console.log(n),g.value=n,u.value="",m.value=""})}function R(){_.value="正在检查更新...",x.get("/api/update/check").then(n=>{C.value=n.data.data.has_new_version,_.value=n.data.message}).catch(n=>{console.log(n),_.value=n})}function N(n){_.value="正在切换版本...",x.post("/api/update/do",{version:n}).then(l=>{_.value=l.data.message,l.data.status=="success"&&setTimeout(()=>{window.location.reload()},1e3)}).catch(l=>{console.log(l),_.value=l})}return R(),(n,l)=>(v(),V(ne,{elevation:"0",height:"70"},{default:t(()=>[e(p,{style:{"margin-left":"22px"},class:"hidden-md-and-down text-secondary",color:"lightsecondary",icon:"",rounded:"sm",variant:"flat",onClick:l[0]||(l[0]=L(s=>i(c).SET_MINI_SIDEBAR(!i(c).mini_sidebar),["stop"])),size:"small"},{default:t(()=>[e(B,null,{default:t(()=>[d("mdi-menu")]),_:1})]),_:1}),e(p,{class:"hidden-lg-and-up text-secondary ms-3",color:"lightsecondary",icon:"",rounded:"sm",variant:"flat",onClick:L(i(c).SET_SIDEBAR_DRAWER,["stop"]),size:"small"},{default:t(()=>[e(B,null,{default:t(()=>[d("mdi-menu")]),_:1})]),_:1},8,["onClick"]),be,e(k),o("div",Ve,[i(C)?(v(),T("small",ge," 有新版本! ")):(v(),T("small",we," 当前版本已是最新 "))]),e(q,{modelValue:i(f),"onUpdate:modelValue":l[5]||(l[5]=s=>b(f)?f.value=s:f=s),width:"700"},{activator:t(({props:s})=>[e(p,P({onClick:R,class:"text-primary mr-4",color:"lightprimary",variant:"flat",rounded:"sm"},s),{default:t(()=>[d(" 更新 🔄 ")]),_:2},1040)]),default:t(()=>[e(U,null,{default:t(()=>[e(M,null,{default:t(()=>[Se]),_:1}),e(F,null,{default:t(()=>[e(I,null,{default:t(()=>[ye,o("p",null,w(i(_)),1),e(p,{class:"mt-4 mb-4",onClick:l[1]||(l[1]=s=>N("latest")),color:"primary",style:{"border-radius":"10px"},disabled:!i(C)},{default:t(()=>[d(" 更新到最新版本 ")]),_:1},8,["disabled"]),e(se),o("div",xe,[Ce,e(z,{label:"输入版本号或 master 分支下的 commit hash。",modelValue:i(S),"onUpdate:modelValue":l[2]||(l[2]=s=>b(S)?S.value=s:S=s),required:"",variant:"outlined"},null,8,["modelValue"]),ke,e(p,{color:"error",style:{"border-radius":"10px"},onClick:l[3]||(l[3]=s=>N(i(S)))},{default:t(()=>[d(" 确定切换 ")]),_:1})])]),_:1})]),_:1}),e($,null,{default:t(()=>[e(k),e(p,{color:"blue-darken-1",variant:"text",onClick:l[4]||(l[4]=s=>b(f)?f.value=!1:f=!1)},{default:t(()=>[d(" 关闭 ")]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(q,{modelValue:i(r),"onUpdate:modelValue":l[9]||(l[9]=s=>b(r)?r.value=s:r=s),persistent:"",width:"700"},{activator:t(({props:s})=>[e(p,P({class:"text-primary mr-4",color:"lightprimary",variant:"flat",rounded:"sm"},s),{default:t(()=>[d(" 密码修改 📰 ")]),_:2},1040)]),default:t(()=>[e(U,null,{default:t(()=>[e(M,null,{default:t(()=>[ze]),_:1}),e(F,null,{default:t(()=>[e(I,null,{default:t(()=>[e(ie,null,{default:t(()=>[e(oe,{cols:"12"},{default:t(()=>[e(z,{label:"原密码*",type:"password",modelValue:i(u),"onUpdate:modelValue":l[6]||(l[6]=s=>b(u)?u.value=s:u=s),required:"",variant:"outlined"},null,8,["modelValue"]),e(z,{label:"新密码*",type:"password",modelValue:i(m),"onUpdate:modelValue":l[7]||(l[7]=s=>b(m)?m.value=s:m=s),required:"",variant:"outlined"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),Be,Te,o("small",null,w(i(g)),1)]),_:1}),e($,null,{default:t(()=>[e(k),e(p,{color:"blue-darken-1",variant:"text",onClick:l[8]||(l[8]=s=>b(r)?r.value=!1:r=!1)},{default:t(()=>[d(" 关闭 ")]),_:1}),e(p,{color:"blue-darken-1",variant:"text",onClick:G},{default:t(()=>[d(" 提交 ")]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(p,{class:"text-primary mr-4",onClick:l[10]||(l[10]=s=>j("https://github.com/Soulter/AstrBot")),color:"lightprimary",variant:"flat",rounded:"sm"},{default:t(()=>[d(" GitHub Star! 🌟 ")]),_:1})]),_:1}))}}),Re=A({__name:"FullLayout",setup(a){const c=E();return(r,f)=>(v(),V(ce,null,{default:t(()=>[e(me,{theme:"PurpleTheme",class:ue([i(c).fontTheme,i(c).mini_sidebar?"mini-sidebar":"",i(c).inputBg?"inputWithbg":""])},{default:t(()=>[e(Ie),e(_e),e(re,null,{default:t(()=>[e(I,{fluid:"",class:"page-wrapper"},{default:t(()=>[o("div",null,[e(i(fe))])]),_:1})]),_:1})]),_:1},8,["class"])]),_:1}))}});export{Re as default}; +import{d as J,o as v,c as V,a as K,w as t,b as e,V as O,e as d,t as w,f as B,g as D,h as Q,i as X,j as Y,k as A,s as Z,l as T,r as ee,F as te,m as ae,n as o,u as i,p as le,q as x,v as h,x as L,y as p,z as k,A as P,B as U,C as M,D as F,E as I,G as se,H as z,I as b,J as $,K as q,L as ie,M as oe,N as ne,O as de,P as re,Q as ue,R as me,S as ce,T as fe}from"./index-59964cc6.js";import{m as H}from"./md5-7290f9de.js";const y={Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,fontTheme:"Roboto",inputBg:!1},E=J({id:"customizer",state:()=>({Sidebar_drawer:y.Sidebar_drawer,Customizer_drawer:y.Customizer_drawer,mini_sidebar:y.mini_sidebar,fontTheme:"Poppins",inputBg:y.inputBg}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(a){this.mini_sidebar=a},SET_FONT(a){this.fontTheme=a}}}),pe=[{title:"面板",icon:"mdi-view-dashboard",to:"/dashboard/default"},{title:"配置",icon:"mdi-cog",to:"/config"},{title:"插件",icon:"mdi-puzzle",to:"/extension"},{title:"控制台",icon:"mdi-console",to:"/console"},{title:"模型微调",icon:"mdi-grain",to:"/fine-tune"}],W={__name:"NavItem",props:{item:Object,level:Number},setup(a){return(c,r)=>(v(),V(Y,{to:a.item.type==="external"?"":a.item.to,href:a.item.type==="external"?a.item.to:"",rounded:"",class:"mb-1",color:"secondary",disabled:a.item.disabled,target:a.item.type==="external"?"_blank":""},K({prepend:t(()=>[a.item.icon?(v(),V(B,{key:0,size:a.item.iconSize,class:"hide-menu",icon:a.item.icon},null,8,["size","icon"])):D("",!0)]),default:t(()=>[e(Q,null,{default:t(()=>[d(w(a.item.title),1)]),_:1}),a.item.subCaption?(v(),V(X,{key:0,class:"text-caption mt-n1 hide-menu"},{default:t(()=>[d(w(a.item.subCaption),1)]),_:1})):D("",!0)]),_:2},[a.item.chip?{name:"append",fn:t(()=>[e(O,{color:a.item.chipColor,class:"sidebarchip hide-menu",size:a.item.chipIcon?"small":"default",variant:a.item.chipVariant,"prepend-icon":a.item.chipIcon},{default:t(()=>[d(w(a.item.chip),1)]),_:1},8,["color","size","variant","prepend-icon"])]),key:"0"}:void 0]),1032,["to","href","disabled","target"]))}},ve={class:"text-center"},he={name:"VerticalSidebar",components:{NavItem:W},data:()=>({version:"-"}),mounted(){this.get_version()},methods:{get_version(){x.get("/api/stat/version").then(a=>{this.version=a.data.data.version}).catch(a=>{console.log(a)})}}},_e=A({...he,setup(a){const c=E(),r=Z(pe);return(f,u)=>(v(),V(le,{left:"",modelValue:i(c).Sidebar_drawer,"onUpdate:modelValue":u[0]||(u[0]=m=>i(c).Sidebar_drawer=m),elevation:"0","rail-width":"80","mobile-breakpoint":"960",app:"",class:"leftSidebar",rail:i(c).mini_sidebar},{default:t(()=>[e(ae,{class:"pa-4 listitem",style:{height:"auto"}},{default:t(()=>[(v(!0),T(te,null,ee(r.value,(m,g)=>(v(),V(W,{key:g,item:m,class:"leftPadding"},null,8,["item"]))),128))]),_:1}),o("div",ve,[e(O,{color:"inputBorder",size:"small"},{default:t(()=>[d(" v"+w(f.version),1)]),_:1})])]),_:1},8,["modelValue","rail"]))}}),be=o("span",{style:{"margin-left":"16px","font-size":"24px","font-weight":"1000"}},[d("Astr"),o("span",{style:{"font-weight":"normal"}},"Bot")],-1),Ve={class:"mr-4"},ge={key:0},we={key:1},Se=o("span",{class:"text-h5"},"更新项目",-1),ye=o("h3",{class:"mb-4"},"升级到最新版本",-1),xe={style:{"margin-top":"16px"}},Ce=o("h3",{class:"mb-4"},"切换到指定版本或指定提交",-1),ke=o("div",{class:"mb-4"},[o("small",null,"如 v3.3.16 (不带 SHA) 或 42e5ec5d80b93b6bfe8b566754d45ffac4c3fe0b"),o("br"),o("a",{href:"https://github.com/Soulter/AstrBot/commits/master"},[o("small",null,"查看 master 分支提交记录(点击右边的 copy 即可复制)")])],-1),ze=o("span",{class:"text-h5"},"密码修改",-1),Be=o("small",null,"如果是第一次修改密码,原密码请留空。",-1),Te=o("br",null,null,-1),Ie=A({__name:"VerticalHeader",setup(a){const c=E();h(!1);let r=h(!1),f=h(!1),u=h(""),m=h(""),g=h(""),_=h(""),C=h(!1),S=h("");const j=n=>{window.open(n,"_blank")};function G(){u.value!=""&&(u.value=H.md5(u.value)),m.value=H.md5(m.value),x.post("/api/auth/password/reset",{password:u.value,new_password:m.value}).then(n=>{if(n.data.status=="error"){g.value=n.data.message,u.value="",m.value="";return}r.value=!r.value,g.value=n.data.message,setTimeout(()=>{de().logout()},1e3)}).catch(n=>{console.log(n),g.value=n,u.value="",m.value=""})}function R(){_.value="正在检查更新...",x.get("/api/update/check").then(n=>{C.value=n.data.data.has_new_version,_.value=n.data.message}).catch(n=>{console.log(n),_.value=n})}function N(n){_.value="正在切换版本...",x.post("/api/update/do",{version:n}).then(l=>{_.value=l.data.message,l.data.status=="success"&&setTimeout(()=>{window.location.reload()},1e3)}).catch(l=>{console.log(l),_.value=l})}return R(),(n,l)=>(v(),V(ne,{elevation:"0",height:"70"},{default:t(()=>[e(p,{style:{"margin-left":"22px"},class:"hidden-md-and-down text-secondary",color:"lightsecondary",icon:"",rounded:"sm",variant:"flat",onClick:l[0]||(l[0]=L(s=>i(c).SET_MINI_SIDEBAR(!i(c).mini_sidebar),["stop"])),size:"small"},{default:t(()=>[e(B,null,{default:t(()=>[d("mdi-menu")]),_:1})]),_:1}),e(p,{class:"hidden-lg-and-up text-secondary ms-3",color:"lightsecondary",icon:"",rounded:"sm",variant:"flat",onClick:L(i(c).SET_SIDEBAR_DRAWER,["stop"]),size:"small"},{default:t(()=>[e(B,null,{default:t(()=>[d("mdi-menu")]),_:1})]),_:1},8,["onClick"]),be,e(k),o("div",Ve,[i(C)?(v(),T("small",ge," 有新版本! ")):(v(),T("small",we," 当前版本已是最新 "))]),e(q,{modelValue:i(f),"onUpdate:modelValue":l[5]||(l[5]=s=>b(f)?f.value=s:f=s),width:"700"},{activator:t(({props:s})=>[e(p,P({onClick:R,class:"text-primary mr-4",color:"lightprimary",variant:"flat",rounded:"sm"},s),{default:t(()=>[d(" 更新 🔄 ")]),_:2},1040)]),default:t(()=>[e(U,null,{default:t(()=>[e(M,null,{default:t(()=>[Se]),_:1}),e(F,null,{default:t(()=>[e(I,null,{default:t(()=>[ye,o("p",null,w(i(_)),1),e(p,{class:"mt-4 mb-4",onClick:l[1]||(l[1]=s=>N("latest")),color:"primary",style:{"border-radius":"10px"},disabled:!i(C)},{default:t(()=>[d(" 更新到最新版本 ")]),_:1},8,["disabled"]),e(se),o("div",xe,[Ce,e(z,{label:"输入版本号或 master 分支下的 commit hash。",modelValue:i(S),"onUpdate:modelValue":l[2]||(l[2]=s=>b(S)?S.value=s:S=s),required:"",variant:"outlined"},null,8,["modelValue"]),ke,e(p,{color:"error",style:{"border-radius":"10px"},onClick:l[3]||(l[3]=s=>N(i(S)))},{default:t(()=>[d(" 确定切换 ")]),_:1})])]),_:1})]),_:1}),e($,null,{default:t(()=>[e(k),e(p,{color:"blue-darken-1",variant:"text",onClick:l[4]||(l[4]=s=>b(f)?f.value=!1:f=!1)},{default:t(()=>[d(" 关闭 ")]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(q,{modelValue:i(r),"onUpdate:modelValue":l[9]||(l[9]=s=>b(r)?r.value=s:r=s),persistent:"",width:"700"},{activator:t(({props:s})=>[e(p,P({class:"text-primary mr-4",color:"lightprimary",variant:"flat",rounded:"sm"},s),{default:t(()=>[d(" 密码修改 📰 ")]),_:2},1040)]),default:t(()=>[e(U,null,{default:t(()=>[e(M,null,{default:t(()=>[ze]),_:1}),e(F,null,{default:t(()=>[e(I,null,{default:t(()=>[e(ie,null,{default:t(()=>[e(oe,{cols:"12"},{default:t(()=>[e(z,{label:"原密码*",type:"password",modelValue:i(u),"onUpdate:modelValue":l[6]||(l[6]=s=>b(u)?u.value=s:u=s),required:"",variant:"outlined"},null,8,["modelValue"]),e(z,{label:"新密码*",type:"password",modelValue:i(m),"onUpdate:modelValue":l[7]||(l[7]=s=>b(m)?m.value=s:m=s),required:"",variant:"outlined"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),Be,Te,o("small",null,w(i(g)),1)]),_:1}),e($,null,{default:t(()=>[e(k),e(p,{color:"blue-darken-1",variant:"text",onClick:l[8]||(l[8]=s=>b(r)?r.value=!1:r=!1)},{default:t(()=>[d(" 关闭 ")]),_:1}),e(p,{color:"blue-darken-1",variant:"text",onClick:G},{default:t(()=>[d(" 提交 ")]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(p,{class:"text-primary mr-4",onClick:l[10]||(l[10]=s=>j("https://github.com/Soulter/AstrBot")),color:"lightprimary",variant:"flat",rounded:"sm"},{default:t(()=>[d(" GitHub Star! 🌟 ")]),_:1})]),_:1}))}}),Re=A({__name:"FullLayout",setup(a){const c=E();return(r,f)=>(v(),V(ce,null,{default:t(()=>[e(me,{theme:"PurpleTheme",class:ue([i(c).fontTheme,i(c).mini_sidebar?"mini-sidebar":"",i(c).inputBg?"inputWithbg":""])},{default:t(()=>[e(Ie),e(_e),e(re,null,{default:t(()=>[e(I,{fluid:"",class:"page-wrapper"},{default:t(()=>[o("div",null,[e(i(fe))])]),_:1})]),_:1})]),_:1},8,["class"])]),_:1}))}});export{Re as default}; diff --git a/dashboard/dist/assets/LoginPage-81777e38.js b/dashboard/dist/assets/LoginPage-6ceceb71.js similarity index 99% rename from dashboard/dist/assets/LoginPage-81777e38.js rename to dashboard/dist/assets/LoginPage-6ceceb71.js index 2c50f2f19..2e3523073 100644 --- a/dashboard/dist/assets/LoginPage-81777e38.js +++ b/dashboard/dist/assets/LoginPage-6ceceb71.js @@ -1,4 +1,4 @@ -import{k as Ie,al as we,am as yt,a8 as gt,v as T,an as Te,X as w,u as B,ab as X,a9 as bt,I as Ce,a7 as Be,ao as _t,ap as Ot,aq as Vt,ar as q,s as St,o as Ne,c as Et,w as oe,b as x,H as $e,e as He,y as At,l as Qe,t as jt,a3 as wt,g as Ft,n as ge,O as Pt,U as Tt,D as Ct,B as Bt}from"./index-3360c831.js";import{a as Nt}from"./md5-f9642456.js";/** +import{k as Ie,al as we,am as yt,a8 as gt,v as T,an as Te,X as w,u as B,ab as X,a9 as bt,I as Ce,a7 as Be,ao as _t,ap as Ot,aq as Vt,ar as q,s as St,o as Ne,c as Et,w as oe,b as x,H as $e,e as He,y as At,l as Qe,t as jt,a3 as wt,g as Ft,n as ge,O as Pt,U as Tt,D as Ct,B as Bt}from"./index-59964cc6.js";import{a as Nt}from"./md5-7290f9de.js";/** * vee-validate v4.11.3 * (c) 2023 Abdelrahman Awad * @license MIT diff --git a/dashboard/dist/assets/WaitingForRestart-47f65a77.js b/dashboard/dist/assets/WaitingForRestart-47f65a77.js new file mode 100644 index 000000000..4858cb475 --- /dev/null +++ b/dashboard/dist/assets/WaitingForRestart-47f65a77.js @@ -0,0 +1 @@ +import{q as c,o as e,c as u,w as a,b as s,B as T,C as d,e as _,D as p,a5 as w,n as l,l as r,f,g as o,t as n,K as S}from"./index-59964cc6.js";import{_ as g}from"./_plugin-vue_export-helper-c27b6911.js";const V={name:"WaitingForRestart",data(){return{visible:!1,startTime:-1,newStartTime:-1,status:"",cnt:0}},methods:{async check(){this.newStartTime=-1,this.startTime=-1,this.visible=!0,this.status="",console.log("start wfr"),await this.getStartTime(),setTimeout(()=>{this.timeoutInternal()},1e3)},timeoutInternal(){console.log("wfr: timeoutInternal",this.newStartTime,this.startTime),this.newStartTime===-1&&this.cnt<10&&this.visible?(this.checkStartTime(),this.cnt++,setTimeout(()=>{this.timeoutInternal()},1e3)):(this.cnt==10&&(this.status="拉取状态达到最大次数,请手动检查。"),this.cnt=0,setTimeout(()=>{this.visible=!1},1e3))},async getStartTime(){c.get("/api/stat/start-time",{timeout:3e3}).then(i=>{this.startTime=i.data.data.start_time})},async checkStartTime(){let i=await c.get("/api/stat/start-time",{timeout:3e3});return this.newStartTime=i.data.data.start_time,console.log("wfr: checkStartTime",this.newStartTime,this.startTime),this.newStartTime!==this.startTime&&(console.log("wfr: restarted"),setTimeout(()=>{this.visible=!1,window.location.reload()},2e3)),this.newStartTime}}},k={style:{"margin-top":"16px"}},y={key:0,class:"py-12 text-center"},x=l("p",null,"重启成功!",-1),b={key:1},v={key:2},B={key:3};function C(i,m,I,N,t,D){return e(),u(S,{modelValue:t.visible,"onUpdate:modelValue":m[0]||(m[0]=h=>t.visible=h),persistent:"","max-width":"400"},{default:a(()=>[s(T,null,{default:a(()=>[s(d,null,{default:a(()=>[_("正在等待 AstrBot 重启...")]),_:1}),s(p,null,{default:a(()=>[s(w,{indeterminate:"",color:"primary"}),l("div",k,[t.newStartTime!=-1?(e(),r("div",y,[s(f,{class:"mb-6",color:"success",icon:"mdi-check-circle-outline",size:"128"}),x])):o("",!0),t.startTime!=-1?(e(),r("p",b,"当前实例标识:"+n(t.startTime),1)):o("",!0),t.newStartTime!=-1?(e(),r("p",v,"检查到新实例:"+n(t.newStartTime)+",即将自动刷新页面",1)):o("",!0),t.status?(e(),r("p",B,n(t.status),1)):o("",!0),l("p",null,"次数:"+n(t.cnt),1)])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const R=g(V,[["render",C]]);export{R as W}; diff --git a/dashboard/dist/assets/WaitingForRestart-dd7c3e40.js b/dashboard/dist/assets/WaitingForRestart-dd7c3e40.js deleted file mode 100644 index 222a41ce9..000000000 --- a/dashboard/dist/assets/WaitingForRestart-dd7c3e40.js +++ /dev/null @@ -1 +0,0 @@ -import{q as m,o as e,c as u,w as a,b as s,B as d,C as T,e as _,D as p,a5 as f,n as l,l as r,f as w,g as n,t as o,K as S}from"./index-3360c831.js";import{_ as g}from"./_plugin-vue_export-helper-c27b6911.js";const v={name:"WaitingForRestart",data(){return{visible:!1,startTime:-1,newStartTime:-1,status:"",cnt:0,intervalId:null}},methods:{async check(){this.newStartTime=-1,this.startTime=-1,this.visible=!0,this.status="",console.log("start wfr"),await this.getStartTime(),this.intervalId=setInterval(()=>{if(this.newStartTime===-1&&this.cnt<10&&this.visible)this.checkStartTime(),this.cnt++;else{this.cnt==10&&(this.status="拉取状态达到最大次数,请手动检查。"),this.cnt=0,setTimeout(()=>{this.visible=!1},1e3),clearInterval(this.intervalId);return}},1e3)},async getStartTime(){m.get("/api/stat/start-time").then(i=>{this.startTime=i.data.data.start_time})},async checkStartTime(){let i=await m.get("/api/stat/start-time");this.newStartTime=i.data.data.start_time,console.log("wfr: checkStartTime",this.newStartTime,this.startTime),this.newStartTime!==this.startTime&&(console.log("wfr: restarted"),setTimeout(()=>{this.visible=!1,window.location.reload()},2e3))}}},V={style:{"margin-top":"16px"}},k={key:0,class:"py-12 text-center"},y=l("p",null,"重启成功!",-1),x={key:1},b={key:2},B={key:3};function C(i,c,I,N,t,D){return e(),u(S,{modelValue:t.visible,"onUpdate:modelValue":c[0]||(c[0]=h=>t.visible=h),persistent:"","max-width":"400"},{default:a(()=>[s(d,null,{default:a(()=>[s(T,null,{default:a(()=>[_("正在等待 AstrBot 重启...")]),_:1}),s(p,null,{default:a(()=>[s(f,{indeterminate:"",color:"primary"}),l("div",V,[t.newStartTime!=-1?(e(),r("div",k,[s(w,{class:"mb-6",color:"success",icon:"mdi-check-circle-outline",size:"128"}),y])):n("",!0),t.startTime!=-1?(e(),r("p",x,"当前实例标识:"+o(t.startTime),1)):n("",!0),t.newStartTime!=-1?(e(),r("p",b,"检查到新实例:"+o(t.newStartTime)+",即将自动刷新页面",1)):n("",!0),t.status?(e(),r("p",B,o(t.status),1)):n("",!0),l("p",null,"次数:"+o(t.cnt),1)])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const R=g(v,[["render",C]]);export{R as W}; diff --git a/dashboard/dist/assets/index-3360c831.js b/dashboard/dist/assets/index-59964cc6.js similarity index 99% rename from dashboard/dist/assets/index-3360c831.js rename to dashboard/dist/assets/index-59964cc6.js index e64fbb2d1..4aece1820 100644 --- a/dashboard/dist/assets/index-3360c831.js +++ b/dashboard/dist/assets/index-59964cc6.js @@ -6,7 +6,7 @@ * vue-router v4.2.4 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const zi=typeof window<"u";function l1(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const mt=Object.assign;function _l(e,a){const i={};for(const r in a){const l=a[r];i[r]=Gn(l)?l.map(e):e(l)}return i}const Fs=()=>{},Gn=Array.isArray,c1=/\/$/,u1=e=>e.replace(c1,"");function Rl(e,a,i="/"){let r,l={},u="",f="";const m=a.indexOf("#");let x=a.indexOf("?");return m=0&&(x=-1),x>-1&&(r=a.slice(0,x),u=a.slice(x+1,m>-1?m:a.length),l=e(u)),m>-1&&(r=r||a.slice(0,m),f=a.slice(m,a.length)),r=g1(r??a,i),{fullPath:r+(u&&"?")+u+f,path:r,query:l,hash:f}}function d1(e,a){const i=a.query?e(a.query):"";return a.path+(i&&"?")+i+(a.hash||"")}function Lh(e,a){return!a||!e.toLowerCase().startsWith(a.toLowerCase())?e:e.slice(a.length)||"/"}function h1(e,a,i){const r=a.matched.length-1,l=i.matched.length-1;return r>-1&&r===l&&Ui(a.matched[r],i.matched[l])&&Jv(a.params,i.params)&&e(a.query)===e(i.query)&&a.hash===i.hash}function Ui(e,a){return(e.aliasOf||e)===(a.aliasOf||a)}function Jv(e,a){if(Object.keys(e).length!==Object.keys(a).length)return!1;for(const i in e)if(!f1(e[i],a[i]))return!1;return!0}function f1(e,a){return Gn(e)?_h(e,a):Gn(a)?_h(a,e):e===a}function _h(e,a){return Gn(a)?e.length===a.length&&e.every((i,r)=>i===a[r]):e.length===1&&e[0]===a}function g1(e,a){if(e.startsWith("/"))return e;if(!e)return a;const i=a.split("/"),r=e.split("/"),l=r[r.length-1];(l===".."||l===".")&&r.push("");let u=i.length-1,f,m;for(f=0;f1&&u--;else break;return i.slice(0,u).join("/")+"/"+r.slice(f-(f===r.length?1:0)).join("/")}var Ks;(function(e){e.pop="pop",e.push="push"})(Ks||(Ks={}));var Bs;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Bs||(Bs={}));function v1(e){if(!e)if(zi){const a=document.querySelector("base");e=a&&a.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),u1(e)}const m1=/^[^#]+#/;function p1(e,a){return e.replace(m1,"#")+a}function b1(e,a){const i=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:a.behavior,left:r.left-i.left-(a.left||0),top:r.top-i.top-(a.top||0)}}const Yo=()=>({left:window.pageXOffset,top:window.pageYOffset});function x1(e){let a;if("el"in e){const i=e.el,r=typeof i=="string"&&i.startsWith("#"),l=typeof i=="string"?r?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!l)return;a=b1(l,e)}else a=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(a):window.scrollTo(a.left!=null?a.left:window.pageXOffset,a.top!=null?a.top:window.pageYOffset)}function Rh(e,a){return(history.state?history.state.position-a:-1)+e}const yc=new Map;function y1(e,a){yc.set(e,a)}function w1(e){const a=yc.get(e);return yc.delete(e),a}let S1=()=>location.protocol+"//"+location.host;function Qv(e,a){const{pathname:i,search:r,hash:l}=a,u=e.indexOf("#");if(u>-1){let m=l.includes(e.slice(u))?e.slice(u).length:1,x=l.slice(m);return x[0]!=="/"&&(x="/"+x),Lh(x,"")}return Lh(i,e)+r+l}function k1(e,a,i,r){let l=[],u=[],f=null;const m=({state:E})=>{const _=Qv(e,location),V=i.value,D=a.value;let X=0;if(E){if(i.value=_,a.value=E,f&&f===V){f=null;return}X=D?E.position-D.position:0}else r(_);l.forEach(B=>{B(i.value,V,{delta:X,type:Ks.pop,direction:X?X>0?Bs.forward:Bs.back:Bs.unknown})})};function x(){f=i.value}function w(E){l.push(E);const _=()=>{const V=l.indexOf(E);V>-1&&l.splice(V,1)};return u.push(_),_}function C(){const{history:E}=window;E.state&&E.replaceState(mt({},E.state,{scroll:Yo()}),"")}function A(){for(const E of u)E();u=[],window.removeEventListener("popstate",m),window.removeEventListener("beforeunload",C)}return window.addEventListener("popstate",m),window.addEventListener("beforeunload",C,{passive:!0}),{pauseListeners:x,listen:w,destroy:A}}function Oh(e,a,i,r=!1,l=!1){return{back:e,current:a,forward:i,replaced:r,position:window.history.length,scroll:l?Yo():null}}function C1(e){const{history:a,location:i}=window,r={value:Qv(e,i)},l={value:a.state};l.value||u(r.value,{back:null,current:r.value,forward:null,position:a.length-1,replaced:!0,scroll:null},!0);function u(x,w,C){const A=e.indexOf("#"),E=A>-1?(i.host&&document.querySelector("base")?e:e.slice(A))+x:S1()+e+x;try{a[C?"replaceState":"pushState"](w,"",E),l.value=w}catch(_){console.error(_),i[C?"replace":"assign"](E)}}function f(x,w){const C=mt({},a.state,Oh(l.value.back,x,l.value.forward,!0),w,{position:l.value.position});u(x,C,!0),r.value=x}function m(x,w){const C=mt({},l.value,a.state,{forward:x,scroll:Yo()});u(C.current,C,!0);const A=mt({},Oh(r.value,x,null),{position:C.position+1},w);u(x,A,!1),r.value=x}return{location:r,state:l,push:m,replace:f}}function A1(e){e=v1(e);const a=C1(e),i=k1(e,a.state,a.location,a.replace);function r(u,f=!0){f||i.pauseListeners(),history.go(u)}const l=mt({location:"",base:e,go:r,createHref:p1.bind(null,e)},a,i);return Object.defineProperty(l,"location",{enumerable:!0,get:()=>a.location.value}),Object.defineProperty(l,"state",{enumerable:!0,get:()=>a.state.value}),l}function P1(e){return typeof e=="string"||e&&typeof e=="object"}function em(e){return typeof e=="string"||typeof e=="symbol"}const Ta={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},tm=Symbol("");var Vh;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Vh||(Vh={}));function qi(e,a){return mt(new Error,{type:e,[tm]:!0},a)}function sa(e,a){return e instanceof Error&&tm in e&&(a==null||!!(e.type&a))}const Mh="[^/]+?",E1={sensitive:!1,strict:!1,start:!0,end:!0},T1=/[.+*?^${}()[\]/\\]/g;function I1(e,a){const i=mt({},E1,a),r=[];let l=i.start?"^":"";const u=[];for(const w of e){const C=w.length?[]:[90];i.strict&&!w.length&&(l+="/");for(let A=0;Aa.length?a.length===1&&a[0]===40+40?1:-1:0}function _1(e,a){let i=0;const r=e.score,l=a.score;for(;i0&&a[a.length-1]<0}const R1={type:0,value:""},O1=/[a-zA-Z0-9_]/;function V1(e){if(!e)return[[]];if(e==="/")return[[R1]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function a(_){throw new Error(`ERR (${i})/"${w}": ${_}`)}let i=0,r=i;const l=[];let u;function f(){u&&l.push(u),u=[]}let m=0,x,w="",C="";function A(){w&&(i===0?u.push({type:0,value:w}):i===1||i===2||i===3?(u.length>1&&(x==="*"||x==="+")&&a(`A repeatable param (${w}) must be alone in its segment. eg: '/:ids+.`),u.push({type:1,value:w,regexp:C,repeatable:x==="*"||x==="+",optional:x==="*"||x==="?"})):a("Invalid state to consume buffer"),w="")}function E(){w+=x}for(;m{f(L)}:Fs}function f(C){if(em(C)){const A=r.get(C);A&&(r.delete(C),i.splice(i.indexOf(A),1),A.children.forEach(f),A.alias.forEach(f))}else{const A=i.indexOf(C);A>-1&&(i.splice(A,1),C.record.name&&r.delete(C.record.name),C.children.forEach(f),C.alias.forEach(f))}}function m(){return i}function x(C){let A=0;for(;A=0&&(C.record.path!==i[A].record.path||!nm(C,i[A]));)A++;i.splice(A,0,C),C.record.name&&!Dh(C)&&r.set(C.record.name,C)}function w(C,A){let E,_={},V,D;if("name"in C&&C.name){if(E=r.get(C.name),!E)throw qi(1,{location:C});D=E.record.name,_=mt(Bh(A.params,E.keys.filter(L=>!L.optional).map(L=>L.name)),C.params&&Bh(C.params,E.keys.map(L=>L.name))),V=E.stringify(_)}else if("path"in C)V=C.path,E=i.find(L=>L.re.test(V)),E&&(_=E.parse(V),D=E.record.name);else{if(E=A.name?r.get(A.name):i.find(L=>L.re.test(A.path)),!E)throw qi(1,{location:C,currentLocation:A});D=E.record.name,_=mt({},A.params,C.params),V=E.stringify(_)}const X=[];let B=E;for(;B;)X.unshift(B.record),B=B.parent;return{name:D,path:V,params:_,matched:X,meta:z1(X)}}return e.forEach(C=>u(C)),{addRoute:u,resolve:w,removeRoute:f,getRoutes:m,getRecordMatcher:l}}function Bh(e,a){const i={};for(const r of a)r in e&&(i[r]=e[r]);return i}function B1(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:D1(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function D1(e){const a={},i=e.props||!1;if("component"in e)a.default=i;else for(const r in e.components)a[r]=typeof i=="object"?i[r]:i;return a}function Dh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function z1(e){return e.reduce((a,i)=>mt(a,i.meta),{})}function zh(e,a){const i={};for(const r in e)i[r]=r in a?a[r]:e[r];return i}function nm(e,a){return a.children.some(i=>i===e||nm(e,i))}const am=/#/g,N1=/&/g,H1=/\//g,X1=/=/g,Y1=/\?/g,im=/\+/g,W1=/%5B/g,j1=/%5D/g,sm=/%5E/g,$1=/%60/g,rm=/%7B/g,G1=/%7C/g,om=/%7D/g,U1=/%20/g;function ju(e){return encodeURI(""+e).replace(G1,"|").replace(W1,"[").replace(j1,"]")}function q1(e){return ju(e).replace(rm,"{").replace(om,"}").replace(sm,"^")}function wc(e){return ju(e).replace(im,"%2B").replace(U1,"+").replace(am,"%23").replace(N1,"%26").replace($1,"`").replace(rm,"{").replace(om,"}").replace(sm,"^")}function K1(e){return wc(e).replace(X1,"%3D")}function Z1(e){return ju(e).replace(am,"%23").replace(Y1,"%3F")}function J1(e){return e==null?"":Z1(e).replace(H1,"%2F")}function ro(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Q1(e){const a={};if(e===""||e==="?")return a;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let l=0;lu&&wc(u)):[r&&wc(r)]).forEach(u=>{u!==void 0&&(a+=(a.length?"&":"")+i,u!=null&&(a+="="+u))})}return a}function eS(e){const a={};for(const i in e){const r=e[i];r!==void 0&&(a[i]=Gn(r)?r.map(l=>l==null?null:""+l):r==null?r:""+r)}return a}const tS=Symbol(""),Hh=Symbol(""),$u=Symbol(""),lm=Symbol(""),Sc=Symbol("");function xs(){let e=[];function a(r){return e.push(r),()=>{const l=e.indexOf(r);l>-1&&e.splice(l,1)}}function i(){e=[]}return{add:a,list:()=>e.slice(),reset:i}}function Oa(e,a,i,r,l){const u=r&&(r.enterCallbacks[l]=r.enterCallbacks[l]||[]);return()=>new Promise((f,m)=>{const x=A=>{A===!1?m(qi(4,{from:i,to:a})):A instanceof Error?m(A):P1(A)?m(qi(2,{from:a,to:A})):(u&&r.enterCallbacks[l]===u&&typeof A=="function"&&u.push(A),f())},w=e.call(r&&r.instances[l],a,i,x);let C=Promise.resolve(w);e.length<3&&(C=C.then(x)),C.catch(A=>m(A))})}function Ol(e,a,i,r){const l=[];for(const u of e)for(const f in u.components){let m=u.components[f];if(!(a!=="beforeRouteEnter"&&!u.instances[f]))if(nS(m)){const w=(m.__vccOpts||m)[a];w&&l.push(Oa(w,i,r,u,f))}else{let x=m();l.push(()=>x.then(w=>{if(!w)return Promise.reject(new Error(`Couldn't resolve component "${f}" at "${u.path}"`));const C=l1(w)?w.default:w;u.components[f]=C;const E=(C.__vccOpts||C)[a];return E&&Oa(E,i,r,u,f)()}))}}return l}function nS(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Xh(e){const a=ut($u),i=ut(lm),r=$(()=>a.resolve(_t(e.to))),l=$(()=>{const{matched:x}=r.value,{length:w}=x,C=x[w-1],A=i.matched;if(!C||!A.length)return-1;const E=A.findIndex(Ui.bind(null,C));if(E>-1)return E;const _=Yh(x[w-2]);return w>1&&Yh(C)===_&&A[A.length-1].path!==_?A.findIndex(Ui.bind(null,x[w-2])):E}),u=$(()=>l.value>-1&&rS(i.params,r.value.params)),f=$(()=>l.value>-1&&l.value===i.matched.length-1&&Jv(i.params,r.value.params));function m(x={}){return sS(x)?a[_t(e.replace)?"replace":"push"](_t(e.to)).catch(Fs):Promise.resolve()}return{route:r,href:$(()=>r.value.href),isActive:u,isExactActive:f,navigate:m}}const aS=Si({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Xh,setup(e,{slots:a}){const i=Gt(Xh(e)),{options:r}=ut($u),l=$(()=>({[Wh(e.activeClass,r.linkActiveClass,"router-link-active")]:i.isActive,[Wh(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive}));return()=>{const u=a.default&&a.default(i);return e.custom?u:Un("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:l.value},u)}}}),iS=aS;function sS(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const a=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(a))return}return e.preventDefault&&e.preventDefault(),!0}}function rS(e,a){for(const i in a){const r=a[i],l=e[i];if(typeof r=="string"){if(r!==l)return!1}else if(!Gn(l)||l.length!==r.length||r.some((u,f)=>u!==l[f]))return!1}return!0}function Yh(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Wh=(e,a,i)=>e??a??i,oS=Si({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:a,slots:i}){const r=ut(Sc),l=$(()=>e.route||r.value),u=ut(Hh,0),f=$(()=>{let w=_t(u);const{matched:C}=l.value;let A;for(;(A=C[w])&&!A.components;)w++;return w}),m=$(()=>l.value.matched[f.value]);Pt(Hh,$(()=>f.value+1)),Pt(tS,m),Pt(Sc,l);const x=Oe();return He(()=>[x.value,m.value,e.name],([w,C,A],[E,_,V])=>{C&&(C.instances[A]=w,_&&_!==C&&w&&w===E&&(C.leaveGuards.size||(C.leaveGuards=_.leaveGuards),C.updateGuards.size||(C.updateGuards=_.updateGuards))),w&&C&&(!_||!Ui(C,_)||!E)&&(C.enterCallbacks[A]||[]).forEach(D=>D(w))},{flush:"post"}),()=>{const w=l.value,C=e.name,A=m.value,E=A&&A.components[C];if(!E)return jh(i.default,{Component:E,route:w});const _=A.props[C],V=_?_===!0?w.params:typeof _=="function"?_(w):_:null,X=Un(E,mt({},V,a,{onVnodeUnmounted:B=>{B.component.isUnmounted&&(A.instances[C]=null)},ref:x}));return jh(i.default,{Component:X,route:w})||X}}});function jh(e,a){if(!e)return null;const i=e(a);return i.length===1?i[0]:i}const cm=oS;function lS(e){const a=F1(e.routes,e),i=e.parseQuery||Q1,r=e.stringifyQuery||Nh,l=e.history,u=xs(),f=xs(),m=xs(),x=Xe(Ta);let w=Ta;zi&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const C=_l.bind(null,de=>""+de),A=_l.bind(null,J1),E=_l.bind(null,ro);function _(de,Le){let _e,be;return em(de)?(_e=a.getRecordMatcher(de),be=Le):be=de,a.addRoute(be,_e)}function V(de){const Le=a.getRecordMatcher(de);Le&&a.removeRoute(Le)}function D(){return a.getRoutes().map(de=>de.record)}function X(de){return!!a.getRecordMatcher(de)}function B(de,Le){if(Le=mt({},Le||x.value),typeof de=="string"){const se=Rl(i,de,Le.path),ce=a.resolve({path:se.path},Le),pe=l.createHref(se.fullPath);return mt(se,ce,{params:E(ce.params),hash:ro(se.hash),redirectedFrom:void 0,href:pe})}let _e;if("path"in de)_e=mt({},de,{path:Rl(i,de.path,Le.path).path});else{const se=mt({},de.params);for(const ce in se)se[ce]==null&&delete se[ce];_e=mt({},de,{params:A(se)}),Le.params=A(Le.params)}const be=a.resolve(_e,Le),ve=de.hash||"";be.params=C(E(be.params));const Z=d1(r,mt({},de,{hash:q1(ve),path:be.path})),te=l.createHref(Z);return mt({fullPath:Z,hash:ve,query:r===Nh?eS(de.query):de.query||{}},be,{redirectedFrom:void 0,href:te})}function L(de){return typeof de=="string"?Rl(i,de,x.value.path):mt({},de)}function W(de,Le){if(w!==de)return qi(8,{from:Le,to:de})}function Y(de){return Q(de)}function N(de){return Y(mt(L(de),{replace:!0}))}function J(de){const Le=de.matched[de.matched.length-1];if(Le&&Le.redirect){const{redirect:_e}=Le;let be=typeof _e=="function"?_e(de):_e;return typeof be=="string"&&(be=be.includes("?")||be.includes("#")?be=L(be):{path:be},be.params={}),mt({query:de.query,hash:de.hash,params:"path"in be?{}:de.params},be)}}function Q(de,Le){const _e=w=B(de),be=x.value,ve=de.state,Z=de.force,te=de.replace===!0,se=J(_e);if(se)return Q(mt(L(se),{state:typeof se=="object"?mt({},ve,se.state):ve,force:Z,replace:te}),Le||_e);const ce=_e;ce.redirectedFrom=Le;let pe;return!Z&&h1(r,be,_e)&&(pe=qi(16,{to:ce,from:be}),De(be,be,!0,!1)),(pe?Promise.resolve(pe):ee(ce,be)).catch(Ce=>sa(Ce)?sa(Ce,2)?Ce:Ee(Ce):he(Ce,ce,be)).then(Ce=>{if(Ce){if(sa(Ce,2))return Q(mt({replace:te},L(Ce.to),{state:typeof Ce.to=="object"?mt({},ve,Ce.to.state):ve,force:Z}),Le||ce)}else Ce=ne(ce,be,!0,te,ve);return ie(ce,be,Ce),Ce})}function j(de,Le){const _e=W(de,Le);return _e?Promise.reject(_e):Promise.resolve()}function G(de){const Le=Je.values().next().value;return Le&&typeof Le.runWithContext=="function"?Le.runWithContext(de):de()}function ee(de,Le){let _e;const[be,ve,Z]=cS(de,Le);_e=Ol(be.reverse(),"beforeRouteLeave",de,Le);for(const se of be)se.leaveGuards.forEach(ce=>{_e.push(Oa(ce,de,Le))});const te=j.bind(null,de,Le);return _e.push(te),ue(_e).then(()=>{_e=[];for(const se of u.list())_e.push(Oa(se,de,Le));return _e.push(te),ue(_e)}).then(()=>{_e=Ol(ve,"beforeRouteUpdate",de,Le);for(const se of ve)se.updateGuards.forEach(ce=>{_e.push(Oa(ce,de,Le))});return _e.push(te),ue(_e)}).then(()=>{_e=[];for(const se of Z)if(se.beforeEnter)if(Gn(se.beforeEnter))for(const ce of se.beforeEnter)_e.push(Oa(ce,de,Le));else _e.push(Oa(se.beforeEnter,de,Le));return _e.push(te),ue(_e)}).then(()=>(de.matched.forEach(se=>se.enterCallbacks={}),_e=Ol(Z,"beforeRouteEnter",de,Le),_e.push(te),ue(_e))).then(()=>{_e=[];for(const se of f.list())_e.push(Oa(se,de,Le));return _e.push(te),ue(_e)}).catch(se=>sa(se,8)?se:Promise.reject(se))}function ie(de,Le,_e){m.list().forEach(be=>G(()=>be(de,Le,_e)))}function ne(de,Le,_e,be,ve){const Z=W(de,Le);if(Z)return Z;const te=Le===Ta,se=zi?history.state:{};_e&&(be||te?l.replace(de.fullPath,mt({scroll:te&&se&&se.scroll},ve)):l.push(de.fullPath,ve)),x.value=de,De(de,Le,_e,te),Ee()}let oe;function le(){oe||(oe=l.listen((de,Le,_e)=>{if(!ze.listening)return;const be=B(de),ve=J(be);if(ve){Q(mt(ve,{replace:!0}),be).catch(Fs);return}w=be;const Z=x.value;zi&&y1(Rh(Z.fullPath,_e.delta),Yo()),ee(be,Z).catch(te=>sa(te,12)?te:sa(te,2)?(Q(te.to,be).then(se=>{sa(se,20)&&!_e.delta&&_e.type===Ks.pop&&l.go(-1,!1)}).catch(Fs),Promise.reject()):(_e.delta&&l.go(-_e.delta,!1),he(te,be,Z))).then(te=>{te=te||ne(be,Z,!1),te&&(_e.delta&&!sa(te,8)?l.go(-_e.delta,!1):_e.type===Ks.pop&&sa(te,20)&&l.go(-1,!1)),ie(be,Z,te)}).catch(Fs)}))}let Ae=xs(),we=xs(),fe;function he(de,Le,_e){Ee(de);const be=we.list();return be.length?be.forEach(ve=>ve(de,Le,_e)):console.error(de),Promise.reject(de)}function ke(){return fe&&x.value!==Ta?Promise.resolve():new Promise((de,Le)=>{Ae.add([de,Le])})}function Ee(de){return fe||(fe=!de,le(),Ae.list().forEach(([Le,_e])=>de?_e(de):Le()),Ae.reset()),de}function De(de,Le,_e,be){const{scrollBehavior:ve}=e;if(!zi||!ve)return Promise.resolve();const Z=!_e&&w1(Rh(de.fullPath,0))||(be||!_e)&&history.state&&history.state.scroll||null;return gt().then(()=>ve(de,Le,Z)).then(te=>te&&x1(te)).catch(te=>he(te,de,Le))}const Fe=de=>l.go(de);let Ze;const Je=new Set,ze={currentRoute:x,listening:!0,addRoute:_,removeRoute:V,hasRoute:X,getRoutes:D,resolve:B,options:e,push:Y,replace:N,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:u.add,beforeResolve:f.add,afterEach:m.add,onError:we.add,isReady:ke,install(de){const Le=this;de.component("RouterLink",iS),de.component("RouterView",cm),de.config.globalProperties.$router=Le,Object.defineProperty(de.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(x)}),zi&&!Ze&&x.value===Ta&&(Ze=!0,Y(l.location).catch(ve=>{}));const _e={};for(const ve in Ta)Object.defineProperty(_e,ve,{get:()=>x.value[ve],enumerable:!0});de.provide($u,Le),de.provide(lm,pu(_e)),de.provide(Sc,x);const be=de.unmount;Je.add(de),de.unmount=function(){Je.delete(de),Je.size<1&&(w=Ta,oe&&oe(),oe=null,x.value=Ta,Ze=!1,fe=!1),be()}}};function ue(de){return de.reduce((Le,_e)=>Le.then(()=>G(_e)),Promise.resolve())}return ze}function cS(e,a){const i=[],r=[],l=[],u=Math.max(a.matched.length,e.matched.length);for(let f=0;fUi(w,m))?r.push(m):i.push(m));const x=e.matched[f];x&&(a.matched.find(w=>Ui(w,x))||l.push(x))}return[i,r,l]}const uS=Si({__name:"App",setup(e){return(a,i)=>(vr(),Bo(_t(cm)))}}),dS="modulepreload",hS=function(e){return"/"+e},$h={},la=function(a,i,r){if(!i||i.length===0)return a();const l=document.getElementsByTagName("link");return Promise.all(i.map(u=>{if(u=hS(u),u in $h)return;$h[u]=!0;const f=u.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(!!r)for(let C=l.length-1;C>=0;C--){const A=l[C];if(A.href===u&&(!f||A.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const w=document.createElement("link");if(w.rel=f?"stylesheet":dS,f||(w.as="script",w.crossOrigin=""),w.href=u,document.head.appendChild(w),f)return new Promise((C,A)=>{w.addEventListener("load",C),w.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${u}`)))})})).then(()=>a()).catch(u=>{const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u})},fS={path:"/main",meta:{requiresAuth:!0},redirect:"/main/dashboard/default",component:()=>la(()=>import("./FullLayout-695e0d90.js"),["assets/FullLayout-695e0d90.js","assets/md5-f9642456.js"]),children:[{name:"Dashboard",path:"/",component:()=>la(()=>import("./DefaultDashboard-8fc755bb.js"),["assets/DefaultDashboard-8fc755bb.js","assets/_plugin-vue_export-helper-c27b6911.js"])},{name:"Extensions",path:"/extension",component:()=>la(()=>import("./ExtensionPage-fe933741.js"),["assets/ExtensionPage-fe933741.js","assets/WaitingForRestart-dd7c3e40.js","assets/_plugin-vue_export-helper-c27b6911.js"])},{name:"Configs",path:"/config",component:()=>la(()=>import("./ConfigPage-bf9717b1.js"),["assets/ConfigPage-bf9717b1.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/WaitingForRestart-dd7c3e40.js","assets/ConfigPage-f564cc69.css"])},{name:"Default",path:"/dashboard/default",component:()=>la(()=>import("./DefaultDashboard-8fc755bb.js"),["assets/DefaultDashboard-8fc755bb.js","assets/_plugin-vue_export-helper-c27b6911.js"])},{name:"Console",path:"/console",component:()=>la(()=>import("./ConsolePage-23f81a17.js"),["assets/ConsolePage-23f81a17.js","assets/ConsolePage-ff373be6.css"])},{name:"FineTune",path:"/fine-tune",component:()=>la(()=>import("./FineTunePage-1bb5ec2e.js"),["assets/FineTunePage-1bb5ec2e.js","assets/_plugin-vue_export-helper-c27b6911.js"])}]},gS={path:"/auth",component:()=>la(()=>import("./BlankLayout-4dff50d8.js"),[]),meta:{requiresAuth:!1},children:[{name:"Login",path:"/auth/login",component:()=>la(()=>import("./LoginPage-81777e38.js"),["assets/LoginPage-81777e38.js","assets/md5-f9642456.js","assets/LoginPage-74e85ca7.css"])}]};function um(e,a){return function(){return e.apply(a,arguments)}}const{toString:vS}=Object.prototype,{getPrototypeOf:Gu}=Object,Wo=(e=>a=>{const i=vS.call(a);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),a=>Wo(a)===e),jo=e=>a=>typeof a===e,{isArray:is}=Array,Zs=jo("undefined");function mS(e){return e!==null&&!Zs(e)&&e.constructor!==null&&!Zs(e.constructor)&&Sn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dm=qn("ArrayBuffer");function pS(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&dm(e.buffer),a}const bS=jo("string"),Sn=jo("function"),hm=jo("number"),$o=e=>e!==null&&typeof e=="object",xS=e=>e===!0||e===!1,qr=e=>{if(Wo(e)!=="object")return!1;const a=Gu(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},yS=qn("Date"),wS=qn("File"),SS=qn("Blob"),kS=qn("FileList"),CS=e=>$o(e)&&Sn(e.pipe),AS=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||Sn(e.append)&&((a=Wo(e))==="formdata"||a==="object"&&Sn(e.toString)&&e.toString()==="[object FormData]"))},PS=qn("URLSearchParams"),[ES,TS,IS,LS]=["ReadableStream","Request","Response","Headers"].map(qn),_S=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function br(e,a,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let r,l;if(typeof e!="object"&&(e=[e]),is(e))for(r=0,l=e.length;r0;)if(l=i[r],a===l.toLowerCase())return l;return null}const si=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),gm=e=>!Zs(e)&&e!==si;function kc(){const{caseless:e}=gm(this)&&this||{},a={},i=(r,l)=>{const u=e&&fm(a,l)||l;qr(a[u])&&qr(r)?a[u]=kc(a[u],r):qr(r)?a[u]=kc({},r):is(r)?a[u]=r.slice():a[u]=r};for(let r=0,l=arguments.length;r(br(a,(l,u)=>{i&&Sn(l)?e[u]=um(l,i):e[u]=l},{allOwnKeys:r}),e),OS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),VS=(e,a,i,r)=>{e.prototype=Object.create(a.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),i&&Object.assign(e.prototype,i)},MS=(e,a,i,r)=>{let l,u,f;const m={};if(a=a||{},e==null)return a;do{for(l=Object.getOwnPropertyNames(e),u=l.length;u-- >0;)f=l[u],(!r||r(f,e,a))&&!m[f]&&(a[f]=e[f],m[f]=!0);e=i!==!1&&Gu(e)}while(e&&(!i||i(e,a))&&e!==Object.prototype);return a},FS=(e,a,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=a.length;const r=e.indexOf(a,i);return r!==-1&&r===i},BS=e=>{if(!e)return null;if(is(e))return e;let a=e.length;if(!hm(a))return null;const i=new Array(a);for(;a-- >0;)i[a]=e[a];return i},DS=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&Gu(Uint8Array)),zS=(e,a)=>{const r=(e&&e[Symbol.iterator]).call(e);let l;for(;(l=r.next())&&!l.done;){const u=l.value;a.call(e,u[0],u[1])}},NS=(e,a)=>{let i;const r=[];for(;(i=e.exec(a))!==null;)r.push(i);return r},HS=qn("HTMLFormElement"),XS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,r,l){return r.toUpperCase()+l}),Gh=(({hasOwnProperty:e})=>(a,i)=>e.call(a,i))(Object.prototype),YS=qn("RegExp"),vm=(e,a)=>{const i=Object.getOwnPropertyDescriptors(e),r={};br(i,(l,u)=>{let f;(f=a(l,u,e))!==!1&&(r[u]=f||l)}),Object.defineProperties(e,r)},WS=e=>{vm(e,(a,i)=>{if(Sn(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=e[i];if(Sn(r)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},jS=(e,a)=>{const i={},r=l=>{l.forEach(u=>{i[u]=!0})};return is(e)?r(e):r(String(e).split(a)),i},$S=()=>{},GS=(e,a)=>e!=null&&Number.isFinite(e=+e)?e:a,Vl="abcdefghijklmnopqrstuvwxyz",Uh="0123456789",mm={DIGIT:Uh,ALPHA:Vl,ALPHA_DIGIT:Vl+Vl.toUpperCase()+Uh},US=(e=16,a=mm.ALPHA_DIGIT)=>{let i="";const{length:r}=a;for(;e--;)i+=a[Math.random()*r|0];return i};function qS(e){return!!(e&&Sn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const KS=e=>{const a=new Array(10),i=(r,l)=>{if($o(r)){if(a.indexOf(r)>=0)return;if(!("toJSON"in r)){a[l]=r;const u=is(r)?[]:{};return br(r,(f,m)=>{const x=i(f,l+1);!Zs(x)&&(u[m]=x)}),a[l]=void 0,u}}return r};return i(e,0)},ZS=qn("AsyncFunction"),JS=e=>e&&($o(e)||Sn(e))&&Sn(e.then)&&Sn(e.catch),pm=((e,a)=>e?setImmediate:a?((i,r)=>(si.addEventListener("message",({source:l,data:u})=>{l===si&&u===i&&r.length&&r.shift()()},!1),l=>{r.push(l),si.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Sn(si.postMessage)),QS=typeof queueMicrotask<"u"?queueMicrotask.bind(si):typeof process<"u"&&process.nextTick||pm,xe={isArray:is,isArrayBuffer:dm,isBuffer:mS,isFormData:AS,isArrayBufferView:pS,isString:bS,isNumber:hm,isBoolean:xS,isObject:$o,isPlainObject:qr,isReadableStream:ES,isRequest:TS,isResponse:IS,isHeaders:LS,isUndefined:Zs,isDate:yS,isFile:wS,isBlob:SS,isRegExp:YS,isFunction:Sn,isStream:CS,isURLSearchParams:PS,isTypedArray:DS,isFileList:kS,forEach:br,merge:kc,extend:RS,trim:_S,stripBOM:OS,inherits:VS,toFlatObject:MS,kindOf:Wo,kindOfTest:qn,endsWith:FS,toArray:BS,forEachEntry:zS,matchAll:NS,isHTMLForm:HS,hasOwnProperty:Gh,hasOwnProp:Gh,reduceDescriptors:vm,freezeMethods:WS,toObjectSet:jS,toCamelCase:XS,noop:$S,toFiniteNumber:GS,findKey:fm,global:si,isContextDefined:gm,ALPHABET:mm,generateString:US,isSpecCompliantForm:qS,toJSONObject:KS,isAsyncFn:ZS,isThenable:JS,setImmediate:pm,asap:QS};function it(e,a,i,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),i&&(this.config=i),r&&(this.request=r),l&&(this.response=l)}xe.inherits(it,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:xe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const bm=it.prototype,xm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xm[e]={value:e}});Object.defineProperties(it,xm);Object.defineProperty(bm,"isAxiosError",{value:!0});it.from=(e,a,i,r,l,u)=>{const f=Object.create(bm);return xe.toFlatObject(e,f,function(x){return x!==Error.prototype},m=>m!=="isAxiosError"),it.call(f,e.message,a,i,r,l),f.cause=e,f.name=e.name,u&&Object.assign(f,u),f};const ek=null;function Cc(e){return xe.isPlainObject(e)||xe.isArray(e)}function ym(e){return xe.endsWith(e,"[]")?e.slice(0,-2):e}function qh(e,a,i){return e?e.concat(a).map(function(l,u){return l=ym(l),!i&&u?"["+l+"]":l}).join(i?".":""):a}function tk(e){return xe.isArray(e)&&!e.some(Cc)}const nk=xe.toFlatObject(xe,{},null,function(a){return/^is[A-Z]/.test(a)});function Go(e,a,i){if(!xe.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,i=xe.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,X){return!xe.isUndefined(X[D])});const r=i.metaTokens,l=i.visitor||C,u=i.dots,f=i.indexes,x=(i.Blob||typeof Blob<"u"&&Blob)&&xe.isSpecCompliantForm(a);if(!xe.isFunction(l))throw new TypeError("visitor must be a function");function w(V){if(V===null)return"";if(xe.isDate(V))return V.toISOString();if(!x&&xe.isBlob(V))throw new it("Blob is not supported. Use a Buffer instead.");return xe.isArrayBuffer(V)||xe.isTypedArray(V)?x&&typeof Blob=="function"?new Blob([V]):Buffer.from(V):V}function C(V,D,X){let B=V;if(V&&!X&&typeof V=="object"){if(xe.endsWith(D,"{}"))D=r?D:D.slice(0,-2),V=JSON.stringify(V);else if(xe.isArray(V)&&tk(V)||(xe.isFileList(V)||xe.endsWith(D,"[]"))&&(B=xe.toArray(V)))return D=ym(D),B.forEach(function(W,Y){!(xe.isUndefined(W)||W===null)&&a.append(f===!0?qh([D],Y,u):f===null?D:D+"[]",w(W))}),!1}return Cc(V)?!0:(a.append(qh(X,D,u),w(V)),!1)}const A=[],E=Object.assign(nk,{defaultVisitor:C,convertValue:w,isVisitable:Cc});function _(V,D){if(!xe.isUndefined(V)){if(A.indexOf(V)!==-1)throw Error("Circular reference detected in "+D.join("."));A.push(V),xe.forEach(V,function(B,L){(!(xe.isUndefined(B)||B===null)&&l.call(a,B,xe.isString(L)?L.trim():L,D,E))===!0&&_(B,D?D.concat(L):[L])}),A.pop()}}if(!xe.isObject(e))throw new TypeError("data must be an object");return _(e),a}function Kh(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return a[r]})}function Uu(e,a){this._pairs=[],e&&Go(e,this,a)}const wm=Uu.prototype;wm.append=function(a,i){this._pairs.push([a,i])};wm.toString=function(a){const i=a?function(r){return a.call(this,r,Kh)}:Kh;return this._pairs.map(function(l){return i(l[0])+"="+i(l[1])},"").join("&")};function ak(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sm(e,a,i){if(!a)return e;const r=i&&i.encode||ak,l=i&&i.serialize;let u;if(l?u=l(a,i):u=xe.isURLSearchParams(a)?a.toString():new Uu(a,i).toString(r),u){const f=e.indexOf("#");f!==-1&&(e=e.slice(0,f)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class ik{constructor(){this.handlers=[]}use(a,i,r){return this.handlers.push({fulfilled:a,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){xe.forEach(this.handlers,function(r){r!==null&&a(r)})}}const Zh=ik,km={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sk=typeof URLSearchParams<"u"?URLSearchParams:Uu,rk=typeof FormData<"u"?FormData:null,ok=typeof Blob<"u"?Blob:null,lk={isBrowser:!0,classes:{URLSearchParams:sk,FormData:rk,Blob:ok},protocols:["http","https","file","blob","url","data"]},qu=typeof window<"u"&&typeof document<"u",ck=(e=>qu&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),uk=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),dk=qu&&window.location.href||"http://localhost",hk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qu,hasStandardBrowserEnv:ck,hasStandardBrowserWebWorkerEnv:uk,origin:dk},Symbol.toStringTag,{value:"Module"})),Yn={...hk,...lk};function fk(e,a){return Go(e,new Yn.classes.URLSearchParams,Object.assign({visitor:function(i,r,l,u){return Yn.isNode&&xe.isBuffer(i)?(this.append(r,i.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},a))}function gk(e){return xe.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function vk(e){const a={},i=Object.keys(e);let r;const l=i.length;let u;for(r=0;r=i.length;return f=!f&&xe.isArray(l)?l.length:f,x?(xe.hasOwnProp(l,f)?l[f]=[l[f],r]:l[f]=r,!m):((!l[f]||!xe.isObject(l[f]))&&(l[f]=[]),a(i,r,l[f],u)&&xe.isArray(l[f])&&(l[f]=vk(l[f])),!m)}if(xe.isFormData(e)&&xe.isFunction(e.entries)){const i={};return xe.forEachEntry(e,(r,l)=>{a(gk(r),l,i,0)}),i}return null}function mk(e,a,i){if(xe.isString(e))try{return(a||JSON.parse)(e),xe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(e)}const Ku={transitional:km,adapter:["xhr","http","fetch"],transformRequest:[function(a,i){const r=i.getContentType()||"",l=r.indexOf("application/json")>-1,u=xe.isObject(a);if(u&&xe.isHTMLForm(a)&&(a=new FormData(a)),xe.isFormData(a))return l?JSON.stringify(Cm(a)):a;if(xe.isArrayBuffer(a)||xe.isBuffer(a)||xe.isStream(a)||xe.isFile(a)||xe.isBlob(a)||xe.isReadableStream(a))return a;if(xe.isArrayBufferView(a))return a.buffer;if(xe.isURLSearchParams(a))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let m;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return fk(a,this.formSerializer).toString();if((m=xe.isFileList(a))||r.indexOf("multipart/form-data")>-1){const x=this.env&&this.env.FormData;return Go(m?{"files[]":a}:a,x&&new x,this.formSerializer)}}return u||l?(i.setContentType("application/json",!1),mk(a)):a}],transformResponse:[function(a){const i=this.transitional||Ku.transitional,r=i&&i.forcedJSONParsing,l=this.responseType==="json";if(xe.isResponse(a)||xe.isReadableStream(a))return a;if(a&&xe.isString(a)&&(r&&!this.responseType||l)){const f=!(i&&i.silentJSONParsing)&&l;try{return JSON.parse(a)}catch(m){if(f)throw m.name==="SyntaxError"?it.from(m,it.ERR_BAD_RESPONSE,this,null,this.response):m}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yn.classes.FormData,Blob:Yn.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};xe.forEach(["delete","get","head","post","put","patch"],e=>{Ku.headers[e]={}});const Zu=Ku,pk=xe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bk=e=>{const a={};let i,r,l;return e&&e.split(` + */const zi=typeof window<"u";function l1(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const mt=Object.assign;function _l(e,a){const i={};for(const r in a){const l=a[r];i[r]=Gn(l)?l.map(e):e(l)}return i}const Fs=()=>{},Gn=Array.isArray,c1=/\/$/,u1=e=>e.replace(c1,"");function Rl(e,a,i="/"){let r,l={},u="",f="";const m=a.indexOf("#");let x=a.indexOf("?");return m=0&&(x=-1),x>-1&&(r=a.slice(0,x),u=a.slice(x+1,m>-1?m:a.length),l=e(u)),m>-1&&(r=r||a.slice(0,m),f=a.slice(m,a.length)),r=g1(r??a,i),{fullPath:r+(u&&"?")+u+f,path:r,query:l,hash:f}}function d1(e,a){const i=a.query?e(a.query):"";return a.path+(i&&"?")+i+(a.hash||"")}function Lh(e,a){return!a||!e.toLowerCase().startsWith(a.toLowerCase())?e:e.slice(a.length)||"/"}function h1(e,a,i){const r=a.matched.length-1,l=i.matched.length-1;return r>-1&&r===l&&Ui(a.matched[r],i.matched[l])&&Jv(a.params,i.params)&&e(a.query)===e(i.query)&&a.hash===i.hash}function Ui(e,a){return(e.aliasOf||e)===(a.aliasOf||a)}function Jv(e,a){if(Object.keys(e).length!==Object.keys(a).length)return!1;for(const i in e)if(!f1(e[i],a[i]))return!1;return!0}function f1(e,a){return Gn(e)?_h(e,a):Gn(a)?_h(a,e):e===a}function _h(e,a){return Gn(a)?e.length===a.length&&e.every((i,r)=>i===a[r]):e.length===1&&e[0]===a}function g1(e,a){if(e.startsWith("/"))return e;if(!e)return a;const i=a.split("/"),r=e.split("/"),l=r[r.length-1];(l===".."||l===".")&&r.push("");let u=i.length-1,f,m;for(f=0;f1&&u--;else break;return i.slice(0,u).join("/")+"/"+r.slice(f-(f===r.length?1:0)).join("/")}var Ks;(function(e){e.pop="pop",e.push="push"})(Ks||(Ks={}));var Bs;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Bs||(Bs={}));function v1(e){if(!e)if(zi){const a=document.querySelector("base");e=a&&a.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),u1(e)}const m1=/^[^#]+#/;function p1(e,a){return e.replace(m1,"#")+a}function b1(e,a){const i=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:a.behavior,left:r.left-i.left-(a.left||0),top:r.top-i.top-(a.top||0)}}const Yo=()=>({left:window.pageXOffset,top:window.pageYOffset});function x1(e){let a;if("el"in e){const i=e.el,r=typeof i=="string"&&i.startsWith("#"),l=typeof i=="string"?r?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!l)return;a=b1(l,e)}else a=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(a):window.scrollTo(a.left!=null?a.left:window.pageXOffset,a.top!=null?a.top:window.pageYOffset)}function Rh(e,a){return(history.state?history.state.position-a:-1)+e}const yc=new Map;function y1(e,a){yc.set(e,a)}function w1(e){const a=yc.get(e);return yc.delete(e),a}let S1=()=>location.protocol+"//"+location.host;function Qv(e,a){const{pathname:i,search:r,hash:l}=a,u=e.indexOf("#");if(u>-1){let m=l.includes(e.slice(u))?e.slice(u).length:1,x=l.slice(m);return x[0]!=="/"&&(x="/"+x),Lh(x,"")}return Lh(i,e)+r+l}function k1(e,a,i,r){let l=[],u=[],f=null;const m=({state:E})=>{const _=Qv(e,location),V=i.value,D=a.value;let X=0;if(E){if(i.value=_,a.value=E,f&&f===V){f=null;return}X=D?E.position-D.position:0}else r(_);l.forEach(B=>{B(i.value,V,{delta:X,type:Ks.pop,direction:X?X>0?Bs.forward:Bs.back:Bs.unknown})})};function x(){f=i.value}function w(E){l.push(E);const _=()=>{const V=l.indexOf(E);V>-1&&l.splice(V,1)};return u.push(_),_}function C(){const{history:E}=window;E.state&&E.replaceState(mt({},E.state,{scroll:Yo()}),"")}function A(){for(const E of u)E();u=[],window.removeEventListener("popstate",m),window.removeEventListener("beforeunload",C)}return window.addEventListener("popstate",m),window.addEventListener("beforeunload",C,{passive:!0}),{pauseListeners:x,listen:w,destroy:A}}function Oh(e,a,i,r=!1,l=!1){return{back:e,current:a,forward:i,replaced:r,position:window.history.length,scroll:l?Yo():null}}function C1(e){const{history:a,location:i}=window,r={value:Qv(e,i)},l={value:a.state};l.value||u(r.value,{back:null,current:r.value,forward:null,position:a.length-1,replaced:!0,scroll:null},!0);function u(x,w,C){const A=e.indexOf("#"),E=A>-1?(i.host&&document.querySelector("base")?e:e.slice(A))+x:S1()+e+x;try{a[C?"replaceState":"pushState"](w,"",E),l.value=w}catch(_){console.error(_),i[C?"replace":"assign"](E)}}function f(x,w){const C=mt({},a.state,Oh(l.value.back,x,l.value.forward,!0),w,{position:l.value.position});u(x,C,!0),r.value=x}function m(x,w){const C=mt({},l.value,a.state,{forward:x,scroll:Yo()});u(C.current,C,!0);const A=mt({},Oh(r.value,x,null),{position:C.position+1},w);u(x,A,!1),r.value=x}return{location:r,state:l,push:m,replace:f}}function A1(e){e=v1(e);const a=C1(e),i=k1(e,a.state,a.location,a.replace);function r(u,f=!0){f||i.pauseListeners(),history.go(u)}const l=mt({location:"",base:e,go:r,createHref:p1.bind(null,e)},a,i);return Object.defineProperty(l,"location",{enumerable:!0,get:()=>a.location.value}),Object.defineProperty(l,"state",{enumerable:!0,get:()=>a.state.value}),l}function P1(e){return typeof e=="string"||e&&typeof e=="object"}function em(e){return typeof e=="string"||typeof e=="symbol"}const Ta={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},tm=Symbol("");var Vh;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Vh||(Vh={}));function qi(e,a){return mt(new Error,{type:e,[tm]:!0},a)}function sa(e,a){return e instanceof Error&&tm in e&&(a==null||!!(e.type&a))}const Mh="[^/]+?",E1={sensitive:!1,strict:!1,start:!0,end:!0},T1=/[.+*?^${}()[\]/\\]/g;function I1(e,a){const i=mt({},E1,a),r=[];let l=i.start?"^":"";const u=[];for(const w of e){const C=w.length?[]:[90];i.strict&&!w.length&&(l+="/");for(let A=0;Aa.length?a.length===1&&a[0]===40+40?1:-1:0}function _1(e,a){let i=0;const r=e.score,l=a.score;for(;i0&&a[a.length-1]<0}const R1={type:0,value:""},O1=/[a-zA-Z0-9_]/;function V1(e){if(!e)return[[]];if(e==="/")return[[R1]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function a(_){throw new Error(`ERR (${i})/"${w}": ${_}`)}let i=0,r=i;const l=[];let u;function f(){u&&l.push(u),u=[]}let m=0,x,w="",C="";function A(){w&&(i===0?u.push({type:0,value:w}):i===1||i===2||i===3?(u.length>1&&(x==="*"||x==="+")&&a(`A repeatable param (${w}) must be alone in its segment. eg: '/:ids+.`),u.push({type:1,value:w,regexp:C,repeatable:x==="*"||x==="+",optional:x==="*"||x==="?"})):a("Invalid state to consume buffer"),w="")}function E(){w+=x}for(;m{f(L)}:Fs}function f(C){if(em(C)){const A=r.get(C);A&&(r.delete(C),i.splice(i.indexOf(A),1),A.children.forEach(f),A.alias.forEach(f))}else{const A=i.indexOf(C);A>-1&&(i.splice(A,1),C.record.name&&r.delete(C.record.name),C.children.forEach(f),C.alias.forEach(f))}}function m(){return i}function x(C){let A=0;for(;A=0&&(C.record.path!==i[A].record.path||!nm(C,i[A]));)A++;i.splice(A,0,C),C.record.name&&!Dh(C)&&r.set(C.record.name,C)}function w(C,A){let E,_={},V,D;if("name"in C&&C.name){if(E=r.get(C.name),!E)throw qi(1,{location:C});D=E.record.name,_=mt(Bh(A.params,E.keys.filter(L=>!L.optional).map(L=>L.name)),C.params&&Bh(C.params,E.keys.map(L=>L.name))),V=E.stringify(_)}else if("path"in C)V=C.path,E=i.find(L=>L.re.test(V)),E&&(_=E.parse(V),D=E.record.name);else{if(E=A.name?r.get(A.name):i.find(L=>L.re.test(A.path)),!E)throw qi(1,{location:C,currentLocation:A});D=E.record.name,_=mt({},A.params,C.params),V=E.stringify(_)}const X=[];let B=E;for(;B;)X.unshift(B.record),B=B.parent;return{name:D,path:V,params:_,matched:X,meta:z1(X)}}return e.forEach(C=>u(C)),{addRoute:u,resolve:w,removeRoute:f,getRoutes:m,getRecordMatcher:l}}function Bh(e,a){const i={};for(const r of a)r in e&&(i[r]=e[r]);return i}function B1(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:D1(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function D1(e){const a={},i=e.props||!1;if("component"in e)a.default=i;else for(const r in e.components)a[r]=typeof i=="object"?i[r]:i;return a}function Dh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function z1(e){return e.reduce((a,i)=>mt(a,i.meta),{})}function zh(e,a){const i={};for(const r in e)i[r]=r in a?a[r]:e[r];return i}function nm(e,a){return a.children.some(i=>i===e||nm(e,i))}const am=/#/g,N1=/&/g,H1=/\//g,X1=/=/g,Y1=/\?/g,im=/\+/g,W1=/%5B/g,j1=/%5D/g,sm=/%5E/g,$1=/%60/g,rm=/%7B/g,G1=/%7C/g,om=/%7D/g,U1=/%20/g;function ju(e){return encodeURI(""+e).replace(G1,"|").replace(W1,"[").replace(j1,"]")}function q1(e){return ju(e).replace(rm,"{").replace(om,"}").replace(sm,"^")}function wc(e){return ju(e).replace(im,"%2B").replace(U1,"+").replace(am,"%23").replace(N1,"%26").replace($1,"`").replace(rm,"{").replace(om,"}").replace(sm,"^")}function K1(e){return wc(e).replace(X1,"%3D")}function Z1(e){return ju(e).replace(am,"%23").replace(Y1,"%3F")}function J1(e){return e==null?"":Z1(e).replace(H1,"%2F")}function ro(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Q1(e){const a={};if(e===""||e==="?")return a;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let l=0;lu&&wc(u)):[r&&wc(r)]).forEach(u=>{u!==void 0&&(a+=(a.length?"&":"")+i,u!=null&&(a+="="+u))})}return a}function eS(e){const a={};for(const i in e){const r=e[i];r!==void 0&&(a[i]=Gn(r)?r.map(l=>l==null?null:""+l):r==null?r:""+r)}return a}const tS=Symbol(""),Hh=Symbol(""),$u=Symbol(""),lm=Symbol(""),Sc=Symbol("");function xs(){let e=[];function a(r){return e.push(r),()=>{const l=e.indexOf(r);l>-1&&e.splice(l,1)}}function i(){e=[]}return{add:a,list:()=>e.slice(),reset:i}}function Oa(e,a,i,r,l){const u=r&&(r.enterCallbacks[l]=r.enterCallbacks[l]||[]);return()=>new Promise((f,m)=>{const x=A=>{A===!1?m(qi(4,{from:i,to:a})):A instanceof Error?m(A):P1(A)?m(qi(2,{from:a,to:A})):(u&&r.enterCallbacks[l]===u&&typeof A=="function"&&u.push(A),f())},w=e.call(r&&r.instances[l],a,i,x);let C=Promise.resolve(w);e.length<3&&(C=C.then(x)),C.catch(A=>m(A))})}function Ol(e,a,i,r){const l=[];for(const u of e)for(const f in u.components){let m=u.components[f];if(!(a!=="beforeRouteEnter"&&!u.instances[f]))if(nS(m)){const w=(m.__vccOpts||m)[a];w&&l.push(Oa(w,i,r,u,f))}else{let x=m();l.push(()=>x.then(w=>{if(!w)return Promise.reject(new Error(`Couldn't resolve component "${f}" at "${u.path}"`));const C=l1(w)?w.default:w;u.components[f]=C;const E=(C.__vccOpts||C)[a];return E&&Oa(E,i,r,u,f)()}))}}return l}function nS(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Xh(e){const a=ut($u),i=ut(lm),r=$(()=>a.resolve(_t(e.to))),l=$(()=>{const{matched:x}=r.value,{length:w}=x,C=x[w-1],A=i.matched;if(!C||!A.length)return-1;const E=A.findIndex(Ui.bind(null,C));if(E>-1)return E;const _=Yh(x[w-2]);return w>1&&Yh(C)===_&&A[A.length-1].path!==_?A.findIndex(Ui.bind(null,x[w-2])):E}),u=$(()=>l.value>-1&&rS(i.params,r.value.params)),f=$(()=>l.value>-1&&l.value===i.matched.length-1&&Jv(i.params,r.value.params));function m(x={}){return sS(x)?a[_t(e.replace)?"replace":"push"](_t(e.to)).catch(Fs):Promise.resolve()}return{route:r,href:$(()=>r.value.href),isActive:u,isExactActive:f,navigate:m}}const aS=Si({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Xh,setup(e,{slots:a}){const i=Gt(Xh(e)),{options:r}=ut($u),l=$(()=>({[Wh(e.activeClass,r.linkActiveClass,"router-link-active")]:i.isActive,[Wh(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive}));return()=>{const u=a.default&&a.default(i);return e.custom?u:Un("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:l.value},u)}}}),iS=aS;function sS(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const a=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(a))return}return e.preventDefault&&e.preventDefault(),!0}}function rS(e,a){for(const i in a){const r=a[i],l=e[i];if(typeof r=="string"){if(r!==l)return!1}else if(!Gn(l)||l.length!==r.length||r.some((u,f)=>u!==l[f]))return!1}return!0}function Yh(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Wh=(e,a,i)=>e??a??i,oS=Si({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:a,slots:i}){const r=ut(Sc),l=$(()=>e.route||r.value),u=ut(Hh,0),f=$(()=>{let w=_t(u);const{matched:C}=l.value;let A;for(;(A=C[w])&&!A.components;)w++;return w}),m=$(()=>l.value.matched[f.value]);Pt(Hh,$(()=>f.value+1)),Pt(tS,m),Pt(Sc,l);const x=Oe();return He(()=>[x.value,m.value,e.name],([w,C,A],[E,_,V])=>{C&&(C.instances[A]=w,_&&_!==C&&w&&w===E&&(C.leaveGuards.size||(C.leaveGuards=_.leaveGuards),C.updateGuards.size||(C.updateGuards=_.updateGuards))),w&&C&&(!_||!Ui(C,_)||!E)&&(C.enterCallbacks[A]||[]).forEach(D=>D(w))},{flush:"post"}),()=>{const w=l.value,C=e.name,A=m.value,E=A&&A.components[C];if(!E)return jh(i.default,{Component:E,route:w});const _=A.props[C],V=_?_===!0?w.params:typeof _=="function"?_(w):_:null,X=Un(E,mt({},V,a,{onVnodeUnmounted:B=>{B.component.isUnmounted&&(A.instances[C]=null)},ref:x}));return jh(i.default,{Component:X,route:w})||X}}});function jh(e,a){if(!e)return null;const i=e(a);return i.length===1?i[0]:i}const cm=oS;function lS(e){const a=F1(e.routes,e),i=e.parseQuery||Q1,r=e.stringifyQuery||Nh,l=e.history,u=xs(),f=xs(),m=xs(),x=Xe(Ta);let w=Ta;zi&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const C=_l.bind(null,de=>""+de),A=_l.bind(null,J1),E=_l.bind(null,ro);function _(de,Le){let _e,be;return em(de)?(_e=a.getRecordMatcher(de),be=Le):be=de,a.addRoute(be,_e)}function V(de){const Le=a.getRecordMatcher(de);Le&&a.removeRoute(Le)}function D(){return a.getRoutes().map(de=>de.record)}function X(de){return!!a.getRecordMatcher(de)}function B(de,Le){if(Le=mt({},Le||x.value),typeof de=="string"){const se=Rl(i,de,Le.path),ce=a.resolve({path:se.path},Le),pe=l.createHref(se.fullPath);return mt(se,ce,{params:E(ce.params),hash:ro(se.hash),redirectedFrom:void 0,href:pe})}let _e;if("path"in de)_e=mt({},de,{path:Rl(i,de.path,Le.path).path});else{const se=mt({},de.params);for(const ce in se)se[ce]==null&&delete se[ce];_e=mt({},de,{params:A(se)}),Le.params=A(Le.params)}const be=a.resolve(_e,Le),ve=de.hash||"";be.params=C(E(be.params));const Z=d1(r,mt({},de,{hash:q1(ve),path:be.path})),te=l.createHref(Z);return mt({fullPath:Z,hash:ve,query:r===Nh?eS(de.query):de.query||{}},be,{redirectedFrom:void 0,href:te})}function L(de){return typeof de=="string"?Rl(i,de,x.value.path):mt({},de)}function W(de,Le){if(w!==de)return qi(8,{from:Le,to:de})}function Y(de){return Q(de)}function N(de){return Y(mt(L(de),{replace:!0}))}function J(de){const Le=de.matched[de.matched.length-1];if(Le&&Le.redirect){const{redirect:_e}=Le;let be=typeof _e=="function"?_e(de):_e;return typeof be=="string"&&(be=be.includes("?")||be.includes("#")?be=L(be):{path:be},be.params={}),mt({query:de.query,hash:de.hash,params:"path"in be?{}:de.params},be)}}function Q(de,Le){const _e=w=B(de),be=x.value,ve=de.state,Z=de.force,te=de.replace===!0,se=J(_e);if(se)return Q(mt(L(se),{state:typeof se=="object"?mt({},ve,se.state):ve,force:Z,replace:te}),Le||_e);const ce=_e;ce.redirectedFrom=Le;let pe;return!Z&&h1(r,be,_e)&&(pe=qi(16,{to:ce,from:be}),De(be,be,!0,!1)),(pe?Promise.resolve(pe):ee(ce,be)).catch(Ce=>sa(Ce)?sa(Ce,2)?Ce:Ee(Ce):he(Ce,ce,be)).then(Ce=>{if(Ce){if(sa(Ce,2))return Q(mt({replace:te},L(Ce.to),{state:typeof Ce.to=="object"?mt({},ve,Ce.to.state):ve,force:Z}),Le||ce)}else Ce=ne(ce,be,!0,te,ve);return ie(ce,be,Ce),Ce})}function j(de,Le){const _e=W(de,Le);return _e?Promise.reject(_e):Promise.resolve()}function G(de){const Le=Je.values().next().value;return Le&&typeof Le.runWithContext=="function"?Le.runWithContext(de):de()}function ee(de,Le){let _e;const[be,ve,Z]=cS(de,Le);_e=Ol(be.reverse(),"beforeRouteLeave",de,Le);for(const se of be)se.leaveGuards.forEach(ce=>{_e.push(Oa(ce,de,Le))});const te=j.bind(null,de,Le);return _e.push(te),ue(_e).then(()=>{_e=[];for(const se of u.list())_e.push(Oa(se,de,Le));return _e.push(te),ue(_e)}).then(()=>{_e=Ol(ve,"beforeRouteUpdate",de,Le);for(const se of ve)se.updateGuards.forEach(ce=>{_e.push(Oa(ce,de,Le))});return _e.push(te),ue(_e)}).then(()=>{_e=[];for(const se of Z)if(se.beforeEnter)if(Gn(se.beforeEnter))for(const ce of se.beforeEnter)_e.push(Oa(ce,de,Le));else _e.push(Oa(se.beforeEnter,de,Le));return _e.push(te),ue(_e)}).then(()=>(de.matched.forEach(se=>se.enterCallbacks={}),_e=Ol(Z,"beforeRouteEnter",de,Le),_e.push(te),ue(_e))).then(()=>{_e=[];for(const se of f.list())_e.push(Oa(se,de,Le));return _e.push(te),ue(_e)}).catch(se=>sa(se,8)?se:Promise.reject(se))}function ie(de,Le,_e){m.list().forEach(be=>G(()=>be(de,Le,_e)))}function ne(de,Le,_e,be,ve){const Z=W(de,Le);if(Z)return Z;const te=Le===Ta,se=zi?history.state:{};_e&&(be||te?l.replace(de.fullPath,mt({scroll:te&&se&&se.scroll},ve)):l.push(de.fullPath,ve)),x.value=de,De(de,Le,_e,te),Ee()}let oe;function le(){oe||(oe=l.listen((de,Le,_e)=>{if(!ze.listening)return;const be=B(de),ve=J(be);if(ve){Q(mt(ve,{replace:!0}),be).catch(Fs);return}w=be;const Z=x.value;zi&&y1(Rh(Z.fullPath,_e.delta),Yo()),ee(be,Z).catch(te=>sa(te,12)?te:sa(te,2)?(Q(te.to,be).then(se=>{sa(se,20)&&!_e.delta&&_e.type===Ks.pop&&l.go(-1,!1)}).catch(Fs),Promise.reject()):(_e.delta&&l.go(-_e.delta,!1),he(te,be,Z))).then(te=>{te=te||ne(be,Z,!1),te&&(_e.delta&&!sa(te,8)?l.go(-_e.delta,!1):_e.type===Ks.pop&&sa(te,20)&&l.go(-1,!1)),ie(be,Z,te)}).catch(Fs)}))}let Ae=xs(),we=xs(),fe;function he(de,Le,_e){Ee(de);const be=we.list();return be.length?be.forEach(ve=>ve(de,Le,_e)):console.error(de),Promise.reject(de)}function ke(){return fe&&x.value!==Ta?Promise.resolve():new Promise((de,Le)=>{Ae.add([de,Le])})}function Ee(de){return fe||(fe=!de,le(),Ae.list().forEach(([Le,_e])=>de?_e(de):Le()),Ae.reset()),de}function De(de,Le,_e,be){const{scrollBehavior:ve}=e;if(!zi||!ve)return Promise.resolve();const Z=!_e&&w1(Rh(de.fullPath,0))||(be||!_e)&&history.state&&history.state.scroll||null;return gt().then(()=>ve(de,Le,Z)).then(te=>te&&x1(te)).catch(te=>he(te,de,Le))}const Fe=de=>l.go(de);let Ze;const Je=new Set,ze={currentRoute:x,listening:!0,addRoute:_,removeRoute:V,hasRoute:X,getRoutes:D,resolve:B,options:e,push:Y,replace:N,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:u.add,beforeResolve:f.add,afterEach:m.add,onError:we.add,isReady:ke,install(de){const Le=this;de.component("RouterLink",iS),de.component("RouterView",cm),de.config.globalProperties.$router=Le,Object.defineProperty(de.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(x)}),zi&&!Ze&&x.value===Ta&&(Ze=!0,Y(l.location).catch(ve=>{}));const _e={};for(const ve in Ta)Object.defineProperty(_e,ve,{get:()=>x.value[ve],enumerable:!0});de.provide($u,Le),de.provide(lm,pu(_e)),de.provide(Sc,x);const be=de.unmount;Je.add(de),de.unmount=function(){Je.delete(de),Je.size<1&&(w=Ta,oe&&oe(),oe=null,x.value=Ta,Ze=!1,fe=!1),be()}}};function ue(de){return de.reduce((Le,_e)=>Le.then(()=>G(_e)),Promise.resolve())}return ze}function cS(e,a){const i=[],r=[],l=[],u=Math.max(a.matched.length,e.matched.length);for(let f=0;fUi(w,m))?r.push(m):i.push(m));const x=e.matched[f];x&&(a.matched.find(w=>Ui(w,x))||l.push(x))}return[i,r,l]}const uS=Si({__name:"App",setup(e){return(a,i)=>(vr(),Bo(_t(cm)))}}),dS="modulepreload",hS=function(e){return"/"+e},$h={},la=function(a,i,r){if(!i||i.length===0)return a();const l=document.getElementsByTagName("link");return Promise.all(i.map(u=>{if(u=hS(u),u in $h)return;$h[u]=!0;const f=u.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(!!r)for(let C=l.length-1;C>=0;C--){const A=l[C];if(A.href===u&&(!f||A.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const w=document.createElement("link");if(w.rel=f?"stylesheet":dS,f||(w.as="script",w.crossOrigin=""),w.href=u,document.head.appendChild(w),f)return new Promise((C,A)=>{w.addEventListener("load",C),w.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${u}`)))})})).then(()=>a()).catch(u=>{const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u})},fS={path:"/main",meta:{requiresAuth:!0},redirect:"/main/dashboard/default",component:()=>la(()=>import("./FullLayout-1f7c066a.js"),["assets/FullLayout-1f7c066a.js","assets/md5-7290f9de.js"]),children:[{name:"Dashboard",path:"/",component:()=>la(()=>import("./DefaultDashboard-058a0350.js"),["assets/DefaultDashboard-058a0350.js","assets/_plugin-vue_export-helper-c27b6911.js"])},{name:"Extensions",path:"/extension",component:()=>la(()=>import("./ExtensionPage-ad46d9b6.js"),["assets/ExtensionPage-ad46d9b6.js","assets/WaitingForRestart-47f65a77.js","assets/_plugin-vue_export-helper-c27b6911.js"])},{name:"Configs",path:"/config",component:()=>la(()=>import("./ConfigPage-b223906d.js"),["assets/ConfigPage-b223906d.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/WaitingForRestart-47f65a77.js","assets/ConfigPage-f564cc69.css"])},{name:"Default",path:"/dashboard/default",component:()=>la(()=>import("./DefaultDashboard-058a0350.js"),["assets/DefaultDashboard-058a0350.js","assets/_plugin-vue_export-helper-c27b6911.js"])},{name:"Console",path:"/console",component:()=>la(()=>import("./ConsolePage-025371c0.js"),["assets/ConsolePage-025371c0.js","assets/ConsolePage-ff373be6.css"])},{name:"FineTune",path:"/fine-tune",component:()=>la(()=>import("./FineTunePage-ccc77380.js"),["assets/FineTunePage-ccc77380.js","assets/_plugin-vue_export-helper-c27b6911.js"])}]},gS={path:"/auth",component:()=>la(()=>import("./BlankLayout-fa6b0499.js"),[]),meta:{requiresAuth:!1},children:[{name:"Login",path:"/auth/login",component:()=>la(()=>import("./LoginPage-6ceceb71.js"),["assets/LoginPage-6ceceb71.js","assets/md5-7290f9de.js","assets/LoginPage-74e85ca7.css"])}]};function um(e,a){return function(){return e.apply(a,arguments)}}const{toString:vS}=Object.prototype,{getPrototypeOf:Gu}=Object,Wo=(e=>a=>{const i=vS.call(a);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),a=>Wo(a)===e),jo=e=>a=>typeof a===e,{isArray:is}=Array,Zs=jo("undefined");function mS(e){return e!==null&&!Zs(e)&&e.constructor!==null&&!Zs(e.constructor)&&Sn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dm=qn("ArrayBuffer");function pS(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&dm(e.buffer),a}const bS=jo("string"),Sn=jo("function"),hm=jo("number"),$o=e=>e!==null&&typeof e=="object",xS=e=>e===!0||e===!1,qr=e=>{if(Wo(e)!=="object")return!1;const a=Gu(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},yS=qn("Date"),wS=qn("File"),SS=qn("Blob"),kS=qn("FileList"),CS=e=>$o(e)&&Sn(e.pipe),AS=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||Sn(e.append)&&((a=Wo(e))==="formdata"||a==="object"&&Sn(e.toString)&&e.toString()==="[object FormData]"))},PS=qn("URLSearchParams"),[ES,TS,IS,LS]=["ReadableStream","Request","Response","Headers"].map(qn),_S=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function br(e,a,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let r,l;if(typeof e!="object"&&(e=[e]),is(e))for(r=0,l=e.length;r0;)if(l=i[r],a===l.toLowerCase())return l;return null}const si=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),gm=e=>!Zs(e)&&e!==si;function kc(){const{caseless:e}=gm(this)&&this||{},a={},i=(r,l)=>{const u=e&&fm(a,l)||l;qr(a[u])&&qr(r)?a[u]=kc(a[u],r):qr(r)?a[u]=kc({},r):is(r)?a[u]=r.slice():a[u]=r};for(let r=0,l=arguments.length;r(br(a,(l,u)=>{i&&Sn(l)?e[u]=um(l,i):e[u]=l},{allOwnKeys:r}),e),OS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),VS=(e,a,i,r)=>{e.prototype=Object.create(a.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),i&&Object.assign(e.prototype,i)},MS=(e,a,i,r)=>{let l,u,f;const m={};if(a=a||{},e==null)return a;do{for(l=Object.getOwnPropertyNames(e),u=l.length;u-- >0;)f=l[u],(!r||r(f,e,a))&&!m[f]&&(a[f]=e[f],m[f]=!0);e=i!==!1&&Gu(e)}while(e&&(!i||i(e,a))&&e!==Object.prototype);return a},FS=(e,a,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=a.length;const r=e.indexOf(a,i);return r!==-1&&r===i},BS=e=>{if(!e)return null;if(is(e))return e;let a=e.length;if(!hm(a))return null;const i=new Array(a);for(;a-- >0;)i[a]=e[a];return i},DS=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&Gu(Uint8Array)),zS=(e,a)=>{const r=(e&&e[Symbol.iterator]).call(e);let l;for(;(l=r.next())&&!l.done;){const u=l.value;a.call(e,u[0],u[1])}},NS=(e,a)=>{let i;const r=[];for(;(i=e.exec(a))!==null;)r.push(i);return r},HS=qn("HTMLFormElement"),XS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,r,l){return r.toUpperCase()+l}),Gh=(({hasOwnProperty:e})=>(a,i)=>e.call(a,i))(Object.prototype),YS=qn("RegExp"),vm=(e,a)=>{const i=Object.getOwnPropertyDescriptors(e),r={};br(i,(l,u)=>{let f;(f=a(l,u,e))!==!1&&(r[u]=f||l)}),Object.defineProperties(e,r)},WS=e=>{vm(e,(a,i)=>{if(Sn(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=e[i];if(Sn(r)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},jS=(e,a)=>{const i={},r=l=>{l.forEach(u=>{i[u]=!0})};return is(e)?r(e):r(String(e).split(a)),i},$S=()=>{},GS=(e,a)=>e!=null&&Number.isFinite(e=+e)?e:a,Vl="abcdefghijklmnopqrstuvwxyz",Uh="0123456789",mm={DIGIT:Uh,ALPHA:Vl,ALPHA_DIGIT:Vl+Vl.toUpperCase()+Uh},US=(e=16,a=mm.ALPHA_DIGIT)=>{let i="";const{length:r}=a;for(;e--;)i+=a[Math.random()*r|0];return i};function qS(e){return!!(e&&Sn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const KS=e=>{const a=new Array(10),i=(r,l)=>{if($o(r)){if(a.indexOf(r)>=0)return;if(!("toJSON"in r)){a[l]=r;const u=is(r)?[]:{};return br(r,(f,m)=>{const x=i(f,l+1);!Zs(x)&&(u[m]=x)}),a[l]=void 0,u}}return r};return i(e,0)},ZS=qn("AsyncFunction"),JS=e=>e&&($o(e)||Sn(e))&&Sn(e.then)&&Sn(e.catch),pm=((e,a)=>e?setImmediate:a?((i,r)=>(si.addEventListener("message",({source:l,data:u})=>{l===si&&u===i&&r.length&&r.shift()()},!1),l=>{r.push(l),si.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Sn(si.postMessage)),QS=typeof queueMicrotask<"u"?queueMicrotask.bind(si):typeof process<"u"&&process.nextTick||pm,xe={isArray:is,isArrayBuffer:dm,isBuffer:mS,isFormData:AS,isArrayBufferView:pS,isString:bS,isNumber:hm,isBoolean:xS,isObject:$o,isPlainObject:qr,isReadableStream:ES,isRequest:TS,isResponse:IS,isHeaders:LS,isUndefined:Zs,isDate:yS,isFile:wS,isBlob:SS,isRegExp:YS,isFunction:Sn,isStream:CS,isURLSearchParams:PS,isTypedArray:DS,isFileList:kS,forEach:br,merge:kc,extend:RS,trim:_S,stripBOM:OS,inherits:VS,toFlatObject:MS,kindOf:Wo,kindOfTest:qn,endsWith:FS,toArray:BS,forEachEntry:zS,matchAll:NS,isHTMLForm:HS,hasOwnProperty:Gh,hasOwnProp:Gh,reduceDescriptors:vm,freezeMethods:WS,toObjectSet:jS,toCamelCase:XS,noop:$S,toFiniteNumber:GS,findKey:fm,global:si,isContextDefined:gm,ALPHABET:mm,generateString:US,isSpecCompliantForm:qS,toJSONObject:KS,isAsyncFn:ZS,isThenable:JS,setImmediate:pm,asap:QS};function it(e,a,i,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),i&&(this.config=i),r&&(this.request=r),l&&(this.response=l)}xe.inherits(it,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:xe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const bm=it.prototype,xm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xm[e]={value:e}});Object.defineProperties(it,xm);Object.defineProperty(bm,"isAxiosError",{value:!0});it.from=(e,a,i,r,l,u)=>{const f=Object.create(bm);return xe.toFlatObject(e,f,function(x){return x!==Error.prototype},m=>m!=="isAxiosError"),it.call(f,e.message,a,i,r,l),f.cause=e,f.name=e.name,u&&Object.assign(f,u),f};const ek=null;function Cc(e){return xe.isPlainObject(e)||xe.isArray(e)}function ym(e){return xe.endsWith(e,"[]")?e.slice(0,-2):e}function qh(e,a,i){return e?e.concat(a).map(function(l,u){return l=ym(l),!i&&u?"["+l+"]":l}).join(i?".":""):a}function tk(e){return xe.isArray(e)&&!e.some(Cc)}const nk=xe.toFlatObject(xe,{},null,function(a){return/^is[A-Z]/.test(a)});function Go(e,a,i){if(!xe.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,i=xe.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,X){return!xe.isUndefined(X[D])});const r=i.metaTokens,l=i.visitor||C,u=i.dots,f=i.indexes,x=(i.Blob||typeof Blob<"u"&&Blob)&&xe.isSpecCompliantForm(a);if(!xe.isFunction(l))throw new TypeError("visitor must be a function");function w(V){if(V===null)return"";if(xe.isDate(V))return V.toISOString();if(!x&&xe.isBlob(V))throw new it("Blob is not supported. Use a Buffer instead.");return xe.isArrayBuffer(V)||xe.isTypedArray(V)?x&&typeof Blob=="function"?new Blob([V]):Buffer.from(V):V}function C(V,D,X){let B=V;if(V&&!X&&typeof V=="object"){if(xe.endsWith(D,"{}"))D=r?D:D.slice(0,-2),V=JSON.stringify(V);else if(xe.isArray(V)&&tk(V)||(xe.isFileList(V)||xe.endsWith(D,"[]"))&&(B=xe.toArray(V)))return D=ym(D),B.forEach(function(W,Y){!(xe.isUndefined(W)||W===null)&&a.append(f===!0?qh([D],Y,u):f===null?D:D+"[]",w(W))}),!1}return Cc(V)?!0:(a.append(qh(X,D,u),w(V)),!1)}const A=[],E=Object.assign(nk,{defaultVisitor:C,convertValue:w,isVisitable:Cc});function _(V,D){if(!xe.isUndefined(V)){if(A.indexOf(V)!==-1)throw Error("Circular reference detected in "+D.join("."));A.push(V),xe.forEach(V,function(B,L){(!(xe.isUndefined(B)||B===null)&&l.call(a,B,xe.isString(L)?L.trim():L,D,E))===!0&&_(B,D?D.concat(L):[L])}),A.pop()}}if(!xe.isObject(e))throw new TypeError("data must be an object");return _(e),a}function Kh(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return a[r]})}function Uu(e,a){this._pairs=[],e&&Go(e,this,a)}const wm=Uu.prototype;wm.append=function(a,i){this._pairs.push([a,i])};wm.toString=function(a){const i=a?function(r){return a.call(this,r,Kh)}:Kh;return this._pairs.map(function(l){return i(l[0])+"="+i(l[1])},"").join("&")};function ak(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sm(e,a,i){if(!a)return e;const r=i&&i.encode||ak,l=i&&i.serialize;let u;if(l?u=l(a,i):u=xe.isURLSearchParams(a)?a.toString():new Uu(a,i).toString(r),u){const f=e.indexOf("#");f!==-1&&(e=e.slice(0,f)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class ik{constructor(){this.handlers=[]}use(a,i,r){return this.handlers.push({fulfilled:a,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){xe.forEach(this.handlers,function(r){r!==null&&a(r)})}}const Zh=ik,km={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sk=typeof URLSearchParams<"u"?URLSearchParams:Uu,rk=typeof FormData<"u"?FormData:null,ok=typeof Blob<"u"?Blob:null,lk={isBrowser:!0,classes:{URLSearchParams:sk,FormData:rk,Blob:ok},protocols:["http","https","file","blob","url","data"]},qu=typeof window<"u"&&typeof document<"u",ck=(e=>qu&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),uk=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),dk=qu&&window.location.href||"http://localhost",hk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qu,hasStandardBrowserEnv:ck,hasStandardBrowserWebWorkerEnv:uk,origin:dk},Symbol.toStringTag,{value:"Module"})),Yn={...hk,...lk};function fk(e,a){return Go(e,new Yn.classes.URLSearchParams,Object.assign({visitor:function(i,r,l,u){return Yn.isNode&&xe.isBuffer(i)?(this.append(r,i.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},a))}function gk(e){return xe.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function vk(e){const a={},i=Object.keys(e);let r;const l=i.length;let u;for(r=0;r=i.length;return f=!f&&xe.isArray(l)?l.length:f,x?(xe.hasOwnProp(l,f)?l[f]=[l[f],r]:l[f]=r,!m):((!l[f]||!xe.isObject(l[f]))&&(l[f]=[]),a(i,r,l[f],u)&&xe.isArray(l[f])&&(l[f]=vk(l[f])),!m)}if(xe.isFormData(e)&&xe.isFunction(e.entries)){const i={};return xe.forEachEntry(e,(r,l)=>{a(gk(r),l,i,0)}),i}return null}function mk(e,a,i){if(xe.isString(e))try{return(a||JSON.parse)(e),xe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(e)}const Ku={transitional:km,adapter:["xhr","http","fetch"],transformRequest:[function(a,i){const r=i.getContentType()||"",l=r.indexOf("application/json")>-1,u=xe.isObject(a);if(u&&xe.isHTMLForm(a)&&(a=new FormData(a)),xe.isFormData(a))return l?JSON.stringify(Cm(a)):a;if(xe.isArrayBuffer(a)||xe.isBuffer(a)||xe.isStream(a)||xe.isFile(a)||xe.isBlob(a)||xe.isReadableStream(a))return a;if(xe.isArrayBufferView(a))return a.buffer;if(xe.isURLSearchParams(a))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let m;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return fk(a,this.formSerializer).toString();if((m=xe.isFileList(a))||r.indexOf("multipart/form-data")>-1){const x=this.env&&this.env.FormData;return Go(m?{"files[]":a}:a,x&&new x,this.formSerializer)}}return u||l?(i.setContentType("application/json",!1),mk(a)):a}],transformResponse:[function(a){const i=this.transitional||Ku.transitional,r=i&&i.forcedJSONParsing,l=this.responseType==="json";if(xe.isResponse(a)||xe.isReadableStream(a))return a;if(a&&xe.isString(a)&&(r&&!this.responseType||l)){const f=!(i&&i.silentJSONParsing)&&l;try{return JSON.parse(a)}catch(m){if(f)throw m.name==="SyntaxError"?it.from(m,it.ERR_BAD_RESPONSE,this,null,this.response):m}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yn.classes.FormData,Blob:Yn.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};xe.forEach(["delete","get","head","post","put","patch"],e=>{Ku.headers[e]={}});const Zu=Ku,pk=xe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bk=e=>{const a={};let i,r,l;return e&&e.split(` `).forEach(function(f){l=f.indexOf(":"),i=f.substring(0,l).trim().toLowerCase(),r=f.substring(l+1).trim(),!(!i||a[i]&&pk[i])&&(i==="set-cookie"?a[i]?a[i].push(r):a[i]=[r]:a[i]=a[i]?a[i]+", "+r:r)}),a},Jh=Symbol("internals");function ys(e){return e&&String(e).trim().toLowerCase()}function Kr(e){return e===!1||e==null?e:xe.isArray(e)?e.map(Kr):String(e)}function xk(e){const a=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(e);)a[r[1]]=r[2];return a}const yk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ml(e,a,i,r,l){if(xe.isFunction(r))return r.call(this,a,i);if(l&&(a=i),!!xe.isString(a)){if(xe.isString(r))return a.indexOf(r)!==-1;if(xe.isRegExp(r))return r.test(a)}}function wk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,i,r)=>i.toUpperCase()+r)}function Sk(e,a){const i=xe.toCamelCase(" "+a);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+i,{value:function(l,u,f){return this[r].call(this,a,l,u,f)},configurable:!0})})}class Uo{constructor(a){a&&this.set(a)}set(a,i,r){const l=this;function u(m,x,w){const C=ys(x);if(!C)throw new Error("header name must be a non-empty string");const A=xe.findKey(l,C);(!A||l[A]===void 0||w===!0||w===void 0&&l[A]!==!1)&&(l[A||x]=Kr(m))}const f=(m,x)=>xe.forEach(m,(w,C)=>u(w,C,x));if(xe.isPlainObject(a)||a instanceof this.constructor)f(a,i);else if(xe.isString(a)&&(a=a.trim())&&!yk(a))f(bk(a),i);else if(xe.isHeaders(a))for(const[m,x]of a.entries())u(x,m,r);else a!=null&&u(i,a,r);return this}get(a,i){if(a=ys(a),a){const r=xe.findKey(this,a);if(r){const l=this[r];if(!i)return l;if(i===!0)return xk(l);if(xe.isFunction(i))return i.call(this,l,r);if(xe.isRegExp(i))return i.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,i){if(a=ys(a),a){const r=xe.findKey(this,a);return!!(r&&this[r]!==void 0&&(!i||Ml(this,this[r],r,i)))}return!1}delete(a,i){const r=this;let l=!1;function u(f){if(f=ys(f),f){const m=xe.findKey(r,f);m&&(!i||Ml(r,r[m],m,i))&&(delete r[m],l=!0)}}return xe.isArray(a)?a.forEach(u):u(a),l}clear(a){const i=Object.keys(this);let r=i.length,l=!1;for(;r--;){const u=i[r];(!a||Ml(this,this[u],u,a,!0))&&(delete this[u],l=!0)}return l}normalize(a){const i=this,r={};return xe.forEach(this,(l,u)=>{const f=xe.findKey(r,u);if(f){i[f]=Kr(l),delete i[u];return}const m=a?wk(u):String(u).trim();m!==u&&delete i[u],i[m]=Kr(l),r[m]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const i=Object.create(null);return xe.forEach(this,(r,l)=>{r!=null&&r!==!1&&(i[l]=a&&xe.isArray(r)?r.join(", "):r)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,i])=>a+": "+i).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...i){const r=new this(a);return i.forEach(l=>r.set(l)),r}static accessor(a){const r=(this[Jh]=this[Jh]={accessors:{}}).accessors,l=this.prototype;function u(f){const m=ys(f);r[m]||(Sk(l,f),r[m]=!0)}return xe.isArray(a)?a.forEach(u):u(a),this}}Uo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);xe.reduceDescriptors(Uo.prototype,({value:e},a)=>{let i=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(r){this[i]=r}}});xe.freezeMethods(Uo);const Wn=Uo;function Fl(e,a){const i=this||Zu,r=a||i,l=Wn.from(r.headers);let u=r.data;return xe.forEach(e,function(m){u=m.call(i,u,l.normalize(),a?a.status:void 0)}),l.normalize(),u}function Am(e){return!!(e&&e.__CANCEL__)}function ss(e,a,i){it.call(this,e??"canceled",it.ERR_CANCELED,a,i),this.name="CanceledError"}xe.inherits(ss,it,{__CANCEL__:!0});function Pm(e,a,i){const r=i.config.validateStatus;!i.status||!r||r(i.status)?e(i):a(new it("Request failed with status code "+i.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function kk(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}function Ck(e,a){e=e||10;const i=new Array(e),r=new Array(e);let l=0,u=0,f;return a=a!==void 0?a:1e3,function(x){const w=Date.now(),C=r[u];f||(f=w),i[l]=x,r[l]=w;let A=u,E=0;for(;A!==l;)E+=i[A++],A=A%e;if(l=(l+1)%e,l===u&&(u=(u+1)%e),w-f{i=C,l=null,u&&(clearTimeout(u),u=null),e.apply(null,w)};return[(...w)=>{const C=Date.now(),A=C-i;A>=r?f(w,C):(l=w,u||(u=setTimeout(()=>{u=null,f(l)},r-A)))},()=>l&&f(l)]}const oo=(e,a,i=3)=>{let r=0;const l=Ck(50,250);return Ak(u=>{const f=u.loaded,m=u.lengthComputable?u.total:void 0,x=f-r,w=l(x),C=f<=m;r=f;const A={loaded:f,total:m,progress:m?f/m:void 0,bytes:x,rate:w||void 0,estimated:w&&m&&C?(m-f)/w:void 0,event:u,lengthComputable:m!=null,[a?"download":"upload"]:!0};e(A)},i)},Qh=(e,a)=>{const i=e!=null;return[r=>a[0]({lengthComputable:i,total:e,loaded:r}),a[1]]},ef=e=>(...a)=>xe.asap(()=>e(...a)),Pk=Yn.hasStandardBrowserEnv?function(){const a=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let r;function l(u){let f=u;return a&&(i.setAttribute("href",f),f=i.href),i.setAttribute("href",f),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return r=l(window.location.href),function(f){const m=xe.isString(f)?l(f):f;return m.protocol===r.protocol&&m.host===r.host}}():function(){return function(){return!0}}(),Ek=Yn.hasStandardBrowserEnv?{write(e,a,i,r,l,u){const f=[e+"="+encodeURIComponent(a)];xe.isNumber(i)&&f.push("expires="+new Date(i).toGMTString()),xe.isString(r)&&f.push("path="+r),xe.isString(l)&&f.push("domain="+l),u===!0&&f.push("secure"),document.cookie=f.join("; ")},read(e){const a=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Tk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ik(e,a){return a?e.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):e}function Em(e,a){return e&&!Tk(a)?Ik(e,a):a}const tf=e=>e instanceof Wn?{...e}:e;function mi(e,a){a=a||{};const i={};function r(w,C,A){return xe.isPlainObject(w)&&xe.isPlainObject(C)?xe.merge.call({caseless:A},w,C):xe.isPlainObject(C)?xe.merge({},C):xe.isArray(C)?C.slice():C}function l(w,C,A){if(xe.isUndefined(C)){if(!xe.isUndefined(w))return r(void 0,w,A)}else return r(w,C,A)}function u(w,C){if(!xe.isUndefined(C))return r(void 0,C)}function f(w,C){if(xe.isUndefined(C)){if(!xe.isUndefined(w))return r(void 0,w)}else return r(void 0,C)}function m(w,C,A){if(A in a)return r(w,C);if(A in e)return r(void 0,w)}const x={url:u,method:u,data:u,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:m,headers:(w,C)=>l(tf(w),tf(C),!0)};return xe.forEach(Object.keys(Object.assign({},e,a)),function(C){const A=x[C]||l,E=A(e[C],a[C],C);xe.isUndefined(E)&&A!==m||(i[C]=E)}),i}const Tm=e=>{const a=mi({},e);let{data:i,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:u,headers:f,auth:m}=a;a.headers=f=Wn.from(f),a.url=Sm(Em(a.baseURL,a.url),e.params,e.paramsSerializer),m&&f.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):"")));let x;if(xe.isFormData(i)){if(Yn.hasStandardBrowserEnv||Yn.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((x=f.getContentType())!==!1){const[w,...C]=x?x.split(";").map(A=>A.trim()).filter(Boolean):[];f.setContentType([w||"multipart/form-data",...C].join("; "))}}if(Yn.hasStandardBrowserEnv&&(r&&xe.isFunction(r)&&(r=r(a)),r||r!==!1&&Pk(a.url))){const w=l&&u&&Ek.read(u);w&&f.set(l,w)}return a},Lk=typeof XMLHttpRequest<"u",_k=Lk&&function(e){return new Promise(function(i,r){const l=Tm(e);let u=l.data;const f=Wn.from(l.headers).normalize();let{responseType:m,onUploadProgress:x,onDownloadProgress:w}=l,C,A,E,_,V;function D(){_&&_(),V&&V(),l.cancelToken&&l.cancelToken.unsubscribe(C),l.signal&&l.signal.removeEventListener("abort",C)}let X=new XMLHttpRequest;X.open(l.method.toUpperCase(),l.url,!0),X.timeout=l.timeout;function B(){if(!X)return;const W=Wn.from("getAllResponseHeaders"in X&&X.getAllResponseHeaders()),N={data:!m||m==="text"||m==="json"?X.responseText:X.response,status:X.status,statusText:X.statusText,headers:W,config:e,request:X};Pm(function(Q){i(Q),D()},function(Q){r(Q),D()},N),X=null}"onloadend"in X?X.onloadend=B:X.onreadystatechange=function(){!X||X.readyState!==4||X.status===0&&!(X.responseURL&&X.responseURL.indexOf("file:")===0)||setTimeout(B)},X.onabort=function(){X&&(r(new it("Request aborted",it.ECONNABORTED,e,X)),X=null)},X.onerror=function(){r(new it("Network Error",it.ERR_NETWORK,e,X)),X=null},X.ontimeout=function(){let Y=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const N=l.transitional||km;l.timeoutErrorMessage&&(Y=l.timeoutErrorMessage),r(new it(Y,N.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,X)),X=null},u===void 0&&f.setContentType(null),"setRequestHeader"in X&&xe.forEach(f.toJSON(),function(Y,N){X.setRequestHeader(N,Y)}),xe.isUndefined(l.withCredentials)||(X.withCredentials=!!l.withCredentials),m&&m!=="json"&&(X.responseType=l.responseType),w&&([E,V]=oo(w,!0),X.addEventListener("progress",E)),x&&X.upload&&([A,_]=oo(x),X.upload.addEventListener("progress",A),X.upload.addEventListener("loadend",_)),(l.cancelToken||l.signal)&&(C=W=>{X&&(r(!W||W.type?new ss(null,e,X):W),X.abort(),X=null)},l.cancelToken&&l.cancelToken.subscribe(C),l.signal&&(l.signal.aborted?C():l.signal.addEventListener("abort",C)));const L=kk(l.url);if(L&&Yn.protocols.indexOf(L)===-1){r(new it("Unsupported protocol "+L+":",it.ERR_BAD_REQUEST,e));return}X.send(u||null)})},Rk=(e,a)=>{let i=new AbortController,r;const l=function(x){if(!r){r=!0,f();const w=x instanceof Error?x:this.reason;i.abort(w instanceof it?w:new ss(w instanceof Error?w.message:w))}};let u=a&&setTimeout(()=>{l(new it(`timeout ${a} of ms exceeded`,it.ETIMEDOUT))},a);const f=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(x=>{x&&(x.removeEventListener?x.removeEventListener("abort",l):x.unsubscribe(l))}),e=null)};e.forEach(x=>x&&x.addEventListener&&x.addEventListener("abort",l));const{signal:m}=i;return m.unsubscribe=f,[m,()=>{u&&clearTimeout(u),u=null}]},Ok=Rk,Vk=function*(e,a){let i=e.byteLength;if(!a||i{const u=Mk(e,a,l);let f=0,m,x=w=>{m||(m=!0,r&&r(w))};return new ReadableStream({async pull(w){try{const{done:C,value:A}=await u.next();if(C){x(),w.close();return}let E=A.byteLength;if(i){let _=f+=E;i(_)}w.enqueue(new Uint8Array(A))}catch(C){throw x(C),C}},cancel(w){return x(w),u.return()}},{highWaterMark:2})},qo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Im=qo&&typeof ReadableStream=="function",Ac=qo&&(typeof TextEncoder=="function"?(e=>a=>e.encode(a))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Lm=(e,...a)=>{try{return!!e(...a)}catch{return!1}},Fk=Im&&Lm(()=>{let e=!1;const a=new Request(Yn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!a}),af=64*1024,Pc=Im&&Lm(()=>xe.isReadableStream(new Response("").body)),lo={stream:Pc&&(e=>e.body)};qo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!lo[a]&&(lo[a]=xe.isFunction(e[a])?i=>i[a]():(i,r)=>{throw new it(`Response type '${a}' is not supported`,it.ERR_NOT_SUPPORT,r)})})})(new Response);const Bk=async e=>{if(e==null)return 0;if(xe.isBlob(e))return e.size;if(xe.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(xe.isArrayBufferView(e)||xe.isArrayBuffer(e))return e.byteLength;if(xe.isURLSearchParams(e)&&(e=e+""),xe.isString(e))return(await Ac(e)).byteLength},Dk=async(e,a)=>{const i=xe.toFiniteNumber(e.getContentLength());return i??Bk(a)},zk=qo&&(async e=>{let{url:a,method:i,data:r,signal:l,cancelToken:u,timeout:f,onDownloadProgress:m,onUploadProgress:x,responseType:w,headers:C,withCredentials:A="same-origin",fetchOptions:E}=Tm(e);w=w?(w+"").toLowerCase():"text";let[_,V]=l||u||f?Ok([l,u],f):[],D,X;const B=()=>{!D&&setTimeout(()=>{_&&_.unsubscribe()}),D=!0};let L;try{if(x&&Fk&&i!=="get"&&i!=="head"&&(L=await Dk(C,r))!==0){let J=new Request(a,{method:"POST",body:r,duplex:"half"}),Q;if(xe.isFormData(r)&&(Q=J.headers.get("content-type"))&&C.setContentType(Q),J.body){const[j,G]=Qh(L,oo(ef(x)));r=nf(J.body,af,j,G,Ac)}}xe.isString(A)||(A=A?"include":"omit"),X=new Request(a,{...E,signal:_,method:i.toUpperCase(),headers:C.normalize().toJSON(),body:r,duplex:"half",credentials:A});let W=await fetch(X);const Y=Pc&&(w==="stream"||w==="response");if(Pc&&(m||Y)){const J={};["status","statusText","headers"].forEach(ee=>{J[ee]=W[ee]});const Q=xe.toFiniteNumber(W.headers.get("content-length")),[j,G]=m&&Qh(Q,oo(ef(m),!0))||[];W=new Response(nf(W.body,af,j,()=>{G&&G(),Y&&B()},Ac),J)}w=w||"text";let N=await lo[xe.findKey(lo,w)||"text"](W,e);return!Y&&B(),V&&V(),await new Promise((J,Q)=>{Pm(J,Q,{data:N,headers:Wn.from(W.headers),status:W.status,statusText:W.statusText,config:e,request:X})})}catch(W){throw B(),W&&W.name==="TypeError"&&/fetch/i.test(W.message)?Object.assign(new it("Network Error",it.ERR_NETWORK,e,X),{cause:W.cause||W}):it.from(W,W&&W.code,e,X)}}),Ec={http:ek,xhr:_k,fetch:zk};xe.forEach(Ec,(e,a)=>{if(e){try{Object.defineProperty(e,"name",{value:a})}catch{}Object.defineProperty(e,"adapterName",{value:a})}});const sf=e=>`- ${e}`,Nk=e=>xe.isFunction(e)||e===null||e===!1,_m={getAdapter:e=>{e=xe.isArray(e)?e:[e];const{length:a}=e;let i,r;const l={};for(let u=0;u`adapter ${m} `+(x===!1?"is not supported by the environment":"is not available in the build"));let f=a?u.length>1?`since : `+u.map(sf).join(` diff --git a/dashboard/dist/assets/md5-f9642456.js b/dashboard/dist/assets/md5-7290f9de.js similarity index 99% rename from dashboard/dist/assets/md5-f9642456.js rename to dashboard/dist/assets/md5-7290f9de.js index c0ef8ebc2..0fa23e999 100644 --- a/dashboard/dist/assets/md5-f9642456.js +++ b/dashboard/dist/assets/md5-7290f9de.js @@ -1,4 +1,4 @@ -import{as as K,at as Y,au as V}from"./index-3360c831.js";var C={exports:{}};const $={},k=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),z=K(k);/** +import{as as K,at as Y,au as V}from"./index-59964cc6.js";var C={exports:{}};const $={},k=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),z=K(k);/** * [js-md5]{@link https://github.com/emn178/js-md5} * * @namespace md5 diff --git a/dashboard/dist/index.html b/dashboard/dist/index.html index 5a323ee3b..aeef81e12 100644 --- a/dashboard/dist/index.html +++ b/dashboard/dist/index.html @@ -11,7 +11,7 @@ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap" /> AstrBot - 仪表盘 - +