1 | import * as i0 from '@angular/core';
|
2 | import { Directive, Input, EventEmitter, PLATFORM_ID, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Output, ViewChild, ContentChildren, HostBinding, NgModule } from '@angular/core';
|
3 | import * as i1 from '@angular/common';
|
4 | import { isPlatformBrowser, CommonModule } from '@angular/common';
|
5 | import Swiper from 'swiper';
|
6 | import { Subject, of } from 'rxjs';
|
7 |
|
8 |
|
9 | const paramsList = [
|
10 | 'init',
|
11 | 'enabled',
|
12 | '_direction',
|
13 | 'touchEventsTarget',
|
14 | 'initialSlide',
|
15 | '_speed',
|
16 | 'cssMode',
|
17 | 'updateOnWindowResize',
|
18 | 'resizeObserver',
|
19 | 'nested',
|
20 | 'focusableElements',
|
21 | '_width',
|
22 | '_height',
|
23 | 'preventInteractionOnTransition',
|
24 | 'userAgent',
|
25 | 'url',
|
26 | '_edgeSwipeDetection',
|
27 | '_edgeSwipeThreshold',
|
28 | '_freeMode',
|
29 | '_autoHeight',
|
30 | 'setWrapperSize',
|
31 | 'virtualTranslate',
|
32 | '_effect',
|
33 | 'breakpoints',
|
34 | '_spaceBetween',
|
35 | '_slidesPerView',
|
36 | 'maxBackfaceHiddenSlides',
|
37 | '_grid',
|
38 | '_slidesPerGroup',
|
39 | '_slidesPerGroupSkip',
|
40 | '_slidesPerGroupAuto',
|
41 | '_centeredSlides',
|
42 | '_centeredSlidesBounds',
|
43 | '_slidesOffsetBefore',
|
44 | '_slidesOffsetAfter',
|
45 | 'normalizeSlideIndex',
|
46 | '_centerInsufficientSlides',
|
47 | '_watchOverflow',
|
48 | 'roundLengths',
|
49 | 'touchRatio',
|
50 | 'touchAngle',
|
51 | 'simulateTouch',
|
52 | '_shortSwipes',
|
53 | '_longSwipes',
|
54 | 'longSwipesRatio',
|
55 | 'longSwipesMs',
|
56 | '_followFinger',
|
57 | 'allowTouchMove',
|
58 | '_threshold',
|
59 | 'touchMoveStopPropagation',
|
60 | 'touchStartPreventDefault',
|
61 | 'touchStartForcePreventDefault',
|
62 | 'touchReleaseOnEdges',
|
63 | 'uniqueNavElements',
|
64 | '_resistance',
|
65 | '_resistanceRatio',
|
66 | '_watchSlidesProgress',
|
67 | '_grabCursor',
|
68 | 'preventClicks',
|
69 | 'preventClicksPropagation',
|
70 | '_slideToClickedSlide',
|
71 | '_preloadImages',
|
72 | 'updateOnImagesReady',
|
73 | '_loop',
|
74 | '_loopAdditionalSlides',
|
75 | '_loopedSlides',
|
76 | '_loopedSlidesLimit',
|
77 | '_loopFillGroupWithBlank',
|
78 | 'loopPreventsSlide',
|
79 | '_rewind',
|
80 | '_allowSlidePrev',
|
81 | '_allowSlideNext',
|
82 | '_swipeHandler',
|
83 | '_noSwiping',
|
84 | 'noSwipingClass',
|
85 | 'noSwipingSelector',
|
86 | 'passiveListeners',
|
87 | 'containerModifierClass',
|
88 | 'slideClass',
|
89 | 'slideBlankClass',
|
90 | 'slideActiveClass',
|
91 | 'slideDuplicateActiveClass',
|
92 | 'slideVisibleClass',
|
93 | 'slideDuplicateClass',
|
94 | 'slideNextClass',
|
95 | 'slideDuplicateNextClass',
|
96 | 'slidePrevClass',
|
97 | 'slideDuplicatePrevClass',
|
98 | 'wrapperClass',
|
99 | 'runCallbacksOnInit',
|
100 | 'observer',
|
101 | 'observeParents',
|
102 | 'observeSlideChildren',
|
103 |
|
104 | 'a11y',
|
105 | 'autoplay',
|
106 | '_controller',
|
107 | 'coverflowEffect',
|
108 | 'cubeEffect',
|
109 | 'fadeEffect',
|
110 | 'flipEffect',
|
111 | 'creativeEffect',
|
112 | 'cardsEffect',
|
113 | 'hashNavigation',
|
114 | 'history',
|
115 | 'keyboard',
|
116 | 'lazy',
|
117 | 'mousewheel',
|
118 | '_navigation',
|
119 | '_pagination',
|
120 | 'parallax',
|
121 | '_scrollbar',
|
122 | '_thumbs',
|
123 | 'virtual',
|
124 | 'zoom',
|
125 | 'on',
|
126 | ];
|
127 |
|
128 | function isObject(o) {
|
129 | return (typeof o === 'object' &&
|
130 | o !== null &&
|
131 | o.constructor &&
|
132 | Object.prototype.toString.call(o).slice(8, -1) === 'Object');
|
133 | }
|
134 | function isEnabled(val) {
|
135 | return typeof val !== 'undefined' && typeof val !== 'boolean' && val.enabled === true;
|
136 | }
|
137 | function isShowEl(val, obj, el) {
|
138 | return ((coerceBooleanProperty(val) === true && obj && !obj.el) ||
|
139 | !(typeof obj !== 'boolean' &&
|
140 | obj.el !== (el === null || el === void 0 ? void 0 : el.nativeElement) &&
|
141 | (typeof obj.el === 'string' || typeof obj.el === 'object')));
|
142 | }
|
143 | function extend(target, src) {
|
144 | const noExtend = ['__proto__', 'constructor', 'prototype'];
|
145 | Object.keys(src)
|
146 | .filter((key) => noExtend.indexOf(key) < 0)
|
147 | .forEach((key) => {
|
148 | if (typeof target[key] === 'undefined') {
|
149 | target[key] = src[key];
|
150 | return;
|
151 | }
|
152 | if (target[key] && !src[key]) {
|
153 | return;
|
154 | }
|
155 | if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {
|
156 | if (src[key].__swiper__)
|
157 | target[key] = src[key];
|
158 | else
|
159 | extend(target[key], src[key]);
|
160 | }
|
161 | else {
|
162 | target[key] = src[key];
|
163 | }
|
164 | });
|
165 | }
|
166 | function coerceBooleanProperty(value) {
|
167 | return value != null && `${value}` !== 'false';
|
168 | }
|
169 | const ignoreNgOnChanges = ['pagination', 'navigation', 'scrollbar', 'virtual'];
|
170 | function setProperty(val, obj = {}) {
|
171 | if (isObject(val)) {
|
172 | return val;
|
173 | }
|
174 | if (coerceBooleanProperty(val) === true) {
|
175 | return obj;
|
176 | }
|
177 | return false;
|
178 | }
|
179 |
|
180 |
|
181 | const allowedParams = paramsList.map((key) => key.replace(/_/, ''));
|
182 | function getParams(obj = {}) {
|
183 | const params = {
|
184 | on: {},
|
185 | };
|
186 |
|
187 | const passedParams = {};
|
188 | extend(params, Swiper.defaults);
|
189 | extend(params, Swiper.extendedDefaults);
|
190 | params._emitClasses = true;
|
191 | params.init = false;
|
192 | const rest = {};
|
193 | const allowedParams = paramsList.map((key) => key.replace(/_/, ''));
|
194 | Object.keys(obj).forEach((key) => {
|
195 | const _key = key.replace(/^_/, '');
|
196 | if (allowedParams.indexOf(_key) >= 0) {
|
197 | if (isObject(obj[key])) {
|
198 | params[_key] = {};
|
199 | passedParams[_key] = {};
|
200 | extend(params[_key], obj[key]);
|
201 | extend(passedParams[_key], obj[key]);
|
202 | }
|
203 | else {
|
204 | params[_key] = obj[key];
|
205 | passedParams[_key] = obj[key];
|
206 | }
|
207 | }
|
208 |
|
209 |
|
210 |
|
211 | else {
|
212 | rest[_key] = obj[key];
|
213 | }
|
214 | });
|
215 | ['navigation', 'pagination', 'scrollbar'].forEach((key) => {
|
216 | if (params[key] === true)
|
217 | params[key] = {};
|
218 | if (params[key] === false)
|
219 | delete params[key];
|
220 | });
|
221 | return { params, passedParams, rest };
|
222 | }
|
223 |
|
224 | class SwiperSlideDirective {
|
225 | constructor(template) {
|
226 | this.template = template;
|
227 | this.class = '';
|
228 | this.autoplayDelay = null;
|
229 | this.slideData = {
|
230 | isActive: false,
|
231 | isPrev: false,
|
232 | isNext: false,
|
233 | isVisible: false,
|
234 | isDuplicate: false,
|
235 | };
|
236 | }
|
237 | set ngClass(val) {
|
238 | this.class = [this.class || '', val].join(' ');
|
239 | }
|
240 | set zoom(val) {
|
241 | this._zoom = coerceBooleanProperty(val);
|
242 | }
|
243 | get zoom() {
|
244 | return this._zoom;
|
245 | }
|
246 | get classNames() {
|
247 | return this._classNames;
|
248 | }
|
249 | set classNames(val) {
|
250 | if (this._classNames === val) {
|
251 | return;
|
252 | }
|
253 | this._classNames = val;
|
254 | this.slideData = {
|
255 | isActive: this._hasClass(['swiper-slide-active', 'swiper-slide-duplicate-active']),
|
256 | isVisible: this._hasClass(['swiper-slide-visible']),
|
257 | isDuplicate: this._hasClass(['swiper-slide-duplicate']),
|
258 | isPrev: this._hasClass(['swiper-slide-prev', 'swiper-slide-duplicate-prev']),
|
259 | isNext: this._hasClass(['swiper-slide-next', 'swiper-slide-duplicate-next']),
|
260 | };
|
261 | }
|
262 | _hasClass(classNames) {
|
263 | return classNames.some((className) => this._classNames.indexOf(className) >= 0);
|
264 | }
|
265 | }
|
266 | SwiperSlideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SwiperSlideDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
267 | SwiperSlideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: SwiperSlideDirective, selector: "ng-template[swiperSlide]", inputs: { virtualIndex: "virtualIndex", class: "class", ngClass: "ngClass", autoplayDelay: ["data-swiper-autoplay", "autoplayDelay"], zoom: "zoom" }, ngImport: i0 });
|
268 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SwiperSlideDirective, decorators: [{
|
269 | type: Directive,
|
270 | args: [{
|
271 | selector: 'ng-template[swiperSlide]',
|
272 | }]
|
273 | }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { virtualIndex: [{
|
274 | type: Input
|
275 | }], class: [{
|
276 | type: Input
|
277 | }], ngClass: [{
|
278 | type: Input
|
279 | }], autoplayDelay: [{
|
280 | type: Input,
|
281 | args: ['data-swiper-autoplay']
|
282 | }], zoom: [{
|
283 | type: Input
|
284 | }] } });
|
285 |
|
286 | class SwiperComponent {
|
287 | constructor(_ngZone, elementRef, _changeDetectorRef, _platformId) {
|
288 | this._ngZone = _ngZone;
|
289 | this.elementRef = elementRef;
|
290 | this._changeDetectorRef = _changeDetectorRef;
|
291 | this._platformId = _platformId;
|
292 | this.slideClass = 'swiper-slide';
|
293 | this.wrapperClass = 'swiper-wrapper';
|
294 | this.showNavigation = true;
|
295 | this.showPagination = true;
|
296 | this.showScrollbar = true;
|
297 | this.s__beforeBreakpoint = new EventEmitter();
|
298 | this.s__containerClasses = new EventEmitter();
|
299 | this.s__slideClass = new EventEmitter();
|
300 | this.s__swiper = new EventEmitter();
|
301 | this.s_activeIndexChange = new EventEmitter();
|
302 | this.s_afterInit = new EventEmitter();
|
303 | this.s_autoplay = new EventEmitter();
|
304 | this.s_autoplayStart = new EventEmitter();
|
305 | this.s_autoplayStop = new EventEmitter();
|
306 | this.s_autoplayPause = new EventEmitter();
|
307 | this.s_autoplayResume = new EventEmitter();
|
308 | this.s_beforeDestroy = new EventEmitter();
|
309 | this.s_beforeInit = new EventEmitter();
|
310 | this.s_beforeLoopFix = new EventEmitter();
|
311 | this.s_beforeResize = new EventEmitter();
|
312 | this.s_beforeSlideChangeStart = new EventEmitter();
|
313 | this.s_beforeTransitionStart = new EventEmitter();
|
314 | this.s_breakpoint = new EventEmitter();
|
315 | this.s_changeDirection = new EventEmitter();
|
316 | this.s_click = new EventEmitter();
|
317 | this.s_doubleTap = new EventEmitter();
|
318 | this.s_doubleClick = new EventEmitter();
|
319 | this.s_destroy = new EventEmitter();
|
320 | this.s_fromEdge = new EventEmitter();
|
321 | this.s_hashChange = new EventEmitter();
|
322 | this.s_hashSet = new EventEmitter();
|
323 | this.s_imagesReady = new EventEmitter();
|
324 | this.s_init = new EventEmitter();
|
325 | this.s_keyPress = new EventEmitter();
|
326 | this.s_lazyImageLoad = new EventEmitter();
|
327 | this.s_lazyImageReady = new EventEmitter();
|
328 | this.s_loopFix = new EventEmitter();
|
329 | this.s_momentumBounce = new EventEmitter();
|
330 | this.s_navigationHide = new EventEmitter();
|
331 | this.s_navigationShow = new EventEmitter();
|
332 | this.s_navigationPrev = new EventEmitter();
|
333 | this.s_navigationNext = new EventEmitter();
|
334 | this.s_observerUpdate = new EventEmitter();
|
335 | this.s_orientationchange = new EventEmitter();
|
336 | this.s_paginationHide = new EventEmitter();
|
337 | this.s_paginationRender = new EventEmitter();
|
338 | this.s_paginationShow = new EventEmitter();
|
339 | this.s_paginationUpdate = new EventEmitter();
|
340 | this.s_progress = new EventEmitter();
|
341 | this.s_reachBeginning = new EventEmitter();
|
342 | this.s_reachEnd = new EventEmitter();
|
343 | this.s_realIndexChange = new EventEmitter();
|
344 | this.s_resize = new EventEmitter();
|
345 | this.s_scroll = new EventEmitter();
|
346 | this.s_scrollbarDragEnd = new EventEmitter();
|
347 | this.s_scrollbarDragMove = new EventEmitter();
|
348 | this.s_scrollbarDragStart = new EventEmitter();
|
349 | this.s_setTransition = new EventEmitter();
|
350 | this.s_setTranslate = new EventEmitter();
|
351 | this.s_slideChange = new EventEmitter();
|
352 | this.s_slideChangeTransitionEnd = new EventEmitter();
|
353 | this.s_slideChangeTransitionStart = new EventEmitter();
|
354 | this.s_slideNextTransitionEnd = new EventEmitter();
|
355 | this.s_slideNextTransitionStart = new EventEmitter();
|
356 | this.s_slidePrevTransitionEnd = new EventEmitter();
|
357 | this.s_slidePrevTransitionStart = new EventEmitter();
|
358 | this.s_slideResetTransitionStart = new EventEmitter();
|
359 | this.s_slideResetTransitionEnd = new EventEmitter();
|
360 | this.s_sliderMove = new EventEmitter();
|
361 | this.s_sliderFirstMove = new EventEmitter();
|
362 | this.s_slidesLengthChange = new EventEmitter();
|
363 | this.s_slidesGridLengthChange = new EventEmitter();
|
364 | this.s_snapGridLengthChange = new EventEmitter();
|
365 | this.s_snapIndexChange = new EventEmitter();
|
366 | this.s_tap = new EventEmitter();
|
367 | this.s_toEdge = new EventEmitter();
|
368 | this.s_touchEnd = new EventEmitter();
|
369 | this.s_touchMove = new EventEmitter();
|
370 | this.s_touchMoveOpposite = new EventEmitter();
|
371 | this.s_touchStart = new EventEmitter();
|
372 | this.s_transitionEnd = new EventEmitter();
|
373 | this.s_transitionStart = new EventEmitter();
|
374 | this.s_update = new EventEmitter();
|
375 | this.s_zoomChange = new EventEmitter();
|
376 | this.s_swiper = new EventEmitter();
|
377 | this.s_lock = new EventEmitter();
|
378 | this.s_unlock = new EventEmitter();
|
379 | this._activeSlides = new Subject();
|
380 | this.containerClasses = 'swiper';
|
381 | this.slidesChanges = (val) => {
|
382 | this.slides = val.map((slide, index) => {
|
383 | slide.slideIndex = index;
|
384 | slide.classNames = this.slideClass || '';
|
385 | return slide;
|
386 | });
|
387 | if (this.loop && !this.loopedSlides) {
|
388 | this.calcLoopedSlides();
|
389 | }
|
390 | if (!this.virtual) {
|
391 | if (this.loopedSlides) {
|
392 | this.prependSlides = of(this.slides.slice(this.slides.length - this.loopedSlides));
|
393 | this.appendSlides = of(this.slides.slice(0, this.loopedSlides));
|
394 | }
|
395 | }
|
396 | else if (this.swiperRef && this.swiperRef.virtual) {
|
397 | this._ngZone.runOutsideAngular(() => {
|
398 | this.swiperRef.virtual.slides = this.slides;
|
399 | this.swiperRef.virtual.update(true);
|
400 | });
|
401 | }
|
402 | this._changeDetectorRef.detectChanges();
|
403 | };
|
404 | this.style = null;
|
405 | this.updateVirtualSlides = (virtualData) => {
|
406 |
|
407 | if (!this.swiperRef ||
|
408 | (this.currentVirtualData &&
|
409 | this.currentVirtualData.from === virtualData.from &&
|
410 | this.currentVirtualData.to === virtualData.to &&
|
411 | this.currentVirtualData.offset === virtualData.offset)) {
|
412 | return;
|
413 | }
|
414 | this.style = this.swiperRef.isHorizontal()
|
415 | ? {
|
416 | [this.swiperRef.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`,
|
417 | }
|
418 | : {
|
419 | top: `${virtualData.offset}px`,
|
420 | };
|
421 | this.currentVirtualData = virtualData;
|
422 | this._activeSlides.next(virtualData.slides);
|
423 | this._ngZone.run(() => {
|
424 | this._changeDetectorRef.detectChanges();
|
425 | });
|
426 | this._ngZone.runOutsideAngular(() => {
|
427 | this.swiperRef.updateSlides();
|
428 | this.swiperRef.updateProgress();
|
429 | this.swiperRef.updateSlidesClasses();
|
430 | if (isEnabled(this.swiperRef.params.lazy)) {
|
431 | this.swiperRef.lazy.load();
|
432 | }
|
433 | this.swiperRef.virtual.update(true);
|
434 | });
|
435 | return;
|
436 | };
|
437 | }
|
438 | set navigation(val) {
|
439 | var _a, _b, _c;
|
440 | const currentNext = typeof this._navigation !== 'boolean' && this._navigation !== ''
|
441 | ? (_a = this._navigation) === null || _a === void 0 ? void 0 : _a.nextEl
|
442 | : null;
|
443 | const currentPrev = typeof this._navigation !== 'boolean' && this._navigation !== ''
|
444 | ? (_b = this._navigation) === null || _b === void 0 ? void 0 : _b.prevEl
|
445 | : null;
|
446 | this._navigation = setProperty(val, {
|
447 | nextEl: currentNext || null,
|
448 | prevEl: currentPrev || null,
|
449 | });
|
450 | this.showNavigation = !(coerceBooleanProperty(val) !== true ||
|
451 | (this._navigation &&
|
452 | typeof this._navigation !== 'boolean' &&
|
453 | this._navigation.prevEl !== ((_c = this._prevElRef) === null || _c === void 0 ? void 0 : _c.nativeElement) &&
|
454 | (this._navigation.prevEl !== null || this._navigation.nextEl !== null) &&
|
455 | (typeof this._navigation.nextEl === 'string' ||
|
456 | typeof this._navigation.prevEl === 'string' ||
|
457 | typeof this._navigation.nextEl === 'object' ||
|
458 | typeof this._navigation.prevEl === 'object')));
|
459 | }
|
460 | get navigation() {
|
461 | return this._navigation;
|
462 | }
|
463 | set pagination(val) {
|
464 | var _a;
|
465 | const current = typeof this._pagination !== 'boolean' && this._pagination !== ''
|
466 | ? (_a = this._pagination) === null || _a === void 0 ? void 0 : _a.el
|
467 | : null;
|
468 | this._pagination = setProperty(val, {
|
469 | el: current || null,
|
470 | });
|
471 | this.showPagination = isShowEl(val, this._pagination, this._paginationElRef);
|
472 | }
|
473 | get pagination() {
|
474 | return this._pagination;
|
475 | }
|
476 | set scrollbar(val) {
|
477 | var _a;
|
478 | const current = typeof this._scrollbar !== 'boolean' && this._scrollbar !== '' ? (_a = this._scrollbar) === null || _a === void 0 ? void 0 : _a.el : null;
|
479 | this._scrollbar = setProperty(val, {
|
480 | el: current || null,
|
481 | });
|
482 | this.showScrollbar = isShowEl(val, this._scrollbar, this._scrollbarElRef);
|
483 | }
|
484 | get scrollbar() {
|
485 | return this._scrollbar;
|
486 | }
|
487 | set virtual(val) {
|
488 | this._virtual = setProperty(val);
|
489 | }
|
490 | get virtual() {
|
491 | return this._virtual;
|
492 | }
|
493 | set config(val) {
|
494 | this.updateSwiper(val);
|
495 | const { params } = getParams(val);
|
496 | Object.assign(this, params);
|
497 | }
|
498 | set prevElRef(el) {
|
499 | this._prevElRef = el;
|
500 | this._setElement(el, this.navigation, 'navigation', 'prevEl');
|
501 | }
|
502 | set nextElRef(el) {
|
503 | this._nextElRef = el;
|
504 | this._setElement(el, this.navigation, 'navigation', 'nextEl');
|
505 | }
|
506 | set scrollbarElRef(el) {
|
507 | this._scrollbarElRef = el;
|
508 | this._setElement(el, this.scrollbar, 'scrollbar');
|
509 | }
|
510 | set paginationElRef(el) {
|
511 | this._paginationElRef = el;
|
512 | this._setElement(el, this.pagination, 'pagination');
|
513 | }
|
514 | get activeSlides() {
|
515 | if (this.virtual) {
|
516 | return this._activeSlides;
|
517 | }
|
518 | return of(this.slides);
|
519 | }
|
520 | get zoomContainerClass() {
|
521 | return this.zoom && typeof this.zoom !== 'boolean'
|
522 | ? this.zoom.containerClass
|
523 | : 'swiper-zoom-container';
|
524 | }
|
525 | _setElement(el, ref, update, key = 'el') {
|
526 | if (!ref || !el)
|
527 | return;
|
528 | if (el.nativeElement) {
|
529 | if (ref[key] === el.nativeElement) {
|
530 | return;
|
531 | }
|
532 | ref[key] = el.nativeElement;
|
533 | }
|
534 | const updateObj = {};
|
535 | updateObj[update] = true;
|
536 | this.updateInitSwiper(updateObj);
|
537 | }
|
538 | ngOnInit() {
|
539 | const { params } = getParams(this);
|
540 | Object.assign(this, params);
|
541 | }
|
542 | ngAfterViewInit() {
|
543 | this.childrenSlidesInit();
|
544 | this.initSwiper();
|
545 | this._changeDetectorRef.detectChanges();
|
546 | setTimeout(() => {
|
547 | this.s_swiper.emit(this.swiperRef);
|
548 | });
|
549 | }
|
550 | childrenSlidesInit() {
|
551 | this.slidesChanges(this.slidesEl);
|
552 | this.slidesEl.changes.subscribe(this.slidesChanges);
|
553 | }
|
554 | get isSwiperActive() {
|
555 | return this.swiperRef && !this.swiperRef.destroyed;
|
556 | }
|
557 | initSwiper() {
|
558 | const { params: swiperParams, passedParams } = getParams(this);
|
559 | Object.assign(this, swiperParams);
|
560 | this._ngZone.runOutsideAngular(() => {
|
561 | swiperParams.init = false;
|
562 | if (!swiperParams.virtual) {
|
563 | swiperParams.observer = true;
|
564 | }
|
565 | swiperParams.onAny = (eventName, ...args) => {
|
566 | const emitter = this[('s_' + eventName)];
|
567 | if (emitter) {
|
568 | emitter.emit([...args]);
|
569 | }
|
570 | };
|
571 | const _slideClasses = (_, updated) => {
|
572 | updated.forEach(({ slideEl, classNames }, index) => {
|
573 | const dataIndex = slideEl.getAttribute('data-swiper-slide-index');
|
574 | const slideIndex = dataIndex ? parseInt(dataIndex) : index;
|
575 | if (this.virtual) {
|
576 | const virtualSlide = this.slides.find((item) => {
|
577 | return item.virtualIndex && item.virtualIndex === slideIndex;
|
578 | });
|
579 | if (virtualSlide) {
|
580 | virtualSlide.classNames = classNames;
|
581 | return;
|
582 | }
|
583 | }
|
584 | if (this.slides[slideIndex]) {
|
585 | this.slides[slideIndex].classNames = classNames;
|
586 | }
|
587 | });
|
588 | this._changeDetectorRef.detectChanges();
|
589 | };
|
590 | const _containerClasses = (_, classes) => {
|
591 | setTimeout(() => {
|
592 | this.containerClasses = classes;
|
593 | });
|
594 | };
|
595 | Object.assign(swiperParams.on, {
|
596 | _containerClasses,
|
597 | _slideClasses,
|
598 | });
|
599 | const swiperRef = new Swiper(swiperParams);
|
600 | swiperRef.loopCreate = () => { };
|
601 | swiperRef.loopDestroy = () => { };
|
602 | if (swiperParams.loop) {
|
603 | swiperRef.loopedSlides = this.loopedSlides;
|
604 | }
|
605 | const isVirtualEnabled = isEnabled(swiperRef.params.virtual);
|
606 | if (swiperRef.virtual && isVirtualEnabled) {
|
607 | swiperRef.virtual.slides = this.slides;
|
608 | const extendWith = {
|
609 | cache: false,
|
610 | slides: this.slides,
|
611 | renderExternal: this.updateVirtualSlides,
|
612 | renderExternalUpdate: false,
|
613 | };
|
614 | extend(swiperRef.params.virtual, extendWith);
|
615 | extend(swiperRef.originalParams.virtual, extendWith);
|
616 | }
|
617 | if (isPlatformBrowser(this._platformId)) {
|
618 | this.swiperRef = swiperRef.init(this.elementRef.nativeElement);
|
619 | const isVirtualEnabled = isEnabled(this.swiperRef.params.virtual);
|
620 | if (this.swiperRef.virtual && isVirtualEnabled) {
|
621 | this.swiperRef.virtual.update(true);
|
622 | }
|
623 | this._changeDetectorRef.detectChanges();
|
624 | }
|
625 | });
|
626 | }
|
627 | ngOnChanges(changedParams) {
|
628 | this.updateSwiper(changedParams);
|
629 | this._changeDetectorRef.detectChanges();
|
630 | }
|
631 | updateInitSwiper(changedParams) {
|
632 | if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {
|
633 | return;
|
634 | }
|
635 | this._ngZone.runOutsideAngular(() => {
|
636 | const { params: currentParams, pagination, navigation, scrollbar, virtual, thumbs, } = this.swiperRef;
|
637 | if (changedParams.pagination) {
|
638 | if (this.pagination &&
|
639 | typeof this.pagination !== 'boolean' &&
|
640 | this.pagination.el &&
|
641 | pagination &&
|
642 | !pagination.el) {
|
643 | this.updateParameter('pagination', this.pagination);
|
644 | pagination.init();
|
645 | pagination.render();
|
646 | pagination.update();
|
647 | }
|
648 | else {
|
649 | pagination.destroy();
|
650 | pagination.el = null;
|
651 | }
|
652 | }
|
653 | if (changedParams.scrollbar) {
|
654 | if (this.scrollbar &&
|
655 | typeof this.scrollbar !== 'boolean' &&
|
656 | this.scrollbar.el &&
|
657 | scrollbar &&
|
658 | !scrollbar.el) {
|
659 | this.updateParameter('scrollbar', this.scrollbar);
|
660 | scrollbar.init();
|
661 | scrollbar.updateSize();
|
662 | scrollbar.setTranslate();
|
663 | }
|
664 | else {
|
665 | scrollbar.destroy();
|
666 | scrollbar.el = null;
|
667 | }
|
668 | }
|
669 | if (changedParams.navigation) {
|
670 | if (this.navigation &&
|
671 | typeof this.navigation !== 'boolean' &&
|
672 | this.navigation.prevEl &&
|
673 | this.navigation.nextEl &&
|
674 | navigation &&
|
675 | !navigation.prevEl &&
|
676 | !navigation.nextEl) {
|
677 | this.updateParameter('navigation', this.navigation);
|
678 | navigation.init();
|
679 | navigation.update();
|
680 | }
|
681 | else if (navigation.prevEl && navigation.nextEl) {
|
682 | navigation.destroy();
|
683 | navigation.nextEl = null;
|
684 | navigation.prevEl = null;
|
685 | }
|
686 | }
|
687 | if (changedParams.thumbs && this.thumbs && this.thumbs.swiper) {
|
688 | this.updateParameter('thumbs', this.thumbs);
|
689 | const initialized = thumbs.init();
|
690 | if (initialized)
|
691 | thumbs.update(true);
|
692 | }
|
693 | if (changedParams.controller && this.controller && this.controller.control) {
|
694 | this.swiperRef.controller.control = this.controller.control;
|
695 | }
|
696 | this.swiperRef.update();
|
697 | });
|
698 | }
|
699 | updateSwiper(changedParams) {
|
700 | this._ngZone.runOutsideAngular(() => {
|
701 | var _a, _b;
|
702 | if (changedParams.config) {
|
703 | return;
|
704 | }
|
705 | if (!(changedParams && this.swiperRef && !this.swiperRef.destroyed)) {
|
706 | return;
|
707 | }
|
708 | for (const key in changedParams) {
|
709 | if (ignoreNgOnChanges.indexOf(key) >= 0) {
|
710 | continue;
|
711 | }
|
712 | const newValue = (_b = (_a = changedParams[key]) === null || _a === void 0 ? void 0 : _a.currentValue) !== null && _b !== void 0 ? _b : changedParams[key];
|
713 | this.updateParameter(key, newValue);
|
714 | }
|
715 | if (changedParams.allowSlideNext) {
|
716 | this.swiperRef.allowSlideNext = this.allowSlideNext;
|
717 | }
|
718 | if (changedParams.allowSlidePrev) {
|
719 | this.swiperRef.allowSlidePrev = this.allowSlidePrev;
|
720 | }
|
721 | if (changedParams.direction) {
|
722 | this.swiperRef.changeDirection(this.direction, false);
|
723 | }
|
724 | if (changedParams.breakpoints) {
|
725 | if (this.loop && !this.loopedSlides) {
|
726 | this.calcLoopedSlides();
|
727 | }
|
728 | this.swiperRef.currentBreakpoint = null;
|
729 | this.swiperRef.setBreakpoint();
|
730 | }
|
731 | if (changedParams.thumbs || changedParams.controller) {
|
732 | this.updateInitSwiper(changedParams);
|
733 | }
|
734 | this.swiperRef.update();
|
735 | });
|
736 | }
|
737 | calcLoopedSlides() {
|
738 | if (!this.loop) {
|
739 | return false;
|
740 | }
|
741 | let slidesPerViewParams = this.slidesPerView;
|
742 | if (this.breakpoints) {
|
743 | const breakpoint = Swiper.prototype.getBreakpoint(this.breakpoints);
|
744 | const breakpointOnlyParams = breakpoint in this.breakpoints ? this.breakpoints[breakpoint] : undefined;
|
745 | if (breakpointOnlyParams && breakpointOnlyParams.slidesPerView) {
|
746 | slidesPerViewParams = breakpointOnlyParams.slidesPerView;
|
747 | }
|
748 | }
|
749 | if (slidesPerViewParams === 'auto') {
|
750 | this.loopedSlides = this.slides.length;
|
751 | return this.slides.length;
|
752 | }
|
753 | let loopedSlides = this.loopedSlides || slidesPerViewParams;
|
754 | if (!loopedSlides) {
|
755 |
|
756 | return false;
|
757 | }
|
758 | if (this.loopAdditionalSlides) {
|
759 | loopedSlides += this.loopAdditionalSlides;
|
760 | }
|
761 | if (loopedSlides > this.slides.length) {
|
762 | loopedSlides = this.slides.length;
|
763 | }
|
764 | this.loopedSlides = loopedSlides;
|
765 | return true;
|
766 | }
|
767 | updateParameter(key, value) {
|
768 | if (!(this.swiperRef && !this.swiperRef.destroyed)) {
|
769 | return;
|
770 | }
|
771 | const _key = key.replace(/^_/, '');
|
772 | const isCurrentParamObj = isObject(this.swiperRef.params[_key]);
|
773 | if (_key === 'enabled') {
|
774 | if (value === true) {
|
775 | this.swiperRef.enable();
|
776 | }
|
777 | else if (value === false) {
|
778 | this.swiperRef.disable();
|
779 | }
|
780 | return;
|
781 | }
|
782 | if (isCurrentParamObj && isObject(value)) {
|
783 | extend(this.swiperRef.params[_key], value);
|
784 | }
|
785 | else {
|
786 | this.swiperRef.params[_key] = value;
|
787 | }
|
788 | }
|
789 | ngOnDestroy() {
|
790 | this._ngZone.runOutsideAngular(() => {
|
791 | var _a;
|
792 | (_a = this.swiperRef) === null || _a === void 0 ? void 0 : _a.destroy(true, false);
|
793 | });
|
794 | }
|
795 | }
|
796 | SwiperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SwiperComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
|
797 | SwiperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SwiperComponent, selector: "swiper, [swiper]", inputs: { enabled: "enabled", on: "on", direction: "direction", touchEventsTarget: "touchEventsTarget", initialSlide: "initialSlide", speed: "speed", cssMode: "cssMode", updateOnWindowResize: "updateOnWindowResize", resizeObserver: "resizeObserver", nested: "nested", focusableElements: "focusableElements", width: "width", height: "height", preventInteractionOnTransition: "preventInteractionOnTransition", userAgent: "userAgent", url: "url", edgeSwipeDetection: "edgeSwipeDetection", edgeSwipeThreshold: "edgeSwipeThreshold", freeMode: "freeMode", autoHeight: "autoHeight", setWrapperSize: "setWrapperSize", virtualTranslate: "virtualTranslate", effect: "effect", breakpoints: "breakpoints", spaceBetween: "spaceBetween", slidesPerView: "slidesPerView", maxBackfaceHiddenSlides: "maxBackfaceHiddenSlides", grid: "grid", slidesPerGroup: "slidesPerGroup", slidesPerGroupSkip: "slidesPerGroupSkip", centeredSlides: "centeredSlides", centeredSlidesBounds: "centeredSlidesBounds", slidesOffsetBefore: "slidesOffsetBefore", slidesOffsetAfter: "slidesOffsetAfter", normalizeSlideIndex: "normalizeSlideIndex", centerInsufficientSlides: "centerInsufficientSlides", watchOverflow: "watchOverflow", roundLengths: "roundLengths", touchRatio: "touchRatio", touchAngle: "touchAngle", simulateTouch: "simulateTouch", shortSwipes: "shortSwipes", longSwipes: "longSwipes", longSwipesRatio: "longSwipesRatio", longSwipesMs: "longSwipesMs", followFinger: "followFinger", allowTouchMove: "allowTouchMove", threshold: "threshold", touchMoveStopPropagation: "touchMoveStopPropagation", touchStartPreventDefault: "touchStartPreventDefault", touchStartForcePreventDefault: "touchStartForcePreventDefault", touchReleaseOnEdges: "touchReleaseOnEdges", uniqueNavElements: "uniqueNavElements", resistance: "resistance", resistanceRatio: "resistanceRatio", watchSlidesProgress: "watchSlidesProgress", grabCursor: "grabCursor", preventClicks: "preventClicks", preventClicksPropagation: "preventClicksPropagation", slideToClickedSlide: "slideToClickedSlide", preloadImages: "preloadImages", updateOnImagesReady: "updateOnImagesReady", loop: "loop", loopAdditionalSlides: "loopAdditionalSlides", loopedSlides: "loopedSlides", loopedSlidesLimit: "loopedSlidesLimit", loopFillGroupWithBlank: "loopFillGroupWithBlank", loopPreventsSlide: "loopPreventsSlide", rewind: "rewind", allowSlidePrev: "allowSlidePrev", allowSlideNext: "allowSlideNext", swipeHandler: "swipeHandler", noSwiping: "noSwiping", noSwipingClass: "noSwipingClass", noSwipingSelector: "noSwipingSelector", passiveListeners: "passiveListeners", containerModifierClass: "containerModifierClass", slideClass: "slideClass", slideBlankClass: "slideBlankClass", slideActiveClass: "slideActiveClass", slideDuplicateActiveClass: "slideDuplicateActiveClass", slideVisibleClass: "slideVisibleClass", slideDuplicateClass: "slideDuplicateClass", slideNextClass: "slideNextClass", slideDuplicateNextClass: "slideDuplicateNextClass", slidePrevClass: "slidePrevClass", slideDuplicatePrevClass: "slideDuplicatePrevClass", wrapperClass: "wrapperClass", runCallbacksOnInit: "runCallbacksOnInit", observeParents: "observeParents", observeSlideChildren: "observeSlideChildren", a11y: "a11y", autoplay: "autoplay", controller: "controller", coverflowEffect: "coverflowEffect", cubeEffect: "cubeEffect", fadeEffect: "fadeEffect", flipEffect: "flipEffect", creativeEffect: "creativeEffect", cardsEffect: "cardsEffect", hashNavigation: "hashNavigation", history: "history", keyboard: "keyboard", lazy: "lazy", mousewheel: "mousewheel", parallax: "parallax", thumbs: "thumbs", zoom: "zoom", slidesPerGroupAuto: "slidesPerGroupAuto", class: "class", id: "id", navigation: "navigation", pagination: "pagination", scrollbar: "scrollbar", virtual: "virtual", config: "config" }, outputs: { s__beforeBreakpoint: "_beforeBreakpoint", s__containerClasses: "_containerClasses", s__slideClass: "_slideClass", s__swiper: "_swiper", s_activeIndexChange: "activeIndexChange", s_afterInit: "afterInit", s_autoplay: "autoplay", s_autoplayStart: "autoplayStart", s_autoplayStop: "autoplayStop", s_autoplayPause: "autoplayPause", s_autoplayResume: "autoplayResume", s_beforeDestroy: "beforeDestroy", s_beforeInit: "beforeInit", s_beforeLoopFix: "beforeLoopFix", s_beforeResize: "beforeResize", s_beforeSlideChangeStart: "beforeSlideChangeStart", s_beforeTransitionStart: "beforeTransitionStart", s_breakpoint: "breakpoint", s_changeDirection: "changeDirection", s_click: "click", s_doubleTap: "doubleTap", s_doubleClick: "doubleClick", s_destroy: "destroy", s_fromEdge: "fromEdge", s_hashChange: "hashChange", s_hashSet: "hashSet", s_imagesReady: "imagesReady", s_init: "init", s_keyPress: "keyPress", s_lazyImageLoad: "lazyImageLoad", s_lazyImageReady: "lazyImageReady", s_loopFix: "loopFix", s_momentumBounce: "momentumBounce", s_navigationHide: "navigationHide", s_navigationShow: "navigationShow", s_navigationPrev: "navigationPrev", s_navigationNext: "navigationNext", s_observerUpdate: "observerUpdate", s_orientationchange: "orientationchange", s_paginationHide: "paginationHide", s_paginationRender: "paginationRender", s_paginationShow: "paginationShow", s_paginationUpdate: "paginationUpdate", s_progress: "progress", s_reachBeginning: "reachBeginning", s_reachEnd: "reachEnd", s_realIndexChange: "realIndexChange", s_resize: "resize", s_scroll: "scroll", s_scrollbarDragEnd: "scrollbarDragEnd", s_scrollbarDragMove: "scrollbarDragMove", s_scrollbarDragStart: "scrollbarDragStart", s_setTransition: "setTransition", s_setTranslate: "setTranslate", s_slideChange: "slideChange", s_slideChangeTransitionEnd: "slideChangeTransitionEnd", s_slideChangeTransitionStart: "slideChangeTransitionStart", s_slideNextTransitionEnd: "slideNextTransitionEnd", s_slideNextTransitionStart: "slideNextTransitionStart", s_slidePrevTransitionEnd: "slidePrevTransitionEnd", s_slidePrevTransitionStart: "slidePrevTransitionStart", s_slideResetTransitionStart: "slideResetTransitionStart", s_slideResetTransitionEnd: "slideResetTransitionEnd", s_sliderMove: "sliderMove", s_sliderFirstMove: "sliderFirstMove", s_slidesLengthChange: "slidesLengthChange", s_slidesGridLengthChange: "slidesGridLengthChange", s_snapGridLengthChange: "snapGridLengthChange", s_snapIndexChange: "snapIndexChange", s_tap: "tap", s_toEdge: "toEdge", s_touchEnd: "touchEnd", s_touchMove: "touchMove", s_touchMoveOpposite: "touchMoveOpposite", s_touchStart: "touchStart", s_transitionEnd: "transitionEnd", s_transitionStart: "transitionStart", s_update: "update", s_zoomChange: "zoomChange", s_swiper: "swiper", s_lock: "lock", s_unlock: "unlock" }, host: { properties: { "class": "this.containerClasses" } }, queries: [{ propertyName: "slidesEl", predicate: SwiperSlideDirective }], viewQueries: [{ propertyName: "prevElRef", first: true, predicate: ["prevElRef"], descendants: true }, { propertyName: "nextElRef", first: true, predicate: ["nextElRef"], descendants: true }, { propertyName: "scrollbarElRef", first: true, predicate: ["scrollbarElRef"], descendants: true }, { propertyName: "paginationElRef", first: true, predicate: ["paginationElRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-content select=\"[slot=container-start]\"></ng-content>\n<ng-container *ngIf=\"navigation && showNavigation\">\n <div class=\"swiper-button-prev\" #prevElRef></div>\n <div class=\"swiper-button-next\" #nextElRef></div>\n</ng-container>\n<div *ngIf=\"scrollbar && showScrollbar\" class=\"swiper-scrollbar\" #scrollbarElRef></div>\n<div *ngIf=\"pagination && showPagination\" class=\"swiper-pagination\" #paginationElRef></div>\n<div [ngClass]=\"wrapperClass\" [attr.id]=\"id\">\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]=\"\n (slide.class ? slide.class + ' ' : '') +\n slideClass +\n (slideKey !== '' ? ' ' + slideDuplicateClass : '')\n \"\n [attr.data-swiper-slide-index]=\"slide.virtualIndex ? slide.virtualIndex : slide.slideIndex\"\n [attr.data-swiper-autoplay]=\"slide.autoplayDelay\"\n [style]=\"style\"\n [ngSwitch]=\"slide.zoom\"\n >\n <div *ngSwitchCase=\"true\" [ngClass]=\"zoomContainerClass\">\n <ng-template\n [ngTemplateOutlet]=\"slide.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: slide.slideData\n }\"\n ></ng-template>\n </div>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"slide.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: slide.slideData\n }\"\n ></ng-template>\n </ng-container>\n </div>\n</ng-template>\n", styles: ["swiper{display:block}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
798 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SwiperComponent, decorators: [{
|
799 | type: Component,
|
800 | args: [{ selector: 'swiper, [swiper]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [
|
801 | `
|
802 | swiper {
|
803 | display: block;
|
804 | }
|
805 | `,
|
806 | ], template: "<ng-content select=\"[slot=container-start]\"></ng-content>\n<ng-container *ngIf=\"navigation && showNavigation\">\n <div class=\"swiper-button-prev\" #prevElRef></div>\n <div class=\"swiper-button-next\" #nextElRef></div>\n</ng-container>\n<div *ngIf=\"scrollbar && showScrollbar\" class=\"swiper-scrollbar\" #scrollbarElRef></div>\n<div *ngIf=\"pagination && showPagination\" class=\"swiper-pagination\" #paginationElRef></div>\n<div [ngClass]=\"wrapperClass\" [attr.id]=\"id\">\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]=\"\n (slide.class ? slide.class + ' ' : '') +\n slideClass +\n (slideKey !== '' ? ' ' + slideDuplicateClass : '')\n \"\n [attr.data-swiper-slide-index]=\"slide.virtualIndex ? slide.virtualIndex : slide.slideIndex\"\n [attr.data-swiper-autoplay]=\"slide.autoplayDelay\"\n [style]=\"style\"\n [ngSwitch]=\"slide.zoom\"\n >\n <div *ngSwitchCase=\"true\" [ngClass]=\"zoomContainerClass\">\n <ng-template\n [ngTemplateOutlet]=\"slide.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: slide.slideData\n }\"\n ></ng-template>\n </div>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"slide.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: slide.slideData\n }\"\n ></ng-template>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
807 | }], ctorParameters: function () {
|
808 | return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: Object, decorators: [{
|
809 | type: Inject,
|
810 | args: [PLATFORM_ID]
|
811 | }] }];
|
812 | }, propDecorators: { enabled: [{
|
813 | type: Input
|
814 | }], on: [{
|
815 | type: Input
|
816 | }], direction: [{
|
817 | type: Input
|
818 | }], touchEventsTarget: [{
|
819 | type: Input
|
820 | }], initialSlide: [{
|
821 | type: Input
|
822 | }], speed: [{
|
823 | type: Input
|
824 | }], cssMode: [{
|
825 | type: Input
|
826 | }], updateOnWindowResize: [{
|
827 | type: Input
|
828 | }], resizeObserver: [{
|
829 | type: Input
|
830 | }], nested: [{
|
831 | type: Input
|
832 | }], focusableElements: [{
|
833 | type: Input
|
834 | }], width: [{
|
835 | type: Input
|
836 | }], height: [{
|
837 | type: Input
|
838 | }], preventInteractionOnTransition: [{
|
839 | type: Input
|
840 | }], userAgent: [{
|
841 | type: Input
|
842 | }], url: [{
|
843 | type: Input
|
844 | }], edgeSwipeDetection: [{
|
845 | type: Input
|
846 | }], edgeSwipeThreshold: [{
|
847 | type: Input
|
848 | }], freeMode: [{
|
849 | type: Input
|
850 | }], autoHeight: [{
|
851 | type: Input
|
852 | }], setWrapperSize: [{
|
853 | type: Input
|
854 | }], virtualTranslate: [{
|
855 | type: Input
|
856 | }], effect: [{
|
857 | type: Input
|
858 | }], breakpoints: [{
|
859 | type: Input
|
860 | }], spaceBetween: [{
|
861 | type: Input
|
862 | }], slidesPerView: [{
|
863 | type: Input
|
864 | }], maxBackfaceHiddenSlides: [{
|
865 | type: Input
|
866 | }], grid: [{
|
867 | type: Input
|
868 | }], slidesPerGroup: [{
|
869 | type: Input
|
870 | }], slidesPerGroupSkip: [{
|
871 | type: Input
|
872 | }], centeredSlides: [{
|
873 | type: Input
|
874 | }], centeredSlidesBounds: [{
|
875 | type: Input
|
876 | }], slidesOffsetBefore: [{
|
877 | type: Input
|
878 | }], slidesOffsetAfter: [{
|
879 | type: Input
|
880 | }], normalizeSlideIndex: [{
|
881 | type: Input
|
882 | }], centerInsufficientSlides: [{
|
883 | type: Input
|
884 | }], watchOverflow: [{
|
885 | type: Input
|
886 | }], roundLengths: [{
|
887 | type: Input
|
888 | }], touchRatio: [{
|
889 | type: Input
|
890 | }], touchAngle: [{
|
891 | type: Input
|
892 | }], simulateTouch: [{
|
893 | type: Input
|
894 | }], shortSwipes: [{
|
895 | type: Input
|
896 | }], longSwipes: [{
|
897 | type: Input
|
898 | }], longSwipesRatio: [{
|
899 | type: Input
|
900 | }], longSwipesMs: [{
|
901 | type: Input
|
902 | }], followFinger: [{
|
903 | type: Input
|
904 | }], allowTouchMove: [{
|
905 | type: Input
|
906 | }], threshold: [{
|
907 | type: Input
|
908 | }], touchMoveStopPropagation: [{
|
909 | type: Input
|
910 | }], touchStartPreventDefault: [{
|
911 | type: Input
|
912 | }], touchStartForcePreventDefault: [{
|
913 | type: Input
|
914 | }], touchReleaseOnEdges: [{
|
915 | type: Input
|
916 | }], uniqueNavElements: [{
|
917 | type: Input
|
918 | }], resistance: [{
|
919 | type: Input
|
920 | }], resistanceRatio: [{
|
921 | type: Input
|
922 | }], watchSlidesProgress: [{
|
923 | type: Input
|
924 | }], grabCursor: [{
|
925 | type: Input
|
926 | }], preventClicks: [{
|
927 | type: Input
|
928 | }], preventClicksPropagation: [{
|
929 | type: Input
|
930 | }], slideToClickedSlide: [{
|
931 | type: Input
|
932 | }], preloadImages: [{
|
933 | type: Input
|
934 | }], updateOnImagesReady: [{
|
935 | type: Input
|
936 | }], loop: [{
|
937 | type: Input
|
938 | }], loopAdditionalSlides: [{
|
939 | type: Input
|
940 | }], loopedSlides: [{
|
941 | type: Input
|
942 | }], loopedSlidesLimit: [{
|
943 | type: Input
|
944 | }], loopFillGroupWithBlank: [{
|
945 | type: Input
|
946 | }], loopPreventsSlide: [{
|
947 | type: Input
|
948 | }], rewind: [{
|
949 | type: Input
|
950 | }], allowSlidePrev: [{
|
951 | type: Input
|
952 | }], allowSlideNext: [{
|
953 | type: Input
|
954 | }], swipeHandler: [{
|
955 | type: Input
|
956 | }], noSwiping: [{
|
957 | type: Input
|
958 | }], noSwipingClass: [{
|
959 | type: Input
|
960 | }], noSwipingSelector: [{
|
961 | type: Input
|
962 | }], passiveListeners: [{
|
963 | type: Input
|
964 | }], containerModifierClass: [{
|
965 | type: Input
|
966 | }], slideClass: [{
|
967 | type: Input
|
968 | }], slideBlankClass: [{
|
969 | type: Input
|
970 | }], slideActiveClass: [{
|
971 | type: Input
|
972 | }], slideDuplicateActiveClass: [{
|
973 | type: Input
|
974 | }], slideVisibleClass: [{
|
975 | type: Input
|
976 | }], slideDuplicateClass: [{
|
977 | type: Input
|
978 | }], slideNextClass: [{
|
979 | type: Input
|
980 | }], slideDuplicateNextClass: [{
|
981 | type: Input
|
982 | }], slidePrevClass: [{
|
983 | type: Input
|
984 | }], slideDuplicatePrevClass: [{
|
985 | type: Input
|
986 | }], wrapperClass: [{
|
987 | type: Input
|
988 | }], runCallbacksOnInit: [{
|
989 | type: Input
|
990 | }], observeParents: [{
|
991 | type: Input
|
992 | }], observeSlideChildren: [{
|
993 | type: Input
|
994 | }], a11y: [{
|
995 | type: Input
|
996 | }], autoplay: [{
|
997 | type: Input
|
998 | }], controller: [{
|
999 | type: Input
|
1000 | }], coverflowEffect: [{
|
1001 | type: Input
|
1002 | }], cubeEffect: [{
|
1003 | type: Input
|
1004 | }], fadeEffect: [{
|
1005 | type: Input
|
1006 | }], flipEffect: [{
|
1007 | type: Input
|
1008 | }], creativeEffect: [{
|
1009 | type: Input
|
1010 | }], cardsEffect: [{
|
1011 | type: Input
|
1012 | }], hashNavigation: [{
|
1013 | type: Input
|
1014 | }], history: [{
|
1015 | type: Input
|
1016 | }], keyboard: [{
|
1017 | type: Input
|
1018 | }], lazy: [{
|
1019 | type: Input
|
1020 | }], mousewheel: [{
|
1021 | type: Input
|
1022 | }], parallax: [{
|
1023 | type: Input
|
1024 | }], thumbs: [{
|
1025 | type: Input
|
1026 | }], zoom: [{
|
1027 | type: Input
|
1028 | }], slidesPerGroupAuto: [{
|
1029 | type: Input
|
1030 | }], class: [{
|
1031 | type: Input
|
1032 | }], id: [{
|
1033 | type: Input
|
1034 | }], navigation: [{
|
1035 | type: Input
|
1036 | }], pagination: [{
|
1037 | type: Input
|
1038 | }], scrollbar: [{
|
1039 | type: Input
|
1040 | }], virtual: [{
|
1041 | type: Input
|
1042 | }], config: [{
|
1043 | type: Input
|
1044 | }], s__beforeBreakpoint: [{
|
1045 | type: Output,
|
1046 | args: ['_beforeBreakpoint']
|
1047 | }], s__containerClasses: [{
|
1048 | type: Output,
|
1049 | args: ['_containerClasses']
|
1050 | }], s__slideClass: [{
|
1051 | type: Output,
|
1052 | args: ['_slideClass']
|
1053 | }], s__swiper: [{
|
1054 | type: Output,
|
1055 | args: ['_swiper']
|
1056 | }], s_activeIndexChange: [{
|
1057 | type: Output,
|
1058 | args: ['activeIndexChange']
|
1059 | }], s_afterInit: [{
|
1060 | type: Output,
|
1061 | args: ['afterInit']
|
1062 | }], s_autoplay: [{
|
1063 | type: Output,
|
1064 | args: ['autoplay']
|
1065 | }], s_autoplayStart: [{
|
1066 | type: Output,
|
1067 | args: ['autoplayStart']
|
1068 | }], s_autoplayStop: [{
|
1069 | type: Output,
|
1070 | args: ['autoplayStop']
|
1071 | }], s_autoplayPause: [{
|
1072 | type: Output,
|
1073 | args: ['autoplayPause']
|
1074 | }], s_autoplayResume: [{
|
1075 | type: Output,
|
1076 | args: ['autoplayResume']
|
1077 | }], s_beforeDestroy: [{
|
1078 | type: Output,
|
1079 | args: ['beforeDestroy']
|
1080 | }], s_beforeInit: [{
|
1081 | type: Output,
|
1082 | args: ['beforeInit']
|
1083 | }], s_beforeLoopFix: [{
|
1084 | type: Output,
|
1085 | args: ['beforeLoopFix']
|
1086 | }], s_beforeResize: [{
|
1087 | type: Output,
|
1088 | args: ['beforeResize']
|
1089 | }], s_beforeSlideChangeStart: [{
|
1090 | type: Output,
|
1091 | args: ['beforeSlideChangeStart']
|
1092 | }], s_beforeTransitionStart: [{
|
1093 | type: Output,
|
1094 | args: ['beforeTransitionStart']
|
1095 | }], s_breakpoint: [{
|
1096 | type: Output,
|
1097 | args: ['breakpoint']
|
1098 | }], s_changeDirection: [{
|
1099 | type: Output,
|
1100 | args: ['changeDirection']
|
1101 | }], s_click: [{
|
1102 | type: Output,
|
1103 | args: ['click']
|
1104 | }], s_doubleTap: [{
|
1105 | type: Output,
|
1106 | args: ['doubleTap']
|
1107 | }], s_doubleClick: [{
|
1108 | type: Output,
|
1109 | args: ['doubleClick']
|
1110 | }], s_destroy: [{
|
1111 | type: Output,
|
1112 | args: ['destroy']
|
1113 | }], s_fromEdge: [{
|
1114 | type: Output,
|
1115 | args: ['fromEdge']
|
1116 | }], s_hashChange: [{
|
1117 | type: Output,
|
1118 | args: ['hashChange']
|
1119 | }], s_hashSet: [{
|
1120 | type: Output,
|
1121 | args: ['hashSet']
|
1122 | }], s_imagesReady: [{
|
1123 | type: Output,
|
1124 | args: ['imagesReady']
|
1125 | }], s_init: [{
|
1126 | type: Output,
|
1127 | args: ['init']
|
1128 | }], s_keyPress: [{
|
1129 | type: Output,
|
1130 | args: ['keyPress']
|
1131 | }], s_lazyImageLoad: [{
|
1132 | type: Output,
|
1133 | args: ['lazyImageLoad']
|
1134 | }], s_lazyImageReady: [{
|
1135 | type: Output,
|
1136 | args: ['lazyImageReady']
|
1137 | }], s_loopFix: [{
|
1138 | type: Output,
|
1139 | args: ['loopFix']
|
1140 | }], s_momentumBounce: [{
|
1141 | type: Output,
|
1142 | args: ['momentumBounce']
|
1143 | }], s_navigationHide: [{
|
1144 | type: Output,
|
1145 | args: ['navigationHide']
|
1146 | }], s_navigationShow: [{
|
1147 | type: Output,
|
1148 | args: ['navigationShow']
|
1149 | }], s_navigationPrev: [{
|
1150 | type: Output,
|
1151 | args: ['navigationPrev']
|
1152 | }], s_navigationNext: [{
|
1153 | type: Output,
|
1154 | args: ['navigationNext']
|
1155 | }], s_observerUpdate: [{
|
1156 | type: Output,
|
1157 | args: ['observerUpdate']
|
1158 | }], s_orientationchange: [{
|
1159 | type: Output,
|
1160 | args: ['orientationchange']
|
1161 | }], s_paginationHide: [{
|
1162 | type: Output,
|
1163 | args: ['paginationHide']
|
1164 | }], s_paginationRender: [{
|
1165 | type: Output,
|
1166 | args: ['paginationRender']
|
1167 | }], s_paginationShow: [{
|
1168 | type: Output,
|
1169 | args: ['paginationShow']
|
1170 | }], s_paginationUpdate: [{
|
1171 | type: Output,
|
1172 | args: ['paginationUpdate']
|
1173 | }], s_progress: [{
|
1174 | type: Output,
|
1175 | args: ['progress']
|
1176 | }], s_reachBeginning: [{
|
1177 | type: Output,
|
1178 | args: ['reachBeginning']
|
1179 | }], s_reachEnd: [{
|
1180 | type: Output,
|
1181 | args: ['reachEnd']
|
1182 | }], s_realIndexChange: [{
|
1183 | type: Output,
|
1184 | args: ['realIndexChange']
|
1185 | }], s_resize: [{
|
1186 | type: Output,
|
1187 | args: ['resize']
|
1188 | }], s_scroll: [{
|
1189 | type: Output,
|
1190 | args: ['scroll']
|
1191 | }], s_scrollbarDragEnd: [{
|
1192 | type: Output,
|
1193 | args: ['scrollbarDragEnd']
|
1194 | }], s_scrollbarDragMove: [{
|
1195 | type: Output,
|
1196 | args: ['scrollbarDragMove']
|
1197 | }], s_scrollbarDragStart: [{
|
1198 | type: Output,
|
1199 | args: ['scrollbarDragStart']
|
1200 | }], s_setTransition: [{
|
1201 | type: Output,
|
1202 | args: ['setTransition']
|
1203 | }], s_setTranslate: [{
|
1204 | type: Output,
|
1205 | args: ['setTranslate']
|
1206 | }], s_slideChange: [{
|
1207 | type: Output,
|
1208 | args: ['slideChange']
|
1209 | }], s_slideChangeTransitionEnd: [{
|
1210 | type: Output,
|
1211 | args: ['slideChangeTransitionEnd']
|
1212 | }], s_slideChangeTransitionStart: [{
|
1213 | type: Output,
|
1214 | args: ['slideChangeTransitionStart']
|
1215 | }], s_slideNextTransitionEnd: [{
|
1216 | type: Output,
|
1217 | args: ['slideNextTransitionEnd']
|
1218 | }], s_slideNextTransitionStart: [{
|
1219 | type: Output,
|
1220 | args: ['slideNextTransitionStart']
|
1221 | }], s_slidePrevTransitionEnd: [{
|
1222 | type: Output,
|
1223 | args: ['slidePrevTransitionEnd']
|
1224 | }], s_slidePrevTransitionStart: [{
|
1225 | type: Output,
|
1226 | args: ['slidePrevTransitionStart']
|
1227 | }], s_slideResetTransitionStart: [{
|
1228 | type: Output,
|
1229 | args: ['slideResetTransitionStart']
|
1230 | }], s_slideResetTransitionEnd: [{
|
1231 | type: Output,
|
1232 | args: ['slideResetTransitionEnd']
|
1233 | }], s_sliderMove: [{
|
1234 | type: Output,
|
1235 | args: ['sliderMove']
|
1236 | }], s_sliderFirstMove: [{
|
1237 | type: Output,
|
1238 | args: ['sliderFirstMove']
|
1239 | }], s_slidesLengthChange: [{
|
1240 | type: Output,
|
1241 | args: ['slidesLengthChange']
|
1242 | }], s_slidesGridLengthChange: [{
|
1243 | type: Output,
|
1244 | args: ['slidesGridLengthChange']
|
1245 | }], s_snapGridLengthChange: [{
|
1246 | type: Output,
|
1247 | args: ['snapGridLengthChange']
|
1248 | }], s_snapIndexChange: [{
|
1249 | type: Output,
|
1250 | args: ['snapIndexChange']
|
1251 | }], s_tap: [{
|
1252 | type: Output,
|
1253 | args: ['tap']
|
1254 | }], s_toEdge: [{
|
1255 | type: Output,
|
1256 | args: ['toEdge']
|
1257 | }], s_touchEnd: [{
|
1258 | type: Output,
|
1259 | args: ['touchEnd']
|
1260 | }], s_touchMove: [{
|
1261 | type: Output,
|
1262 | args: ['touchMove']
|
1263 | }], s_touchMoveOpposite: [{
|
1264 | type: Output,
|
1265 | args: ['touchMoveOpposite']
|
1266 | }], s_touchStart: [{
|
1267 | type: Output,
|
1268 | args: ['touchStart']
|
1269 | }], s_transitionEnd: [{
|
1270 | type: Output,
|
1271 | args: ['transitionEnd']
|
1272 | }], s_transitionStart: [{
|
1273 | type: Output,
|
1274 | args: ['transitionStart']
|
1275 | }], s_update: [{
|
1276 | type: Output,
|
1277 | args: ['update']
|
1278 | }], s_zoomChange: [{
|
1279 | type: Output,
|
1280 | args: ['zoomChange']
|
1281 | }], s_swiper: [{
|
1282 | type: Output,
|
1283 | args: ['swiper']
|
1284 | }], s_lock: [{
|
1285 | type: Output,
|
1286 | args: ['lock']
|
1287 | }], s_unlock: [{
|
1288 | type: Output,
|
1289 | args: ['unlock']
|
1290 | }], prevElRef: [{
|
1291 | type: ViewChild,
|
1292 | args: ['prevElRef', { static: false }]
|
1293 | }], nextElRef: [{
|
1294 | type: ViewChild,
|
1295 | args: ['nextElRef', { static: false }]
|
1296 | }], scrollbarElRef: [{
|
1297 | type: ViewChild,
|
1298 | args: ['scrollbarElRef', { static: false }]
|
1299 | }], paginationElRef: [{
|
1300 | type: ViewChild,
|
1301 | args: ['paginationElRef', { static: false }]
|
1302 | }], slidesEl: [{
|
1303 | type: ContentChildren,
|
1304 | args: [SwiperSlideDirective, { descendants: false, emitDistinctChangesOnly: true }]
|
1305 | }], containerClasses: [{
|
1306 | type: HostBinding,
|
1307 | args: ['class']
|
1308 | }] } });
|
1309 |
|
1310 | class SwiperModule {
|
1311 | }
|
1312 | SwiperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SwiperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1313 | SwiperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SwiperModule, declarations: [SwiperComponent, SwiperSlideDirective], imports: [CommonModule], exports: [SwiperComponent, SwiperSlideDirective] });
|
1314 | SwiperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SwiperModule, imports: [[CommonModule]] });
|
1315 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SwiperModule, decorators: [{
|
1316 | type: NgModule,
|
1317 | args: [{
|
1318 | declarations: [SwiperComponent, SwiperSlideDirective],
|
1319 | exports: [SwiperComponent, SwiperSlideDirective],
|
1320 | imports: [CommonModule],
|
1321 | }]
|
1322 | }] });
|
1323 |
|
1324 |
|
1325 |
|
1326 |
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 | export { SwiperComponent, SwiperModule, SwiperSlideDirective };
|
1333 |
|