const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/contextmenu.B10Jyqbk.js","assets/vue.BxlDVA1H.js","assets/_plugin-vue_export-helper.DlAUqK2U.js","assets/contextmenu.D7miVulY.css"])))=>i.map(i=>d[i]); import{y as qt,u as vn,K as wn,$ as Bt,t as ye,Z as bn,_ as yn,S as Ee,e as En,ak as Xt}from"./index.lP_uh0LI.js";import{d as tn,a as Ge,N as Yt,R as _n,C as Dn,r as Sn,c as gt,O as Tn,P as Cn,a2 as In,o as An,X as On,m as Vn,b as Ht,e as Le,f as he,g as mt,w as xn,s as Wt,t as vt,F as Ut,k as Pn,Z as Re,j as Ne,h as wt,A as Ln,u as Rn,Q as Nn,J as bt}from"./vue.BxlDVA1H.js";import{_ as Mn}from"./_plugin-vue_export-helper.DlAUqK2U.js";/**! * Sortable 1.15.6 * @author RubaXa * @author owenm * @license MIT */function $t(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),t.push.apply(t,n)}return t}function re(i){for(var e=1;e=0)&&(t[a]=i[a]);return t}function qn(i,e){if(i==null)return{};var t=Fn(i,e),n,a;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(t[n]=i[n])}return t}var Bn="1.15.6";function ce(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var de=ce(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),We=ce(/Edge/i),jt=ce(/firefox/i),qe=ce(/safari/i)&&!ce(/chrome/i)&&!ce(/android/i),Lt=ce(/iP(ad|od|hone)/i),nn=ce(/chrome/i)&&ce(/android/i),an={capture:!1,passive:!1};function C(i,e,t){i.addEventListener(e,t,!de&&an)}function T(i,e,t){i.removeEventListener(e,t,!de&&an)}function rt(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function rn(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function Q(i,e,t,n){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&rt(i,e):rt(i,e))||n&&i===t)return i;if(i===t)break}while(i=rn(i))}return null}var zt=/\s+/g;function $(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var n=(" "+i.className+" ").replace(zt," ").replace(" "+e+" "," ");i.className=(n+(t?" "+e:"")).replace(zt," ")}}function b(i,e,t){var n=i&&i.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function Ve(i,e){var t="";if(typeof i=="string")t=i;else do{var n=b(i,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(i=i.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(t)}function on(i,e,t){if(i){var n=i.getElementsByTagName(e),a=0,r=n.length;if(t)for(;a=r,!s)return n;if(n===ae())break;n=me(n,!1)}return!1}function xe(i,e,t,n){for(var a=0,r=0,s=i.children;r2&&arguments[2]!==void 0?arguments[2]:{},a=n.evt,r=qn(n,zn);Ue.pluginEvent.bind(y)(e,t,re({dragEl:p,parentEl:P,ghostEl:S,rootEl:V,nextEl:Se,lastDownEl:tt,cloneEl:x,cloneHidden:ge,dragStarted:Me,putSortable:F,activeSortable:y.active,originalEvent:a,oldIndex:Oe,oldDraggableIndex:Xe,newIndex:j,newDraggableIndex:pe,hideGhostForTarget:pn,unhideGhostForTarget:gn,cloneNowHidden:function(){ge=!0},cloneNowShown:function(){ge=!1},dispatchSortableEvent:function(u){Y({sortable:t,name:u,originalEvent:a})}},r))};function Y(i){jn(re({putSortable:F,cloneEl:x,targetEl:p,rootEl:V,oldIndex:Oe,oldDraggableIndex:Xe,newIndex:j,newDraggableIndex:pe},i))}var p,P,S,V,Se,tt,x,ge,Oe,j,Xe,pe,Ke,F,Ae=!1,ot=!1,st=[],_e,Z,_t,Dt,Zt,Qt,Me,Ie,Ye,He=!1,Ze=!1,nt,X,St=[],Ot=!1,lt=[],ct=typeof document<"u",Qe=Lt,Jt=We||de?"cssFloat":"float",Gn=ct&&!nn&&!Lt&&"draggable"in document.createElement("div"),fn=function(){if(ct){if(de)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),dn=function(e,t){var n=b(e),a=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=xe(e,0,t),s=xe(e,1,t),u=r&&b(r),f=s&&b(s),d=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+M(r).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+M(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&u.float&&u.float!=="none"){var g=u.float==="left"?"left":"right";return s&&(f.clear==="both"||f.clear===g)?"vertical":"horizontal"}return r&&(u.display==="block"||u.display==="flex"||u.display==="table"||u.display==="grid"||d>=a&&n[Jt]==="none"||s&&n[Jt]==="none"&&d+m>a)?"vertical":"horizontal"},Kn=function(e,t,n){var a=n?e.left:e.top,r=n?e.right:e.bottom,s=n?e.width:e.height,u=n?t.left:t.top,f=n?t.right:t.bottom,d=n?t.width:t.height;return a===u||r===f||a+s/2===u+d/2},Zn=function(e,t){var n;return st.some(function(a){var r=a[W].options.emptyInsertThreshold;if(!(!r||Rt(a))){var s=M(a),u=e>=s.left-r&&e<=s.right+r,f=t>=s.top-r&&t<=s.bottom+r;if(u&&f)return n=a}}),n},hn=function(e){function t(r,s){return function(u,f,d,m){var g=u.options.group.name&&f.options.group.name&&u.options.group.name===f.options.group.name;if(r==null&&(s||g))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return t(r(u,f,d,m),s)(u,f,d,m);var E=(s?u:f).options.group.name;return r===!0||typeof r=="string"&&r===E||r.join&&r.indexOf(E)>-1}}var n={},a=e.group;(!a||et(a)!="object")&&(a={name:a}),n.name=a.name,n.checkPull=t(a.pull,!0),n.checkPut=t(a.put),n.revertClone=a.revertClone,e.group=n},pn=function(){!fn&&S&&b(S,"display","none")},gn=function(){!fn&&S&&b(S,"display","")};ct&&!nn&&document.addEventListener("click",function(i){if(ot)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),ot=!1,!1},!0);var De=function(e){if(p){e=e.touches?e.touches[0]:e;var t=Zn(e.clientX,e.clientY);if(t){var n={};for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[W]._onDragOver(n)}}},Qn=function(e){p&&p.parentNode[W]._isOutsideThisEl(e.target)};function y(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=fe({},e),i[W]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return dn(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,u){s.setData("Text",u.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:y.supportPointer!==!1&&"PointerEvent"in window&&(!qe||Lt),emptyInsertThreshold:5};Ue.initializePlugins(this,i,t);for(var n in t)!(n in e)&&(e[n]=t[n]);hn(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:Gn,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?C(i,"pointerdown",this._onTapStart):(C(i,"mousedown",this._onTapStart),C(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(i,"dragover",this),C(i,"dragenter",this)),st.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),fe(this,Wn())}y.prototype={constructor:y,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ie=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,p):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,a=this.options,r=a.preventOnFilter,s=e.type,u=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(u||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,m=a.filter;if(oi(n),!p&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||a.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&qe&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Q(f,a.draggable,n,!1),!(f&&f.animated)&&tt!==f)){if(Oe=z(f),Xe=z(f,a.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Y({sortable:t,rootEl:d,name:"filter",targetEl:f,toEl:n,fromEl:n}),H("filter",t,{evt:e}),r&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(g){if(g=Q(d,g.trim(),n,!1),g)return Y({sortable:t,rootEl:g,name:"filter",targetEl:f,fromEl:n,toEl:n}),H("filter",t,{evt:e}),!0}),m)){r&&e.preventDefault();return}a.handle&&!Q(d,a.handle,n,!1)||this._prepareDragStart(e,u,f)}}},_prepareDragStart:function(e,t,n){var a=this,r=a.el,s=a.options,u=r.ownerDocument,f;if(n&&!p&&n.parentNode===r){var d=M(n);if(V=r,p=n,P=p.parentNode,Se=p.nextSibling,tt=n,Ke=s.group,y.dragged=p,_e={target:p,clientX:(t||e).clientX,clientY:(t||e).clientY},Zt=_e.clientX-d.left,Qt=_e.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,p.style["will-change"]="all",f=function(){if(H("delayEnded",a,{evt:e}),y.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!jt&&a.nativeDraggable&&(p.draggable=!0),a._triggerDragStart(e,t),Y({sortable:a,name:"choose",originalEvent:e}),$(p,s.chosenClass,!0)},s.ignore.split(",").forEach(function(m){on(p,m.trim(),Tt)}),C(u,"dragover",De),C(u,"mousemove",De),C(u,"touchmove",De),s.supportPointer?(C(u,"pointerup",a._onDrop),!this.nativeDraggable&&C(u,"pointercancel",a._onDrop)):(C(u,"mouseup",a._onDrop),C(u,"touchend",a._onDrop),C(u,"touchcancel",a._onDrop)),jt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,p.draggable=!0),H("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(We||de))){if(y.eventCanceled){this._onDrop();return}s.supportPointer?(C(u,"pointerup",a._disableDelayedDrag),C(u,"pointercancel",a._disableDelayedDrag)):(C(u,"mouseup",a._disableDelayedDrag),C(u,"touchend",a._disableDelayedDrag),C(u,"touchcancel",a._disableDelayedDrag)),C(u,"mousemove",a._delayedDragTouchMoveHandler),C(u,"touchmove",a._delayedDragTouchMoveHandler),s.supportPointer&&C(u,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(f,s.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){p&&Tt(p),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;T(e,"mouseup",this._disableDelayedDrag),T(e,"touchend",this._disableDelayedDrag),T(e,"touchcancel",this._disableDelayedDrag),T(e,"pointerup",this._disableDelayedDrag),T(e,"pointercancel",this._disableDelayedDrag),T(e,"mousemove",this._delayedDragTouchMoveHandler),T(e,"touchmove",this._delayedDragTouchMoveHandler),T(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):t?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(p,"dragend",this),C(V,"dragstart",this._onDragStart));try{document.selection?it(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Ae=!1,V&&p){H("dragStarted",this,{evt:t}),this.nativeDraggable&&C(document,"dragover",Qn);var n=this.options;!e&&$(p,n.dragClass,!1),$(p,n.ghostClass,!0),y.active=this,e&&this._appendGhost(),Y({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Z){this._lastX=Z.clientX,this._lastY=Z.clientY,pn();for(var e=document.elementFromPoint(Z.clientX,Z.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Z.clientX,Z.clientY),e!==t);)t=e;if(p.parentNode[W]._isOutsideThisEl(e),t)do{if(t[W]){var n=void 0;if(n=t[W]._onDragOver({clientX:Z.clientX,clientY:Z.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=rn(t));gn()}},_onTouchMove:function(e){if(_e){var t=this.options,n=t.fallbackTolerance,a=t.fallbackOffset,r=e.touches?e.touches[0]:e,s=S&&Ve(S,!0),u=S&&s&&s.a,f=S&&s&&s.d,d=Qe&&X&&Kt(X),m=(r.clientX-_e.clientX+a.x)/(u||1)+(d?d[0]-St[0]:0)/(u||1),g=(r.clientY-_e.clientY+a.y)/(f||1)+(d?d[1]-St[1]:0)/(f||1);if(!y.active&&!Ae){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(Y({rootEl:P,name:"add",toEl:P,fromEl:V,originalEvent:e}),Y({sortable:this,name:"remove",toEl:P,originalEvent:e}),Y({rootEl:P,name:"sort",toEl:P,fromEl:V,originalEvent:e}),Y({sortable:this,name:"sort",toEl:P,originalEvent:e})),F&&F.save()):j!==Oe&&j>=0&&(Y({sortable:this,name:"update",toEl:P,originalEvent:e}),Y({sortable:this,name:"sort",toEl:P,originalEvent:e})),y.active&&((j==null||j===-1)&&(j=Oe,pe=Xe),Y({sortable:this,name:"end",toEl:P,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){H("nulling",this),V=p=P=S=Se=x=tt=ge=_e=Z=Me=j=pe=Oe=Xe=Ie=Ye=F=Ke=y.dragged=y.ghost=y.clone=y.active=null,lt.forEach(function(e){e.checked=!0}),lt.length=_t=Dt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":p&&(this._onDragOver(e),Jn(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,a=0,r=n.length,s=this.options;aa.right+r||i.clientY>n.bottom&&i.clientX>n.left:i.clientY>a.bottom+r||i.clientX>n.right&&i.clientY>n.top}function ii(i,e,t,n,a,r,s,u){var f=n?i.clientY:i.clientX,d=n?t.height:t.width,m=n?t.top:t.left,g=n?t.bottom:t.right,E=!1;if(!s){if(u&&ntm+d*r/2:fg-nt)return-Ye}else if(f>m+d*(1-a)/2&&fg-d*r/2)?f>m+d/2?1:-1:0}function ai(i){return z(p)yn(()=>import("./contextmenu.B10Jyqbk.js"),__vite__mapDeps([0,1,2,3]))),t=Ge([]),n=Ge(),a=Ge(),r=Ge(),s=qt(),u=vn(),f=qt(),{themeConfig:d}=Yt(u),{tagsViewRoutes:m}=Yt(f),g=wn(),E=_n(),D=Dn(),c=Sn({routeActive:"",routePath:E.path,dropdown:{x:"",y:""},sortable:"",tagsRefsIndex:0,tagsViewList:[],tagsViewRoutesList:[]}),I=gt(()=>d.value.tagsStyle),A=gt(()=>d.value),G=gt(()=>l=>Bt.setTagsViewNameI18n(l)),R=l=>A.value.isShareTagsView?l.path===c.routePath:l.query&&Object.keys(l.query).length||l.params&&Object.keys(l.params).length?l.url?l.url===c.routeActive:l.path===c.routeActive:l.path===c.routePath,L=l=>{Ee.set("tagsViewList",l)},q=async()=>{c.routeActive=await ie(E),c.routePath=await E.meta.isDynamic?E.meta.isDynamicPath:E.path,c.tagsViewList=[],c.tagsViewRoutesList=m.value,oe()},oe=async()=>{Ee.get("tagsViewList")&&A.value.isCacheTagsView?c.tagsViewList=await Ee.get("tagsViewList"):(await c.tagsViewRoutesList.map(l=>{var o;(o=l.meta)!=null&&o.isAffix&&!l.meta.isHide&&(l.url=ie(l),c.tagsViewList.push({...l}),g.addCachedView(l))}),await se(E.path,E)),kt(A.value.isShareTagsView?c.routePath:c.routeActive)},U=async(l,o)=>{var v,O;let h=(v=o==null?void 0:o.meta)!=null&&v.isDynamic?o.meta.isDynamicPath:l;if(c.tagsViewList.filter(_=>{var k,Pe;return _.path===h&&Xt((k=o==null?void 0:o.meta)!=null&&k.isDynamic?_.params?_.params:null:_.query?_.query:null,(Pe=o==null?void 0:o.meta)!=null&&Pe.isDynamic?o!=null&&o.params?o==null?void 0:o.params:null:o!=null&&o.query?o==null?void 0:o.query:null)}).length<=0){let _=c.tagsViewRoutesList.find(k=>k.path===h);if(!_||_.meta.isAffix||_.meta.isLink&&!_.meta.isIframe)return!1;(O=o==null?void 0:o.meta)!=null&&O.isDynamic?_.params=o.params:_.query=o==null?void 0:o.query,_.url=ie(_),c.tagsViewList.push({..._}),await g.addCachedView(_),L(c.tagsViewList)}},J=(l,o)=>{var w;let h=(w=o==null?void 0:o.meta)!=null&&w.isDynamic?o.meta.isDynamicPath:l;c.tagsViewList.forEach(v=>{var O,_,k;v.path===h&&!Xt((O=o==null?void 0:o.meta)!=null&&O.isDynamic?v.params?v.params:null:v.query?v.query:null,(_=o==null?void 0:o.meta)!=null&&_.isDynamic?o!=null&&o.params?o==null?void 0:o.params:null:o!=null&&o.query?o==null?void 0:o.query:null)&&((k=o==null?void 0:o.meta)!=null&&k.isDynamic?v.params=o.params:v.query=o==null?void 0:o.query,v.url=ie(v),L(c.tagsViewList))})},se=(l,o)=>{bt(async()=>{var w,v,O;let h;if((w=o==null?void 0:o.meta)!=null&&w.isDynamic){if(A.value.isShareTagsView?await J(l,o):await U(l,o),c.tagsViewList.some(_=>{var k;return _.path===((k=o==null?void 0:o.meta)==null?void 0:k.isDynamicPath)}))return L(c.tagsViewList),!1;h=c.tagsViewRoutesList.find(_=>{var k;return _.path===((k=o==null?void 0:o.meta)==null?void 0:k.isDynamicPath)})}else{if(A.value.isShareTagsView?await J(l,o):await U(l,o),c.tagsViewList.some(_=>_.path===l))return L(c.tagsViewList),!1;h=c.tagsViewRoutesList.find(_=>_.path===l)}if(!h||(v=h==null?void 0:h.meta)!=null&&v.isLink&&!h.meta.isIframe)return!1;(O=o==null?void 0:o.meta)!=null&&O.isDynamic?h.params=o!=null&&o.params?o==null?void 0:o.params:E.params:h.query=o!=null&&o.query?o==null?void 0:o.query:E.query,h.url=ie(h),await g.addCachedView(h),await c.tagsViewList.push({...h}),await L(c.tagsViewList)})},B=async l=>{var w;const o=decodeURI(l);let h={};if(c.tagsViewList.forEach(v=>{v.transUrl=be(v),v.transUrl?v.transUrl===be(v)&&(h=v):v.path===o&&(h=v)}),!h)return!1;await g.delCachedView(h),ye.emit("onTagsViewRefreshRouterView",l),(w=h.meta)!=null&&w.isKeepAlive&&g.addCachedView(h)},le=l=>{c.tagsViewList.map((o,h,w)=>{var v;(v=o.meta)!=null&&v.isAffix||(A.value.isShareTagsView?o.path===l:o.url===l)&&(g.delCachedView(o),c.tagsViewList.splice(h,1),setTimeout(()=>{(c.tagsViewList.length===h&&A.value.isShareTagsView?c.routePath===l:c.routeActive===l)?w[w.length-1].meta.isDynamic?h!==w.length?D.push({name:w[h].name,params:w[h].params}):D.push({name:w[w.length-1].name,params:w[w.length-1].params}):h!==w.length?D.push({path:w[h].path,query:w[h].query}):D.push({path:w[w.length-1].path,query:w[w.length-1].query}):(c.tagsViewList.length!==h&&A.value.isShareTagsView?c.routePath===l:c.routeActive===l)&&(w[h].meta.isDynamic?D.push({name:w[h].name,params:w[h].params}):D.push({path:w[h].path,query:w[h].query}))},0))}),L(c.tagsViewList)},ee=l=>{Ee.get("tagsViewList")&&(c.tagsViewList=[],Ee.get("tagsViewList").map(o=>{var h;(h=o.meta)!=null&&h.isAffix&&!o.meta.isHide&&(o.url=ie(o),g.delOthersCachedViews(o),c.tagsViewList.push({...o}))}),se(l,E),L(c.tagsViewList))},ve=()=>{Ee.get("tagsViewList")&&(g.delAllCachedViews(),c.tagsViewList=[],Ee.get("tagsViewList").map(l=>{var o;(o=l.meta)!=null&&o.isAffix&&!l.meta.isHide&&(l.url=ie(l),c.tagsViewList.push({...l}),D.push({path:c.tagsViewList[c.tagsViewList.length-1].path}))}),L(c.tagsViewList))},K=async l=>{const o=c.tagsViewList.find(h=>A.value.isShareTagsView?h.path===l:h.url===l);o.meta.isDynamic?await D.push({name:o.name,params:o.params}):await D.push({name:o.name,query:o.query}),s.setCurrenFullscreen(!0)},te=l=>{let o={};return c.tagsViewList.forEach(h=>{h.transUrl=be(h),h.transUrl?h.transUrl===be(h)&&h.transUrl===l.commonUrl&&(o=h):h.path===decodeURI(l.path)&&(o=h)}),o||null},ue=async l=>{if(l.commonUrl=be(l),!te(l))return En({type:"warning",message:"请正确输入路径及完整参数(query、params)"});const{path:o,name:h,params:w,query:v,meta:O,url:_}=te(l);switch(l.contextMenuClickId){case 0:O.isDynamic?await D.push({name:h,params:w}):await D.push({path:o,query:v}),B(E.fullPath);break;case 1:le(A.value.isShareTagsView?o:_);break;case 2:O.isDynamic?await D.push({name:h,params:w}):await D.push({path:o,query:v}),ee(o);break;case 3:ve();break;case 4:K(A.value.isShareTagsView?o:_);break}},ne=(l,o)=>{const{clientX:h,clientY:w}=o;c.dropdown.x=h,c.dropdown.y=w,a.value.openContextmenu(l)},Te=(l,o)=>{var h;if(!((h=l.meta)!=null&&h.isAffix)&&o.button===1){const w=Object.assign({},{contextMenuClickId:1,...l});ue(w)}},we=(l,o)=>{c.tagsRefsIndex=o,D.push(l)},be=l=>{var w,v;let o=l.query&&Object.keys(l.query).length>0?l.query:l.params;if(!o)return"";let h="";for(let[O,_]of Object.entries(o))(w=l.meta)!=null&&w.isDynamic?h+=`/${_}`:h+=`&${O}=${_}`;return(v=l.meta)!=null&&v.isDynamic?l.isFnClick?decodeURI(l.path):`${l.path.split(":")[0]}${h.replace(/^\//,"")}`:`${l.path}${h.replace(/^&/,"?")}`},ie=l=>{var w;let o=l.query&&Object.keys(l.query).length>0?l.query:l.params;if(!o||Object.keys(o).length<=0)return l.path;let h="";for(let v in o)h+=o[v];return`${(w=l.meta)!=null&&w.isDynamic?l.meta.isDynamicPath:l.path}-${h}`},$e=l=>{n.value.$refs.wrapRef.scrollLeft+=l.wheelDelta/4},ft=()=>{bt(()=>{if(t.value.length<=0)return!1;let l=t.value[c.tagsRefsIndex],o=c.tagsRefsIndex,h=t.value.length,w=t.value[0],v=t.value[t.value.length-1],O=n.value.$refs.wrapRef,_=O.scrollWidth,k=O.offsetWidth,Pe=O.scrollLeft,pt=t.value[c.tagsRefsIndex-1],Ft=t.value[c.tagsRefsIndex+1],je=0,ze=0;l===w?O.scrollLeft=0:l===v?O.scrollLeft=_-k:(o===0?je=w.offsetLeft-5:je=(pt==null?void 0:pt.offsetLeft)-5,o===h?ze=v.offsetLeft+v.offsetWidth+5:ze=Ft.offsetLeft+Ft.offsetWidth+5,ze>Pe+k?O.scrollLeft=ze-k:je{bt(async()=>{let o=await c.tagsViewList;c.tagsRefsIndex=o.findIndex(h=>A.value.isShareTagsView?h.path===l:h.url===l),ft()})},dt=async()=>{const l=document.querySelector(".layout-navbars-tagsview-ul");if(!l)return!1;c.sortable.el&&c.sortable.destroy(),c.sortable=y.create(l,{animation:300,dataIdAttr:"data-url",disabled:!A.value.isSortableTagsView,onEnd:()=>{const o=[];c.sortable.toArray().map(h=>{c.tagsViewList.map(w=>{w.url===h&&o.push({...w})})}),L(o)}})},ht=async()=>{await dt(),Bt.isMobile()&&c.sortable.el&&c.sortable.destroy()};return Tn(()=>{ht(),window.addEventListener("resize",ht),ye.on("onCurrentContextmenuClick",l=>{l.isFnClick=!0,ue(l)}),ye.on("openOrCloseSortable",()=>{dt()}),ye.on("openShareTagsView",()=>{A.value.isShareTagsView&&(D.push("/home"),c.tagsViewList=[],c.tagsViewRoutesList.map(l=>{var o;(o=l.meta)!=null&&o.isAffix&&!l.meta.isHide&&(l.url=ie(l),c.tagsViewList.push({...l}))}))})}),Cn(()=>{ye.off("onCurrentContextmenuClick",()=>{}),ye.off("openOrCloseSortable",()=>{}),ye.off("openShareTagsView",()=>{}),window.removeEventListener("resize",ht)}),In(()=>{t.value=[]}),An(()=>{q(),dt()}),On(async l=>{c.routeActive=ie(l),c.routePath=l.meta.isDynamic?l.meta.isDynamicPath:l.path,await se(l.path,l),kt(A.value.isShareTagsView?c.routePath:c.routeActive)}),Vn(bn.state,l=>{if(l.tagsViewRoutes.tagsViewRoutes.length===c.tagsViewRoutesList.length)return!1;q()},{deep:!0}),(l,o)=>{const h=Ht("SvgIcon"),w=Ht("el-scrollbar");return he(),Le("div",{class:vt(["layout-navbars-tagsview",{"layout-navbars-tagsview-shadow":A.value.layout==="classic"}])},[mt(w,{ref_key:"scrollbarRef",ref:n,onWheel:Re($e,["prevent"])},{default:xn(()=>[Wt("ul",{class:vt(["layout-navbars-tagsview-ul",I.value]),ref_key:"tagsUlRef",ref:r},[(he(!0),Le(Ut,null,Pn(c.tagsViewList,(v,O)=>(he(),Le("li",{key:O,class:vt(["layout-navbars-tagsview-ul-li",{"is-active":R(v)}]),"data-url":v.url,onContextmenu:Re(_=>ne(v,_),["prevent"]),onMousedown:_=>Te(v,_),onClick:_=>we(v,O),ref_for:!0,ref:_=>{_&&(t.value[O]=_)}},[R(v)?(he(),Le("i",ui)):Ne("",!0),!R(v)&&A.value.isTagsviewIcon?(he(),wt(h,{key:1,name:v.meta.icon,class:"pr5"},null,8,["name"])):Ne("",!0),Wt("span",null,Ln(G.value(v)),1),R(v)?(he(),Le(Ut,{key:2},[mt(h,{name:"ele-RefreshRight",class:"ml5 layout-navbars-tagsview-ul-li-refresh",onClick:o[0]||(o[0]=Re(_=>B(l.$route.fullPath),["stop"]))}),v.meta.isAffix?Ne("",!0):(he(),wt(h,{key:0,name:"ele-Close",class:"layout-navbars-tagsview-ul-li-icon layout-icon-active",onClick:Re(_=>le(A.value.isShareTagsView?v.path:v.url),["stop"])},null,8,["onClick"]))],64)):Ne("",!0),v.meta.isAffix?Ne("",!0):(he(),wt(h,{key:3,name:"ele-Close",class:"layout-navbars-tagsview-ul-li-icon layout-icon-three",onClick:Re(_=>le(A.value.isShareTagsView?v.path:v.url),["stop"])},null,8,["onClick"]))],42,li))),128))],2)]),_:1},512),mt(Rn(e),{dropdown:c.dropdown,ref_key:"contextmenuRef",ref:a,onCurrentContextmenuClick:ue},null,8,["dropdown"])],2)}}}),gi=Mn(fi,[["__scopeId","data-v-01df923b"]]);export{gi as default};