
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.github.io
 */

import{aE as cn,aF as un,aG as dn,aH as mn,aI as fn,aJ as pn,aK as vn,F as Ie,ac as hn,aL as bn,aM as gn,aN as Cn,a0 as kn,aO as yn,aP as xn,aa as at,ad as st,aQ as Sn,aR as Mn,aS as wn,aT as Bn,aU as In,aV as Pn,aW as On,Z as Rn,aX as En,n as it,aY as Wn,z as Pe,A as se,c as X,e as oe,aZ as Tn,a_ as Nn,a$ as _n,b0 as Ln,b1 as Hn,b2 as Vn,h as Oe,b as ce,b3 as jn,b4 as $n,d as Re,b5 as zn,b6 as An,b7 as Fn,b8 as Dn,b9 as Kn,ba as Un,bb as Yn,bc as Gn,bd as Xn,be as Zn,bf as qn,aD as Qn,bg as Jn,bh as eo,ar as to,a1 as no,bi as oo,bj as lo,bk as ao,bl as so,bm as io,W as ro,bn as co,bo as uo,bp as mo,bq as fo,D as po,br as vo,bs as ho,a6 as rt,bt as bo,bu as go,as as Co,ai as ko,E as yo,Q as ke,aq as xo,V as ct,bv as So,bw as ut,Y as Mo,ae as dt,bx as wo,by as Bo,a as Fe,bz as Io,bA as Po,bB as Oo,bC as Ro,O as mt,bD as Eo,g as K,S as ft,a4 as Wo,bE as To,R as pt,bF as No,m as vt,bG as _o,r as ve,bH as Lo,bI as He,s as ht,P as Ve,p as bt,q as Ho,ab as Vo,bJ as jo,bK as $o,bL as zo,bM as Ao,bN as Fo,bO as Do,bP as Ko,$ as gt,bQ as Uo,bR as Yo,bS as Go,t as ye,bT as Xo,bU as Zo,bV as qo,a5 as Qo,bW as Jo,bX as el,bY as tl,bZ as nl,i as me,b_ as ol,b$ as ll,c0 as al,at as sl,c1 as il,U as rl,c2 as cl,c3 as ul,c4 as dl,c5 as ml,c6 as fl,ak as pl,M as Ct,c7 as vl,c8 as hl,X as kt,c9 as bl,ca as gl,cb as Cl,cc as kl,w as De,cd as yl,y as yt,v as xl,ce as Sl,x as je,cf as Ml,cg as wl,ch as Bl,a3 as Il,ci as Pl,a7 as Ol,N as xt,f as St,u as Rl,a9 as qe,j as El,l as Wl}from"./index-nGFMSQGw.js";import{b as Tl}from"./index-CyI3Kccs.js";import{u as Nl}from"./useMainPage-C9MASyfo.js";/**
* vue v3.4.27
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const _l=()=>{},Ll=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:cn,BaseTransitionPropsValidators:un,Comment:dn,DeprecationTypes:mn,EffectScope:fn,ErrorCodes:pn,ErrorTypeStrings:vn,Fragment:Ie,KeepAlive:hn,ReactiveEffect:bn,Static:gn,Suspense:Cn,Teleport:kn,Text:yn,TrackOpTypes:xn,Transition:at,TransitionGroup:st,TriggerOpTypes:Sn,VueElement:Mn,assertNumber:wn,callWithAsyncErrorHandling:Bn,callWithErrorHandling:In,camelize:Pn,capitalize:On,cloneVNode:Rn,compatUtils:En,compile:_l,computed:it,createApp:Wn,createBlock:Pe,createCommentVNode:se,createElementBlock:X,createElementVNode:oe,createHydrationRenderer:Tn,createPropsRestProxy:Nn,createRenderer:_n,createSSRApp:Ln,createSlots:Hn,createStaticVNode:Vn,createTextVNode:Oe,createVNode:ce,customRef:jn,defineAsyncComponent:$n,defineComponent:Re,defineCustomElement:zn,defineEmits:An,defineExpose:Fn,defineModel:Dn,defineOptions:Kn,defineProps:Un,defineSSRCustomElement:Yn,defineSlots:Gn,devtools:Xn,effect:Zn,effectScope:qn,getCurrentInstance:Qn,getCurrentScope:Jn,getTransitionRawChildren:eo,guardReactiveProps:to,h:no,handleError:oo,hasInjectionContext:lo,hydrate:ao,initCustomFormatter:so,initDirectivesForSSR:io,inject:ro,isMemoSame:co,isProxy:uo,isReactive:mo,isReadonly:fo,isRef:po,isRuntimeOnly:vo,isShallow:ho,isVNode:rt,markRaw:bo,mergeDefaults:go,mergeModels:Co,mergeProps:ko,nextTick:yo,normalizeClass:ke,normalizeProps:xo,normalizeStyle:ct,onActivated:So,onBeforeMount:ut,onBeforeUnmount:Mo,onBeforeUpdate:dt,onDeactivated:wo,onErrorCaptured:Bo,onMounted:Fe,onRenderTracked:Io,onRenderTriggered:Po,onScopeDispose:Oo,onServerPrefetch:Ro,onUnmounted:mt,onUpdated:Eo,openBlock:K,popScopeId:ft,provide:Wo,proxyRefs:To,pushScopeId:pt,queuePostFlushCb:No,reactive:vt,readonly:_o,ref:ve,registerRuntimeCompiler:Lo,render:He,renderList:ht,renderSlot:Ve,resolveComponent:bt,resolveDirective:Ho,resolveDynamicComponent:Vo,resolveFilter:jo,resolveTransitionHooks:$o,setBlockTracking:zo,setDevtoolsHook:Ao,setTransitionHooks:Fo,shallowReactive:Do,shallowReadonly:Ko,shallowRef:gt,ssrContextKey:Uo,ssrUtils:Yo,stop:Go,toDisplayString:ye,toHandlerKey:Xo,toHandlers:Zo,toRaw:qo,toRef:Qo,toRefs:Jo,toValue:el,transformVNodeArgs:tl,triggerRef:nl,unref:me,useAttrs:ol,useCssModule:ll,useCssVars:al,useModel:sl,useSSRContext:il,useSlots:rl,useTransitionState:cl,vModelCheckbox:ul,vModelDynamic:dl,vModelRadio:ml,vModelSelect:fl,vModelText:pl,vShow:Ct,version:vl,warn:hl,watch:kt,watchEffect:bl,watchPostEffect:gl,watchSyncEffect:Cl,withAsyncContext:kl,withCtx:De,withDefaults:yl,withDirectives:yt,withKeys:xl,withMemo:Sl,withModifiers:je,withScopeId:Ml},Symbol.toStringTag,{value:"Module"}));var $e={exports:{}};const Hl=wl(Ll);(function(n,o){(function(a,e){e(o,Hl)})(Bl,function(a,e){let C=null;function N(){return C!==null}function E(t){C&&_(),C=t}function T(t){t===C&&(C=null)}function _(){C&&(C.closeMenu(),C=null)}const m={defaultDirection:"br",defaultMinWidth:100,defaultMaxWidth:600,defaultZindex:100,defaultAdjustPadding:{x:0,y:10}};function B(t,l){let d=t.offsetTop;return t.offsetParent!=null&&t.offsetParent!=l&&(d-=t.offsetParent.scrollTop,d+=B(t.offsetParent,l)),d}function r(t,l){let d=t.offsetLeft;return t.offsetParent!=null&&t.offsetParent!=l&&(d-=t.offsetParent.scrollLeft,d+=r(t.offsetParent,l)),d}function H(t,l,d,b){return{x:r(t,b)+l,y:B(t,b)+d}}const S="mx-menu-default-container",i="mx-menu-container-";let h=0;function f(t){const{getContainer:l,zIndex:d}=t;if(l){const M=typeof l=="function"?l():l;if(M){let P=M.getAttribute("id");return P||(P=i+h++,M.setAttribute("id",P)),{eleId:P,container:M,isNew:!1}}}let b=document.getElementById(S);return b||(b=document.createElement("div"),b.setAttribute("id",S),b.setAttribute("class","mx-menu-ghost-host fullscreen"),document.body.appendChild(b)),b.style.zIndex=(d==null?void 0:d.toString())||m.defaultZindex.toString(),{eleId:S,container:b,isNew:!0}}function k(t){return typeof t=="number"?`${t}px`:t}const g=e.defineComponent({props:{vnode:{type:null},data:{type:null,default:null}},setup(t){const{vnode:l,data:d}=e.toRefs(t);return()=>typeof l.value=="function"?l.value(d.value):l.value}}),I=(t,l)=>{const d=t.__vccOpts||t;for(const[b,M]of l)d[b]=M;return d},le={},ue={class:"mx-checked-mark","aria-hidden":"true",viewBox:"0 0 1024 1024"},Pt=[e.createElementVNode("path",{d:"M129.3,428.6L52,512l345,372.5l575-620.8l-69.5-75L400.4,718.2L129.3,428.6z"},null,-1)];function Ot(t,l){return e.openBlock(),e.createElementBlock("svg",ue,Pt)}const Rt=I(le,[["render",Ot]]),Et={},Wt={class:"mx-right-arrow","aria-hidden":"true",viewBox:"0 0 1024 1024"},Tt=[e.createElementVNode("path",{d:"M307.018 49.445c11.517 0 23.032 4.394 31.819 13.18L756.404 480.18c8.439 8.438 13.181 19.885 13.181 31.82s-4.741 23.38-13.181 31.82L338.838 961.376c-17.574 17.573-46.065 17.573-63.64-0.001-17.573-17.573-17.573-46.065 0.001-63.64L660.944 512 275.198 126.265c-17.574-17.573-17.574-46.066-0.001-63.64C283.985 53.839 295.501 49.445 307.018 49.445z"},null,-1)];function Nt(t,l){return e.openBlock(),e.createElementBlock("svg",Wt,Tt)}const Ke=I(Et,[["render",Nt]]),_t={class:"mx-item-row"},Lt=["xlink:href"],Ht={key:1,class:"label"},Vt={class:"mx-item-row"},jt={class:"mx-shortcut"},xe=e.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},customRender:{type:Function,default:null},customClass:{type:String,default:""},clickHandler:{type:Function,default:null},label:{type:[String,Object,Function],default:""},icon:{type:[String,Object,Function],default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},clickableWhenHasChildren:{type:Boolean,default:!1},rawMenuItem:{type:Object,default:void 0}},emits:["click","subMenuOpen","subMenuClose"],setup(t,{expose:l,emit:d}){const b=t,M=d,{clickHandler:P,clickClose:c,clickableWhenHasChildren:F,disabled:L,hidden:y,label:s,icon:G,iconFontClass:U,showRightArrow:ee,shortcut:A,hasChildren:O}=e.toRefs(b),R=e.ref(!1),x=e.ref(!1),v=e.ref(),w=e.inject("globalOptions"),V=e.inject("globalHasSlot"),p=e.inject("globalRenderSlot"),D=e.inject("globalCloseMenu"),z=e.inject("menuContext"),Z={showSubMenu:()=>R.value?(z.markActiveMenuItem(Z,!0),!0):O.value?(ae(),!0):!1,isDisabledOrHidden:()=>L.value||y.value,getElement:()=>v.value,focus:()=>x.value=!0,blur:()=>x.value=!1,click:te};e.onMounted(()=>{z.isMenuItemDataCollectedFlag()?e.nextTick(()=>{let W=0;const ne=z.getElement();if(ne){let ie=0;for(let j=0;j<ne.children.length;j++){const re=ne.children[j];if(re.getAttribute("data-type")==="ContextMenuItem"){if(re===v.value){W=ie;break}ie++}}}z.addChildMenuItem(Z,W)}):z.addChildMenuItem(Z)}),e.onBeforeUnmount(()=>{z.removeChildMenuItem(Z)});function te(W){if(!L.value){if(W){const ne=W.target;if(ne.classList.contains("mx-context-no-clickable")||w.value.ignoreClickClassName&&ne.classList.contains(w.value.ignoreClickClassName))return;if(w.value.clickCloseClassName&&ne.classList.contains(w.value.clickCloseClassName)){W.stopPropagation(),D(b.rawMenuItem);return}}O.value?F.value?(typeof P.value=="function"&&P.value(W),M("click",W)):R.value||ae():(typeof P.value=="function"&&P.value(W),M("click",W),c.value&&D(b.rawMenuItem))}}function ae(W){x.value=!1,z.checkCloseOtherSubMenuTimeOut()||z.closeOtherSubMenu(),L.value||(z.markActiveMenuItem(Z),O.value&&(W||z.markThisOpenedByKeyBoard(),z.addOpenedSubMenu(()=>{x.value=!1,R.value=!1,M("subMenuClose")}),R.value=!0,M("subMenuOpen")))}function J(){return{disabled:L.value,label:s.value,icon:G.value,iconFontClass:U.value,showRightArrow:ee.value,clickClose:c.value,clickableWhenHasChildren:F.value,shortcut:A.value,theme:w.value.theme,isOpen:R,hasChildren:O,onClick:te,onMouseEnter:ae,closeMenu:D}}return l({showSubMenu:R,keyBoardFocusMenu:x}),(W,ne)=>e.unref(y)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-context-menu-item-wrapper",ref_key:"menuItemRef",ref:v,"data-type":"ContextMenuItem"},[e.unref(V)("itemRender")?(e.openBlock(),e.createBlock(e.unref(g),{key:0,vnode:()=>e.unref(p)("itemRender",J())},null,8,["vnode"])):t.customRender?(e.openBlock(),e.createBlock(e.unref(g),{key:1,vnode:t.customRender,data:J()},null,8,["vnode","data"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["mx-context-menu-item",e.unref(L)?"disabled":"",x.value?"keyboard-focus":"",t.customClass?" "+t.customClass:"",R.value?"open":""]),onClick:te,onMouseenter:ae},[e.renderSlot(W.$slots,"default",{},()=>[e.createElementVNode("div",_t,[e.createElementVNode("div",{class:e.normalizeClass(["mx-icon-placeholder",t.preserveIconWidth?"preserve-width":""])},[e.renderSlot(W.$slots,"icon",{},()=>[e.unref(V)("itemIconRender")?(e.openBlock(),e.createBlock(e.unref(g),{key:0,vnode:()=>e.unref(p)("itemIconRender",J())},null,8,["vnode"])):typeof t.svgIcon=="string"&&t.svgIcon?(e.openBlock(),e.createElementBlock("svg",e.mergeProps({key:1,class:"icon svg"},t.svgProps),[e.createElementVNode("use",{"xlink:href":t.svgIcon},null,8,Lt)],16)):typeof e.unref(G)!="string"?(e.openBlock(),e.createBlock(e.unref(g),{key:2,vnode:e.unref(G),data:e.unref(G)},null,8,["vnode","data"])):typeof e.unref(G)=="string"&&e.unref(G)!==""?(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(e.unref(G)+" icon "+e.unref(U)+" "+e.unref(w).iconFontClass)},null,2)):e.createCommentVNode("",!0)]),t.checked?e.renderSlot(W.$slots,"check",{key:0},()=>[e.unref(V)("itemCheckRender")?(e.openBlock(),e.createBlock(e.unref(g),{key:0,vnode:()=>e.unref(p)("itemCheckRender",J())},null,8,["vnode"])):e.createCommentVNode("",!0),e.createVNode(Rt)]):e.createCommentVNode("",!0)],2),e.renderSlot(W.$slots,"label",{},()=>[e.unref(V)("itemLabelRender")?(e.openBlock(),e.createBlock(e.unref(g),{key:0,vnode:()=>e.unref(p)("itemLabelRender",J())},null,8,["vnode"])):typeof e.unref(s)=="string"?(e.openBlock(),e.createElementBlock("span",Ht,e.toDisplayString(e.unref(s)),1)):(e.openBlock(),e.createBlock(e.unref(g),{key:2,vnode:e.unref(s),data:e.unref(s)},null,8,["vnode","data"]))])]),e.createElementVNode("div",Vt,[e.unref(A)?e.renderSlot(W.$slots,"shortcut",{key:0},()=>[e.unref(V)("itemShortcutRender")?(e.openBlock(),e.createBlock(e.unref(g),{key:0,vnode:()=>e.unref(p)("itemShortcutRender",J())},null,8,["vnode"])):e.createCommentVNode("",!0),e.createElementVNode("span",jt,e.toDisplayString(e.unref(A)),1)]):e.createCommentVNode("",!0),e.unref(ee)?e.renderSlot(W.$slots,"rightArrow",{key:1},()=>[e.unref(V)("itemRightArrowRender")?(e.openBlock(),e.createBlock(e.unref(g),{key:0,vnode:()=>e.unref(p)("itemRightArrowRender",J())},null,8,["vnode"])):e.createCommentVNode("",!0),e.createVNode(Ke)]):e.createCommentVNode("",!0)])])],34)),e.unref(w).menuTransitionProps?(e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.mergeProps({key:3},e.unref(w).menuTransitionProps)),{default:e.withCtx(()=>[R.value?e.renderSlot(W.$slots,"submenu",{key:0}):e.createCommentVNode("",!0)]),_:3},16)):R.value?e.renderSlot(W.$slots,"submenu",{key:4}):e.createCommentVNode("",!0)],512))}}),$t=e.defineComponent({name:"ContextMenuSperator",components:{VNodeRender:g},setup(){const t=e.inject("globalHasSlot"),l=e.inject("globalRenderSlot");return{globalHasSlot:t,globalRenderSlot:l}}}),zt={key:1,class:"mx-context-menu-item-sperator mx-context-no-clickable"};function At(t,l,d,b,M,P){const c=e.resolveComponent("VNodeRender");return t.globalHasSlot("separatorRender")?(e.openBlock(),e.createBlock(c,{key:0,vnode:()=>t.globalRenderSlot("separatorRender",{})},null,8,["vnode"])):(e.openBlock(),e.createElementBlock("div",zt))}const Se=I($t,[["render",At]]),Ft=e.defineComponent({name:"ContextSubMenu",components:{ContextMenuItem:xe,ContextMenuSeparator:Se,ContextMenuIconRight:Ke},props:{items:{type:Object,default:null},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0},adjustPosition:{type:Boolean,default:!0},direction:{type:String,default:"br"}},setup(t){const l=e.inject("menuContext"),d=e.inject("globalOptions"),b=e.inject("globalHasSlot"),M=e.inject("globalRenderSlot"),{zIndex:P,getParentWidth:c,getParentHeight:F}=l,{adjustPosition:L}=e.toRefs(t),y=e.ref(),s=e.ref(),G=e.ref(),U=[],ee=e.inject("globalSetCurrentSubMenu"),A=[];let O=null,R=0;function x(){O&&O.blur()}function v(u,$){if(u){for(let q=$!==void 0?$:0;q<A.length;q++)if(!A[q].isDisabledOrHidden()){w(q);break}}else for(let q=$!==void 0?$:A.length-1;q>=0;q--)if(!A[q].isDisabledOrHidden()){w(q);break}}function w(u){if(O&&x(),u!==void 0&&(O=A[Math.max(0,Math.min(u,A.length-1))]),!!O&&(O.focus(),ie.value)){const $=O.getElement();$&&(te.value=Math.min(Math.max(-ae.value,-$.offsetTop-$.offsetHeight+re.value),0))}}function V(){ee(p)}const p={isTopLevel:()=>l.getParentContext()===null,closeSelfAndActiveParent:()=>{const u=Z.getParentContext();if(u){u.closeOtherSubMenu();const $=u.getSubMenuInstanceContext();if($)return $.focusCurrentItem(),!0}return!1},closeCurrentSubMenu:()=>{var u;return(u=Z.getParentContext())==null?void 0:u.closeOtherSubMenu()},moveCurrentItemFirst:()=>v(!0),moveCurrentItemLast:()=>v(!1),moveCurrentItemDown:()=>v(!0,O?A.indexOf(O)+1:0),moveCurrentItemUp:()=>v(!1,O?A.indexOf(O)-1:0),focusCurrentItem:()=>w(),openCurrentItemSubMenu:()=>O?O==null?void 0:O.showSubMenu():!1,triggerCurrentItemClick:u=>O==null?void 0:O.click(u)};let D=!1,z=!1;const Z={zIndex:P+1,container:l.container,adjustPadding:d.value.adjustPadding||m.defaultAdjustPadding,getParentWidth:()=>{var u;return((u=y.value)==null?void 0:u.offsetWidth)||0},getParentHeight:()=>{var u;return((u=y.value)==null?void 0:u.offsetHeight)||0},getParentX:()=>j.value.x,getParentY:()=>j.value.y,getParentAbsX:()=>y.value?r(y.value,l.container):0,getParentAbsY:()=>y.value?B(y.value,l.container):0,getPositon:()=>[0,0],addOpenedSubMenu(u){U.push(u)},closeOtherSubMenu(){U.forEach(u=>u()),U.splice(0,U.length),ee(p)},checkCloseOtherSubMenuTimeOut(){return R?(clearTimeout(R),R=0,!0):!1},closeOtherSubMenuWithTimeOut(){R=setTimeout(()=>{R=0,this.closeOtherSubMenu()},200)},addChildMenuItem:(u,$)=>{$===void 0?A.push(u):A.splice($,0,u)},removeChildMenuItem:u=>{A.splice(A.indexOf(u),1)},markActiveMenuItem:(u,$=!1)=>{x(),O=u,$&&w()},markThisOpenedByKeyBoard:()=>{D=!0},isOpenedByKeyBoardFlag:()=>D?(D=!1,!0):!1,isMenuItemDataCollectedFlag:()=>z,getElement:()=>y.value||null,getParentContext:()=>l,getSubMenuInstanceContext:()=>p};e.provide("menuContext",Z);const te=e.ref(0),ae=e.ref(0);function J(u){u?te.value=Math.min(Math.max(te.value-50,-ae.value),0):te.value=Math.min(te.value+50,0)}function W(u){u.preventDefault(),u.stopPropagation(),J(u.deltaY>0)}function ne(u){d.value.mouseScroll&&(u.preventDefault(),u.stopPropagation(),J(u.deltaY>0))}const ie=e.ref(!1),j=e.ref({x:0,y:0}),re=e.ref(0);return e.onMounted(()=>{const u=l.getPositon();j.value={x:u[0]??d.value.xOffset??0,y:u[1]??d.value.yOffset??0},ee(p),e.nextTick(()=>{var $,q;const Q=y.value;if(Q&&s.value){const{container:pe}=l,We=(c==null?void 0:c())??0,on=(F==null?void 0:F())??0,we=typeof l.adjustPadding=="number"?l.adjustPadding:(($=l.adjustPadding)==null?void 0:$.x)??0,Be=typeof l.adjustPadding=="number"?l.adjustPadding:((q=l.adjustPadding)==null?void 0:q.y)??0,be=on>0?Be:0,ln=document.documentElement.scrollHeight,an=document.documentElement.scrollWidth,sn=Math.min(an,pe.offsetWidth),Te=Math.min(ln,pe.offsetHeight);let Ne=r(Q,pe),_e=B(Q,pe);t.direction.includes("l")?j.value.x-=Q.offsetWidth+we:t.direction.includes("r")?j.value.x+=We+we:(j.value.x+=We/2,j.value.x-=(Q.offsetWidth+we)/2),t.direction.includes("t")?j.value.y-=Q.offsetHeight+Be*2:t.direction.includes("b")?j.value.y-=Be:j.value.y-=(Q.offsetHeight+Be)/2,L.value&&e.nextTick(()=>{Ne=r(Q,pe),_e=B(Q,pe);const rn=Ne+Q.offsetWidth-sn,Ze=_e+Q.offsetHeight+be*2-Te;if(ie.value=Ze>0,ae.value=Q.offsetHeight-Te+be*2,rn>0){const ge=We+Q.offsetWidth-we,Ce=Ne;ge>Ce?j.value.x-=Ce:j.value.x-=ge}if(ie.value){const ge=Ze,Ce=_e;ge>Ce?j.value.y-=Ce-be:j.value.y-=ge-be,re.value=Te-be*2}else re.value=0})}Q==null||Q.focus({preventScroll:!0}),l.isOpenedByKeyBoardFlag()&&v(!0),z=!0})}),{menu:y,scroll:s,options:d,zIndex:P,constOptions:m,scrollValue:te,upScrollButton:G,overflow:ie,position:j,scrollHeight:ae,maxHeight:re,globalHasSlot:b,globalRenderSlot:M,onScroll:J,onSubMenuBodyClick:V,onMouseWhell:ne,onMouseWhellMx:W,solveNumberOrStringSize:k}}}),Dt={key:0,class:"mx-context-menu-updown placeholder"},Kt={key:1,class:"mx-context-menu-updown placeholder"},Ut={class:"mx-context-menu-scroll",ref:"scroll"};function Yt(t,l,d,b,M,P){const c=e.resolveComponent("ContextMenuSeparator"),F=e.resolveComponent("ContextSubMenu",!0),L=e.resolveComponent("ContextMenuItem"),y=e.resolveComponent("ContextMenuIconRight");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-context-menu",t.options.customClass?t.options.customClass:"",t.options.theme??""]),style:e.normalizeStyle({maxWidth:t.maxWidth?t.solveNumberOrStringSize(t.maxWidth):`${t.constOptions.defaultMaxWidth}px`,minWidth:t.minWidth?t.solveNumberOrStringSize(t.minWidth):`${t.constOptions.defaultMinWidth}px`,maxHeight:t.overflow&&t.maxHeight>0?`${t.maxHeight}px`:void 0,zIndex:t.zIndex,left:`${t.position.x}px`,top:`${t.position.y}px`}),"data-type":"ContextSubMenu",onClick:l[4]||(l[4]=(...s)=>t.onSubMenuBodyClick&&t.onSubMenuBodyClick(...s)),onWheel:l[5]||(l[5]=(...s)=>t.onMouseWhell&&t.onMouseWhell(...s))},[e.createElementVNode("div",{class:e.normalizeClass(["mx-context-menu-items"]),ref:"menu",style:e.normalizeStyle({top:`${t.scrollValue}px`})},[e.renderSlot(t.$slots,"default",{},()=>[t.overflow&&t.options.updownButtonSpaceholder?(e.openBlock(),e.createElementBlock("div",Dt)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(s,G)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:G},[s.hidden!==!0&&s.divided==="up"?(e.openBlock(),e.createBlock(c,{key:0})):e.createCommentVNode("",!0),s.hidden!==!0&&s.divided==="self"?(e.openBlock(),e.createBlock(c,{key:1})):(e.openBlock(),e.createBlock(L,{key:2,clickHandler:s.onClick?U=>s.onClick(U):void 0,disabled:s.disabled,hidden:s.hidden,icon:s.icon,iconFontClass:s.iconFontClass,svgIcon:s.svgIcon,svgProps:s.svgProps,label:s.label,customRender:s.customRender,customClass:s.customClass,checked:s.checked,shortcut:s.shortcut,clickClose:s.clickClose,clickableWhenHasChildren:s.clickableWhenHasChildren,preserveIconWidth:s.preserveIconWidth!==void 0?s.preserveIconWidth:t.options.preserveIconWidth,showRightArrow:s.children&&s.children.length>0,hasChildren:s.children&&s.children.length>0,rawMenuItem:s,onSubMenuOpen:s.onSubMenuOpen,onSubMenuClose:s.onSubMenuClose},e.createSlots({_:2},[s.children&&s.children.length>0?{name:"submenu",fn:e.withCtx(()=>[e.createVNode(F,{items:s.children,maxWidth:s.maxWidth,minWidth:s.minWidth,adjustPosition:s.adjustSubMenuPosition!==void 0?s.adjustSubMenuPosition:t.options.adjustPosition,direction:s.direction!==void 0?s.direction:t.options.direction},null,8,["items","maxWidth","minWidth","adjustPosition","direction"])]),key:"0"}:void 0]),1032,["clickHandler","disabled","hidden","icon","iconFontClass","svgIcon","svgProps","label","customRender","customClass","checked","shortcut","clickClose","clickableWhenHasChildren","preserveIconWidth","showRightArrow","hasChildren","rawMenuItem","onSubMenuOpen","onSubMenuClose"])),s.hidden!==!0&&(s.divided==="down"||s.divided===!0)?(e.openBlock(),e.createBlock(c,{key:3})):e.createCommentVNode("",!0)],64))),128)),t.overflow&&t.options.updownButtonSpaceholder?(e.openBlock(),e.createElementBlock("div",Kt)):e.createCommentVNode("",!0)])],4),e.createElementVNode("div",Ut,[e.withDirectives(e.createElementVNode("div",{ref:"upScrollButton",class:e.normalizeClass("mx-context-menu-updown mx-context-no-clickable up"+(t.overflow&&t.scrollValue<0?"":" disabled")),onClick:l[0]||(l[0]=s=>t.onScroll(!1)),onWheel:l[1]||(l[1]=(...s)=>t.onMouseWhellMx&&t.onMouseWhellMx(...s))},[e.createVNode(y)],34),[[e.vShow,t.overflow]]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass("mx-context-menu-updown mx-context-no-clickable down"+(t.overflow&&t.scrollValue>-t.scrollHeight?"":" disabled")),onClick:l[2]||(l[2]=s=>t.onScroll(!0)),onWheel:l[3]||(l[3]=(...s)=>t.onMouseWhellMx&&t.onMouseWhellMx(...s))},[e.createVNode(y)],34),[[e.vShow,t.overflow]])],512)],38)}const Me=I(Ft,[["render",Yt]]),Gt={class:"mx-menu-ghost-host"},Ue=e.defineComponent({__name:"ContextSubMenuWrapper",props:{options:{type:Object,default:null},show:{type:Object,default:null},container:{type:Object,default:null},isFullScreenContainer:{type:Boolean,default:!0}},emits:["close","closeAnimFinished"],setup(t,{expose:l,emit:d}){const b=t,M=d,P=e.useSlots(),{options:c,show:F,container:L}=e.toRefs(b);e.onMounted(()=>{F.value&&G()}),e.onBeforeUnmount(()=>{O()}),e.watch(F,p=>{p?G():(T(y),O())});const y={closeMenu:U,isClosed:ee};let s=!1;function G(){A(),E(y)}function U(p){s=!0,M("close",p),c.value.menuTransitionProps||M("closeAnimFinished"),T(y)}function ee(){return s}function A(){setTimeout(()=>{document.addEventListener("click",w,!0),document.addEventListener("contextmenu",w,!0),document.addEventListener("scroll",v,!0),!b.isFullScreenContainer&&L.value&&L.value.addEventListener("scroll",v,!0),c.value.keyboardControl!==!1&&document.addEventListener("keydown",x)},50)}function O(){document.removeEventListener("contextmenu",w,!0),document.removeEventListener("click",w,!0),document.removeEventListener("scroll",v,!0),!b.isFullScreenContainer&&L.value&&L.value.removeEventListener("scroll",v,!0),c.value.keyboardControl!==!1&&document.removeEventListener("keydown",x)}const R=e.ref();e.provide("globalSetCurrentSubMenu",p=>R.value=p);function x(p){var D,z,Z,te,ae,J,W,ne,ie,j,re,u,$;let q=!0;switch(p.key){case"Escape":{((D=R.value)==null?void 0:D.isTopLevel())===!1?(z=R.value)==null||z.closeCurrentSubMenu():U();break}case"ArrowDown":(Z=R.value)==null||Z.moveCurrentItemDown();break;case"ArrowUp":(te=R.value)==null||te.moveCurrentItemUp();break;case"Home":(ae=R.value)==null||ae.moveCurrentItemFirst();break;case"End":(J=R.value)==null||J.moveCurrentItemLast();break;case"ArrowLeft":{(W=R.value)!=null&&W.closeSelfAndActiveParent()||(ie=(ne=c.value).onKeyFocusMoveLeft)==null||ie.call(ne);break}case"ArrowRight":(j=R.value)!=null&&j.openCurrentItemSubMenu()||(u=(re=c.value).onKeyFocusMoveRight)==null||u.call(re);break;case"Enter":($=R.value)==null||$.triggerCurrentItemClick(p);break;default:q=!1;break}q&&R.value&&(p.stopPropagation(),p.preventDefault())}function v(){c.value.closeWhenScroll!==!1&&U()}function w(p){V(p.target,p)}function V(p,D){for(var z,Z;p;){if(p.classList&&p.classList.contains("mx-menu-host"))return;p=p.parentNode}c.value.clickCloseOnOutside!==!1?(O(),U()):(Z=(z=c.value).onClickOnOutside)==null||Z.call(z,D)}return e.provide("globalOptions",c),e.provide("globalCloseMenu",U),e.provide("globalIsFullScreenContainer",b.isFullScreenContainer),e.provide("globalHasSlot",p=>P[p]!==void 0),e.provide("globalRenderSlot",(p,D)=>e.renderSlot(P,p,{...D},()=>[e.h("span","Render slot failed")],!1)),e.provide("menuContext",{zIndex:c.value.zIndex||m.defaultZindex,container:L.value,adjustPadding:{x:0,y:0},getParentAbsY:()=>c.value.x,getParentAbsX:()=>c.value.y,getParentX:()=>0,getParentY:()=>0,getParentWidth:()=>0,getParentHeight:()=>0,getPositon:()=>[c.value.x,c.value.y],closeOtherSubMenuWithTimeOut:()=>{},checkCloseOtherSubMenuTimeOut:()=>!1,addOpenedSubMenu:()=>{},closeOtherSubMenu:()=>{},getParentContext:()=>null,getSubMenuInstanceContext:()=>null,getElement:()=>null,addChildMenuItem:()=>{},removeChildMenuItem:()=>{},markActiveMenuItem:()=>{},markThisOpenedByKeyBoard:()=>{},isOpenedByKeyBoardFlag:()=>!1,isMenuItemDataCollectedFlag:()=>!1}),l(y),(p,D)=>(e.openBlock(),e.createElementBlock("div",Gt,[e.unref(c).menuTransitionProps?(e.openBlock(),e.createBlock(e.Transition,e.mergeProps({key:0,appear:""},e.unref(c).menuTransitionProps,{onAfterLeave:D[0]||(D[0]=z=>M("closeAnimFinished"))}),{default:e.withCtx(()=>[e.unref(F)?(e.openBlock(),e.createBlock(Me,{key:0,class:"mx-menu-host",items:e.unref(c).items,adjustPosition:e.unref(c).adjustPosition,maxWidth:e.unref(c).maxWidth||e.unref(m).defaultMaxWidth,minWidth:e.unref(c).minWidth||e.unref(m).defaultMinWidth,direction:e.unref(c).direction||e.unref(m).defaultDirection},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:3},8,["items","adjustPosition","maxWidth","minWidth","direction"])):e.createCommentVNode("",!0)]),_:3},16)):e.unref(F)?(e.openBlock(),e.createBlock(Me,{key:1,class:"mx-menu-host",items:e.unref(c).items,adjustPosition:e.unref(c).adjustPosition,maxWidth:e.unref(c).maxWidth||e.unref(m).defaultMaxWidth,minWidth:e.unref(c).minWidth||e.unref(m).defaultMinWidth,direction:e.unref(c).direction||e.unref(m).defaultDirection},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:3},8,["items","adjustPosition","maxWidth","minWidth","direction"])):e.createCommentVNode("",!0)]))}}),Ye=e.defineComponent({name:"ContextMenu",emits:["update:show","close"],props:{options:{type:Object,default:null},show:{type:Boolean,default:!1}},setup(t,l){const{options:d,show:b}=e.toRefs(t);return l.expose({closeMenu:()=>l.emit("update:show",!1),isClosed:()=>!b.value}),()=>{const{isNew:M,container:P,eleId:c}=f(d.value);return[e.h(e.Teleport,{to:`#${c}`},[e.h(Ue,{options:d,show:b,container:P,isFullScreenContainer:!M,onClose:F=>{var L,y;l.emit("update:show",!1),l.emit("close"),(y=(L=d.value).onClose)==null||y.call(L,F)}},l.slots)])]}}}),Ge=e.defineComponent({name:"ContextMenuGroup",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},clickHandler:{type:Function,default:null},label:{type:String,default:""},icon:{type:String,default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},adjustSubMenuPosition:{type:Boolean,default:void 0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0}},setup(t,l){const d=e.inject("globalOptions"),{adjustSubMenuPosition:b,maxWidth:M,minWidth:P}=e.toRefs(t),c=typeof b.value<"u"?b.value:d.value.adjustPosition;return()=>e.h(xe,{...t,showRightArrow:!0,maxWidth:void 0,minWidth:void 0,adjustSubMenuPosition:void 0,hasChildren:typeof l.slots.default!==void 0},l.slots.default?{submenu:()=>e.h(Me,{maxWidth:M.value,minWidth:P.value,adjustPosition:c},{default:l.slots.default})}:void 0)}});function Xt(t,l,d,b){const M=e.ref(!0),P=e.h(Ue,{options:t,show:M,container:l,isFullScreenContainer:!d,onCloseAnimFinished:()=>{e.render(null,l)},onClose:c=>{var F;(F=t.onClose)==null||F.call(t,c),M.value=!1}},b);return e.render(P,l),P.component}function Xe(t,l){const d=f(t);return Xt(t,d.container,d.isNew,l).exposed}const Ee={install(t){t.config.globalProperties.$contextmenu=Xe,t.component("ContextMenu",Ye),t.component("ContextMenuItem",xe),t.component("ContextMenuGroup",Ge),t.component("ContextMenuSperator",Se),t.component("ContextMenuSeparator",Se),t.component("ContextSubMenu",Me)},showContextMenu(t,l){return Xe(t,l)},isAnyContextMenuOpen(){return N()},closeContextMenu:_,transformMenuPosition:H},Zt={},qt={class:"mx-menu-bar-icon-menu",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},Qt=[e.createElementVNode("path",{d:"M133.310936 296.552327l757.206115 0c19.781623 0 35.950949-16.169326 35.950949-35.950949 0-19.781623-15.997312-35.950949-35.950949-35.950949L133.310936 224.650428c-19.781623 0-35.950949 16.169326-35.950949 35.950949C97.359987 280.383 113.529313 296.552327 133.310936 296.552327z"},null,-1),e.createElementVNode("path",{d:"M890.51705 476.135058 133.310936 476.135058c-19.781623 0-35.950949 16.169326-35.950949 35.950949 0 19.781623 16.169326 35.950949 35.950949 35.950949l757.206115 0c19.781623 0 35.950949-16.169326 35.950949-35.950949C926.467999 492.304384 910.298673 476.135058 890.51705 476.135058z"},null,-1),e.createElementVNode("path",{d:"M890.51705 727.447673 133.310936 727.447673c-19.781623 0-35.950949 15.997312-35.950949 35.950949s16.169326 35.950949 35.950949 35.950949l757.206115 0c19.781623 0 35.950949-15.997312 35.950949-35.950949S910.298673 727.447673 890.51705 727.447673z"},null,-1)];function Jt(t,l){return e.openBlock(),e.createElementBlock("svg",qt,Qt)}const en=I(Zt,[["render",Jt]]),tn=["onClick","onMouseenter"],nn=e.defineComponent({__name:"MenuBar",props:{options:{type:Object,default:null}},setup(t){const l=t,d=e.ref(),b=e.ref(!1),M=e.ref([]),P=e.ref(null);function c(){b.value=!0}function F(){b.value=!1}e.onMounted(()=>{M.value=l.options.items||[]}),e.watch(()=>l.options,()=>{M.value=l.options.items||[]});let L=null,y=-1;function s(){y<M.value.length-1?y++:y=0,ee(y,M.value[y])}function G(){y>0?y--:y=M.value.length-1,ee(y,M.value[y])}function U(x){const v=l.options.barPopDirection??"bl";let w=0,V=0;return v.startsWith("b")?V=B(x)+x.offsetHeight:v.startsWith("t")?V=B(x):V=B(x)+x.offsetHeight/2,v.endsWith("l")?w=r(x):v.startsWith("r")?w=r(x)+x.offsetWidth:w=r(x)+x.offsetWidth/2,{x:w,y:V}}function ee(x,v){var w;if(y=x,!v.children)return;L&&(L.closeMenu(),L=null,b.value=!0),P.value=v;const V=(w=d.value)==null?void 0:w.children[x];if(V){const{x:p,y:D}=U(V);L=Ee.showContextMenu({...l.options,items:v.children,x:p,y:D,onKeyFocusMoveLeft(){G()},onKeyFocusMoveRight(){s()},onClose(){P.value==v&&(b.value=!1,P.value=null)}})}}function A(){y=0;const x=d.value;if(x){const{x:v,y:w}=U(x);L=Ee.showContextMenu({...l.options,x:v,y:w})}}function O(x,v){v?(b.value=!0,ee(x,v),v.onClick&&(v.clickableWhenHasChildren===!0&&v.children&&v.children.length>0||!v.children||v.children.length===0)&&v.onClick()):A()}function R(x,v){b.value&&ee(x,v)}return(x,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-menu-bar",t.options.theme??"",t.options.mini?"mini":""]),onFocus:c,onBlur:F},[e.renderSlot(x.$slots,"prefix"),t.options.mini?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuBarContent",ref:d,class:"mx-menu-bar-content"},[e.createElementVNode("div",{class:"mx-menu-bar-item",onClick:v[0]||(v[0]=w=>O(0,null))},[e.createVNode(en)])],512)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"menuBarContent",ref:d,class:"mx-menu-bar-content"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(w,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass(["mx-menu-bar-item",w==P.value?"active":""]),onClick:p=>O(V,w),onMouseenter:p=>R(V,w)},e.toDisplayString(w.label),43,tn))),128))],512)),e.renderSlot(x.$slots,"suffix")],34))}});a.ContextMenu=Ye,a.ContextMenuGroup=Ge,a.ContextMenuItem=xe,a.ContextMenuSeparator=Se,a.MenuBar=nn,a.default=Ee,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})})($e,$e.exports);var Vl=$e.exports;const jl=Il(Vl);var $l=Object.defineProperty,zl=Object.defineProperties,Al=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,Fl=Object.prototype.hasOwnProperty,Dl=Object.prototype.propertyIsEnumerable,Je=(n,o,a)=>o in n?$l(n,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[o]=a,de=(n,o)=>{for(var a in o||(o={}))Fl.call(o,a)&&Je(n,a,o[a]);if(Qe)for(var a of Qe(o))Dl.call(o,a)&&Je(n,a,o[a]);return n},he=(n,o)=>zl(n,Al(o));const Mt={},Kl=function(n,o){Mt[n]=o},fe=Re({name:"Icon",props:{name:String,color:String},computed:{svg(){if(this.name)return Mt[this.name]}},render(n){const o=this.svg;if(!o)return console.warn(`The name of '${this.name}' could not be found.`),ce("span",{class:"m-svg-icon"},null);const a={color:this.color?this.color:o.fill?o.fill:null};return ce("span",{class:["m-svg-icon","m-svg-icon--"+this.name]},[ce("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:o.viewBox,style:a,class:o.class},[o.defs&&ce("defs",{innerHTML:o.defs},null),o.path&&ce("path",{fill:"currentColor",d:o.path},null),o.html&&ce("g",{innerHTML:o.html},null),this.$slots.default])])}});fe.add=Kl;const et={name:"error",fill:"#F56C6C",viewBox:"0 0 1024 1024",path:"M512,952C269,952,72,755,72,512S269,72,512,72s440,197,440,440S755,952,512,952z M579.7,512l101.6-101.6 c18.7-18.7,18.7-49,0-67.7c-18.7-18.7-49-18.7-67.7,0l0,0L512,444.3L410.4,342.7c-18.7-18.7-49-18.7-67.7,0s-18.7,49,0,67.7 L444.3,512L342.7,613.6c-18.7,18.7-18.7,49,0,67.7c18.7,18.7,49,18.7,67.7,0L512,579.7l101.6,101.6c18.7,18.7,49,18.7,67.7,0 c18.7-18.7,18.7-49,0-67.7L579.7,512z"},tt={name:"info",fill:"#1CADF2",viewBox:"0 0 1024 1024",path:"M512,72C269,72,72,269,72,512s197,440,440,440s440-197,440-440S755,72,512,72z M581,673.9 c-33.2,49.9-67,88.3-123.8,88.3c-38.8-6.3-54.7-34.1-46.3-62.4L484,457.6c1.8-5.9-1.2-12.3-6.6-14.2c-5.4-1.9-15.9,5.1-25.1,15.1 l-44.2,53.2c-1.2-8.9-0.1-23.7-0.1-29.6c33.2-49.9,87.8-89.2,124.8-89.2c35.2,3.6,51.8,31.7,45.7,62.6l-73.6,243.3 c-1,5.5,1.9,11.1,6.9,12.8c5.4,1.9,16.8-5.1,26-15.1l44.2-53.1C583,652.3,581,667.9,581,673.9z M571.2,357.6 c-28,0-50.6-20.4-50.6-50.4c0-30,22.7-50.3,50.6-50.3c28,0,50.6,20.4,50.6,50.3C621.8,337.3,599.1,357.6,571.2,357.6z"},nt={name:"success",fill:"#17B77E",viewBox:"0 0 1024 1024",path:"M512,72C269,72,72,269,72,512s197,440,440,440s440-197,440-440S755,72,512,72L512,72z M758.9,374 c-48.5,48.6-81.2,76.9-172.3,186.8c-52.6,63.4-102.3,131.5-102.7,132L462.1,720c-4.6,6.1-13.5,6.8-19.1,1.6L267.9,558.9 c-17.8-16.5-18.8-44.4-2.3-62.2s44.4-18.8,62.2-2.3l104.9,97.5c5.5,5.1,14.1,4.5,18.9-1.3c16.2-20.1,38.4-44.5,62.4-68.6 c90.2-90.9,145.6-139.7,175.2-161.3c36-26.2,77.3-48.6,87.3-36.2C792,343.9,782.5,350.3,758.9,374L758.9,374z"},ot={name:"warning",fill:"#FFC603",viewBox:"0 0 1024 1024",path:"M512,952C269,952,72,755,72,512S269,72,512,72s440,197,440,440S755,952,512,952z M510,770.8 c30.4,0,55-24.6,55-55s-24.6-55-55-55s-55,24.6-55,55S479.6,770.8,510,770.8z M509.8,255.3c-39.3,0-71.2,31.9-71.2,71.2 c0,3.1,0.2,6.2,0.6,9.3L472.4,588c2.5,19.3,18.9,33.7,38.4,33.7c19.4,0,35.8-14.4,38.2-33.7l31.8-252.2c5-39.2-22.8-75-62-79.9 C515.9,255.5,512.8,255.3,509.8,255.3z"},lt={name:"loading",viewBox:"0 0 50 50",html:'<g stroke="#f2f2f2" stroke-width="3.5"  stroke-linecap="round" fill="none"><circle cx="25" cy="25" r="20" class="m-loading-icon-bg-path"></circle><circle cx="25" cy="25" r="20" stroke="#20a0ff" stroke-dasharray="90, 150" stroke-dashoffset="0" class="m-loading-icon-active-path"><animate attributeName="stroke-dasharray" dur="1.5s" values="1,200;90,150;90,150" repeatCount="indefinite"/><animate attributeName="stroke-dashoffset" dur="1.5s" values="0;-40px;-120px" repeatCount="indefinite"/><animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="2s" repeatCount="indefinite"/></circle></g>'};fe.add(et.name,et);fe.add(tt.name,tt);fe.add(nt.name,nt);fe.add(ot.name,ot);fe.add(lt.name,lt);var Ul=(n,o)=>{const a=n.__vccOpts||n;for(const[e,C]of o)a[e]=C;return a};function Yl(n,o){const a=ve(0);return a.value=window.setTimeout(n,o),{stop(){window.clearTimeout(a.value)}}}const Gl=Re({components:{Icon:fe},name:"m-message",emits:["close","destroy","collapsed"],props:{id:String,type:{type:String,default:"info"},title:String,message:String,iconURL:String,duration:{type:Number,default:3e3},isCollapsed:Boolean,collapsable:Boolean,supportHTML:Boolean,width:String,className:String,wrapperClassName:String,closable:Boolean,stopTimerOnHover:{type:Boolean,default:!0}},setup(n,{expose:o,emit:a}){const e=vt({visible:!0,collapsed:n.isCollapsed,timer:null});let C;const N=()=>{n.duration<0||({stop:C}=Yl(()=>{T()},n.duration))},E=()=>{C==null||C()},T=()=>{e.visible=!1},_=()=>{e.collapsed=!e.collapsed,a("collapsed",e.collapsed)},m=()=>{e.visible=!1},B=()=>{n.stopTimerOnHover&&E()},r=()=>{n.stopTimerOnHover&&N()};return ut(()=>{E()}),Fe(()=>{N()}),o({close:T}),{state:e,handleClearTimer:B,handleStartTimer:r,triggerCollapse:_,handleClose:m}}}),Xl=["id"],Zl={key:0,class:"m-message-icons"},ql=["src"],Ql={class:"m-message-content"},Jl={key:0,class:"m-message--title"},ea=["innerHTML"],ta={key:0,class:"m-message--description"},na={class:"m-message--control"},oa=oe("svg",{viewBox:"0 0 35 35",width:"20",height:"20",version:"1.1",fill:"currentColor"},[oe("path",{d:"M9.4,13.9c-0.2,0.2-0.2,0.6,0,0.8l8.1,8.1l0,0l0,0l8.1-8.1c0.2-0.2,0.2-0.6,0-0.8l-1.3-1.3 c-0.2-0.2-0.6-0.2-0.8,0l-5.5,5.5c-0.2,0.2-0.6,0.2-0.8,0l-5.5-5.5c-0.2-0.2-0.6-0.2-0.8,0L9.4,13.9z"})],-1),la=[oa],aa=oe("svg",{viewBox:"0 0 35 35",width:"20",height:"20",version:"1.1",fill:"currentColor"},[oe("path",{d:"M19.5,17.5l5.1,5.1l-2,2l-5.1-5.1l-5.1,5.1l-2-2l5.1-5.1l-5.1-5.1l2-2l5.1,5.1l5.1-5.1l2,2L19.5,17.5z"})],-1),sa=[aa];function ia(n,o,a,e,C,N){const E=bt("icon");return K(),Pe(at,{name:"m-message-fade",appear:"",mode:"in-out",onBeforeLeave:o[4]||(o[4]=T=>n.$emit("close")),onAfterLeave:o[5]||(o[5]=T=>n.$emit("destroy"))},{default:De(()=>[n.state.visible?(K(),X("div",{key:0,class:ke(["m-message-wrapper",n.wrapperClassName]),id:n.id,style:ct({width:n.width})},[oe("div",{class:ke(["m-message",n.className]),onMouseenter:o[2]||(o[2]=(...T)=>n.handleClearTimer&&n.handleClearTimer(...T)),onMouseleave:o[3]||(o[3]=(...T)=>n.handleStartTimer&&n.handleStartTimer(...T))},[n.iconURL||n.type?(K(),X("div",Zl,[n.iconURL?(K(),X("img",{key:0,src:n.iconURL,class:"m-message--icon"},null,8,ql)):n.type?(K(),Pe(E,{key:1,name:n.type,class:"m-message--icon"},null,8,["name"])):se("",!0)])):se("",!0),oe("div",Ql,[n.title||n.$slots.title?(K(),X("div",Jl,[Ve(n.$slots,"title",{},()=>[Oe(ye(n.title),1)])])):se("",!0),n.supportHTML&&n.message?(K(),X(Ie,{key:1},[n.state.collapsed?se("",!0):(K(),X("div",{key:0,class:"m-message--description",innerHTML:n.message},null,8,ea))],64)):(K(),X(Ie,{key:2},[n.state.collapsed?se("",!0):(K(),X("div",ta,[Ve(n.$slots,"default",{},()=>[Oe(ye(n.message),1)])]))],64))]),oe("div",na,[n.collapsable&&(n.title||n.$slots.title)?(K(),X("button",{key:0,class:ke(["m-message--button m-message--arrow-down",{"is-collapsed":n.state.collapsed}]),onClick:o[0]||(o[0]=(...T)=>n.triggerCollapse&&n.triggerCollapse(...T))},la,2)):se("",!0),n.closable?(K(),X("button",{key:1,class:"m-message--button m-message--close",onClick:o[1]||(o[1]=(...T)=>n.handleClose&&n.handleClose(...T))},sa)):se("",!0)])],34)],14,Xl)):se("",!0)]),_:3})}var ra=Ul(Gl,[["render",ia]]);const ze=[];let ca=0;const Le={};let wt={};const ua={stopTimerOnHover:!0,duration:3e3},Y=n=>{const o="m-message-"+ca++,a=he(de(de(de({},ua),wt),n),{id:o});delete a.hasMask,delete a.position,delete a.zIndex;const e=n.position||"top-center",C=n.hasMask||!1,N=e+(C?"-mask":"");let E=Le[N];E?E.count++:(E=Le[N]={el:document.createElement("div"),count:1},E.el.className=["m-message-container","is-"+e,C?"has-mask":""].filter(function(r){return!!r}).join(" "),document.body.appendChild(E.el)),n.zIndex&&(E.el.style.zIndex=String(n.zIndex));let T=null;rt(n.message)?(T={default:()=>n.message},a.message=""):typeof n.message=="function"&&(T={default:n.message},a.message="");const _=ce(ra,a,T),m=document.createElement("div");_.appContext=n.ctx||Y._context||null,_.props.onClose=n.onClose,_.props.onDestroy=()=>{E.count--,E.count===0&&(delete Le[N],E.el.remove()),He(null,m)},He(_,m),e.indexOf("bottom")===0&&E.el.firstChild?E.el.insertBefore(m.firstElementChild,E.el.firstChild):E.el.appendChild(m.firstElementChild);const B={id:o,close(){var r,H;(H=(r=_==null?void 0:_.component)==null?void 0:r.exposed)==null||H.close()}};return ze.push(B),B};Y.success=(n,o)=>Y(he(de({},o),{type:"success",message:n}));Y.info=(n,o)=>Y(he(de({},o),{type:"info",message:n}));Y.warning=(n,o)=>Y(he(de({},o),{type:"warning",message:n}));Y.error=(n,o)=>Y(he(de({},o),{type:"error",message:n}));Y.loading=(n,o)=>Y(he(de({},o),{type:"loading",message:n}));Y.closeAll=function(){for(let n=ze.length-1;n>=0;n--)ze[n].close()};Y.setDefault=n=>{wt=de({},n)};const da=(n,o)=>(n.install=o,n);var Ae=da(Y,function(n,o={}){Y._context=n._context,n.config.globalProperties["$"+(o.name||"mmessage")]=Y,o.defaultOptions&&Y.setDefault(o.defaultOptions)});const ma=Pl("tabbar",()=>{const n=Ol(),o=ve([]),a=ve(-1);async function e(m){var S,i,h;const B=[];m.matched.forEach((f,k)=>{var g;k>0&&(g=f.components)!=null&&g.default.name&&B.push(f.components.default.name)});const r=(S=m.matched.at(-1))==null?void 0:S.meta,H=m.fullPath;if(m.name!=="reload"&&!o.value.find(k=>k.routeName?k.routeName===m.name:k.tabId===H)){const k={tabId:H,fullPath:m.fullPath,routeName:m.name,title:typeof(r==null?void 0:r.title)=="function"?r.title():r==null?void 0:r.title,icon:(r==null?void 0:r.icon)??((h=(i=r==null?void 0:r.breadcrumbNeste)==null?void 0:i.findLast(g=>g.icon))==null?void 0:h.icon),name:B};a.value>=0?(o.value.splice(a.value+1,0,k),a.value=-1):o.value.push(k)}}function C(m){const B=[],r=[];o.value.forEach(S=>{S.tabId===m?r.push(...S.name):B.push(...S.name)});const H=[];r.forEach(S=>{B.includes(S)||H.push(S)}),n.remove(H),o.value=o.value.filter(S=>S.tabId!==m)}function N(m){const B=[],r=[];o.value.forEach(S=>{S.tabId!==m?r.push(...S.name):B.push(...S.name)});const H=[];r.forEach(S=>{B.includes(S)||H.push(S)}),n.remove(H),o.value=o.value.filter(S=>S.tabId===m)}function E(m){const B=o.value.findIndex(i=>i.tabId===m),r=[],H=[];o.value.forEach((i,h)=>{h<B?H.push(...i.name):r.push(...i.name)});const S=[];H.forEach(i=>{r.includes(i)||S.push(i)}),n.remove(S),o.value=o.value.filter((i,h)=>h>=B)}function T(m){const B=o.value.findIndex(i=>i.tabId===m),r=[],H=[];o.value.forEach((i,h)=>{h>B?H.push(...i.name):r.push(...i.name)});const S=[];H.forEach(i=>{r.includes(i)||S.push(i)}),n.remove(S),o.value=o.value.filter((i,h)=>h<=B)}function _(){o.value=[]}return{list:o,leaveIndex:a,add:e,remove:C,removeOtherSide:N,removeLeftSide:E,removeRightSide:T,clean:_}}),Bt=ma;function fa(){const n=xt(),o=St(),a=Bt();function e(){return n.fullPath}function C(i){const h=a.list.findIndex(f=>f.tabId===e());a.$patch({leaveIndex:h}),o.push(i)}function N(i){const h=e();o.go(i),a.remove(h)}function E(i){const h=e();o.push(i).then(()=>{a.remove(h)})}function T(i=e()){const h=e();if(a.list.some(f=>f.tabId===i))if(a.list.length>1)if(i===h){const f=a.list.findIndex(k=>k.tabId===i);f<a.list.length-1?E(a.list[f+1].fullPath):E(a.list[f-1].fullPath)}else a.remove(i);else Ae.error("当前只有一个标签页，已阻止关闭",{zIndex:2e3});else Ae.error("关闭的页面不存在",{zIndex:2e3})}function _(i=e()){const h=e();if(i!==h){const f=a.list.findIndex(k=>k.tabId===i);o.push(a.list[f].fullPath)}a.removeOtherSide(i)}function m(i=e()){const h=e();if(i!==h){const f=a.list.findIndex(g=>g.tabId===i);a.list.findIndex(g=>g.tabId===h)<f&&o.push(a.list[f].fullPath)}a.removeLeftSide(i)}function B(i=e()){const h=e();if(i!==h){const f=a.list.findIndex(g=>g.tabId===i);a.list.findIndex(g=>g.tabId===h)>f&&o.push(a.list[f].fullPath)}a.removeRightSide(i)}function r(i=e()){return a.list.some(h=>h.tabId!==i)}function H(i=e()){var f;let h=!0;if(i===((f=a.list[0])==null?void 0:f.tabId))h=!1;else{const k=a.list.findIndex(g=>g.tabId===i);h=a.list.some((g,I)=>I<k&&g.tabId!==i)}return h}function S(i=e()){var f;let h=!0;if(i===((f=a.list.at(-1))==null?void 0:f.tabId))h=!1;else{const k=a.list.findIndex(g=>g.tabId===i);h=a.list.some((g,I)=>I>=k&&g.tabId!==i)}return h}return{getId:e,open:C,go:N,close:E,closeById:T,closeOtherSide:_,closeLeftSide:m,closeRightSide:B,checkCloseOtherSide:r,checkCloseLeftSide:H,checkCloseRightSide:S}}const It=n=>(pt("data-v-39d55a7e"),n=n(),ft(),n),pa={class:"tabbar-container"},va=["data-index","title","onClick","onContextmenu"],ha=It(()=>oe("div",{class:"tab-dividers"},null,-1)),ba=It(()=>oe("div",{class:"tab-background"},null,-1)),ga={class:"tab-content"},Ca=["onClick"],ka=Re({name:"Tabbar",__name:"index",setup(n){const o=xt(),a=St(),e=Rl(),C=Bt(),N=fa(),E=Nl(),T=Tl({reactive:!0}),_=it(()=>N.getId()),m=ve(),B=ve(),r=gt([]);dt(()=>{r.value=[]}),kt(()=>o,f=>{e.settings.tabbar.enable&&C.add(f).then(()=>{const k=C.list.findIndex(g=>g.tabId===_.value);k!==-1&&(i(r.value[k].offsetLeft),H())})},{immediate:!0,deep:!0});function H(){B.value.$el.clientWidth>m.value.clientWidth&&localStorage.getItem("tabbarScrollTip")===void 0&&(localStorage.setItem("tabbarScrollTip",""),Ae.info("标签栏数量超过展示区域范围，可以将鼠标移到标签栏上，通过鼠标滚轮滑动浏览",{title:"温馨提示",duration:5e3,closable:!0,zIndex:2e3}))}function S(f){m.value.scrollBy({left:f.deltaY||f.detail})}function i(f){m.value.scrollTo({left:f-50,behavior:"smooth"})}function h(f,k){f.preventDefault(),jl.showContextMenu({x:f.x,y:f.y,zIndex:1050,iconFontClass:"",customClass:"tabbar-contextmenu",items:[{label:"重新加载",icon:"i-ri:refresh-line",disabled:k.tabId!==_.value,onClick:()=>E.reload()},{label:"关闭标签页",icon:"i-ri:close-line",disabled:C.list.length<=1,divided:!0,onClick:()=>{N.closeById(k.tabId)}},{label:"关闭其他标签页",disabled:!N.checkCloseOtherSide(k.tabId),onClick:()=>{N.closeOtherSide(k.tabId)}},{label:"关闭左侧标签页",disabled:!N.checkCloseLeftSide(k.tabId),onClick:()=>{N.closeLeftSide(k.tabId)}},{label:"关闭右侧标签页",disabled:!N.checkCloseRightSide(k.tabId),onClick:()=>{N.closeRightSide(k.tabId)}}]})}return Fe(()=>{qe("alt+left,alt+right,alt+w,alt+1,alt+2,alt+3,alt+4,alt+5,alt+6,alt+7,alt+8,alt+9,alt+0",(f,k)=>{var g,I;if(e.settings.tabbar.enable&&e.settings.tabbar.enableHotkeys)switch(f.preventDefault(),k.key){case"alt+left":if(C.list[0].tabId!==_.value){const le=C.list.findIndex(ue=>ue.tabId===_.value);a.push(C.list[le-1].fullPath)}break;case"alt+right":if(((g=C.list.at(-1))==null?void 0:g.tabId)!==_.value){const le=C.list.findIndex(ue=>ue.tabId===_.value);a.push(C.list[le+1].fullPath)}break;case"alt+w":N.closeById(_.value);break;case"alt+1":case"alt+2":case"alt+3":case"alt+4":case"alt+5":case"alt+6":case"alt+7":case"alt+8":case"alt+9":{const le=Number(k.key.split("+")[1]);(I=C.list[le-1])!=null&&I.fullPath&&a.push(C.list[le-1].fullPath);break}case"alt+0":a.push(C.list[C.list.length-1].fullPath);break}})}),mt(()=>{qe.unbind("alt+left,alt+right,alt+w,alt+1,alt+2,alt+3,alt+4,alt+5,alt+6,alt+7,alt+8,alt+9,alt+0")}),(f,k)=>{const g=El;return K(),X("div",pa,[oe("div",{ref_key:"tabsRef",ref:m,class:"tabs",onWheel:je(S,["prevent"])},[ce(st,{ref_key:"tabContainerRef",ref:B,name:"tabbar",tag:"div",class:"tab-container"},{default:De(()=>[(K(!0),X(Ie,null,ht(me(C).list,(I,le)=>(K(),X("div",{key:I.tabId,ref_for:!0,ref_key:"tabRef",ref:r,"data-index":le,class:ke(["tab",{actived:I.tabId===me(_)}]),title:typeof(I==null?void 0:I.title)=="function"?I.title():I.title,onClick:ue=>me(a).push(I.fullPath),onContextmenu:ue=>h(ue,I)},[ha,ba,oe("div",ga,[(K(),X("div",{key:I.tabId,class:"title"},[me(e).settings.tabbar.enableIcon&&I.icon?(K(),Pe(g,{key:0,name:I.icon,class:"icon"},null,8,["name"])):se("",!0),Oe(" "+ye(typeof(I==null?void 0:I.title)=="function"?I.title():I.title),1)])),me(C).list.length>1?(K(),X("div",{key:0,class:"action-icon",onClick:je(ue=>me(N).closeById(I.tabId),["stop"])},[ce(g,{name:"i-ri:close-fill"})],8,Ca)):se("",!0),yt(oe("div",{class:"hotkey-number"},ye(le+1),513),[[Ct,me(T).alt&&le<9]])])],42,va))),128))]),_:1},512)],544)])}}}),Ma=Wl(ka,[["__scopeId","data-v-39d55a7e"]]);export{Ma as default};
