swiper
Version:
Most modern mobile touch slider and framework with hardware accelerated transitions
1 lines • 86.8 kB
Source Map (JSON)
{"version":3,"file":"swiper_angular.mjs","sources":["../../../src/angular/src/utils/utils.ts","../../../src/angular/src/utils/params-list.ts","../../../src/angular/src/utils/get-params.ts","../../../src/angular/src/swiper-slide.directive.ts","../../../src/angular/src/swiper.component.ts","../../../src/angular/src/swiper.component.html","../../../src/angular/src/swiper.module.ts","../../../src/angular/src/public-api.ts","../../../src/swiper_angular.ts"],"sourcesContent":["export function isObject(o: any): boolean {\r\n return (\r\n typeof o === 'object' &&\r\n o !== null &&\r\n o.constructor &&\r\n Object.prototype.toString.call(o).slice(8, -1) === 'Object'\r\n );\r\n}\r\n\r\nexport function isEnabled(val: boolean | { enabled?: boolean }) {\r\n return typeof val !== 'undefined' && typeof val !== 'boolean' && val.enabled === true;\r\n}\r\n\r\nexport function isShowEl(val: any, obj: any, el: any): boolean {\r\n return (\r\n (coerceBooleanProperty(val) === true && obj && !obj.el) ||\r\n !(\r\n typeof obj !== 'boolean' &&\r\n obj.el !== el?.nativeElement &&\r\n (typeof obj.el === 'string' || typeof obj.el === 'object')\r\n )\r\n );\r\n}\r\n\r\nexport function extend(target: any, src: any) {\r\n const noExtend = ['__proto__', 'constructor', 'prototype'];\r\n Object.keys(src)\r\n .filter((key) => noExtend.indexOf(key) < 0)\r\n .forEach((key) => {\r\n if (typeof target[key] === 'undefined') {\r\n target[key] = src[key];\r\n return;\r\n }\r\n if (target[key] && !src[key]) {\r\n return;\r\n }\r\n if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\r\n if (src[key].__swiper__) target[key] = src[key];\r\n else extend(target[key], src[key]);\r\n } else {\r\n target[key] = src[key];\r\n }\r\n });\r\n}\r\n\r\nexport function coerceBooleanProperty(value: any): boolean {\r\n return value != null && `${value}` !== 'false';\r\n}\r\n\r\nexport const ignoreNgOnChanges = ['pagination', 'navigation', 'scrollbar', 'virtual'];\r\n\r\nexport function setProperty(val: any, obj = {}): {} | false {\r\n if (isObject(val)) {\r\n return val;\r\n }\r\n\r\n if (coerceBooleanProperty(val) === true) {\r\n return obj;\r\n }\r\n\r\n return false;\r\n}\r\n","/* underscore in name -> watch for changes */\r\nexport const paramsList = [\r\n 'init',\r\n 'enabled',\r\n '_direction',\r\n 'touchEventsTarget',\r\n 'initialSlide',\r\n '_speed',\r\n 'cssMode',\r\n 'updateOnWindowResize',\r\n 'resizeObserver',\r\n 'nested',\r\n 'focusableElements',\r\n '_width',\r\n '_height',\r\n 'preventInteractionOnTransition',\r\n 'userAgent',\r\n 'url',\r\n '_edgeSwipeDetection',\r\n '_edgeSwipeThreshold',\r\n '_freeMode',\r\n '_autoHeight',\r\n 'setWrapperSize',\r\n 'virtualTranslate',\r\n '_effect',\r\n 'breakpoints',\r\n '_spaceBetween',\r\n '_slidesPerView',\r\n 'maxBackfaceHiddenSlides',\r\n '_grid',\r\n '_slidesPerGroup',\r\n '_slidesPerGroupSkip',\r\n '_centeredSlides',\r\n '_centeredSlidesBounds',\r\n '_slidesOffsetBefore',\r\n '_slidesOffsetAfter',\r\n 'normalizeSlideIndex',\r\n '_centerInsufficientSlides',\r\n '_watchOverflow',\r\n 'roundLengths',\r\n 'touchRatio',\r\n 'touchAngle',\r\n 'simulateTouch',\r\n '_shortSwipes',\r\n '_longSwipes',\r\n 'longSwipesRatio',\r\n 'longSwipesMs',\r\n '_followFinger',\r\n 'allowTouchMove',\r\n '_threshold',\r\n 'touchMoveStopPropagation',\r\n 'touchStartPreventDefault',\r\n 'touchStartForcePreventDefault',\r\n 'touchReleaseOnEdges',\r\n 'uniqueNavElements',\r\n '_resistance',\r\n '_resistanceRatio',\r\n '_watchSlidesProgress',\r\n '_grabCursor',\r\n 'preventClicks',\r\n 'preventClicksPropagation',\r\n '_slideToClickedSlide',\r\n '_preloadImages',\r\n 'updateOnImagesReady',\r\n '_loop',\r\n '_loopAdditionalSlides',\r\n '_loopedSlides',\r\n '_loopFillGroupWithBlank',\r\n 'loopPreventsSlide',\r\n '_rewind',\r\n '_allowSlidePrev',\r\n '_allowSlideNext',\r\n '_swipeHandler',\r\n '_noSwiping',\r\n 'noSwipingClass',\r\n 'noSwipingSelector',\r\n 'passiveListeners',\r\n 'containerModifierClass',\r\n 'slideClass',\r\n 'slideBlankClass',\r\n 'slideActiveClass',\r\n 'slideDuplicateActiveClass',\r\n 'slideVisibleClass',\r\n 'slideDuplicateClass',\r\n 'slideNextClass',\r\n 'slideDuplicateNextClass',\r\n 'slidePrevClass',\r\n 'slideDuplicatePrevClass',\r\n 'wrapperClass',\r\n 'runCallbacksOnInit',\r\n 'observer',\r\n 'observeParents',\r\n 'observeSlideChildren',\r\n\r\n // modules\r\n 'a11y',\r\n 'autoplay',\r\n '_controller',\r\n 'coverflowEffect',\r\n 'cubeEffect',\r\n 'fadeEffect',\r\n 'flipEffect',\r\n 'creativeEffect',\r\n 'cardsEffect',\r\n 'hashNavigation',\r\n 'history',\r\n 'keyboard',\r\n 'lazy',\r\n 'mousewheel',\r\n '_navigation',\r\n '_pagination',\r\n 'parallax',\r\n '_scrollbar',\r\n '_thumbs',\r\n 'virtual',\r\n 'zoom',\r\n 'on',\r\n];\r\n","import { isObject, extend } from './utils';\r\nimport { paramsList } from './params-list';\r\n// @ts-ignore\r\nimport Swiper from 'swiper';\r\ntype KeyValueType = { [x: string]: any };\r\nexport const allowedParams = paramsList.map((key) => key.replace(/_/, ''));\r\nexport function getParams(obj: any = {}) {\r\n const params: any = {\r\n on: {},\r\n };\r\n // const events = {};\r\n const passedParams: KeyValueType = {};\r\n extend(params, Swiper.defaults);\r\n extend(params, Swiper.extendedDefaults);\r\n params._emitClasses = true;\r\n params.init = false;\r\n\r\n const rest: KeyValueType = {};\r\n const allowedParams = paramsList.map((key) => key.replace(/_/, ''));\r\n Object.keys(obj).forEach((key: string) => {\r\n const _key = key.replace(/^_/, '');\r\n if (allowedParams.indexOf(_key) >= 0) {\r\n if (isObject(obj[key])) {\r\n params[_key] = {};\r\n passedParams[_key] = {};\r\n extend(params[_key], obj[key]);\r\n extend(passedParams[_key], obj[key]);\r\n } else {\r\n params[_key] = obj[key];\r\n passedParams[_key] = obj[key];\r\n }\r\n }\r\n // else if (key.search(/on[A-Z]/) === 0 && typeof obj[key] === 'function') {\r\n // events[`${_key[2].toLowerCase()}${key.substr(3)}`] = obj[key];\r\n // }\r\n else {\r\n rest[_key] = obj[key];\r\n }\r\n });\r\n ['navigation', 'pagination', 'scrollbar'].forEach((key) => {\r\n if (params[key] === true) params[key] = {};\r\n if (params[key] === false) delete params[key];\r\n });\r\n\r\n return { params, passedParams, rest };\r\n}\r\n","import { Directive, Input, TemplateRef } from '@angular/core';\r\nimport { coerceBooleanProperty } from './utils/utils';\r\n@Directive({\r\n selector: 'ng-template[swiperSlide]',\r\n})\r\nexport class SwiperSlideDirective {\r\n @Input() virtualIndex: number;\r\n @Input() class: string = '';\r\n @Input()\r\n set ngClass(val: string) {\r\n this.class = [this.class || '', val].join(' ');\r\n }\r\n @Input('data-swiper-autoplay') autoplayDelay: string | null = null;\r\n @Input()\r\n set zoom(val: boolean) {\r\n this._zoom = coerceBooleanProperty(val);\r\n }\r\n get zoom() {\r\n return this._zoom;\r\n }\r\n private _zoom: boolean;\r\n slideIndex: number;\r\n get classNames() {\r\n return this._classNames;\r\n }\r\n set classNames(val) {\r\n if (this._classNames === val) {\r\n return;\r\n }\r\n this._classNames = val;\r\n this.slideData = {\r\n isActive: this._hasClass(['swiper-slide-active', 'swiper-slide-duplicate-active']),\r\n isVisible: this._hasClass(['swiper-slide-visible']),\r\n isDuplicate: this._hasClass(['swiper-slide-duplicate']),\r\n isPrev: this._hasClass(['swiper-slide-prev', 'swiper-slide-duplicate-prev']),\r\n isNext: this._hasClass(['swiper-slide-next', 'swiper-slide-duplicate-next']),\r\n };\r\n }\r\n\r\n private _hasClass(classNames: string[]) {\r\n return classNames.some((className) => this._classNames.indexOf(className) >= 0);\r\n }\r\n slideData = {\r\n isActive: false,\r\n isPrev: false,\r\n isNext: false,\r\n isVisible: false,\r\n isDuplicate: false,\r\n };\r\n\r\n private _classNames: string;\r\n constructor(public template: TemplateRef<any>) {}\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ContentChildren,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n Inject,\r\n Input,\r\n NgZone,\r\n OnInit,\r\n Output,\r\n PLATFORM_ID,\r\n QueryList,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n// @ts-ignore\r\nimport Swiper from 'swiper';\r\nimport { Observable, of, Subject } from 'rxjs';\r\nimport { getParams } from './utils/get-params';\r\nimport { SwiperSlideDirective } from './swiper-slide.directive';\r\nimport { EventsParams } from './swiper-events';\r\nimport {\r\n extend,\r\n isObject,\r\n setProperty,\r\n ignoreNgOnChanges,\r\n coerceBooleanProperty,\r\n isShowEl,\r\n isEnabled,\r\n} from './utils/utils';\r\nimport {\r\n SwiperOptions,\r\n SwiperEvents,\r\n NavigationOptions,\r\n PaginationOptions,\r\n ScrollbarOptions,\r\n VirtualOptions,\r\n} from 'swiper/types';\r\nimport { isPlatformBrowser } from '@angular/common';\r\n@Component({\r\n selector: 'swiper, [swiper]',\r\n templateUrl: './swiper.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n styles: [\r\n `\r\n swiper {\r\n display: block;\r\n }\r\n `,\r\n ],\r\n})\r\nexport class SwiperComponent implements OnInit {\r\n @Input() enabled: SwiperOptions['enabled'];\r\n @Input() on: SwiperOptions['on'];\r\n @Input() direction: SwiperOptions['direction'];\r\n @Input() touchEventsTarget: SwiperOptions['touchEventsTarget'];\r\n @Input() initialSlide: SwiperOptions['initialSlide'];\r\n @Input() speed: SwiperOptions['speed'];\r\n @Input() cssMode: SwiperOptions['cssMode'];\r\n @Input() updateOnWindowResize: SwiperOptions['updateOnWindowResize'];\r\n @Input() resizeObserver: SwiperOptions['resizeObserver'];\r\n @Input() nested: SwiperOptions['nested'];\r\n @Input() focusableElements: SwiperOptions['focusableElements'];\r\n @Input() width: SwiperOptions['width'];\r\n @Input() height: SwiperOptions['height'];\r\n @Input() preventInteractionOnTransition: SwiperOptions['preventInteractionOnTransition'];\r\n @Input() userAgent: SwiperOptions['userAgent'];\r\n @Input() url: SwiperOptions['url'];\r\n @Input() edgeSwipeDetection: boolean | string;\r\n @Input() edgeSwipeThreshold: number;\r\n @Input() freeMode: SwiperOptions['freeMode'];\r\n @Input() autoHeight: SwiperOptions['autoHeight'];\r\n @Input() setWrapperSize: SwiperOptions['setWrapperSize'];\r\n @Input() virtualTranslate: SwiperOptions['virtualTranslate'];\r\n @Input() effect: SwiperOptions['effect'];\r\n @Input() breakpoints: SwiperOptions['breakpoints'];\r\n @Input() spaceBetween: SwiperOptions['spaceBetween'];\r\n @Input() slidesPerView: SwiperOptions['slidesPerView'];\r\n @Input() maxBackfaceHiddenSlides: SwiperOptions['maxBackfaceHiddenSlides'];\r\n @Input() grid: SwiperOptions['grid'];\r\n @Input() slidesPerGroup: SwiperOptions['slidesPerGroup'];\r\n @Input() slidesPerGroupSkip: SwiperOptions['slidesPerGroupSkip'];\r\n @Input() centeredSlides: SwiperOptions['centeredSlides'];\r\n @Input() centeredSlidesBounds: SwiperOptions['centeredSlidesBounds'];\r\n @Input() slidesOffsetBefore: SwiperOptions['slidesOffsetBefore'];\r\n @Input() slidesOffsetAfter: SwiperOptions['slidesOffsetAfter'];\r\n @Input() normalizeSlideIndex: SwiperOptions['normalizeSlideIndex'];\r\n @Input() centerInsufficientSlides: SwiperOptions['centerInsufficientSlides'];\r\n @Input() watchOverflow: SwiperOptions['watchOverflow'];\r\n @Input() roundLengths: SwiperOptions['roundLengths'];\r\n @Input() touchRatio: SwiperOptions['touchRatio'];\r\n @Input() touchAngle: SwiperOptions['touchAngle'];\r\n @Input() simulateTouch: SwiperOptions['simulateTouch'];\r\n @Input() shortSwipes: SwiperOptions['shortSwipes'];\r\n @Input() longSwipes: SwiperOptions['longSwipes'];\r\n @Input() longSwipesRatio: SwiperOptions['longSwipesRatio'];\r\n @Input() longSwipesMs: SwiperOptions['longSwipesMs'];\r\n @Input() followFinger: SwiperOptions['followFinger'];\r\n @Input() allowTouchMove: SwiperOptions['allowTouchMove'];\r\n @Input() threshold: SwiperOptions['threshold'];\r\n @Input() touchMoveStopPropagation: SwiperOptions['touchMoveStopPropagation'];\r\n @Input() touchStartPreventDefault: SwiperOptions['touchStartPreventDefault'];\r\n @Input() touchStartForcePreventDefault: SwiperOptions['touchStartForcePreventDefault'];\r\n @Input() touchReleaseOnEdges: SwiperOptions['touchReleaseOnEdges'];\r\n @Input() uniqueNavElements: SwiperOptions['uniqueNavElements'];\r\n @Input() resistance: SwiperOptions['resistance'];\r\n @Input() resistanceRatio: SwiperOptions['resistanceRatio'];\r\n @Input() watchSlidesProgress: SwiperOptions['watchSlidesProgress'];\r\n @Input() grabCursor: SwiperOptions['grabCursor'];\r\n @Input() preventClicks: SwiperOptions['preventClicks'];\r\n @Input() preventClicksPropagation: SwiperOptions['preventClicksPropagation'];\r\n @Input() slideToClickedSlide: SwiperOptions['slideToClickedSlide'];\r\n @Input() preloadImages: SwiperOptions['preloadImages'];\r\n @Input() updateOnImagesReady: SwiperOptions['updateOnImagesReady'];\r\n @Input() loop: SwiperOptions['loop'];\r\n @Input() loopAdditionalSlides: SwiperOptions['loopAdditionalSlides'];\r\n @Input() loopedSlides: SwiperOptions['loopedSlides'];\r\n @Input() loopFillGroupWithBlank: SwiperOptions['loopFillGroupWithBlank'];\r\n @Input() loopPreventsSlide: SwiperOptions['loopPreventsSlide'];\r\n @Input() rewind: SwiperOptions['rewind'];\r\n @Input() allowSlidePrev: SwiperOptions['allowSlidePrev'];\r\n @Input() allowSlideNext: SwiperOptions['allowSlideNext'];\r\n @Input() swipeHandler: SwiperOptions['swipeHandler'];\r\n @Input() noSwiping: SwiperOptions['noSwiping'];\r\n @Input() noSwipingClass: SwiperOptions['noSwipingClass'];\r\n @Input() noSwipingSelector: SwiperOptions['noSwipingSelector'];\r\n @Input() passiveListeners: SwiperOptions['passiveListeners'];\r\n @Input() containerModifierClass: SwiperOptions['containerModifierClass'];\r\n @Input() slideClass: SwiperOptions['slideClass'] = 'swiper-slide';\r\n @Input() slideBlankClass: SwiperOptions['slideBlankClass'];\r\n @Input() slideActiveClass: SwiperOptions['slideActiveClass'];\r\n @Input() slideDuplicateActiveClass: SwiperOptions['slideDuplicateActiveClass'];\r\n @Input() slideVisibleClass: SwiperOptions['slideVisibleClass'];\r\n @Input() slideDuplicateClass: SwiperOptions['slideDuplicateClass'];\r\n @Input() slideNextClass: SwiperOptions['slideNextClass'];\r\n @Input() slideDuplicateNextClass: SwiperOptions['slideDuplicateNextClass'];\r\n @Input() slidePrevClass: SwiperOptions['slidePrevClass'];\r\n @Input() slideDuplicatePrevClass: SwiperOptions['slideDuplicatePrevClass'];\r\n @Input() wrapperClass: SwiperOptions['wrapperClass'] = 'swiper-wrapper';\r\n @Input() runCallbacksOnInit: SwiperOptions['runCallbacksOnInit'];\r\n @Input() observeParents: SwiperOptions['observeParents'];\r\n @Input() observeSlideChildren: SwiperOptions['observeSlideChildren'];\r\n @Input() a11y: SwiperOptions['a11y'];\r\n @Input() autoplay: SwiperOptions['autoplay'];\r\n @Input() controller: SwiperOptions['controller'];\r\n @Input() coverflowEffect: SwiperOptions['coverflowEffect'];\r\n @Input() cubeEffect: SwiperOptions['cubeEffect'];\r\n @Input() fadeEffect: SwiperOptions['fadeEffect'];\r\n @Input() flipEffect: SwiperOptions['flipEffect'];\r\n @Input() creativeEffect: SwiperOptions['creativeEffect'];\r\n @Input() cardsEffect: SwiperOptions['cardsEffect'];\r\n @Input() hashNavigation: SwiperOptions['hashNavigation'];\r\n @Input() history: SwiperOptions['history'];\r\n @Input() keyboard: SwiperOptions['keyboard'];\r\n @Input() lazy: SwiperOptions['lazy'];\r\n @Input() mousewheel: SwiperOptions['mousewheel'];\r\n @Input() parallax: SwiperOptions['parallax'];\r\n @Input() thumbs: SwiperOptions['thumbs'];\r\n @Input() zoom: SwiperOptions['zoom'];\r\n @Input() class: string;\r\n @Input() id: string;\r\n @Input()\r\n set navigation(val) {\r\n const currentNext =\r\n typeof this._navigation !== 'boolean' && this._navigation !== ''\r\n ? this._navigation?.nextEl\r\n : null;\r\n const currentPrev =\r\n typeof this._navigation !== 'boolean' && this._navigation !== ''\r\n ? this._navigation?.prevEl\r\n : null;\r\n this._navigation = setProperty(val, {\r\n nextEl: currentNext || null,\r\n prevEl: currentPrev || null,\r\n });\r\n this.showNavigation = !(\r\n coerceBooleanProperty(val) !== true ||\r\n (this._navigation &&\r\n typeof this._navigation !== 'boolean' &&\r\n this._navigation.prevEl !== this._prevElRef?.nativeElement &&\r\n (this._navigation.prevEl !== null || this._navigation.nextEl !== null) &&\r\n (typeof this._navigation.nextEl === 'string' ||\r\n typeof this._navigation.prevEl === 'string' ||\r\n typeof this._navigation.nextEl === 'object' ||\r\n typeof this._navigation.prevEl === 'object'))\r\n );\r\n }\r\n get navigation() {\r\n return this._navigation;\r\n }\r\n private _navigation: NavigationOptions | boolean | '';\r\n showNavigation: boolean = true;\r\n\r\n @Input()\r\n set pagination(val) {\r\n const current =\r\n typeof this._pagination !== 'boolean' && this._pagination !== ''\r\n ? this._pagination?.el\r\n : null;\r\n this._pagination = setProperty(val, {\r\n el: current || null,\r\n });\r\n this.showPagination = isShowEl(val, this._pagination, this._paginationElRef);\r\n }\r\n get pagination() {\r\n return this._pagination;\r\n }\r\n private _pagination: PaginationOptions | boolean | '';\r\n showPagination: boolean = true;\r\n\r\n @Input()\r\n set scrollbar(val) {\r\n const current =\r\n typeof this._scrollbar !== 'boolean' && this._scrollbar !== '' ? this._scrollbar?.el : null;\r\n this._scrollbar = setProperty(val, {\r\n el: current || null,\r\n });\r\n this.showScrollbar = isShowEl(val, this._scrollbar, this._scrollbarElRef);\r\n }\r\n get scrollbar() {\r\n return this._scrollbar;\r\n }\r\n private _scrollbar: ScrollbarOptions | boolean | '';\r\n showScrollbar: boolean = true;\r\n\r\n @Input()\r\n set virtual(val) {\r\n this._virtual = setProperty(val);\r\n }\r\n get virtual() {\r\n return this._virtual;\r\n }\r\n private _virtual: VirtualOptions | boolean | '';\r\n\r\n @Input()\r\n set config(val: SwiperOptions) {\r\n this.updateSwiper(val);\r\n const { params } = getParams(val);\r\n Object.assign(this, params);\r\n }\r\n @Output('_beforeBreakpoint') s__beforeBreakpoint = new EventEmitter<\r\n EventsParams['_beforeBreakpoint']\r\n >();\r\n\r\n @Output('_containerClasses') s__containerClasses = new EventEmitter<\r\n EventsParams['_containerClasses']\r\n >();\r\n\r\n @Output('_slideClass') s__slideClass = new EventEmitter<EventsParams['_slideClass']>();\r\n\r\n @Output('_swiper') s__swiper = new EventEmitter<EventsParams['_swiper']>();\r\n\r\n @Output('activeIndexChange') s_activeIndexChange = new EventEmitter<\r\n EventsParams['activeIndexChange']\r\n >();\r\n\r\n @Output('afterInit') s_afterInit = new EventEmitter<EventsParams['afterInit']>();\r\n\r\n @Output('autoplay') s_autoplay = new EventEmitter<EventsParams['autoplay']>();\r\n\r\n @Output('autoplayStart') s_autoplayStart = new EventEmitter<EventsParams['autoplayStart']>();\r\n\r\n @Output('autoplayStop') s_autoplayStop = new EventEmitter<EventsParams['autoplayStop']>();\r\n\r\n @Output('autoplayPause') s_autoplayPause = new EventEmitter<EventsParams['autoplayPause']>();\r\n\r\n @Output('autoplayResume') s_autoplayResume = new EventEmitter<EventsParams['autoplayResume']>();\r\n\r\n @Output('beforeDestroy') s_beforeDestroy = new EventEmitter<EventsParams['beforeDestroy']>();\r\n\r\n @Output('beforeInit') s_beforeInit = new EventEmitter<EventsParams['beforeInit']>();\r\n\r\n @Output('beforeLoopFix') s_beforeLoopFix = new EventEmitter<EventsParams['beforeLoopFix']>();\r\n\r\n @Output('beforeResize') s_beforeResize = new EventEmitter<EventsParams['beforeResize']>();\r\n\r\n @Output('beforeSlideChangeStart') s_beforeSlideChangeStart = new EventEmitter<\r\n EventsParams['beforeSlideChangeStart']\r\n >();\r\n\r\n @Output('beforeTransitionStart') s_beforeTransitionStart = new EventEmitter<\r\n EventsParams['beforeTransitionStart']\r\n >();\r\n\r\n @Output('breakpoint') s_breakpoint = new EventEmitter<EventsParams['breakpoint']>();\r\n\r\n @Output('changeDirection') s_changeDirection = new EventEmitter<\r\n EventsParams['changeDirection']\r\n >();\r\n\r\n @Output('click') s_click = new EventEmitter<EventsParams['click']>();\r\n\r\n @Output('doubleTap') s_doubleTap = new EventEmitter<EventsParams['doubleTap']>();\r\n\r\n @Output('doubleClick') s_doubleClick = new EventEmitter<EventsParams['doubleClick']>();\r\n\r\n @Output('destroy') s_destroy = new EventEmitter<EventsParams['destroy']>();\r\n\r\n @Output('fromEdge') s_fromEdge = new EventEmitter<EventsParams['fromEdge']>();\r\n\r\n @Output('hashChange') s_hashChange = new EventEmitter<EventsParams['hashChange']>();\r\n\r\n @Output('hashSet') s_hashSet = new EventEmitter<EventsParams['hashSet']>();\r\n\r\n @Output('imagesReady') s_imagesReady = new EventEmitter<EventsParams['imagesReady']>();\r\n\r\n @Output('init') s_init = new EventEmitter<EventsParams['init']>();\r\n\r\n @Output('keyPress') s_keyPress = new EventEmitter<EventsParams['keyPress']>();\r\n\r\n @Output('lazyImageLoad') s_lazyImageLoad = new EventEmitter<EventsParams['lazyImageLoad']>();\r\n\r\n @Output('lazyImageReady') s_lazyImageReady = new EventEmitter<EventsParams['lazyImageReady']>();\r\n\r\n @Output('loopFix') s_loopFix = new EventEmitter<EventsParams['loopFix']>();\r\n\r\n @Output('momentumBounce') s_momentumBounce = new EventEmitter<EventsParams['momentumBounce']>();\r\n\r\n @Output('navigationHide') s_navigationHide = new EventEmitter<EventsParams['navigationHide']>();\r\n\r\n @Output('navigationShow') s_navigationShow = new EventEmitter<EventsParams['navigationShow']>();\r\n\r\n @Output('navigationPrev') s_navigationPrev = new EventEmitter<EventsParams['navigationPrev']>();\r\n\r\n @Output('navigationNext') s_navigationNext = new EventEmitter<EventsParams['navigationNext']>();\r\n\r\n @Output('observerUpdate') s_observerUpdate = new EventEmitter<EventsParams['observerUpdate']>();\r\n\r\n @Output('orientationchange') s_orientationchange = new EventEmitter<\r\n EventsParams['orientationchange']\r\n >();\r\n\r\n @Output('paginationHide') s_paginationHide = new EventEmitter<EventsParams['paginationHide']>();\r\n\r\n @Output('paginationRender') s_paginationRender = new EventEmitter<\r\n EventsParams['paginationRender']\r\n >();\r\n\r\n @Output('paginationShow') s_paginationShow = new EventEmitter<EventsParams['paginationShow']>();\r\n\r\n @Output('paginationUpdate') s_paginationUpdate = new EventEmitter<\r\n EventsParams['paginationUpdate']\r\n >();\r\n\r\n @Output('progress') s_progress = new EventEmitter<EventsParams['progress']>();\r\n\r\n @Output('reachBeginning') s_reachBeginning = new EventEmitter<EventsParams['reachBeginning']>();\r\n\r\n @Output('reachEnd') s_reachEnd = new EventEmitter<EventsParams['reachEnd']>();\r\n\r\n @Output('realIndexChange') s_realIndexChange = new EventEmitter<\r\n EventsParams['realIndexChange']\r\n >();\r\n\r\n @Output('resize') s_resize = new EventEmitter<EventsParams['resize']>();\r\n\r\n @Output('scroll') s_scroll = new EventEmitter<EventsParams['scroll']>();\r\n\r\n @Output('scrollbarDragEnd') s_scrollbarDragEnd = new EventEmitter<\r\n EventsParams['scrollbarDragEnd']\r\n >();\r\n\r\n @Output('scrollbarDragMove') s_scrollbarDragMove = new EventEmitter<\r\n EventsParams['scrollbarDragMove']\r\n >();\r\n\r\n @Output('scrollbarDragStart') s_scrollbarDragStart = new EventEmitter<\r\n EventsParams['scrollbarDragStart']\r\n >();\r\n\r\n @Output('setTransition') s_setTransition = new EventEmitter<EventsParams['setTransition']>();\r\n\r\n @Output('setTranslate') s_setTranslate = new EventEmitter<EventsParams['setTranslate']>();\r\n\r\n @Output('slideChange') s_slideChange = new EventEmitter<EventsParams['slideChange']>();\r\n\r\n @Output('slideChangeTransitionEnd') s_slideChangeTransitionEnd = new EventEmitter<\r\n EventsParams['slideChangeTransitionEnd']\r\n >();\r\n\r\n @Output('slideChangeTransitionStart') s_slideChangeTransitionStart = new EventEmitter<\r\n EventsParams['slideChangeTransitionStart']\r\n >();\r\n\r\n @Output('slideNextTransitionEnd') s_slideNextTransitionEnd = new EventEmitter<\r\n EventsParams['slideNextTransitionEnd']\r\n >();\r\n\r\n @Output('slideNextTransitionStart') s_slideNextTransitionStart = new EventEmitter<\r\n EventsParams['slideNextTransitionStart']\r\n >();\r\n\r\n @Output('slidePrevTransitionEnd') s_slidePrevTransitionEnd = new EventEmitter<\r\n EventsParams['slidePrevTransitionEnd']\r\n >();\r\n\r\n @Output('slidePrevTransitionStart') s_slidePrevTransitionStart = new EventEmitter<\r\n EventsParams['slidePrevTransitionStart']\r\n >();\r\n\r\n @Output('slideResetTransitionStart') s_slideResetTransitionStart = new EventEmitter<\r\n EventsParams['slideResetTransitionStart']\r\n >();\r\n\r\n @Output('slideResetTransitionEnd') s_slideResetTransitionEnd = new EventEmitter<\r\n EventsParams['slideResetTransitionEnd']\r\n >();\r\n\r\n @Output('sliderMove') s_sliderMove = new EventEmitter<EventsParams['sliderMove']>();\r\n\r\n @Output('sliderFirstMove') s_sliderFirstMove = new EventEmitter<\r\n EventsParams['sliderFirstMove']\r\n >();\r\n\r\n @Output('slidesLengthChange') s_slidesLengthChange = new EventEmitter<\r\n EventsParams['slidesLengthChange']\r\n >();\r\n\r\n @Output('slidesGridLengthChange') s_slidesGridLengthChange = new EventEmitter<\r\n EventsParams['slidesGridLengthChange']\r\n >();\r\n\r\n @Output('snapGridLengthChange') s_snapGridLengthChange = new EventEmitter<\r\n EventsParams['snapGridLengthChange']\r\n >();\r\n\r\n @Output('snapIndexChange') s_snapIndexChange = new EventEmitter<\r\n EventsParams['snapIndexChange']\r\n >();\r\n\r\n @Output('tap') s_tap = new EventEmitter<EventsParams['tap']>();\r\n\r\n @Output('toEdge') s_toEdge = new EventEmitter<EventsParams['toEdge']>();\r\n\r\n @Output('touchEnd') s_touchEnd = new EventEmitter<EventsParams['touchEnd']>();\r\n\r\n @Output('touchMove') s_touchMove = new EventEmitter<EventsParams['touchMove']>();\r\n\r\n @Output('touchMoveOpposite') s_touchMoveOpposite = new EventEmitter<\r\n EventsParams['touchMoveOpposite']\r\n >();\r\n\r\n @Output('touchStart') s_touchStart = new EventEmitter<EventsParams['touchStart']>();\r\n\r\n @Output('transitionEnd') s_transitionEnd = new EventEmitter<EventsParams['transitionEnd']>();\r\n\r\n @Output('transitionStart') s_transitionStart = new EventEmitter<\r\n EventsParams['transitionStart']\r\n >();\r\n\r\n @Output('update') s_update = new EventEmitter<EventsParams['update']>();\r\n\r\n @Output('zoomChange') s_zoomChange = new EventEmitter<EventsParams['zoomChange']>();\r\n\r\n @Output('swiper') s_swiper = new EventEmitter<any>();\r\n\r\n @Output('lock') s_lock = new EventEmitter<EventsParams['lock']>();\r\n\r\n @Output('unlock') s_unlock = new EventEmitter<EventsParams['unlock']>();\r\n\r\n @ViewChild('prevElRef', { static: false })\r\n set prevElRef(el: ElementRef) {\r\n this._prevElRef = el;\r\n this._setElement(el, this.navigation, 'navigation', 'prevEl');\r\n }\r\n _prevElRef: ElementRef;\r\n @ViewChild('nextElRef', { static: false })\r\n set nextElRef(el: ElementRef) {\r\n this._nextElRef = el;\r\n this._setElement(el, this.navigation, 'navigation', 'nextEl');\r\n }\r\n _nextElRef: ElementRef;\r\n @ViewChild('scrollbarElRef', { static: false })\r\n set scrollbarElRef(el: ElementRef) {\r\n this._scrollbarElRef = el;\r\n this._setElement(el, this.scrollbar, 'scrollbar');\r\n }\r\n _scrollbarElRef: ElementRef;\r\n @ViewChild('paginationElRef', { static: false })\r\n set paginationElRef(el: ElementRef) {\r\n this._paginationElRef = el;\r\n this._setElement(el, this.pagination, 'pagination');\r\n }\r\n _paginationElRef: ElementRef;\r\n @ContentChildren(SwiperSlideDirective, { descendants: false, emitDistinctChangesOnly: true })\r\n slidesEl: QueryList<SwiperSlideDirective>;\r\n private slides: SwiperSlideDirective[];\r\n\r\n prependSlides: Observable<SwiperSlideDirective[]>;\r\n appendSlides: Observable<SwiperSlideDirective[]>;\r\n\r\n swiperRef: Swiper;\r\n readonly _activeSlides = new Subject<SwiperSlideDirective[]>();\r\n\r\n get activeSlides() {\r\n if (this.virtual) {\r\n return this._activeSlides;\r\n }\r\n return of(this.slides);\r\n }\r\n\r\n get zoomContainerClass() {\r\n return this.zoom && typeof this.zoom !== 'boolean'\r\n ? this.zoom.containerClass\r\n : 'swiper-zoom-container';\r\n }\r\n\r\n @HostBinding('class') containerClasses: string = 'swiper';\r\n constructor(\r\n private _ngZone: NgZone,\r\n private elementRef: ElementRef,\r\n private _changeDetectorRef: ChangeDetectorRef,\r\n @Inject(PLATFORM_ID) private _platformId: Object,\r\n ) {}\r\n\r\n private _setElement(el: ElementRef, ref: any, update: string, key = 'el') {\r\n if (!ref || !el) return;\r\n if (el.nativeElement) {\r\n if (ref[key] === el.nativeElement) {\r\n return;\r\n }\r\n ref[key] = el.nativeElement;\r\n }\r\n const updateObj: { [key: string]: boolean } = {};\r\n updateObj[update] = true;\r\n this.updateInitSwiper(updateObj);\r\n }\r\n ngOnInit(): void {\r\n const { params } = getParams(this);\r\n Object.assign(this, params);\r\n }\r\n ngAfterViewInit() {\r\n this.childrenSlidesInit();\r\n this.initSwiper();\r\n this._changeDetectorRef.detectChanges();\r\n setTimeout(() => {\r\n this.s_swiper.emit(this.swiperRef);\r\n });\r\n }\r\n\r\n private childrenSlidesInit() {\r\n this.slidesChanges(this.slidesEl);\r\n this.slidesEl.changes.subscribe(this.slidesChanges);\r\n }\r\n\r\n private slidesChanges = (val: QueryList<SwiperSlideDirective>) => {\r\n this.slides = val.map((slide: SwiperSlideDirective, index: number) => {\r\n slide.slideIndex = index;\r\n slide.classNames = this.slideClass || '';\r\n return slide;\r\n });\r\n if (this.loop && !this.loopedSlides) {\r\n this.calcLoopedSlides();\r\n }\r\n if (!this.virtual) {\r\n if (this.loopedSlides) {\r\n this.prependSlides = of(this.slides.slice(this.slides.length - this.loopedSlides));\r\n this.appendSlides = of(this.slides.slice(0, this.loopedSlides));\r\n }\r\n } else if (this.swiperRef && this.swiperRef.virtual) {\r\n this._ngZone.runOutsideAngular(() => {\r\n this.swiperRef.virtual.slides = this.slides;\r\n this.swiperRef.virtual.update(true);\r\n });\r\n }\r\n this._changeDetectorRef.detectChanges();\r\n };\r\n\r\n get isSwiperActive() {\r\n return this.swiperRef && !this.swiperRef.destroyed;\r\n }\r\n\r\n initSwiper() {\r\n const { params: swiperParams, passedParams } = getParams(this);\r\n Object.assign(this, swiperParams);\r\n this._ngZone.runOutsideAngular(() => {\r\n swiperParams.init = false;\r\n if (!swiperParams.virtual) {\r\n swiperParams.observer = true;\r\n }\r\n\r\n swiperParams.onAny = (eventName: keyof SwiperComponent, ...args: any[]) => {\r\n const emitter = this[('s_' + eventName) as keyof SwiperComponent] as EventEmitter<any>;\r\n if (emitter) {\r\n emitter.emit([...args]);\r\n }\r\n };\r\n const _slideClasses: SwiperEvents['_slideClasses'] = (_, updated) => {\r\n updated.forEach(({ slideEl, classNames }, index) => {\r\n const dataIndex = slideEl.getAttribute('data-swiper-slide-index');\r\n const slideIndex = dataIndex ? parseInt(dataIndex) : index;\r\n if (this.virtual) {\r\n const virtualSlide = this.slides.find((item) => {\r\n return item.virtualIndex && item.virtualIndex === slideIndex;\r\n });\r\n if (virtualSlide) {\r\n virtualSlide.classNames = classNames;\r\n return;\r\n }\r\n }\r\n\r\n if (this.slides[slideIndex]) {\r\n this.slides[slideIndex].classNames = classNames;\r\n }\r\n });\r\n this._changeDetectorRef.detectChanges();\r\n };\r\n const _containerClasses: SwiperEvents['_containerClasses'] = (_, classes) => {\r\n setTimeout(() => {\r\n this.containerClasses = classes;\r\n });\r\n };\r\n Object.assign(swiperParams.on, {\r\n _containerClasses,\r\n _slideClasses,\r\n });\r\n const swiperRef = new Swiper(swiperParams);\r\n swiperRef.loopCreate = () => {};\r\n swiperRef.loopDestroy = () => {};\r\n if (swiperParams.loop) {\r\n swiperRef.loopedSlides = this.loopedSlides;\r\n }\r\n const isVirtualEnabled = isEnabled(swiperRef.params.virtual);\r\n if (swiperRef.virtual && isVirtualEnabled) {\r\n swiperRef.virtual.slides = this.slides;\r\n const extendWith = {\r\n cache: false,\r\n slides: this.slides,\r\n renderExternal: this.updateVirtualSlides,\r\n renderExternalUpdate: false,\r\n };\r\n extend(swiperRef.params.virtual, extendWith);\r\n extend(swiperRef.originalParams.virtual, extendWith);\r\n }\r\n\r\n if (isPlatformBrowser(this._platformId)) {\r\n this.swiperRef = swiperRef.init(this.elementRef.nativeElement);\r\n const isVirtualEnabled = isEnabled(this.swiperRef.params.virtual);\r\n if (this.swiperRef.virtual && isVirtualEnabled) {\r\n this.swiperRef.virtual.update(true);\r\n }\r\n this._changeDetectorRef.detectChanges();\r\n }\r\n });\r\n }\r\n\r\n style: any = null;\r\n currentVirtualData: any; // TODO: type virtualData;\r\n private updateVirtualSlides = (virtualData: any) => {\r\n // TODO: type virtualData\r\n if (\r\n !this.swiperRef ||\r\n (this.currentVirtualData &&\r\n this.currentVirtualData.from === virtualData.from &&\r\n this.currentVirtualData.to === virtualData.to &&\r\n this.currentVirtualData.offset === virtualData.offset)\r\n ) {\r\n return;\r\n }\r\n this.style = this.swiperRef.isHorizontal()\r\n ? {\r\n [this.swiperRef.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`,\r\n }\r\n : {\r\n top: `${virtualData.offset}px`,\r\n };\r\n this.currentVirtualData = virtualData;\r\n this._activeSlides.next(virtualData.slides);\r\n this._ngZone.run(() => {\r\n this._changeDetectorRef.detectChanges();\r\n });\r\n this._ngZone.runOutsideAngular(() => {\r\n this.swiperRef.updateSlides();\r\n this.swiperRef.updateProgress();\r\n this.swiperRef.updateSlidesClasses();\r\n if (isEnabled(this.swiperRef.params.lazy)) {\r\n this.swiperRef.lazy.load();\r\n }\r\n this.swiperRef.virtual.update(true);\r\n });\r\n return;\r\n };\r\n\r\n ngOnChanges(changedParams: SimpleChanges) {\r\n this.updateSwiper(changedParams);\r\n this._changeDetectorRef.detectChanges();\r\n }\r\n\r\n updateInitSwiper(changedParams: any) {\r\n if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {\r\n return;\r\n }\r\n\r\n this._ngZone.runOutsideAngular(() => {\r\n const {\r\n params: currentParams,\r\n pagination,\r\n navigation,\r\n scrollbar,\r\n virtual,\r\n thumbs,\r\n } = this.swiperRef;\r\n\r\n if (changedParams.pagination) {\r\n if (\r\n this.pagination &&\r\n typeof this.pagination !== 'boolean' &&\r\n this.pagination.el &&\r\n pagination &&\r\n !pagination.el\r\n ) {\r\n this.updateParameter('pagination', this.pagination);\r\n pagination.init();\r\n pagination.render();\r\n pagination.update();\r\n } else {\r\n pagination.destroy();\r\n pagination.el = null;\r\n }\r\n }\r\n\r\n if (changedParams.scrollbar) {\r\n if (\r\n this.scrollbar &&\r\n typeof this.scrollbar !== 'boolean' &&\r\n this.scrollbar.el &&\r\n scrollbar &&\r\n !scrollbar.el\r\n ) {\r\n this.updateParameter('scrollbar', this.scrollbar);\r\n scrollbar.init();\r\n scrollbar.updateSize();\r\n scrollbar.setTranslate();\r\n } else {\r\n scrollbar.destroy();\r\n scrollbar.el = null;\r\n }\r\n }\r\n\r\n if (changedParams.navigation) {\r\n if (\r\n this.navigation &&\r\n typeof this.navigation !== 'boolean' &&\r\n this.navigation.prevEl &&\r\n this.navigation.nextEl &&\r\n navigation &&\r\n !navigation.prevEl &&\r\n !navigation.nextEl\r\n ) {\r\n this.updateParameter('navigation', this.navigation);\r\n navigation.init();\r\n navigation.update();\r\n } else if (navigation.prevEl && navigation.nextEl) {\r\n navigation.destroy();\r\n navigation.nextEl = null;\r\n navigation.prevEl = null;\r\n }\r\n }\r\n if (changedParams.thumbs && this.thumbs && this.thumbs.swiper) {\r\n this.updateParameter('thumbs', this.thumbs);\r\n const initialized = thumbs.init();\r\n if (initialized) thumbs.update(true);\r\n }\r\n\r\n if (changedParams.controller && this.controller && this.controller.control) {\r\n this.swiperRef.controller.control = this.controller.control;\r\n }\r\n\r\n this.swiperRef.update();\r\n });\r\n }\r\n\r\n updateSwiper(changedParams: SimpleChanges | any) {\r\n this._ngZone.runOutsideAngular(() => {\r\n if (changedParams.config) {\r\n return;\r\n }\r\n if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {\r\n return;\r\n }\r\n for (const key in changedParams) {\r\n if (ignoreNgOnChanges.indexOf(key) >= 0) {\r\n continue;\r\n }\r\n const newValue = changedParams[key]?.currentValue ?? changedParams[key];\r\n this.updateParameter(key, newValue);\r\n }\r\n\r\n if (changedParams.allowSlideNext) {\r\n this.swiperRef.allowSlideNext = this.allowSlideNext;\r\n }\r\n if (changedParams.allowSlidePrev) {\r\n this.swiperRef.allowSlidePrev = this.allowSlidePrev;\r\n }\r\n if (changedParams.direction) {\r\n this.swiperRef.changeDirection(this.direction, false);\r\n }\r\n if (changedParams.breakpoints) {\r\n if (this.loop && !this.loopedSlides) {\r\n this.calcLoopedSlides();\r\n }\r\n this.swiperRef.currentBreakpoint = null;\r\n this.swiperRef.setBreakpoint();\r\n }\r\n\r\n if (changedParams.thumbs || changedParams.controller) {\r\n this.updateInitSwiper(changedParams);\r\n }\r\n this.swiperRef.update();\r\n });\r\n }\r\n\r\n calcLoopedSlides() {\r\n if (!this.loop) {\r\n return false;\r\n }\r\n let slidesPerViewParams = this.slidesPerView;\r\n if (this.breakpoints) {\r\n const breakpoint = Swiper.prototype.getBreakpoint(this.breakpoints);\r\n const breakpointOnlyParams =\r\n breakpoint in this.breakpoints ? this.breakpoints[breakpoint] : undefined;\r\n if (breakpointOnlyParams && breakpointOnlyParams.slidesPerView) {\r\n slidesPerViewParams = breakpointOnlyParams.slidesPerView;\r\n }\r\n }\r\n if (slidesPerViewParams === 'auto') {\r\n this.loopedSlides = this.slides.length;\r\n return this.slides.length;\r\n }\r\n let loopedSlides = this.loopedSlides || slidesPerViewParams;\r\n if (!loopedSlides) {\r\n // ?\r\n return false;\r\n }\r\n\r\n if (this.loopAdditionalSlides) {\r\n loopedSlides += this.loopAdditionalSlides;\r\n }\r\n if (loopedSlides > this.slides.length) {\r\n loopedSlides = this.slides.length;\r\n }\r\n this.loopedSlides = loopedSlides;\r\n return true;\r\n }\r\n\r\n updateParameter(key: string, value: any) {\r\n if (!(this.swiperRef && !this.swiperRef.destroyed)) {\r\n return;\r\n }\r\n const _key = key.replace(/^_/, '') as keyof SwiperOptions;\r\n const isCurrentParamObj = isObject(this.swiperRef.params[_key]);\r\n\r\n if (_key === 'enabled') {\r\n if (value === true) {\r\n this.swiperRef.enable();\r\n } else if (value === false) {\r\n this.swiperRef.disable();\r\n }\r\n return;\r\n }\r\n if (isCurrentParamObj && isObject(value)) {\r\n extend(this.swiperRef.params[_key], value);\r\n } else {\r\n (this.swiperRef.params[_key] as any) = value;\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this._ngZone.runOutsideAngular(() => {\r\n this.swiperRef?.destroy(true, false);\r\n });\r\n }\r\n}\r\n","<ng-content select=\"[slot=container-start]\"></ng-content>\r\n<ng-container *ngIf=\"navigation && showNavigation\">\r\n <div class=\"swiper-button-prev\" #prevElRef></div>\r\n <div class=\"swiper-button-next\" #nextElRef></div>\r\n</ng-container>\r\n<div *ngIf=\"scrollbar && showScrollbar\" class=\"swiper-scrollbar\" #scrollbarElRef></div>\r\n<div *ngIf=\"pagination && showPagination\" class=\"swiper-pagination\" #paginationElRef></div>\r\n<div [ngClass]=\"wrapperClass\" [attr.id]=\"id\">\r\n <ng-content select=\"[slot=wrapper-start]\"></ng-content>\r\n <ng-template\r\n *ngTemplateOutlet=\"\r\n slidesTemplate;\r\n context: {\r\n loopSlides: prependSlides,\r\n key: 'prepend'\r\n }\r\n \"\r\n ></ng-template>\r\n <ng-template\r\n *ngTemplateOutlet=\"\r\n slidesTemplate;\r\n context: {\r\n loopSlides: activeSlides,\r\n key: ''\r\n }\r\n \"\r\n ></ng-template>\r\n <ng-template\r\n *ngTemplateOutlet=\"\r\n slidesTemplate;\r\n context: {\r\n loopSlides: appendSlides,\r\n key: 'append'\r\n }\r\n \"\r\n ></ng-template>\r\n <ng-content select=\"[slot=wrapper-end]\"></ng-content>\r\n</div>\r\n<ng-content select=\"[slot=container-end]\"></ng-content>\r\n\r\n<ng-template #slidesTemplate let-loopSlides=\"loopSlides\" let-slideKey=\"key\">\r\n <div\r\n *ngFor=\"let slide of loopSlides | async\"\r\n [ngClass]=\"\r\n (slide.class ? slide.class + ' ' : '') +\r\n slideClass +\r\n (slideKey !== '' ? ' ' + slideDuplicateClass : '')\r\n \"\r\n [attr.data-swiper-slide-index]=\"slide.virtualIndex ? slide.virtualIndex : slide.slideIndex\"\r\n [attr.data-swiper-autoplay]=\"slide.autoplayDelay\"\r\n [style]=\"style\"\r\n [ngSwitch]=\"slide.zoom\"\r\n >\r\n <div *ngSwitchCase=\"true\" [ngClass]=\"zoomContainerClass\">\r\n <ng-template\r\n [ngTemplateOutlet]=\"slide.template\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: slide.slideData\r\n }\"\r\n ></ng-template>\r\n </div>\r\n <ng-container *ngSwitchDefault>\r\n <ng-template\r\n [ngTemplateOutlet]=\"slide.template\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: slide.slideData\r\n }\"\r\n ></ng-template>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SwiperComponent } from './swiper.component';\r\nimport { SwiperSlideDirective } from './swiper-slide.directive';\r\n@NgModule({\r\n declarations: [SwiperComponent, SwiperSlideDirective],\r\n exports: [SwiperComponent, SwiperSlideDirective],\r\n imports: [CommonModule],\r\n})\r\nexport class SwiperModule {}\r\n","/*\r\n * Public API Surface of angular\r\n */\r\nexport * from './swiper-events';\r\nexport * from './swiper.module';\r\nexport * from './swiper.component';\r\nexport * from './swiper-slide.directive';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport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