System.register(["./index-legacy-e1ea41b7.js","./use-tab-status-legacy-478dc445.js","./index-legacy-c2783a73.js"],(function(e,t){"use strict";var l,n,a,o,i,r,s,d,c,u,v,f,p,b,h,g,m,x,y,w,I,k,B,C,S,T,R,$,z,A,L,Z,N,W,j,M,O,F,H,V,D,X,E,J,K,q,G,Y,_,P,Q,U,ee,te,le,ne,ae,oe,ie,re,se,de,ce;return{setters:[e=>{l=e.bI,n=e.aM,a=e.bG,o=e.bJ,i=e.r,r=e.aV,s=e.aN,d=e.aA,c=e.aw,u=e.aK,v=e.c,f=e.n,p=e.m,b=e.b,h=e.d,g=e.bB,m=e.x,x=e.e,y=e.bE,w=e.ac,I=e.i,k=e.w,B=e.Z,C=e.bD,S=e.z,T=e._,R=e.b9,$=e.ba,z=e.a,A=e.k,L=e.b6,Z=e.y,N=e.Y,W=e.t,j=e.bs,M=e.aa,O=e.az,F=e.aJ,H=e.o,V=e.X,D=e.b0,X=e.bo,E=e.bK,J=e.a0,K=e.bL,q=e.at,G=e.aq,Y=e.a4,_=e.ad,P=e.aD,Q=e.bM,U=e.bN,ee=e.aI,te=e.aL,le=e.aF,ne=e.g,ae=e.v,oe=e.h,ie=e.ae,re=e.av},e=>{se=e.T},e=>{de=e.S,ce=e.a}],execute:function(){function t(e,t){if(!s||!window.IntersectionObserver)return;const l=new IntersectionObserver((e=>{t(e[0].intersectionRatio>0)}),{root:document.body}),n=()=>{e.value&&l.unobserve(e.value)};d(n),c(n),u((()=>{e.value&&l.observe(e.value)}))}const[ue,ve]=v("sticky"),fe={zIndex:f,position:p("top"),container:Object,offsetTop:b(0),offsetBottom:b(0)};var pe=h({name:ue,props:fe,emits:["scroll","change"],setup(e,{emit:l,slots:n}){const o=i(),r=g(o),s=m({fixed:!1,width:0,height:0,transform:0}),d=i(!1),c=x((()=>y("top"===e.position?e.offsetTop:e.offsetBottom))),u=x((()=>{if(d.value)return;const{fixed:e,height:t,width:l}=s;return e?{width:`${l}px`,height:`${t}px`}:void 0})),v=x((()=>{if(!s.fixed||d.value)return;const t=w(I(e.zIndex),{width:`${s.width}px`,height:`${s.height}px`,[e.position]:`${c.value}px`});return s.transform&&(t.transform=`translate3d(0, ${s.transform}px, 0)`),t})),f=()=>{if(!o.value||C(o))return;const{container:t,position:n}=e,i=T(o),r=a(window);if(s.width=i.width,s.height=i.height,"top"===n)if(t){const e=T(t),l=e.bottom-c.value-s.height;s.fixed=c.value>i.top&&e.bottom>0,s.transform=l<0?l:0}else s.fixed=c.value>i.top;else{const{clientHeight:e}=document.documentElement;if(t){const l=T(t),n=e-l.top-c.value-s.height;s.fixed=e-c.valuel.top,s.transform=n<0?-n:0}else s.fixed=e-c.value{l("scroll",{scrollTop:e,isFixed:s.fixed})})(r)};return k((()=>s.fixed),(e=>l("change",e))),B("scroll",f,{target:r,passive:!0}),t(o,f),k([R,$],(()=>{o.value&&!C(o)&&s.fixed&&(d.value=!0,S((()=>{const e=T(o);s.width=e.width,s.height=e.height,d.value=!1})))})),()=>{var e;return z("div",{ref:o,style:u.value},[z("div",{class:ve({fixed:s.fixed&&!d.value}),style:v.value},[null==(e=n.default)?void 0:e.call(n)])])}}});const be=A(pe),[he,ge]=v("tabs");var me=h({name:he,props:{count:L(Number),inited:Boolean,animated:Boolean,duration:L(f),swipeable:Boolean,lazyRender:Boolean,currentIndex:L(Number)},emits:["change"],setup(e,{emit:t,slots:l}){const n=i(),a=e=>t("change",e),o=()=>{var t;const o=null==(t=l.default)?void 0:t.call(l);return e.animated||e.swipeable?z(de,{ref:n,loop:!1,class:ge("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:a},{default:()=>[o]}):o},r=t=>{const l=n.value;l&&l.state.active!==t&&l.swipeTo(t,{immediate:!e.inited})};return k((()=>e.currentIndex),r),Z((()=>{r(e.currentIndex)})),N({swipeRef:n}),()=>z("div",{class:ge("content",{animated:e.animated||e.swipeable})},[o()])}});const[xe,ye]=v("tabs"),we={type:p("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:b(0),duration:b(.3),animated:Boolean,ellipsis:W,swipeable:Boolean,scrollspy:Boolean,offsetTop:b(0),background:String,lazyRender:W,lineWidth:f,lineHeight:f,beforeChange:Function,swipeThreshold:b(5),titleActiveColor:String,titleInactiveColor:String},Ie=Symbol(xe);var ke=h({name:xe,props:we,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:s,slots:d}){let c,v,f,p,b;const h=i(),w=i(),I=i(),$=i(),A=j(),L=g(h),[Z,W]=function(){const e=i([]),t=[];return r((()=>{e.value=[]})),[e,l=>(t[l]||(t[l]=t=>{e.value[l]=t}),t[l])]}(),{children:q,linkChildren:G}=M(Ie),Y=m({inited:!1,position:"",lineStyle:{},currentIndex:-1}),_=x((()=>q.length>+e.swipeThreshold||!e.ellipsis||e.shrink)),P=x((()=>({borderColor:e.color,background:e.background}))),Q=(e,t)=>{var l;return null!=(l=e.name)?l:t},U=x((()=>{const e=q[Y.currentIndex];if(e)return Q(e,Y.currentIndex)})),ee=x((()=>y(e.offsetTop))),te=x((()=>e.sticky?ee.value+c:0)),le=t=>{const a=w.value,o=Z.value;if(!(_.value&&a&&o&&o[Y.currentIndex]))return;const i=o[Y.currentIndex].$el,r=i.offsetLeft-(a.offsetWidth-i.offsetWidth)/2;p&&p(),p=function(e,t,a){let o,i=0;const r=e.scrollLeft,s=0===a?1:Math.round(1e3*a/16);return function l(){e.scrollLeft+=(t-r)/s,++i{const t=Y.inited;S((()=>{const l=Z.value;if(!l||!l[Y.currentIndex]||"line"!==e.type||C(h.value))return;const n=l[Y.currentIndex].$el,{lineWidth:a,lineHeight:o}=e,i=n.offsetLeft+n.offsetWidth/2,r={width:H(a),backgroundColor:e.color,transform:`translateX(${i}px) translateX(-50%)`};if(t&&(r.transitionDuration=`${e.duration}s`),V(o)){const e=H(o);r.height=e,r.borderRadius=e}Y.lineStyle=r}))},ae=(t,l)=>{const n=(e=>{const t=e=0&&e{const l=q.find(((t,l)=>Q(t,l)===e)),n=l?q.indexOf(l):0;ae(n,t)},ie=(t=!1)=>{if(e.scrollspy){const i=q[Y.currentIndex].$el;if(i&&L.value){const r=E(i,L.value)-te.value;v=!0,b&&b(),b=function(e,t,i,r){let s,d=a(e);const c=dt||!c&&dt?s=n(l):r&&(s=n(r))}(),function(){l(s)}}(L.value,r,t?0:+e.duration,(()=>{v=!1}))}}},re=(t,l,n)=>{const{title:a,disabled:o}=q[l],i=Q(q[l],l);o||(J(e.beforeChange,{args:[i],done:()=>{ae(l),ie()}}),K(t)),s("clickTab",{name:i,title:a,event:n,disabled:o})},se=e=>{f=e.isFixed,s("scroll",e)},de=()=>{if("line"===e.type&&q.length)return z("div",{class:ye("line"),style:Y.lineStyle},null)},ce=()=>{var t,l,n;const{type:a,border:o,sticky:i}=e,r=[z("div",{ref:i?void 0:I,class:[ye("wrap"),{[D]:"line"===a&&o}]},[z("div",{ref:w,role:"tablist",class:ye("nav",[a,{shrink:e.shrink,complete:_.value}]),style:P.value,"aria-orientation":"horizontal"},[null==(t=d["nav-left"])?void 0:t.call(d),q.map((e=>e.renderTitle(re))),de(),null==(l=d["nav-right"])?void 0:l.call(d)])]),null==(n=d["nav-bottom"])?void 0:n.call(d)];return i?z("div",{ref:I},[r]):r},ue=()=>{ne(),S((()=>{var e,t;le(!0),null==(t=null==(e=$.value)?void 0:e.swipeRef.value)||t.resize()}))};return k((()=>[e.color,e.duration,e.lineWidth,e.lineHeight]),ne),k(R,ue),k((()=>e.active),(e=>{e!==U.value&&oe(e)})),k((()=>q.length),(()=>{Y.inited&&(oe(e.active),ne(),S((()=>{le(!0)})))})),N({resize:ue,scrollTo:e=>{S((()=>{oe(e),ie(!0)}))}}),O(ne),F(ne),u((()=>{oe(e.active,!0),S((()=>{Y.inited=!0,I.value&&(c=T(I.value).height),le(!0)}))})),t(h,ne),B("scroll",(()=>{if(e.scrollspy&&!v){const e=(()=>{for(let e=0;ete.value)return 0===e?0:e-1}return q.length-1})();ae(e)}}),{target:L,passive:!0}),G({id:A,props:e,setLine:ne,scrollable:_,onRendered:(e,t)=>s("rendered",e,t),currentName:U,setTitleRefs:W,scrollIntoView:le}),()=>z("div",{ref:h,class:ye([e.type])},[e.sticky?z(be,{container:h.value,offsetTop:ee.value,onScroll:se},{default:()=>[ce()]}):ce(),z(me,{ref:$,count:q.length,inited:Y.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:Y.currentIndex,onChange:ae},{default:()=>{var e;return[null==(e=d.default)?void 0:e.call(d)]}})])}});const[Be,Ce]=v("tab"),Se=h({name:Be,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:f,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:W},setup(e,{slots:t}){const l=x((()=>{const t={},{type:l,color:n,disabled:a,isActive:o,activeColor:i,inactiveColor:r}=e;n&&"card"===l&&(t.borderColor=n,a||(o?t.backgroundColor=n:t.color=n));const s=o?i:r;return s&&(t.color=s),t})),n=()=>{const l=z("span",{class:Ce("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||V(e.badge)&&""!==e.badge?z(q,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[l]}):l};return()=>z("div",{id:e.id,role:"tab",class:[Ce([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:l.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[n()])}}),[Te,Re]=v("tab"),$e=w({},G,{dot:Boolean,name:f,badge:f,title:String,disabled:Boolean,titleClass:Y,titleStyle:[String,Object],showZeroBadge:W});var ze=h({name:Te,props:$e,setup(e,{slots:t}){const l=j(),n=i(!1),a=re(),{parent:o,index:r}=_(Ie);if(!o)return void console.error("[Vant] must be a child component of .");const s=()=>{var t;return null!=(t=e.name)?t:r.value},d=x((()=>{const t=s()===o.currentName.value;return t&&!n.value&&(n.value=!0,o.props.lazyRender&&S((()=>{o.onRendered(s(),e.title)}))),t})),c=i(""),u=i("");P((()=>{const{titleClass:t,titleStyle:l}=e;c.value=t?Q(t):"",u.value=l&&"string"!=typeof l?U(ee(l)):l}));const v=i(!d.value);return k(d,(e=>{e?v.value=!1:te((()=>{v.value=!0}))})),k((()=>e.title),(()=>{o.setLine(),o.scrollIntoView()})),le(se,d),N({id:l,renderTitle:n=>z(Se,oe({key:l,id:`${o.id}-${r.value}`,ref:o.setTitleRefs(r.value),style:u.value,class:c.value,isActive:d.value,controls:l,scrollable:o.scrollable.value,activeColor:o.props.titleActiveColor,inactiveColor:o.props.titleInactiveColor,onClick:e=>n(a.proxy,r.value,e)},ie(o.props,["type","color","shrink"]),ie(e,["dot","badge","title","disabled","showZeroBadge"])),{title:t.title})}),()=>{var e;const a=`${o.id}-${r.value}`,{animated:i,swipeable:s,scrollspy:c,lazyRender:u}=o.props;if(!t.default&&!i)return;const f=c||d.value;if(i||s)return z(ce,{id:l,role:"tabpanel",class:Re("panel-wrapper",{inactive:v.value}),tabindex:d.value?0:-1,"aria-hidden":!d.value,"aria-labelledby":a},{default:()=>{var e;return[z("div",{class:Re("panel")},[null==(e=t.default)?void 0:e.call(t)])]}});const p=n.value||c||!u?null==(e=t.default)?void 0:e.call(t):null;return ne(z("div",{id:l,role:"tabpanel",class:Re("panel"),tabindex:f?0:-1,"aria-labelledby":a},[p]),[[ae,f]])}}});e("a",A(ze)),e("T",A(ke))}}}));