import{g as I,M as Je,d as de,h as Z,b as f,a4 as ye,a9 as W,a6 as Le,a8 as w,as as _,x as De,R as me,ap as Ke,a2 as Kt,a3 as Wt,a5 as Ft,ao as dt,bF as Ee,aC as $t,aw as zt,au as jt,br as Ht,ad as Xe,ae as Gt,av as Ut,aD as Vt}from"./index-10f45eca.js";import{w as Be,i as Pt}from"./_plugin-vue_export-helper-2f157ef4.js";import{K as ie,p as ft,I as qt}from"./index-ceff8631.js";import{E as Yt,M as Xt,_ as Zt,D as Jt,z as It,m as Qt,j as ea,k as ta,n as aa,A as na}from"./Col-c6f28462.js";import{a as U,i as ia,u as bt}from"./useState-4f4a8c99.js";import{R as mt,c as ra,o as la}from"./vnode-b14d5532.js";function oa(n){var e=I(),t=I(!1);function r(){for(var a=arguments.length,i=new Array(a),u=0;u$?(T=o,N.value="x"):(T=y,N.value="y"),e(-T,-T)&&p.preventDefault()}var L=I({onTouchStart:d,onTouchMove:R,onTouchEnd:H,onWheel:B});function V(p){L.value.onTouchStart(p)}function D(p){L.value.onTouchMove(p)}function z(p){L.value.onTouchEnd(p)}function ce(p){L.value.onWheel(p)}De(function(){var p,o;document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",z,{passive:!1}),(p=n.value)===null||p===void 0||p.addEventListener("touchstart",V,{passive:!1}),(o=n.value)===null||o===void 0||o.addEventListener("wheel",ce,{passive:!1})}),Je(function(){document.removeEventListener("touchmove",D),document.removeEventListener("touchend",z)})}function pt(n,e){var t=I(n);function r(a){var i=typeof a=="function"?a(t.value):a;i!==t.value&&e(i,t.value),t.value=i}return[t,r]}var ya=function(){var e=I(new Map),t=function(a){return function(i){e.value.set(a,i)}};return Ft(function(){e.value=new Map}),[t,e]};const ha=ya;function ga(n,e,t,r){if(!ft(n))return n;e=It(e,n);for(var a=-1,i=e.length,u=i-1,c=n;c!=null&&++aS?"left":"right"})}),x=_(j,2),d=x[0],R=x[1],H=pt(0,function(h,S){!E.value&&e.onTabScroll&&e.onTabScroll({direction:h>S?"top":"bottom"})}),N=_(H,2),B=N[0],L=N[1],V=U(0),D=_(V,2),z=D[0],ce=D[1],p=U(0),o=_(p,2),y=o[0],T=o[1],K=U(null),$=_(K,2),C=$[0],Se=$[1],he=U(null),A=_(he,2),q=A[0],re=A[1],xe=U(0),ge=_(xe,2),Te=ge[0],ve=ge[1],_e=U(0),Q=_(_e,2),We=Q[0],Re=Q[1],we=ua(new Map),pe=_(we,2),Fe=pe[0],$e=pe[1],Ae=va(u,Fe),wt=Z(function(){return"".concat(c.value,"-nav-operations-hidden")}),Ce=I(0),Pe=I(0);Le(function(){E.value?e.rtl?(Ce.value=0,Pe.value=Math.max(0,z.value-C.value)):(Ce.value=Math.min(0,C.value-z.value),Pe.value=0):(Ce.value=Math.min(0,q.value-y.value),Pe.value=0)});var ze=function(S){return SPe.value?Pe.value:S},et=I(),At=U(),tt=_(At,2),je=tt[0],at=tt[1],He=function(){at(Date.now())},Ge=function(){clearTimeout(et.value)},nt=function(S,m){S(function(M){var P=ze(M+m);return P})};ma(l,function(h,S){if(E.value){if(C.value>=z.value)return!1;nt(R,h)}else{if(q.value>=y.value)return!1;nt(L,S)}return Ge(),He(),!0}),me(je,function(){Ge(),je.value&&(et.value=setTimeout(function(){at(0)},100))});var it=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey,m=Ae.value.get(S)||{width:0,height:0,left:0,right:0,top:0};if(E.value){var M=d.value;e.rtl?m.rightd.value+C.value&&(M=m.right+m.width-C.value):m.left<-d.value?M=-m.left:m.left+m.width>-d.value+C.value&&(M=-(m.left+m.width-C.value)),L(0),R(ze(M))}else{var P=B.value;m.top<-B.value?P=-m.top:m.top+m.height>-B.value+q.value&&(P=-(m.top+m.height-q.value)),R(0),L(ze(P))}},Ue=I(0),Ve=I(0);Le(function(){var h,S,m,M,P,Y,X,fe=Ae.value;["top","bottom"].includes(e.tabPosition)?(S="width",P=C.value,Y=z.value,X=Te.value,m=e.rtl?"right":"left",M=Math.abs(d.value)):(S="height",P=q.value,Y=z.value,X=We.value,m="top",M=-B.value);var ee=P;Y+X>P&&YM+ee){G=te-1;break}}for(var ue=0,J=be-1;J>=0;J-=1){var ne=fe.get(le[J].key)||St;if(ne[m]0,ue=d.value+C.value