1 line
450 KiB
Plaintext
1 line
450 KiB
Plaintext
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/swiper.bundle-95afeea2.js"],"names":["isObject","obj","constructor","Object","extend","target","src","keys","forEach","key","length","doc","document","ssrDocument","body","addEventListener","removeEventListener","activeElement","blur","nodeName","querySelector","querySelectorAll","getElementById","createEvent","initEvent","createElement","children","childNodes","style","setAttribute","getElementsByTagName","createElementNS","importNode","location","hash","host","hostname","href","origin","pathname","protocol","search","win","window","ssrWindow","navigator","userAgent","history","replaceState","pushState","go","back","CustomEvent","getComputedStyle","getPropertyValue","Image","Date","screen","setTimeout","clearTimeout","matchMedia","Dom7","arr","self","i","$","selector","context","els","tempParent","html","trim","indexOf","toCreate","innerHTML","push","match","split","nodeType","fn","prototype","Class","unique","uniqueArray","addClass","className","classes","j","classList","add","removeClass","remove","hasClass","contains","toggleClass","toggle","attr","attrs","value","arguments","getAttribute","undefined","attrName","removeAttr","removeAttribute","data","el","dom7ElementDataStorage","dataKey","transform","elStyle","webkitTransform","transition","duration","webkitTransitionDuration","transitionDuration","on","args","eventType","targetSelector","listener","capture","handleLiveEvent","e","eventData","dom7EventData","unshift","is","apply","parents","k","handleEvent","events","event","dom7Listeners","proxyListener","dom7LiveListeners","off","handlers","handler","splice","dom7proxy","trigger","evt","detail","bubbles","cancelable","filter","dataIndex","dispatchEvent","transitionEnd","callback","dom","fireCallBack","call","outerWidth","includeMargins","styles","offsetWidth","parseFloat","outerHeight","offsetHeight","offset","box","getBoundingClientRect","clientTop","clientLeft","scrollTop","scrollY","scrollLeft","scrollX","top","left","css","props","prop","each","matchedItems","text","textContent","compareWith","matches","webkitMatchesSelector","msMatchesSelector","index","child","previousSibling","eq","returnIndex","append","newChild","tempDiv","firstChild","appendChild","prepend","insertBefore","next","nextElementSibling","nextAll","nextEls","prev","previousElementSibling","prevAll","prevEls","parent","parentNode","closest","find","foundElements","found","removeChild","toAdd","Methods","methodName","Utils","deleteProps","object","nextTick","delay","now","getTranslate","axis","matrix","curTransform","transformMatrix","curStyle","WebKitCSSMatrix","map","a","replace","join","MozTransform","OTransform","MsTransform","msTransform","toString","m41","m42","parseUrlQuery","url","query","urlToParse","params","param","paramsPart","decodeURIComponent","o","to","nextSource","keysArray","nextIndex","len","nextKey","desc","getOwnPropertyDescriptor","enumerable","Support","touch","DocumentTouch","pointerEvents","PointerEvent","maxTouchPoints","observer","checkObserver","passiveListener","checkPassiveListener","supportsPassive","opts","defineProperty","get","gestures","checkGestures","SwiperClass","eventsListeners","eventName","priority","method","onceHandler","f7proxy","eventHandler","Array","isArray","slice","eventsArray","instanceParams","instance","modules","moduleName","module","modulesParams","moduleParams","modulePropName","moduleProp","bind","moduleEventName","create","name","proto","install","m","installModule","components","use","updateSize","swiper","width","height","$el","clientWidth","clientHeight","isHorizontal","isVertical","parseInt","size","updateSlides","$wrapperEl","swiperSize","rtl","rtlTranslate","wrongRTL","isVirtual","virtual","enabled","previousSlidesLength","slides","slideClass","slidesLength","snapGrid","slidesGrid","slidesSizesGrid","slidesForMargin","slideIndex","cssMode","offsetBefore","slidesOffsetBefore","offsetAfter","slidesOffsetAfter","previousSnapGridLength","previousSlidesGridLength","spaceBetween","slidePosition","prevSlideSize","virtualSize","marginLeft","marginTop","marginRight","marginBottom","slidesNumberEvenToRows","slidesPerColumn","Math","floor","ceil","slidesPerView","slidesPerColumnFill","max","slideSize","slidesPerRow","numFullColumns","slide","newSlideOrderIndex","column","row","slidesPerGroup","groupIndex","slideIndexInGroup","columnsInGroup","min","order","slideStyles","currentTransform","currentWebKitTransform","roundLengths","paddingLeft","paddingRight","boxSizing","paddingTop","paddingBottom","swiperSlideSize","centeredSlides","abs","slidesPerGroupSkip","newSlidesGrid","effect","setWrapperSize","slidesGridItem","centeredSlidesBounds","allSlidesSize","slideSizeValue","maxSnap","snap","centerInsufficientSlides","allSlidesOffset","snapIndex","emit","watchOverflow","checkOverflow","watchSlidesProgress","watchSlidesVisibility","updateSlidesOffset","updateAutoHeight","speed","activeSlides","newHeight","setTransition","visibleSlides","activeIndex","swiperSlideOffset","offsetLeft","offsetTop","updateSlidesProgress","translate","offsetCenter","slideVisibleClass","visibleSlidesIndexes","slideProgress","minTranslate","autoHeight","slideBefore","slideAfter","isVisible","progress","updateProgress","multiplier","translatesDiff","maxTranslate","isBeginning","isEnd","wasBeginning","wasEnd","updateSlidesClasses","realIndex","slideActiveClass","slideNextClass","slidePrevClass","slideDuplicateActiveClass","slideDuplicateNextClass","slideDuplicatePrevClass","activeSlide","loop","slideDuplicateClass","nextSlide","prevSlide","updateActiveIndex","newActiveIndex","previousIndex","previousRealIndex","previousSnapIndex","normalizeSlideIndex","skip","initialized","runCallbacksOnInit","updateClickedSlide","slideFound","clickedSlide","clickedIndex","slideToClickedSlide","update","virtualTranslate","currentTranslate","setTranslate","byController","wrapperEl","x","y","z","previousTranslate","newProgress","translateTo","runCallbacks","translateBounds","internal","animating","preventInteractionOnTransition","newTranslate","isH","scrollTo","onTranslateToWrapperTransitionEnd","destroyed","transitionStart","direction","dir","transitionEnd$1","transition$1","slideTo","initialSlide","allowSlideNext","allowSlidePrev","t","scrollWidth","onSlideToWrapperTransitionEnd","slideToLoop","newIndex","loopedSlides","slideNext","increment","loopFix","_clientLeft","slidePrev","normalize","val","normalizedTranslate","normalizedSnapGrid","normalizedSlidesGrid","currentSnap","prevSnap","prevIndex","slideReset","slideToClosest","threshold","nextSnap","slidesPerViewDynamic","slideToIndex","loopCreate","loopFillGroupWithBlank","blankSlidesNum","blankNode","slideBlankClass","loopAdditionalSlides","prependSlides","appendSlides","cloneNode","snapTranslate","diff","slideChanged","loopDestroy","setGrabCursor","moving","simulateTouch","isLocked","cursor","unsetGrabCursor","grabCursor","appendSlide","prependSlide","addSlide","activeIndexBuffer","baseLength","slidesBuffer","currentSlide","removeSlide","slidesIndexes","indexToRemove","removeAllSlides","manipulation","Device","platform","ua","device","ios","android","androidChrome","desktop","iphone","ipod","ipad","edge","ie","firefox","macos","windows","cordova","phonegap","electron","screenWidth","screenHeight","toLowerCase","os","osVersion","webView","standalone","webview","pixelRatio","devicePixelRatio","onTouchStart","touchEventsData","touches","originalEvent","$targetEl","touchEventsTarget","isTouchEvent","type","which","button","isTouched","isMoved","noSwiping","noSwipingSelector","noSwipingClass","allowClick","swipeHandler","currentX","targetTouches","pageX","currentY","pageY","startX","startY","edgeSwipeDetection","iOSEdgeSwipeDetection","edgeSwipeThreshold","iOSEdgeSwipeThreshold","allowTouchCallbacks","isScrolling","startMoving","touchStartTime","swipeDirection","allowThresholdMove","preventDefault","formElements","shouldPreventDefault","allowTouchMove","touchStartPreventDefault","touchStartForcePreventDefault","onTouchMove","targetTouch","changedTouches","preventedByNestedSwiper","touchReleaseOnEdges","diffX","diffY","sqrt","touchAngle","atan2","PI","touchMoveStopPropagation","nested","stopPropagation","startTranslate","allowMomentumBounce","touchRatio","disableParentSwiper","resistanceRatio","resistance","followFinger","freeMode","velocities","position","time","onTouchEnd","touchEndTime","timeDiff","lastClickTime","currentPos","freeModeMomentum","lastMoveEvent","pop","velocityEvent","distance","velocity","freeModeMinimumVelocity","freeModeMomentumVelocityRatio","momentumDuration","freeModeMomentumRatio","momentumDistance","newPosition","doBounce","afterBouncePosition","bounceAmount","freeModeMomentumBounceRatio","needsLoopFix","freeModeMomentumBounce","freeModeSticky","once","moveDistance","currentSlideSize","longSwipesMs","stopIndex","groupSize","ratio","longSwipes","longSwipesRatio","shortSwipes","isNavButtonTarget","navigation","nextEl","prevEl","onResize","breakpoints","setBreakpoint","autoplay","running","paused","run","onClick","preventClicks","preventClicksPropagation","stopImmediatePropagation","onScroll","dummyEventAttached","dummyEventListener","attachEvents","touchEvents","start","move","end","passiveListeners","passive","cancel","updateOnWindowResize","detachEvents","breakpoint","getBreakpoint","currentBreakpoint","breakpointOnlyParams","paramValue","breakpointParams","originalParams","wasMultiRow","isMultiRow","containerModifierClass","directionChanged","needsReLoop","changeDirection","points","point","minRatio","substr","innerHeight","sort","b","innerWidth","addClasses","classNames","suffixes","suffix","removeClasses","loadImage","imageEl","srcset","sizes","checkForComplete","image","onReady","isPicture","complete","onload","onerror","preloadImages","imagesToLoad","imagesLoaded","updateOnImagesReady","currentSrc","images","wasLocked","lastSlidePosition","checkOverflow$1","defaults","init","uniqueNavElements","wrapperClass","prototypes","extendedDefaults","Swiper","prototypeGroup","protoMethod","moduleParamName","swiperParams","useModulesParams","passedParams","swipers","containerEl","newParams","shadowRoot","options","touchEventsTouch","touchEventsDesktop","clickTimeout","useModules","spv","breakLoop","translateValue","translated","newDirection","needUpdate","currentDirection","slideEl","deleteInstance","cleanStyles","newDefaults","Device$1","Support$1","support","Browser","isSafari","isEdge","isUiWebView","test","Browser$1","browser","Resize","resize","resizeHandler","orientationChangeHandler","destroy","Observer","func","MutationObserver","WebkitMutationObserver","attach","ObserverFunc","mutations","observerUpdate","requestAnimationFrame","observe","attributes","childList","characterData","observers","observeParents","containerParents","observeSlideChildren","disconnect","Observer$1","Keyboard","handle","kc","keyCode","charCode","shiftKey","altKey","ctrlKey","metaKey","keyboard","onlyInViewport","inView","windowWidth","windowHeight","swiperOffset","swiperCoord","returnValue","enable","disable","isEventSupported","isSupported","element","implementation","hasFeature","Mousewheel","lastScrollTime","lastEventBeforeSnap","recentWheelEvents","PIXEL_STEP","LINE_HEIGHT","PAGE_HEIGHT","sX","sY","pX","pY","wheelDelta","wheelDeltaY","wheelDeltaX","HORIZONTAL_AXIS","deltaY","deltaX","deltaMode","spinX","spinY","pixelX","pixelY","handleMouseEnter","mouseEntered","handleMouseLeave","mousewheel","eventsTarged","releaseOnEdges","delta","rtlFactor","forceToAxis","invert","newEvent","sign","raw","shift","prevEvent","animateSlider","releaseScroll","ignoreWheelEvents","sensitivity","timeout","firstEvent","snapToThreshold","autoplayDisableOnInteraction","stop","getTime","Pagination","pagination","current","total","paginationType","bullets","firstIndex","lastIndex","midIndex","dynamicBullets","bulletSize","dynamicMainBullets","dynamicBulletIndex","bulletActiveClass","bullet","$bullet","bulletIndex","$firstDisplayedBullet","$lastDisplayedBullet","dynamicBulletsLength","bulletsOffset","offsetProp","currentClass","formatFractionCurrent","totalClass","formatFractionTotal","progressbarDirection","progressbarOpposite","scale","scaleX","scaleY","progressbarFillClass","renderCustom","lockClass","render","paginationHTML","numberOfBullets","renderBullet","bulletClass","bulletElement","renderFraction","renderProgressbar","clickable","clickableClass","modifierClass","progressbarOppositeClass","hiddenClass","hideOnClick","number","activeIndexChange","snapIndexChange","slidesLengthChange","snapGridLengthChange","click","isHidden","Scrollbar","scrollbar","dragSize","trackSize","$dragEl","newSize","newPos","hide","opacity","divider","moveDivider","display","getPointerPosition","clientX","clientY","setDragPosition","dragStartPos","positionRatio","onDragStart","dragTimeout","onDragMove","onDragEnd","snapOnRelease","enableDraggable","activeListener","disableDraggable","$swiperEl","dragClass","dragEl","draggable","Zoom","getDistanceBetweenTouches","x1","y1","x2","y2","onGestureStart","zoom","gesture","fakeGestureTouched","fakeGestureMoved","scaleStart","$slideEl","$imageEl","$imageWrapEl","containerClass","maxRatio","isScaling","onGestureChange","scaleMove","currentScale","onGestureEnd","touchesStart","slideWidth","slideHeight","scaledWidth","scaledHeight","minX","maxX","minY","maxY","touchesCurrent","prevPositionX","prevPositionY","prevTime","momentumDurationX","momentumDurationY","momentumDistanceX","newPositionX","momentumDistanceY","newPositionY","onTransitionEnd","out","zoomedSlideClass","touchX","touchY","offsetX","offsetY","translateX","translateY","imageWidth","imageHeight","translateMinX","translateMinY","translateMaxX","translateMaxY","activeListenerWithCapture","slideSelector","set","touchStart","touchEnd","doubleTap","slideChange","Autoplay","$activeSlideEl","reverseDirection","stopOnLastSlide","pause","waitForTransition","disableOnInteraction","onVisibilityChange","visibilityState","beforeTransitionStart","sliderFirstMove"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;AAWA;;;AACA,eAASA,QAAT,CAAkBC,GAAlB,EAAuB;AACnB,eAAQA,GAAG,KAAK,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AMluB,UAAU,GAAG,CACjB8d,QADiB,EAEjBC,SAFiB,EAGjBO,SAHiB,EAIjBE,MAJiB,EAKjBuB,UALiB,CAAnB;;AASA,UAAI,OAAO5D,MAAM,CAAClc,GAAd,KAAsB,WAA1B,EAAuC;AACrCkc,cAAM,CAAClc,GAAP,GAAakc,MAAM,CAAC/pB,KAAP,CAAa6N,GAA1B;AACAkc,cAAM,CAACpc,aAAP,GAAuBoc,MAAM,CAAC/pB,KAAP,CAAa2N,aAApC;AACD;;AAEDoc,YAAM,CAAClc,GAAP,CAAWD,UAAX;AAEAmc,YAAM,CAAClc,GAAP,CAAW,CAACukB,UAAD,EAAauD,SAAb,EAAwBrQ,QAAxB,EAAkC+I,QAAlC,EAA4C0J,IAA5C,CAAX","file":"swiper-bundle-95afeea2-js-es5.js","sourcesContent":["/**\n * SSR Window 2.0.0\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2020, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: May 12, 2020\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target, src) {\n if (target === void 0) { target = {}; }\n if (src === void 0) { src = {}; }\n Object.keys(src).forEach(function (key) {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nvar doc = typeof document !== 'undefined' ? document : {};\nvar ssrDocument = {\n body: {},\n addEventListener: function () { },\n removeEventListener: function () { },\n activeElement: {\n blur: function () { },\n nodeName: '',\n },\n querySelector: function () {\n return null;\n },\n querySelectorAll: function () {\n return [];\n },\n getElementById: function () {\n return null;\n },\n createEvent: function () {\n return {\n initEvent: function () { },\n };\n },\n createElement: function () {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute: function () { },\n getElementsByTagName: function () {\n return [];\n },\n };\n },\n createElementNS: function () {\n return {};\n },\n importNode: function () {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nextend(doc, ssrDocument);\n\nvar win = typeof window !== 'undefined' ? window : {};\nvar ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState: function () { },\n pushState: function () { },\n go: function () { },\n back: function () { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener: function () { },\n removeEventListener: function () { },\n getComputedStyle: function () {\n return {\n getPropertyValue: function () {\n return '';\n },\n };\n },\n Image: function () { },\n Date: function () { },\n screen: {},\n setTimeout: function () { },\n clearTimeout: function () { },\n matchMedia: function () {\n return {};\n },\n};\nextend(win, ssrWindow);\n\n/**\n * Dom7 2.1.5\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * http://framework7.io/docs/dom.html\n *\n * Copyright 2020, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n *\n * Licensed under MIT\n *\n * Released on: May 15, 2020\n */\n\nclass Dom7 {\n constructor(arr) {\n const self = this;\n // Create array-like object\n for (let i = 0; i < arr.length; i += 1) {\n self[i] = arr[i];\n }\n self.length = arr.length;\n // Return collection with methods\n return this;\n }\n}\n\nfunction $(selector, context) {\n const arr = [];\n let i = 0;\n if (selector && !context) {\n if (selector instanceof Dom7) {\n return selector;\n }\n }\n if (selector) {\n // String\n if (typeof selector === 'string') {\n let els;\n let tempParent;\n const html = selector.trim();\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n let toCreate = 'div';\n if (html.indexOf('<li') === 0) toCreate = 'ul';\n if (html.indexOf('<tr') === 0) toCreate = 'tbody';\n if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) toCreate = 'tr';\n if (html.indexOf('<tbody') === 0) toCreate = 'table';\n if (html.indexOf('<option') === 0) toCreate = 'select';\n tempParent = doc.createElement(toCreate);\n tempParent.innerHTML = html;\n for (i = 0; i < tempParent.childNodes.length; i += 1) {\n arr.push(tempParent.childNodes[i]);\n }\n } else {\n if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {\n // Pure ID selector\n els = [doc.getElementById(selector.trim().split('#')[1])];\n } else {\n // Other selectors\n els = (context || doc).querySelectorAll(selector.trim());\n }\n for (i = 0; i < els.length; i += 1) {\n if (els[i]) arr.push(els[i]);\n }\n }\n } else if (selector.nodeType || selector === win || selector === doc) {\n // Node/element\n arr.push(selector);\n } else if (selector.length > 0 && selector[0].nodeType) {\n // Array of elements or instance of Dom\n for (i = 0; i < selector.length; i += 1) {\n arr.push(selector[i]);\n }\n }\n }\n return new Dom7(arr);\n}\n\n$.fn = Dom7.prototype;\n$.Class = Dom7;\n$.Dom7 = Dom7;\n\nfunction unique(arr) {\n const uniqueArray = [];\n for (let i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n }\n return uniqueArray;\n}\n\n// Classes and attributes\nfunction addClass(className) {\n if (typeof className === 'undefined') {\n return this;\n }\n const classes = className.split(' ');\n for (let i = 0; i < classes.length; i += 1) {\n for (let j = 0; j < this.length; j += 1) {\n if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.add(classes[i]);\n }\n }\n return this;\n}\nfunction removeClass(className) {\n const classes = className.split(' ');\n for (let i = 0; i < classes.length; i += 1) {\n for (let j = 0; j < this.length; j += 1) {\n if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.remove(classes[i]);\n }\n }\n return this;\n}\nfunction hasClass(className) {\n if (!this[0]) return false;\n return this[0].classList.contains(className);\n}\nfunction toggleClass(className) {\n const classes = className.split(' ');\n for (let i = 0; i < classes.length; i += 1) {\n for (let j = 0; j < this.length; j += 1) {\n if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.toggle(classes[i]);\n }\n }\n return this;\n}\nfunction attr(attrs, value) {\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) return this[0].getAttribute(attrs);\n return undefined;\n }\n\n // Set attrs\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i].setAttribute(attrs, value);\n } else {\n // Object\n // eslint-disable-next-line\n for (const attrName in attrs) {\n this[i][attrName] = attrs[attrName];\n this[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n return this;\n}\n// eslint-disable-next-line\nfunction removeAttr(attr) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].removeAttribute(attr);\n }\n return this;\n}\nfunction data(key, value) {\n let el;\n if (typeof value === 'undefined') {\n el = this[0];\n // Get value\n if (el) {\n if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {\n return el.dom7ElementDataStorage[key];\n }\n\n const dataKey = el.getAttribute(`data-${key}`);\n if (dataKey) {\n return dataKey;\n }\n return undefined;\n }\n return undefined;\n }\n\n // Set value\n for (let i = 0; i < this.length; i += 1) {\n el = this[i];\n if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n el.dom7ElementDataStorage[key] = value;\n }\n return this;\n}\n// Transforms\n// eslint-disable-next-line\nfunction transform(transform) {\n for (let i = 0; i < this.length; i += 1) {\n const elStyle = this[i].style;\n elStyle.webkitTransform = transform;\n elStyle.transform = transform;\n }\n return this;\n}\nfunction transition(duration) {\n if (typeof duration !== 'string') {\n duration = `${duration}ms`; // eslint-disable-line\n }\n for (let i = 0; i < this.length; i += 1) {\n const elStyle = this[i].style;\n elStyle.webkitTransitionDuration = duration;\n elStyle.transitionDuration = duration;\n }\n return this;\n}\n// Events\nfunction on(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n if (!capture) capture = false;\n\n function handleLiveEvent(e) {\n const target = e.target;\n if (!target) return;\n const eventData = e.target.dom7EventData || [];\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n if ($(target).is(targetSelector)) listener.apply(target, eventData);\n else {\n const parents = $(target).parents(); // eslint-disable-line\n for (let k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);\n }\n }\n }\n function handleEvent(e) {\n const eventData = e && e.target ? e.target.dom7EventData || [] : [];\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n listener.apply(this, eventData);\n }\n const events = eventType.split(' ');\n let j;\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7Listeners) el.dom7Listeners = {};\n if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];\n el.dom7Listeners[event].push({\n listener,\n proxyListener: handleEvent,\n });\n el.addEventListener(event, handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7LiveListeners) el.dom7LiveListeners = {};\n if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];\n el.dom7LiveListeners[event].push({\n listener,\n proxyListener: handleLiveEvent,\n });\n el.addEventListener(event, handleLiveEvent, capture);\n }\n }\n }\n return this;\n}\nfunction off(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n if (!capture) capture = false;\n\n const events = eventType.split(' ');\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n let handlers;\n if (!targetSelector && el.dom7Listeners) {\n handlers = el.dom7Listeners[event];\n } else if (targetSelector && el.dom7LiveListeners) {\n handlers = el.dom7LiveListeners[event];\n }\n if (handlers && handlers.length) {\n for (let k = handlers.length - 1; k >= 0; k -= 1) {\n const handler = handlers[k];\n if (listener && handler.listener === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (!listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n }\n }\n }\n }\n }\n return this;\n}\nfunction trigger(...args) {\n const events = args[0].split(' ');\n const eventData = args[1];\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n let evt;\n try {\n evt = new win.CustomEvent(event, {\n detail: eventData,\n bubbles: true,\n cancelable: true,\n });\n } catch (e) {\n evt = doc.createEvent('Event');\n evt.initEvent(event, true, true);\n evt.detail = eventData;\n }\n // eslint-disable-next-line\n el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);\n el.dispatchEvent(evt);\n el.dom7EventData = [];\n delete el.dom7EventData;\n }\n }\n return this;\n}\nfunction transitionEnd(callback) {\n const events = ['webkitTransitionEnd', 'transitionend'];\n const dom = this;\n let i;\n function fireCallBack(e) {\n /* jshint validthis:true */\n if (e.target !== this) return;\n callback.call(this, e);\n for (i = 0; i < events.length; i += 1) {\n dom.off(events[i], fireCallBack);\n }\n }\n if (callback) {\n for (i = 0; i < events.length; i += 1) {\n dom.on(events[i], fireCallBack);\n }\n }\n return this;\n}\nfunction outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n // eslint-disable-next-line\n const styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n return this[0].offsetWidth;\n }\n return null;\n}\nfunction outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n // eslint-disable-next-line\n const styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n return this[0].offsetHeight;\n }\n return null;\n}\nfunction offset() {\n if (this.length > 0) {\n const el = this[0];\n const box = el.getBoundingClientRect();\n const body = doc.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === win ? win.scrollY : el.scrollTop;\n const scrollLeft = el === win ? win.scrollX : el.scrollLeft;\n return {\n top: (box.top + scrollTop) - clientTop,\n left: (box.left + scrollLeft) - clientLeft,\n };\n }\n\n return null;\n}\nfunction styles() {\n if (this[0]) return win.getComputedStyle(this[0], null);\n return {};\n}\nfunction css(props, value) {\n let i;\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n if (this[0]) return win.getComputedStyle(this[0], null).getPropertyValue(props);\n } else {\n for (i = 0; i < this.length; i += 1) {\n // eslint-disable-next-line\n for (let prop in props) {\n this[i].style[prop] = props[prop];\n }\n }\n return this;\n }\n }\n if (arguments.length === 2 && typeof props === 'string') {\n for (i = 0; i < this.length; i += 1) {\n this[i].style[props] = value;\n }\n return this;\n }\n return this;\n}\n// Iterate over the collection passing elements to `callback`\nfunction each(callback) {\n // Don't bother continuing without a callback\n if (!callback) return this;\n // Iterate over the current collection\n for (let i = 0; i < this.length; i += 1) {\n // If the callback returns false\n if (callback.call(this[i], i, this[i]) === false) {\n // End the loop early\n return this;\n }\n }\n // Return `this` to allow chained DOM operations\n return this;\n}\nfunction filter(callback) {\n const matchedItems = [];\n const dom = this;\n for (let i = 0; i < dom.length; i += 1) {\n if (callback.call(dom[i], i, dom[i])) matchedItems.push(dom[i]);\n }\n return new Dom7(matchedItems);\n}\n// eslint-disable-next-line\nfunction html(html) {\n if (typeof html === 'undefined') {\n return this[0] ? this[0].innerHTML : undefined;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].innerHTML = html;\n }\n return this;\n}\n// eslint-disable-next-line\nfunction text(text) {\n if (typeof text === 'undefined') {\n if (this[0]) {\n return this[0].textContent.trim();\n }\n return null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].textContent = text;\n }\n return this;\n}\nfunction is(selector) {\n const el = this[0];\n let compareWith;\n let i;\n if (!el || typeof selector === 'undefined') return false;\n if (typeof selector === 'string') {\n if (el.matches) return el.matches(selector);\n else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n else if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n\n compareWith = $(selector);\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n return false;\n } else if (selector === doc) return el === doc;\n else if (selector === win) return el === win;\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n return false;\n }\n return false;\n}\nfunction index() {\n let child = this[0];\n let i;\n if (child) {\n i = 0;\n // eslint-disable-next-line\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n return i;\n }\n return undefined;\n}\n// eslint-disable-next-line\nfunction eq(index) {\n if (typeof index === 'undefined') return this;\n const length = this.length;\n let returnIndex;\n if (index > length - 1) {\n return new Dom7([]);\n }\n if (index < 0) {\n returnIndex = length + index;\n if (returnIndex < 0) return new Dom7([]);\n return new Dom7([this[returnIndex]]);\n }\n return new Dom7([this[index]]);\n}\nfunction append(...args) {\n let newChild;\n\n for (let k = 0; k < args.length; k += 1) {\n newChild = args[k];\n for (let i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = doc.createElement('div');\n tempDiv.innerHTML = newChild;\n while (tempDiv.firstChild) {\n this[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (let j = 0; j < newChild.length; j += 1) {\n this[i].appendChild(newChild[j]);\n }\n } else {\n this[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n}\nfunction prepend(newChild) {\n let i;\n let j;\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = doc.createElement('div');\n tempDiv.innerHTML = newChild;\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n }\n } else {\n this[i].insertBefore(newChild, this[i].childNodes[0]);\n }\n }\n return this;\n}\nfunction next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {\n return new Dom7([this[0].nextElementSibling]);\n }\n return new Dom7([]);\n }\n\n if (this[0].nextElementSibling) return new Dom7([this[0].nextElementSibling]);\n return new Dom7([]);\n }\n return new Dom7([]);\n}\nfunction nextAll(selector) {\n const nextEls = [];\n let el = this[0];\n if (!el) return new Dom7([]);\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n if (selector) {\n if ($(next).is(selector)) nextEls.push(next);\n } else nextEls.push(next);\n el = next;\n }\n return new Dom7(nextEls);\n}\nfunction prev(selector) {\n if (this.length > 0) {\n const el = this[0];\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {\n return new Dom7([el.previousElementSibling]);\n }\n return new Dom7([]);\n }\n\n if (el.previousElementSibling) return new Dom7([el.previousElementSibling]);\n return new Dom7([]);\n }\n return new Dom7([]);\n}\nfunction prevAll(selector) {\n const prevEls = [];\n let el = this[0];\n if (!el) return new Dom7([]);\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n if (selector) {\n if ($(prev).is(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n el = prev;\n }\n return new Dom7(prevEls);\n}\nfunction parent(selector) {\n const parents = []; // eslint-disable-line\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode !== null) {\n if (selector) {\n if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n } else {\n parents.push(this[i].parentNode);\n }\n }\n }\n return $(unique(parents));\n}\nfunction parents(selector) {\n const parents = []; // eslint-disable-line\n for (let i = 0; i < this.length; i += 1) {\n let parent = this[i].parentNode; // eslint-disable-line\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n parent = parent.parentNode;\n }\n }\n return $(unique(parents));\n}\nfunction closest(selector) {\n let closest = this; // eslint-disable-line\n if (typeof selector === 'undefined') {\n return new Dom7([]);\n }\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n return closest;\n}\nfunction find(selector) {\n const foundElements = [];\n for (let i = 0; i < this.length; i += 1) {\n const found = this[i].querySelectorAll(selector);\n for (let j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n return new Dom7(foundElements);\n}\nfunction children(selector) {\n const children = []; // eslint-disable-line\n for (let i = 0; i < this.length; i += 1) {\n const childNodes = this[i].childNodes;\n\n for (let j = 0; j < childNodes.length; j += 1) {\n if (!selector) {\n if (childNodes[j].nodeType === 1) children.push(childNodes[j]);\n } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) {\n children.push(childNodes[j]);\n }\n }\n }\n return new Dom7(unique(children));\n}\nfunction remove() {\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n }\n return this;\n}\nfunction add(...args) {\n const dom = this;\n let i;\n let j;\n for (i = 0; i < args.length; i += 1) {\n const toAdd = $(args[i]);\n for (j = 0; j < toAdd.length; j += 1) {\n dom[dom.length] = toAdd[j];\n dom.length += 1;\n }\n }\n return dom;\n}\n\n/**\n * Swiper 5.4.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * http://swiperjs.com\n *\n * Copyright 2014-2020 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: May 20, 2020\n */\n\nconst Methods = {\n addClass,\n removeClass,\n hasClass,\n toggleClass,\n attr,\n removeAttr,\n data,\n transform,\n transition: transition,\n on,\n off,\n trigger,\n transitionEnd: transitionEnd,\n outerWidth,\n outerHeight,\n offset,\n css,\n each,\n html,\n text,\n is,\n index,\n eq,\n append,\n prepend,\n next,\n nextAll,\n prev,\n prevAll,\n parent,\n parents,\n closest,\n find,\n children,\n filter,\n remove,\n add,\n styles,\n};\n\nObject.keys(Methods).forEach((methodName) => {\n $.fn[methodName] = $.fn[methodName] || Methods[methodName];\n});\n\nconst Utils = {\n deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach((key) => {\n try {\n object[key] = null;\n } catch (e) {\n // no getter for object\n }\n try {\n delete object[key];\n } catch (e) {\n // something got wrong\n }\n });\n },\n nextTick(callback, delay = 0) {\n return setTimeout(callback, delay);\n },\n now() {\n return Date.now();\n },\n getTranslate(el, axis = 'x') {\n let matrix;\n let curTransform;\n let transformMatrix;\n\n const curStyle = win.getComputedStyle(el, null);\n\n if (win.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map((a) => a.replace(',', '.')).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new win.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (win.WebKitCSSMatrix) curTransform = transformMatrix.m41;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (win.WebKitCSSMatrix) curTransform = transformMatrix.m42;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n return curTransform || 0;\n },\n parseUrlQuery(url) {\n const query = {};\n let urlToParse = url || win.location.href;\n let i;\n let params;\n let param;\n let length;\n if (typeof urlToParse === 'string' && urlToParse.length) {\n urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\\S*\\?/, '') : '';\n params = urlToParse.split('&').filter((paramsPart) => paramsPart !== '');\n length = params.length;\n\n for (i = 0; i < length; i += 1) {\n param = params[i].replace(/#\\S+/g, '').split('=');\n query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';\n }\n }\n return query;\n },\n isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;\n },\n extend(...args) {\n const to = Object(args[0]);\n for (let i = 1; i < args.length; i += 1) {\n const nextSource = args[i];\n if (nextSource !== undefined && nextSource !== null) {\n const keysArray = Object.keys(Object(nextSource));\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {\n Utils.extend(to[nextKey], nextSource[nextKey]);\n } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n Utils.extend(to[nextKey], nextSource[nextKey]);\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n },\n};\n\nconst Support = (function Support() {\n return {\n touch: !!(('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch)),\n\n pointerEvents: !!win.PointerEvent && ('maxTouchPoints' in win.navigator) && win.navigator.maxTouchPoints >= 0,\n\n observer: (function checkObserver() {\n return ('MutationObserver' in win || 'WebkitMutationObserver' in win);\n }()),\n\n passiveListener: (function checkPassiveListener() {\n let supportsPassive = false;\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line\n get() {\n supportsPassive = true;\n },\n });\n win.addEventListener('testPassiveListener', null, opts);\n } catch (e) {\n // No support\n }\n return supportsPassive;\n }()),\n\n gestures: (function checkGestures() {\n return 'ongesturestart' in win;\n }()),\n };\n}());\n\nclass SwiperClass {\n constructor(params = {}) {\n const self = this;\n self.params = params;\n\n // Events\n self.eventsListeners = {};\n\n if (self.params && self.params.on) {\n Object.keys(self.params.on).forEach((eventName) => {\n self.on(eventName, self.params.on[eventName]);\n });\n }\n }\n\n on(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach((event) => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n }\n\n once(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n function onceHandler(...args) {\n self.off(events, onceHandler);\n if (onceHandler.f7proxy) {\n delete onceHandler.f7proxy;\n }\n handler.apply(self, args);\n }\n onceHandler.f7proxy = handler;\n return self.on(events, onceHandler, priority);\n }\n\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach((event) => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event] && self.eventsListeners[event].length) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || (eventHandler.f7proxy && eventHandler.f7proxy === handler)) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n }\n\n emit(...args) {\n const self = this;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach((event) => {\n if (self.eventsListeners && self.eventsListeners[event]) {\n const handlers = [];\n self.eventsListeners[event].forEach((eventHandler) => {\n handlers.push(eventHandler);\n });\n handlers.forEach((eventHandler) => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n\n useModulesParams(instanceParams) {\n const instance = this;\n if (!instance.modules) return;\n Object.keys(instance.modules).forEach((moduleName) => {\n const module = instance.modules[moduleName];\n // Extend params\n if (module.params) {\n Utils.extend(instanceParams, module.params);\n }\n });\n }\n\n useModules(modulesParams = {}) {\n const instance = this;\n if (!instance.modules) return;\n Object.keys(instance.modules).forEach((moduleName) => {\n const module = instance.modules[moduleName];\n const moduleParams = modulesParams[moduleName] || {};\n // Extend instance methods and props\n if (module.instance) {\n Object.keys(module.instance).forEach((modulePropName) => {\n const moduleProp = module.instance[modulePropName];\n if (typeof moduleProp === 'function') {\n instance[modulePropName] = moduleProp.bind(instance);\n } else {\n instance[modulePropName] = moduleProp;\n }\n });\n }\n // Add event listeners\n if (module.on && instance.on) {\n Object.keys(module.on).forEach((moduleEventName) => {\n instance.on(moduleEventName, module.on[moduleEventName]);\n });\n }\n\n // Module create callback\n if (module.create) {\n module.create.bind(instance)(moduleParams);\n }\n });\n }\n\n static set components(components) {\n const Class = this;\n if (!Class.use) return;\n Class.use(components);\n }\n\n static installModule(module, ...params) {\n const Class = this;\n if (!Class.prototype.modules) Class.prototype.modules = {};\n const name = module.name || (`${Object.keys(Class.prototype.modules).length}_${Utils.now()}`);\n Class.prototype.modules[name] = module;\n // Prototype\n if (module.proto) {\n Object.keys(module.proto).forEach((key) => {\n Class.prototype[key] = module.proto[key];\n });\n }\n // Class\n if (module.static) {\n Object.keys(module.static).forEach((key) => {\n Class[key] = module.static[key];\n });\n }\n // Callback\n if (module.install) {\n module.install.apply(Class, params);\n }\n return Class;\n }\n\n static use(module, ...params) {\n const Class = this;\n if (Array.isArray(module)) {\n module.forEach((m) => Class.installModule(m));\n return Class;\n }\n return Class.installModule(module, ...params);\n }\n}\n\nfunction updateSize () {\n const swiper = this;\n let width;\n let height;\n const $el = swiper.$el;\n if (typeof swiper.params.width !== 'undefined') {\n width = swiper.params.width;\n } else {\n width = $el[0].clientWidth;\n }\n if (typeof swiper.params.height !== 'undefined') {\n height = swiper.params.height;\n } else {\n height = $el[0].clientHeight;\n }\n if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {\n return;\n }\n\n // Subtract paddings\n width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);\n height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);\n\n Utils.extend(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height,\n });\n}\n\nfunction updateSlides () {\n const swiper = this;\n const params = swiper.params;\n\n const {\n $wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL,\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n\n function slidesForMargin(slideIndex) {\n if (!params.cssMode) return true;\n if (slideIndex === slides.length - 1) {\n return false;\n }\n return true;\n }\n\n let offsetBefore = params.slidesOffsetBefore;\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n\n let offsetAfter = params.slidesOffsetAfter;\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.snapGrid.length;\n\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n if (typeof swiperSize === 'undefined') {\n return;\n }\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;\n }\n\n swiper.virtualSize = -spaceBetween;\n\n // reset margins\n if (rtl) slides.css({ marginLeft: '', marginTop: '' });\n else slides.css({ marginRight: '', marginBottom: '' });\n\n let slidesNumberEvenToRows;\n if (params.slidesPerColumn > 1) {\n if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {\n slidesNumberEvenToRows = slidesLength;\n } else {\n slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;\n }\n if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {\n slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);\n }\n }\n\n // Calc slides\n let slideSize;\n const slidesPerColumn = params.slidesPerColumn;\n const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;\n const numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n const slide = slides.eq(i);\n if (params.slidesPerColumn > 1) {\n // Set slides order\n let newSlideOrderIndex;\n let column;\n let row;\n if (params.slidesPerColumnFill === 'row' && params.slidesPerGroup > 1) {\n const groupIndex = Math.floor(i / (params.slidesPerGroup * params.slidesPerColumn));\n const slideIndexInGroup = i - params.slidesPerColumn * params.slidesPerGroup * groupIndex;\n const columnsInGroup = groupIndex === 0\n ? params.slidesPerGroup\n : Math.min(Math.ceil((slidesLength - groupIndex * slidesPerColumn * params.slidesPerGroup) / slidesPerColumn), params.slidesPerGroup);\n row = Math.floor(slideIndexInGroup / columnsInGroup);\n column = (slideIndexInGroup - row * columnsInGroup) + groupIndex * params.slidesPerGroup;\n\n newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);\n slide\n .css({\n '-webkit-box-ordinal-group': newSlideOrderIndex,\n '-moz-box-ordinal-group': newSlideOrderIndex,\n '-ms-flex-order': newSlideOrderIndex,\n '-webkit-order': newSlideOrderIndex,\n order: newSlideOrderIndex,\n });\n } else if (params.slidesPerColumnFill === 'column') {\n column = Math.floor(i / slidesPerColumn);\n row = i - (column * slidesPerColumn);\n if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {\n row += 1;\n if (row >= slidesPerColumn) {\n row = 0;\n column += 1;\n }\n }\n } else {\n row = Math.floor(i / slidesPerRow);\n column = i - (row * slidesPerRow);\n }\n slide.css(\n `margin-${swiper.isHorizontal() ? 'top' : 'left'}`,\n (row !== 0 && params.spaceBetween) && (`${params.spaceBetween}px`)\n );\n }\n if (slide.css('display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n const slideStyles = win.getComputedStyle(slide[0], null);\n const currentTransform = slide[0].style.transform;\n const currentWebKitTransform = slide[0].style.webkitTransform;\n if (currentTransform) {\n slide[0].style.transform = 'none';\n }\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = 'none';\n }\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal()\n ? slide.outerWidth(true)\n : slide.outerHeight(true);\n } else {\n // eslint-disable-next-line\n if (swiper.isHorizontal()) {\n const width = parseFloat(slideStyles.getPropertyValue('width'));\n const paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));\n const paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));\n const marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));\n const marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight;\n }\n } else {\n const height = parseFloat(slideStyles.getPropertyValue('height'));\n const paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));\n const paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));\n const marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));\n const marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = height + marginTop + marginBottom;\n } else {\n slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom;\n }\n }\n }\n if (currentTransform) {\n slide[0].style.transform = currentTransform;\n }\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = currentWebKitTransform;\n }\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n\n if (slides[i]) {\n if (swiper.isHorizontal()) {\n slides[i].style.width = `${slideSize}px`;\n } else {\n slides[i].style.height = `${slideSize}px`;\n }\n }\n }\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n slidesSizesGrid.push(slideSize);\n\n\n if (params.centeredSlides) {\n slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;\n if (i === 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n\n swiper.virtualSize += slideSize + spaceBetween;\n\n prevSlideSize = slideSize;\n\n index += 1;\n }\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n let newSlidesGrid;\n\n if (\n rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });\n }\n if (params.setWrapperSize) {\n if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });\n else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });\n }\n\n if (params.slidesPerColumn > 1) {\n swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;\n swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;\n if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });\n else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });\n if (params.centeredSlides) {\n newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);\n }\n snapGrid = newSlidesGrid;\n }\n }\n\n // Remove last grid elements depending on width\n if (!params.centeredSlides) {\n newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n snapGrid = newSlidesGrid;\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n if (snapGrid.length === 0) snapGrid = [0];\n\n if (params.spaceBetween !== 0) {\n if (swiper.isHorizontal()) {\n if (rtl) slides.filter(slidesForMargin).css({ marginLeft: `${spaceBetween}px` });\n else slides.filter(slidesForMargin).css({ marginRight: `${spaceBetween}px` });\n } else slides.filter(slidesForMargin).css({ marginBottom: `${spaceBetween}px` });\n }\n\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach((slideSizeValue) => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map((snap) => {\n if (snap < 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach((slideSizeValue) => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n\n Utils.extend(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid,\n });\n\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n\n if (params.watchSlidesProgress || params.watchSlidesVisibility) {\n swiper.updateSlidesOffset();\n }\n}\n\nfunction updateAutoHeight (speed) {\n const swiper = this;\n const activeSlides = [];\n let newHeight = 0;\n let i;\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n // Find slides currently in view\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n swiper.visibleSlides.each((index, slide) => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length) break;\n activeSlides.push(swiper.slides.eq(index)[0]);\n }\n }\n } else {\n activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);\n }\n\n // Find new height from highest slide in view\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n\n // Update Height\n if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);\n}\n\nfunction updateSlidesOffset () {\n const swiper = this;\n const slides = swiper.slides;\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;\n }\n}\n\nfunction updateSlidesProgress (translate = (this && this.translate) || 0) {\n const swiper = this;\n const params = swiper.params;\n\n const { slides, rtlTranslate: rtl } = swiper;\n\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate;\n\n // Visible Slides\n slides.removeClass(params.slideVisibleClass);\n\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n const slideProgress = (\n (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset\n ) / (slide.swiperSlideSize + params.spaceBetween);\n if (params.watchSlidesVisibility || (params.centeredSlides && params.autoHeight)) {\n const slideBefore = -(offsetCenter - slide.swiperSlideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible = (slideBefore >= 0 && slideBefore < swiper.size - 1)\n || (slideAfter > 1 && slideAfter <= swiper.size)\n || (slideBefore <= 0 && slideAfter >= swiper.size);\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides.eq(i).addClass(params.slideVisibleClass);\n }\n }\n slide.progress = rtl ? -slideProgress : slideProgress;\n }\n swiper.visibleSlides = $(swiper.visibleSlides);\n}\n\nfunction updateProgress (translate) {\n const swiper = this;\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1;\n // eslint-disable-next-line\n translate = (swiper && swiper.translate && (swiper.translate * multiplier)) || 0;\n }\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let { progress, isBeginning, isEnd } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / (translatesDiff);\n isBeginning = progress <= 0;\n isEnd = progress >= 1;\n }\n Utils.extend(swiper, {\n progress,\n isBeginning,\n isEnd,\n });\n\n if (params.watchSlidesProgress || params.watchSlidesVisibility || (params.centeredSlides && params.autoHeight)) swiper.updateSlidesProgress(translate);\n\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {\n swiper.emit('fromEdge');\n }\n\n swiper.emit('progress', progress);\n}\n\nfunction updateSlidesClasses () {\n const swiper = this;\n\n const {\n slides, params, $wrapperEl, activeIndex, realIndex,\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n\n slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);\n\n let activeSlide;\n if (isVirtual) {\n activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index=\"${activeIndex}\"]`);\n } else {\n activeSlide = slides.eq(activeIndex);\n }\n\n // Active classes\n activeSlide.addClass(params.slideActiveClass);\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl\n .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${realIndex}\"]`)\n .addClass(params.slideDuplicateActiveClass);\n } else {\n $wrapperEl\n .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${realIndex}\"]`)\n .addClass(params.slideDuplicateActiveClass);\n }\n }\n // Next Slide\n let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);\n if (params.loop && nextSlide.length === 0) {\n nextSlide = slides.eq(0);\n nextSlide.addClass(params.slideNextClass);\n }\n // Prev Slide\n let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);\n if (params.loop && prevSlide.length === 0) {\n prevSlide = slides.eq(-1);\n prevSlide.addClass(params.slidePrevClass);\n }\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl\n .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`)\n .addClass(params.slideDuplicateNextClass);\n } else {\n $wrapperEl\n .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`)\n .addClass(params.slideDuplicateNextClass);\n }\n if (prevSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl\n .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`)\n .addClass(params.slideDuplicatePrevClass);\n } else {\n $wrapperEl\n .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`)\n .addClass(params.slideDuplicatePrevClass);\n }\n }\n}\n\nfunction updateActiveIndex (newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n slidesGrid, snapGrid, params, activeIndex: previousIndex, realIndex: previousRealIndex, snapIndex: previousSnapIndex,\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n if (typeof activeIndex === 'undefined') {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n }\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n }\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n return;\n }\n\n // Get real index\n const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);\n\n Utils.extend(swiper, {\n snapIndex,\n realIndex,\n previousIndex,\n activeIndex,\n });\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n swiper.emit('slideChange');\n }\n}\n\nfunction updateClickedSlide (e) {\n const swiper = this;\n const params = swiper.params;\n const slide = $(e.target).closest(`.${params.slideClass}`)[0];\n let slideFound = false;\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) slideFound = true;\n }\n }\n\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = $(slide).index();\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}\n\nvar update = {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide,\n};\n\nfunction getTranslate (axis = this.isHorizontal() ? 'x' : 'y') {\n const swiper = this;\n\n const {\n params, rtlTranslate: rtl, translate, $wrapperEl,\n } = swiper;\n\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n if (params.cssMode) {\n return translate;\n }\n\n let currentTranslate = Utils.getTranslate($wrapperEl[0], axis);\n if (rtl) currentTranslate = -currentTranslate;\n\n return currentTranslate || 0;\n}\n\nfunction setTranslate (translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl, params, $wrapperEl, wrapperEl, progress,\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);\n }\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y;\n\n // Check if we need to update progress\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / (translatesDiff);\n }\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, byController);\n}\n\nfunction minTranslate () {\n return (-this.snapGrid[0]);\n}\n\nfunction maxTranslate () {\n return (-this.snapGrid[this.snapGrid.length - 1]);\n}\n\nfunction translateTo (translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {\n const swiper = this;\n\n const {\n params,\n wrapperEl,\n } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;\n else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;\n else newTranslate = translate;\n\n // Update progress\n swiper.updateProgress(newTranslate);\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n // eslint-disable-next-line\n if (wrapperEl.scrollTo) {\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth',\n });\n } else {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n }\n }\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n\n return true;\n}\n\nvar translate = {\n getTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo,\n};\n\nfunction setTransition (duration, byController) {\n const swiper = this;\n\n if (!swiper.params.cssMode) {\n swiper.$wrapperEl.transition(duration);\n }\n\n swiper.emit('setTransition', duration, byController);\n}\n\nfunction transitionStart (runCallbacks = true, direction) {\n const swiper = this;\n const { activeIndex, params, previousIndex } = swiper;\n if (params.cssMode) return;\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';\n else if (activeIndex < previousIndex) dir = 'prev';\n else dir = 'reset';\n }\n\n swiper.emit('transitionStart');\n\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit('slideResetTransitionStart');\n return;\n }\n swiper.emit('slideChangeTransitionStart');\n if (dir === 'next') {\n swiper.emit('slideNextTransitionStart');\n } else {\n swiper.emit('slidePrevTransitionStart');\n }\n }\n}\n\nfunction transitionEnd$1 (runCallbacks = true, direction) {\n const swiper = this;\n const { activeIndex, previousIndex, params } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';\n else if (activeIndex < previousIndex) dir = 'prev';\n else dir = 'reset';\n }\n\n swiper.emit('transitionEnd');\n\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit('slideResetTransitionEnd');\n return;\n }\n swiper.emit('slideChangeTransitionEnd');\n if (dir === 'next') {\n swiper.emit('slideNextTransitionEnd');\n } else {\n swiper.emit('slidePrevTransitionEnd');\n }\n }\n}\n\nvar transition$1 = {\n setTransition,\n transitionStart,\n transitionEnd: transitionEnd$1,\n};\n\nfunction slideTo (index = 0, speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n\n const {\n params, snapGrid, slidesGrid, previousIndex, activeIndex, rtlTranslate: rtl, wrapperEl,\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n const translate = -snapGrid[snapIndex];\n\n // Update progress\n swiper.updateProgress(translate);\n\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {\n slideIndex = i;\n }\n }\n }\n // Directions locks\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {\n return false;\n }\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) return false;\n }\n }\n\n let direction;\n if (slideIndex > activeIndex) direction = 'next';\n else if (slideIndex < activeIndex) direction = 'prev';\n else direction = 'reset';\n\n\n // Update Index\n if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {\n swiper.updateActiveIndex(slideIndex);\n // Update Height\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n swiper.updateSlidesClasses();\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n return false;\n }\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n let t = -translate;\n if (rtl) {\n t = wrapperEl.scrollWidth - wrapperEl.offsetWidth - t;\n }\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n } else {\n // eslint-disable-next-line\n if (wrapperEl.scrollTo) {\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth',\n });\n } else {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n }\n }\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);\n }\n }\n\n return true;\n}\n\nfunction slideToLoop (index = 0, speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n let newIndex = index;\n if (swiper.params.loop) {\n newIndex += swiper.loopedSlides;\n }\n\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideNext (speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const { params, animating } = swiper;\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup;\n if (params.loop) {\n if (animating) return false;\n swiper.loopFix();\n // eslint-disable-next-line\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slidePrev (speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n params, animating, snapGrid, slidesGrid, rtlTranslate,\n } = swiper;\n\n if (params.loop) {\n if (animating) return false;\n swiper.loopFix();\n // eslint-disable-next-line\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map((val) => normalize(val));\n const normalizedSlidesGrid = slidesGrid.map((val) => normalize(val));\n\n const currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n snapGrid.forEach((snap) => {\n if (!prevSnap && normalizedTranslate >= snap) prevSnap = snap;\n });\n }\n let prevIndex;\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n }\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideReset (speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideToClosest (speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n if ((translate - currentSnap) > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n if ((translate - prevSnap) <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}\n\nfunction slideToClickedSlide () {\n const swiper = this;\n const { params, $wrapperEl } = swiper;\n\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n if (params.centeredSlides) {\n if (\n (slideToIndex < swiper.loopedSlides - (slidesPerView / 2))\n || (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))\n ) {\n swiper.loopFix();\n slideToIndex = $wrapperEl\n .children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`)\n .eq(0)\n .index();\n\n Utils.nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = $wrapperEl\n .children(`.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`)\n .eq(0)\n .index();\n\n Utils.nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}\n\nvar slide = {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide,\n};\n\nfunction loopCreate () {\n const swiper = this;\n const { params, $wrapperEl } = swiper;\n // Remove duplicated slides\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();\n\n let slides = $wrapperEl.children(`.${params.slideClass}`);\n\n if (params.loopFillGroupWithBlank) {\n const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);\n if (blankSlidesNum !== params.slidesPerGroup) {\n for (let i = 0; i < blankSlidesNum; i += 1) {\n const blankNode = $(doc.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);\n $wrapperEl.append(blankNode);\n }\n slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n }\n\n if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;\n\n swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));\n swiper.loopedSlides += params.loopAdditionalSlides;\n if (swiper.loopedSlides > slides.length) {\n swiper.loopedSlides = slides.length;\n }\n\n const prependSlides = [];\n const appendSlides = [];\n slides.each((index, el) => {\n const slide = $(el);\n if (index < swiper.loopedSlides) appendSlides.push(el);\n if (index < slides.length && index >= slides.length - swiper.loopedSlides) prependSlides.push(el);\n slide.attr('data-swiper-slide-index', index);\n });\n for (let i = 0; i < appendSlides.length; i += 1) {\n $wrapperEl.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n for (let i = prependSlides.length - 1; i >= 0; i -= 1) {\n $wrapperEl.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n}\n\nfunction loopFix () {\n const swiper = this;\n\n swiper.emit('beforeLoopFix');\n\n const {\n activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtlTranslate: rtl,\n } = swiper;\n let newIndex;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n\n const snapTranslate = -snapGrid[activeIndex];\n const diff = snapTranslate - swiper.getTranslate();\n\n // Fix For Negative Oversliding\n if (activeIndex < loopedSlides) {\n newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n } else if (activeIndex >= slides.length - loopedSlides) {\n // Fix For Positive Oversliding\n newIndex = -slides.length + activeIndex + loopedSlides;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n swiper.emit('loopFix');\n}\n\nfunction loopDestroy () {\n const swiper = this;\n const { $wrapperEl, params, slides } = swiper;\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();\n slides.removeAttr('data-swiper-slide-index');\n}\n\nvar loop = {\n loopCreate,\n loopFix,\n loopDestroy,\n};\n\nfunction setGrabCursor (moving) {\n const swiper = this;\n if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) return;\n const el = swiper.el;\n el.style.cursor = 'move';\n el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n}\n\nfunction unsetGrabCursor () {\n const swiper = this;\n if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) return;\n swiper.el.style.cursor = '';\n}\n\nvar grabCursor = {\n setGrabCursor,\n unsetGrabCursor,\n};\n\nfunction appendSlide (slides) {\n const swiper = this;\n const { $wrapperEl, params } = swiper;\n if (params.loop) {\n swiper.loopDestroy();\n }\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n } else {\n $wrapperEl.append(slides);\n }\n if (params.loop) {\n swiper.loopCreate();\n }\n if (!(params.observer && Support.observer)) {\n swiper.update();\n }\n}\n\nfunction prependSlide (slides) {\n const swiper = this;\n const { params, $wrapperEl, activeIndex } = swiper;\n\n if (params.loop) {\n swiper.loopDestroy();\n }\n let newActiveIndex = activeIndex + 1;\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.prepend(slides[i]);\n }\n newActiveIndex = activeIndex + slides.length;\n } else {\n $wrapperEl.prepend(slides);\n }\n if (params.loop) {\n swiper.loopCreate();\n }\n if (!(params.observer && Support.observer)) {\n swiper.update();\n }\n swiper.slideTo(newActiveIndex, 0, false);\n}\n\nfunction addSlide (index, slides) {\n const swiper = this;\n const { $wrapperEl, params, activeIndex } = swiper;\n let activeIndexBuffer = activeIndex;\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n const baseLength = swiper.slides.length;\n if (index <= 0) {\n swiper.prependSlide(slides);\n return;\n }\n if (index >= baseLength) {\n swiper.appendSlide(slides);\n return;\n }\n let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;\n\n const slidesBuffer = [];\n for (let i = baseLength - 1; i >= index; i -= 1) {\n const currentSlide = swiper.slides.eq(i);\n currentSlide.remove();\n slidesBuffer.unshift(currentSlide);\n }\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;\n } else {\n $wrapperEl.append(slides);\n }\n\n for (let i = 0; i < slidesBuffer.length; i += 1) {\n $wrapperEl.append(slidesBuffer[i]);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n if (!(params.observer && Support.observer)) {\n swiper.update();\n }\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}\n\nfunction removeSlide (slidesIndexes) {\n const swiper = this;\n const { params, $wrapperEl, activeIndex } = swiper;\n\n let activeIndexBuffer = activeIndex;\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n let newActiveIndex = activeIndexBuffer;\n let indexToRemove;\n\n if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {\n for (let i = 0; i < slidesIndexes.length; i += 1) {\n indexToRemove = slidesIndexes[i];\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n }\n newActiveIndex = Math.max(newActiveIndex, 0);\n } else {\n indexToRemove = slidesIndexes;\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!(params.observer && Support.observer)) {\n swiper.update();\n }\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}\n\nfunction removeAllSlides () {\n const swiper = this;\n\n const slidesIndexes = [];\n for (let i = 0; i < swiper.slides.length; i += 1) {\n slidesIndexes.push(i);\n }\n swiper.removeSlide(slidesIndexes);\n}\n\nvar manipulation = {\n appendSlide,\n prependSlide,\n addSlide,\n removeSlide,\n removeAllSlides,\n};\n\nconst Device = (function Device() {\n const platform = win.navigator.platform;\n const ua = win.navigator.userAgent;\n\n const device = {\n ios: false,\n android: false,\n androidChrome: false,\n desktop: false,\n iphone: false,\n ipod: false,\n ipad: false,\n edge: false,\n ie: false,\n firefox: false,\n macos: false,\n windows: false,\n cordova: !!(win.cordova || win.phonegap),\n phonegap: !!(win.cordova || win.phonegap),\n electron: false,\n };\n\n const screenWidth = win.screen.width;\n const screenHeight = win.screen.height;\n\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;\n const edge = ua.indexOf('Edge/') >= 0;\n const firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0;\n const windows = platform === 'Win32';\n const electron = ua.toLowerCase().indexOf('electron') >= 0;\n let macos = platform === 'MacIntel';\n\n // iPadOs 13 fix\n if (!ipad\n && macos\n && Support.touch\n && (\n (screenWidth === 1024 && screenHeight === 1366) // Pro 12.9\n || (screenWidth === 834 && screenHeight === 1194) // Pro 11\n || (screenWidth === 834 && screenHeight === 1112) // Pro 10.5\n || (screenWidth === 768 && screenHeight === 1024) // other\n )\n ) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n macos = false;\n }\n\n device.ie = ie;\n device.edge = edge;\n device.firefox = firefox;\n\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.osVersion = android[2];\n device.android = true;\n device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n // iOS\n if (iphone && !ipod) {\n device.osVersion = iphone[2].replace(/_/g, '.');\n device.iphone = true;\n }\n if (ipad) {\n device.osVersion = ipad[2].replace(/_/g, '.');\n device.ipad = true;\n }\n if (ipod) {\n device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;\n device.ipod = true;\n }\n // iOS 8+ changed UA\n if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {\n if (device.osVersion.split('.')[0] === '10') {\n device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];\n }\n }\n\n // Webview\n device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || win.navigator.standalone))\n || (win.matchMedia && win.matchMedia('(display-mode: standalone)').matches);\n device.webview = device.webView;\n device.standalone = device.webView;\n\n // Desktop\n device.desktop = !(device.ios || device.android) || electron;\n if (device.desktop) {\n device.electron = electron;\n device.macos = macos;\n device.windows = windows;\n if (device.macos) {\n device.os = 'macos';\n }\n if (device.windows) {\n device.os = 'windows';\n }\n }\n\n // Pixel Ratio\n device.pixelRatio = win.devicePixelRatio || 1;\n\n // Export object\n return device;\n}());\n\nfunction onTouchStart (event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const { params, touches } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n const $targetEl = $(e.target);\n\n if (params.touchEventsTarget === 'wrapper') {\n if (!$targetEl.closest(swiper.wrapperEl).length) return;\n }\n data.isTouchEvent = e.type === 'touchstart';\n if (!data.isTouchEvent && 'which' in e && e.which === 3) return;\n if (!data.isTouchEvent && 'button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return;\n if (params.noSwiping && $targetEl.closest(params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`)[0]) {\n swiper.allowClick = true;\n return;\n }\n if (params.swipeHandler) {\n if (!$targetEl.closest(params.swipeHandler)[0]) return;\n }\n\n touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY;\n\n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n if (\n edgeSwipeDetection\n && ((startX <= edgeSwipeThreshold)\n || (startX >= win.screen.width - edgeSwipeThreshold))\n ) {\n return;\n }\n\n Utils.extend(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined,\n });\n\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = Utils.now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n if (e.type !== 'touchstart') {\n let preventDefault = true;\n if ($targetEl.is(data.formElements)) preventDefault = false;\n if (\n doc.activeElement\n && $(doc.activeElement).is(data.formElements)\n && doc.activeElement !== $targetEl[0]\n ) {\n doc.activeElement.blur();\n }\n\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n if (params.touchStartForcePreventDefault || shouldPreventDefault) {\n e.preventDefault();\n }\n }\n swiper.emit('touchStart', e);\n}\n\nfunction onTouchMove (event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const { params, touches, rtlTranslate: rtl } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n return;\n }\n if (data.isTouchEvent && e.type !== 'touchmove') return;\n const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);\n const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;\n const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n if (!swiper.allowTouchMove) {\n // isMoved = true;\n swiper.allowClick = false;\n if (data.isTouched) {\n Utils.extend(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY,\n });\n data.touchStartTime = Utils.now();\n }\n return;\n }\n if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (\n (pageY < touches.startY && swiper.translate <= swiper.maxTranslate())\n || (pageY > touches.startY && swiper.translate >= swiper.minTranslate())\n ) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (\n (pageX < touches.startX && swiper.translate <= swiper.maxTranslate())\n || (pageX > touches.startX && swiper.translate >= swiper.minTranslate())\n ) {\n return;\n }\n }\n if (data.isTouchEvent && doc.activeElement) {\n if (e.target === doc.activeElement && $(e.target).is(data.formElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n if (e.targetTouches && e.targetTouches.length > 1) return;\n\n touches.currentX = pageX;\n touches.currentY = pageY;\n\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt((diffX ** 2) + (diffY ** 2)) < swiper.params.threshold) return;\n\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if ((diffX * diffX) + (diffY * diffY) >= 25) {\n touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);\n }\n }\n }\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n if (!data.startMoving) {\n return;\n }\n swiper.allowClick = false;\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n\n if (!data.isMoved) {\n if (params.loop) {\n swiper.loopFix();\n }\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n if (swiper.animating) {\n swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');\n }\n data.allowMomentumBounce = false;\n // Grab Cursor\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n swiper.emit('sliderFirstMove', e);\n }\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n\n let diff = swiper.isHorizontal() ? diffX : diffY;\n touches.diff = diff;\n\n diff *= params.touchRatio;\n if (rtl) diff = -diff;\n\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n data.currentTranslate = diff + data.startTranslate;\n\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = (swiper.minTranslate() - 1) + ((-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio);\n } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) data.currentTranslate = (swiper.maxTranslate() + 1) - ((swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio);\n }\n\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n\n // Directions locks\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n\n\n // Threshold\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n\n if (!params.followFinger || params.cssMode) return;\n\n // Update active index in free mode\n if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n if (params.freeMode) {\n // Velocity\n if (data.velocities.length === 0) {\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],\n time: data.touchStartTime,\n });\n }\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],\n time: Utils.now(),\n });\n }\n // Update progress\n swiper.updateProgress(data.currentTranslate);\n // Update translate\n swiper.setTranslate(data.currentTranslate);\n}\n\nfunction onTouchEnd (event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n\n const {\n params, touches, rtlTranslate: rtl, $wrapperEl, slidesGrid, snapGrid,\n } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n data.allowTouchCallbacks = false;\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n // Return Grab Cursor\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n }\n\n // Time diff\n const touchEndTime = Utils.now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n // Tap, doubleTap, Click\n if (swiper.allowClick) {\n swiper.updateClickedSlide(e);\n swiper.emit('tap click', e);\n if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n\n data.lastClickTime = Utils.now();\n Utils.nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n\n let currentPos;\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n\n if (params.cssMode) {\n return;\n }\n\n if (params.freeMode) {\n if (currentPos < -swiper.minTranslate()) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (currentPos > -swiper.maxTranslate()) {\n if (swiper.slides.length < snapGrid.length) {\n swiper.slideTo(snapGrid.length - 1);\n } else {\n swiper.slideTo(swiper.slides.length - 1);\n }\n return;\n }\n\n if (params.freeModeMomentum) {\n if (data.velocities.length > 1) {\n const lastMoveEvent = data.velocities.pop();\n const velocityEvent = data.velocities.pop();\n\n const distance = lastMoveEvent.position - velocityEvent.position;\n const time = lastMoveEvent.time - velocityEvent.time;\n swiper.velocity = distance / time;\n swiper.velocity /= 2;\n if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {\n swiper.velocity = 0;\n }\n // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {\n swiper.velocity = 0;\n }\n } else {\n swiper.velocity = 0;\n }\n swiper.velocity *= params.freeModeMomentumVelocityRatio;\n\n data.velocities.length = 0;\n let momentumDuration = 1000 * params.freeModeMomentumRatio;\n const momentumDistance = swiper.velocity * momentumDuration;\n\n let newPosition = swiper.translate + momentumDistance;\n if (rtl) newPosition = -newPosition;\n\n let doBounce = false;\n let afterBouncePosition;\n const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;\n let needsLoopFix;\n if (newPosition < swiper.maxTranslate()) {\n if (params.freeModeMomentumBounce) {\n if (newPosition + swiper.maxTranslate() < -bounceAmount) {\n newPosition = swiper.maxTranslate() - bounceAmount;\n }\n afterBouncePosition = swiper.maxTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.maxTranslate();\n }\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (newPosition > swiper.minTranslate()) {\n if (params.freeModeMomentumBounce) {\n if (newPosition - swiper.minTranslate() > bounceAmount) {\n newPosition = swiper.minTranslate() + bounceAmount;\n }\n afterBouncePosition = swiper.minTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.minTranslate();\n }\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (params.freeModeSticky) {\n let nextSlide;\n for (let j = 0; j < snapGrid.length; j += 1) {\n if (snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n }\n\n if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {\n newPosition = snapGrid[nextSlide];\n } else {\n newPosition = snapGrid[nextSlide - 1];\n }\n newPosition = -newPosition;\n }\n if (needsLoopFix) {\n swiper.once('transitionEnd', () => {\n swiper.loopFix();\n });\n }\n // Fix duration\n if (swiper.velocity !== 0) {\n if (rtl) {\n momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);\n } else {\n momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);\n }\n if (params.freeModeSticky) {\n // If freeModeSticky is active and the user ends a swipe with a slow-velocity\n // event, then durations can be 20+ seconds to slide one (or zero!) slides.\n // It's easy to see this when simulating touch with mouse events. To fix this,\n // limit single-slide swipes to the default slide duration. This also has the\n // nice side effect of matching slide speed if the user stopped moving before\n // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.\n // For faster swipes, also apply limits (albeit higher ones).\n const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);\n const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];\n if (moveDistance < currentSlideSize) {\n momentumDuration = params.speed;\n } else if (moveDistance < 2 * currentSlideSize) {\n momentumDuration = params.speed * 1.5;\n } else {\n momentumDuration = params.speed * 2.5;\n }\n }\n } else if (params.freeModeSticky) {\n swiper.slideToClosest();\n return;\n }\n\n if (params.freeModeMomentumBounce && doBounce) {\n swiper.updateProgress(afterBouncePosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;\n swiper.emit('momentumBounce');\n swiper.setTransition(params.speed);\n setTimeout(() => {\n swiper.setTranslate(afterBouncePosition);\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }, 0);\n });\n } else if (swiper.velocity) {\n swiper.updateProgress(newPosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n if (!swiper.animating) {\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }\n } else {\n swiper.updateProgress(newPosition);\n }\n\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n } else if (params.freeModeSticky) {\n swiper.slideToClosest();\n return;\n }\n\n if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n return;\n }\n\n // Find current slide\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n for (let i = 0; i < slidesGrid.length; i += (i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup)) {\n const increment = (i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup);\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n }\n\n // Find current slide size\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = (stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup);\n\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);\n else swiper.slideTo(stopIndex);\n }\n if (swiper.swipeDirection === 'prev') {\n if (ratio > (1 - params.longSwipesRatio)) swiper.slideTo(stopIndex + increment);\n else swiper.slideTo(stopIndex);\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(stopIndex + increment);\n }\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}\n\nfunction onResize () {\n const swiper = this;\n\n const { params, el } = swiper;\n\n if (el && el.offsetWidth === 0) return;\n\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Save locks\n const { allowSlideNext, allowSlidePrev, snapGrid } = swiper;\n\n // Disable locks on resize\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n\n swiper.updateSize();\n swiper.updateSlides();\n\n swiper.updateSlidesClasses();\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.run();\n }\n // Return locks after resize\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}\n\nfunction onClick (e) {\n const swiper = this;\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}\n\nfunction onScroll () {\n const swiper = this;\n const { wrapperEl, rtlTranslate } = swiper;\n swiper.previousTranslate = swiper.translate;\n if (swiper.isHorizontal()) {\n if (rtlTranslate) {\n swiper.translate = ((wrapperEl.scrollWidth - wrapperEl.offsetWidth) - wrapperEl.scrollLeft);\n } else {\n swiper.translate = -wrapperEl.scrollLeft;\n }\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n }\n // eslint-disable-next-line\n if (swiper.translate === -0) swiper.translate = 0;\n\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / (translatesDiff);\n }\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, false);\n}\n\nlet dummyEventAttached = false;\nfunction dummyEventListener() {}\n\nfunction attachEvents() {\n const swiper = this;\n const {\n params, touchEvents, el, wrapperEl,\n } = swiper;\n\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n\n swiper.onClick = onClick.bind(swiper);\n\n const capture = !!params.nested;\n\n // Touch Events\n if (!Support.touch && Support.pointerEvents) {\n el.addEventListener(touchEvents.start, swiper.onTouchStart, false);\n doc.addEventListener(touchEvents.move, swiper.onTouchMove, capture);\n doc.addEventListener(touchEvents.end, swiper.onTouchEnd, false);\n } else {\n if (Support.touch) {\n const passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;\n el.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);\n el.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture } : capture);\n el.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);\n if (touchEvents.cancel) {\n el.addEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n }\n if (!dummyEventAttached) {\n doc.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n }\n if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {\n el.addEventListener('mousedown', swiper.onTouchStart, false);\n doc.addEventListener('mousemove', swiper.onTouchMove, capture);\n doc.addEventListener('mouseup', swiper.onTouchEnd, false);\n }\n }\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el.addEventListener('click', swiper.onClick, true);\n }\n if (params.cssMode) {\n wrapperEl.addEventListener('scroll', swiper.onScroll);\n }\n\n // Resize handler\n if (params.updateOnWindowResize) {\n swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);\n } else {\n swiper.on('observerUpdate', onResize, true);\n }\n}\n\nfunction detachEvents() {\n const swiper = this;\n\n const {\n params, touchEvents, el, wrapperEl,\n } = swiper;\n\n const capture = !!params.nested;\n\n // Touch Events\n if (!Support.touch && Support.pointerEvents) {\n el.removeEventListener(touchEvents.start, swiper.onTouchStart, false);\n doc.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);\n doc.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);\n } else {\n if (Support.touch) {\n const passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;\n el.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);\n el.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);\n el.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);\n if (touchEvents.cancel) {\n el.removeEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n }\n }\n if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {\n el.removeEventListener('mousedown', swiper.onTouchStart, false);\n doc.removeEventListener('mousemove', swiper.onTouchMove, capture);\n doc.removeEventListener('mouseup', swiper.onTouchEnd, false);\n }\n }\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el.removeEventListener('click', swiper.onClick, true);\n }\n\n if (params.cssMode) {\n wrapperEl.removeEventListener('scroll', swiper.onScroll);\n }\n\n // Resize handler\n swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);\n}\n\nvar events = {\n attachEvents,\n detachEvents,\n};\n\nfunction setBreakpoint () {\n const swiper = this;\n const {\n activeIndex, initialized, loopedSlides = 0, params, $el,\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return;\n\n // Get breakpoint for window width and update parameters\n const breakpoint = swiper.getBreakpoint(breakpoints);\n\n if (breakpoint && swiper.currentBreakpoint !== breakpoint) {\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n if (breakpointOnlyParams) {\n ['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerGroupSkip', 'slidesPerColumn'].forEach((param) => {\n const paramValue = breakpointOnlyParams[param];\n if (typeof paramValue === 'undefined') return;\n if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {\n breakpointOnlyParams[param] = 'auto';\n } else if (param === 'slidesPerView') {\n breakpointOnlyParams[param] = parseFloat(paramValue);\n } else {\n breakpointOnlyParams[param] = parseInt(paramValue, 10);\n }\n });\n }\n\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = params.slidesPerColumn > 1;\n const isMultiRow = breakpointParams.slidesPerColumn > 1;\n if (wasMultiRow && !isMultiRow) {\n $el.removeClass(`${params.containerModifierClass}multirow ${params.containerModifierClass}multirow-column`);\n } else if (!wasMultiRow && isMultiRow) {\n $el.addClass(`${params.containerModifierClass}multirow`);\n if (breakpointParams.slidesPerColumnFill === 'column') {\n $el.addClass(`${params.containerModifierClass}multirow-column`);\n }\n }\n\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n\n Utils.extend(swiper.params, breakpointParams);\n\n Utils.extend(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n });\n\n swiper.currentBreakpoint = breakpoint;\n\n if (needsReLoop && initialized) {\n swiper.loopDestroy();\n swiper.loopCreate();\n swiper.updateSlides();\n swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);\n }\n\n swiper.emit('breakpoint', breakpointParams);\n }\n}\n\nfunction getBreakpoint (breakpoints) {\n // Get breakpoint for window width\n if (!breakpoints) return undefined;\n let breakpoint = false;\n\n const points = Object.keys(breakpoints).map((point) => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = win.innerHeight * minRatio;\n return { value, point };\n }\n return { value: point, point };\n });\n\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n for (let i = 0; i < points.length; i += 1) {\n const { point, value } = points[i];\n if (value <= win.innerWidth) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n}\n\nvar breakpoints = { setBreakpoint, getBreakpoint };\n\nfunction addClasses () {\n const swiper = this;\n const {\n classNames, params, rtl, $el,\n } = swiper;\n const suffixes = [];\n\n suffixes.push('initialized');\n suffixes.push(params.direction);\n\n if (params.freeMode) {\n suffixes.push('free-mode');\n }\n if (params.autoHeight) {\n suffixes.push('autoheight');\n }\n if (rtl) {\n suffixes.push('rtl');\n }\n if (params.slidesPerColumn > 1) {\n suffixes.push('multirow');\n if (params.slidesPerColumnFill === 'column') {\n suffixes.push('multirow-column');\n }\n }\n if (Device.android) {\n suffixes.push('android');\n }\n if (Device.ios) {\n suffixes.push('ios');\n }\n\n if (params.cssMode) {\n suffixes.push('css-mode');\n }\n\n suffixes.forEach((suffix) => {\n classNames.push(params.containerModifierClass + suffix);\n });\n\n $el.addClass(classNames.join(' '));\n}\n\nfunction removeClasses () {\n const swiper = this;\n const { $el, classNames } = swiper;\n\n $el.removeClass(classNames.join(' '));\n}\n\nvar classes = { addClasses, removeClasses };\n\nfunction loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {\n let image;\n function onReady() {\n if (callback) callback();\n }\n const isPicture = $(imageEl).parent('picture')[0];\n\n if (!isPicture && (!imageEl.complete || !checkForComplete)) {\n if (src) {\n image = new win.Image();\n image.onload = onReady;\n image.onerror = onReady;\n if (sizes) {\n image.sizes = sizes;\n }\n if (srcset) {\n image.srcset = srcset;\n }\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n } else {\n // image already loaded...\n onReady();\n }\n}\n\nfunction preloadImages () {\n const swiper = this;\n swiper.imagesToLoad = swiper.$el.find('img');\n function onReady() {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;\n if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;\n if (swiper.imagesLoaded === swiper.imagesToLoad.length) {\n if (swiper.params.updateOnImagesReady) swiper.update();\n swiper.emit('imagesReady');\n }\n }\n for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {\n const imageEl = swiper.imagesToLoad[i];\n swiper.loadImage(\n imageEl,\n imageEl.currentSrc || imageEl.getAttribute('src'),\n imageEl.srcset || imageEl.getAttribute('srcset'),\n imageEl.sizes || imageEl.getAttribute('sizes'),\n true,\n onReady\n );\n }\n}\n\nvar images = {\n loadImage,\n preloadImages,\n};\n\nfunction checkOverflow() {\n const swiper = this;\n const params = swiper.params;\n const wasLocked = swiper.isLocked;\n const lastSlidePosition = swiper.slides.length > 0 && (params.slidesOffsetBefore + (params.spaceBetween * (swiper.slides.length - 1)) + ((swiper.slides[0]).offsetWidth) * swiper.slides.length);\n\n if (params.slidesOffsetBefore && params.slidesOffsetAfter && lastSlidePosition) {\n swiper.isLocked = lastSlidePosition <= swiper.size;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n\n swiper.allowSlideNext = !swiper.isLocked;\n swiper.allowSlidePrev = !swiper.isLocked;\n\n // events\n if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n swiper.navigation.update();\n }\n}\n\nvar checkOverflow$1 = { checkOverflow };\n\nvar defaults = {\n init: true,\n direction: 'horizontal',\n touchEventsTarget: 'container',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n //\n preventInteractionOnTransition: false,\n\n // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n\n // Free mode\n freeMode: false,\n freeModeMomentum: true,\n freeModeMomentumRatio: 1,\n freeModeMomentumBounce: true,\n freeModeMomentumBounceRatio: 1,\n freeModeMomentumVelocityRatio: 1,\n freeModeSticky: false,\n freeModeMinimumVelocity: 0.02,\n\n // Autoheight\n autoHeight: false,\n\n // Set wrapper width\n setWrapperSize: false,\n\n // Virtual Translate\n virtualTranslate: false,\n\n // Effects\n effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n // Breakpoints\n breakpoints: undefined,\n\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerColumn: 1,\n slidesPerColumnFill: 'column',\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0, // in px\n slidesOffsetAfter: 0, // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: false,\n\n // Round length\n roundLengths: false,\n\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 0,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n\n // Unique Navigation Elements\n uniqueNavElements: true,\n\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n\n // Progress\n watchSlidesProgress: false,\n watchSlidesVisibility: false,\n\n // Cursor\n grabCursor: false,\n\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n loopFillGroupWithBlank: false,\n\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null, // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n\n // Passive Listeners\n passiveListeners: true,\n\n // NS\n containerModifierClass: 'swiper-container-', // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-invisible-blank',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n\n // Callbacks\n runCallbacksOnInit: true,\n};\n\n/* eslint no-param-reassign: \"off\" */\n\nconst prototypes = {\n update,\n translate,\n transition: transition$1,\n slide,\n loop,\n grabCursor,\n manipulation,\n events,\n breakpoints,\n checkOverflow: checkOverflow$1,\n classes,\n images,\n};\n\nconst extendedDefaults = {};\n\nclass Swiper extends SwiperClass {\n constructor(...args) {\n let el;\n let params;\n if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {\n params = args[0];\n } else {\n [el, params] = args;\n }\n if (!params) params = {};\n\n params = Utils.extend({}, params);\n if (el && !params.el) params.el = el;\n\n super(params);\n\n Object.keys(prototypes).forEach((prototypeGroup) => {\n Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {\n if (!Swiper.prototype[protoMethod]) {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n }\n });\n });\n\n // Swiper Instance\n const swiper = this;\n if (typeof swiper.modules === 'undefined') {\n swiper.modules = {};\n }\n Object.keys(swiper.modules).forEach((moduleName) => {\n const module = swiper.modules[moduleName];\n if (module.params) {\n const moduleParamName = Object.keys(module.params)[0];\n const moduleParams = module.params[moduleParamName];\n if (typeof moduleParams !== 'object' || moduleParams === null) return;\n if (!(moduleParamName in params && 'enabled' in moduleParams)) return;\n if (params[moduleParamName] === true) {\n params[moduleParamName] = { enabled: true };\n }\n if (\n typeof params[moduleParamName] === 'object'\n && !('enabled' in params[moduleParamName])\n ) {\n params[moduleParamName].enabled = true;\n }\n if (!params[moduleParamName]) params[moduleParamName] = { enabled: false };\n }\n });\n\n // Extend defaults with modules params\n const swiperParams = Utils.extend({}, defaults);\n swiper.useModulesParams(swiperParams);\n\n // Extend defaults with passed params\n swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = Utils.extend({}, swiper.params);\n swiper.passedParams = Utils.extend({}, params);\n\n // Save Dom lib\n swiper.$ = $;\n\n // Find el\n const $el = $(swiper.params.el);\n el = $el[0];\n\n if (!el) {\n return undefined;\n }\n\n if ($el.length > 1) {\n const swipers = [];\n $el.each((index, containerEl) => {\n const newParams = Utils.extend({}, params, { el: containerEl });\n swipers.push(new Swiper(newParams));\n });\n return swipers;\n }\n\n el.swiper = swiper;\n $el.data('swiper', swiper);\n\n // Find Wrapper\n let $wrapperEl;\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n $wrapperEl = $(el.shadowRoot.querySelector(`.${swiper.params.wrapperClass}`));\n // Children needs to return slot items\n $wrapperEl.children = (options) => $el.children(options);\n } else {\n $wrapperEl = $el.children(`.${swiper.params.wrapperClass}`);\n }\n // Extend Swiper\n Utils.extend(swiper, {\n $el,\n el,\n $wrapperEl,\n wrapperEl: $wrapperEl[0],\n\n // Classes\n classNames: [],\n\n // Slides\n slides: $(),\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n // RTL\n rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n wrongRTL: $wrapperEl.css('display') === '-webkit-box',\n\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n\n //\n isBeginning: true,\n isEnd: false,\n\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n\n // Touch Events\n touchEvents: (function touchEvents() {\n const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n let desktop = ['mousedown', 'mousemove', 'mouseup'];\n if (Support.pointerEvents) {\n desktop = ['pointerdown', 'pointermove', 'pointerup'];\n }\n swiper.touchEventsTouch = {\n start: touch[0],\n move: touch[1],\n end: touch[2],\n cancel: touch[3],\n };\n swiper.touchEventsDesktop = {\n start: desktop[0],\n move: desktop[1],\n end: desktop[2],\n };\n return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;\n }()),\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n formElements: 'input, select, option, textarea, button, video, label',\n // Last click time\n lastClickTime: Utils.now(),\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n isTouchEvent: undefined,\n startMoving: undefined,\n },\n\n // Clicks\n allowClick: true,\n\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0,\n },\n\n // Images\n imagesToLoad: [],\n imagesLoaded: 0,\n\n });\n\n // Install Modules\n swiper.useModules();\n\n // Init\n if (swiper.params.init) {\n swiper.init();\n }\n\n // Return app instance\n return swiper;\n }\n\n slidesPerViewDynamic() {\n const swiper = this;\n const {\n params, slides, slidesGrid, size: swiperSize, activeIndex,\n } = swiper;\n let spv = 1;\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex].swiperSlideSize;\n let breakLoop;\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slidesGrid[i] - slidesGrid[activeIndex] < swiperSize) {\n spv += 1;\n }\n }\n }\n return spv;\n }\n\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const { snapGrid, params } = swiper;\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n let translated;\n if (swiper.params.freeMode) {\n setTranslate();\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {\n translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n if (!translated) {\n setTranslate();\n }\n }\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n swiper.emit('update');\n }\n\n changeDirection(newDirection, needUpdate = true) {\n const swiper = this;\n const currentDirection = swiper.params.direction;\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n if ((newDirection === currentDirection) || (newDirection !== 'horizontal' && newDirection !== 'vertical')) {\n return swiper;\n }\n\n swiper.$el\n .removeClass(`${swiper.params.containerModifierClass}${currentDirection}`)\n .addClass(`${swiper.params.containerModifierClass}${newDirection}`);\n\n swiper.params.direction = newDirection;\n\n swiper.slides.each((slideIndex, slideEl) => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n\n return swiper;\n }\n\n init() {\n const swiper = this;\n if (swiper.initialized) return;\n\n swiper.emit('beforeInit');\n\n // Set breakpoint\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Add Classes\n swiper.addClasses();\n\n // Create loop\n if (swiper.params.loop) {\n swiper.loopCreate();\n }\n\n // Update size\n swiper.updateSize();\n\n // Update slides\n swiper.updateSlides();\n\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n }\n\n // Set Grab Cursor\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n\n if (swiper.params.preloadImages) {\n swiper.preloadImages();\n }\n\n // Slide To Initial Slide\n if (swiper.params.loop) {\n swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);\n }\n\n // Attach events\n swiper.attachEvents();\n\n // Init Flag\n swiper.initialized = true;\n\n // Emit\n swiper.emit('init');\n }\n\n destroy(deleteInstance = true, cleanStyles = true) {\n const swiper = this;\n const {\n params, $el, $wrapperEl, slides,\n } = swiper;\n\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n\n swiper.emit('beforeDestroy');\n\n // Init Flag\n swiper.initialized = false;\n\n // Detach events\n swiper.detachEvents();\n\n // Destroy loop\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n // Cleanup styles\n if (cleanStyles) {\n swiper.removeClasses();\n $el.removeAttr('style');\n $wrapperEl.removeAttr('style');\n if (slides && slides.length) {\n slides\n .removeClass([\n params.slideVisibleClass,\n params.slideActiveClass,\n params.slideNextClass,\n params.slidePrevClass,\n ].join(' '))\n .removeAttr('style')\n .removeAttr('data-swiper-slide-index');\n }\n }\n\n swiper.emit('destroy');\n\n // Detach emitter events\n Object.keys(swiper.eventsListeners).forEach((eventName) => {\n swiper.off(eventName);\n });\n\n if (deleteInstance !== false) {\n swiper.$el[0].swiper = null;\n swiper.$el.data('swiper', null);\n Utils.deleteProps(swiper);\n }\n swiper.destroyed = true;\n\n return null;\n }\n\n static extendDefaults(newDefaults) {\n Utils.extend(extendedDefaults, newDefaults);\n }\n\n static get extendedDefaults() {\n return extendedDefaults;\n }\n\n static get defaults() {\n return defaults;\n }\n\n static get Class() {\n return SwiperClass;\n }\n\n static get $() {\n return $;\n }\n}\n\nvar Device$1 = {\n name: 'device',\n proto: {\n device: Device,\n },\n static: {\n device: Device,\n },\n};\n\nvar Support$1 = {\n name: 'support',\n proto: {\n support: Support,\n },\n static: {\n support: Support,\n },\n};\n\nconst Browser = (function Browser() {\n function isSafari() {\n const ua = win.navigator.userAgent.toLowerCase();\n return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);\n }\n return {\n isEdge: !!win.navigator.userAgent.match(/Edge/g),\n isSafari: isSafari(),\n isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(win.navigator.userAgent),\n };\n}());\n\nvar Browser$1 = {\n name: 'browser',\n proto: {\n browser: Browser,\n },\n static: {\n browser: Browser,\n },\n};\n\nvar Resize = {\n name: 'resize',\n create() {\n const swiper = this;\n Utils.extend(swiper, {\n resize: {\n resizeHandler() {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n swiper.emit('beforeResize');\n swiper.emit('resize');\n },\n orientationChangeHandler() {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n swiper.emit('orientationchange');\n },\n },\n });\n },\n on: {\n init() {\n const swiper = this;\n // Emit resize\n win.addEventListener('resize', swiper.resize.resizeHandler);\n\n // Emit orientationchange\n win.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);\n },\n destroy() {\n const swiper = this;\n win.removeEventListener('resize', swiper.resize.resizeHandler);\n win.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);\n },\n },\n};\n\nconst Observer = {\n func: win.MutationObserver || win.WebkitMutationObserver,\n attach(target, options = {}) {\n const swiper = this;\n\n const ObserverFunc = Observer.func;\n const observer = new ObserverFunc((mutations) => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (mutations.length === 1) {\n swiper.emit('observerUpdate', mutations[0]);\n return;\n }\n const observerUpdate = function observerUpdate() {\n swiper.emit('observerUpdate', mutations[0]);\n };\n\n if (win.requestAnimationFrame) {\n win.requestAnimationFrame(observerUpdate);\n } else {\n win.setTimeout(observerUpdate, 0);\n }\n });\n\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData,\n });\n\n swiper.observer.observers.push(observer);\n },\n init() {\n const swiper = this;\n if (!Support.observer || !swiper.params.observer) return;\n if (swiper.params.observeParents) {\n const containerParents = swiper.$el.parents();\n for (let i = 0; i < containerParents.length; i += 1) {\n swiper.observer.attach(containerParents[i]);\n }\n }\n // Observe container\n swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren });\n\n // Observe wrapper\n swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });\n },\n destroy() {\n const swiper = this;\n swiper.observer.observers.forEach((observer) => {\n observer.disconnect();\n });\n swiper.observer.observers = [];\n },\n};\n\nvar Observer$1 = {\n name: 'observer',\n params: {\n observer: false,\n observeParents: false,\n observeSlideChildren: false,\n },\n create() {\n const swiper = this;\n Utils.extend(swiper, {\n observer: {\n init: Observer.init.bind(swiper),\n attach: Observer.attach.bind(swiper),\n destroy: Observer.destroy.bind(swiper),\n observers: [],\n },\n });\n },\n on: {\n init() {\n const swiper = this;\n swiper.observer.init();\n },\n destroy() {\n const swiper = this;\n swiper.observer.destroy();\n },\n },\n};\n\nconst Keyboard = {\n handle(event) {\n const swiper = this;\n const { rtlTranslate: rtl } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n const kc = e.keyCode || e.charCode;\n // Directions locks\n if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40) || kc === 34)) {\n return false;\n }\n if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38) || kc === 33)) {\n return false;\n }\n if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n return undefined;\n }\n if (doc.activeElement && doc.activeElement.nodeName && (doc.activeElement.nodeName.toLowerCase() === 'input' || doc.activeElement.nodeName.toLowerCase() === 'textarea')) {\n return undefined;\n }\n if (swiper.params.keyboard.onlyInViewport && (kc === 33 || kc === 34 || kc === 37 || kc === 39 || kc === 38 || kc === 40)) {\n let inView = false;\n // Check that swiper should be inside of visible area of window\n if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {\n return undefined;\n }\n const windowWidth = win.innerWidth;\n const windowHeight = win.innerHeight;\n const swiperOffset = swiper.$el.offset();\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [\n [swiperOffset.left, swiperOffset.top],\n [swiperOffset.left + swiper.width, swiperOffset.top],\n [swiperOffset.left, swiperOffset.top + swiper.height],\n [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height],\n ];\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n if (\n point[0] >= 0 && point[0] <= windowWidth\n && point[1] >= 0 && point[1] <= windowHeight\n ) {\n inView = true;\n }\n }\n if (!inView) return undefined;\n }\n if (swiper.isHorizontal()) {\n if (kc === 33 || kc === 34 || kc === 37 || kc === 39) {\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n }\n if (((kc === 34 || kc === 39) && !rtl) || ((kc === 33 || kc === 37) && rtl)) swiper.slideNext();\n if (((kc === 33 || kc === 37) && !rtl) || ((kc === 34 || kc === 39) && rtl)) swiper.slidePrev();\n } else {\n if (kc === 33 || kc === 34 || kc === 38 || kc === 40) {\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n }\n if (kc === 34 || kc === 40) swiper.slideNext();\n if (kc === 33 || kc === 38) swiper.slidePrev();\n }\n swiper.emit('keyPress', kc);\n return undefined;\n },\n enable() {\n const swiper = this;\n if (swiper.keyboard.enabled) return;\n $(doc).on('keydown', swiper.keyboard.handle);\n swiper.keyboard.enabled = true;\n },\n disable() {\n const swiper = this;\n if (!swiper.keyboard.enabled) return;\n $(doc).off('keydown', swiper.keyboard.handle);\n swiper.keyboard.enabled = false;\n },\n};\n\nvar keyboard = {\n name: 'keyboard',\n params: {\n keyboard: {\n enabled: false,\n onlyInViewport: true,\n },\n },\n create() {\n const swiper = this;\n Utils.extend(swiper, {\n keyboard: {\n enabled: false,\n enable: Keyboard.enable.bind(swiper),\n disable: Keyboard.disable.bind(swiper),\n handle: Keyboard.handle.bind(swiper),\n },\n });\n },\n on: {\n init() {\n const swiper = this;\n if (swiper.params.keyboard.enabled) {\n swiper.keyboard.enable();\n }\n },\n destroy() {\n const swiper = this;\n if (swiper.keyboard.enabled) {\n swiper.keyboard.disable();\n }\n },\n },\n};\n\nfunction isEventSupported() {\n const eventName = 'onwheel';\n let isSupported = eventName in doc;\n\n if (!isSupported) {\n const element = doc.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported\n && doc.implementation\n && doc.implementation.hasFeature\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n && doc.implementation.hasFeature('', '') !== true\n ) {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = doc.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\nconst Mousewheel = {\n lastScrollTime: Utils.now(),\n lastEventBeforeSnap: undefined,\n recentWheelEvents: [],\n event() {\n if (win.navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll';\n return isEventSupported() ? 'wheel' : 'mousewheel';\n },\n normalize(e) {\n // Reasonable defaults\n const PIXEL_STEP = 10;\n const LINE_HEIGHT = 40;\n const PAGE_HEIGHT = 800;\n\n let sX = 0;\n let sY = 0; // spinX, spinY\n let pX = 0;\n let pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in e) {\n sY = e.detail;\n }\n if ('wheelDelta' in e) {\n sY = -e.wheelDelta / 120;\n }\n if ('wheelDeltaY' in e) {\n sY = -e.wheelDeltaY / 120;\n }\n if ('wheelDeltaX' in e) {\n sX = -e.wheelDeltaX / 120;\n }\n\n // side scrolling on FF with DOMMouseScroll\n if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in e) {\n pY = e.deltaY;\n }\n if ('deltaX' in e) {\n pX = e.deltaX;\n }\n\n if (e.shiftKey && !pX) { // if user scrolls with shift he wants horizontal scroll\n pX = pY;\n pY = 0;\n }\n\n if ((pX || pY) && e.deltaMode) {\n if (e.deltaMode === 1) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) {\n sX = (pX < 1) ? -1 : 1;\n }\n if (pY && !sY) {\n sY = (pY < 1) ? -1 : 1;\n }\n\n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY,\n };\n },\n handleMouseEnter() {\n const swiper = this;\n swiper.mouseEntered = true;\n },\n handleMouseLeave() {\n const swiper = this;\n swiper.mouseEntered = false;\n },\n handle(event) {\n let e = event;\n const swiper = this;\n const params = swiper.params.mousewheel;\n\n if (swiper.params.cssMode) {\n e.preventDefault();\n }\n\n let target = swiper.$el;\n if (swiper.params.mousewheel.eventsTarged !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarged);\n }\n if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true;\n\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n let delta = 0;\n const rtlFactor = swiper.rtlTranslate ? -1 : 1;\n\n const data = Mousewheel.normalize(e);\n\n if (params.forceToAxis) {\n if (swiper.isHorizontal()) {\n if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = data.pixelX * rtlFactor;\n else return true;\n } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = data.pixelY;\n else return true;\n } else {\n delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;\n }\n\n if (delta === 0) return true;\n\n if (params.invert) delta = -delta;\n\n if (!swiper.params.freeMode) {\n // Register the new event in a variable which stores the relevant data\n const newEvent = {\n time: Utils.now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta),\n raw: event,\n };\n\n // Keep the most recent events\n const recentWheelEvents = swiper.mousewheel.recentWheelEvents;\n if (recentWheelEvents.length >= 2) {\n recentWheelEvents.shift(); // only store the last N events\n }\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n recentWheelEvents.push(newEvent);\n\n // If there is at least one previous recorded event:\n // If direction has changed or\n // if the scroll is quicker than the previous one:\n // Animate the slider.\n // Else (this is the first time the wheel is moved):\n // Animate the slider.\n if (prevEvent) {\n if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {\n swiper.mousewheel.animateSlider(newEvent);\n }\n } else {\n swiper.mousewheel.animateSlider(newEvent);\n }\n\n // If it's time to release the scroll:\n // Return now so you don't hit the preventDefault.\n if (swiper.mousewheel.releaseScroll(newEvent)) {\n return true;\n }\n } else {\n // Freemode or scrollContainer:\n\n // If we recently snapped after a momentum scroll, then ignore wheel events\n // to give time for the deceleration to finish. Stop ignoring after 500 msecs\n // or if it's a new scroll (larger delta or inverse sign as last event before\n // an end-of-momentum snap).\n const newEvent = { time: Utils.now(), delta: Math.abs(delta), direction: Math.sign(delta) };\n const { lastEventBeforeSnap } = swiper.mousewheel;\n const ignoreWheelEvents = lastEventBeforeSnap\n && newEvent.time < lastEventBeforeSnap.time + 500\n && newEvent.delta <= lastEventBeforeSnap.delta\n && newEvent.direction === lastEventBeforeSnap.direction;\n if (!ignoreWheelEvents) {\n swiper.mousewheel.lastEventBeforeSnap = undefined;\n\n if (swiper.params.loop) {\n swiper.loopFix();\n }\n let position = swiper.getTranslate() + (delta * params.sensitivity);\n const wasBeginning = swiper.isBeginning;\n const wasEnd = swiper.isEnd;\n\n if (position >= swiper.minTranslate()) position = swiper.minTranslate();\n if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();\n\n swiper.setTransition(0);\n swiper.setTranslate(position);\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n\n if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeModeSticky) {\n // When wheel scrolling starts with sticky (aka snap) enabled, then detect\n // the end of a momentum scroll by storing recent (N=15?) wheel events.\n // 1. do all N events have decreasing or same (absolute value) delta?\n // 2. did all N events arrive in the last M (M=500?) msecs?\n // 3. does the earliest event have an (absolute value) delta that's\n // at least P (P=1?) larger than the most recent event's delta?\n // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?\n // If 1-4 are \"yes\" then we're near the end of a momuntum scroll deceleration.\n // Snap immediately and ignore remaining wheel events in this scroll.\n // See comment above for \"remaining wheel events in this scroll\" determination.\n // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.\n clearTimeout(swiper.mousewheel.timeout);\n swiper.mousewheel.timeout = undefined;\n const recentWheelEvents = swiper.mousewheel.recentWheelEvents;\n if (recentWheelEvents.length >= 15) {\n recentWheelEvents.shift(); // only store the last N events\n }\n const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;\n const firstEvent = recentWheelEvents[0];\n recentWheelEvents.push(newEvent);\n if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) {\n // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.\n recentWheelEvents.splice(0);\n } else if (recentWheelEvents.length >= 15\n && newEvent.time - firstEvent.time < 500\n && firstEvent.delta - newEvent.delta >= 1\n && newEvent.delta <= 6\n ) {\n // We're at the end of the deceleration of a momentum scroll, so there's no need\n // to wait for more events. Snap ASAP on the next tick.\n // Also, because there's some remaining momentum we'll bias the snap in the\n // direction of the ongoing scroll because it's better UX for the scroll to snap\n // in the same direction as the scroll instead of reversing to snap. Therefore,\n // if it's already scrolled more than 20% in the current direction, keep going.\n const snapToThreshold = delta > 0 ? 0.8 : 0.2;\n swiper.mousewheel.lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n swiper.mousewheel.timeout = Utils.nextTick(() => {\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 0); // no delay; move on next tick\n }\n if (!swiper.mousewheel.timeout) {\n // if we get here, then we haven't detected the end of a momentum scroll, so\n // we'll consider a scroll \"complete\" when there haven't been any wheel events\n // for 500ms.\n swiper.mousewheel.timeout = Utils.nextTick(() => {\n const snapToThreshold = 0.5;\n swiper.mousewheel.lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 500);\n }\n }\n\n // Emit event\n if (!ignoreWheelEvents) swiper.emit('scroll', e);\n\n // Stop autoplay\n if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();\n // Return page scroll on edge positions\n if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;\n }\n }\n\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n return false;\n },\n animateSlider(newEvent) {\n const swiper = this;\n // If the movement is NOT big enough and\n // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):\n // Don't go any further (avoid insignificant scroll movement).\n if (newEvent.delta >= 6 && Utils.now() - swiper.mousewheel.lastScrollTime < 60) {\n // Return false as a default\n return true;\n }\n // If user is scrolling towards the end:\n // If the slider hasn't hit the latest slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to next slide and\n // emit a scroll event.\n // Else (the user is scrolling towards the beginning) and\n // if the slider hasn't hit the first slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to prev slide and\n // emit a scroll event.\n if (newEvent.direction < 0) {\n if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {\n swiper.slideNext();\n swiper.emit('scroll', newEvent.raw);\n }\n } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {\n swiper.slidePrev();\n swiper.emit('scroll', newEvent.raw);\n }\n // If you got here is because an animation has been triggered so store the current time\n swiper.mousewheel.lastScrollTime = (new win.Date()).getTime();\n // Return false as a default\n return false;\n },\n releaseScroll(newEvent) {\n const swiper = this;\n const params = swiper.params.mousewheel;\n if (newEvent.direction < 0) {\n if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n return false;\n },\n enable() {\n const swiper = this;\n const event = Mousewheel.event();\n if (swiper.params.cssMode) {\n swiper.wrapperEl.removeEventListener(event, swiper.mousewheel.handle);\n return true;\n }\n if (!event) return false;\n if (swiper.mousewheel.enabled) return false;\n let target = swiper.$el;\n if (swiper.params.mousewheel.eventsTarged !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarged);\n }\n target.on('mouseenter', swiper.mousewheel.handleMouseEnter);\n target.on('mouseleave', swiper.mousewheel.handleMouseLeave);\n target.on(event, swiper.mousewheel.handle);\n swiper.mousewheel.enabled = true;\n return true;\n },\n disable() {\n const swiper = this;\n const event = Mousewheel.event();\n if (swiper.params.cssMode) {\n swiper.wrapperEl.addEventListener(event, swiper.mousewheel.handle);\n return true;\n }\n if (!event) return false;\n if (!swiper.mousewheel.enabled) return false;\n let target = swiper.$el;\n if (swiper.params.mousewheel.eventsTarged !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarged);\n }\n target.off(event, swiper.mousewheel.handle);\n swiper.mousewheel.enabled = false;\n return true;\n },\n};\n\nconst Pagination = {\n update() {\n // Render || Update Pagination bullets/items\n const swiper = this;\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const $el = swiper.pagination.$el;\n // Current/Total\n let current;\n const total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.loop) {\n current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);\n if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {\n current -= (slidesLength - (swiper.loopedSlides * 2));\n }\n if (current > total - 1) current -= total;\n if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n } else {\n current = swiper.activeIndex || 0;\n }\n // Types\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n if (params.dynamicBullets) {\n swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);\n $el.css(swiper.isHorizontal() ? 'width' : 'height', `${swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)}px`);\n if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {\n swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);\n if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {\n swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (swiper.pagination.dynamicBulletIndex < 0) {\n swiper.pagination.dynamicBulletIndex = 0;\n }\n }\n firstIndex = current - swiper.pagination.dynamicBulletIndex;\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n bullets.removeClass(`${params.bulletActiveClass} ${params.bulletActiveClass}-next ${params.bulletActiveClass}-next-next ${params.bulletActiveClass}-prev ${params.bulletActiveClass}-prev-prev ${params.bulletActiveClass}-main`);\n if ($el.length > 1) {\n bullets.each((index, bullet) => {\n const $bullet = $(bullet);\n const bulletIndex = $bullet.index();\n if (bulletIndex === current) {\n $bullet.addClass(params.bulletActiveClass);\n }\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n $bullet.addClass(`${params.bulletActiveClass}-main`);\n }\n if (bulletIndex === firstIndex) {\n $bullet\n .prev()\n .addClass(`${params.bulletActiveClass}-prev`)\n .prev()\n .addClass(`${params.bulletActiveClass}-prev-prev`);\n }\n if (bulletIndex === lastIndex) {\n $bullet\n .next()\n .addClass(`${params.bulletActiveClass}-next`)\n .next()\n .addClass(`${params.bulletActiveClass}-next-next`);\n }\n }\n });\n } else {\n const $bullet = bullets.eq(current);\n const bulletIndex = $bullet.index();\n $bullet.addClass(params.bulletActiveClass);\n if (params.dynamicBullets) {\n const $firstDisplayedBullet = bullets.eq(firstIndex);\n const $lastDisplayedBullet = bullets.eq(lastIndex);\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);\n }\n if (swiper.params.loop) {\n if (bulletIndex >= bullets.length - params.dynamicMainBullets) {\n for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {\n bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);\n }\n bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`);\n } else {\n $firstDisplayedBullet\n .prev()\n .addClass(`${params.bulletActiveClass}-prev`)\n .prev()\n .addClass(`${params.bulletActiveClass}-prev-prev`);\n $lastDisplayedBullet\n .next()\n .addClass(`${params.bulletActiveClass}-next`)\n .next()\n .addClass(`${params.bulletActiveClass}-next-next`);\n }\n } else {\n $firstDisplayedBullet\n .prev()\n .addClass(`${params.bulletActiveClass}-prev`)\n .prev()\n .addClass(`${params.bulletActiveClass}-prev-prev`);\n $lastDisplayedBullet\n .next()\n .addClass(`${params.bulletActiveClass}-next`)\n .next()\n .addClass(`${params.bulletActiveClass}-next-next`);\n }\n }\n }\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);\n const offsetProp = rtl ? 'right' : 'left';\n bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);\n }\n }\n if (params.type === 'fraction') {\n $el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1));\n $el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total));\n }\n if (params.type === 'progressbar') {\n let progressbarDirection;\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n $el.find(`.${params.progressbarFillClass}`).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);\n }\n if (params.type === 'custom' && params.renderCustom) {\n $el.html(params.renderCustom(swiper, current + 1, total));\n swiper.emit('paginationRender', swiper, $el[0]);\n } else {\n swiper.emit('paginationUpdate', swiper, $el[0]);\n }\n $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n },\n render() {\n // Render Container\n const swiper = this;\n const params = swiper.params.pagination;\n if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n\n const $el = swiper.pagination.$el;\n let paginationHTML = '';\n if (params.type === 'bullets') {\n const numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n paginationHTML += `<${params.bulletElement} class=\"${params.bulletClass}\"></${params.bulletElement}>`;\n }\n }\n $el.html(paginationHTML);\n swiper.pagination.bullets = $el.find(`.${params.bulletClass}`);\n }\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `<span class=\"${params.currentClass}\"></span>`\n + ' / '\n + `<span class=\"${params.totalClass}\"></span>`;\n }\n $el.html(paginationHTML);\n }\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = `<span class=\"${params.progressbarFillClass}\"></span>`;\n }\n $el.html(paginationHTML);\n }\n if (params.type !== 'custom') {\n swiper.emit('paginationRender', swiper.pagination.$el[0]);\n }\n },\n init() {\n const swiper = this;\n const params = swiper.params.pagination;\n if (!params.el) return;\n\n let $el = $(params.el);\n if ($el.length === 0) return;\n\n if (\n swiper.params.uniqueNavElements\n && typeof params.el === 'string'\n && $el.length > 1\n && swiper.$el.find(params.el).length === 1\n ) {\n $el = swiper.$el.find(params.el);\n }\n\n if (params.type === 'bullets' && params.clickable) {\n $el.addClass(params.clickableClass);\n }\n\n $el.addClass(params.modifierClass + params.type);\n\n if (params.type === 'bullets' && params.dynamicBullets) {\n $el.addClass(`${params.modifierClass}${params.type}-dynamic`);\n swiper.pagination.dynamicBulletIndex = 0;\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n $el.addClass(params.progressbarOppositeClass);\n }\n\n if (params.clickable) {\n $el.on('click', `.${params.bulletClass}`, function onClick(e) {\n e.preventDefault();\n let index = $(this).index() * swiper.params.slidesPerGroup;\n if (swiper.params.loop) index += swiper.loopedSlides;\n swiper.slideTo(index);\n });\n }\n\n Utils.extend(swiper.pagination, {\n $el,\n el: $el[0],\n });\n },\n destroy() {\n const swiper = this;\n const params = swiper.params.pagination;\n if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;\n const $el = swiper.pagination.$el;\n\n $el.removeClass(params.hiddenClass);\n $el.removeClass(params.modifierClass + params.type);\n if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);\n if (params.clickable) {\n $el.off('click', `.${params.bulletClass}`);\n }\n },\n};\n\nvar pagination = {\n name: 'pagination',\n params: {\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: (number) => number,\n formatFractionTotal: (number) => number,\n bulletClass: 'swiper-pagination-bullet',\n bulletActiveClass: 'swiper-pagination-bullet-active',\n modifierClass: 'swiper-pagination-', // NEW\n currentClass: 'swiper-pagination-current',\n totalClass: 'swiper-pagination-total',\n hiddenClass: 'swiper-pagination-hidden',\n progressbarFillClass: 'swiper-pagination-progressbar-fill',\n progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',\n clickableClass: 'swiper-pagination-clickable', // NEW\n lockClass: 'swiper-pagination-lock',\n },\n },\n create() {\n const swiper = this;\n Utils.extend(swiper, {\n pagination: {\n init: Pagination.init.bind(swiper),\n render: Pagination.render.bind(swiper),\n update: Pagination.update.bind(swiper),\n destroy: Pagination.destroy.bind(swiper),\n dynamicBulletIndex: 0,\n },\n });\n },\n on: {\n init() {\n const swiper = this;\n swiper.pagination.init();\n swiper.pagination.render();\n swiper.pagination.update();\n },\n activeIndexChange() {\n const swiper = this;\n if (swiper.params.loop) {\n swiper.pagination.update();\n } else if (typeof swiper.snapIndex === 'undefined') {\n swiper.pagination.update();\n }\n },\n snapIndexChange() {\n const swiper = this;\n if (!swiper.params.loop) {\n swiper.pagination.update();\n }\n },\n slidesLengthChange() {\n const swiper = this;\n if (swiper.params.loop) {\n swiper.pagination.render();\n swiper.pagination.update();\n }\n },\n snapGridLengthChange() {\n const swiper = this;\n if (!swiper.params.loop) {\n swiper.pagination.render();\n swiper.pagination.update();\n }\n },\n destroy() {\n const swiper = this;\n swiper.pagination.destroy();\n },\n click(e) {\n const swiper = this;\n if (\n swiper.params.pagination.el\n && swiper.params.pagination.hideOnClick\n && swiper.pagination.$el.length > 0\n && !$(e.target).hasClass(swiper.params.pagination.bulletClass)\n ) {\n const isHidden = swiper.pagination.$el.hasClass(swiper.params.pagination.hiddenClass);\n if (isHidden === true) {\n swiper.emit('paginationShow', swiper);\n } else {\n swiper.emit('paginationHide', swiper);\n }\n swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);\n }\n },\n },\n};\n\nconst Scrollbar = {\n setTranslate() {\n const swiper = this;\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const { scrollbar, rtlTranslate: rtl, progress } = swiper;\n const {\n dragSize, trackSize, $dragEl, $el,\n } = scrollbar;\n const params = swiper.params.scrollbar;\n\n let newSize = dragSize;\n let newPos = (trackSize - dragSize) * progress;\n if (rtl) {\n newPos = -newPos;\n if (newPos > 0) {\n newSize = dragSize - newPos;\n newPos = 0;\n } else if (-newPos + dragSize > trackSize) {\n newSize = trackSize + newPos;\n }\n } else if (newPos < 0) {\n newSize = dragSize + newPos;\n newPos = 0;\n } else if (newPos + dragSize > trackSize) {\n newSize = trackSize - newPos;\n }\n if (swiper.isHorizontal()) {\n $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);\n $dragEl[0].style.width = `${newSize}px`;\n } else {\n $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);\n $dragEl[0].style.height = `${newSize}px`;\n }\n if (params.hide) {\n clearTimeout(swiper.scrollbar.timeout);\n $el[0].style.opacity = 1;\n swiper.scrollbar.timeout = setTimeout(() => {\n $el[0].style.opacity = 0;\n $el.transition(400);\n }, 1000);\n }\n },\n setTransition(duration) {\n const swiper = this;\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n swiper.scrollbar.$dragEl.transition(duration);\n },\n updateSize() {\n const swiper = this;\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n\n const { scrollbar } = swiper;\n const { $dragEl, $el } = scrollbar;\n\n $dragEl[0].style.width = '';\n $dragEl[0].style.height = '';\n const trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;\n\n const divider = swiper.size / swiper.virtualSize;\n const moveDivider = divider * (trackSize / swiper.size);\n let dragSize;\n if (swiper.params.scrollbar.dragSize === 'auto') {\n dragSize = trackSize * divider;\n } else {\n dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);\n }\n\n if (swiper.isHorizontal()) {\n $dragEl[0].style.width = `${dragSize}px`;\n } else {\n $dragEl[0].style.height = `${dragSize}px`;\n }\n\n if (divider >= 1) {\n $el[0].style.display = 'none';\n } else {\n $el[0].style.display = '';\n }\n if (swiper.params.scrollbar.hide) {\n $el[0].style.opacity = 0;\n }\n Utils.extend(scrollbar, {\n trackSize,\n divider,\n moveDivider,\n dragSize,\n });\n scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);\n },\n getPointerPosition(e) {\n const swiper = this;\n if (swiper.isHorizontal()) {\n return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientX : e.clientX);\n }\n return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientY : e.clientY);\n },\n setDragPosition(e) {\n const swiper = this;\n const { scrollbar, rtlTranslate: rtl } = swiper;\n const {\n $el,\n dragSize,\n trackSize,\n dragStartPos,\n } = scrollbar;\n\n let positionRatio;\n positionRatio = ((scrollbar.getPointerPosition(e)) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top']\n - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);\n positionRatio = Math.max(Math.min(positionRatio, 1), 0);\n if (rtl) {\n positionRatio = 1 - positionRatio;\n }\n\n const position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);\n\n swiper.updateProgress(position);\n swiper.setTranslate(position);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n },\n onDragStart(e) {\n const swiper = this;\n const params = swiper.params.scrollbar;\n const { scrollbar, $wrapperEl } = swiper;\n const { $el, $dragEl } = scrollbar;\n swiper.scrollbar.isTouched = true;\n swiper.scrollbar.dragStartPos = (e.target === $dragEl[0] || e.target === $dragEl)\n ? scrollbar.getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;\n e.preventDefault();\n e.stopPropagation();\n\n $wrapperEl.transition(100);\n $dragEl.transition(100);\n scrollbar.setDragPosition(e);\n\n clearTimeout(swiper.scrollbar.dragTimeout);\n\n $el.transition(0);\n if (params.hide) {\n $el.css('opacity', 1);\n }\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', 'none');\n }\n swiper.emit('scrollbarDragStart', e);\n },\n onDragMove(e) {\n const swiper = this;\n const { scrollbar, $wrapperEl } = swiper;\n const { $el, $dragEl } = scrollbar;\n\n if (!swiper.scrollbar.isTouched) return;\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n scrollbar.setDragPosition(e);\n $wrapperEl.transition(0);\n $el.transition(0);\n $dragEl.transition(0);\n swiper.emit('scrollbarDragMove', e);\n },\n onDragEnd(e) {\n const swiper = this;\n\n const params = swiper.params.scrollbar;\n const { scrollbar, $wrapperEl } = swiper;\n const { $el } = scrollbar;\n\n if (!swiper.scrollbar.isTouched) return;\n swiper.scrollbar.isTouched = false;\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', '');\n $wrapperEl.transition('');\n }\n if (params.hide) {\n clearTimeout(swiper.scrollbar.dragTimeout);\n swiper.scrollbar.dragTimeout = Utils.nextTick(() => {\n $el.css('opacity', 0);\n $el.transition(400);\n }, 1000);\n }\n swiper.emit('scrollbarDragEnd', e);\n if (params.snapOnRelease) {\n swiper.slideToClosest();\n }\n },\n enableDraggable() {\n const swiper = this;\n if (!swiper.params.scrollbar.el) return;\n const {\n scrollbar, touchEventsTouch, touchEventsDesktop, params,\n } = swiper;\n const $el = scrollbar.$el;\n const target = $el[0];\n const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;\n const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;\n if (!Support.touch) {\n target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);\n doc.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);\n doc.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);\n } else {\n target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);\n target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);\n target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);\n }\n },\n disableDraggable() {\n const swiper = this;\n if (!swiper.params.scrollbar.el) return;\n const {\n scrollbar, touchEventsTouch, touchEventsDesktop, params,\n } = swiper;\n const $el = scrollbar.$el;\n const target = $el[0];\n const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;\n const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;\n if (!Support.touch) {\n target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);\n doc.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);\n doc.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);\n } else {\n target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);\n target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);\n target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);\n }\n },\n init() {\n const swiper = this;\n if (!swiper.params.scrollbar.el) return;\n const { scrollbar, $el: $swiperEl } = swiper;\n const params = swiper.params.scrollbar;\n\n let $el = $(params.el);\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {\n $el = $swiperEl.find(params.el);\n }\n\n let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);\n if ($dragEl.length === 0) {\n $dragEl = $(`<div class=\"${swiper.params.scrollbar.dragClass}\"></div>`);\n $el.append($dragEl);\n }\n\n Utils.extend(scrollbar, {\n $el,\n el: $el[0],\n $dragEl,\n dragEl: $dragEl[0],\n });\n\n if (params.draggable) {\n scrollbar.enableDraggable();\n }\n },\n destroy() {\n const swiper = this;\n swiper.scrollbar.disableDraggable();\n },\n};\n\nvar scrollbar = {\n name: 'scrollbar',\n params: {\n scrollbar: {\n el: null,\n dragSize: 'auto',\n hide: false,\n draggable: false,\n snapOnRelease: true,\n lockClass: 'swiper-scrollbar-lock',\n dragClass: 'swiper-scrollbar-drag',\n },\n },\n create() {\n const swiper = this;\n Utils.extend(swiper, {\n scrollbar: {\n init: Scrollbar.init.bind(swiper),\n destroy: Scrollbar.destroy.bind(swiper),\n updateSize: Scrollbar.updateSize.bind(swiper),\n setTranslate: Scrollbar.setTranslate.bind(swiper),\n setTransition: Scrollbar.setTransition.bind(swiper),\n enableDraggable: Scrollbar.enableDraggable.bind(swiper),\n disableDraggable: Scrollbar.disableDraggable.bind(swiper),\n setDragPosition: Scrollbar.setDragPosition.bind(swiper),\n getPointerPosition: Scrollbar.getPointerPosition.bind(swiper),\n onDragStart: Scrollbar.onDragStart.bind(swiper),\n onDragMove: Scrollbar.onDragMove.bind(swiper),\n onDragEnd: Scrollbar.onDragEnd.bind(swiper),\n isTouched: false,\n timeout: null,\n dragTimeout: null,\n },\n });\n },\n on: {\n init() {\n const swiper = this;\n swiper.scrollbar.init();\n swiper.scrollbar.updateSize();\n swiper.scrollbar.setTranslate();\n },\n update() {\n const swiper = this;\n swiper.scrollbar.updateSize();\n },\n resize() {\n const swiper = this;\n swiper.scrollbar.updateSize();\n },\n observerUpdate() {\n const swiper = this;\n swiper.scrollbar.updateSize();\n },\n setTranslate() {\n const swiper = this;\n swiper.scrollbar.setTranslate();\n },\n setTransition(duration) {\n const swiper = this;\n swiper.scrollbar.setTransition(duration);\n },\n destroy() {\n const swiper = this;\n swiper.scrollbar.destroy();\n },\n },\n};\n\nconst Zoom = {\n // Calc Scale From Multi-touches\n getDistanceBetweenTouches(e) {\n if (e.targetTouches.length < 2) return 1;\n const x1 = e.targetTouches[0].pageX;\n const y1 = e.targetTouches[0].pageY;\n const x2 = e.targetTouches[1].pageX;\n const y2 = e.targetTouches[1].pageY;\n const distance = Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2));\n return distance;\n },\n // Events\n onGestureStart(e) {\n const swiper = this;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n const { gesture } = zoom;\n zoom.fakeGestureTouched = false;\n zoom.fakeGestureMoved = false;\n if (!Support.gestures) {\n if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {\n return;\n }\n zoom.fakeGestureTouched = true;\n gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);\n }\n if (!gesture.$slideEl || !gesture.$slideEl.length) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n if (gesture.$imageWrapEl.length === 0) {\n gesture.$imageEl = undefined;\n return;\n }\n }\n if (gesture.$imageEl) {\n gesture.$imageEl.transition(0);\n }\n swiper.zoom.isScaling = true;\n },\n onGestureChange(e) {\n const swiper = this;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n const { gesture } = zoom;\n if (!Support.gestures) {\n if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {\n return;\n }\n zoom.fakeGestureMoved = true;\n gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);\n }\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (Support.gestures) {\n zoom.scale = e.scale * zoom.currentScale;\n } else {\n zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;\n }\n if (zoom.scale > gesture.maxRatio) {\n zoom.scale = (gesture.maxRatio - 1) + (((zoom.scale - gesture.maxRatio) + 1) ** 0.5);\n }\n if (zoom.scale < params.minRatio) {\n zoom.scale = (params.minRatio + 1) - (((params.minRatio - zoom.scale) + 1) ** 0.5);\n }\n gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n },\n onGestureEnd(e) {\n const swiper = this;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n const { gesture } = zoom;\n if (!Support.gestures) {\n if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {\n return;\n }\n if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {\n return;\n }\n zoom.fakeGestureTouched = false;\n zoom.fakeGestureMoved = false;\n }\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);\n gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n zoom.currentScale = zoom.scale;\n zoom.isScaling = false;\n if (zoom.scale === 1) gesture.$slideEl = undefined;\n },\n onTouchStart(e) {\n const swiper = this;\n const zoom = swiper.zoom;\n const { gesture, image } = zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (image.isTouched) return;\n if (Device.android && e.cancelable) e.preventDefault();\n image.isTouched = true;\n image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n },\n onTouchMove(e) {\n const swiper = this;\n const zoom = swiper.zoom;\n const { gesture, image, velocity } = zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n swiper.allowClick = false;\n if (!image.isTouched || !gesture.$slideEl) return;\n\n if (!image.isMoved) {\n image.width = gesture.$imageEl[0].offsetWidth;\n image.height = gesture.$imageEl[0].offsetHeight;\n image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;\n image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;\n gesture.slideWidth = gesture.$slideEl[0].offsetWidth;\n gesture.slideHeight = gesture.$slideEl[0].offsetHeight;\n gesture.$imageWrapEl.transition(0);\n if (swiper.rtl) {\n image.startX = -image.startX;\n image.startY = -image.startY;\n }\n }\n // Define if we need image drag\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n\n if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;\n\n image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);\n image.maxX = -image.minX;\n image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);\n image.maxY = -image.minY;\n\n image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n\n if (!image.isMoved && !zoom.isScaling) {\n if (\n swiper.isHorizontal()\n && (\n (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x)\n || (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)\n )\n ) {\n image.isTouched = false;\n return;\n } if (\n !swiper.isHorizontal()\n && (\n (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y)\n || (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)\n )\n ) {\n image.isTouched = false;\n return;\n }\n }\n if (e.cancelable) {\n e.preventDefault();\n }\n e.stopPropagation();\n\n image.isMoved = true;\n image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;\n image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;\n\n if (image.currentX < image.minX) {\n image.currentX = (image.minX + 1) - (((image.minX - image.currentX) + 1) ** 0.8);\n }\n if (image.currentX > image.maxX) {\n image.currentX = (image.maxX - 1) + (((image.currentX - image.maxX) + 1) ** 0.8);\n }\n\n if (image.currentY < image.minY) {\n image.currentY = (image.minY + 1) - (((image.minY - image.currentY) + 1) ** 0.8);\n }\n if (image.currentY > image.maxY) {\n image.currentY = (image.maxY - 1) + (((image.currentY - image.maxY) + 1) ** 0.8);\n }\n\n // Velocity\n if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;\n if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;\n if (!velocity.prevTime) velocity.prevTime = Date.now();\n velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;\n velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;\n if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;\n if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;\n velocity.prevPositionX = image.touchesCurrent.x;\n velocity.prevPositionY = image.touchesCurrent.y;\n velocity.prevTime = Date.now();\n\n gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n },\n onTouchEnd() {\n const swiper = this;\n const zoom = swiper.zoom;\n const { gesture, image, velocity } = zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (!image.isTouched || !image.isMoved) {\n image.isTouched = false;\n image.isMoved = false;\n return;\n }\n image.isTouched = false;\n image.isMoved = false;\n let momentumDurationX = 300;\n let momentumDurationY = 300;\n const momentumDistanceX = velocity.x * momentumDurationX;\n const newPositionX = image.currentX + momentumDistanceX;\n const momentumDistanceY = velocity.y * momentumDurationY;\n const newPositionY = image.currentY + momentumDistanceY;\n\n // Fix duration\n if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);\n if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);\n const momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n\n image.currentX = newPositionX;\n image.currentY = newPositionY;\n\n // Define if we need image drag\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);\n image.maxX = -image.minX;\n image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);\n image.maxY = -image.minY;\n image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);\n image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);\n\n gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n },\n onTransitionEnd() {\n const swiper = this;\n const zoom = swiper.zoom;\n const { gesture } = zoom;\n if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {\n if (gesture.$imageEl) {\n gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');\n }\n if (gesture.$imageWrapEl) {\n gesture.$imageWrapEl.transform('translate3d(0,0,0)');\n }\n\n zoom.scale = 1;\n zoom.currentScale = 1;\n\n gesture.$slideEl = undefined;\n gesture.$imageEl = undefined;\n gesture.$imageWrapEl = undefined;\n }\n },\n // Toggle Zoom\n toggle(e) {\n const swiper = this;\n const zoom = swiper.zoom;\n\n if (zoom.scale && zoom.scale !== 1) {\n // Zoom Out\n zoom.out();\n } else {\n // Zoom In\n zoom.in(e);\n }\n },\n in(e) {\n const swiper = this;\n\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n const { gesture, image } = zoom;\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n\n gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);\n\n let touchX;\n let touchY;\n let offsetX;\n let offsetY;\n let diffX;\n let diffY;\n let translateX;\n let translateY;\n let imageWidth;\n let imageHeight;\n let scaledWidth;\n let scaledHeight;\n let translateMinX;\n let translateMinY;\n let translateMaxX;\n let translateMaxY;\n let slideWidth;\n let slideHeight;\n\n if (typeof image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n } else {\n touchX = image.touchesStart.x;\n touchY = image.touchesStart.y;\n }\n\n zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n if (e) {\n slideWidth = gesture.$slideEl[0].offsetWidth;\n slideHeight = gesture.$slideEl[0].offsetHeight;\n offsetX = gesture.$slideEl.offset().left;\n offsetY = gesture.$slideEl.offset().top;\n diffX = (offsetX + (slideWidth / 2)) - touchX;\n diffY = (offsetY + (slideHeight / 2)) - touchY;\n\n imageWidth = gesture.$imageEl[0].offsetWidth;\n imageHeight = gesture.$imageEl[0].offsetHeight;\n scaledWidth = imageWidth * zoom.scale;\n scaledHeight = imageHeight * zoom.scale;\n\n translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);\n translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n\n translateX = diffX * zoom.scale;\n translateY = diffY * zoom.scale;\n\n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n\n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n } else {\n translateX = 0;\n translateY = 0;\n }\n gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);\n gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n },\n out() {\n const swiper = this;\n\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n const { gesture } = zoom;\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n\n zoom.scale = 1;\n zoom.currentScale = 1;\n gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');\n gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');\n gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);\n gesture.$slideEl = undefined;\n },\n // Attach/Detach Events\n enable() {\n const swiper = this;\n const zoom = swiper.zoom;\n if (zoom.enabled) return;\n zoom.enabled = true;\n\n const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;\n const activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true;\n\n const slideSelector = `.${swiper.params.slideClass}`;\n\n // Scale image\n if (Support.gestures) {\n swiper.$wrapperEl.on('gesturestart', slideSelector, zoom.onGestureStart, passiveListener);\n swiper.$wrapperEl.on('gesturechange', slideSelector, zoom.onGestureChange, passiveListener);\n swiper.$wrapperEl.on('gestureend', slideSelector, zoom.onGestureEnd, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener);\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener);\n }\n }\n\n // Move image\n swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove, activeListenerWithCapture);\n },\n disable() {\n const swiper = this;\n const zoom = swiper.zoom;\n if (!zoom.enabled) return;\n\n swiper.zoom.enabled = false;\n\n const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;\n const activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true;\n\n const slideSelector = `.${swiper.params.slideClass}`;\n\n // Scale image\n if (Support.gestures) {\n swiper.$wrapperEl.off('gesturestart', slideSelector, zoom.onGestureStart, passiveListener);\n swiper.$wrapperEl.off('gesturechange', slideSelector, zoom.onGestureChange, passiveListener);\n swiper.$wrapperEl.off('gestureend', slideSelector, zoom.onGestureEnd, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture);\n swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener);\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener);\n }\n }\n\n // Move image\n swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove, activeListenerWithCapture);\n },\n};\n\nvar zoom = {\n name: 'zoom',\n params: {\n zoom: {\n enabled: false,\n maxRatio: 3,\n minRatio: 1,\n toggle: true,\n containerClass: 'swiper-zoom-container',\n zoomedSlideClass: 'swiper-slide-zoomed',\n },\n },\n create() {\n const swiper = this;\n const zoom = {\n enabled: false,\n scale: 1,\n currentScale: 1,\n isScaling: false,\n gesture: {\n $slideEl: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n $imageEl: undefined,\n $imageWrapEl: undefined,\n maxRatio: 3,\n },\n image: {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {},\n },\n velocity: {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined,\n },\n };\n\n ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => {\n zoom[methodName] = Zoom[methodName].bind(swiper);\n });\n Utils.extend(swiper, {\n zoom,\n });\n\n let scale = 1;\n Object.defineProperty(swiper.zoom, 'scale', {\n get() {\n return scale;\n },\n set(value) {\n if (scale !== value) {\n const imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;\n const slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;\n swiper.emit('zoomChange', value, imageEl, slideEl);\n }\n scale = value;\n },\n });\n },\n on: {\n init() {\n const swiper = this;\n if (swiper.params.zoom.enabled) {\n swiper.zoom.enable();\n }\n },\n destroy() {\n const swiper = this;\n swiper.zoom.disable();\n },\n touchStart(e) {\n const swiper = this;\n if (!swiper.zoom.enabled) return;\n swiper.zoom.onTouchStart(e);\n },\n touchEnd(e) {\n const swiper = this;\n if (!swiper.zoom.enabled) return;\n swiper.zoom.onTouchEnd(e);\n },\n doubleTap(e) {\n const swiper = this;\n if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {\n swiper.zoom.toggle(e);\n }\n },\n transitionEnd() {\n const swiper = this;\n if (swiper.zoom.enabled && swiper.params.zoom.enabled) {\n swiper.zoom.onTransitionEnd();\n }\n },\n slideChange() {\n const swiper = this;\n if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {\n swiper.zoom.onTransitionEnd();\n }\n },\n },\n};\n\n/* eslint no-underscore-dangle: \"off\" */\n\nconst Autoplay = {\n run() {\n const swiper = this;\n const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);\n let delay = swiper.params.autoplay.delay;\n if ($activeSlideEl.attr('data-swiper-autoplay')) {\n delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;\n }\n clearTimeout(swiper.autoplay.timeout);\n swiper.autoplay.timeout = Utils.nextTick(() => {\n if (swiper.params.autoplay.reverseDirection) {\n if (swiper.params.loop) {\n swiper.loopFix();\n swiper.slidePrev(swiper.params.speed, true, true);\n swiper.emit('autoplay');\n } else if (!swiper.isBeginning) {\n swiper.slidePrev(swiper.params.speed, true, true);\n swiper.emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);\n swiper.emit('autoplay');\n } else {\n swiper.autoplay.stop();\n }\n } else if (swiper.params.loop) {\n swiper.loopFix();\n swiper.slideNext(swiper.params.speed, true, true);\n swiper.emit('autoplay');\n } else if (!swiper.isEnd) {\n swiper.slideNext(swiper.params.speed, true, true);\n swiper.emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n swiper.slideTo(0, swiper.params.speed, true, true);\n swiper.emit('autoplay');\n } else {\n swiper.autoplay.stop();\n }\n if (swiper.params.cssMode && swiper.autoplay.running) swiper.autoplay.run();\n }, delay);\n },\n start() {\n const swiper = this;\n if (typeof swiper.autoplay.timeout !== 'undefined') return false;\n if (swiper.autoplay.running) return false;\n swiper.autoplay.running = true;\n swiper.emit('autoplayStart');\n swiper.autoplay.run();\n return true;\n },\n stop() {\n const swiper = this;\n if (!swiper.autoplay.running) return false;\n if (typeof swiper.autoplay.timeout === 'undefined') return false;\n\n if (swiper.autoplay.timeout) {\n clearTimeout(swiper.autoplay.timeout);\n swiper.autoplay.timeout = undefined;\n }\n swiper.autoplay.running = false;\n swiper.emit('autoplayStop');\n return true;\n },\n pause(speed) {\n const swiper = this;\n if (!swiper.autoplay.running) return;\n if (swiper.autoplay.paused) return;\n if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout);\n swiper.autoplay.paused = true;\n if (speed === 0 || !swiper.params.autoplay.waitForTransition) {\n swiper.autoplay.paused = false;\n swiper.autoplay.run();\n } else {\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);\n swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);\n }\n },\n};\n\nvar autoplay = {\n name: 'autoplay',\n params: {\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: true,\n stopOnLastSlide: false,\n reverseDirection: false,\n },\n },\n create() {\n const swiper = this;\n Utils.extend(swiper, {\n autoplay: {\n running: false,\n paused: false,\n run: Autoplay.run.bind(swiper),\n start: Autoplay.start.bind(swiper),\n stop: Autoplay.stop.bind(swiper),\n pause: Autoplay.pause.bind(swiper),\n onVisibilityChange() {\n if (document.visibilityState === 'hidden' && swiper.autoplay.running) {\n swiper.autoplay.pause();\n }\n if (document.visibilityState === 'visible' && swiper.autoplay.paused) {\n swiper.autoplay.run();\n swiper.autoplay.paused = false;\n }\n },\n onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);\n swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);\n swiper.autoplay.paused = false;\n if (!swiper.autoplay.running) {\n swiper.autoplay.stop();\n } else {\n swiper.autoplay.run();\n }\n },\n },\n });\n },\n on: {\n init() {\n const swiper = this;\n if (swiper.params.autoplay.enabled) {\n swiper.autoplay.start();\n document.addEventListener('visibilitychange', swiper.autoplay.onVisibilityChange);\n }\n },\n beforeTransitionStart(speed, internal) {\n const swiper = this;\n if (swiper.autoplay.running) {\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n swiper.autoplay.pause(speed);\n } else {\n swiper.autoplay.stop();\n }\n }\n },\n sliderFirstMove() {\n const swiper = this;\n if (swiper.autoplay.running) {\n if (swiper.params.autoplay.disableOnInteraction) {\n swiper.autoplay.stop();\n } else {\n swiper.autoplay.pause();\n }\n }\n },\n touchEnd() {\n const swiper = this;\n if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) {\n swiper.autoplay.run();\n }\n },\n destroy() {\n const swiper = this;\n if (swiper.autoplay.running) {\n swiper.autoplay.stop();\n }\n document.removeEventListener('visibilitychange', swiper.autoplay.onVisibilityChange);\n },\n },\n};\n\n// Swiper Class\n\nconst components = [\n Device$1,\n Support$1,\n Browser$1,\n Resize,\n Observer$1,\n \n];\n\nif (typeof Swiper.use === 'undefined') {\n Swiper.use = Swiper.Class.use;\n Swiper.installModule = Swiper.Class.installModule;\n}\n\nSwiper.use(components);\n\nSwiper.use([pagination, scrollbar, autoplay, keyboard, zoom]);\n\nexport { Swiper };\n"]} |