PRO PLAN® LiveClear® снижает количество аллергенов в шерсти кошек
Заметный результат за 3 недели!*​
*Сатярадж Е. и др. Журнал «Снижение иммунитета и болезни». 2019; 7 (2): 68-73.

Корм PRO PLAN LiveClear снижающий концентрацию аллергенов у кошки

Революционное открытие, снижающее количество аллергенов в кошачьей шерсти*

В ходе исследований, которые проводились в течение более чем десяти лет, доказано, что корм для кошек PRO PLAN® LiveClear® безопасно и эффективно снижает уровень концентрации аллергенов в кошачьей шерсти*. Посмотрите видео, чтобы узнать как работает PRO PLAN® LiveClear®.

Встречайте корм PRO PLAN® LiveClear®

  • Иконка кошка вылизывается
    В слюнных железах всех кошек независимо от пола и породы образуется аллерген Fel d1
  • Когда кошки едят корм PRO PLAN® LiveClear®, особый белок, получаемый из яиц, связывается в их слюне и нейтрализует его
  • Иконка кошка сидит
    При непрерывном кормлении рацион PRO PLAN® LiveClear® значительно уменьшает количество аллергенов в кошачьей шерсти*
  • Иконка кошка
    Доказано, что корм PRO PLAN®LiveClear® безопасен для кошек**
*Сатярадж Е. и др. Журнал «Снижение иммунитета и болезни». 2019; 7 (2): 68-73.
**Матулка Р.A. и др. Журнал «Передовая ветеринарная наука». 2020;6, 477. doi: 10.3389/fvets.2019.00477.
Рацион PRO PLAN® LiveClear® не заменяет другие способы снижения уровня аллергенов, но представляет собой еще одну меру, которая может способствовать уменьшению аллергенной нагрузки в доме, где живет кошка

как перевести питомца на корм PRO PLAN®

1-2 день

75%

текущего корма

25%

нового корма

3-4 день

50%

текущего корма

50%

нового корма

5-6 день

25%

текущего корма

75%

нового корма

7 день

0%

текущего корма

100%

нового корма

Реальные люди. Реальные истории.

С PRO PLAN® LiveClear® жизнь меняется к лучшему. Посмотрите, как она изменилась у реальных людей, таких как вы.

Я не чихаю, у меня не слезятся глаза. Это просто чудо.
— Остап
Мы консультируемся по вопросу Сониной аллергии. Приходится с этим бороться лекарствами... Появление корма PRO PLAN® LiveClear®, который позволяет общаться с животными, для нас было большим сюрпризом.
— Павел
Это, конечно, удивительно, что такая проблема многолетняя решается таким простым способом. Просто специальный корм.
— Ольга
Я думал, что если кошка будет лысая, то и аллергии у меня не будет... Но аллергия появляется не из-за шерсти... А потом мне звонит мама и говорит, что узнала про новый корм PRO PLAN® LiveClear®. Бинки может его есть, и уже через три недели количество аллергенов в слюне начнет снижаться. Аллергия у меня начнет пропадать.
— Андрей
Уникальный проект бренда PRO PLAN® и Центра «Юна» помогает кошкам найти свой дом!

Часть кошек Центра реабилитации временно бездомных животных «Юна» были переведены на рацион PRO PLAN® LiveClear®.

Уникальный состав корма позволил снизить количество аллергенов на их шерсти.* А значит шанс этих кошечек встретиться с хозяином и обрести дом значительно возрастет!

Мы верим, что это только начало большого пути — того, который поможет людям с повышенной чувствительностью к аллергенам и их новым питомцам стать ближе.

*Сатярадж Е. и др. Журнал «Снижение иммунитета и болезни». 2019; 7 (2): 68-73.

PRO PLAN® LiveClear® представляет собой революционный корм для кошек, действие которого подтверждено исследованиями. Корм PRO PLAN® LiveClear® снижает уровень аллергенов в кошачьей шерсти в среднем на 47%, начиная с третьей недели непрерывного кормления.
Хранить в сухом прохладном месте
*Сатярадж Е. и др. Журнал «Снижение иммунитета и болезни». 2019; 7 (2): 68-73.
Purina ProPlan Liveclear Sterilised корм
PRO PLAN® LIVECLEAR® для стерилизованных кошек, снижает количество аллергенов в шерсти, с индейкой
Purina ProPlan Liveclear корм
PRO PLAN® LIVECLEAR® для стерилизованных кошек, снижает количество аллергенов в шерсти, с лососем
Purina ProPlan Liveclear Kitten корм
PRO PLAN® LIVECLEAR® для котят, снижает количество аллергенов в шерсти, с индейкой
Purina ProPlan Liveclear Sterilised корм
PRO PLAN® LIVECLEAR® для стерилизованных кошек старше 7 лет, снижает количество аллергенов в шерсти, с индейкой
PRO PLAN® LIVECLEAR® для взрослых стерилизованных кошек с индейкой, 400 г
PRO PLAN® LIVECLEAR® для взрослых стерилизованных кошек, снижает количество аллергенов в шерсти, с индейкой, 400 г
PRO PLAN® LIVECLEAR® для котят до 1 года с высоким содержанием индейки, 400 г
PRO PLAN® LIVECLEAR® для котят до 1 года, снижает количество аллергенов в шерсти, с высоким содержанием индейки, 400 г
Попробуйте рацион
PRO PLAN® LiveClear®
Узнать подробнее

Узнать больше о кошачьих аллергенах

Кошка
Иконка чат
Часто задаваемые вопросы
Получите ответы на самые распространенные вопросы о корме для кошек PRO PLAN® LiveClear®
Узнать больше
")); if (!$slideEl.attr('data-swiper-slide-index')) { $slideEl.attr('data-swiper-slide-index', index); } if (params.cache) { swiper.virtual.cache[index] = $slideEl; } return $slideEl; }, appendSlide: function appendSlide(slide) { var swiper = this; swiper.virtual.slides.push(slide); swiper.virtual.update(true); }, prependSlide: function prependSlide(slide) { var swiper = this; swiper.virtual.slides.unshift(slide); if (swiper.params.virtual.cache) { var cache = swiper.virtual.cache; var newCache = {}; Object.keys(cache).forEach(function (cachedIndex) { newCache[cachedIndex + 1] = cache[cachedIndex]; }); swiper.virtual.cache = newCache; } swiper.virtual.update(true); swiper.slideNext(0); }, }; var Virtual$1 = { name: 'virtual', params: { virtual: { enabled: false, slides: [], cache: true, renderSlide: null, renderExternal: null, addSlidesBefore: 0, addSlidesAfter: 0, }, }, create: function create() { var swiper = this; Utils.extend(swiper, { virtual: { update: Virtual.update.bind(swiper), appendSlide: Virtual.appendSlide.bind(swiper), prependSlide: Virtual.prependSlide.bind(swiper), renderSlide: Virtual.renderSlide.bind(swiper), slides: swiper.params.virtual.slides, cache: {}, }, }); }, on: { beforeInit: function beforeInit() { var swiper = this; if (!swiper.params.virtual.enabled) { return; } swiper.classNames.push(((swiper.params.containerModifierClass) + "virtual")); var overwriteParams = { watchSlidesProgress: true, }; Utils.extend(swiper.params, overwriteParams); Utils.extend(swiper.originalParams, overwriteParams); swiper.virtual.update(); }, setTranslate: function setTranslate() { var swiper = this; if (!swiper.params.virtual.enabled) { return; } swiper.virtual.update(); }, }, }; var Keyboard = { handle: function handle(event) { var swiper = this; var rtl = swiper.rtlTranslate; var e = event; if (e.originalEvent) { e = e.originalEvent; } // jquery fix var kc = e.keyCode || e.charCode; // Directions locks if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) { return false; } if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) { return false; } if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { return undefined; } if (doc.activeElement && doc.activeElement.nodeName && (doc.activeElement.nodeName.toLowerCase() === 'input' || doc.activeElement.nodeName.toLowerCase() === 'textarea')) { return undefined; } if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) { var inView = false; // Check that swiper should be inside of visible area of window if (swiper.$el.parents(("." + (swiper.params.slideClass))).length > 0 && swiper.$el.parents(("." + (swiper.params.slideActiveClass))).length === 0) { return undefined; } var windowWidth = win.innerWidth; var windowHeight = win.innerHeight; var swiperOffset = swiper.$el.offset(); if (rtl) { swiperOffset.left -= swiper.$el[0].scrollLeft; } var swiperCoord = [ [swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height] ]; for (var i = 0; i = 0 && point[0] = 0 && point[1] -1) { return 'DOMMouseScroll'; } return isEventSupported() ? 'wheel' : 'mousewheel'; }()), normalize: function normalize(e) { // Reasonable defaults var PIXEL_STEP = 10; var LINE_HEIGHT = 40; var PAGE_HEIGHT = 800; var sX = 0; var sY = 0; // spinX, spinY var pX = 0; var pY = 0; // pixelX, pixelY // Legacy if ('detail' in e) { sY = e.detail; } if ('wheelDelta' in e) { sY = -e.wheelDelta / 120; } if ('wheelDeltaY' in e) { sY = -e.wheelDeltaY / 120; } if ('wheelDeltaX' in e) { sX = -e.wheelDeltaX / 120; } // side scrolling on FF with DOMMouseScroll if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { sX = sY; sY = 0; } pX = sX * PIXEL_STEP; pY = sY * PIXEL_STEP; if ('deltaY' in e) { pY = e.deltaY; } if ('deltaX' in e) { pX = e.deltaX; } if ((pX || pY) && e.deltaMode) { if (e.deltaMode === 1) { // delta in LINE units pX *= LINE_HEIGHT; pY *= LINE_HEIGHT; } else { // delta in PAGE units pX *= PAGE_HEIGHT; pY *= PAGE_HEIGHT; } } // Fall-back if spin cannot be determined if (pX && !sX) { sX = (pX Math.abs(data.pixelY)) { delta = data.pixelX * rtlFactor; } else { return true; } } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) { delta = data.pixelY; } else { return true; } } else { delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; } if (delta === 0) { return true; } if (params.invert) { delta = -delta; } if (!swiper.params.freeMode) { if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) { if (delta = swiper.minTranslate()) { position = swiper.minTranslate(); } if (position 0) { if (swiper.isBeginning) { $prevEl.addClass(params.disabledClass); } else { $prevEl.removeClass(params.disabledClass); } $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); } if ($nextEl && $nextEl.length > 0) { if (swiper.isEnd) { $nextEl.addClass(params.disabledClass); } else { $nextEl.removeClass(params.disabledClass); } $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); } }, init: function init() { var swiper = this; var params = swiper.params.navigation; if (!(params.nextEl || params.prevEl)) { return; } var $nextEl; var $prevEl; if (params.nextEl) { $nextEl = $(params.nextEl); if ( swiper.params.uniqueNavElements && typeof params.nextEl === 'string' && $nextEl.length > 1 && swiper.$el.find(params.nextEl).length === 1 ) { $nextEl = swiper.$el.find(params.nextEl); } } if (params.prevEl) { $prevEl = $(params.prevEl); if ( swiper.params.uniqueNavElements && typeof params.prevEl === 'string' && $prevEl.length > 1 && swiper.$el.find(params.prevEl).length === 1 ) { $prevEl = swiper.$el.find(params.prevEl); } } if ($nextEl && $nextEl.length > 0) { $nextEl.on('click', function (e) { e.preventDefault(); if (swiper.isEnd && !swiper.params.loop) { return; } swiper.slideNext(); }); } if ($prevEl && $prevEl.length > 0) { $prevEl.on('click', function (e) { e.preventDefault(); if (swiper.isBeginning && !swiper.params.loop) { return; } swiper.slidePrev(); }); } Utils.extend(swiper.navigation, { $nextEl: $nextEl, nextEl: $nextEl && $nextEl[0], $prevEl: $prevEl, prevEl: $prevEl && $prevEl[0], }); }, destroy: function destroy() { var swiper = this; var ref = swiper.navigation; var $nextEl = ref.$nextEl; var $prevEl = ref.$prevEl; if ($nextEl && $nextEl.length) { $nextEl.off('click'); $nextEl.removeClass(swiper.params.navigation.disabledClass); } if ($prevEl && $prevEl.length) { $prevEl.off('click'); $prevEl.removeClass(swiper.params.navigation.disabledClass); } }, }; var Navigation$1 = { name: 'navigation', params: { navigation: { nextEl: null, prevEl: null, hideOnClick: false, disabledClass: 'swiper-button-disabled', hiddenClass: 'swiper-button-hidden', lockClass: 'swiper-button-lock', }, }, create: function create() { var swiper = this; Utils.extend(swiper, { navigation: { init: Navigation.init.bind(swiper), update: Navigation.update.bind(swiper), destroy: Navigation.destroy.bind(swiper), }, }); }, on: { init: function init() { var swiper = this; swiper.navigation.init(); swiper.navigation.update(); }, toEdge: function toEdge() { var swiper = this; swiper.navigation.update(); }, fromEdge: function fromEdge() { var swiper = this; swiper.navigation.update(); }, destroy: function destroy() { var swiper = this; swiper.navigation.destroy(); }, click: function click(e) { var swiper = this; var ref = swiper.navigation; var $nextEl = ref.$nextEl; var $prevEl = ref.$prevEl; if ( swiper.params.navigation.hideOnClick && !$(e.target).is($prevEl) && !$(e.target).is($nextEl) ) { if ($nextEl) { $nextEl.toggleClass(swiper.params.navigation.hiddenClass); } if ($prevEl) { $prevEl.toggleClass(swiper.params.navigation.hiddenClass); } } }, }, }; var Pagination = { update: function update() { // Render || Update Pagination bullets/items var swiper = this; var rtl = swiper.rtl; var params = swiper.params.pagination; if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; } var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; var $el = swiper.pagination.$el; // Current/Total var current; var total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; if (swiper.params.loop) { current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) { current -= (slidesLength - (swiper.loopedSlides * 2)); } if (current > total - 1) { current -= total; } if (current 0) { var bullets = swiper.pagination.bullets; var firstIndex; var lastIndex; var midIndex; if (params.dynamicBullets) { swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); $el.css(swiper.isHorizontal() ? 'width' : 'height', ((swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)) + "px")); if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex); if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) { swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1; } else if (swiper.pagination.dynamicBulletIndex 1) { bullets.each(function (index, bullet) { var $bullet = $(bullet); var bulletIndex = $bullet.index(); if (bulletIndex === current) { $bullet.addClass(params.bulletActiveClass); } if (params.dynamicBullets) { if (bulletIndex >= firstIndex && bulletIndex " + (params.bulletElement) + ">"; } } $el.html(paginationHTML); swiper.pagination.bullets = $el.find(("." + (params.bulletClass))); } if (params.type === 'fraction') { if (params.renderFraction) { paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); } else { paginationHTML = "" + ' / ' + ""; } $el.html(paginationHTML); } if (params.type === 'progressbar') { if (params.renderProgressbar) { paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); } else { paginationHTML = ""; } $el.html(paginationHTML); } if (params.type !== 'custom') { swiper.emit('paginationRender', swiper.pagination.$el[0]); } }, init: function init() { var swiper = this; var params = swiper.params.pagination; if (!params.el) { return; } var $el = $(params.el); if ($el.length === 0) { return; } if ( swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && swiper.$el.find(params.el).length === 1 ) { $el = swiper.$el.find(params.el); } if (params.type === 'bullets' && params.clickable) { $el.addClass(params.clickableClass); } $el.addClass(params.modifierClass + params.type); if (params.type === 'bullets' && params.dynamicBullets) { $el.addClass(("" + (params.modifierClass) + (params.type) + "-dynamic")); swiper.pagination.dynamicBulletIndex = 0; if (params.dynamicMainBullets 0 && !$(e.target).hasClass(swiper.params.pagination.bulletClass) ) { swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass); } }, }, }; var Scrollbar = { setTranslate: function setTranslate() { var swiper = this; if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } var scrollbar = swiper.scrollbar; var rtl = swiper.rtlTranslate; var progress = swiper.progress; var dragSize = scrollbar.dragSize; var trackSize = scrollbar.trackSize; var $dragEl = scrollbar.$dragEl; var $el = scrollbar.$el; var params = swiper.params.scrollbar; var newSize = dragSize; var newPos = (trackSize - dragSize) * progress; if (rtl) { newPos = -newPos; if (newPos > 0) { newSize = dragSize - newPos; newPos = 0; } else if (-newPos + dragSize > trackSize) { newSize = trackSize + newPos; } } else if (newPos trackSize) { newSize = trackSize - newPos; } if (swiper.isHorizontal()) { if (Support.transforms3d) { $dragEl.transform(("translate3d(" + newPos + "px, 0, 0)")); } else { $dragEl.transform(("translateX(" + newPos + "px)")); } $dragEl[0].style.width = newSize + "px"; } else { if (Support.transforms3d) { $dragEl.transform(("translate3d(0px, " + newPos + "px, 0)")); } else { $dragEl.transform(("translateY(" + newPos + "px)")); } $dragEl[0].style.height = newSize + "px"; } if (params.hide) { clearTimeout(swiper.scrollbar.timeout); $el[0].style.opacity = 1; swiper.scrollbar.timeout = setTimeout(function () { $el[0].style.opacity = 0; $el.transition(400); }, 1000); } }, setTransition: function setTransition(duration) { var swiper = this; if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } swiper.scrollbar.$dragEl.transition(duration); }, updateSize: function updateSize() { var swiper = this; if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } var scrollbar = swiper.scrollbar; var $dragEl = scrollbar.$dragEl; var $el = scrollbar.$el; $dragEl[0].style.width = ''; $dragEl[0].style.height = ''; var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; var divider = swiper.size / swiper.virtualSize; var moveDivider = divider * (trackSize / swiper.size); var dragSize; if (swiper.params.scrollbar.dragSize === 'auto') { dragSize = trackSize * divider; } else { dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); } if (swiper.isHorizontal()) { $dragEl[0].style.width = dragSize + "px"; } else { $dragEl[0].style.height = dragSize + "px"; } if (divider >= 1) { $el[0].style.display = 'none'; } else { $el[0].style.display = ''; } if (swiper.params.scrollbarHide) { $el[0].style.opacity = 0; } Utils.extend(scrollbar, { trackSize: trackSize, divider: divider, moveDivider: moveDivider, dragSize: dragSize, }); scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); }, setDragPosition: function setDragPosition(e) { var swiper = this; var scrollbar = swiper.scrollbar; var rtl = swiper.rtlTranslate; var $el = scrollbar.$el; var dragSize = scrollbar.dragSize; var trackSize = scrollbar.trackSize; var pointerPosition; if (swiper.isHorizontal()) { pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX); } else { pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY); } var positionRatio; positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize); positionRatio = Math.max(Math.min(positionRatio, 1), 0); if (rtl) { positionRatio = 1 - positionRatio; } var position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio); swiper.updateProgress(position); swiper.setTranslate(position); swiper.updateActiveIndex(); swiper.updateSlidesClasses(); }, onDragStart: function onDragStart(e) { var swiper = this; var params = swiper.params.scrollbar; var scrollbar = swiper.scrollbar; var $wrapperEl = swiper.$wrapperEl; var $el = scrollbar.$el; var $dragEl = scrollbar.$dragEl; swiper.scrollbar.isTouched = true; e.preventDefault(); e.stopPropagation(); $wrapperEl.transition(100); $dragEl.transition(100); scrollbar.setDragPosition(e); clearTimeout(swiper.scrollbar.dragTimeout); $el.transition(0); if (params.hide) { $el.css('opacity', 1); } swiper.emit('scrollbarDragStart', e); }, onDragMove: function onDragMove(e) { var swiper = this; var scrollbar = swiper.scrollbar; var $wrapperEl = swiper.$wrapperEl; var $el = scrollbar.$el; var $dragEl = scrollbar.$dragEl; if (!swiper.scrollbar.isTouched) { return; } if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; } scrollbar.setDragPosition(e); $wrapperEl.transition(0); $el.transition(0); $dragEl.transition(0); swiper.emit('scrollbarDragMove', e); }, onDragEnd: function onDragEnd(e) { var swiper = this; var params = swiper.params.scrollbar; var scrollbar = swiper.scrollbar; var $el = scrollbar.$el; if (!swiper.scrollbar.isTouched) { return; } swiper.scrollbar.isTouched = false; if (params.hide) { clearTimeout(swiper.scrollbar.dragTimeout); swiper.scrollbar.dragTimeout = Utils.nextTick(function () { $el.css('opacity', 0); $el.transition(400); }, 1000); } swiper.emit('scrollbarDragEnd', e); if (params.snapOnRelease) { swiper.slideToClosest(); } }, enableDraggable: function enableDraggable() { var swiper = this; if (!swiper.params.scrollbar.el) { return; } var scrollbar = swiper.scrollbar; var touchEvents = swiper.touchEvents; var touchEventsDesktop = swiper.touchEventsDesktop; var params = swiper.params; var $el = scrollbar.$el; var target = $el[0]; var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false; var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) { target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); doc.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); doc.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); } else { if (Support.touch) { target.addEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener); target.addEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener); target.addEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener); } if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { target.addEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener); doc.addEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener); doc.addEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener); } } }, disableDraggable: function disableDraggable() { var swiper = this; if (!swiper.params.scrollbar.el) { return; } var scrollbar = swiper.scrollbar; var touchEvents = swiper.touchEvents; var touchEventsDesktop = swiper.touchEventsDesktop; var params = swiper.params; var $el = scrollbar.$el; var target = $el[0]; var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false; var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) { target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); doc.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); doc.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); } else { if (Support.touch) { target.removeEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener); target.removeEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener); target.removeEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener); } if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { target.removeEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener); doc.removeEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener); doc.removeEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener); } } }, init: function init() { var swiper = this; if (!swiper.params.scrollbar.el) { return; } var scrollbar = swiper.scrollbar; var $swiperEl = swiper.$el; var params = swiper.params.scrollbar; var $el = $(params.el); if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { $el = $swiperEl.find(params.el); } var $dragEl = $el.find(("." + (swiper.params.scrollbar.dragClass))); if ($dragEl.length === 0) { $dragEl = $(("
")); $el.append($dragEl); } Utils.extend(scrollbar, { $el: $el, el: $el[0], $dragEl: $dragEl, dragEl: $dragEl[0], }); if (params.draggable) { scrollbar.enableDraggable(); } }, destroy: function destroy() { var swiper = this; swiper.scrollbar.disableDraggable(); }, }; var Scrollbar$1 = { name: 'scrollbar', params: { scrollbar: { el: null, dragSize: 'auto', hide: false, draggable: false, snapOnRelease: true, lockClass: 'swiper-scrollbar-lock', dragClass: 'swiper-scrollbar-drag', }, }, create: function create() { var swiper = this; Utils.extend(swiper, { scrollbar: { init: Scrollbar.init.bind(swiper), destroy: Scrollbar.destroy.bind(swiper), updateSize: Scrollbar.updateSize.bind(swiper), setTranslate: Scrollbar.setTranslate.bind(swiper), setTransition: Scrollbar.setTransition.bind(swiper), enableDraggable: Scrollbar.enableDraggable.bind(swiper), disableDraggable: Scrollbar.disableDraggable.bind(swiper), setDragPosition: Scrollbar.setDragPosition.bind(swiper), onDragStart: Scrollbar.onDragStart.bind(swiper), onDragMove: Scrollbar.onDragMove.bind(swiper), onDragEnd: Scrollbar.onDragEnd.bind(swiper), isTouched: false, timeout: null, dragTimeout: null, }, }); }, on: { init: function init() { var swiper = this; swiper.scrollbar.init(); swiper.scrollbar.updateSize(); swiper.scrollbar.setTranslate(); }, update: function update() { var swiper = this; swiper.scrollbar.updateSize(); }, resize: function resize() { var swiper = this; swiper.scrollbar.updateSize(); }, observerUpdate: function observerUpdate() { var swiper = this; swiper.scrollbar.updateSize(); }, setTranslate: function setTranslate() { var swiper = this; swiper.scrollbar.setTranslate(); }, setTransition: function setTransition(duration) { var swiper = this; swiper.scrollbar.setTransition(duration); }, destroy: function destroy() { var swiper = this; swiper.scrollbar.destroy(); }, }, }; var Parallax = { setTransform: function setTransform(el, progress) { var swiper = this; var rtl = swiper.rtl; var $el = $(el); var rtlFactor = rtl ? -1 : 1; var p = $el.attr('data-swiper-parallax') || '0'; var x = $el.attr('data-swiper-parallax-x'); var y = $el.attr('data-swiper-parallax-y'); var scale = $el.attr('data-swiper-parallax-scale'); var opacity = $el.attr('data-swiper-parallax-opacity'); if (x || y) { x = x || '0'; y = y || '0'; } else if (swiper.isHorizontal()) { x = p; y = '0'; } else { y = p; x = '0'; } if ((x).indexOf('%') >= 0) { x = (parseInt(x, 10) * progress * rtlFactor) + "%"; } else { x = (x * progress * rtlFactor) + "px"; } if ((y).indexOf('%') >= 0) { y = (parseInt(y, 10) * progress) + "%"; } else { y = (y * progress) + "px"; } if (typeof opacity !== 'undefined' && opacity !== null) { var currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress))); $el[0].style.opacity = currentOpacity; } if (typeof scale === 'undefined' || scale === null) { $el.transform(("translate3d(" + x + ", " + y + ", 0px)")); } else { var currentScale = scale - ((scale - 1) * (1 - Math.abs(progress))); $el.transform(("translate3d(" + x + ", " + y + ", 0px) scale(" + currentScale + ")")); } }, setTranslate: function setTranslate() { var swiper = this; var $el = swiper.$el; var slides = swiper.slides; var progress = swiper.progress; var snapGrid = swiper.snapGrid; $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]') .each(function (index, el) { swiper.parallax.setTransform(el, progress); }); slides.each(function (slideIndex, slideEl) { var slideProgress = slideEl.progress; if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1)); } slideProgress = Math.min(Math.max(slideProgress, -1), 1); $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]') .each(function (index, el) { swiper.parallax.setTransform(el, slideProgress); }); }); }, setTransition: function setTransition(duration) { if ( duration === void 0 ) duration = this.params.speed; var swiper = this; var $el = swiper.$el; $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]') .each(function (index, parallaxEl) { var $parallaxEl = $(parallaxEl); var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; if (duration === 0) { parallaxDuration = 0; } $parallaxEl.transition(parallaxDuration); }); }, }; var Parallax$1 = { name: 'parallax', params: { parallax: { enabled: false, }, }, create: function create() { var swiper = this; Utils.extend(swiper, { parallax: { setTransform: Parallax.setTransform.bind(swiper), setTranslate: Parallax.setTranslate.bind(swiper), setTransition: Parallax.setTransition.bind(swiper), }, }); }, on: { beforeInit: function beforeInit() { var swiper = this; if (!swiper.params.parallax.enabled) { return; } swiper.params.watchSlidesProgress = true; swiper.originalParams.watchSlidesProgress = true; }, init: function init() { var swiper = this; if (!swiper.params.parallax) { return; } swiper.parallax.setTranslate(); }, setTranslate: function setTranslate() { var swiper = this; if (!swiper.params.parallax) { return; } swiper.parallax.setTranslate(); }, setTransition: function setTransition(duration) { var swiper = this; if (!swiper.params.parallax) { return; } swiper.parallax.setTransition(duration); }, }, }; var Zoom = { // Calc Scale From Multi-touches getDistanceBetweenTouches: function getDistanceBetweenTouches(e) { if (e.targetTouches.length gesture.maxRatio) { zoom.scale = (gesture.maxRatio - 1) + (Math.pow( ((zoom.scale - gesture.maxRatio) + 1), 0.5 )); } if (zoom.scale image.touchesStart.x) ) ) { image.isTouched = false; return; } if ( !swiper.isHorizontal() && ( (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y image.touchesStart.y) ) ) { image.isTouched = false; return; } } e.preventDefault(); e.stopPropagation(); image.isMoved = true; image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX; image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY; if (image.currentX image.maxX) { image.currentX = (image.maxX - 1) + (Math.pow( ((image.currentX - image.maxX) + 1), 0.8 )); } if (image.currentY image.maxY) { image.currentY = (image.maxY - 1) + (Math.pow( ((image.currentY - image.maxY) + 1), 0.8 )); } // Velocity if (!velocity.prevPositionX) { velocity.prevPositionX = image.touchesCurrent.x; } if (!velocity.prevPositionY) { velocity.prevPositionY = image.touchesCurrent.y; } if (!velocity.prevTime) { velocity.prevTime = Date.now(); } velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) translateMaxX) { translateX = translateMaxX; } if (translateY translateMaxY) { translateY = translateMaxY; } } else { translateX = 0; translateY = 0; } gesture.$imageWrapEl.transition(300).transform(("translate3d(" + translateX + "px, " + translateY + "px,0)")); gesture.$imageEl.transition(300).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")")); }, out: function out() { var swiper = this; var zoom = swiper.zoom; var params = swiper.params.zoom; var gesture = zoom.gesture; if (!gesture.$slideEl) { gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex); gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass))); } if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } zoom.scale = 1; zoom.currentScale = 1; gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); gesture.$slideEl.removeClass(("" + (params.zoomedSlideClass))); gesture.$slideEl = undefined; }, // Attach/Detach Events enable: function enable() { var swiper = this; var zoom = swiper.zoom; if (zoom.enabled) { return; } zoom.enabled = true; var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false; // Scale image if (Support.gestures) { swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener); swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener); swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener); } else if (swiper.touchEvents.start === 'touchstart') { swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener); swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener); swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener); } // Move image swiper.$wrapperEl.on(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove); }, disable: function disable() { var swiper = this; var zoom = swiper.zoom; if (!zoom.enabled) { return; } swiper.zoom.enabled = false; var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false; // Scale image if (Support.gestures) { swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener); swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener); swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener); } else if (swiper.touchEvents.start === 'touchstart') { swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener); swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener); swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener); } // Move image swiper.$wrapperEl.off(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove); }, }; var Zoom$1 = { name: 'zoom', params: { zoom: { enabled: false, maxRatio: 3, minRatio: 1, toggle: true, containerClass: 'swiper-zoom-container', zoomedSlideClass: 'swiper-slide-zoomed', }, }, create: function create() { var swiper = this; var zoom = { enabled: false, scale: 1, currentScale: 1, isScaling: false, gesture: { $slideEl: undefined, slideWidth: undefined, slideHeight: undefined, $imageEl: undefined, $imageWrapEl: undefined, maxRatio: 3, }, image: { isTouched: undefined, isMoved: undefined, currentX: undefined, currentY: undefined, minX: undefined, minY: undefined, maxX: undefined, maxY: undefined, width: undefined, height: undefined, startX: undefined, startY: undefined, touchesStart: {}, touchesCurrent: {}, }, velocity: { x: undefined, y: undefined, prevPositionX: undefined, prevPositionY: undefined, prevTime: undefined, }, }; ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach(function (methodName) { zoom[methodName] = Zoom[methodName].bind(swiper); }); Utils.extend(swiper, { zoom: zoom, }); }, on: { init: function init() { var swiper = this; if (swiper.params.zoom.enabled) { swiper.zoom.enable(); } }, destroy: function destroy() { var swiper = this; swiper.zoom.disable(); }, touchStart: function touchStart(e) { var swiper = this; if (!swiper.zoom.enabled) { return; } swiper.zoom.onTouchStart(e); }, touchEnd: function touchEnd(e) { var swiper = this; if (!swiper.zoom.enabled) { return; } swiper.zoom.onTouchEnd(e); }, doubleTap: function doubleTap(e) { var swiper = this; if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { swiper.zoom.toggle(e); } }, transitionEnd: function transitionEnd() { var swiper = this; if (swiper.zoom.enabled && swiper.params.zoom.enabled) { swiper.zoom.onTransitionEnd(); } }, }, }; var Lazy = { loadInSlide: function loadInSlide(index, loadInDuplicate) { if ( loadInDuplicate === void 0 ) loadInDuplicate = true; var swiper = this; var params = swiper.params.lazy; if (typeof index === 'undefined') { return; } if (swiper.slides.length === 0) { return; } var isVirtual = swiper.virtual && swiper.params.virtual.enabled; var $slideEl = isVirtual ? swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")) : swiper.slides.eq(index); var $images = $slideEl.find(("." + (params.elementClass) + ":not(." + (params.loadedClass) + "):not(." + (params.loadingClass) + ")")); if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { $images = $images.add($slideEl[0]); } if ($images.length === 0) { return; } $images.each(function (imageIndex, imageEl) { var $imageEl = $(imageEl); $imageEl.addClass(params.loadingClass); var background = $imageEl.attr('data-background'); var src = $imageEl.attr('data-src'); var srcset = $imageEl.attr('data-srcset'); var sizes = $imageEl.attr('data-sizes'); swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, function () { if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) { return; } if (background) { $imageEl.css('background-image', ("url(\"" + background + "\")")); $imageEl.removeAttr('data-background'); } else { if (srcset) { $imageEl.attr('srcset', srcset); $imageEl.removeAttr('data-srcset'); } if (sizes) { $imageEl.attr('sizes', sizes); $imageEl.removeAttr('data-sizes'); } if (src) { $imageEl.attr('src', src); $imageEl.removeAttr('data-src'); } } $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); $slideEl.find(("." + (params.preloaderClass))).remove(); if (swiper.params.loop && loadInDuplicate) { var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { var originalSlide = swiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]:not(." + (swiper.params.slideDuplicateClass) + ")")); swiper.lazy.loadInSlide(originalSlide.index(), false); } else { var duplicatedSlide = swiper.$wrapperEl.children(("." + (swiper.params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]")); swiper.lazy.loadInSlide(duplicatedSlide.index(), false); } } swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]); }); swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]); }); }, load: function load() { var swiper = this; var $wrapperEl = swiper.$wrapperEl; var swiperParams = swiper.params; var slides = swiper.slides; var activeIndex = swiper.activeIndex; var isVirtual = swiper.virtual && swiperParams.virtual.enabled; var params = swiperParams.lazy; var slidesPerView = swiperParams.slidesPerView; if (slidesPerView === 'auto') { slidesPerView = 0; } function slideExist(index) { if (isVirtual) { if ($wrapperEl.children(("." + (swiperParams.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")).length) { return true; } } else if (slides[index]) { return true; } return false; } function slideIndex(slideEl) { if (isVirtual) { return $(slideEl).attr('data-swiper-slide-index'); } return $(slideEl).index(); } if (!swiper.lazy.initialImageLoaded) { swiper.lazy.initialImageLoaded = true; } if (swiper.params.watchSlidesVisibility) { $wrapperEl.children(("." + (swiperParams.slideVisibleClass))).each(function (elIndex, slideEl) { var index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index(); swiper.lazy.loadInSlide(index); }); } else if (slidesPerView > 1) { for (var i = activeIndex; i 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) { var amount = params.loadPrevNextAmount; var spv = slidesPerView; var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides for (var i$1 = activeIndex + slidesPerView; i$1 0) { swiper.lazy.loadInSlide(slideIndex(nextSlide)); } var prevSlide = $wrapperEl.children(("." + (swiperParams.slidePrevClass))); if (prevSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(prevSlide)); } } } }, }; var Lazy$1 = { name: 'lazy', params: { lazy: { enabled: false, loadPrevNext: false, loadPrevNextAmount: 1, loadOnTransitionStart: false, elementClass: 'swiper-lazy', loadingClass: 'swiper-lazy-loading', loadedClass: 'swiper-lazy-loaded', preloaderClass: 'swiper-lazy-preloader', }, }, create: function create() { var swiper = this; Utils.extend(swiper, { lazy: { initialImageLoaded: false, load: Lazy.load.bind(swiper), loadInSlide: Lazy.loadInSlide.bind(swiper), }, }); }, on: { beforeInit: function beforeInit() { var swiper = this; if (swiper.params.lazy.enabled && swiper.params.preloadImages) { swiper.params.preloadImages = false; } }, init: function init() { var swiper = this; if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) { swiper.lazy.load(); } }, scroll: function scroll() { var swiper = this; if (swiper.params.freeMode && !swiper.params.freeModeSticky) { swiper.lazy.load(); } }, resize: function resize() { var swiper = this; if (swiper.params.lazy.enabled) { swiper.lazy.load(); } }, scrollbarDragMove: function scrollbarDragMove() { var swiper = this; if (swiper.params.lazy.enabled) { swiper.lazy.load(); } }, transitionStart: function transitionStart() { var swiper = this; if (swiper.params.lazy.enabled) { if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) { swiper.lazy.load(); } } }, transitionEnd: function transitionEnd() { var swiper = this; if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { swiper.lazy.load(); } }, }, }; /* eslint no-bitwise: ["error", { "allow": [">>"] }] */ var Controller = { LinearSpline: function LinearSpline(x, y) { var binarySearch = (function search() { var maxIndex; var minIndex; var guess; return function (array, val) { minIndex = -1; maxIndex = array.length; while (maxIndex - minIndex > 1) { guess = maxIndex + minIndex >> 1; if (array[guess] 0) { if (swiper.isBeginning) { swiper.a11y.disableEl($prevEl); } else { swiper.a11y.enableEl($prevEl); } } if ($nextEl && $nextEl.length > 0) { if (swiper.isEnd) { swiper.a11y.disableEl($nextEl); } else { swiper.a11y.enableEl($nextEl); } } }, updatePagination: function updatePagination() { var swiper = this; var params = swiper.params.a11y; if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { swiper.pagination.bullets.each(function (bulletIndex, bulletEl) { var $bulletEl = $(bulletEl); swiper.a11y.makeElFocusable($bulletEl); swiper.a11y.addElRole($bulletEl, 'button'); swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1)); }); } }, init: function init() { var swiper = this; swiper.$el.append(swiper.a11y.liveRegion); // Navigation var params = swiper.params.a11y; var $nextEl; var $prevEl; if (swiper.navigation && swiper.navigation.$nextEl) { $nextEl = swiper.navigation.$nextEl; } if (swiper.navigation && swiper.navigation.$prevEl) { $prevEl = swiper.navigation.$prevEl; } if ($nextEl) { swiper.a11y.makeElFocusable($nextEl); swiper.a11y.addElRole($nextEl, 'button'); swiper.a11y.addElLabel($nextEl, params.nextSlideMessage); $nextEl.on('keydown', swiper.a11y.onEnterKey); } if ($prevEl) { swiper.a11y.makeElFocusable($prevEl); swiper.a11y.addElRole($prevEl, 'button'); swiper.a11y.addElLabel($prevEl, params.prevSlideMessage); $prevEl.on('keydown', swiper.a11y.onEnterKey); } // Pagination if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { swiper.pagination.$el.on('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey); } }, destroy: function destroy() { var swiper = this; if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) { swiper.a11y.liveRegion.remove(); } var $nextEl; var $prevEl; if (swiper.navigation && swiper.navigation.$nextEl) { $nextEl = swiper.navigation.$nextEl; } if (swiper.navigation && swiper.navigation.$prevEl) { $prevEl = swiper.navigation.$prevEl; } if ($nextEl) { $nextEl.off('keydown', swiper.a11y.onEnterKey); } if ($prevEl) { $prevEl.off('keydown', swiper.a11y.onEnterKey); } // Pagination if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { swiper.pagination.$el.off('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey); } }, }; var A11y = { name: 'a11y', params: { a11y: { enabled: true, notificationClass: 'swiper-notification', prevSlideMessage: 'Previous slide', nextSlideMessage: 'Next slide', firstSlideMessage: 'This is the first slide', lastSlideMessage: 'This is the last slide', paginationBulletMessage: 'Go to slide {{index}}', }, }, create: function create() { var swiper = this; Utils.extend(swiper, { a11y: { liveRegion: $(("")), }, }); Object.keys(a11y).forEach(function (methodName) { swiper.a11y[methodName] = a11y[methodName].bind(swiper); }); }, on: { init: function init() { var swiper = this; if (!swiper.params.a11y.enabled) { return; } swiper.a11y.init(); swiper.a11y.updateNavigation(); }, toEdge: function toEdge() { var swiper = this; if (!swiper.params.a11y.enabled) { return; } swiper.a11y.updateNavigation(); }, fromEdge: function fromEdge() { var swiper = this; if (!swiper.params.a11y.enabled) { return; } swiper.a11y.updateNavigation(); }, paginationUpdate: function paginationUpdate() { var swiper = this; if (!swiper.params.a11y.enabled) { return; } swiper.a11y.updatePagination(); }, destroy: function destroy() { var swiper = this; if (!swiper.params.a11y.enabled) { return; } swiper.a11y.destroy(); }, }, }; var History = { init: function init() { var swiper = this; if (!swiper.params.history) { return; } if (!win.history || !win.history.pushState) { swiper.params.history.enabled = false; swiper.params.hashNavigation.enabled = true; return; } var history = swiper.history; history.initialized = true; history.paths = History.getPathValues(); if (!history.paths.key && !history.paths.value) { return; } history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit); if (!swiper.params.history.replaceState) { win.addEventListener('popstate', swiper.history.setHistoryPopState); } }, destroy: function destroy() { var swiper = this; if (!swiper.params.history.replaceState) { win.removeEventListener('popstate', swiper.history.setHistoryPopState); } }, setHistoryPopState: function setHistoryPopState() { var swiper = this; swiper.history.paths = History.getPathValues(); swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false); }, getPathValues: function getPathValues() { var pathArray = win.location.pathname.slice(1).split('/').filter(function (part) { return part !== ''; }); var total = pathArray.length; var key = pathArray[total - 2]; var value = pathArray[total - 1]; return { key: key, value: value }; }, setHistory: function setHistory(key, index) { var swiper = this; if (!swiper.history.initialized || !swiper.params.history.enabled) { return; } var slide = swiper.slides.eq(index); var value = History.slugify(slide.attr('data-history')); if (!win.location.pathname.includes(key)) { value = key + "/" + value; } var currentState = win.history.state; if (currentState && currentState.value === value) { return; } if (swiper.params.history.replaceState) { win.history.replaceState({ value: value }, null, value); } else { win.history.pushState({ value: value }, null, value); } }, slugify: function slugify(text) { return text.toString().toLowerCase() .replace(/\s+/g, '-') .replace(/[^\w-]+/g, '') .replace(/--+/g, '-') .replace(/^-+/, '') .replace(/-+$/, ''); }, scrollToSlide: function scrollToSlide(speed, value, runCallbacks) { var swiper = this; if (value) { for (var i = 0, length = swiper.slides.length; i '); $wrapperEl.append($cubeShadowEl); } $cubeShadowEl.css({ height: (swiperWidth + "px") }); } else { $cubeShadowEl = $el.find('.swiper-cube-shadow'); if ($cubeShadowEl.length === 0) { $cubeShadowEl = $('
'); $el.append($cubeShadowEl); } } } for (var i = 0; i -1) { wrapperRotate = (slideIndex * 90) + (progress * 90); if (rtl) { wrapperRotate = (-slideIndex * 90) - (progress * 90); } } $slideEl.transform(transform); if (params.slideShadows) { // Set shadows var shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); var shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); if (shadowBefore.length === 0) { shadowBefore = $(("
")); $slideEl.append(shadowBefore); } if (shadowAfter.length === 0) { shadowAfter = $(("
")); $slideEl.append(shadowAfter); } if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); } if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); } } } $wrapperEl.css({ '-webkit-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), '-moz-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), '-ms-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), 'transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), }); if (params.shadow) { if (isHorizontal) { $cubeShadowEl.transform(("translate3d(0px, " + ((swiperWidth / 2) + params.shadowOffset) + "px, " + (-swiperWidth / 2) + "px) rotateX(90deg) rotateZ(0deg) scale(" + (params.shadowScale) + ")")); } else { var shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90); var multiplier = 1.5 - ( (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2) + (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2) ); var scale1 = params.shadowScale; var scale2 = params.shadowScale / multiplier; var offset = params.shadowOffset; $cubeShadowEl.transform(("scale3d(" + scale1 + ", 1, " + scale2 + ") translate3d(0px, " + ((swiperHeight / 2) + offset) + "px, " + (-swiperHeight / 2 / scale2) + "px) rotateX(-90deg)")); } } var zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0; $wrapperEl .transform(("translate3d(0px,0," + zFactor + "px) rotateX(" + (swiper.isHorizontal() ? 0 : wrapperRotate) + "deg) rotateY(" + (swiper.isHorizontal() ? -wrapperRotate : 0) + "deg)")); }, setTransition: function setTransition(duration) { var swiper = this; var $el = swiper.$el; var slides = swiper.slides; slides .transition(duration) .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') .transition(duration); if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { $el.find('.swiper-cube-shadow').transition(duration); } }, }; var EffectCube = { name: 'effect-cube', params: { cubeEffect: { slideShadows: true, shadow: true, shadowOffset: 20, shadowScale: 0.94, }, }, create: function create() { var swiper = this; Utils.extend(swiper, { cubeEffect: { setTranslate: Cube.setTranslate.bind(swiper), setTransition: Cube.setTransition.bind(swiper), }, }); }, on: { beforeInit: function beforeInit() { var swiper = this; if (swiper.params.effect !== 'cube') { return; } swiper.classNames.push(((swiper.params.containerModifierClass) + "cube")); swiper.classNames.push(((swiper.params.containerModifierClass) + "3d")); var overwriteParams = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: true, resistanceRatio: 0, spaceBetween: 0, centeredSlides: false, virtualTranslate: true, }; Utils.extend(swiper.params, overwriteParams); Utils.extend(swiper.originalParams, overwriteParams); }, setTranslate: function setTranslate() { var swiper = this; if (swiper.params.effect !== 'cube') { return; } swiper.cubeEffect.setTranslate(); }, setTransition: function setTransition(duration) { var swiper = this; if (swiper.params.effect !== 'cube') { return; } swiper.cubeEffect.setTransition(duration); }, }, }; var Flip = { setTranslate: function setTranslate() { var swiper = this; var slides = swiper.slides; var rtl = swiper.rtlTranslate; for (var i = 0; i ")); $slideEl.append(shadowBefore); } if (shadowAfter.length === 0) { shadowAfter = $(("
")); $slideEl.append(shadowAfter); } if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); } if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); } } $slideEl .transform(("translate3d(" + tx + "px, " + ty + "px, 0px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)")); } }, setTransition: function setTransition(duration) { var swiper = this; var slides = swiper.slides; var activeIndex = swiper.activeIndex; var $wrapperEl = swiper.$wrapperEl; slides .transition(duration) .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') .transition(duration); if (swiper.params.virtualTranslate && duration !== 0) { var eventTriggered = false; // eslint-disable-next-line slides.eq(activeIndex).transitionEnd(function onTransitionEnd() { if (eventTriggered) { return; } if (!swiper || swiper.destroyed) { return; } // if (!$(this).hasClass(swiper.params.slideActiveClass)) return; eventTriggered = true; swiper.animating = false; var triggerEvents = ['webkitTransitionEnd', 'transitionend']; for (var i = 0; i ")); $slideEl.append($shadowBeforeEl); } if ($shadowAfterEl.length === 0) { $shadowAfterEl = $(("
")); $slideEl.append($shadowAfterEl); } if ($shadowBeforeEl.length) { $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; } if ($shadowAfterEl.length) { $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; } } } // Set correct perspective for IE10 if (Support.pointerEvents || Support.prefixedPointerEvents) { var ws = $wrapperEl[0].style; ws.perspectiveOrigin = center + "px 50%"; } }, setTransition: function setTransition(duration) { var swiper = this; swiper.slides .transition(duration) .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') .transition(duration); }, }; var EffectCoverflow = { name: 'effect-coverflow', params: { coverflowEffect: { rotate: 50, stretch: 0, depth: 100, modifier: 1, slideShadows: true, }, }, create: function create() { var swiper = this; Utils.extend(swiper, { coverflowEffect: { setTranslate: Coverflow.setTranslate.bind(swiper), setTransition: Coverflow.setTransition.bind(swiper), }, }); }, on: { beforeInit: function beforeInit() { var swiper = this; if (swiper.params.effect !== 'coverflow') { return; } swiper.classNames.push(((swiper.params.containerModifierClass) + "coverflow")); swiper.classNames.push(((swiper.params.containerModifierClass) + "3d")); swiper.params.watchSlidesProgress = true; swiper.originalParams.watchSlidesProgress = true; }, setTranslate: function setTranslate() { var swiper = this; if (swiper.params.effect !== 'coverflow') { return; } swiper.coverflowEffect.setTranslate(); }, setTransition: function setTransition(duration) { var swiper = this; if (swiper.params.effect !== 'coverflow') { return; } swiper.coverflowEffect.setTransition(duration); }, }, }; var Thumbs = { init: function init() { var swiper = this; var ref = swiper.params; var thumbsParams = ref.thumbs; var SwiperClass = swiper.constructor; if (thumbsParams.swiper instanceof SwiperClass) { swiper.thumbs.swiper = thumbsParams.swiper; Utils.extend(swiper.thumbs.swiper.originalParams, { watchSlidesProgress: true, slideToClickedSlide: false, }); Utils.extend(swiper.thumbs.swiper.params, { watchSlidesProgress: true, slideToClickedSlide: false, }); } else if (Utils.isObject(thumbsParams.swiper)) { swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, { watchSlidesVisibility: true, watchSlidesProgress: true, slideToClickedSlide: false, })); swiper.thumbs.swiperCreated = true; } swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass); swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick); }, onThumbClick: function onThumbClick() { var swiper = this; var thumbsSwiper = swiper.thumbs.swiper; if (!thumbsSwiper) { return; } var clickedIndex = thumbsSwiper.clickedIndex; if (typeof clickedIndex === 'undefined' || clickedIndex === null) { return; } var slideToIndex; if (thumbsSwiper.params.loop) { slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10); } else { slideToIndex = clickedIndex; } if (swiper.params.loop) { var currentIndex = swiper.activeIndex; if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) { swiper.loopFix(); // eslint-disable-next-line swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; currentIndex = swiper.activeIndex; } var prevIndex = swiper.slides.eq(currentIndex).prevAll(("[data-swiper-slide-index=\"" + slideToIndex + "\"]")).eq(0).index(); var nextIndex = swiper.slides.eq(currentIndex).nextAll(("[data-swiper-slide-index=\"" + slideToIndex + "\"]")).eq(0).index(); if (typeof prevIndex === 'undefined') { slideToIndex = nextIndex; } else if (typeof nextIndex === 'undefined') { slideToIndex = prevIndex; } else if (nextIndex - currentIndex currentThumbsIndex) { newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; } else { newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; } } else if (newThumbsIndex > currentThumbsIndex) { newThumbsIndex = newThumbsIndex - slidesPerView + 1; } thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); } } // Activate thumbs var thumbsToActivate = 1; var thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { thumbsToActivate = swiper.params.slidesPerView; } thumbsSwiper.slides.removeClass(thumbActiveClass); if (thumbsSwiper.params.loop) { for (var i = 0; i