Browse code

Refactor and rewrite as contao bundle

Benjamin Roth authored on04/11/2022 22:32:32
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,985 +0,0 @@
1
-import { Directive, TemplateRef, Input, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, NgZone, ElementRef, ChangeDetectorRef, Output, ViewChild, ContentChildren, HostBinding, NgModule } from '@angular/core';
2
-import { CommonModule } from '@angular/common';
3
-import Swiper from 'swiper/core';
4
-import { Subject, of } from 'rxjs';
5
-
6
-function isObject(o) {
7
-    return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
8
-}
9
-function extend(target, src) {
10
-    Object.keys(src).forEach((key) => {
11
-        if (typeof target[key] === 'undefined') {
12
-            target[key] = src[key];
13
-            return;
14
-        }
15
-        if (target[key] && !src[key]) {
16
-            return;
17
-        }
18
-        if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {
19
-            extend(target[key], src[key]);
20
-        }
21
-        else {
22
-            target[key] = src[key];
23
-        }
24
-    });
25
-}
26
-function uniqueClasses(classNames = '') {
27
-    const classes = classNames
28
-        .split(' ')
29
-        .map((c) => c.trim())
30
-        .filter((c) => !!c);
31
-    const unique = [];
32
-    classes.forEach((c) => {
33
-        if (unique.indexOf(c) < 0)
34
-            unique.push(c);
35
-    });
36
-    return unique.join(' ');
37
-}
38
-function coerceBooleanProperty(value) {
39
-    return value != null && `${value}` !== 'false';
40
-}
41
-const ignoreNgOnChanges = ['pagination', 'navigation', 'scrollbar', 'virtual'];
42
-function setProperty(val, obj = {}) {
43
-    if (isObject(val)) {
44
-        return val;
45
-    }
46
-    const newValue = coerceBooleanProperty(val);
47
-    if (newValue === true) {
48
-        return obj;
49
-    }
50
-    return newValue;
51
-}
52
-
53
-/* underscore in name -> watch for changes */
54
-const paramsList = [
55
-    'init',
56
-    '_direction',
57
-    'touchEventsTarget',
58
-    'initialSlide',
59
-    '_speed',
60
-    'cssMode',
61
-    'updateOnWindowResize',
62
-    'nested',
63
-    '_width',
64
-    '_height',
65
-    'preventInteractionOnTransition',
66
-    'userAgent',
67
-    'url',
68
-    '_edgeSwipeDetection',
69
-    '_edgeSwipeThreshold',
70
-    '_freeMode',
71
-    '_freeModeMomentum',
72
-    '_freeModeMomentumRatio',
73
-    '_freeModeMomentumBounce',
74
-    '_freeModeMomentumBounceRatio',
75
-    '_freeModeMomentumVelocityRatio',
76
-    '_freeModeSticky',
77
-    '_freeModeMinimumVelocity',
78
-    '_autoHeight',
79
-    'setWrapperSize',
80
-    'virtualTranslate',
81
-    '_effect',
82
-    'breakpoints',
83
-    '_spaceBetween',
84
-    '_slidesPerView',
85
-    '_slidesPerColumn',
86
-    '_slidesPerColumnFill',
87
-    '_slidesPerGroup',
88
-    '_slidesPerGroupSkip',
89
-    '_centeredSlides',
90
-    '_centeredSlidesBounds',
91
-    '_slidesOffsetBefore',
92
-    '_slidesOffsetAfter',
93
-    'normalizeSlideIndex',
94
-    '_centerInsufficientSlides',
95
-    '_watchOverflow',
96
-    'roundLengths',
97
-    'touchRatio',
98
-    'touchAngle',
99
-    'simulateTouch',
100
-    '_shortSwipes',
101
-    '_longSwipes',
102
-    'longSwipesRatio',
103
-    'longSwipesMs',
104
-    '_followFinger',
105
-    'allowTouchMove',
106
-    '_threshold',
107
-    'touchMoveStopPropagation',
108
-    'touchStartPreventDefault',
109
-    'touchStartForcePreventDefault',
110
-    'touchReleaseOnEdges',
111
-    'uniqueNavElements',
112
-    '_resistance',
113
-    '_resistanceRatio',
114
-    '_watchSlidesProgress',
115
-    '_watchSlidesVisibility',
116
-    '_grabCursor',
117
-    'preventClicks',
118
-    'preventClicksPropagation',
119
-    '_slideToClickedSlide',
120
-    '_preloadImages',
121
-    'updateOnImagesReady',
122
-    '_loop',
123
-    '_loopAdditionalSlides',
124
-    '_loopedSlides',
125
-    '_loopFillGroupWithBlank',
126
-    'loopPreventsSlide',
127
-    '_allowSlidePrev',
128
-    '_allowSlideNext',
129
-    '_swipeHandler',
130
-    '_noSwiping',
131
-    'noSwipingClass',
132
-    'noSwipingSelector',
133
-    'passiveListeners',
134
-    'containerModifierClass',
135
-    'slideClass',
136
-    'slideBlankClass',
137
-    'slideActiveClass',
138
-    'slideDuplicateActiveClass',
139
-    'slideVisibleClass',
140
-    'slideDuplicateClass',
141
-    'slideNextClass',
142
-    'slideDuplicateNextClass',
143
-    'slidePrevClass',
144
-    'slideDuplicatePrevClass',
145
-    'wrapperClass',
146
-    'runCallbacksOnInit',
147
-    // modules
148
-    'a11y',
149
-    'autoplay',
150
-    '_controller',
151
-    'coverflowEffect',
152
-    'cubeEffect',
153
-    'fadeEffect',
154
-    'flipEffect',
155
-    'hashNavigation',
156
-    'history',
157
-    'keyboard',
158
-    'lazy',
159
-    'mousewheel',
160
-    '_navigation',
161
-    '_pagination',
162
-    'parallax',
163
-    '_scrollbar',
164
-    '_thumbs',
165
-    'virtual',
166
-    'zoom',
167
-];
168
-
169
-// eslint-disable-next-line
170
-const ɵ0 = (key) => key.replace(/_/, '');
171
-const allowedParams = paramsList.map(ɵ0);
172
-function getParams(obj = {}) {
173
-    const params = {
174
-        on: {},
175
-    };
176
-    const passedParams = {};
177
-    extend(params, Swiper.defaults);
178
-    extend(params, Swiper.extendedDefaults);
179
-    params._emitClasses = true;
180
-    const rest = {};
181
-    Object.keys(obj).forEach((key) => {
182
-        const _key = key.replace(/^_/, '');
183
-        if (typeof obj[_key] === 'undefined')
184
-            return;
185
-        if (allowedParams.indexOf(_key) >= 0) {
186
-            if (isObject(obj[_key])) {
187
-                params[_key] = {};
188
-                passedParams[_key] = {};
189
-                extend(params[_key], obj[_key]);
190
-                extend(passedParams[_key], obj[_key]);
191
-            }
192
-            else {
193
-                params[_key] = obj[_key];
194
-                passedParams[_key] = obj[_key];
195
-            }
196
-        }
197
-        else {
198
-            rest[_key] = obj[_key];
199
-        }
200
-    });
201
-    return { params, passedParams, rest };
202
-}
203
-
204
-class SwiperSlideDirective {
205
-    constructor(template) {
206
-        this.template = template;
207
-        this.slideData = {
208
-            isActive: false,
209
-            isPrev: false,
210
-            isNext: false,
211
-            isVisible: false,
212
-            isDuplicate: false,
213
-        };
214
-    }
215
-    get classNames() {
216
-        return this._classNames;
217
-    }
218
-    set classNames(val) {
219
-        if (this._classNames === val) {
220
-            return;
221
-        }
222
-        this._classNames = val;
223
-        this.slideData = {
224
-            isActive: this._hasClass(['swiper-slide-active', 'swiper-slide-duplicate-active']),
225
-            isVisible: this._hasClass(['swiper-slide-visible']),
226
-            isDuplicate: this._hasClass(['swiper-slide-duplicate']),
227
-            isPrev: this._hasClass(['swiper-slide-prev', 'swiper-slide-duplicate-prev']),
228
-            isNext: this._hasClass(['swiper-slide-next', 'swiper-slide-duplicate-next']),
229
-        };
230
-    }
231
-    _hasClass(classNames) {
232
-        return classNames.some((className) => this._classNames.indexOf(className) >= 0);
233
-    }
234
-}
235
-SwiperSlideDirective.decorators = [
236
-    { type: Directive, args: [{
237
-                selector: '[swiperSlide]',
238
-            },] }
239
-];
240
-SwiperSlideDirective.ctorParameters = () => [
241
-    { type: TemplateRef }
242
-];
243
-SwiperSlideDirective.propDecorators = {
244
-    virtualIndex: [{ type: Input }]
245
-};
246
-
247
-class SwiperComponent {
248
-    constructor(zone, elementRef, _changeDetectorRef) {
249
-        this.zone = zone;
250
-        this.elementRef = elementRef;
251
-        this._changeDetectorRef = _changeDetectorRef;
252
-        this.init = true;
253
-        this.slideClass = 'swiper-slide';
254
-        this.wrapperClass = 'swiper-wrapper';
255
-        // prettier-ignore
256
-        this.s__beforeBreakpoint = new EventEmitter();
257
-        // prettier-ignore
258
-        this.s__containerClasses = new EventEmitter();
259
-        // prettier-ignore
260
-        this.s__slideClass = new EventEmitter();
261
-        // prettier-ignore
262
-        this.s__swiper = new EventEmitter();
263
-        // prettier-ignore
264
-        this.s_activeIndexChange = new EventEmitter();
265
-        // prettier-ignore
266
-        this.s_afterInit = new EventEmitter();
267
-        // prettier-ignore
268
-        this.s_autoplay = new EventEmitter();
269
-        // prettier-ignore
270
-        this.s_autoplayStart = new EventEmitter();
271
-        // prettier-ignore
272
-        this.s_autoplayStop = new EventEmitter();
273
-        // prettier-ignore
274
-        this.s_beforeDestroy = new EventEmitter();
275
-        // prettier-ignore
276
-        this.s_beforeInit = new EventEmitter();
277
-        // prettier-ignore
278
-        this.s_beforeLoopFix = new EventEmitter();
279
-        // prettier-ignore
280
-        this.s_beforeResize = new EventEmitter();
281
-        // prettier-ignore
282
-        this.s_beforeSlideChangeStart = new EventEmitter();
283
-        // prettier-ignore
284
-        this.s_beforeTransitionStart = new EventEmitter();
285
-        // prettier-ignore
286
-        this.s_breakpoint = new EventEmitter();
287
-        // prettier-ignore
288
-        this.s_changeDirection = new EventEmitter();
289
-        // prettier-ignore
290
-        this.s_click = new EventEmitter();
291
-        // prettier-ignore
292
-        this.s_doubleTap = new EventEmitter();
293
-        // prettier-ignore
294
-        this.s_doubleClick = new EventEmitter();
295
-        // prettier-ignore
296
-        this.s_destroy = new EventEmitter();
297
-        // prettier-ignore
298
-        this.s_fromEdge = new EventEmitter();
299
-        // prettier-ignore
300
-        this.s_hashChange = new EventEmitter();
301
-        // prettier-ignore
302
-        this.s_hashSet = new EventEmitter();
303
-        // prettier-ignore
304
-        this.s_imagesReady = new EventEmitter();
305
-        // prettier-ignore
306
-        this.s_init = new EventEmitter();
307
-        // prettier-ignore
308
-        this.s_keyPress = new EventEmitter();
309
-        // prettier-ignore
310
-        this.s_lazyImageLoad = new EventEmitter();
311
-        // prettier-ignore
312
-        this.s_lazyImageReady = new EventEmitter();
313
-        // prettier-ignore
314
-        this.s_loopFix = new EventEmitter();
315
-        // prettier-ignore
316
-        this.s_momentumBounce = new EventEmitter();
317
-        // prettier-ignore
318
-        this.s_navigationHide = new EventEmitter();
319
-        // prettier-ignore
320
-        this.s_navigationShow = new EventEmitter();
321
-        // prettier-ignore
322
-        this.s_observerUpdate = new EventEmitter();
323
-        // prettier-ignore
324
-        this.s_orientationchange = new EventEmitter();
325
-        // prettier-ignore
326
-        this.s_paginationHide = new EventEmitter();
327
-        // prettier-ignore
328
-        this.s_paginationRender = new EventEmitter();
329
-        // prettier-ignore
330
-        this.s_paginationShow = new EventEmitter();
331
-        // prettier-ignore
332
-        this.s_paginationUpdate = new EventEmitter();
333
-        // prettier-ignore
334
-        this.s_progress = new EventEmitter();
335
-        // prettier-ignore
336
-        this.s_reachBeginning = new EventEmitter();
337
-        // prettier-ignore
338
-        this.s_reachEnd = new EventEmitter();
339
-        // prettier-ignore
340
-        this.s_realIndexChange = new EventEmitter();
341
-        // prettier-ignore
342
-        this.s_resize = new EventEmitter();
343
-        // prettier-ignore
344
-        this.s_scroll = new EventEmitter();
345
-        // prettier-ignore
346
-        this.s_scrollbarDragEnd = new EventEmitter();
347
-        // prettier-ignore
348
-        this.s_scrollbarDragMove = new EventEmitter();
349
-        // prettier-ignore
350
-        this.s_scrollbarDragStart = new EventEmitter();
351
-        // prettier-ignore
352
-        this.s_setTransition = new EventEmitter();
353
-        // prettier-ignore
354
-        this.s_setTranslate = new EventEmitter();
355
-        // prettier-ignore
356
-        this.s_slideChange = new EventEmitter();
357
-        // prettier-ignore
358
-        this.s_slideChangeTransitionEnd = new EventEmitter();
359
-        // prettier-ignore
360
-        this.s_slideChangeTransitionStart = new EventEmitter();
361
-        // prettier-ignore
362
-        this.s_slideNextTransitionEnd = new EventEmitter();
363
-        // prettier-ignore
364
-        this.s_slideNextTransitionStart = new EventEmitter();
365
-        // prettier-ignore
366
-        this.s_slidePrevTransitionEnd = new EventEmitter();
367
-        // prettier-ignore
368
-        this.s_slidePrevTransitionStart = new EventEmitter();
369
-        // prettier-ignore
370
-        this.s_slideResetTransitionStart = new EventEmitter();
371
-        // prettier-ignore
372
-        this.s_slideResetTransitionEnd = new EventEmitter();
373
-        // prettier-ignore
374
-        this.s_sliderMove = new EventEmitter();
375
-        // prettier-ignore
376
-        this.s_sliderFirstMove = new EventEmitter();
377
-        // prettier-ignore
378
-        this.s_slidesLengthChange = new EventEmitter();
379
-        // prettier-ignore
380
-        this.s_slidesGridLengthChange = new EventEmitter();
381
-        // prettier-ignore
382
-        this.s_snapGridLengthChange = new EventEmitter();
383
-        // prettier-ignore
384
-        this.s_snapIndexChange = new EventEmitter();
385
-        // prettier-ignore
386
-        this.s_tap = new EventEmitter();
387
-        // prettier-ignore
388
-        this.s_toEdge = new EventEmitter();
389
-        // prettier-ignore
390
-        this.s_touchEnd = new EventEmitter();
391
-        // prettier-ignore
392
-        this.s_touchMove = new EventEmitter();
393
-        // prettier-ignore
394
-        this.s_touchMoveOpposite = new EventEmitter();
395
-        // prettier-ignore
396
-        this.s_touchStart = new EventEmitter();
397
-        // prettier-ignore
398
-        this.s_transitionEnd = new EventEmitter();
399
-        // prettier-ignore
400
-        this.s_transitionStart = new EventEmitter();
401
-        // prettier-ignore
402
-        this.s_update = new EventEmitter();
403
-        // prettier-ignore
404
-        this.s_zoomChange = new EventEmitter();
405
-        // prettier-ignore
406
-        this.s_swiper = new EventEmitter();
407
-        this.indexChange = new EventEmitter();
408
-        this._activeSlides = new Subject();
409
-        this.containerClasses = 'swiper-container';
410
-        this.style = null;
411
-    }
412
-    set navigation(val) {
413
-        this._navigation = setProperty(val, {
414
-            nextEl: null,
415
-            prevEl: null,
416
-        });
417
-    }
418
-    get navigation() {
419
-        return this._navigation;
420
-    }
421
-    set pagination(val) {
422
-        this._pagination = setProperty(val, {
423
-            el: null,
424
-        });
425
-    }
426
-    get pagination() {
427
-        return this._pagination;
428
-    }
429
-    set scrollbar(val) {
430
-        this._scrollbar = setProperty(val, {
431
-            el: null,
432
-        });
433
-    }
434
-    get scrollbar() {
435
-        return this._scrollbar;
436
-    }
437
-    set virtual(val) {
438
-        this._virtual = setProperty(val);
439
-    }
440
-    get virtual() {
441
-        return this._virtual;
442
-    }
443
-    set index(index) {
444
-        this.setIndex(index);
445
-    }
446
-    set config(val) {
447
-        this.updateSwiper(val);
448
-        const { params } = getParams(val);
449
-        Object.assign(this, params);
450
-    }
451
-    set prevElRef(el) {
452
-        this._setElement(el, this.navigation, 'navigation', 'prevEl');
453
-    }
454
-    set nextElRef(el) {
455
-        this._setElement(el, this.navigation, 'navigation', 'nextEl');
456
-    }
457
-    set scrollbarElRef(el) {
458
-        this._setElement(el, this.scrollbar, 'scrollbar');
459
-    }
460
-    set paginationElRef(el) {
461
-        this._setElement(el, this.pagination, 'pagination');
462
-    }
463
-    set slidesEl(val) {
464
-        this.slides = val.map((slide, index) => {
465
-            slide.slideIndex = index;
466
-            slide.classNames = this.slideClass;
467
-            return slide;
468
-        });
469
-        if (this.loop && !this.loopedSlides) {
470
-            this.calcLoopedSlides();
471
-        }
472
-        if (!this.virtual) {
473
-            this.prependSlides = of(this.slides.slice(this.slides.length - this.loopedSlides));
474
-            this.appendSlides = of(this.slides.slice(0, this.loopedSlides));
475
-        }
476
-    }
477
-    get activeSlides() {
478
-        if (this.virtual) {
479
-            return this._activeSlides;
480
-        }
481
-        return of(this.slides);
482
-    }
483
-    _setElement(el, ref, update, key = 'el') {
484
-        if (!el && !ref) {
485
-            return;
486
-        }
487
-        if (ref) {
488
-            if (ref[key] === el.nativeElement) {
489
-                return;
490
-            }
491
-            ref[key] = el.nativeElement;
492
-        }
493
-        const updateObj = {};
494
-        updateObj[update] = true;
495
-        this.updateInitSwiper(updateObj);
496
-    }
497
-    ngOnInit() {
498
-        const { params } = getParams(this);
499
-        Object.assign(this, params);
500
-    }
501
-    ngAfterViewInit() {
502
-        if (this.init) {
503
-            this.initSwiper();
504
-            this._changeDetectorRef.detectChanges();
505
-        }
506
-    }
507
-    initSwiper() {
508
-        const { params: swiperParams, passedParams } = getParams(this);
509
-        Object.assign(this, swiperParams);
510
-        swiperParams.onAny = (event, ...args) => {
511
-            const emitter = this[`s_${event}`];
512
-            if (emitter) {
513
-                emitter.emit(...args);
514
-            }
515
-        };
516
-        Object.assign(swiperParams.on, {
517
-            slideChange: () => {
518
-                this.indexChange.emit(this.swiperRef.realIndex);
519
-            },
520
-            _containerClasses(swiper, classes) {
521
-                this.containerClasses = classes;
522
-            },
523
-            _swiper: (swiper) => {
524
-                this.swiperRef = swiper;
525
-                this.s_swiper.emit(this.swiperRef);
526
-                swiper.loopCreate = () => { };
527
-                swiper.loopDestroy = () => { };
528
-                if (swiperParams.loop) {
529
-                    swiper.loopedSlides = this.loopedSlides;
530
-                }
531
-                if (swiper.virtual && swiper.params.virtual.enabled) {
532
-                    swiper.virtual.slides = this.slides;
533
-                    swiper.params.virtual.cache = false;
534
-                    swiper.params.virtual.renderExternal = (data) => {
535
-                        this.updateVirtualSlides(data);
536
-                    };
537
-                    swiper.params.virtual.renderExternalUpdate = false;
538
-                }
539
-                this._changeDetectorRef.detectChanges();
540
-            },
541
-            _slideClass: (_, el, classNames) => {
542
-                const slideIndex = parseInt(el.dataset.swiperSlideIndex);
543
-                if (this.virtual) {
544
-                    const virtualSlide = this.slides.find((item) => {
545
-                        return item.virtualIndex && item.virtualIndex === slideIndex;
546
-                    });
547
-                    if (virtualSlide) {
548
-                        virtualSlide.classNames = classNames;
549
-                        return;
550
-                    }
551
-                }
552
-                this.slides[slideIndex].classNames = classNames;
553
-                this._changeDetectorRef.detectChanges();
554
-            },
555
-        });
556
-        new Swiper(this.elementRef.nativeElement, swiperParams);
557
-    }
558
-    updateVirtualSlides(virtualData) {
559
-        // TODO: type virtualData
560
-        if (!this.swiperRef ||
561
-            (this.currentVirtualData &&
562
-                this.currentVirtualData.from === virtualData.from &&
563
-                this.currentVirtualData.to === virtualData.to &&
564
-                this.currentVirtualData.offset === virtualData.offset)) {
565
-            return;
566
-        }
567
-        this.style = this.swiperRef.isHorizontal()
568
-            ? {
569
-                [this.swiperRef.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`,
570
-            }
571
-            : {
572
-                top: `${virtualData.offset}px`,
573
-            };
574
-        this.currentVirtualData = virtualData;
575
-        this._activeSlides.next(virtualData.slides);
576
-        this._changeDetectorRef.detectChanges();
577
-        this.swiperRef.updateSlides();
578
-        this.swiperRef.updateProgress();
579
-        this.swiperRef.updateSlidesClasses();
580
-        if (this.swiperRef.lazy && this.swiperRef.params.lazy['enabled']) {
581
-            this.swiperRef.lazy.load();
582
-        }
583
-        this.swiperRef.virtual.update(true);
584
-        return;
585
-    }
586
-    ngOnChanges(changedParams) {
587
-        this.updateSwiper(changedParams);
588
-        this._changeDetectorRef.detectChanges();
589
-    }
590
-    updateInitSwiper(changedParams) {
591
-        if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {
592
-            return;
593
-        }
594
-        const { params: currentParams, pagination, navigation, scrollbar, virtual, thumbs, } = this.swiperRef;
595
-        if (changedParams.pagination) {
596
-            if (this.pagination &&
597
-                typeof this.pagination !== 'boolean' &&
598
-                this.pagination.el &&
599
-                pagination &&
600
-                !pagination.el) {
601
-                this.updateParameter('pagination', this.pagination);
602
-                pagination.init();
603
-                pagination.render();
604
-                pagination.update();
605
-            }
606
-            else {
607
-                pagination.destroy();
608
-                pagination.el = null;
609
-            }
610
-        }
611
-        if (changedParams.scrollbar) {
612
-            if (this.scrollbar &&
613
-                typeof this.scrollbar !== 'boolean' &&
614
-                this.scrollbar.el &&
615
-                scrollbar &&
616
-                !scrollbar.el) {
617
-                this.updateParameter('scrollbar', this.scrollbar);
618
-                scrollbar.init();
619
-                scrollbar.updateSize();
620
-                scrollbar.setTranslate();
621
-            }
622
-            else {
623
-                scrollbar.destroy();
624
-                scrollbar.el = null;
625
-            }
626
-        }
627
-        if (changedParams.navigation) {
628
-            if (this.navigation &&
629
-                typeof this.navigation !== 'boolean' &&
630
-                this.navigation.prevEl &&
631
-                this.navigation.nextEl &&
632
-                navigation &&
633
-                !navigation.prevEl &&
634
-                !navigation.nextEl) {
635
-                this.updateParameter('navigation', this.navigation);
636
-                navigation.init();
637
-                navigation.update();
638
-            }
639
-            else if (navigation.prevEl && navigation.nextEl) {
640
-                navigation.destroy();
641
-                navigation.nextEl = null;
642
-                navigation.prevEl = null;
643
-            }
644
-        }
645
-        if (changedParams.thumbs && this.thumbs && this.thumbs.swiper) {
646
-            this.updateParameter('thumbs', this.thumbs);
647
-            const initialized = thumbs.init();
648
-            if (initialized)
649
-                thumbs.update(true);
650
-        }
651
-        if (changedParams.controller && this.controller && this.controller.control) {
652
-            this.swiperRef.controller.control = this.controller.control;
653
-        }
654
-        this.swiperRef.update();
655
-    }
656
-    updateSwiper(changedParams) {
657
-        var _a, _b;
658
-        if (changedParams.config) {
659
-            return;
660
-        }
661
-        if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {
662
-            return;
663
-        }
664
-        for (const key in changedParams) {
665
-            if (ignoreNgOnChanges.indexOf(key) >= 0) {
666
-                continue;
667
-            }
668
-            const newValue = (_b = (_a = changedParams[key]) === null || _a === void 0 ? void 0 : _a.currentValue) !== null && _b !== void 0 ? _b : changedParams[key];
669
-            this.updateParameter(key, newValue);
670
-        }
671
-        if (changedParams.allowSlideNext) {
672
-            this.swiperRef.allowSlideNext = this.allowSlideNext;
673
-        }
674
-        if (changedParams.allowSlidePrev) {
675
-            this.swiperRef.allowSlidePrev = this.allowSlidePrev;
676
-        }
677
-        if (changedParams.direction) {
678
-            this.swiperRef.changeDirection(this.direction, false);
679
-        }
680
-        if (changedParams.breakpoints) {
681
-            if (this.loop && !this.loopedSlides) {
682
-                this.calcLoopedSlides();
683
-            }
684
-            this.swiperRef.currentBreakpoint = null;
685
-            this.swiperRef.setBreakpoint();
686
-        }
687
-        this.swiperRef.update();
688
-    }
689
-    calcLoopedSlides() {
690
-        if (!this.loop) {
691
-            return;
692
-        }
693
-        let slidesPerViewParams = this.slidesPerView;
694
-        if (this.breakpoints) {
695
-            const breakpoint = Swiper.prototype.getBreakpoint(this.breakpoints);
696
-            const breakpointOnlyParams = breakpoint in this.breakpoints ? this.breakpoints[breakpoint] : undefined;
697
-            if (breakpointOnlyParams && breakpointOnlyParams.slidesPerView) {
698
-                slidesPerViewParams = breakpointOnlyParams.slidesPerView;
699
-            }
700
-        }
701
-        if (slidesPerViewParams === 'auto') {
702
-            this.loopedSlides = this.slides.length;
703
-            return this.slides.length;
704
-        }
705
-        let loopedSlides = this.loopedSlides || slidesPerViewParams;
706
-        loopedSlides += this.loopAdditionalSlides;
707
-        if (loopedSlides > this.slides.length) {
708
-            loopedSlides = this.slides.length;
709
-        }
710
-        this.loopedSlides = loopedSlides;
711
-        return loopedSlides;
712
-    }
713
-    updateParameter(key, value) {
714
-        if (!(this.swiperRef && !this.swiperRef.destroyed)) {
715
-            return;
716
-        }
717
-        const _key = key.replace(/^_/, '');
718
-        if (Object.keys(this.swiperRef.modules).indexOf(_key) >= 0) {
719
-            extend(value, this.swiperRef.modules[_key].params[_key]);
720
-        }
721
-        if (isObject(this.swiperRef.params[_key]) && isObject(value)) {
722
-            extend(this.swiperRef.params[_key], value);
723
-        }
724
-        else {
725
-            this.swiperRef.params[_key] = value;
726
-        }
727
-    }
728
-    setIndex(index, speed, silent) {
729
-        if (!this.swiperRef) {
730
-            this.initialSlide = index;
731
-            return;
732
-        }
733
-        if (index === this.swiperRef.realIndex) {
734
-            return;
735
-        }
736
-        this.zone.runOutsideAngular(() => {
737
-            if (this.loop) {
738
-                this.swiperRef.slideToLoop(index, speed, !silent);
739
-            }
740
-            else {
741
-                this.swiperRef.slideTo(index, speed, !silent);
742
-            }
743
-        });
744
-    }
745
-    ngOnDestroy() {
746
-        this.swiperRef.destroy();
747
-    }
748
-}
749
-SwiperComponent.decorators = [
750
-    { type: Component, args: [{
751
-                selector: 'swiper, [swiper]',
752
-                template: "<ng-content select=\"[slot=container-start]\"></ng-content>\n<ng-container *ngIf=\"navigation\">\n  <div class=\"swiper-button-prev\" #prevElRef></div>\n  <div class=\"swiper-button-next\" #nextElRef></div>\n</ng-container>\n<div *ngIf=\"scrollbar\" class=\"swiper-scrollbar\" #scrollbarElRef></div>\n<div *ngIf=\"pagination\" class=\"swiper-pagination\" #paginationElRef></div>\n<div [ngClass]=\"wrapperClass\">\n  <ng-content select=\"[slot=wrapper-start]\"></ng-content>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: prependSlides,\n        key: 'prepend'\n      }\n    \"\n  ></ng-template>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: activeSlides,\n        key: ''\n      }\n    \"\n  ></ng-template>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: appendSlides,\n        key: 'append'\n      }\n    \"\n  ></ng-template>\n  <ng-content select=\"[slot=wrapper-end]\"></ng-content>\n</div>\n<ng-content select=\"[slot=container-end]\"></ng-content>\n\n<ng-template #slidesTemplate let-loopSlides=\"loopSlides\" let-slideKey=\"key\">\n  <div\n    *ngFor=\"let slide of loopSlides | async\"\n    [ngClass]=\"slide.classNames + ' ' + (slideKey !== '' ? slideDuplicateClass : '')\"\n    [attr.data-swiper-slide-index]=\"slide.virtualIndex ? slide.virtualIndex : slide.slideIndex\"\n    [style]=\"style\"\n  >\n    <ng-template\n      [ngTemplateOutlet]=\"slide.template\"\n      [ngTemplateOutletContext]=\"{\n        $implicit: slide.slideData\n      }\"\n    ></ng-template>\n  </div>\n</ng-template>\n",
753
-                changeDetection: ChangeDetectionStrategy.OnPush,
754
-                encapsulation: ViewEncapsulation.None,
755
-                styles: [`
756
-      swiper {
757
-        display: block;
758
-      }
759
-    `]
760
-            },] }
761
-];
762
-SwiperComponent.ctorParameters = () => [
763
-    { type: NgZone },
764
-    { type: ElementRef },
765
-    { type: ChangeDetectorRef }
766
-];
767
-SwiperComponent.propDecorators = {
768
-    init: [{ type: Input }],
769
-    direction: [{ type: Input }],
770
-    touchEventsTarget: [{ type: Input }],
771
-    initialSlide: [{ type: Input }],
772
-    speed: [{ type: Input }],
773
-    cssMode: [{ type: Input }],
774
-    updateOnWindowResize: [{ type: Input }],
775
-    nested: [{ type: Input }],
776
-    width: [{ type: Input }],
777
-    height: [{ type: Input }],
778
-    preventInteractionOnTransition: [{ type: Input }],
779
-    userAgent: [{ type: Input }],
780
-    url: [{ type: Input }],
781
-    edgeSwipeDetection: [{ type: Input }],
782
-    edgeSwipeThreshold: [{ type: Input }],
783
-    freeMode: [{ type: Input }],
784
-    freeModeMomentum: [{ type: Input }],
785
-    freeModeMomentumRatio: [{ type: Input }],
786
-    freeModeMomentumBounce: [{ type: Input }],
787
-    freeModeMomentumBounceRatio: [{ type: Input }],
788
-    freeModeMomentumVelocityRatio: [{ type: Input }],
789
-    freeModeSticky: [{ type: Input }],
790
-    freeModeMinimumVelocity: [{ type: Input }],
791
-    autoHeight: [{ type: Input }],
792
-    setWrapperSize: [{ type: Input }],
793
-    virtualTranslate: [{ type: Input }],
794
-    effect: [{ type: Input }],
795
-    breakpoints: [{ type: Input }],
796
-    spaceBetween: [{ type: Input }],
797
-    slidesPerView: [{ type: Input }],
798
-    slidesPerColumn: [{ type: Input }],
799
-    slidesPerColumnFill: [{ type: Input }],
800
-    slidesPerGroup: [{ type: Input }],
801
-    slidesPerGroupSkip: [{ type: Input }],
802
-    centeredSlides: [{ type: Input }],
803
-    centeredSlidesBounds: [{ type: Input }],
804
-    slidesOffsetBefore: [{ type: Input }],
805
-    slidesOffsetAfter: [{ type: Input }],
806
-    normalizeSlideIndex: [{ type: Input }],
807
-    centerInsufficientSlides: [{ type: Input }],
808
-    watchOverflow: [{ type: Input }],
809
-    roundLengths: [{ type: Input }],
810
-    touchRatio: [{ type: Input }],
811
-    touchAngle: [{ type: Input }],
812
-    simulateTouch: [{ type: Input }],
813
-    shortSwipes: [{ type: Input }],
814
-    longSwipes: [{ type: Input }],
815
-    longSwipesRatio: [{ type: Input }],
816
-    longSwipesMs: [{ type: Input }],
817
-    followFinger: [{ type: Input }],
818
-    allowTouchMove: [{ type: Input }],
819
-    threshold: [{ type: Input }],
820
-    touchMoveStopPropagation: [{ type: Input }],
821
-    touchStartPreventDefault: [{ type: Input }],
822
-    touchStartForcePreventDefault: [{ type: Input }],
823
-    touchReleaseOnEdges: [{ type: Input }],
824
-    uniqueNavElements: [{ type: Input }],
825
-    resistance: [{ type: Input }],
826
-    resistanceRatio: [{ type: Input }],
827
-    watchSlidesProgress: [{ type: Input }],
828
-    watchSlidesVisibility: [{ type: Input }],
829
-    grabCursor: [{ type: Input }],
830
-    preventClicks: [{ type: Input }],
831
-    preventClicksPropagation: [{ type: Input }],
832
-    slideToClickedSlide: [{ type: Input }],
833
-    preloadImages: [{ type: Input }],
834
-    updateOnImagesReady: [{ type: Input }],
835
-    loop: [{ type: Input }],
836
-    loopAdditionalSlides: [{ type: Input }],
837
-    loopedSlides: [{ type: Input }],
838
-    loopFillGroupWithBlank: [{ type: Input }],
839
-    loopPreventsSlide: [{ type: Input }],
840
-    allowSlidePrev: [{ type: Input }],
841
-    allowSlideNext: [{ type: Input }],
842
-    swipeHandler: [{ type: Input }],
843
-    noSwiping: [{ type: Input }],
844
-    noSwipingClass: [{ type: Input }],
845
-    noSwipingSelector: [{ type: Input }],
846
-    passiveListeners: [{ type: Input }],
847
-    containerModifierClass: [{ type: Input }],
848
-    slideClass: [{ type: Input }],
849
-    slideBlankClass: [{ type: Input }],
850
-    slideActiveClass: [{ type: Input }],
851
-    slideDuplicateActiveClass: [{ type: Input }],
852
-    slideVisibleClass: [{ type: Input }],
853
-    slideDuplicateClass: [{ type: Input }],
854
-    slideNextClass: [{ type: Input }],
855
-    slideDuplicateNextClass: [{ type: Input }],
856
-    slidePrevClass: [{ type: Input }],
857
-    slideDuplicatePrevClass: [{ type: Input }],
858
-    wrapperClass: [{ type: Input }],
859
-    runCallbacksOnInit: [{ type: Input }],
860
-    a11y: [{ type: Input }],
861
-    autoplay: [{ type: Input }],
862
-    controller: [{ type: Input }],
863
-    coverflowEffect: [{ type: Input }],
864
-    cubeEffect: [{ type: Input }],
865
-    fadeEffect: [{ type: Input }],
866
-    flipEffect: [{ type: Input }],
867
-    hashNavigation: [{ type: Input }],
868
-    history: [{ type: Input }],
869
-    keyboard: [{ type: Input }],
870
-    lazy: [{ type: Input }],
871
-    mousewheel: [{ type: Input }],
872
-    parallax: [{ type: Input }],
873
-    thumbs: [{ type: Input }],
874
-    zoom: [{ type: Input }],
875
-    navigation: [{ type: Input }],
876
-    pagination: [{ type: Input }],
877
-    scrollbar: [{ type: Input }],
878
-    virtual: [{ type: Input }],
879
-    index: [{ type: Input }],
880
-    config: [{ type: Input }],
881
-    s__beforeBreakpoint: [{ type: Output, args: ['_beforeBreakpoint',] }],
882
-    s__containerClasses: [{ type: Output, args: ['_containerClasses',] }],
883
-    s__slideClass: [{ type: Output, args: ['_slideClass',] }],
884
-    s__swiper: [{ type: Output, args: ['_swiper',] }],
885
-    s_activeIndexChange: [{ type: Output, args: ['activeIndexChange',] }],
886
-    s_afterInit: [{ type: Output, args: ['afterInit',] }],
887
-    s_autoplay: [{ type: Output, args: ['autoplay',] }],
888
-    s_autoplayStart: [{ type: Output, args: ['autoplayStart',] }],
889
-    s_autoplayStop: [{ type: Output, args: ['autoplayStop',] }],
890
-    s_beforeDestroy: [{ type: Output, args: ['beforeDestroy',] }],
891
-    s_beforeInit: [{ type: Output, args: ['beforeInit',] }],
892
-    s_beforeLoopFix: [{ type: Output, args: ['beforeLoopFix',] }],
893
-    s_beforeResize: [{ type: Output, args: ['beforeResize',] }],
894
-    s_beforeSlideChangeStart: [{ type: Output, args: ['beforeSlideChangeStart',] }],
895
-    s_beforeTransitionStart: [{ type: Output, args: ['beforeTransitionStart',] }],
896
-    s_breakpoint: [{ type: Output, args: ['breakpoint',] }],
897
-    s_changeDirection: [{ type: Output, args: ['changeDirection',] }],
898
-    s_click: [{ type: Output, args: ['click',] }],
899
-    s_doubleTap: [{ type: Output, args: ['doubleTap',] }],
900
-    s_doubleClick: [{ type: Output, args: ['doubleClick',] }],
901
-    s_destroy: [{ type: Output, args: ['destroy',] }],
902
-    s_fromEdge: [{ type: Output, args: ['fromEdge',] }],
903
-    s_hashChange: [{ type: Output, args: ['hashChange',] }],
904
-    s_hashSet: [{ type: Output, args: ['hashSet',] }],
905
-    s_imagesReady: [{ type: Output, args: ['imagesReady',] }],
906
-    s_init: [{ type: Output, args: ['init',] }],
907
-    s_keyPress: [{ type: Output, args: ['keyPress',] }],
908
-    s_lazyImageLoad: [{ type: Output, args: ['lazyImageLoad',] }],
909
-    s_lazyImageReady: [{ type: Output, args: ['lazyImageReady',] }],
910
-    s_loopFix: [{ type: Output, args: ['loopFix',] }],
911
-    s_momentumBounce: [{ type: Output, args: ['momentumBounce',] }],
912
-    s_navigationHide: [{ type: Output, args: ['navigationHide',] }],
913
-    s_navigationShow: [{ type: Output, args: ['navigationShow',] }],
914
-    s_observerUpdate: [{ type: Output, args: ['observerUpdate',] }],
915
-    s_orientationchange: [{ type: Output, args: ['orientationchange',] }],
916
-    s_paginationHide: [{ type: Output, args: ['paginationHide',] }],
917
-    s_paginationRender: [{ type: Output, args: ['paginationRender',] }],
918
-    s_paginationShow: [{ type: Output, args: ['paginationShow',] }],
919
-    s_paginationUpdate: [{ type: Output, args: ['paginationUpdate',] }],
920
-    s_progress: [{ type: Output, args: ['progress',] }],
921
-    s_reachBeginning: [{ type: Output, args: ['reachBeginning',] }],
922
-    s_reachEnd: [{ type: Output, args: ['reachEnd',] }],
923
-    s_realIndexChange: [{ type: Output, args: ['realIndexChange',] }],
924
-    s_resize: [{ type: Output, args: ['resize',] }],
925
-    s_scroll: [{ type: Output, args: ['scroll',] }],
926
-    s_scrollbarDragEnd: [{ type: Output, args: ['scrollbarDragEnd',] }],
927
-    s_scrollbarDragMove: [{ type: Output, args: ['scrollbarDragMove',] }],
928
-    s_scrollbarDragStart: [{ type: Output, args: ['scrollbarDragStart',] }],
929
-    s_setTransition: [{ type: Output, args: ['setTransition',] }],
930
-    s_setTranslate: [{ type: Output, args: ['setTranslate',] }],
931
-    s_slideChange: [{ type: Output, args: ['slideChange',] }],
932
-    s_slideChangeTransitionEnd: [{ type: Output, args: ['slideChangeTransitionEnd',] }],
933
-    s_slideChangeTransitionStart: [{ type: Output, args: ['slideChangeTransitionStart',] }],
934
-    s_slideNextTransitionEnd: [{ type: Output, args: ['slideNextTransitionEnd',] }],
935
-    s_slideNextTransitionStart: [{ type: Output, args: ['slideNextTransitionStart',] }],
936
-    s_slidePrevTransitionEnd: [{ type: Output, args: ['slidePrevTransitionEnd',] }],
937
-    s_slidePrevTransitionStart: [{ type: Output, args: ['slidePrevTransitionStart',] }],
938
-    s_slideResetTransitionStart: [{ type: Output, args: ['slideResetTransitionStart',] }],
939
-    s_slideResetTransitionEnd: [{ type: Output, args: ['slideResetTransitionEnd',] }],
940
-    s_sliderMove: [{ type: Output, args: ['sliderMove',] }],
941
-    s_sliderFirstMove: [{ type: Output, args: ['sliderFirstMove',] }],
942
-    s_slidesLengthChange: [{ type: Output, args: ['slidesLengthChange',] }],
943
-    s_slidesGridLengthChange: [{ type: Output, args: ['slidesGridLengthChange',] }],
944
-    s_snapGridLengthChange: [{ type: Output, args: ['snapGridLengthChange',] }],
945
-    s_snapIndexChange: [{ type: Output, args: ['snapIndexChange',] }],
946
-    s_tap: [{ type: Output, args: ['tap',] }],
947
-    s_toEdge: [{ type: Output, args: ['toEdge',] }],
948
-    s_touchEnd: [{ type: Output, args: ['touchEnd',] }],
949
-    s_touchMove: [{ type: Output, args: ['touchMove',] }],
950
-    s_touchMoveOpposite: [{ type: Output, args: ['touchMoveOpposite',] }],
951
-    s_touchStart: [{ type: Output, args: ['touchStart',] }],
952
-    s_transitionEnd: [{ type: Output, args: ['transitionEnd',] }],
953
-    s_transitionStart: [{ type: Output, args: ['transitionStart',] }],
954
-    s_update: [{ type: Output, args: ['update',] }],
955
-    s_zoomChange: [{ type: Output, args: ['zoomChange',] }],
956
-    s_swiper: [{ type: Output, args: ['swiper',] }],
957
-    indexChange: [{ type: Output }],
958
-    prevElRef: [{ type: ViewChild, args: ['prevElRef', { static: false },] }],
959
-    nextElRef: [{ type: ViewChild, args: ['nextElRef', { static: false },] }],
960
-    scrollbarElRef: [{ type: ViewChild, args: ['scrollbarElRef', { static: false },] }],
961
-    paginationElRef: [{ type: ViewChild, args: ['paginationElRef', { static: false },] }],
962
-    slidesEl: [{ type: ContentChildren, args: [SwiperSlideDirective, { descendants: true },] }],
963
-    containerClasses: [{ type: HostBinding, args: ['class',] }]
964
-};
965
-
966
-class SwiperModule {
967
-}
968
-SwiperModule.decorators = [
969
-    { type: NgModule, args: [{
970
-                declarations: [SwiperComponent, SwiperSlideDirective],
971
-                exports: [SwiperComponent, SwiperSlideDirective],
972
-                imports: [CommonModule],
973
-            },] }
974
-];
975
-
976
-/*
977
- * Public API Surface of angular
978
- */
979
-
980
-/**
981
- * Generated bundle index. Do not edit.
982
- */
983
-
984
-export { SwiperComponent, SwiperModule, SwiperSlideDirective };
985
-//# sourceMappingURL=swiper_angular.js.map
Browse code

swiper.js version 6.4.5

Benjamin Roth authored on17/01/2021 16:24:34
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,985 @@
1
+import { Directive, TemplateRef, Input, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, NgZone, ElementRef, ChangeDetectorRef, Output, ViewChild, ContentChildren, HostBinding, NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+import Swiper from 'swiper/core';
4
+import { Subject, of } from 'rxjs';
5
+
6
+function isObject(o) {
7
+    return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
8
+}
9
+function extend(target, src) {
10
+    Object.keys(src).forEach((key) => {
11
+        if (typeof target[key] === 'undefined') {
12
+            target[key] = src[key];
13
+            return;
14
+        }
15
+        if (target[key] && !src[key]) {
16
+            return;
17
+        }
18
+        if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {
19
+            extend(target[key], src[key]);
20
+        }
21
+        else {
22
+            target[key] = src[key];
23
+        }
24
+    });
25
+}
26
+function uniqueClasses(classNames = '') {
27
+    const classes = classNames
28
+        .split(' ')
29
+        .map((c) => c.trim())
30
+        .filter((c) => !!c);
31
+    const unique = [];
32
+    classes.forEach((c) => {
33
+        if (unique.indexOf(c) < 0)
34
+            unique.push(c);
35
+    });
36
+    return unique.join(' ');
37
+}
38
+function coerceBooleanProperty(value) {
39
+    return value != null && `${value}` !== 'false';
40
+}
41
+const ignoreNgOnChanges = ['pagination', 'navigation', 'scrollbar', 'virtual'];
42
+function setProperty(val, obj = {}) {
43
+    if (isObject(val)) {
44
+        return val;
45
+    }
46
+    const newValue = coerceBooleanProperty(val);
47
+    if (newValue === true) {
48
+        return obj;
49
+    }
50
+    return newValue;
51
+}
52
+
53
+/* underscore in name -> watch for changes */
54
+const paramsList = [
55
+    'init',
56
+    '_direction',
57
+    'touchEventsTarget',
58
+    'initialSlide',
59
+    '_speed',
60
+    'cssMode',
61
+    'updateOnWindowResize',
62
+    'nested',
63
+    '_width',
64
+    '_height',
65
+    'preventInteractionOnTransition',
66
+    'userAgent',
67
+    'url',
68
+    '_edgeSwipeDetection',
69
+    '_edgeSwipeThreshold',
70
+    '_freeMode',
71
+    '_freeModeMomentum',
72
+    '_freeModeMomentumRatio',
73
+    '_freeModeMomentumBounce',
74
+    '_freeModeMomentumBounceRatio',
75
+    '_freeModeMomentumVelocityRatio',
76
+    '_freeModeSticky',
77
+    '_freeModeMinimumVelocity',
78
+    '_autoHeight',
79
+    'setWrapperSize',
80
+    'virtualTranslate',
81
+    '_effect',
82
+    'breakpoints',
83
+    '_spaceBetween',
84
+    '_slidesPerView',
85
+    '_slidesPerColumn',
86
+    '_slidesPerColumnFill',
87
+    '_slidesPerGroup',
88
+    '_slidesPerGroupSkip',
89
+    '_centeredSlides',
90
+    '_centeredSlidesBounds',
91
+    '_slidesOffsetBefore',
92
+    '_slidesOffsetAfter',
93
+    'normalizeSlideIndex',
94
+    '_centerInsufficientSlides',
95
+    '_watchOverflow',
96
+    'roundLengths',
97
+    'touchRatio',
98
+    'touchAngle',
99
+    'simulateTouch',
100
+    '_shortSwipes',
101
+    '_longSwipes',
102
+    'longSwipesRatio',
103
+    'longSwipesMs',
104
+    '_followFinger',
105
+    'allowTouchMove',
106
+    '_threshold',
107
+    'touchMoveStopPropagation',
108
+    'touchStartPreventDefault',
109
+    'touchStartForcePreventDefault',
110
+    'touchReleaseOnEdges',
111
+    'uniqueNavElements',
112
+    '_resistance',
113
+    '_resistanceRatio',
114
+    '_watchSlidesProgress',
115
+    '_watchSlidesVisibility',
116
+    '_grabCursor',
117
+    'preventClicks',
118
+    'preventClicksPropagation',
119
+    '_slideToClickedSlide',
120
+    '_preloadImages',
121
+    'updateOnImagesReady',
122
+    '_loop',
123
+    '_loopAdditionalSlides',
124
+    '_loopedSlides',
125
+    '_loopFillGroupWithBlank',
126
+    'loopPreventsSlide',
127
+    '_allowSlidePrev',
128
+    '_allowSlideNext',
129
+    '_swipeHandler',
130
+    '_noSwiping',
131
+    'noSwipingClass',
132
+    'noSwipingSelector',
133
+    'passiveListeners',
134
+    'containerModifierClass',
135
+    'slideClass',
136
+    'slideBlankClass',
137
+    'slideActiveClass',
138
+    'slideDuplicateActiveClass',
139
+    'slideVisibleClass',
140
+    'slideDuplicateClass',
141
+    'slideNextClass',
142
+    'slideDuplicateNextClass',
143
+    'slidePrevClass',
144
+    'slideDuplicatePrevClass',
145
+    'wrapperClass',
146
+    'runCallbacksOnInit',
147
+    // modules
148
+    'a11y',
149
+    'autoplay',
150
+    '_controller',
151
+    'coverflowEffect',
152
+    'cubeEffect',
153
+    'fadeEffect',
154
+    'flipEffect',
155
+    'hashNavigation',
156
+    'history',
157
+    'keyboard',
158
+    'lazy',
159
+    'mousewheel',
160
+    '_navigation',
161
+    '_pagination',
162
+    'parallax',
163
+    '_scrollbar',
164
+    '_thumbs',
165
+    'virtual',
166
+    'zoom',
167
+];
168
+
169
+// eslint-disable-next-line
170
+const ɵ0 = (key) => key.replace(/_/, '');
171
+const allowedParams = paramsList.map(ɵ0);
172
+function getParams(obj = {}) {
173
+    const params = {
174
+        on: {},
175
+    };
176
+    const passedParams = {};
177
+    extend(params, Swiper.defaults);
178
+    extend(params, Swiper.extendedDefaults);
179
+    params._emitClasses = true;
180
+    const rest = {};
181
+    Object.keys(obj).forEach((key) => {
182
+        const _key = key.replace(/^_/, '');
183
+        if (typeof obj[_key] === 'undefined')
184
+            return;
185
+        if (allowedParams.indexOf(_key) >= 0) {
186
+            if (isObject(obj[_key])) {
187
+                params[_key] = {};
188
+                passedParams[_key] = {};
189
+                extend(params[_key], obj[_key]);
190
+                extend(passedParams[_key], obj[_key]);
191
+            }
192
+            else {
193
+                params[_key] = obj[_key];
194
+                passedParams[_key] = obj[_key];
195
+            }
196
+        }
197
+        else {
198
+            rest[_key] = obj[_key];
199
+        }
200
+    });
201
+    return { params, passedParams, rest };
202
+}
203
+
204
+class SwiperSlideDirective {
205
+    constructor(template) {
206
+        this.template = template;
207
+        this.slideData = {
208
+            isActive: false,
209
+            isPrev: false,
210
+            isNext: false,
211
+            isVisible: false,
212
+            isDuplicate: false,
213
+        };
214
+    }
215
+    get classNames() {
216
+        return this._classNames;
217
+    }
218
+    set classNames(val) {
219
+        if (this._classNames === val) {
220
+            return;
221
+        }
222
+        this._classNames = val;
223
+        this.slideData = {
224
+            isActive: this._hasClass(['swiper-slide-active', 'swiper-slide-duplicate-active']),
225
+            isVisible: this._hasClass(['swiper-slide-visible']),
226
+            isDuplicate: this._hasClass(['swiper-slide-duplicate']),
227
+            isPrev: this._hasClass(['swiper-slide-prev', 'swiper-slide-duplicate-prev']),
228
+            isNext: this._hasClass(['swiper-slide-next', 'swiper-slide-duplicate-next']),
229
+        };
230
+    }
231
+    _hasClass(classNames) {
232
+        return classNames.some((className) => this._classNames.indexOf(className) >= 0);
233
+    }
234
+}
235
+SwiperSlideDirective.decorators = [
236
+    { type: Directive, args: [{
237
+                selector: '[swiperSlide]',
238
+            },] }
239
+];
240
+SwiperSlideDirective.ctorParameters = () => [
241
+    { type: TemplateRef }
242
+];
243
+SwiperSlideDirective.propDecorators = {
244
+    virtualIndex: [{ type: Input }]
245
+};
246
+
247
+class SwiperComponent {
248
+    constructor(zone, elementRef, _changeDetectorRef) {
249
+        this.zone = zone;
250
+        this.elementRef = elementRef;
251
+        this._changeDetectorRef = _changeDetectorRef;
252
+        this.init = true;
253
+        this.slideClass = 'swiper-slide';
254
+        this.wrapperClass = 'swiper-wrapper';
255
+        // prettier-ignore
256
+        this.s__beforeBreakpoint = new EventEmitter();
257
+        // prettier-ignore
258
+        this.s__containerClasses = new EventEmitter();
259
+        // prettier-ignore
260
+        this.s__slideClass = new EventEmitter();
261
+        // prettier-ignore
262
+        this.s__swiper = new EventEmitter();
263
+        // prettier-ignore
264
+        this.s_activeIndexChange = new EventEmitter();
265
+        // prettier-ignore
266
+        this.s_afterInit = new EventEmitter();
267
+        // prettier-ignore
268
+        this.s_autoplay = new EventEmitter();
269
+        // prettier-ignore
270
+        this.s_autoplayStart = new EventEmitter();
271
+        // prettier-ignore
272
+        this.s_autoplayStop = new EventEmitter();
273
+        // prettier-ignore
274
+        this.s_beforeDestroy = new EventEmitter();
275
+        // prettier-ignore
276
+        this.s_beforeInit = new EventEmitter();
277
+        // prettier-ignore
278
+        this.s_beforeLoopFix = new EventEmitter();
279
+        // prettier-ignore
280
+        this.s_beforeResize = new EventEmitter();
281
+        // prettier-ignore
282
+        this.s_beforeSlideChangeStart = new EventEmitter();
283
+        // prettier-ignore
284
+        this.s_beforeTransitionStart = new EventEmitter();
285
+        // prettier-ignore
286
+        this.s_breakpoint = new EventEmitter();
287
+        // prettier-ignore
288
+        this.s_changeDirection = new EventEmitter();
289
+        // prettier-ignore
290
+        this.s_click = new EventEmitter();
291
+        // prettier-ignore
292
+        this.s_doubleTap = new EventEmitter();
293
+        // prettier-ignore
294
+        this.s_doubleClick = new EventEmitter();
295
+        // prettier-ignore
296
+        this.s_destroy = new EventEmitter();
297
+        // prettier-ignore
298
+        this.s_fromEdge = new EventEmitter();
299
+        // prettier-ignore
300
+        this.s_hashChange = new EventEmitter();
301
+        // prettier-ignore
302
+        this.s_hashSet = new EventEmitter();
303
+        // prettier-ignore
304
+        this.s_imagesReady = new EventEmitter();
305
+        // prettier-ignore
306
+        this.s_init = new EventEmitter();
307
+        // prettier-ignore
308
+        this.s_keyPress = new EventEmitter();
309
+        // prettier-ignore
310
+        this.s_lazyImageLoad = new EventEmitter();
311
+        // prettier-ignore
312
+        this.s_lazyImageReady = new EventEmitter();
313
+        // prettier-ignore
314
+        this.s_loopFix = new EventEmitter();
315
+        // prettier-ignore
316
+        this.s_momentumBounce = new EventEmitter();
317
+        // prettier-ignore
318
+        this.s_navigationHide = new EventEmitter();
319
+        // prettier-ignore
320
+        this.s_navigationShow = new EventEmitter();
321
+        // prettier-ignore
322
+        this.s_observerUpdate = new EventEmitter();
323
+        // prettier-ignore
324
+        this.s_orientationchange = new EventEmitter();
325
+        // prettier-ignore
326
+        this.s_paginationHide = new EventEmitter();
327
+        // prettier-ignore
328
+        this.s_paginationRender = new EventEmitter();
329
+        // prettier-ignore
330
+        this.s_paginationShow = new EventEmitter();
331
+        // prettier-ignore
332
+        this.s_paginationUpdate = new EventEmitter();
333
+        // prettier-ignore
334
+        this.s_progress = new EventEmitter();
335
+        // prettier-ignore
336
+        this.s_reachBeginning = new EventEmitter();
337
+        // prettier-ignore
338
+        this.s_reachEnd = new EventEmitter();
339
+        // prettier-ignore
340
+        this.s_realIndexChange = new EventEmitter();
341
+        // prettier-ignore
342
+        this.s_resize = new EventEmitter();
343
+        // prettier-ignore
344
+        this.s_scroll = new EventEmitter();
345
+        // prettier-ignore
346
+        this.s_scrollbarDragEnd = new EventEmitter();
347
+        // prettier-ignore
348
+        this.s_scrollbarDragMove = new EventEmitter();
349
+        // prettier-ignore
350
+        this.s_scrollbarDragStart = new EventEmitter();
351
+        // prettier-ignore
352
+        this.s_setTransition = new EventEmitter();
353
+        // prettier-ignore
354
+        this.s_setTranslate = new EventEmitter();
355
+        // prettier-ignore
356
+        this.s_slideChange = new EventEmitter();
357
+        // prettier-ignore
358
+        this.s_slideChangeTransitionEnd = new EventEmitter();
359
+        // prettier-ignore
360
+        this.s_slideChangeTransitionStart = new EventEmitter();
361
+        // prettier-ignore
362
+        this.s_slideNextTransitionEnd = new EventEmitter();
363
+        // prettier-ignore
364
+        this.s_slideNextTransitionStart = new EventEmitter();
365
+        // prettier-ignore
366
+        this.s_slidePrevTransitionEnd = new EventEmitter();
367
+        // prettier-ignore
368
+        this.s_slidePrevTransitionStart = new EventEmitter();
369
+        // prettier-ignore
370
+        this.s_slideResetTransitionStart = new EventEmitter();
371
+        // prettier-ignore
372
+        this.s_slideResetTransitionEnd = new EventEmitter();
373
+        // prettier-ignore
374
+        this.s_sliderMove = new EventEmitter();
375
+        // prettier-ignore
376
+        this.s_sliderFirstMove = new EventEmitter();
377
+        // prettier-ignore
378
+        this.s_slidesLengthChange = new EventEmitter();
379
+        // prettier-ignore
380
+        this.s_slidesGridLengthChange = new EventEmitter();
381
+        // prettier-ignore
382
+        this.s_snapGridLengthChange = new EventEmitter();
383
+        // prettier-ignore
384
+        this.s_snapIndexChange = new EventEmitter();
385
+        // prettier-ignore
386
+        this.s_tap = new EventEmitter();
387
+        // prettier-ignore
388
+        this.s_toEdge = new EventEmitter();
389
+        // prettier-ignore
390
+        this.s_touchEnd = new EventEmitter();
391
+        // prettier-ignore
392
+        this.s_touchMove = new EventEmitter();
393
+        // prettier-ignore
394
+        this.s_touchMoveOpposite = new EventEmitter();
395
+        // prettier-ignore
396
+        this.s_touchStart = new EventEmitter();
397
+        // prettier-ignore
398
+        this.s_transitionEnd = new EventEmitter();
399
+        // prettier-ignore
400
+        this.s_transitionStart = new EventEmitter();
401
+        // prettier-ignore
402
+        this.s_update = new EventEmitter();
403
+        // prettier-ignore
404
+        this.s_zoomChange = new EventEmitter();
405
+        // prettier-ignore
406
+        this.s_swiper = new EventEmitter();
407
+        this.indexChange = new EventEmitter();
408
+        this._activeSlides = new Subject();
409
+        this.containerClasses = 'swiper-container';
410
+        this.style = null;
411
+    }
412
+    set navigation(val) {
413
+        this._navigation = setProperty(val, {
414
+            nextEl: null,
415
+            prevEl: null,
416
+        });
417
+    }
418
+    get navigation() {
419
+        return this._navigation;
420
+    }
421
+    set pagination(val) {
422
+        this._pagination = setProperty(val, {
423
+            el: null,
424
+        });
425
+    }
426
+    get pagination() {
427
+        return this._pagination;
428
+    }
429
+    set scrollbar(val) {
430
+        this._scrollbar = setProperty(val, {
431
+            el: null,
432
+        });
433
+    }
434
+    get scrollbar() {
435
+        return this._scrollbar;
436
+    }
437
+    set virtual(val) {
438
+        this._virtual = setProperty(val);
439
+    }
440
+    get virtual() {
441
+        return this._virtual;
442
+    }
443
+    set index(index) {
444
+        this.setIndex(index);
445
+    }
446
+    set config(val) {
447
+        this.updateSwiper(val);
448
+        const { params } = getParams(val);
449
+        Object.assign(this, params);
450
+    }
451
+    set prevElRef(el) {
452
+        this._setElement(el, this.navigation, 'navigation', 'prevEl');
453
+    }
454
+    set nextElRef(el) {
455
+        this._setElement(el, this.navigation, 'navigation', 'nextEl');
456
+    }
457
+    set scrollbarElRef(el) {
458
+        this._setElement(el, this.scrollbar, 'scrollbar');
459
+    }
460
+    set paginationElRef(el) {
461
+        this._setElement(el, this.pagination, 'pagination');
462
+    }
463
+    set slidesEl(val) {
464
+        this.slides = val.map((slide, index) => {
465
+            slide.slideIndex = index;
466
+            slide.classNames = this.slideClass;
467
+            return slide;
468
+        });
469
+        if (this.loop && !this.loopedSlides) {
470
+            this.calcLoopedSlides();
471
+        }
472
+        if (!this.virtual) {
473
+            this.prependSlides = of(this.slides.slice(this.slides.length - this.loopedSlides));
474
+            this.appendSlides = of(this.slides.slice(0, this.loopedSlides));
475
+        }
476
+    }
477
+    get activeSlides() {
478
+        if (this.virtual) {
479
+            return this._activeSlides;
480
+        }
481
+        return of(this.slides);
482
+    }
483
+    _setElement(el, ref, update, key = 'el') {
484
+        if (!el && !ref) {
485
+            return;
486
+        }
487
+        if (ref) {
488
+            if (ref[key] === el.nativeElement) {
489
+                return;
490
+            }
491
+            ref[key] = el.nativeElement;
492
+        }
493
+        const updateObj = {};
494
+        updateObj[update] = true;
495
+        this.updateInitSwiper(updateObj);
496
+    }
497
+    ngOnInit() {
498
+        const { params } = getParams(this);
499
+        Object.assign(this, params);
500
+    }
501
+    ngAfterViewInit() {
502
+        if (this.init) {
503
+            this.initSwiper();
504
+            this._changeDetectorRef.detectChanges();
505
+        }
506
+    }
507
+    initSwiper() {
508
+        const { params: swiperParams, passedParams } = getParams(this);
509
+        Object.assign(this, swiperParams);
510
+        swiperParams.onAny = (event, ...args) => {
511
+            const emitter = this[`s_${event}`];
512
+            if (emitter) {
513
+                emitter.emit(...args);
514
+            }
515
+        };
516
+        Object.assign(swiperParams.on, {
517
+            slideChange: () => {
518
+                this.indexChange.emit(this.swiperRef.realIndex);
519
+            },
520
+            _containerClasses(swiper, classes) {
521
+                this.containerClasses = classes;
522
+            },
523
+            _swiper: (swiper) => {
524
+                this.swiperRef = swiper;
525
+                this.s_swiper.emit(this.swiperRef);
526
+                swiper.loopCreate = () => { };
527
+                swiper.loopDestroy = () => { };
528
+                if (swiperParams.loop) {
529
+                    swiper.loopedSlides = this.loopedSlides;
530
+                }
531
+                if (swiper.virtual && swiper.params.virtual.enabled) {
532
+                    swiper.virtual.slides = this.slides;
533
+                    swiper.params.virtual.cache = false;
534
+                    swiper.params.virtual.renderExternal = (data) => {
535
+                        this.updateVirtualSlides(data);
536
+                    };
537
+                    swiper.params.virtual.renderExternalUpdate = false;
538
+                }
539
+                this._changeDetectorRef.detectChanges();
540
+            },
541
+            _slideClass: (_, el, classNames) => {
542
+                const slideIndex = parseInt(el.dataset.swiperSlideIndex);
543
+                if (this.virtual) {
544
+                    const virtualSlide = this.slides.find((item) => {
545
+                        return item.virtualIndex && item.virtualIndex === slideIndex;
546
+                    });
547
+                    if (virtualSlide) {
548
+                        virtualSlide.classNames = classNames;
549
+                        return;
550
+                    }
551
+                }
552
+                this.slides[slideIndex].classNames = classNames;
553
+                this._changeDetectorRef.detectChanges();
554
+            },
555
+        });
556
+        new Swiper(this.elementRef.nativeElement, swiperParams);
557
+    }
558
+    updateVirtualSlides(virtualData) {
559
+        // TODO: type virtualData
560
+        if (!this.swiperRef ||
561
+            (this.currentVirtualData &&
562
+                this.currentVirtualData.from === virtualData.from &&
563
+                this.currentVirtualData.to === virtualData.to &&
564
+                this.currentVirtualData.offset === virtualData.offset)) {
565
+            return;
566
+        }
567
+        this.style = this.swiperRef.isHorizontal()
568
+            ? {
569
+                [this.swiperRef.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`,
570
+            }
571
+            : {
572
+                top: `${virtualData.offset}px`,
573
+            };
574
+        this.currentVirtualData = virtualData;
575
+        this._activeSlides.next(virtualData.slides);
576
+        this._changeDetectorRef.detectChanges();
577
+        this.swiperRef.updateSlides();
578
+        this.swiperRef.updateProgress();
579
+        this.swiperRef.updateSlidesClasses();
580
+        if (this.swiperRef.lazy && this.swiperRef.params.lazy['enabled']) {
581
+            this.swiperRef.lazy.load();
582
+        }
583
+        this.swiperRef.virtual.update(true);
584
+        return;
585
+    }
586
+    ngOnChanges(changedParams) {
587
+        this.updateSwiper(changedParams);
588
+        this._changeDetectorRef.detectChanges();
589
+    }
590
+    updateInitSwiper(changedParams) {
591
+        if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {
592
+            return;
593
+        }
594
+        const { params: currentParams, pagination, navigation, scrollbar, virtual, thumbs, } = this.swiperRef;
595
+        if (changedParams.pagination) {
596
+            if (this.pagination &&
597
+                typeof this.pagination !== 'boolean' &&
598
+                this.pagination.el &&
599
+                pagination &&
600
+                !pagination.el) {
601
+                this.updateParameter('pagination', this.pagination);
602
+                pagination.init();
603
+                pagination.render();
604
+                pagination.update();
605
+            }
606
+            else {
607
+                pagination.destroy();
608
+                pagination.el = null;
609
+            }
610
+        }
611
+        if (changedParams.scrollbar) {
612
+            if (this.scrollbar &&
613
+                typeof this.scrollbar !== 'boolean' &&
614
+                this.scrollbar.el &&
615
+                scrollbar &&
616
+                !scrollbar.el) {
617
+                this.updateParameter('scrollbar', this.scrollbar);
618
+                scrollbar.init();
619
+                scrollbar.updateSize();
620
+                scrollbar.setTranslate();
621
+            }
622
+            else {
623
+                scrollbar.destroy();
624
+                scrollbar.el = null;
625
+            }
626
+        }
627
+        if (changedParams.navigation) {
628
+            if (this.navigation &&
629
+                typeof this.navigation !== 'boolean' &&
630
+                this.navigation.prevEl &&
631
+                this.navigation.nextEl &&
632
+                navigation &&
633
+                !navigation.prevEl &&
634
+                !navigation.nextEl) {
635
+                this.updateParameter('navigation', this.navigation);
636
+                navigation.init();
637
+                navigation.update();
638
+            }
639
+            else if (navigation.prevEl && navigation.nextEl) {
640
+                navigation.destroy();
641
+                navigation.nextEl = null;
642
+                navigation.prevEl = null;
643
+            }
644
+        }
645
+        if (changedParams.thumbs && this.thumbs && this.thumbs.swiper) {
646
+            this.updateParameter('thumbs', this.thumbs);
647
+            const initialized = thumbs.init();
648
+            if (initialized)
649
+                thumbs.update(true);
650
+        }
651
+        if (changedParams.controller && this.controller && this.controller.control) {
652
+            this.swiperRef.controller.control = this.controller.control;
653
+        }
654
+        this.swiperRef.update();
655
+    }
656
+    updateSwiper(changedParams) {
657
+        var _a, _b;
658
+        if (changedParams.config) {
659
+            return;
660
+        }
661
+        if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {
662
+            return;
663
+        }
664
+        for (const key in changedParams) {
665
+            if (ignoreNgOnChanges.indexOf(key) >= 0) {
666
+                continue;
667
+            }
668
+            const newValue = (_b = (_a = changedParams[key]) === null || _a === void 0 ? void 0 : _a.currentValue) !== null && _b !== void 0 ? _b : changedParams[key];
669
+            this.updateParameter(key, newValue);
670
+        }
671
+        if (changedParams.allowSlideNext) {
672
+            this.swiperRef.allowSlideNext = this.allowSlideNext;
673
+        }
674
+        if (changedParams.allowSlidePrev) {
675
+            this.swiperRef.allowSlidePrev = this.allowSlidePrev;
676
+        }
677
+        if (changedParams.direction) {
678
+            this.swiperRef.changeDirection(this.direction, false);
679
+        }
680
+        if (changedParams.breakpoints) {
681
+            if (this.loop && !this.loopedSlides) {
682
+                this.calcLoopedSlides();
683
+            }
684
+            this.swiperRef.currentBreakpoint = null;
685
+            this.swiperRef.setBreakpoint();
686
+        }
687
+        this.swiperRef.update();
688
+    }
689
+    calcLoopedSlides() {
690
+        if (!this.loop) {
691
+            return;
692
+        }
693
+        let slidesPerViewParams = this.slidesPerView;
694
+        if (this.breakpoints) {
695
+            const breakpoint = Swiper.prototype.getBreakpoint(this.breakpoints);
696
+            const breakpointOnlyParams = breakpoint in this.breakpoints ? this.breakpoints[breakpoint] : undefined;
697
+            if (breakpointOnlyParams && breakpointOnlyParams.slidesPerView) {
698
+                slidesPerViewParams = breakpointOnlyParams.slidesPerView;
699
+            }
700
+        }
701
+        if (slidesPerViewParams === 'auto') {
702
+            this.loopedSlides = this.slides.length;
703
+            return this.slides.length;
704
+        }
705
+        let loopedSlides = this.loopedSlides || slidesPerViewParams;
706
+        loopedSlides += this.loopAdditionalSlides;
707
+        if (loopedSlides > this.slides.length) {
708
+            loopedSlides = this.slides.length;
709
+        }
710
+        this.loopedSlides = loopedSlides;
711
+        return loopedSlides;
712
+    }
713
+    updateParameter(key, value) {
714
+        if (!(this.swiperRef && !this.swiperRef.destroyed)) {
715
+            return;
716
+        }
717
+        const _key = key.replace(/^_/, '');
718
+        if (Object.keys(this.swiperRef.modules).indexOf(_key) >= 0) {
719
+            extend(value, this.swiperRef.modules[_key].params[_key]);
720
+        }
721
+        if (isObject(this.swiperRef.params[_key]) && isObject(value)) {
722
+            extend(this.swiperRef.params[_key], value);
723
+        }
724
+        else {
725
+            this.swiperRef.params[_key] = value;
726
+        }
727
+    }
728
+    setIndex(index, speed, silent) {
729
+        if (!this.swiperRef) {
730
+            this.initialSlide = index;
731
+            return;
732
+        }
733
+        if (index === this.swiperRef.realIndex) {
734
+            return;
735
+        }
736
+        this.zone.runOutsideAngular(() => {
737
+            if (this.loop) {
738
+                this.swiperRef.slideToLoop(index, speed, !silent);
739
+            }
740
+            else {
741
+                this.swiperRef.slideTo(index, speed, !silent);
742
+            }
743
+        });
744
+    }
745
+    ngOnDestroy() {
746
+        this.swiperRef.destroy();
747
+    }
748
+}
749
+SwiperComponent.decorators = [
750
+    { type: Component, args: [{
751
+                selector: 'swiper, [swiper]',
752
+                template: "<ng-content select=\"[slot=container-start]\"></ng-content>\n<ng-container *ngIf=\"navigation\">\n  <div class=\"swiper-button-prev\" #prevElRef></div>\n  <div class=\"swiper-button-next\" #nextElRef></div>\n</ng-container>\n<div *ngIf=\"scrollbar\" class=\"swiper-scrollbar\" #scrollbarElRef></div>\n<div *ngIf=\"pagination\" class=\"swiper-pagination\" #paginationElRef></div>\n<div [ngClass]=\"wrapperClass\">\n  <ng-content select=\"[slot=wrapper-start]\"></ng-content>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: prependSlides,\n        key: 'prepend'\n      }\n    \"\n  ></ng-template>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: activeSlides,\n        key: ''\n      }\n    \"\n  ></ng-template>\n  <ng-template\n    *ngTemplateOutlet=\"\n      slidesTemplate;\n      context: {\n        loopSlides: appendSlides,\n        key: 'append'\n      }\n    \"\n  ></ng-template>\n  <ng-content select=\"[slot=wrapper-end]\"></ng-content>\n</div>\n<ng-content select=\"[slot=container-end]\"></ng-content>\n\n<ng-template #slidesTemplate let-loopSlides=\"loopSlides\" let-slideKey=\"key\">\n  <div\n    *ngFor=\"let slide of loopSlides | async\"\n    [ngClass]=\"slide.classNames + ' ' + (slideKey !== '' ? slideDuplicateClass : '')\"\n    [attr.data-swiper-slide-index]=\"slide.virtualIndex ? slide.virtualIndex : slide.slideIndex\"\n    [style]=\"style\"\n  >\n    <ng-template\n      [ngTemplateOutlet]=\"slide.template\"\n      [ngTemplateOutletContext]=\"{\n        $implicit: slide.slideData\n      }\"\n    ></ng-template>\n  </div>\n</ng-template>\n",
753
+                changeDetection: ChangeDetectionStrategy.OnPush,
754
+                encapsulation: ViewEncapsulation.None,
755
+                styles: [`
756
+      swiper {
757
+        display: block;
758
+      }
759
+    `]
760
+            },] }
761
+];
762
+SwiperComponent.ctorParameters = () => [
763
+    { type: NgZone },
764
+    { type: ElementRef },
765
+    { type: ChangeDetectorRef }
766
+];
767
+SwiperComponent.propDecorators = {
768
+    init: [{ type: Input }],
769
+    direction: [{ type: Input }],
770
+    touchEventsTarget: [{ type: Input }],
771
+    initialSlide: [{ type: Input }],
772
+    speed: [{ type: Input }],
773
+    cssMode: [{ type: Input }],
774
+    updateOnWindowResize: [{ type: Input }],
775
+    nested: [{ type: Input }],
776
+    width: [{ type: Input }],
777
+    height: [{ type: Input }],
778
+    preventInteractionOnTransition: [{ type: Input }],
779
+    userAgent: [{ type: Input }],
780
+    url: [{ type: Input }],
781
+    edgeSwipeDetection: [{ type: Input }],
782
+    edgeSwipeThreshold: [{ type: Input }],
783
+    freeMode: [{ type: Input }],
784
+    freeModeMomentum: [{ type: Input }],
785
+    freeModeMomentumRatio: [{ type: Input }],
786
+    freeModeMomentumBounce: [{ type: Input }],
787
+    freeModeMomentumBounceRatio: [{ type: Input }],
788
+    freeModeMomentumVelocityRatio: [{ type: Input }],
789
+    freeModeSticky: [{ type: Input }],
790
+    freeModeMinimumVelocity: [{ type: Input }],
791
+    autoHeight: [{ type: Input }],
792
+    setWrapperSize: [{ type: Input }],
793
+    virtualTranslate: [{ type: Input }],
794
+    effect: [{ type: Input }],
795
+    breakpoints: [{ type: Input }],
796
+    spaceBetween: [{ type: Input }],
797
+    slidesPerView: [{ type: Input }],
798
+    slidesPerColumn: [{ type: Input }],
799
+    slidesPerColumnFill: [{ type: Input }],
800
+    slidesPerGroup: [{ type: Input }],
801
+    slidesPerGroupSkip: [{ type: Input }],
802
+    centeredSlides: [{ type: Input }],
803
+    centeredSlidesBounds: [{ type: Input }],
804
+    slidesOffsetBefore: [{ type: Input }],
805
+    slidesOffsetAfter: [{ type: Input }],
806
+    normalizeSlideIndex: [{ type: Input }],
807
+    centerInsufficientSlides: [{ type: Input }],
808
+    watchOverflow: [{ type: Input }],
809
+    roundLengths: [{ type: Input }],
810
+    touchRatio: [{ type: Input }],
811
+    touchAngle: [{ type: Input }],
812
+    simulateTouch: [{ type: Input }],
813
+    shortSwipes: [{ type: Input }],
814
+    longSwipes: [{ type: Input }],
815
+    longSwipesRatio: [{ type: Input }],
816
+    longSwipesMs: [{ type: Input }],
817
+    followFinger: [{ type: Input }],
818
+    allowTouchMove: [{ type: Input }],
819
+    threshold: [{ type: Input }],
820
+    touchMoveStopPropagation: [{ type: Input }],
821
+    touchStartPreventDefault: [{ type: Input }],
822
+    touchStartForcePreventDefault: [{ type: Input }],
823
+    touchReleaseOnEdges: [{ type: Input }],
824
+    uniqueNavElements: [{ type: Input }],
825
+    resistance: [{ type: Input }],
826
+    resistanceRatio: [{ type: Input }],
827
+    watchSlidesProgress: [{ type: Input }],
828
+    watchSlidesVisibility: [{ type: Input }],
829
+    grabCursor: [{ type: Input }],
830
+    preventClicks: [{ type: Input }],
831
+    preventClicksPropagation: [{ type: Input }],
832
+    slideToClickedSlide: [{ type: Input }],
833
+    preloadImages: [{ type: Input }],
834
+    updateOnImagesReady: [{ type: Input }],
835
+    loop: [{ type: Input }],
836
+    loopAdditionalSlides: [{ type: Input }],
837
+    loopedSlides: [{ type: Input }],
838
+    loopFillGroupWithBlank: [{ type: Input }],
839
+    loopPreventsSlide: [{ type: Input }],
840
+    allowSlidePrev: [{ type: Input }],
841
+    allowSlideNext: [{ type: Input }],
842
+    swipeHandler: [{ type: Input }],
843
+    noSwiping: [{ type: Input }],
844
+    noSwipingClass: [{ type: Input }],
845
+    noSwipingSelector: [{ type: Input }],
846
+    passiveListeners: [{ type: Input }],
847
+    containerModifierClass: [{ type: Input }],
848
+    slideClass: [{ type: Input }],
849
+    slideBlankClass: [{ type: Input }],
850
+    slideActiveClass: [{ type: Input }],
851
+    slideDuplicateActiveClass: [{ type: Input }],
852
+    slideVisibleClass: [{ type: Input }],
853
+    slideDuplicateClass: [{ type: Input }],
854
+    slideNextClass: [{ type: Input }],
855
+    slideDuplicateNextClass: [{ type: Input }],
856
+    slidePrevClass: [{ type: Input }],
857
+    slideDuplicatePrevClass: [{ type: Input }],
858
+    wrapperClass: [{ type: Input }],
859
+    runCallbacksOnInit: [{ type: Input }],
860
+    a11y: [{ type: Input }],
861
+    autoplay: [{ type: Input }],
862
+    controller: [{ type: Input }],
863
+    coverflowEffect: [{ type: Input }],
864
+    cubeEffect: [{ type: Input }],
865
+    fadeEffect: [{ type: Input }],
866
+    flipEffect: [{ type: Input }],
867
+    hashNavigation: [{ type: Input }],
868
+    history: [{ type: Input }],
869
+    keyboard: [{ type: Input }],
870
+    lazy: [{ type: Input }],
871
+    mousewheel: [{ type: Input }],
872
+    parallax: [{ type: Input }],
873
+    thumbs: [{ type: Input }],
874
+    zoom: [{ type: Input }],
875
+    navigation: [{ type: Input }],
876
+    pagination: [{ type: Input }],
877
+    scrollbar: [{ type: Input }],
878
+    virtual: [{ type: Input }],
879
+    index: [{ type: Input }],
880
+    config: [{ type: Input }],
881
+    s__beforeBreakpoint: [{ type: Output, args: ['_beforeBreakpoint',] }],
882
+    s__containerClasses: [{ type: Output, args: ['_containerClasses',] }],
883
+    s__slideClass: [{ type: Output, args: ['_slideClass',] }],
884
+    s__swiper: [{ type: Output, args: ['_swiper',] }],
885
+    s_activeIndexChange: [{ type: Output, args: ['activeIndexChange',] }],
886
+    s_afterInit: [{ type: Output, args: ['afterInit',] }],
887
+    s_autoplay: [{ type: Output, args: ['autoplay',] }],
888
+    s_autoplayStart: [{ type: Output, args: ['autoplayStart',] }],
889
+    s_autoplayStop: [{ type: Output, args: ['autoplayStop',] }],
890
+    s_beforeDestroy: [{ type: Output, args: ['beforeDestroy',] }],
891
+    s_beforeInit: [{ type: Output, args: ['beforeInit',] }],
892
+    s_beforeLoopFix: [{ type: Output, args: ['beforeLoopFix',] }],
893
+    s_beforeResize: [{ type: Output, args: ['beforeResize',] }],
894
+    s_beforeSlideChangeStart: [{ type: Output, args: ['beforeSlideChangeStart',] }],
895
+    s_beforeTransitionStart: [{ type: Output, args: ['beforeTransitionStart',] }],
896
+    s_breakpoint: [{ type: Output, args: ['breakpoint',] }],
897
+    s_changeDirection: [{ type: Output, args: ['changeDirection',] }],
898
+    s_click: [{ type: Output, args: ['click',] }],
899
+    s_doubleTap: [{ type: Output, args: ['doubleTap',] }],
900
+    s_doubleClick: [{ type: Output, args: ['doubleClick',] }],
901
+    s_destroy: [{ type: Output, args: ['destroy',] }],
902
+    s_fromEdge: [{ type: Output, args: ['fromEdge',] }],
903
+    s_hashChange: [{ type: Output, args: ['hashChange',] }],
904
+    s_hashSet: [{ type: Output, args: ['hashSet',] }],
905
+    s_imagesReady: [{ type: Output, args: ['imagesReady',] }],
906
+    s_init: [{ type: Output, args: ['init',] }],
907
+    s_keyPress: [{ type: Output, args: ['keyPress',] }],
908
+    s_lazyImageLoad: [{ type: Output, args: ['lazyImageLoad',] }],
909
+    s_lazyImageReady: [{ type: Output, args: ['lazyImageReady',] }],
910
+    s_loopFix: [{ type: Output, args: ['loopFix',] }],
911
+    s_momentumBounce: [{ type: Output, args: ['momentumBounce',] }],
912
+    s_navigationHide: [{ type: Output, args: ['navigationHide',] }],
913
+    s_navigationShow: [{ type: Output, args: ['navigationShow',] }],
914
+    s_observerUpdate: [{ type: Output, args: ['observerUpdate',] }],
915
+    s_orientationchange: [{ type: Output, args: ['orientationchange',] }],
916
+    s_paginationHide: [{ type: Output, args: ['paginationHide',] }],
917
+    s_paginationRender: [{ type: Output, args: ['paginationRender',] }],
918
+    s_paginationShow: [{ type: Output, args: ['paginationShow',] }],
919
+    s_paginationUpdate: [{ type: Output, args: ['paginationUpdate',] }],
920
+    s_progress: [{ type: Output, args: ['progress',] }],
921
+    s_reachBeginning: [{ type: Output, args: ['reachBeginning',] }],
922
+    s_reachEnd: [{ type: Output, args: ['reachEnd',] }],
923
+    s_realIndexChange: [{ type: Output, args: ['realIndexChange',] }],
924
+    s_resize: [{ type: Output, args: ['resize',] }],
925
+    s_scroll: [{ type: Output, args: ['scroll',] }],
926
+    s_scrollbarDragEnd: [{ type: Output, args: ['scrollbarDragEnd',] }],
927
+    s_scrollbarDragMove: [{ type: Output, args: ['scrollbarDragMove',] }],
928
+    s_scrollbarDragStart: [{ type: Output, args: ['scrollbarDragStart',] }],
929
+    s_setTransition: [{ type: Output, args: ['setTransition',] }],
930
+    s_setTranslate: [{ type: Output, args: ['setTranslate',] }],
931
+    s_slideChange: [{ type: Output, args: ['slideChange',] }],
932
+    s_slideChangeTransitionEnd: [{ type: Output, args: ['slideChangeTransitionEnd',] }],
933
+    s_slideChangeTransitionStart: [{ type: Output, args: ['slideChangeTransitionStart',] }],
934
+    s_slideNextTransitionEnd: [{ type: Output, args: ['slideNextTransitionEnd',] }],
935
+    s_slideNextTransitionStart: [{ type: Output, args: ['slideNextTransitionStart',] }],
936
+    s_slidePrevTransitionEnd: [{ type: Output, args: ['slidePrevTransitionEnd',] }],
937
+    s_slidePrevTransitionStart: [{ type: Output, args: ['slidePrevTransitionStart',] }],
938
+    s_slideResetTransitionStart: [{ type: Output, args: ['slideResetTransitionStart',] }],
939
+    s_slideResetTransitionEnd: [{ type: Output, args: ['slideResetTransitionEnd',] }],
940
+    s_sliderMove: [{ type: Output, args: ['sliderMove',] }],
941
+    s_sliderFirstMove: [{ type: Output, args: ['sliderFirstMove',] }],
942
+    s_slidesLengthChange: [{ type: Output, args: ['slidesLengthChange',] }],
943
+    s_slidesGridLengthChange: [{ type: Output, args: ['slidesGridLengthChange',] }],
944
+    s_snapGridLengthChange: [{ type: Output, args: ['snapGridLengthChange',] }],
945
+    s_snapIndexChange: [{ type: Output, args: ['snapIndexChange',] }],
946
+    s_tap: [{ type: Output, args: ['tap',] }],
947
+    s_toEdge: [{ type: Output, args: ['toEdge',] }],
948
+    s_touchEnd: [{ type: Output, args: ['touchEnd',] }],
949
+    s_touchMove: [{ type: Output, args: ['touchMove',] }],
950
+    s_touchMoveOpposite: [{ type: Output, args: ['touchMoveOpposite',] }],
951
+    s_touchStart: [{ type: Output, args: ['touchStart',] }],
952
+    s_transitionEnd: [{ type: Output, args: ['transitionEnd',] }],
953
+    s_transitionStart: [{ type: Output, args: ['transitionStart',] }],
954
+    s_update: [{ type: Output, args: ['update',] }],
955
+    s_zoomChange: [{ type: Output, args: ['zoomChange',] }],
956
+    s_swiper: [{ type: Output, args: ['swiper',] }],
957
+    indexChange: [{ type: Output }],
958
+    prevElRef: [{ type: ViewChild, args: ['prevElRef', { static: false },] }],
959
+    nextElRef: [{ type: ViewChild, args: ['nextElRef', { static: false },] }],
960
+    scrollbarElRef: [{ type: ViewChild, args: ['scrollbarElRef', { static: false },] }],
961
+    paginationElRef: [{ type: ViewChild, args: ['paginationElRef', { static: false },] }],
962
+    slidesEl: [{ type: ContentChildren, args: [SwiperSlideDirective, { descendants: true },] }],
963
+    containerClasses: [{ type: HostBinding, args: ['class',] }]
964
+};
965
+
966
+class SwiperModule {
967
+}
968
+SwiperModule.decorators = [
969
+    { type: NgModule, args: [{
970
+                declarations: [SwiperComponent, SwiperSlideDirective],
971
+                exports: [SwiperComponent, SwiperSlideDirective],
972
+                imports: [CommonModule],
973
+            },] }
974
+];
975
+
976
+/*
977
+ * Public API Surface of angular
978
+ */
979
+
980
+/**
981
+ * Generated bundle index. Do not edit.
982
+ */
983
+
984
+export { SwiperComponent, SwiperModule, SwiperSlideDirective };
985
+//# sourceMappingURL=swiper_angular.js.map