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