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

2 lines
30 KiB
JavaScript

import{d as e,r as t,g as a,a as l,w as n,s as r,b as o,u as s,c as i,e as c,f as u,o as d,h as p,i as f,j as h,T as m,k as v,l as g,m as b,K as w,_ as y,n as _,p as k,F as x,t as C,q as E,v as S,x as V,y as A,E as T,z as I,A as R,B as F,C as P,D as M,G as D,H as z,I as L,J as O,L as q,M as N,N as j,O as W,P as H,Q as U,R as $,S as B,U as X,V as G,W as Y,X as J,Y as Z,Z as K,$ as Q,a0 as ee,a1 as te,a2 as ae,a3 as le,a4 as ne}from"./index-19e06384.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang-50b93fc1.js";var oe=(e=>(e[e.Mobile=0]="Mobile",e[e.Desktop=1]="Desktop",e))(oe||{});const se="closed";const ie=e("app",(()=>{const e=t({opened:a()!==se,withoutAnimation:!1}),o=l(oe.Desktop);n((()=>e.opened),(e=>function(e){r(e?"opened":se)}(e)));return{device:o,sidebar:e,toggleSidebar:t=>{e.opened=!e.opened,e.withoutAnimation=t},closeSidebar:t=>{e.opened=!1,e.withoutAnimation=t},toggleDevice:e=>{o.value=e}}})),ce={showSettings:!0,showTagsView:!0,fixedHeader:!0,showSidebarLogo:!0,showNotify:!0,showThemeSwitch:!0,showScreenfull:!0,showGreyMode:!1,showColorWeakness:!1},ue=e("settings",(()=>{const e={};for(const[t,a]of Object.entries(ce))e[t]=l(a);return e})),de={class:"app-main"},pe=y(o({__name:"AppMain",setup(e){const t=s(),a=i(),l=c((()=>t.path));return(e,t)=>{const n=u("router-view");return d(),p("section",de,[f(n,null,{default:h((({Component:e})=>[f(m,{name:"el-fade-in",mode:"out-in"},{default:h((()=>[(d(),v(w,{include:b(a).cachedViews},[(d(),v(g(e),{key:l.value}))],1032,["include"]))])),_:2},1024)])),_:1})])}}}),[["__scopeId","data-v-cf4de271"]]);function fe(e,t){void 0===t&&(t={});for(var a=function(e){for(var t=[],a=0;a<e.length;){var l=e[a];if("*"!==l&&"+"!==l&&"?"!==l)if("\\"!==l)if("{"!==l)if("}"!==l)if(":"!==l)if("("!==l)t.push({type:"CHAR",index:a,value:e[a++]});else{var n=1,r="";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==--n){s++;break}}else if("("===e[s]&&(n++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));r+=e[s++]}else r+=e[s++]+e[s++];if(n)throw new TypeError("Unbalanced pattern at ".concat(a));if(!r)throw new TypeError("Missing pattern at ".concat(a));t.push({type:"PATTERN",index:a,value:r}),a=s}else{for(var o="",s=a+1;s<e.length;){var i=e.charCodeAt(s);if(!(i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||95===i))break;o+=e[s++]}if(!o)throw new TypeError("Missing parameter name at ".concat(a));t.push({type:"NAME",index:a,value:o}),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),l=t.prefixes,n=void 0===l?"./":l,r="[^".concat(function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}(t.delimiter||"/#?"),"]+?"),o=[],s=0,i=0,c="",u=function(e){if(i<a.length&&a[i].type===e)return a[i++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var l=a[i],n=l.type,r=l.index;throw new TypeError("Unexpected ".concat(n," at ").concat(r,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};i<a.length;){var f=u("CHAR"),h=u("NAME"),m=u("PATTERN");if(h||m){var v=f||"";-1===n.indexOf(v)&&(c+=v,v=""),c&&(o.push(c),c=""),o.push({name:h||s++,prefix:v,suffix:"",pattern:m||r,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)c+=g;else if(c&&(o.push(c),c=""),u("OPEN")){v=p();var b=u("NAME")||"",w=u("PATTERN")||"",y=p();d("CLOSE"),o.push({name:b||(w?s++:""),pattern:b&&!w?r:w,prefix:v,suffix:y,modifier:u("MODIFIER")||""})}else d("END")}}return o}function he(e,t){return function(e,t){void 0===t&&(t={});var a=function(e){return e&&e.sensitive?"":"i"}(t),l=t.encode,n=void 0===l?function(e){return e}:l,r=t.validate,o=void 0===r||r,s=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:".concat(e.pattern,")$"),a)}));return function(t){for(var a="",l=0;l<e.length;l++){var r=e[l];if("string"!=typeof r){var i=t?t[r.name]:void 0,c="?"===r.modifier||"*"===r.modifier,u="*"===r.modifier||"+"===r.modifier;if(Array.isArray(i)){if(!u)throw new TypeError('Expected "'.concat(r.name,'" to not repeat, but got an array'));if(0===i.length){if(c)continue;throw new TypeError('Expected "'.concat(r.name,'" to not be empty'))}for(var d=0;d<i.length;d++){var p=n(i[d],r);if(o&&!s[l].test(p))throw new TypeError('Expected all "'.concat(r.name,'" to match "').concat(r.pattern,'", but got "').concat(p,'"'));a+=r.prefix+p+r.suffix}}else if("string"!=typeof i&&"number"!=typeof i){if(!c){var f=u?"an array":"a string";throw new TypeError('Expected "'.concat(r.name,'" to be ').concat(f))}}else{p=n(String(i),r);if(o&&!s[l].test(p))throw new TypeError('Expected "'.concat(r.name,'" to match "').concat(r.pattern,'", but got "').concat(p,'"'));a+=r.prefix+p+r.suffix}}else a+=r}return a}}(fe(e,t),t)}const me={key:0,class:"no-redirect"},ve=["onClick"],ge=y(o({__name:"index",setup(e){const t=s(),a=_(),r=l([]),o=()=>{r.value=t.matched.filter((e=>e.meta&&e.meta.title&&!1!==e.meta.breadcrumb))},i=e=>{const{redirect:l,path:n}=e;l?a.push(l):a.push((e=>{const{params:a}=t;return he(e)(a)})(n))};return n((()=>t.path),(e=>{e.startsWith("/redirect/")||o()})),o(),(e,t)=>{const a=u("el-breadcrumb-item"),l=u("el-breadcrumb");return d(),v(l,{class:"app-breadcrumb"},{default:h((()=>[(d(!0),p(x,null,k(r.value,((e,t)=>(d(),v(a,{key:e.path},{default:h((()=>["noRedirect"===e.redirect||t===r.value.length-1?(d(),p("span",me,C(e.meta.title),1)):(d(),p("a",{key:1,onClick:E((t=>i(e)),["prevent"])},C(e.meta.title),9,ve))])),_:2},1024)))),128))])),_:1})}}}),[["__scopeId","data-v-8ff70186"]]),be=y(o({__name:"index",props:{isActive:{type:Boolean,default:!1}},emits:["toggleClick"],setup(e,{emit:t}){const a=e,l=()=>{t("toggleClick")};return(e,t)=>{const n=u("el-icon");return d(),p("div",{onClick:l},[f(n,{size:20,class:"icon"},{default:h((()=>[a.isActive?(d(),v(b(S),{key:0})):(d(),v(b(V),{key:1}))])),_:1})])}}}),[["__scopeId","data-v-4662adce"]]),we=[["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"]],ye=(()=>{if("undefined"==typeof document)return!1;const e=we[0],t={};for(const a of we){if((null==a?void 0:a[1])in document){for(const[l,n]of a.entries())t[e[l]]=n;return t}}return!1})(),_e={change:ye.fullscreenchange,error:ye.fullscreenerror};let ke={request:(e=document.documentElement,t)=>new Promise(((a,l)=>{const n=()=>{ke.off("change",n),a()};ke.on("change",n);const r=e[ye.requestFullscreen](t);r instanceof Promise&&r.then(n).catch(l)})),exit:()=>new Promise(((e,t)=>{if(!ke.isFullscreen)return void e();const a=()=>{ke.off("change",a),e()};ke.on("change",a);const l=document[ye.exitFullscreen]();l instanceof Promise&&l.then(a).catch(t)})),toggle:(e,t)=>ke.isFullscreen?ke.exit():ke.request(e,t),onchange(e){ke.on("change",e)},onerror(e){ke.on("error",e)},on(e,t){const a=_e[e];a&&document.addEventListener(a,t,!1)},off(e,t){const a=_e[e];a&&document.removeEventListener(a,t,!1)},raw:ye};Object.defineProperties(ke,{isFullscreen:{get:()=>Boolean(document[ye.fullscreenElement])},element:{enumerable:!0,get:()=>document[ye.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[ye.fullscreenEnabled])}}),ye||(ke={isEnabled:!1});const xe=ke,Ce=y(o({__name:"index",props:{element:{type:String,default:"html"},openTips:{type:String,default:"全屏"},exitTips:{type:String,default:"退出全屏"}},setup(e){const t=e,a=l(t.openTips),n=l(!1),r=()=>{const e=document.querySelector(t.element)||void 0;xe.isEnabled?xe.toggle(e):T.warning("您的浏览器无法工作")},o=()=>{n.value=xe.isFullscreen,a.value=xe.isFullscreen?t.exitTips:t.openTips};return A((e=>{xe.on("change",o),e((()=>{xe.isEnabled&&xe.off("change",o)}))})),(e,t)=>{const l=u("svg-icon"),o=u("el-tooltip");return d(),p("div",{onClick:r},[f(o,{effect:"dark",content:a.value,placement:"bottom"},{default:h((()=>[f(l,{name:n.value?"fullscreen-exit":"fullscreen"},null,8,["name"])])),_:1},8,["content"])])}}}),[["__scopeId","data-v-b8786e3f"]]),Ee={class:"card-header"},Se={class:"card-title"},Ve={class:"card-time"},Ae={key:0,class:"card-avatar"},Te=["src"],Ie={class:"card-body"},Re=y(o({__name:"NotifyList",props:{list:{type:Object,required:!0}},setup(e){const t=e;return(e,a)=>{const l=u("el-empty"),n=u("el-tag"),r=u("el-card");return 0===t.list.length?(d(),v(l,{key:0})):(d(!0),p(x,{key:1},k(t.list,((e,t)=>(d(),v(r,{key:t,shadow:"never",class:"card-container"},{header:h((()=>[I("div",Ee,[I("div",null,[I("span",null,[I("span",Se,C(e.title),1),e.extra?(d(),v(n,{key:0,type:e.status,effect:"plain",size:"small"},{default:h((()=>[R(C(e.extra),1)])),_:2},1032,["type"])):F("",!0)]),I("div",Ve,C(e.datetime),1)]),e.avatar?(d(),p("div",Ae,[I("img",{src:e.avatar,width:"34"},null,8,Te)])):F("",!0)])])),default:h((()=>[I("div",Ie,C(e.description??"No Data"),1)])),_:2},1024)))),128))}}}),[["__scopeId","data-v-f3302799"]]),Fe=[{avatar:"https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png",title:"V3 Admin Vite 上线啦",datetime:"半年前",description:"一个免费开源的中后台管理系统基础解决方案,基于 Vue3、TypeScript、Element Plus、Pinia 和 Vite 等主流技术"},{avatar:"https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png",title:"V3 Admin 上线啦",datetime:"一年前",description:"一个中后台管理系统基础解决方案,基于 Vue3、TypeScript、Element Plus 和 Pinia"}],Pe=[{avatar:"https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png",title:"来自楚门的世界",description:"如果再也不能见到你,祝你早安、午安和晚安",datetime:"1998-06-05"},{avatar:"https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png",title:"来自大话西游",description:"如果非要在这份爱上加上一个期限,我希望是一万年",datetime:"1995-02-04"},{avatar:"https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png",title:"来自龙猫",description:"心存善意,定能途遇天使",datetime:"1988-04-16"}],Me=[{title:"任务名称",description:"这家伙很懒,什么都没留下",extra:"未开始",status:"info"},{title:"任务名称",description:"这家伙很懒,什么都没留下",extra:"进行中",status:""},{title:"任务名称",description:"这家伙很懒,什么都没留下",extra:"已超时",status:"danger"}],De={class:"notify"},ze={class:"notify-history"},Le=y(o({__name:"index",setup(e){const t=c((()=>n.value.reduce(((e,t)=>e+t.list.length),0))),a=l("通知"),n=l([{name:"通知",type:"primary",list:Fe},{name:"消息",type:"danger",list:Pe},{name:"待办",type:"warning",list:Me}]),r=()=>{T.success(`跳转到${a.value}历史页面`)};return(e,l)=>{const o=u("el-icon"),s=u("el-tooltip"),i=u("el-badge"),c=u("el-scrollbar"),m=u("el-tab-pane"),g=u("el-tabs"),w=u("el-button"),y=u("el-popover");return d(),p("div",De,[f(y,{placement:"bottom",width:350,trigger:"click"},{reference:h((()=>[f(i,{value:t.value,max:99,hidden:0===t.value},{default:h((()=>[f(s,{effect:"dark",content:"消息通知",placement:"bottom"},{default:h((()=>[f(o,{size:20},{default:h((()=>[f(b(P))])),_:1})])),_:1})])),_:1},8,["value","hidden"])])),default:h((()=>[f(g,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),class:"demo-tabs",stretch:""},{default:h((()=>[(d(!0),p(x,null,k(n.value,((e,t)=>(d(),v(m,{name:e.name,key:t},{label:h((()=>[R(C(e.name)+" ",1),f(i,{value:e.list.length,max:99,type:e.type},null,8,["value","type"])])),default:h((()=>[f(c,{height:"400px"},{default:h((()=>[f(Re,{list:e.list},null,8,["list"])])),_:2},1024)])),_:2},1032,["name"])))),128))])),_:1},8,["modelValue"]),I("div",ze,[f(w,{link:"",onClick:r},{default:h((()=>[R("查看"+C(a.value)+"历史",1)])),_:1})])])),_:1})])}}}),[["__scopeId","data-v-50089150"]]),Oe={class:"navigation-bar"},qe={class:"right-menu"},Ne={class:"right-menu-avatar"},je={target:"_blank",href:"https://juejin.cn/post/7089377403717287972"},We={target:"_blank",href:"https://github.com/un-pany/v3-admin-vite"},He={target:"_blank",href:"https://gitee.com/un-pany/v3-admin-vite"},Ue=(e=>(z("data-v-ab7a6f93"),e=e(),L(),e))((()=>I("span",{style:{display:"block"}},"退出登录",-1))),$e=y(o({__name:"index",setup(e){const t=_(),a=ie(),l=ue(),n=M(),r=c((()=>a.sidebar)),o=c((()=>l.showNotify)),s=c((()=>l.showThemeSwitch)),i=c((()=>l.showScreenfull)),m=()=>{a.toggleSidebar(!1)},g=()=>{n.logout(),t.push("/login")};return(e,t)=>{const a=u("el-avatar"),l=u("el-dropdown-item"),c=u("el-dropdown-menu"),w=u("el-dropdown");return d(),p("div",Oe,[f(be,{"is-active":r.value.opened,class:"hamburger",onToggleClick:m},null,8,["is-active"]),f(ge,{class:"breadcrumb"}),I("div",qe,[i.value?(d(),v(Ce,{key:0,class:"right-menu-item"})):F("",!0),s.value?(d(),v(re,{key:1,class:"right-menu-item"})):F("",!0),o.value?(d(),v(Le,{key:2,class:"right-menu-item"})):F("",!0),f(w,{class:"right-menu-item"},{dropdown:h((()=>[f(c,null,{default:h((()=>[I("a",je,[f(l,null,{default:h((()=>[R("中文文档")])),_:1})]),I("a",We,[f(l,null,{default:h((()=>[R("GitHub")])),_:1})]),I("a",He,[f(l,null,{default:h((()=>[R("Gitee")])),_:1})]),f(l,{divided:"",onClick:g},{default:h((()=>[Ue])),_:1})])),_:1})])),default:h((()=>[I("div",Ne,[f(a,{icon:b(D),size:30},null,8,["icon"]),I("span",null,C(b(n).username),1)])])),_:1})])])}}}),[["__scopeId","data-v-ab7a6f93"]]),Be=e=>(z("data-v-711d466d"),e=e(),L(),e),Xe={class:"drawer-container"},Ge=Be((()=>I("h3",{class:"drawer-title"},"系统布局配置",-1))),Ye={class:"drawer-item"},Je=Be((()=>I("span",null,"显示标签栏",-1))),Ze={class:"drawer-item"},Ke=Be((()=>I("span",null,"显示侧边栏 Logo",-1))),Qe={class:"drawer-item"},et=Be((()=>I("span",null,"固定 Header",-1))),tt={class:"drawer-item"},at=Be((()=>I("span",null,"显示消息通知",-1))),lt={class:"drawer-item"},nt=Be((()=>I("span",null,"显示切换主题按钮",-1))),rt={class:"drawer-item"},ot=Be((()=>I("span",null,"显示全屏按钮",-1))),st={class:"drawer-item"},it=Be((()=>I("span",null,"显示灰色模式",-1))),ct={class:"drawer-item"},ut=Be((()=>I("span",null,"显示色弱模式",-1))),dt=y(o({__name:"index",setup(e){const t=ue();return(e,a)=>{const l=u("el-switch");return d(),p("div",Xe,[I("div",null,[Ge,I("div",Ye,[Je,f(l,{modelValue:b(t).showTagsView,"onUpdate:modelValue":a[0]||(a[0]=e=>b(t).showTagsView=e),class:"drawer-switch"},null,8,["modelValue"])]),I("div",Ze,[Ke,f(l,{modelValue:b(t).showSidebarLogo,"onUpdate:modelValue":a[1]||(a[1]=e=>b(t).showSidebarLogo=e),class:"drawer-switch"},null,8,["modelValue"])]),I("div",Qe,[et,f(l,{modelValue:b(t).fixedHeader,"onUpdate:modelValue":a[2]||(a[2]=e=>b(t).fixedHeader=e),class:"drawer-switch"},null,8,["modelValue"])]),I("div",tt,[at,f(l,{modelValue:b(t).showNotify,"onUpdate:modelValue":a[3]||(a[3]=e=>b(t).showNotify=e),class:"drawer-switch"},null,8,["modelValue"])]),I("div",lt,[nt,f(l,{modelValue:b(t).showThemeSwitch,"onUpdate:modelValue":a[4]||(a[4]=e=>b(t).showThemeSwitch=e),class:"drawer-switch"},null,8,["modelValue"])]),I("div",rt,[ot,f(l,{modelValue:b(t).showScreenfull,"onUpdate:modelValue":a[5]||(a[5]=e=>b(t).showScreenfull=e),class:"drawer-switch"},null,8,["modelValue"])]),I("div",st,[it,f(l,{modelValue:b(t).showGreyMode,"onUpdate:modelValue":a[6]||(a[6]=e=>b(t).showGreyMode=e),class:"drawer-switch"},null,8,["modelValue"])]),I("div",ct,[ut,f(l,{modelValue:b(t).showColorWeakness,"onUpdate:modelValue":a[7]||(a[7]=e=>b(t).showColorWeakness=e),class:"drawer-switch"},null,8,["modelValue"])])])])}}}),[["__scopeId","data-v-711d466d"]]),pt=e=>/^(https?:|mailto:|tel:)/.test(e),ft=["href"],ht=o({__name:"SidebarItemLink",props:{to:{type:String,required:!0}},setup(e){const t=e;return(e,a)=>{const l=u("router-link");return b(pt)(t.to)?(d(),p("a",{key:0,href:t.to,target:"_blank",rel:"noopener"},[O(e.$slots,"default")],8,ft)):(d(),v(l,{key:1,to:t.to},{default:h((()=>[O(e.$slots,"default")])),_:3},8,["to"]))}}});function mt(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function vt(e,t){for(var a,l="",n=0,r=-1,o=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(r===s-1||1===o);else if(r!==s-1&&2===o){if(l.length<2||2!==n||46!==l.charCodeAt(l.length-1)||46!==l.charCodeAt(l.length-2))if(l.length>2){var i=l.lastIndexOf("/");if(i!==l.length-1){-1===i?(l="",n=0):n=(l=l.slice(0,i)).length-1-l.lastIndexOf("/"),r=s,o=0;continue}}else if(2===l.length||1===l.length){l="",n=0,r=s,o=0;continue}t&&(l.length>0?l+="/..":l="..",n=2)}else l.length>0?l+="/"+e.slice(r+1,s):l=e.slice(r+1,s),n=s-r-1;r=s,o=0}else 46===a&&-1!==o?++o:o=-1}return l}var gt={resolve:function(){for(var e,t="",a=!1,l=arguments.length-1;l>=-1&&!a;l--){var n;l>=0?n=arguments[l]:(void 0===e&&(e=process.cwd()),n=e),mt(n),0!==n.length&&(t=n+"/"+t,a=47===n.charCodeAt(0))}return t=vt(t,!a),a?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(mt(e),0===e.length)return".";var t=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=vt(e,!t)).length||t||(e="."),e.length>0&&a&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return mt(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];mt(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":gt.normalize(e)},relative:function(e,t){if(mt(e),mt(t),e===t)return"";if((e=gt.resolve(e))===(t=gt.resolve(t)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var l=e.length,n=l-a,r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var o=t.length-r,s=n<o?n:o,i=-1,c=0;c<=s;++c){if(c===s){if(o>s){if(47===t.charCodeAt(r+c))return t.slice(r+c+1);if(0===c)return t.slice(r+c)}else n>s&&(47===e.charCodeAt(a+c)?i=c:0===c&&(i=0));break}var u=e.charCodeAt(a+c);if(u!==t.charCodeAt(r+c))break;47===u&&(i=c)}var d="";for(c=a+i+1;c<=l;++c)c!==l&&47!==e.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+t.slice(r+i):(r+=i,47===t.charCodeAt(r)&&++r,t.slice(r))},_makeLong:function(e){return e},dirname:function(e){if(mt(e),0===e.length)return".";for(var t=e.charCodeAt(0),a=47===t,l=-1,n=!0,r=e.length-1;r>=1;--r)if(47===(t=e.charCodeAt(r))){if(!n){l=r;break}}else n=!1;return-1===l?a?"/":".":a&&1===l?"//":e.slice(0,l)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');mt(e);var a,l=0,n=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){var i=e.charCodeAt(a);if(47===i){if(!r){l=a+1;break}}else-1===s&&(r=!1,s=a+1),o>=0&&(i===t.charCodeAt(o)?-1==--o&&(n=a):(o=-1,n=s))}return l===n?n=s:-1===n&&(n=e.length),e.slice(l,n)}for(a=e.length-1;a>=0;--a)if(47===e.charCodeAt(a)){if(!r){l=a+1;break}}else-1===n&&(r=!1,n=a+1);return-1===n?"":e.slice(l,n)},extname:function(e){mt(e);for(var t=-1,a=0,l=-1,n=!0,r=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===l&&(n=!1,l=o+1),46===s?-1===t?t=o:1!==r&&(r=1):-1!==t&&(r=-1);else if(!n){a=o+1;break}}return-1===t||-1===l||0===r||1===r&&t===l-1&&t===a+1?"":e.slice(t,l)},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,l=t.base||(t.name||"")+(t.ext||"");return a?a===t.root?a+l:a+e+l:l}("/",e)},parse:function(e){mt(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var a,l=e.charCodeAt(0),n=47===l;n?(t.root="/",a=1):a=0;for(var r=-1,o=0,s=-1,i=!0,c=e.length-1,u=0;c>=a;--c)if(47!==(l=e.charCodeAt(c)))-1===s&&(i=!1,s=c+1),46===l?-1===r?r=c:1!==u&&(u=1):-1!==r&&(u=-1);else if(!i){o=c+1;break}return-1===r||-1===s||0===u||1===u&&r===s-1&&r===o+1?-1!==s&&(t.base=t.name=0===o&&n?e.slice(1,s):e.slice(o,s)):(0===o&&n?(t.name=e.slice(1,r),t.base=e.slice(1,s)):(t.name=e.slice(o,r),t.base=e.slice(o,s)),t.ext=e.slice(r,s)),o>0?t.dir=e.slice(0,o-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};gt.posix=gt;const bt=q(gt),wt={key:2},yt=y(o({__name:"SidebarItem",props:{item:{type:Object,required:!0},isCollapse:{type:Boolean,default:!1},isFirstLevel:{type:Boolean,default:!0},basePath:{type:String,default:""}},setup(e){const t=e,a=c((()=>t.item.meta&&t.item.meta.alwaysShow)),l=c((()=>{if(t.item.children){return t.item.children.filter((e=>!(e.meta&&e.meta.hidden))).length}return 0})),n=c((()=>{if(l.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:""}})),r=e=>pt(e)?e:pt(t.basePath)?t.basePath:bt.resolve(t.basePath,e);return(e,l)=>{var o;const s=u("svg-icon"),i=u("el-menu-item"),c=u("sidebar-item",!0),m=u("el-sub-menu");return(null==(o=t.item.meta)?void 0:o.hidden)?F("",!0):(d(),p("div",{key:0,class:j({"simple-mode":t.isCollapse,"first-level":t.isFirstLevel})},[a.value||!n.value||n.value.children?(d(),v(m,{key:1,index:r(t.item.path),teleported:""},{title:h((()=>[t.item.meta&&t.item.meta.svgIcon?(d(),v(s,{key:0,name:t.item.meta.svgIcon},null,8,["name"])):t.item.meta&&t.item.meta.elIcon?(d(),v(g(t.item.meta.elIcon),{key:1,class:"el-icon"})):F("",!0),t.item.meta&&t.item.meta.title?(d(),p("span",wt,C(t.item.meta.title),1)):F("",!0)])),default:h((()=>[t.item.children?(d(!0),p(x,{key:0},k(t.item.children,(e=>(d(),v(c,{key:e.path,item:e,"is-collapse":t.isCollapse,"is-first-level":!1,"base-path":r(e.path)},null,8,["item","is-collapse","base-path"])))),128)):F("",!0)])),_:1},8,["index"])):(d(),p(x,{key:0},[n.value.meta?(d(),v(ht,{key:0,to:r(n.value.path)},{default:h((()=>[f(i,{index:r(n.value.path)},N({default:h((()=>[n.value.meta.svgIcon?(d(),v(s,{key:0,name:n.value.meta.svgIcon},null,8,["name"])):n.value.meta.elIcon?(d(),v(g(n.value.meta.elIcon),{key:1,class:"el-icon"})):F("",!0)])),_:2},[n.value.meta.title?{name:"title",fn:h((()=>[R(C(n.value.meta.title),1)])),key:"0"}:void 0]),1032,["index"])])),_:1},8,["to"])):F("",!0)],64))],2))}}}),[["__scopeId","data-v-b4c53ae2"]]),_t=e=>(z("data-v-7415e5ef"),e=e(),L(),e),kt=_t((()=>I("img",{src:"/v3-admin-vite/static/logo-cc70e06e.png",class:"sidebar-logo"},null,-1))),xt=_t((()=>I("img",{src:"/v3-admin-vite/static/logo-text-1-b6b0364d.png",class:"sidebar-logo-text"},null,-1))),Ct=y(o({__name:"SidebarLogo",props:{collapse:{type:Boolean,default:!0}},setup(e){const t=e;return(e,a)=>{const l=u("router-link");return d(),p("div",{class:j(["sidebar-logo-container",{collapse:t.collapse}])},[f(m,{name:"sidebar-logo-fade"},{default:h((()=>[t.collapse?(d(),v(l,{key:"collapse",to:"/"},{default:h((()=>[kt])),_:1})):(d(),v(l,{key:"expand",to:"/"},{default:h((()=>[xt])),_:1}))])),_:1})],2)}}}),[["__scopeId","data-v-7415e5ef"]]),Et=e=>{let t="";try{t=getComputedStyle(document.documentElement).getPropertyValue(e)}catch(a){console.error(a)}return t},St=y(o({__name:"index",setup(e){const t=Et("--v3-sidebar-menu-bg-color"),a=Et("--v3-sidebar-menu-text-color"),l=Et("--v3-sidebar-menu-active-text-color"),n=s(),r=ie(),o=W(),i=ue(),{showSidebarLogo:m}=H(i),g=c((()=>{const{meta:e,path:t}=n;return(null==e?void 0:e.activeMenu)?e.activeMenu:t})),w=c((()=>!r.sidebar.opened));return(e,n)=>{const r=u("el-menu"),s=u("el-scrollbar");return d(),p("div",{class:j({"has-logo":b(m)})},[b(m)?(d(),v(Ct,{key:0,collapse:w.value},null,8,["collapse"])):F("",!0),f(s,{"wrap-class":"scrollbar-wrapper"},{default:h((()=>[f(r,{"default-active":g.value,collapse:w.value,"background-color":b(t),"text-color":b(a),"active-text-color":b(l),"unique-opened":!0,"collapse-transition":!1,mode:"vertical"},{default:h((()=>[(d(!0),p(x,null,k(b(o).routes,(e=>(d(),v(yt,{key:e.path,item:e,"base-path":e.path,"is-collapse":w.value},null,8,["item","base-path","is-collapse"])))),128))])),_:1},8,["default-active","collapse","background-color","text-color","active-text-color"])])),_:1})],2)}}}),[["__scopeId","data-v-8eeb342c"]]),Vt={class:"scroll-container"},At=y(o({__name:"ScrollPane",props:{tagRefs:{type:Object,required:!0}},setup(e){const t=e,a=s(),r=ue(),o=l(),i=l();let m=0;const g=({scrollLeft:e})=>{m=e},w=({deltaY:e})=>{/^-/.test(e.toString())?_("left"):_("right")},y=()=>{const e=i.value.clientWidth,t=o.value.wrapRef.clientWidth;return{scrollbarContentRefWidth:e,scrollbarRefWidth:t,lastDistance:e-t-m}},_=(e,t=200)=>{let a=0;const{scrollbarContentRefWidth:l,scrollbarRefWidth:n,lastDistance:r}=y();n>l||(a="left"===e?Math.max(0,m-t):Math.min(m+t,m+r),o.value.setScrollLeft(a))},k=()=>{const e=t.tagRefs;for(let t=0;t<e.length;t++)if(a.path===e[t].$props.to.path){const a=e[t].$el,l=a.offsetWidth,n=a.offsetLeft,{scrollbarRefWidth:r}=y();if(n<m){return void _("left",m-n)}const o=r+m-l;if(n>o){return void _("right",n-o)}}};n(a,(()=>{U(k)}),{deep:!0});const x=c((()=>r.showScreenfull));return(e,t)=>{const a=u("el-icon");return d(),p("div",Vt,[f(a,{class:"arrow left",onClick:t[0]||(t[0]=e=>_("left"))},{default:h((()=>[f(b($))])),_:1}),f(b(B),{ref_key:"scrollbarRef",ref:o,onWheel:E(w,["prevent"]),onScroll:g},{default:h((()=>[I("div",{ref_key:"scrollbarContentRef",ref:i,class:"scrollbar-content"},[O(e.$slots,"default",{},void 0,!0)],512)])),_:3},8,["onWheel"]),f(a,{class:"arrow right",onClick:t[1]||(t[1]=e=>_("right"))},{default:h((()=>[f(b(X))])),_:1}),x.value?(d(),v(Ce,{key:0,element:".app-main","open-tips":"内容区全屏",class:"screenfull"})):F("",!0)])}}}),[["__scopeId","data-v-68eb9264"]]),Tt={class:"tags-view-container"},It=y(o({__name:"index",setup(e){const t=G(),a=_(),r=s(),o=i(),c=W(),m=l([]),g=l(!1),w=l(0),y=l(0),S=l({});let V=[];const A=e=>e.path===r.path,T=e=>{var t;return null==(t=e.meta)?void 0:t.affix},P=(e,t="/")=>{let a=[];return e.forEach((e=>{var l;if(null==(l=e.meta)?void 0:l.affix){const l=bt.resolve(t,e.path);a.push({fullPath:l,path:l,name:e.name,meta:{...e.meta}})}if(e.children){const t=P(e.children,e.path);t.length>=1&&(a=a.concat(t))}})),a},M=()=>{r.name&&(o.addVisitedView(r),o.addCachedView(r))},D=e=>{o.delVisitedView(e),o.delCachedView(e),A(e)&&L(o.visitedViews,e)},z=()=>{S.value.fullPath!==r.path&&void 0!==S.value.fullPath&&a.push(S.value.fullPath),o.delOthersVisitedViews(S.value),o.delOthersCachedViews(S.value)},L=(e,t)=>{const l=e.slice(-1)[0];void 0!==l&&void 0!==l.fullPath?a.push(l.fullPath):"Dashboard"===t.name?a.push({path:"/redirect"+t.path,query:t.query}):a.push("/")},O=()=>{g.value=!1};return n(r,(()=>{M()}),{deep:!0}),n(g,(e=>{e?document.body.addEventListener("click",O):document.body.removeEventListener("click",O)})),Y((()=>{(()=>{V=P(c.routes);for(const e of V)e.name&&o.addVisitedView(e)})(),M()})),(e,l)=>{const n=u("el-icon");return d(),p("div",Tt,[f(At,{class:"tags-view-wrapper","tag-refs":m.value},{default:h((()=>[(d(!0),p(x,null,k(b(o).visitedViews,(e=>(d(),v(b(Q),{ref_for:!0,ref_key:"tagRefs",ref:m,key:e.path,class:j([A(e)?"active":"","tags-view-item"]),to:{path:e.path,query:e.query},onMouseup:E((t=>T(e)?"":D(e)),["middle"]),onContextmenu:E((a=>((e,a)=>{const l=t.proxy.$el.getBoundingClientRect().left,n=t.proxy.$el.offsetWidth-105,r=a.clientX-l+15;y.value=r>n?n:r,w.value=a.clientY,g.value=!0,S.value=e})(e,a)),["prevent"])},{default:h((()=>{var t;return[R(C(null==(t=e.meta)?void 0:t.title)+" ",1),T(e)?F("",!0):(d(),v(n,{key:0,size:12,onClick:E((t=>D(e)),["prevent","stop"])},{default:h((()=>[f(b(ee))])),_:2},1032,["onClick"]))]})),_:2},1032,["class","to","onMouseup","onContextmenu"])))),128))])),_:1},8,["tag-refs"]),J(I("ul",{style:K({left:y.value+"px",top:w.value+"px"}),class:"contextmenu"},[I("li",{onClick:l[0]||(l[0]=e=>{return t=S.value,o.delCachedView(t),void a.replace({path:"/redirect"+t.path,query:t.query});var t})},"刷新"),T(S.value)?F("",!0):(d(),p("li",{key:0,onClick:l[1]||(l[1]=e=>D(S.value))},"关闭")),I("li",{onClick:z},"关闭其它"),I("li",{onClick:l[2]||(l[2]=e=>{return t=S.value,o.delAllVisitedViews(),o.delAllCachedViews(),void(V.some((e=>e.path===r.path))||L(o.visitedViews,t));var t})},"关闭所有")],4),[[Z,g.value]])])}}}),[["__scopeId","data-v-7ed7bf5f"]]),Rt=y(o({__name:"index",props:{buttonTop:{type:Number,default:350}},setup(e){const t=e;te((e=>({"8c501f28":a})));const a=t.buttonTop+"px",n=l(!1);return(e,t)=>{const a=u("el-icon"),l=u("el-drawer");return d(),p(x,null,[I("div",{class:"handle-button",onClick:t[0]||(t[0]=e=>n.value=!0)},[f(a,{size:24},{default:h((()=>[f(b(ae))])),_:1})]),f(l,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>n.value=e),size:"300px","with-header":!1},{default:h((()=>[O(e.$slots,"default",{},void 0,!0)])),_:3},8,["modelValue"])],64)}}}),[["__scopeId","data-v-038e37ce"]]),Ft=y(o({__name:"index",setup(e){const t=ie(),a=ue();(()=>{const e=s(),t=ie(),a=()=>document.body.getBoundingClientRect().width-1<992,l=()=>{if(!document.hidden){const e=a();t.toggleDevice(e?oe.Mobile:oe.Desktop),e&&t.closeSidebar(!0)}};n((()=>e.name),(()=>{t.device===oe.Mobile&&t.sidebar.opened&&t.closeSidebar(!1)})),le((()=>{window.addEventListener("resize",l)})),Y((()=>{a()&&(t.toggleDevice(oe.Mobile),t.closeSidebar(!0))})),ne((()=>{window.removeEventListener("resize",l)}))})();const l=c((()=>({hideSidebar:!t.sidebar.opened,openSidebar:t.sidebar.opened,withoutAnimation:t.sidebar.withoutAnimation,mobile:t.device===oe.Mobile,showGreyMode:u.value,showColorWeakness:m.value}))),r=c((()=>a.showSettings)),o=c((()=>a.showTagsView)),i=c((()=>a.fixedHeader)),u=c((()=>a.showGreyMode)),m=c((()=>a.showColorWeakness)),g=()=>{t.closeSidebar(!1)};return(e,t)=>(d(),p("div",{class:j([l.value,"app-wrapper"])},[l.value.mobile&&l.value.openSidebar?(d(),p("div",{key:0,class:"drawer-bg",onClick:g})):F("",!0),f(b(St),{class:"sidebar-container"}),I("div",{class:j([{hasTagsView:o.value},"main-container"])},[I("div",{class:j({"fixed-header":i.value})},[f(b($e)),J(f(b(It),null,null,512),[[Z,o.value]])],2),f(b(pe)),r.value?(d(),v(b(Rt),{key:0},{default:h((()=>[f(b(dt))])),_:1})):F("",!0)],2)],2))}}),[["__scopeId","data-v-8a41a21b"]]);export{Ft as default};