!function(){function t(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var a,i,r,u,o=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==e);l=!0);}catch(v){c=!0,i=v}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw i}}return o}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return e(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:0,a=e*$.value;t.loop||(a=Math.min(a,-U.value));var i=n-a;return t.loop||(i=T(i,U.value,0)),i},J=function(e){var n=e.pace,a=void 0===n?0:n,r=e.offset,u=void 0===r?0:r,o=e.emitChange;if(!(B.value<=1)){var l=j.active,c=function(e){var n=j.active;return e?t.loop?T(n+e,-1,B.value):T(n+e,0,V.value):n}(a),v=G(c,u);if(t.loop){if(P[0]&&v!==U.value){var f=v0;P[B.value-1].setOffset(s?-W.value:0)}}j.active=c,j.offset=v,o&&c!==l&&i("change",_.value)}},K=function(){j.swiping=!0,j.active<=-1?J({pace:B.value}):j.active>=B.value&&J({pace:-B.value})},L=function(){K(),X.reset(),O((function(){j.swiping=!1,J({pace:1,emitChange:!0})}))},N=function(){return clearTimeout(n)},Q=function e(){N(),+t.autoplay>0&&B.value>1&&(n=setTimeout((function(){L(),e()}),+t.autoplay))},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+t.initialSwipe;if(u.value){var n=function(){var n,a;if(!I(u)){var i={width:u.value.offsetWidth,height:u.value.offsetHeight};j.rect=i,j.width=+(null!=(n=t.width)?n:i.width),j.height=+(null!=(a=t.height)?a:i.height)}B.value&&-1===(e=Math.min(B.value-1,e))&&(e=B.value-1),j.active=e,j.swiping=!0,j.offset=G(e),P.forEach((function(t){t.setOffset(0)})),Q()};I(u)?M().then(n):n()}},tt=function(){return Z(j.active)},et=function(e){!t.touchable||e.touches.length>1||(X.start(e),E=!1,a=Date.now(),N(),K())},nt=function(){if(t.touchable&&j.swiping){var e=Date.now()-a,n=H.value/e;if((Math.abs(n)>.25||Math.abs(H.value)>$.value/2)&&q.value){var r=t.vertical?X.offsetY.value:X.offsetX.value,u=0;u=t.loop?r>0?H.value>0?-1:1:0:-Math[H.value>0?"ceil":"floor"](H.value/$.value),J({pace:u,emitChange:!0})}else H.value&&J({pace:0});E=!1,j.swiping=!1,i("dragEnd",{index:_.value}),Q()}},at=function(e,n){var a=n===_.value,i=a?{backgroundColor:t.indicatorColor}:void 0;return z("i",{style:i,class:Y("indicator",{active:a})},null)};return h({prev:function(){K(),X.reset(),O((function(){j.swiping=!1,J({pace:-1,emitChange:!0})}))},next:L,state:j,resize:tt,swipeTo:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};K(),X.reset(),O((function(){var a;a=t.loop&&e===B.value?0===j.active?0:e:e%B.value,n.immediate?O((function(){j.swiping=!1})):j.swiping=!1,J({pace:a-j.active,emitChange:!0})}))}}),R({size:$,props:t,count:B,activeIndicator:_}),d((function(){return t.initialSwipe}),(function(t){return Z(+t)})),d(B,(function(){return Z(j.active)})),d((function(){return t.autoplay}),Q),d([p,g,function(){return t.width},function(){return t.height}],tt),d(m(),(function(t){"visible"===t?Q():N()})),w(Z),y((function(){return Z(j.active)})),b((function(){return Z(j.active)})),S(N),x(N),C("touchmove",(function(e){t.touchable&&j.swiping&&(X.move(e),q.value&&(!t.loop&&(0===j.active&&H.value>0||j.active===B.value-1&&H.value<0)||(A(e,t.stopPropagation),J({offset:H.value}),E||(i("dragStart",{index:_.value}),E=!0))))}),{target:o}),function(){var e;return z("div",{ref:u,class:Y()},[z("div",{ref:o,style:F.value,class:Y("track",{vertical:t.vertical}),onTouchstartPassive:et,onTouchend:nt,onTouchcancel:nt},[null==(e=r.default)?void 0:e.call(r)]),r.indicator?r.indicator({active:_.value,total:B.value}):t.showIndicators&&B.value>1?z("div",{class:Y("indicators",{vertical:t.vertical})},[Array(B.value).fill("").map(at)]):void 0])}}}),R=(e("S",j(P)),t(a("swipe-item"),2)),B=R[0],$=R[1],H=o({name:B,setup:function(t,e){var n,a=e.slots,i=c({offset:0,inited:!1,mounted:!1}),r=E(D),u=r.parent,o=r.index;if(u){var l=s((function(){var t={},e=u.props.vertical;return u.size.value&&(t[e?"height":"width"]="".concat(u.size.value,"px")),i.offset&&(t.transform="translate".concat(e?"Y":"X","(").concat(i.offset,"px)")),t})),v=s((function(){var t=u.props,e=t.loop;if(!t.lazyRender||n)return!0;if(!i.mounted)return!1;var a=u.activeIndicator.value,r=u.count.value-1,l=0===a&&e?r:a-1,c=a===r&&e?0:a+1;return n=o.value===a||o.value===l||o.value===c}));return w((function(){M((function(){i.mounted=!0}))})),h({setOffset:function(t){i.offset=t}}),function(){var t;return z("div",{class:$(),style:l.value},[v.value?null==(t=a.default)?void 0:t.call(a):null])}}console.error("[Vant] must be a child component of .")}});e("a",j(H))}}}))}();