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