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