!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Swiper=t()}(this,function(){"use strict";var u=document,j=window,o=function(e){for(var t=0;t")){var l="div";for(0===n.indexOf(":~]/)?(t||u).querySelectorAll(e.trim()):[u.getElementById(e.trim().split("#")[1])],s=0;ss.slides.length)break;a.push(s.slides.eq(n)[0])}else a.push(s.slides.eq(s.activeIndex)[0]);for(t=0;t=t.size)&&(t.visibleSlides.push(d),t.visibleSlidesIndexes.push(n),s.eq(n).addClass(i.slideVisibleClass))),d.progress=a?-p:p}t.visibleSlides=m(t.visibleSlides)}},updateProgress:function(e){var t=this,i=t.params;void 0===e&&(l=t.rtlTranslate?-1:1,e=t&&t.translate&&t.translate*l||0);var s=t.maxTranslate()-t.minTranslate(),a=t.progress,r=t.isBeginning,n=r,l=o=t.isEnd,o=0==s?r=!(a=0):(r=(a=(e-t.minTranslate())/s)<=0,1<=a);X.extend(t,{progress:a,isBeginning:r,isEnd:o}),(i.watchSlidesProgress||i.watchSlidesVisibility)&&t.updateSlidesProgress(e),r&&!n&&t.emit("reachBeginning toEdge"),o&&!l&&t.emit("reachEnd toEdge"),(n&&!r||l&&!o)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){var e=this,t=e.slides,i=e.params,s=e.$wrapperEl,a=e.activeIndex,r=e.realIndex,n=e.virtual&&i.virtual.enabled;t.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(a=n?e.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addClass(i.slideActiveClass),i.loop&&(a.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+r+'"]'):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+r+'"]')).addClass(i.slideDuplicateActiveClass),r=a.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass),i.loop&&0===r.length&&(r=t.eq(0)).addClass(i.slideNextClass),a=a.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass),i.loop&&0===a.length&&(a=t.eq(-1)).addClass(i.slidePrevClass),i.loop&&((r.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]'):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]')).addClass(i.slideDuplicateNextClass),(a.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+a.attr("data-swiper-slide-index")+'"]'):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+a.attr("data-swiper-slide-index")+'"]')).addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t=this,i=t.rtlTranslate?t.translate:-t.translate,s=t.slidesGrid,a=t.snapGrid,r=t.params,n=t.activeIndex,l=t.realIndex,o=t.snapIndex,d=e;if(void 0===d){for(var p=0;p=s[p]&&i=s[p]&&i=s[p]&&(d=p);r.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}(r=0<=a.indexOf(i)?a.indexOf(i):Math.floor(d/r.slidesPerGroup))>=a.length&&(r=a.length-1),d!==n?(a=parseInt(t.slides.eq(d).attr("data-swiper-slide-index")||d,10),X.extend(t,{snapIndex:r,realIndex:a,previousIndex:n,activeIndex:d}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),l!==a&&t.emit("realIndexChange"),(t.initialized||t.runCallbacksOnInit)&&t.emit("slideChange")):r!==o&&(t.snapIndex=r,t.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this,i=t.params,s=m(e.target).closest("."+i.slideClass)[0],a=!1;if(s)for(var r=0;r=l.length&&(e=l.length-1),(p||n.initialSlide||0)===(d||0)&&i&&a.emit("beforeSlideChangeStart");var c,h=-l[e];if(a.updateProgress(h),n.normalizeSlideIndex)for(var v=0;v=Math.floor(100*o[v])&&(r=v);if(a.initialized&&r!==p){if(!a.allowSlideNext&&ha.translate&&h>a.maxTranslate()&&(p||0)!==r)return!1}return c=pt.slides.length-t.loopedSlides+a/2?(t.loopFix(),r=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),X.nextTick(function(){t.slideTo(r)})):t.slideTo(r):r>t.slides.length-a?(t.loopFix(),r=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),X.nextTick(function(){t.slideTo(r)})):t.slideTo(r)):t.slideTo(r)}};var p={loopCreate:function(){var s=this,e=s.params,t=s.$wrapperEl;t.children("."+e.slideClass+"."+e.slideDuplicateClass).remove();var a=t.children("."+e.slideClass);if(e.loopFillGroupWithBlank){var i=e.slidesPerGroup-a.length%e.slidesPerGroup;if(i!==e.slidesPerGroup){for(var r=0;ra.length&&(s.loopedSlides=a.length);var l=[],o=[];a.each(function(e,t){var i=m(t);e=a.length-s.loopedSlides&&l.push(t),i.attr("data-swiper-slide-index",e)});for(var d=0;d=s.length-a)&&(d=-s.length+i+a,d+=a,e.slideTo(d,0,!1,!0)&&0!=l&&e.setTranslate((o?-e.translate:e.translate)-l)),e.allowSlidePrev=r,e.allowSlideNext=n},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}};var c={setGrabCursor:function(e){var t;Y.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||((t=this.el).style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab")},unsetGrabCursor:function(){Y.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}};var h,v,f,g,b,w,x={appendSlide:function(e){var t=this,i=t.$wrapperEl,s=t.params;if(s.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(var a=0;a=j.screen.width-e)||(X.extend(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=i,o.startY=a,n.touchStartTime=X.now(),r.allowClick=!0,r.updateSize(),r.swipeDirection=void 0,0a.startY&&t.translate>=t.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(oa.startX&&t.translate>=t.minTranslate())return;if(i.isTouchEvent&&u.activeElement&&n.target===u.activeElement&&m(n.target).is(i.formElements))return i.isMoved=!0,void(t.allowClick=!1);if(i.allowTouchCallbacks&&t.emit("touchMove",n),!(n.targetTouches&&1s.touchAngle:90-e>s.touchAngle)),i.isScrolling&&t.emit("touchMoveOpposite",n),void 0===i.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){t.allowClick=!1,n.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&n.stopPropagation(),i.isMoved||(s.loop&&t.loopFix(),i.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!s.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",n)),t.emit("sliderMove",n),i.isMoved=!0;l=t.isHorizontal()?l:o;a.diff=l,l*=s.touchRatio,r&&(l=-l),t.swipeDirection=0t.minTranslate()?(o=!1,s.resistance&&(i.currentTranslate=t.minTranslate()-1+Math.pow(-t.minTranslate()+i.startTranslate+l,r))):l<0&&i.currentTranslatei.startTranslate&&(i.currentTranslate=i.startTranslate),0s.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,i.currentTranslate=i.startTranslate,void(a.diff=t.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}s.followFinger&&((s.freeMode||s.watchSlidesProgress||s.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),s.freeMode&&(0===i.velocities.length&&i.velocities.push({position:a[t.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:a[t.isHorizontal()?"currentX":"currentY"],time:X.now()})),t.updateProgress(i.currentTranslate),t.setTranslate(i.currentTranslate))}}}}else i.startMoving&&i.isScrolling&&t.emit("touchMoveOpposite",n)}.bind(e),e.onTouchEnd=function(e){var t=this,i=t.touchEventsData,s=t.params,a=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,l=t.slidesGrid,o=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",d),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,u=X.now(),e=u-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap",d),e<300&&300-t.maxTranslate())t.slides.lengtht.minTranslate())s.freeModeMomentumBounce?(v-t.minTranslate()>h&&(v=t.minTranslate()+h),m=t.minTranslate(),g=!0,i.allowMomentumBounce=!0):v=t.minTranslate(),s.loop&&s.centeredSlides&&(f=!0);else if(s.freeModeSticky){for(var b,w=0;w-v){b=w;break}v=-(v=Math.abs(o[b]-v)=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var x=0,C=t.slidesSizesGrid[0],y=0;y=l[y]&&p=l[y]&&(x=y,C=l[l.length-1]-l[l.length-2]);c=(p-l[x])/C;e>s.longSwipesMs?s.longSwipes?("next"===t.swipeDirection&&(c>=s.longSwipesRatio?t.slideTo(x+s.slidesPerGroup):t.slideTo(x)),"prev"===t.swipeDirection&&(c>1-s.longSwipesRatio?t.slideTo(x+s.slidesPerGroup):t.slideTo(x))):t.slideTo(t.activeIndex):s.shortSwipes?("next"===t.swipeDirection&&t.slideTo(x+s.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(x)):t.slideTo(t.activeIndex)}}.bind(e),e.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(e);var r="container"===t.touchEventsTarget?s:a,s=!!t.nested;Y.touch||!Y.pointerEvents&&!Y.prefixedPointerEvents?(Y.touch&&(a=!("touchstart"!==i.start||!Y.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1},r.addEventListener(i.start,e.onTouchStart,a),r.addEventListener(i.move,e.onTouchMove,Y.passiveListener?{passive:!1,capture:s}:s),r.addEventListener(i.end,e.onTouchEnd,a),T||(u.addEventListener("touchstart",S),T=!0)),(t.simulateTouch&&!C.ios&&!C.android||t.simulateTouch&&!Y.touch&&C.ios)&&(r.addEventListener("mousedown",e.onTouchStart,!1),u.addEventListener("mousemove",e.onTouchMove,s),u.addEventListener("mouseup",e.onTouchEnd,!1))):(r.addEventListener(i.start,e.onTouchStart,!1),u.addEventListener(i.move,e.onTouchMove,s),u.addEventListener(i.end,e.onTouchEnd,!1)),(t.preventClicks||t.preventClicksPropagation)&&r.addEventListener("click",e.onClick,!0),e.on(C.ios||C.android?"resize orientationchange observerUpdate":"resize observerUpdate",y,!0)},detachEvents:function(){var e=this,t=e.params,i=e.touchEvents,s=e.el,a=e.wrapperEl,r="container"===t.touchEventsTarget?s:a,s=!!t.nested;Y.touch||!Y.pointerEvents&&!Y.prefixedPointerEvents?(Y.touch&&(a=!("onTouchStart"!==i.start||!Y.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1},r.removeEventListener(i.start,e.onTouchStart,a),r.removeEventListener(i.move,e.onTouchMove,s),r.removeEventListener(i.end,e.onTouchEnd,a)),(t.simulateTouch&&!C.ios&&!C.android||t.simulateTouch&&!Y.touch&&C.ios)&&(r.removeEventListener("mousedown",e.onTouchStart,!1),u.removeEventListener("mousemove",e.onTouchMove,s),u.removeEventListener("mouseup",e.onTouchEnd,!1))):(r.removeEventListener(i.start,e.onTouchStart,!1),u.removeEventListener(i.move,e.onTouchMove,s),u.removeEventListener(i.end,e.onTouchEnd,!1)),(t.preventClicks||t.preventClicksPropagation)&&r.removeEventListener("click",e.onClick,!0),e.off(C.ios||C.android?"resize orientationchange observerUpdate":"resize observerUpdate",y)}},breakpoints:{setBreakpoint:function(){var e=this,t=e.activeIndex,i=e.initialized,s=e.loopedSlides;void 0===s&&(s=0);var a,r,n,l=e.params,o=l.breakpoints;!o||o&&0===Object.keys(o).length||(a=e.getBreakpoint(o))&&e.currentBreakpoint!==a&&((r=a in o?o[a]:void 0)&&["slidesPerView","spaceBetween","slidesPerGroup"].forEach(function(e){var t=r[e];void 0!==t&&(r[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}),o=(n=r||e.originalParams).direction&&n.direction!==l.direction,l=l.loop&&(n.slidesPerView!==l.slidesPerView||o),o&&i&&e.changeDirection(),X.extend(e.params,n),X.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=a,l&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-s+e.loopedSlides,0,!1)),e.emit("breakpoint",n))},getBreakpoint:function(e){if(e){var t=!1,i=[];Object.keys(e).forEach(function(e){i.push(e)}),i.sort(function(e,t){return parseInt(e,10)-parseInt(t,10)});for(var s=0;s=j.innerWidth&&!t&&(t=a)}return t||"max"}}},checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked;e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),t&&t!==e.isLocked&&(e.isEnd=!1,e.navigation.update())}},classes:{addClasses:function(){var t=this.classNames,i=this.params,e=this.rtl,s=this.$el,a=[];a.push("initialized"),a.push(i.direction),i.freeMode&&a.push("free-mode"),Y.flexbox||a.push("no-flexbox"),i.autoHeight&&a.push("autoheight"),e&&a.push("rtl"),1Math.abs(n.pixelY)))return!0;a=n.pixelX*r}else{if(!(Math.abs(n.pixelY)>Math.abs(n.pixelX)))return!0;a=n.pixelY}else a=Math.abs(n.pixelX)>Math.abs(n.pixelY)?-n.pixelX*r:-n.pixelY;if(0===a)return!0;if(s.invert&&(a=-a),i.params.freeMode){i.params.loop&&i.loopFix();e=i.getTranslate()+a*s.sensitivity,r=i.isBeginning,n=i.isEnd;if(e>=i.minTranslate()&&(e=i.minTranslate()),e<=i.maxTranslate()&&(e=i.maxTranslate()),i.setTransition(0),i.setTranslate(e),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!r&&i.isBeginning||!n&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky&&(clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=X.nextTick(function(){i.slideToClosest()},300)),i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),e===i.minTranslate()||e===i.maxTranslate())return!0}else{if(60i-1-2*e.loopedSlides&&(a-=i-2*e.loopedSlides),n-1s.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=s.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),l=a-e.pagination.dynamicBulletIndex,d=((o=l+(Math.min(c.length,s.dynamicMainBullets)-1))+l)/2),c.removeClass(s.bulletActiveClass+" "+s.bulletActiveClass+"-next "+s.bulletActiveClass+"-next-next "+s.bulletActiveClass+"-prev "+s.bulletActiveClass+"-prev-prev "+s.bulletActiveClass+"-main"),1";s.html(a),e.pagination.bullets=s.find("."+t.bulletClass)}"fraction"===t.type&&(a=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):' / ',s.html(a)),"progressbar"===t.type&&(a=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'',s.html(a)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var e,t=this,i=t.params.pagination;!i.el||0!==(e=m(i.el)).length&&(t.params.uniqueNavElements&&"string"==typeof i.el&&1'),i.append(s)),X.extend(e,{$el:i,el:i[0],$dragEl:s,dragEl:s[0]}),t.draggable&&e.enableDraggable())},destroy:function(){this.scrollbar.disableDraggable()}},B={loadInSlide:function(e,l){void 0===l&&(l=!0);var o,d=this,p=d.params.lazy;void 0!==e&&0!==d.slides.length&&(e=(o=d.virtual&&d.params.virtual.enabled?d.$wrapperEl.children("."+d.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):d.slides.eq(e)).find("."+p.elementClass+":not(."+p.loadedClass+"):not(."+p.loadingClass+")"),!o.hasClass(p.elementClass)||o.hasClass(p.loadedClass)||o.hasClass(p.loadingClass)||(e=e.add(o[0])),0!==e.length&&e.each(function(e,t){var i=m(t);i.addClass(p.loadingClass);var s=i.attr("data-background"),a=i.attr("data-src"),r=i.attr("data-srcset"),n=i.attr("data-sizes");d.loadImage(i[0],a||s,r,n,!1,function(){var e,t;null==d||!d||d&&!d.params||d.destroyed||(s?(i.css("background-image",'url("'+s+'")'),i.removeAttr("data-background")):(r&&(i.attr("srcset",r),i.removeAttr("data-srcset")),n&&(i.attr("sizes",n),i.removeAttr("data-sizes")),a&&(i.attr("src",a),i.removeAttr("data-src"))),i.addClass(p.loadedClass).removeClass(p.loadingClass),o.find("."+p.preloaderClass).remove(),d.params.loop&&l&&(t=o.attr("data-swiper-slide-index"),o.hasClass(d.params.slideDuplicateClass)?(e=d.$wrapperEl.children('[data-swiper-slide-index="'+t+'"]:not(.'+d.params.slideDuplicateClass+")"),d.lazy.loadInSlide(e.index(),!1)):(t=d.$wrapperEl.children("."+d.params.slideDuplicateClass+'[data-swiper-slide-index="'+t+'"]'),d.lazy.loadInSlide(t.index(),!1))),d.emit("lazyImageReady",o[0],i[0]))}),d.emit("lazyImageLoad",o[0],i[0])}))},load:function(){var i=this,t=i.$wrapperEl,s=i.params,a=i.slides,e=i.activeIndex,r=i.virtual&&s.virtual.enabled,n=s.lazy,l=s.slidesPerView;function o(e){if(r){if(t.children("."+s.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return 1}else if(a[e])return 1}function d(e){return r?m(e).attr("data-swiper-slide-index"):m(e).index()}if("auto"===l&&(l=0),i.lazy.initialImageLoaded||(i.lazy.initialImageLoaded=!0),i.params.watchSlidesVisibility)t.children("."+s.slideVisibleClass).each(function(e,t){t=r?m(t).attr("data-swiper-slide-index"):m(t).index();i.lazy.loadInSlide(t)});else if(1