Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-23 04:19:20 +08:00
v3-admin-vite/static/index.df02a037.js

2 lines
31 KiB
JavaScript

import{d as e,_ as t,a,u as n,c as r,r as i,o as l,b as s,e as o,w as c,T as d,f as u,g as h,h as f,i as m,j as p,k as g,l as v,m as w,t as A,n as b,F as y,p as C,q as k,s as x,v as E,E as S,x as V,y as T,z as B,A as D,B as L,C as F,D as R,G as M,H as O,I as _,J as I,K as N,L as P,M as z,N as Y,O as j,P as Q,Q as H,R as q,S as U,U as J,V as X,W as G}from"./index.f5832b78.js";import{_ as K}from"./index.29cd492e.js";const W=!0,Z=!0,$=!0,ee=!0,te=!0,ae=!0,ne=e({id:"settings",state:()=>({fixedHeader:$,showSettings:W,showTagsView:Z,showSidebarLogo:ee,showThemeSwitch:te,showScreenfull:ae}),actions:{changeSetting(e){const{key:t,value:a}=e;switch(t){case"fixedHeader":this.fixedHeader=a;break;case"showSettings":this.showSettings=a;break;case"showSidebarLogo":this.showSidebarLogo=a;break;case"showTagsView":this.showTagsView=a;break;case"showThemeSwitch":this.showThemeSwitch=a;break;case"showScreenfull":this.showScreenfull=a}}}});const re={class:"app-main"};var ie=t(a({__name:"AppMain",setup(e){const t=n(),a=r((()=>t.path));return(e,t)=>{const n=i("router-view");return l(),s("section",re,[o(n,null,{default:c((({Component:e})=>[o(d,{name:"fade-transform",mode:"out-in"},{default:c((()=>[(l(),u(f(e),{key:h(a)}))])),_:2},1024)])),_:1})])}}}),[["__scopeId","data-v-aa7291bc"]]);function le(e,t){void 0===t&&(t={});for(var a=function(e){for(var t=[],a=0;a<e.length;){var n=e[a];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:a,value:e[a++]});else{var r=1,i="";if("?"===e[s=a+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--r){s++;break}}else if("("===e[s]&&(r++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));i+=e[s++]}else i+=e[s++]+e[s++];if(r)throw new TypeError("Unbalanced pattern at ".concat(a));if(!i)throw new TypeError("Missing pattern at ".concat(a));t.push({type:"PATTERN",index:a,value:i}),a=s}else{for(var l="",s=a+1;s<e.length;){var o=e.charCodeAt(s);if(!(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||95===o))break;l+=e[s++]}if(!l)throw new TypeError("Missing parameter name at ".concat(a));t.push({type:"NAME",index:a,value:l}),a=s}else t.push({type:"CLOSE",index:a,value:e[a++]});else t.push({type:"OPEN",index:a,value:e[a++]});else t.push({type:"ESCAPED_CHAR",index:a++,value:e[a++]});else t.push({type:"MODIFIER",index:a,value:e[a++]})}return t.push({type:"END",index:a,value:""}),t}(e),n=t.prefixes,r=void 0===n?"./":n,i="[^".concat(function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}(t.delimiter||"/#?"),"]+?"),l=[],s=0,o=0,c="",d=function(e){if(o<a.length&&a[o].type===e)return a[o++].value},u=function(e){var t=d(e);if(void 0!==t)return t;var n=a[o],r=n.type,i=n.index;throw new TypeError("Unexpected ".concat(r," at ").concat(i,", expected ").concat(e))},h=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t};o<a.length;){var f=d("CHAR"),m=d("NAME"),p=d("PATTERN");if(m||p){var g=f||"";-1===r.indexOf(g)&&(c+=g,g=""),c&&(l.push(c),c=""),l.push({name:m||s++,prefix:g,suffix:"",pattern:p||i,modifier:d("MODIFIER")||""})}else{var v=f||d("ESCAPED_CHAR");if(v)c+=v;else if(c&&(l.push(c),c=""),d("OPEN")){g=h();var w=d("NAME")||"",A=d("PATTERN")||"",b=h();u("CLOSE"),l.push({name:w||(A?s++:""),pattern:w&&!A?i:A,prefix:g,suffix:b,modifier:d("MODIFIER")||""})}else u("END")}}return l}function se(e,t){return function(e,t){void 0===t&&(t={});var a=function(e){return e&&e.sensitive?"":"i"}(t),n=t.encode,r=void 0===n?function(e){return e}:n,i=t.validate,l=void 0===i||i,s=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:".concat(e.pattern,")$"),a)}));return function(t){for(var a="",n=0;n<e.length;n++){var i=e[n];if("string"!=typeof i){var o=t?t[i.name]:void 0,c="?"===i.modifier||"*"===i.modifier,d="*"===i.modifier||"+"===i.modifier;if(Array.isArray(o)){if(!d)throw new TypeError('Expected "'.concat(i.name,'" to not repeat, but got an array'));if(0===o.length){if(c)continue;throw new TypeError('Expected "'.concat(i.name,'" to not be empty'))}for(var u=0;u<o.length;u++){var h=r(o[u],i);if(l&&!s[n].test(h))throw new TypeError('Expected all "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(h,'"'));a+=i.prefix+h+i.suffix}}else if("string"!=typeof o&&"number"!=typeof o){if(!c){var f=d?"an array":"a string";throw new TypeError('Expected "'.concat(i.name,'" to be ').concat(f))}}else{h=r(String(o),i);if(l&&!s[n].test(h))throw new TypeError('Expected "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(h,'"'));a+=i.prefix+h+i.suffix}}else a+=i}return a}}(le(e,t),t)}const oe={key:0,class:"no-redirect"},ce=["onClick"];var de=t(a({__name:"index",setup(e){const t=n(),a=m(),r=p({breadcrumbs:[],getBreadcrumb:()=>{const e=t.matched.filter((e=>e.meta&&e.meta.title));r.breadcrumbs=e.filter((e=>e.meta&&e.meta.title&&!1!==e.meta.breadcrumb))},handleLink(e){const{redirect:n,path:r}=e;n?a.push(n).catch((e=>{console.warn(e)})):a.push((e=>{const{params:a}=t;return se(e)(a)})(r)).catch((e=>{console.warn(e)}))}});return g((()=>t.path),(e=>{e.startsWith("/redirect/")||r.getBreadcrumb()})),v((()=>{r.getBreadcrumb()})),(e,t)=>{const a=i("el-breadcrumb-item"),n=i("el-breadcrumb");return l(),u(n,{class:"app-breadcrumb"},{default:c((()=>[o(C,{name:"breadcrumb"},{default:c((()=>[(l(!0),s(y,null,w(r.breadcrumbs,((e,t)=>(l(),u(a,{key:e.path},{default:c((()=>["noRedirect"===e.redirect||t===r.breadcrumbs.length-1?(l(),s("span",oe,A(e.meta.title),1)):(l(),s("a",{key:1,onClick:b((t=>r.handleLink(e)),["prevent"])},A(e.meta.title),9,ce))])),_:2},1024)))),128))])),_:1})])),_:1})}}}),[["__scopeId","data-v-08046a78"]]);var ue=t(a({__name:"index",props:{isActive:{type:Boolean,default:!1}},emits:["toggle-click"],setup(e,{emit:t}){const a=()=>{t("toggle-click")};return(t,n)=>{const r=i("el-icon");return l(),s("div",{onClick:a},[o(r,{size:20,class:"icon"},{default:c((()=>[e.isActive?(l(),u(h(k),{key:0})):(l(),u(h(x),{key:1}))])),_:1})])}}}),[["__scopeId","data-v-185d6f6c"]]);const he=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],fe=(()=>{if("undefined"==typeof document)return!1;const e=he[0],t={};for(const a of he){if((null==a?void 0:a[1])in document){for(const[n,r]of a.entries())t[e[n]]=r;return t}}return!1})(),me={change:fe.fullscreenchange,error:fe.fullscreenerror};let pe={request:(e=document.documentElement,t)=>new Promise(((a,n)=>{const r=()=>{pe.off("change",r),a()};pe.on("change",r);const i=e[fe.requestFullscreen](t);i instanceof Promise&&i.then(r).catch(n)})),exit:()=>new Promise(((e,t)=>{if(!pe.isFullscreen)return void e();const a=()=>{pe.off("change",a),e()};pe.on("change",a);const n=document[fe.exitFullscreen]();n instanceof Promise&&n.then(a).catch(t)})),toggle:(e,t)=>pe.isFullscreen?pe.exit():pe.request(e,t),onchange(e){pe.on("change",e)},onerror(e){pe.on("error",e)},on(e,t){const a=me[e];a&&document.addEventListener(a,t,!1)},off(e,t){const a=me[e];a&&document.removeEventListener(a,t,!1)},raw:fe};Object.defineProperties(pe,{isFullscreen:{get:()=>Boolean(document[fe.fullscreenElement])},element:{enumerable:!0,get:()=>{var e;return null!=(e=document[fe.fullscreenElement])?e:void 0}},isEnabled:{enumerable:!0,get:()=>Boolean(document[fe.fullscreenEnabled])}}),fe||(pe={isEnabled:!1});var ge=pe;const ve=a({__name:"index",setup(e){const t=()=>{ge.isEnabled?ge.toggle():S.warning("您的浏览器无法工作")};return(e,a)=>{const n=i("el-icon"),r=i("el-tooltip");return l(),s("div",{onClick:t},[o(r,{effect:"dark",content:"全屏",placement:"bottom"},{default:c((()=>[o(n,{size:20},{default:c((()=>[o(h(E))])),_:1})])),_:1})])}}});const we=e=>(R("data-v-1e54f6a0"),e=e(),M(),e),Ae={class:"navbar"},be={class:"right-menu"},ye={target:"_blank",href:"https://juejin.cn/post/7089377403717287972"},Ce=F("V3-Admin-Vite 中文文档"),ke={target:"_blank",href:"https://github.com/un-pany/v3-admin-vite"},xe=F("V3-Admin-Vite GitHub"),Ee={target:"_blank",href:"https://gitee.com/un-pany/v3-admin-vite"},Se=F("V3-Admin-Vite Gitee"),Ve={target:"_blank",href:"https://juejin.cn/post/6963876125428678693"},Te=F("V3-Admin 中文文档"),Be={target:"_blank",href:"https://github.com/un-pany/v3-admin/blob/master/README.en.md"},De=F("V3-Admin English Docs"),Le={target:"_blank",href:"https://github.com/un-pany/v3-admin"},Fe=F("V3-Admin GitHub"),Re={target:"_blank",href:"https://gitee.com/un-pany/v3-admin"},Me=F("V3-Admin Gitee"),Oe=we((()=>B("span",{style:{display:"block"}},"退出登录",-1)));var _e=t(a({__name:"index",setup(e){const t=m(),a=V(),n=ne(),d=T(),f=r((()=>a.sidebar)),g=r((()=>n.showThemeSwitch)),v=r((()=>n.showScreenfull)),w=p({toggleSideBar:()=>{a.toggleSidebar(!1)},logout:()=>{d.logout(),t.push("/login").catch((e=>{console.warn(e)}))}});return(e,t)=>{const a=i("el-avatar"),n=i("el-dropdown-item"),r=i("el-dropdown-menu"),d=i("el-dropdown");return l(),s("div",Ae,[o(ue,{"is-active":h(f).opened,class:"hamburger",onToggleClick:w.toggleSideBar},null,8,["is-active","onToggleClick"]),o(de,{class:"breadcrumb"}),B("div",be,[h(v)?(l(),u(ve,{key:0,class:"right-menu-item"})):D("",!0),h(g)?(l(),u(K,{key:1,class:"right-menu-item"})):D("",!0),o(d,{class:"right-menu-item"},{dropdown:c((()=>[o(r,null,{default:c((()=>[B("a",ye,[o(n,null,{default:c((()=>[Ce])),_:1})]),B("a",ke,[o(n,null,{default:c((()=>[xe])),_:1})]),B("a",Ee,[o(n,null,{default:c((()=>[Se])),_:1})]),B("a",Ve,[o(n,{divided:""},{default:c((()=>[Te])),_:1})]),B("a",Be,[o(n,null,{default:c((()=>[De])),_:1})]),B("a",Le,[o(n,null,{default:c((()=>[Fe])),_:1})]),B("a",Re,[o(n,null,{default:c((()=>[Me])),_:1})]),o(n,{divided:"",onClick:w.logout},{default:c((()=>[Oe])),_:1},8,["onClick"])])),_:1})])),default:c((()=>[o(a,{icon:h(L),size:34},null,8,["icon"])])),_:1})])])}}}),[["__scopeId","data-v-1e54f6a0"]]);const Ie=e=>(R("data-v-7fa4ebc8"),e=e(),M(),e),Ne={class:"drawer-container"},Pe=Ie((()=>B("h3",{class:"drawer-title"},"系统布局配置",-1))),ze={class:"drawer-item"},Ye=Ie((()=>B("span",null,"显示标签栏",-1))),je={class:"drawer-item"},Qe=Ie((()=>B("span",null,"显示侧边栏 Logo",-1))),He={class:"drawer-item"},qe=Ie((()=>B("span",null,"固定 Header",-1))),Ue={class:"drawer-item"},Je=Ie((()=>B("span",null,"显示切换主题按钮",-1))),Xe={class:"drawer-item"},Ge=Ie((()=>B("span",null,"显示全屏按钮",-1)));var Ke=t(a({__name:"index",setup(e){const t=ne(),a=p({fixedHeader:t.fixedHeader,showTagsView:t.showTagsView,showSidebarLogo:t.showSidebarLogo,showThemeSwitch:t.showThemeSwitch,showScreenfull:t.showScreenfull});return g((()=>a.fixedHeader),(e=>{t.changeSetting({key:"fixedHeader",value:e})})),g((()=>a.showTagsView),(e=>{t.changeSetting({key:"showTagsView",value:e})})),g((()=>a.showSidebarLogo),(e=>{t.changeSetting({key:"showSidebarLogo",value:e})})),g((()=>a.showThemeSwitch),(e=>{t.changeSetting({key:"showThemeSwitch",value:e})})),g((()=>a.showScreenfull),(e=>{t.changeSetting({key:"showScreenfull",value:e})})),(e,t)=>{const n=i("el-switch");return l(),s("div",Ne,[B("div",null,[Pe,B("div",ze,[Ye,o(n,{modelValue:a.showTagsView,"onUpdate:modelValue":t[0]||(t[0]=e=>a.showTagsView=e),class:"drawer-switch"},null,8,["modelValue"])]),B("div",je,[Qe,o(n,{modelValue:a.showSidebarLogo,"onUpdate:modelValue":t[1]||(t[1]=e=>a.showSidebarLogo=e),class:"drawer-switch"},null,8,["modelValue"])]),B("div",He,[qe,o(n,{modelValue:a.fixedHeader,"onUpdate:modelValue":t[2]||(t[2]=e=>a.fixedHeader=e),class:"drawer-switch"},null,8,["modelValue"])]),B("div",Ue,[Je,o(n,{modelValue:a.showThemeSwitch,"onUpdate:modelValue":t[3]||(t[3]=e=>a.showThemeSwitch=e),class:"drawer-switch"},null,8,["modelValue"])]),B("div",Xe,[Ge,o(n,{modelValue:a.showScreenfull,"onUpdate:modelValue":t[4]||(t[4]=e=>a.showScreenfull=e),class:"drawer-switch"},null,8,["modelValue"])])])])}}}),[["__scopeId","data-v-7fa4ebc8"]]);const We=e=>/^(https?:|mailto:|tel:)/.test(e);function Ze(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function $e(e,t){for(var a,n="",r=0,i=-1,l=0,s=0;s<=e.length;++s){if(s<e.length)a=e.charCodeAt(s);else{if(47===a)break;a=47}if(47===a){if(i===s-1||1===l);else if(i!==s-1&&2===l){if(n.length<2||2!==r||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var o=n.lastIndexOf("/");if(o!==n.length-1){-1===o?(n="",r=0):r=(n=n.slice(0,o)).length-1-n.lastIndexOf("/"),i=s,l=0;continue}}else if(2===n.length||1===n.length){n="",r=0,i=s,l=0;continue}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,l=0}else 46===a&&-1!==l?++l:l=-1}return n}var et={resolve:function(){for(var e,t="",a=!1,n=arguments.length-1;n>=-1&&!a;n--){var r;n>=0?r=arguments[n]:(void 0===e&&(e=process.cwd()),r=e),Ze(r),0!==r.length&&(t=r+"/"+t,a=47===r.charCodeAt(0))}return t=$e(t,!a),a?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(Ze(e),0===e.length)return".";var t=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=$e(e,!t)).length||t||(e="."),e.length>0&&a&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return Ze(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var a=arguments[t];Ze(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":et.normalize(e)},relative:function(e,t){if(Ze(e),Ze(t),e===t)return"";if((e=et.resolve(e))===(t=et.resolve(t)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var n=e.length,r=n-a,i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var l=t.length-i,s=r<l?r:l,o=-1,c=0;c<=s;++c){if(c===s){if(l>s){if(47===t.charCodeAt(i+c))return t.slice(i+c+1);if(0===c)return t.slice(i+c)}else r>s&&(47===e.charCodeAt(a+c)?o=c:0===c&&(o=0));break}var d=e.charCodeAt(a+c);if(d!==t.charCodeAt(i+c))break;47===d&&(o=c)}var u="";for(c=a+o+1;c<=n;++c)c!==n&&47!==e.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return u.length>0?u+t.slice(i+o):(i+=o,47===t.charCodeAt(i)&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(Ze(e),0===e.length)return".";for(var t=e.charCodeAt(0),a=47===t,n=-1,r=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!r){n=i;break}}else r=!1;return-1===n?a?"/":".":a&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ze(e);var a,n=0,r=-1,i=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var l=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){var o=e.charCodeAt(a);if(47===o){if(!i){n=a+1;break}}else-1===s&&(i=!1,s=a+1),l>=0&&(o===t.charCodeAt(l)?-1==--l&&(r=a):(l=-1,r=s))}return n===r?r=s:-1===r&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(47===e.charCodeAt(a)){if(!i){n=a+1;break}}else-1===r&&(i=!1,r=a+1);return-1===r?"":e.slice(n,r)},extname:function(e){Ze(e);for(var t=-1,a=0,n=-1,r=!0,i=0,l=e.length-1;l>=0;--l){var s=e.charCodeAt(l);if(47!==s)-1===n&&(r=!1,n=l+1),46===s?-1===t?t=l:1!==i&&(i=1):-1!==t&&(i=-1);else if(!r){a=l+1;break}}return-1===t||-1===n||0===i||1===i&&t===n-1&&t===a+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var a=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return a?a===t.root?a+n:a+e+n:n}("/",e)},parse:function(e){Ze(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var a,n=e.charCodeAt(0),r=47===n;r?(t.root="/",a=1):a=0;for(var i=-1,l=0,s=-1,o=!0,c=e.length-1,d=0;c>=a;--c)if(47!==(n=e.charCodeAt(c)))-1===s&&(o=!1,s=c+1),46===n?-1===i?i=c:1!==d&&(d=1):-1!==i&&(d=-1);else if(!o){l=c+1;break}return-1===i||-1===s||0===d||1===d&&i===s-1&&i===l+1?-1!==s&&(t.base=t.name=0===l&&r?e.slice(1,s):e.slice(l,s)):(0===l&&r?(t.name=e.slice(1,i),t.base=e.slice(1,s)):(t.name=e.slice(l,i),t.base=e.slice(l,s)),t.ext=e.slice(i,s)),l>0?t.dir=e.slice(0,l-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};et.posix=et;var tt=et;const at=["href"],nt=a({__name:"SidebarItemLink",props:{to:{type:String,required:!0}},setup(e){const t=e,a=m(),n=()=>{a.push(t.to).catch((e=>{console.warn(e)}))};return(t,a)=>h(We)(e.to)?(l(),s("a",{key:0,href:e.to,target:"_blank",rel:"noopener"},[O(t.$slots,"default")],8,at)):(l(),s("div",{key:1,onClick:n},[O(t.$slots,"default")]))}});const rt={key:1};var it=t(a({__name:"SidebarItem",props:{item:{type:Object,required:!0},isCollapse:{type:Boolean,required:!1},isFirstLevel:{type:Boolean,default:!0},basePath:{type:String,required:!0}},setup(e){const t=e,a=r((()=>!(!t.item.meta||!t.item.meta.alwaysShow))),n=r((()=>{if(t.item.children){return t.item.children.filter((e=>!(e.meta&&e.meta.hidden))).length}return 0})),d=r((()=>{if(n.value>1)return null;if(t.item.children)for(const e of t.item.children)if(!e.meta||!e.meta.hidden)return e;return{...t.item,path:""}})),f=e=>We(e)?e:We(t.basePath)?t.basePath:tt.resolve(t.basePath,e);return(t,n)=>{const r=i("svg-icon"),m=i("el-menu-item"),p=i("sidebar-item",!0),g=i("el-sub-menu");return e.item.meta&&e.item.meta.hidden?D("",!0):(l(),s("div",{key:0,class:I({"simple-mode":e.isCollapse,"first-level":e.isFirstLevel})},[h(a)||!h(d)||h(d).children?(l(),u(g,{key:1,index:f(e.item.path),"popper-append-to-body":""},{title:c((()=>[e.item.meta&&e.item.meta.icon?(l(),u(r,{key:0,name:e.item.meta.icon},null,8,["name"])):D("",!0),e.item.meta&&e.item.meta.title?(l(),s("span",rt,A(e.item.meta.title),1)):D("",!0)])),default:c((()=>[e.item.children?(l(!0),s(y,{key:0},w(e.item.children,(t=>(l(),u(p,{key:t.path,item:t,"is-collapse":e.isCollapse,"is-first-level":!1,"base-path":f(t.path)},null,8,["item","is-collapse","base-path"])))),128)):D("",!0)])),_:1},8,["index"])):(l(),s(y,{key:0},[h(d).meta?(l(),u(nt,{key:0,to:f(h(d).path)},{default:c((()=>[o(m,{index:f(h(d).path)},_({default:c((()=>[h(d).meta.icon?(l(),u(r,{key:0,name:h(d).meta.icon},null,8,["name"])):D("",!0)])),_:2},[h(d).meta.title?{name:"title",fn:c((()=>[F(A(h(d).meta.title),1)]))}:void 0]),1032,["index"])])),_:1},8,["to"])):D("",!0)],64))],2))}}}),[["__scopeId","data-v-c9234b78"]]);const lt=e=>(R("data-v-2e9b9e63"),e=e(),M(),e),st=lt((()=>B("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAADWxJREFUeF7tnXuQFNUVxr9vdsFEyKNQqWgexlQlGhKtlCRijLgzgBLwrYgPnt2zQNQIie9EjWiCFYwajYou7PYgoBVfMWWJKAHmziJBKTVWQCMGY9QyaqLG+CjFZfqkelwoWHd3+t7unumZ6Vu1tX/sOeee891f3+2+3X2bSFpDK8CGrj4pHgkADQ5BAkACQIMr0ODlJzNAAkCDK9Dg5SczQAJAgyvQ4OUnM0ACQIMr0ODlJzNAAkCDK9Dg5SczQAJA/wqkO2RupTVSWVa8T9Ma046cCsE3Tf0D+6UgyuIVpnHKzgBpR/IA0qYdmPgpm2XzMokbt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J1f8Cq1rl3bkLwC+o+tXsif287t4Vk0ArlU2zzcqsAGc0jm5D4ITjEotIuP3MfTqAEDcqiyeaVRclZyCXNsrm9o6tzgyn4DZN4niDIB3IyNv0bvUqakWBAAKDshnuVmn4BZHOvjxJpT6LcYA3KdsnqRfUfU9AgGQwvH56Zrbz+bkEQh+YFQ58X1l0Xu3sGzTnpr6i9ifSEKsLFj0VrtqsgUCwOBKJ+2I93WSPU3EcpsxzO9NtMoAQKzbOghHrp/ID0wKioNPEAAAbBrYjENXTuX7fmpJ52QOBNf7se3NZoDgi3/K8l9+/CsBwFNNTRizehrf9JNQXG0CAuBtR3tJ3mLZxR1vu/mPuvCodylnqsXAZgz2C1u0AAi2dDVj9LppfMm0mLj4BQXAq6McBOmcHADgJkhpy3nT9oayuZdf5+gAELzquhjdOaP2HujoTbwwACjFJVZTsFIEb7IJr4nrcYF9QOzpCuYQGOp38Hqz0/2wZSQAlD6BIhitsnw8SDFx8g0NgIiL8p4Oylu8w283UQCwCkWM8bsS5TfRatvVCgDNTdh3lca/3NAB8D6ElG/l8moPWNj91wgA2nsghw5AvR3520GKPQCC/xEYobviGCoAYR91cYoXewCAXymbl+lqlgDgU7E4A0DgQdkPx6uM/mtzCQB6ANwCwLtWj00TYoMrOMb0w9YJAJpDOcqRUS7g3cqOw1vKq1zirE6Lf9csY4d5AoChcumcHOrdrnUFJxtu6WrYc8ntdRC/VhaN7xds7zwBIMgweA/zt8uQrcQ4pDBOBOMihUGwhcCKYgo3Bjnqdy45ASAgADu774CBSIvgEBIHBQ5PPE0Xa1xghd/dxnX6TADQUUvTdmSb7N00ECMgOLR74+fBAD4DwPtd+iGw1QXeI+DtfVD6EcFGEutTKaxfM53Pa3arZZ4AoCVX/RknANTfmGpVlACgJVf9GScA1N+YalWUAKAlV/0ZJwDU35hqVfR/YgRazLMml+kAAAAASUVORK5CYII=",class:"sidebar-logo"},null,-1))),ot=lt((()=>B("img",{src:"./static/logo-text-1.0f451132.png",class:"sidebar-logo-text"},null,-1)));var ct=t(a({__name:"SidebarLogo",props:{collapse:{type:Boolean,default:!0}},setup:e=>(t,a)=>{const n=i("router-link");return l(),s("div",{class:I(["sidebar-logo-container",{collapse:e.collapse}])},[o(d,{name:"sidebarLogoFade"},{default:c((()=>[e.collapse?(l(),u(n,{key:"collapse",class:"sidebar-logo-link",to:"/"},{default:c((()=>[st])),_:1})):(l(),u(n,{key:"expand",class:"sidebar-logo-link",to:"/"},{default:c((()=>[ot])),_:1}))])),_:1})],2)}}),[["__scopeId","data-v-2e9b9e63"]]);const dt=e=>{let t="";try{t=getComputedStyle(document.documentElement).getPropertyValue(e)}catch(a){console.error(a)}return t};var ut=t(a({__name:"index",setup(e){const t=dt("--v3-sidebar-menu-bg-color"),a=dt("--v3-sidebar-menu-text-color"),d=dt("--v3-sidebar-menu-active-text-color"),f=n(),m=r((()=>V().sidebar)),p=r((()=>N().routes)),g=r((()=>ne().showSidebarLogo)),v=r((()=>{const{meta:e,path:t}=f;return null===e&&void 0===e||!e.activeMenu?t:e.activeMenu})),A=r((()=>!m.value.opened));return(e,n)=>{const r=i("el-menu"),f=i("el-scrollbar");return l(),s("div",{class:I({"has-logo":h(g)})},[h(g)?(l(),u(ct,{key:0,collapse:h(A)},null,8,["collapse"])):D("",!0),o(f,{"wrap-class":"scrollbar-wrapper"},{default:c((()=>[o(r,{collapse:h(A),"unique-opened":!0,"default-active":h(v),"background-color":h(t),"text-color":h(a),"active-text-color":h(d),mode:"vertical"},{default:c((()=>[(l(!0),s(y,null,w(h(p),(e=>(l(),u(it,{key:e.path,item:e,"base-path":e.path,"is-collapse":h(A)},null,8,["item","base-path","is-collapse"])))),128))])),_:1},8,["collapse","default-active","background-color","text-color","active-text-color"])])),_:1})],2)}}}),[["__scopeId","data-v-45ab100c"]]);const ht=e({id:"tags-view",state:()=>({visitedViews:[]}),actions:{addVisitedView(e){var t;this.visitedViews.some((t=>t.path===e.path))||this.visitedViews.push(Object.assign({},e,{title:(null==(t=e.meta)?void 0:t.title)||"no-name"}))},delVisitedView(e){for(const[t,a]of this.visitedViews.entries())if(a.path===e.path){this.visitedViews.splice(t,1);break}},delOthersVisitedViews(e){this.visitedViews=this.visitedViews.filter((t=>{var a;return(null==(a=t.meta)?void 0:a.affix)||t.path===e.path}))},delAllVisitedViews(){const e=this.visitedViews.filter((e=>{var t;return null==(t=e.meta)?void 0:t.affix}));this.visitedViews=e},updateVisitedView(e){for(let t of this.visitedViews)if(t.path===e.path){t=Object.assign(t,e);break}}}});var ft=t({},[["render",function(e,t){const a=i("el-scrollbar");return l(),u(a,{vertical:!1,class:"scroll-container"},{default:c((()=>[O(e.$slots,"default",{},void 0,!0)])),_:3})}],["__scopeId","data-v-2924169c"]]);const mt={class:"tags-view-container"};var pt=t(a({__name:"index",setup(e){const t=Q(),a=m(),d=n(),f=ht(),C=N(),k=(e,t)=>{const n=e.slice(-1)[0];void 0!==n&&void 0!==n.fullPath?a.push(n.fullPath).catch((e=>{console.warn(e)})):"Dashboard"===t.name?a.push({path:"/redirect"+t.fullPath}).catch((e=>{console.warn(e)})):a.push("/").catch((e=>{console.warn(e)}))},x=p({visible:!1,top:0,left:0,selectedTag:{},affixTags:[],isActive:e=>e.path===d.path,isAffix:e=>e.meta&&e.meta.affix,refreshSelectedTag:e=>{const{fullPath:t}=e;P((()=>{a.replace({path:"/redirect"+t}).catch((e=>{console.warn(e)}))}))},closeSelectedTag:e=>{f.delVisitedView(e),x.isActive(e)&&k(f.visitedViews,e)},closeOthersTags:()=>{x.selectedTag.fullPath!==d.path&&void 0!==x.selectedTag.fullPath&&a.push(x.selectedTag.fullPath).catch((e=>{console.warn(e)})),f.delOthersVisitedViews(x.selectedTag)},closeAllTags:e=>{f.delAllVisitedViews(),x.affixTags.some((e=>e.path===d.path))||k(f.visitedViews,e)},openMenu:(e,a)=>{const n=t.proxy.$el.getBoundingClientRect().left,r=t.proxy.$el.offsetWidth-105,i=a.clientX-n+15;x.left=i>r?r:i,x.top=a.clientY,x.visible=!0,x.selectedTag=e},closeMenu:()=>{x.visible=!1}}),E=r((()=>f.visitedViews)),S=r((()=>C.routes)),V=(e,t="/")=>{let a=[];return e.forEach((e=>{if(e.meta&&e.meta.affix){const n=tt.resolve(t,e.path);a.push({fullPath:n,path:n,name:e.name,meta:{...e.meta}})}if(e.children){const t=V(e.children,e.path);t.length>=1&&(a=a.concat(t))}})),a},T=()=>(d.name&&f.addVisitedView(d),!1);return g((()=>d.name),(()=>{T(),(()=>{const e=null==t?void 0:t.refs.tag;if(null!=e&&Array.isArray(e))for(const t of e)t.to.path===d.path&&t.to.fullPath!==d.fullPath&&f.updateVisitedView(d)})()})),g((()=>x.visible),(e=>{e?document.body.addEventListener("click",x.closeMenu):document.body.removeEventListener("click",x.closeMenu)})),v((()=>{(()=>{x.affixTags=V(S.value);for(const e of x.affixTags)e.name&&f.addVisitedView(e)})(),T()})),(e,t)=>{const a=i("el-icon"),n=i("router-link");return l(),s("div",mt,[o(ft,{class:"tags-view-wrapper"},{default:c((()=>[(l(!0),s(y,null,w(h(E),(e=>(l(),u(n,{ref_for:!0,ref:"tag",key:e.path,class:I([x.isActive(e)?"active":"","tags-view-item"]),to:{path:e.path,query:e.query,fullPath:e.fullPath},onMouseup:b((t=>x.isAffix(e)?"":x.closeSelectedTag(e)),["middle"]),onContextmenu:b((t=>x.openMenu(e,t)),["prevent"])},{default:c((()=>{var t;return[F(A(null==(t=e.meta)?void 0:t.title)+" ",1),x.isAffix(e)?D("",!0):(l(),u(a,{key:0,size:12,onClick:b((t=>x.closeSelectedTag(e)),["prevent","stop"])},{default:c((()=>[o(h(H))])),_:2},1032,["onClick"]))]})),_:2},1032,["class","to","onMouseup","onContextmenu"])))),128))])),_:1}),z(B("ul",{style:j({left:x.left+"px",top:x.top+"px"}),class:"contextmenu"},[B("li",{onClick:t[0]||(t[0]=e=>x.refreshSelectedTag(x.selectedTag))},"刷新"),x.isAffix(x.selectedTag)?D("",!0):(l(),s("li",{key:0,onClick:t[1]||(t[1]=e=>x.closeSelectedTag(x.selectedTag))},"关闭")),B("li",{onClick:t[2]||(t[2]=(...e)=>x.closeOthersTags&&x.closeOthersTags(...e))},"关闭其它"),B("li",{onClick:t[3]||(t[3]=e=>x.closeAllTags(x.selectedTag))},"关闭所有")],4),[[Y,x.visible]])])}}}),[["__scopeId","data-v-6835bb43"]]);var gt=t(a({__name:"index",props:{buttonTop:{type:Number,default:250}},setup(e){const t=q(!1);return(a,n)=>{const r=i("el-icon"),d=i("el-drawer");return l(),s(y,null,[B("div",{class:"handle-button",style:j({top:e.buttonTop+"px"}),onClick:n[0]||(n[0]=e=>t.value=!0)},[o(r,{size:24},{default:c((()=>[o(h(U))])),_:1})],4),o(d,{modelValue:t.value,"onUpdate:modelValue":n[1]||(n[1]=e=>t.value=e),size:"300px","with-header":!1},{default:c((()=>[O(a.$slots,"default",{},void 0,!0)])),_:3},8,["modelValue"])],64)}}}),[["__scopeId","data-v-13e031dc"]]);var vt=t(a({__name:"index",setup(e){const t=V(),a=ne(),{sidebar:i,device:d,addEventListenerOnResize:f,resizeMounted:m,removeEventListenerResize:w,watchRouter:A}=(()=>{const e=n(),t=V(),a=r((()=>t.device)),i=r((()=>t.sidebar)),l=g((()=>e.name),(()=>{t.device===J.Mobile&&t.sidebar.opened&&t.closeSidebar(!1)})),s=()=>document.body.getBoundingClientRect().width-1<992,o=()=>{document.hidden||(t.toggleDevice(s()?J.Mobile:J.Desktop),s()&&t.closeSidebar(!0))};return{device:a,sidebar:i,resizeMounted:()=>{s()&&(t.toggleDevice(J.Mobile),t.closeSidebar(!0))},addEventListenerOnResize:()=>{window.addEventListener("resize",o)},removeEventListenerResize:()=>{window.removeEventListener("resize",o)},watchRouter:l}})(),b=p({handleClickOutside:()=>{t.closeSidebar(!1)}}),y=r((()=>({hideSidebar:!i.value.opened,openSidebar:i.value.opened,withoutAnimation:i.value.withoutAnimation,mobile:d.value===J.Mobile}))),C=r((()=>a.showSettings)),k=r((()=>a.showTagsView)),x=r((()=>a.fixedHeader));return A(),v((()=>{f()})),X((()=>{m()})),G((()=>{w()})),(e,t)=>(l(),s("div",{class:I([h(y),"app-wrapper"])},[h(y).mobile&&h(i).opened?(l(),s("div",{key:0,class:"drawer-bg",onClick:t[0]||(t[0]=(...e)=>b.handleClickOutside&&b.handleClickOutside(...e))})):D("",!0),o(h(ut),{class:"sidebar-container"}),B("div",{class:I([{hasTagsView:h(k)},"main-container"])},[B("div",{class:I({"fixed-header":h(x)})},[o(h(_e)),h(k)?(l(),u(h(pt),{key:0})):D("",!0)],2),o(h(ie)),h(C)?(l(),u(h(gt),{key:0},{default:c((()=>[o(h(Ke))])),_:1})):D("",!0)],2)],2))}}),[["__scopeId","data-v-68984f60"]]);export{vt as default};