import{cs as N,c9 as I,ct as q,cu as J,cv as ce,cc as W,cw as re,cx as de,cy as ve,cz as fe,ag as R,aR as m,bG as G,a$ as me,cA as he,an as u,b6 as X,cg as $,aA as K,bx as be,cB as ge,cC as ye,cD as Q,cE as we,cF as Ve,cG as Te,aB as Ce,cH as xe,cI as L,bw as Se,cJ as Z,cK as ke,cL as Pe,aX as H,bn as T,ch as Be,cM as _e,cN as Ie,cd as p,cO as We,cP as $e,cQ as Ee,cR as Ye,cS as x,ce as Me,cT as Re,cU as j,cV as Xe,ae as He,al as S,aW as M,ai as _,aY as F,ah as A,at as Ae,ap as Ge,a_ as Le,av as ze,cr as De,cp as Oe,bY as Ue,aw as je}from"./index-D68iA7pN.js";const Fe=e=>{const{touchstartX:o,touchendX:a,touchstartY:t,touchendY:s}=e,l=.5,n=16;e.offsetX=a-o,e.offsetY=s-t,Math.abs(e.offsetY)o+n&&e.right(e)),Math.abs(e.offsetX)t+n&&e.down(e))};function Ne(e,o){const a=e.changedTouches[0];o.touchstartX=a.clientX,o.touchstartY=a.clientY,o.start?.({originalEvent:e,...o})}function qe(e,o){const a=e.changedTouches[0];o.touchendX=a.clientX,o.touchendY=a.clientY,o.end?.({originalEvent:e,...o}),Fe(o)}function Je(e,o){const a=e.changedTouches[0];o.touchmoveX=a.clientX,o.touchmoveY=a.clientY,o.move?.({originalEvent:e,...o})}function Ke(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:a=>Ne(a,o),touchend:a=>qe(a,o),touchmove:a=>Je(a,o)}}function Qe(e,o){const a=o.value,t=a?.parent?e.parentElement:e,s=a?.options??{passive:!0},l=o.instance?.$.uid;if(!t||!l)return;const n=Ke(o.value);t._touchHandlers=t._touchHandlers??Object.create(null),t._touchHandlers[l]=n,N(n).forEach(f=>{t.addEventListener(f,n[f],s)})}function Ze(e,o){const a=o.value?.parent?e.parentElement:e,t=o.instance?.$.uid;if(!a?._touchHandlers||!t)return;const s=a._touchHandlers[t];N(s).forEach(l=>{a.removeEventListener(l,s[l])}),delete a._touchHandlers[t]}const ee={mounted:Qe,unmounted:Ze},te=Symbol.for("vuetify:v-window"),oe=Symbol.for("vuetify:v-window-group"),ae=I({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},...q(),...J(),...ce()},"VWindow"),z=W()({name:"VWindow",directives:{Touch:ee},props:ae(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:a}=o;const{themeClasses:t}=re(e),{isRtl:s}=de(),{t:l}=ve(),n=fe(e,oe),f=R(),c=m(()=>s.value?!e.reverse:e.reverse),d=G(!1),C=m(()=>{const v=e.direction==="vertical"?"y":"x",b=(c.value?!d.value:d.value)?"-reverse":"";return`v-window-${v}${b}-transition`}),g=G(0),i=R(void 0),y=m(()=>n.items.value.findIndex(v=>n.selected.value.includes(v.id)));me(y,(v,r)=>{const b=n.items.value.length,Y=b-1;b<=2?d.value=ve.continuous||y.value!==0),E=m(()=>e.continuous||y.value!==n.items.value.length-1);function w(){h.value&&n.prev()}function V(){E.value&&n.next()}const k=m(()=>{const v=[],r={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${c.value?"right":"left"}`,onClick:n.prev,"aria-label":l("$vuetify.carousel.prev")};v.push(h.value?a.prev?a.prev({props:r}):u(X,r,null):u("div",null,null));const b={icon:s.value?e.prevIcon:e.nextIcon,class:`v-window__${c.value?"left":"right"}`,onClick:n.next,"aria-label":l("$vuetify.carousel.next")};return v.push(E.value?a.next?a.next({props:b}):u(X,b,null):u("div",null,null)),v}),P=m(()=>e.touch===!1?e.touch:{...{left:()=>{c.value?w():V()},right:()=>{c.value?V():w()},start:r=>{let{originalEvent:b}=r;b.stopPropagation()}},...e.touch===!0?{}:e.touch});return $(()=>K(u(e.tag,{ref:f,class:["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},t.value,e.class],style:e.style},{default:()=>[u("div",{class:"v-window__container",style:{height:i.value}},[a.default?.({group:n}),e.showArrows!==!1&&u("div",{class:"v-window__controls"},[k.value])]),a.additional?.({group:n})]}),[[be("touch"),P.value]])),{group:n}}}),ne=I({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...q(),...ge(),...ye()},"VWindowItem"),D=W()({name:"VWindowItem",directives:{Touch:ee},props:ne(),emits:{"group:selected":e=>!0},setup(e,o){let{slots:a}=o;const t=Q(te),s=we(e,oe),{isBooted:l}=Ve();if(!t||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const n=G(!1),f=m(()=>l.value&&(t.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function c(){!n.value||!t||(n.value=!1,t.transitionCount.value>0&&(t.transitionCount.value-=1,t.transitionCount.value===0&&(t.transitionHeight.value=void 0)))}function d(){n.value||!t||(n.value=!0,t.transitionCount.value===0&&(t.transitionHeight.value=L(t.rootRef.value?.clientHeight)),t.transitionCount.value+=1)}function C(){c()}function g(h){n.value&&Se(()=>{!f.value||!n.value||!t||(t.transitionHeight.value=L(h.clientHeight))})}const i=m(()=>{const h=t.isReversed.value?e.reverseTransition:e.transition;return f.value?{name:typeof h!="string"?t.transition.value:h,onBeforeEnter:d,onAfterEnter:c,onEnterCancelled:C,onBeforeLeave:d,onAfterLeave:c,onLeaveCancelled:C,onEnter:g}:!1}),{hasContent:y}=Te(e,s.isSelected);return $(()=>u(xe,{transition:i.value,disabled:!l.value},{default:()=>[K(u("div",{class:["v-window-item",s.selectedClass.value,e.class],style:e.style},[y.value&&a.default?.()]),[[Ce,s.isSelected.value]])]})),{groupItem:s}}}),O=Symbol.for("vuetify:v-tabs"),pe=I({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"},...Z(ke({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),se=W()({name:"VTab",props:pe(),setup(e,o){let{slots:a,attrs:t}=o;const{textColorClasses:s,textColorStyles:l}=Pe(e,"sliderColor"),n=R(),f=R(),c=m(()=>e.direction==="horizontal"),d=m(()=>n.value?.group?.isSelected.value??!1);function C(g){let{value:i}=g;if(i){const y=n.value?.$el.parentElement?.querySelector(".v-tab--selected .v-tab__slider"),h=f.value;if(!y||!h)return;const E=getComputedStyle(y).color,w=y.getBoundingClientRect(),V=h.getBoundingClientRect(),k=c.value?"x":"y",P=c.value?"X":"Y",v=c.value?"right":"bottom",r=c.value?"width":"height",b=w[k],Y=V[k],B=b>Y?w[v]-V[v]:w[k]-V[k],le=Math.sign(B)>0?c.value?"right":"bottom":Math.sign(B)<0?c.value?"left":"top":"center",ie=(Math.abs(B)+(Math.sign(B)<0?w[r]:V[r]))/Math.max(w[r],V[r])||0,ue=w[r]/V[r]||0,U=1.5;_e(h,{backgroundColor:[E,"currentcolor"],transform:[`translate${P}(${B}px) scale${P}(${ue})`,`translate${P}(${B/U}px) scale${P}(${(ie-1)/U+1})`,"none"],transformOrigin:Array(3).fill(le)},{duration:225,easing:Ie})}}return $(()=>{const g=X.filterProps(e);return u(X,T({symbol:O,ref:n,class:["v-tab",e.class],style:e.style,tabindex:d.value?0:-1,role:"tab","aria-selected":String(d.value),active:!1},g,t,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":C}),{...a,default:()=>u(H,null,[a.default?.()??e.text,!e.hideSlider&&u("div",{ref:f,class:["v-tab__slider",s.value],style:l.value},null)])})}),Be({},n)}}),et=I({...Z(ae(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VTabsWindow"),tt=W()({name:"VTabsWindow",props:et(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:a}=o;const t=Q(O,null),s=p(e,"modelValue"),l=m({get(){return s.value!=null||!t?s.value:t.items.value.find(n=>t.selected.value.includes(n.id))?.value},set(n){s.value=n}});return $(()=>{const n=z.filterProps(e);return u(z,T({_as:"VTabsWindow"},n,{modelValue:l.value,"onUpdate:modelValue":f=>l.value=f,class:["v-tabs-window",e.class],style:e.style,mandatory:!1,touch:!1}),a)}),{}}}),ot=I({...ne()},"VTabsWindowItem"),at=W()({name:"VTabsWindowItem",props:ot(),setup(e,o){let{slots:a}=o;return $(()=>{const t=D.filterProps(e);return u(D,T({_as:"VTabsWindowItem"},t,{class:["v-tabs-window-item",e.class],style:e.style}),a)}),{}}});function nt(e){return e?e.map(o=>Xe(o)?o:{text:o,value:o}):[]}const st=I({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String,...We({mandatory:"force",selectedClass:"v-tab-item--selected"}),...$e(),...J()},"VTabs"),lt=W()({name:"VTabs",props:st(),emits:{"update:modelValue":e=>!0},setup(e,o){let{attrs:a,slots:t}=o;const s=p(e,"modelValue"),l=m(()=>nt(e.items)),{densityClasses:n}=Ee(e),{backgroundColorClasses:f,backgroundColorStyles:c}=Ye(x(e,"bgColor")),{scopeId:d}=Me();return Re({VTab:{color:x(e,"color"),direction:x(e,"direction"),stacked:x(e,"stacked"),fixed:x(e,"fixedTabs"),sliderColor:x(e,"sliderColor"),hideSlider:x(e,"hideSlider")}}),$(()=>{const C=j.filterProps(e),g=!!(t.window||e.items.length>0);return u(H,null,[u(j,T(C,{modelValue:s.value,"onUpdate:modelValue":i=>s.value=i,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--stacked":e.stacked},n.value,f.value,e.class],style:[{"--v-tabs-height":L(e.height)},c.value,e.style],role:"tablist",symbol:O},d,a),{default:()=>[t.default?.()??l.value.map(i=>t.tab?.({item:i})??u(se,T(i,{key:i.text,value:i.value}),{default:t[`tab.${i.value}`]?()=>t[`tab.${i.value}`]?.({item:i}):void 0}))]}),g&&u(tt,T({modelValue:s.value,"onUpdate:modelValue":i=>s.value=i,key:"tabs-window"},d),{default:()=>[l.value.map(i=>t.item?.({item:i})??u(at,{value:i.value},{default:()=>t[`item.${i.value}`]?.({item:i})})),t.window?.()]})])}),{}}}),it={class:"mx-border mt-2"},ut={key:0,class:"w-100 h-100 border-bottom"},ct=He({__name:"index",props:{modelValue:{default:0},items:{},height:{default:300},tabsProps:{},windowProps:{},windowItemProps:{},isTabMinWidthAuto:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const a=o,t=s=>{a("update:modelValue",s)};return(s,l)=>(S(),M("div",it,[u(lt,T({"model-value":s.modelValue,"onUpdate:modelValue":t},s.tabsProps),{default:_(()=>[(S(!0),M(H,null,F(s.items,n=>(S(),A(se,{key:n.tab,class:"mx-tab","selected-class":"tab-selected",style:Le(s.isTabMinWidthAuto?"min-width: auto;":"")},{default:_(()=>[Ae(Ge(s.t(n.tab)),1)]),_:2},1032,["style"]))),128)),!s.tabsProps||!s.tabsProps.grow?(S(),M("div",ut)):ze("",!0)]),_:1},16,["model-value"]),u(z,T({"model-value":s.modelValue,"onUpdate:modelValue":t},s.windowProps),{default:_(()=>[(S(!0),M(H,null,F(s.items,n=>(S(),A(D,T({key:n.tab,ref_for:!0},s.windowItemProps),{default:_(()=>[u(De,{height:s.height},{default:_(()=>[u(Oe,{class:"px-3 py-0"},{default:_(()=>[(S(),A(Ue(n.component)))]),_:2},1024)]),_:2},1032,["height"])]),_:2},1040))),128))]),_:1},16,["model-value"])]))}}),vt=je(ct,[["__scopeId","data-v-e3ed8050"]]);export{vt as M,z as V,ne as a,D as b,se as c,lt as d,tt as e,at as f,ae as m};